Changeset 5268 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Sep 27, 2005, 6:21:57 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/shader.cc
r5267 r5268 50 50 if (fragmentShaderFile != NULL) 51 51 this->loadShaderProgramm(SHADER_FRAGMENT, fragmentShaderFile); 52 glLinkProgramARB(this->shaderProgram); 53 this->printError(this->shaderProgram); 54 52 try { 53 glLinkProgramARB(this->shaderProgram); } 54 catch(char* str) { 55 this->printError(this->shaderProgram); } 55 56 } 56 57 … … 86 87 87 88 this->vertexShader = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB); 88 glShaderSourceARB(this->vertexShader, 1, (const GLcharARB**)&program, NULL); 89 glCompileShaderARB(this->vertexShader); 90 glAttachObjectARB(this->shaderProgram, this->vertexShader); 91 this->printError(this->vertexShader); 89 try { 90 glShaderSourceARB(this->vertexShader, 1, (const GLcharARB**)&program, NULL); 91 glCompileShaderARB(this->vertexShader); 92 glAttachObjectARB(this->shaderProgram, this->vertexShader); 93 } 94 catch (char * tmp) 95 { 96 this->printError(this->vertexShader); 97 } 92 98 } 93 99 … … 98 104 99 105 this->fragmentShader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB); 100 glShaderSourceARB(this->fragmentShader, 1, (const GLcharARB**)&program, NULL); 101 glCompileShaderARB(this->fragmentShader); 102 glAttachObjectARB(this->shaderProgram, this->fragmentShader); 103 this->printError(this->fragmentShader); 106 try 107 { 108 glShaderSourceARB(this->fragmentShader, 1, (const GLcharARB**)&program, NULL); 109 glCompileShaderARB(this->fragmentShader); 110 glAttachObjectARB(this->shaderProgram, this->fragmentShader); 111 } 112 catch (char* tmp) 113 { 114 this->printError(this->fragmentShader); 115 } 104 116 } 105 117
Note: See TracChangeset
for help on using the changeset viewer.