Changeset 5319 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Oct 8, 2005, 3:10:38 PM (19 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/objModel.cc
r5300 r5319 176 176 Material* tmpMat = NULL; 177 177 178 while(fgets(buffer, PARSELINELENGTH, stream) )178 while(fgets(buffer, PARSELINELENGTH, stream) != NULL) 179 179 { 180 180 PRINTF(5)("found line in mtlFile: %s\n", buffer); -
trunk/src/lib/graphics/shader.cc
r5318 r5319 91 91 bool Shader::loadShaderProgramm(SHADER_TYPE type, const char* fileName) 92 92 { 93 GL enumshader = 0;93 GLhandleARB shader = 0; 94 94 95 95 if (type != SHADER_VERTEX && type != SHADER_FRAGMENT) … … 119 119 120 120 if (shader != 0) 121 { 122 glShaderSourceARB(shader, program->getCount(), (const GLcharARB**)program->getArray(), NULL); 123 glCompileShaderARB(shader); 124 this->printError(shader); 125 glAttachObjectARB(this->shaderProgram, shader); 126 } 127 delete program; 121 { 122 glShaderSourceARB(shader, program->getCount(), (const GLcharARB**)program->getArray(), NULL); 123 glCompileShaderARB(shader); 124 this->printError(shader); 125 glAttachObjectARB(this->shaderProgram, shader); 126 } 127 for (unsigned int i=0; i< program->getCount(); i++) 128 delete[] program->getArray()[i]; 129 delete program; 128 130 } 129 131 … … 218 220 219 221 220 void Shader::printError(GL enumprogram)222 void Shader::printError(GLhandleARB program) 221 223 { 222 224 if (program == 0) -
trunk/src/lib/graphics/shader.h
r5318 r5319 45 45 46 46 47 void printError(GL enumprogram);47 void printError(GLhandleARB program); 48 48 void debug() const; 49 49 … … 53 53 char* fragmentShaderFile; 54 54 char* vertexShaderFile; 55 GL enumshaderProgram;56 GL enumvertexShader;57 GL enumfragmentShader;55 GLhandleARB shaderProgram; 56 GLhandleARB vertexShader; 57 GLhandleARB fragmentShader; 58 58 59 59 static Shader* storedShader;
Note: See TracChangeset
for help on using the changeset viewer.