- Timestamp:
- May 28, 2005, 12:05:46 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/glmenu/glmenu_imagescreen.cc
r4320 r4357 259 259 backMat->select(); 260 260 glBegin(GL_TRIANGLE_STRIP); 261 glTexCoord2i(0, 0); glVertex2i(offsetX, offsetY + imageHeight);262 glTexCoord2i(1, 0); glVertex2i(offsetX +imageWidth, offsetY + imageHeight);263 glTexCoord2i(0, 1); glVertex2i(offsetX, offsetY);264 glTexCoord2i(1, 1); glVertex2i(offsetX + imageWidth, offsetY);261 glTexCoord2i(0, 1); glVertex2i(offsetX, offsetY + imageHeight); 262 glTexCoord2i(1, 1); glVertex2i(offsetX +imageWidth, offsetY + imageHeight); 263 glTexCoord2i(0, 0); glVertex2i(offsetX, offsetY); 264 glTexCoord2i(1, 0); glVertex2i(offsetX + imageWidth, offsetY); 265 265 glEnd(); 266 266 … … 279 279 barMat->select(); 280 280 glBegin(GL_TRIANGLE_STRIP); 281 glTexCoord2f(0, 0); glVertex2i(barX, barY + barH);282 glTexCoord2f(val, 0); glVertex2i(barX + (int)(val * this->barW * (float)screenWidth), barY + barH);283 glTexCoord2f(0, 1); glVertex2i(barX, barY);284 glTexCoord2f(val, 1); glVertex2i(barX + (int)(val * this->barW * (float)screenWidth), barY);281 glTexCoord2f(0, 1); glVertex2i(barX, barY + barH); 282 glTexCoord2f(val, 1); glVertex2i(barX + (int)(val * this->barW * (float)screenWidth), barY + barH); 283 glTexCoord2f(0, 0); glVertex2i(barX, barY); 284 glTexCoord2f(val, 0); glVertex2i(barX + (int)(val * this->barW * (float)screenWidth), barY); 285 285 glEnd(); 286 286 -
orxonox/trunk/src/lib/graphics/importer/material.cc
r4136 r4357 83 83 84 84 // setting the transparency 85 /* 85 86 if (this->transparency < 1.0) 86 87 { … … 94 95 glColor4f(1.0f, 1.0f, 1.0f, 1.0f); 95 96 } 96 97 */ 97 98 98 99 // setting illumination Model -
orxonox/trunk/src/lib/graphics/importer/md2Model.cc
r4284 r4357 221 221 { 222 222 glNormal3fv(anorms[this->data->pLightNormals[pCommands[2]]]); 223 glTexCoord2f( ((float *)pCommands)[0], 1.0-((float *)pCommands)[1] );223 glTexCoord2f( ((float *)pCommands)[0], ((float *)pCommands)[1] ); 224 224 glVertex3fv(verticesList[pCommands[2]]); 225 225 } -
orxonox/trunk/src/lib/graphics/importer/model.cc
r4112 r4357 489 489 If a vertexTextureCoordinate line is found, 490 490 this function will inject it into the vertexTexture-Array 491 492 !! WARNING THIS IS DIFFERNT FROM addVervexTexture(float, float); because it changes the second entry to 1-v !! 491 493 */ 492 494 bool Model::addVertexTexture (const char* vTextureString) … … 497 499 PRINTF(5)("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2); 498 500 this->vTexture->addEntry(subbuffer1); 499 this->vTexture->addEntry( subbuffer2);501 this->vTexture->addEntry(1 - subbuffer2); 500 502 this->texCoordCount++; 501 503 return true; -
orxonox/trunk/src/lib/graphics/importer/texture.cc
r3966 r4357 18 18 #include "texture.h" 19 19 20 #include "debug.h" 20 21 #include "graphics_engine.h" 22 23 #include <SDL_image.h> 21 24 22 25 /** … … 167 170 168 171 GLubyte* pixels = (GLubyte*)tmpSurf->pixels; 169 170 /* this swaps the Mapping so lowel left will be upper left */171 for( int i = 0 ; i < (tmpSurf->h / 2) ; ++i )172 for( int j = 0 ; j < tmpSurf->w * tmpSurf->format->BytesPerPixel; j += tmpSurf->format->BytesPerPixel )173 for(int k = 0; k < tmpSurf->format->BytesPerPixel; ++k)174 swap( pixels[(i * tmpSurf->w * tmpSurf->format->BytesPerPixel) + j + k],175 pixels[ ( (tmpSurf->h - i - 1) * tmpSurf->w * tmpSurf->format->BytesPerPixel) + j + k]);176 172 177 173 PRINTF(3)("loading Image %s\n", imageName); -
orxonox/trunk/src/lib/graphics/importer/texture.h
r3966 r4357 14 14 #include "debug.h" 15 15 16 #include <SDL_image.h> 16 enum TEXTURE_TYPE { TEXTURE_RADIAL_ALIAS, 17 TEXTURE_NOISE }; 17 18 18 19 //! A Class, that reads in Textures from different fileformats. … … 27 28 public: 28 29 Texture(const char* imageName = NULL); 30 Texture(TEXTURE_TYPE type, int resolution); 29 31 ~Texture(void); 30 32 -
orxonox/trunk/src/lib/graphics/particles/particle_system.cc
r4349 r4357 321 321 case PARTICLE_SPRITE: 322 322 glMatrixMode(GL_MODELVIEW); 323 glDisable(GL_DEPTH_TEST);323 // glDisable(GL_DEPTH_TEST); 324 324 325 325 material->select(); 326 // 326 //glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_ENV_MODE, GL_MODULATE); 327 327 328 328 -
orxonox/trunk/src/subprojects/particles/particle_fun.cc
r4356 r4357 100 100 { 101 101 tmpEmit->setEmissionRate(atof(value)); 102 PRINT( 3)("EmissionRate set to %f\n", atof(value));102 PRINT(4)("EmissionRate set to %f\n", atof(value)); 103 103 } 104 104 else if (!strcmp(name, "Velocity")) 105 105 { 106 106 tmpEmit->setEmissionVelocity(atof(value)); 107 PRINT( 3)("Velocity set to %f\n", atof(value));107 PRINT(4)("Velocity set to %f\n", atof(value)); 108 108 } 109 109 else if(!strcmp(name, "SpreadAngle")) 110 110 { 111 111 tmpEmit->setSpread(atof(value)); 112 PRINT( 3)("SpreadAngle set to %f\n", atof(value));112 PRINT(4)("SpreadAngle set to %f\n", atof(value)); 113 113 } 114 114 else if(!strcmp(name, "EmitterType")) … … 120 120 else if (!strcmp(value, "EMITTER_CUBE")) 121 121 tmpEmit->setType(EMITTER_CUBE); 122 PRINT( 3)("EmitterType set to %s\n", value);122 PRINT(4)("EmitterType set to %s\n", value); 123 123 } 124 124 else if(!strcmp(name, "EmitterSize")) 125 125 { 126 126 tmpEmit->setSize(atof(value)); 127 PRINT( 3)("EmitterSize set to %f\n", atof(value));127 PRINT(4)("EmitterSize set to %f\n", atof(value)); 128 128 } 129 129 } … … 144 144 { 145 145 tmpSys->setRadius(atof(value), tmpSys->getEndRadius()); 146 PRINT( 3)("ParticleStartRadius set to %f\n", atof(value));146 PRINT(4)("ParticleStartRadius set to %f\n", atof(value)); 147 147 } 148 148 else if (!strcmp(name, "EndRadius")) 149 149 { 150 150 tmpSys->setRadius( tmpSys->getStartRadius(), atof(value)); 151 PRINT( 3)("ParticleEndRadius set to %f\n", atof(value));151 PRINT(4)("ParticleEndRadius set to %f\n", atof(value)); 152 152 } 153 153 … … 155 155 { 156 156 tmpSys->setLifeSpan(atof(value)); 157 PRINT( 3)("ParticleLifeSpan set to %f\n", atof(value));157 PRINT(4)("ParticleLifeSpan set to %f\n", atof(value)); 158 158 } 159 159 … … 161 161 { 162 162 tmpSys->setConserve(atof(value)); 163 PRINT( 3)("ParticleConserveFactor set to %f\n", atof(value));163 PRINT(4)("ParticleConserveFactor set to %f\n", atof(value)); 164 164 } 165 165 … … 173 173 tmpSys->setType(PARTICLE_SPRITE); 174 174 175 PRINT( 3)("ParticleType set to %s\n", value);175 PRINT(4)("ParticleType set to %s\n", value); 176 176 } 177 177 … … 179 179 { 180 180 tmpSys->setInheritSpeed(atof(value)); 181 PRINT( 3)("ParticleInheritSpeed set to %f\n", atof(value));181 PRINT(4)("ParticleInheritSpeed set to %f\n", atof(value)); 182 182 } 183 183 else if (!strcmp(name, "RandomColor")) -
orxonox/trunk/src/world_entities/skybox.cc
r4320 r4357 193 193 this->skyModel->addVertex (0.5*size, -0.5*size, -0.5*size); 194 194 195 this->skyModel->addVertexTexture (0.0, 1.0); 196 this->skyModel->addVertexTexture (1.0, 1.0); 197 this->skyModel->addVertexTexture (1.0, 0.0); 195 198 this->skyModel->addVertexTexture (0.0, 0.0); 196 this->skyModel->addVertexTexture (1.0, 0.0);197 this->skyModel->addVertexTexture (1.0, 1.0);198 this->skyModel->addVertexTexture (0.0, 1.0);199 199 200 200 this->skyModel->addVertexNormal (0.0, 0.0, 1.0);
Note: See TracChangeset
for help on using the changeset viewer.