OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 } | 87 } |
88 return false; | 88 return false; |
89 } | 89 } |
90 | 90 |
91 bool WebGLProgram::linkStatus() | 91 bool WebGLProgram::linkStatus() |
92 { | 92 { |
93 cacheInfoIfNeeded(); | 93 cacheInfoIfNeeded(); |
94 return m_linkStatus; | 94 return m_linkStatus; |
95 } | 95 } |
96 | 96 |
97 void WebGLProgram::setLinkStatus(bool status) | |
98 { | |
99 cacheInfoIfNeeded(); | |
100 m_linkStatus = status; | |
101 } | |
102 | |
103 void WebGLProgram::increaseLinkCount() | 97 void WebGLProgram::increaseLinkCount() |
104 { | 98 { |
105 ++m_linkCount; | 99 ++m_linkCount; |
106 m_infoValid = false; | 100 m_infoValid = false; |
107 } | 101 } |
108 | 102 |
109 WebGLShader* WebGLProgram::getAttachedShader(GLenum type) | 103 WebGLShader* WebGLProgram::getAttachedShader(GLenum type) |
110 { | 104 { |
111 switch (type) { | 105 switch (type) { |
112 case GL_VERTEX_SHADER: | 106 case GL_VERTEX_SHADER: |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 return; | 179 return; |
186 GLint linkStatus = 0; | 180 GLint linkStatus = 0; |
187 context->getProgramiv(object(), GL_LINK_STATUS, &linkStatus); | 181 context->getProgramiv(object(), GL_LINK_STATUS, &linkStatus); |
188 m_linkStatus = linkStatus; | 182 m_linkStatus = linkStatus; |
189 if (m_linkStatus) | 183 if (m_linkStatus) |
190 cacheActiveAttribLocations(context); | 184 cacheActiveAttribLocations(context); |
191 m_infoValid = true; | 185 m_infoValid = true; |
192 } | 186 } |
193 | 187 |
194 } | 188 } |
OLD | NEW |