Changeset 5267 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Sep 27, 2005, 6:09:09 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/shader.cc
r5266 r5267 65 65 this->deleteProgram(SHADER_FRAGMENT); 66 66 67 glDeleteObjectARB(this->fragmentShader); 68 glDeleteObjectARB(this->vertexShader); 67 69 glDeleteObjectARB(this->shaderProgram); 68 70 } … … 167 169 void Shader::printError(GLenum program) 168 170 { 169 GLint length = 5000; 170 // glGetObjectParameterARBfiv(program, GL_OBJECT_INFO_LOG_LENGTH_ARB, &length); 171 char* text = new char[length+1]; 172 glGetInfoLogARB(program, length, &length, text); 173 printf("%s\n", text); 174 delete[] text; 171 int infologLength = 0; 172 int charsWritten = 0; 173 char *infoLog; 174 175 glGetObjectParameterivARB(program, GL_OBJECT_INFO_LOG_LENGTH_ARB, 176 &infologLength); 177 178 if (infologLength > 0) 179 { 180 infoLog = (char *)malloc(infologLength); 181 glGetInfoLogARB(program, infologLength, &charsWritten, infoLog); 182 printf("%s\n",infoLog); 183 free(infoLog); 184 } 175 185 } 176 186
Note: See TracChangeset
for help on using the changeset viewer.