Changeset 5322 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Oct 8, 2005, 4:37:43 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/shader.cc
r5321 r5322 73 73 Shader::~Shader () 74 74 { 75 if ( storedShader == this)75 if (this->shaderProgram == glGetHandleARB(GL_PROGRAM_OBJECT_ARB)) 76 76 Shader::deactivateShader(); 77 77 … … 81 81 82 82 if (this->fragmentShader != 0) 83 { 84 glDetachObjectARB(this->shaderProgram, this->fragmentShader); 83 85 glDeleteObjectARB(this->fragmentShader); 86 } 84 87 if (this->vertexShader != 0) 88 { 89 glDetachObjectARB(this->shaderProgram, this->vertexShader); 85 90 glDeleteObjectARB(this->vertexShader); 91 } 86 92 if (this->shaderProgram != 0) 87 93 { 88 94 GLint status = 0; 95 //glLinkProgramARB(this->shaderProgram); 89 96 glDeleteObjectARB(this->shaderProgram); 90 97 // link error checking
Note: See TracChangeset
for help on using the changeset viewer.