Changeset 5319 in orxonox.OLD for trunk/src/lib
- Timestamp:
- Oct 8, 2005, 3:10:38 PM (19 years ago)
- Location:
- trunk/src/lib
- Files:
-
- 5 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; -
trunk/src/lib/gui/gtk_gui/gui_exec.h
r5024 r5319 24 24 char* confDir; //!< The directory of the orxonox-configuration-files. 25 25 char* confFile; //!< The name of the .orxonox.conf(ig)-file. 26 FILE* CONFIG_FILE; //!< Filehandler for reading and writing.27 26 28 27 //! A struct that holds informations about variables. -
trunk/src/lib/util/ini_parser.cc
r5169 r5319 119 119 char* ptr; 120 120 121 while( !feof( stream)) 122 { 123 // get next line 124 fgets (lineBuffer, PARSELINELENGHT, stream); 121 while( fgets (lineBuffer, PARSELINELENGHT, stream)) 122 { 125 123 lineBegin = lineBuffer; 126 124 // remove newline char, and \0-terminate
Note: See TracChangeset
for help on using the changeset viewer.