Changeset 8233 in orxonox.OLD for branches/bsp_model/src/lib/graphics
- Timestamp:
- Jun 8, 2006, 1:26:50 PM (18 years ago)
- Location:
- branches/bsp_model/src/lib/graphics/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/bsp_model/src/lib/graphics/importer/bsp_file.cc
r8203 r8233 603 603 MoviePlayer * testMC = new MoviePlayer(mat); 604 604 testMC->start(0); 605 606 this->MovieMaterials.push_back(testMC); 605 607 606 608 //Material* tmp = new Material(); … … 632 634 sc *= 1/255.0; 633 635 634 scale = 1. 8; // Adjust brightness here636 scale = 1.0f; // Adjust brightness here 635 637 636 638 if(sc > 1.0f && (temp = (1.0f/sc)) < scale) scale=temp; -
branches/bsp_model/src/lib/graphics/importer/bsp_manager.cc
r8221 r8233 103 103 const void BspManager::tick(float time) 104 104 { 105 //if(!this->bspFile->MovieMaterials.empty()) 106 //this->bspFile->MovieMaterials.front()->tick(time ); 105 107 106 108 } … … 305 307 if(this->lastTex != curFace.texture) { 306 308 if(this->bspFile->Materials[curFace.texture].animated) { 307 glBlendFunc(GL_ ONE,GL_ONE_MINUS_SRC_COLOR);308 glEnable(GL_BLEND);309 glBlendFunc(GL_ZERO,GL_ONE); 310 //glEnable(GL_BLEND); 309 311 if(this->bspFile->Materials[curFace.texture].aviMat->getStatus() == 2) this->bspFile->Materials[curFace.texture].aviMat->start(0); 310 this->bspFile->Materials[curFace.texture].aviMat->tick(0.005);312 //this->bspFile->Materials[curFace.texture].aviMat->tick(0.005); 311 313 int n = this->bspFile->Materials[curFace.texture].aviMat->getTexture(); 312 314 glActiveTextureARB(GL_TEXTURE0_ARB); 313 315 glBindTexture(GL_TEXTURE_2D, n ); 314 glDisable(GL_BLEND);316 // glDisable(GL_BLEND); 315 317 } else { 316 318 this->bspFile->Materials[curFace.texture].mat->select(); … … 324 326 glEnable(GL_TEXTURE_2D); 325 327 } else { 328 // glEnable(GL_BLEND); 329 //glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 330 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 326 331 glActiveTextureARB(GL_TEXTURE1_ARB); 327 332 glBindTexture(GL_TEXTURE_2D, this->bspFile->glLightMapTextures[curFace.lm_index]); 328 333 glEnable(GL_TEXTURE_2D); 334 // glDisable(GL_BLEND); 329 335 } 330 336 … … 887 893 Vector dest1 = position1 + forwardDir; 888 894 Vector dest2 = position2 + forwardDir; 889 dest = position - Vector(0.0, 20.0,0.0);895 dest = position - Vector(0.0, 40.0,0.0); 890 896 Vector out1; 891 897 Vector out2; 892 898 /* 893 899 this->checkCollisionRayN(this->root,0.0f,1.0f, &position1, &dest1 ); 894 900 if(this->outputFraction == 1.0f) out1 = dest; … … 911 917 } 912 918 919 */ 920 921 float height = 10; 922 923 913 924 this->checkCollisionRayN(this->root,0.0f,1.0f, &position, &dest ); 914 925 if(this->outputFraction == 1.0f) out = dest; … … 919 930 out.z = position.z + (dest.z -position.z) * this->outputFraction; 920 931 921 Vector out3 = out + Vector( 3*this->collPlane->x,3*this->collPlane->y,3*this->collPlane->z);932 Vector out3 = out + Vector(height*this->collPlane->x,height*this->collPlane->y,height*this->collPlane->z); 922 933 this->out = out; 923 this->out1 = out1;924 this->out2 = out2;934 //this->out1 = out1; 935 //this->out2 = out2; 925 936 //this->drawDebugCube(&out1); 926 937 //this->drawDebugCube(&out2); … … 929 940 930 941 } 942 943 931 944 932 945 // Return the normal here: Normal's stored in this->collPlane;
Note: See TracChangeset
for help on using the changeset viewer.