Changeset 5866 in orxonox.OLD for trunk/src/subprojects
- Timestamp:
- Dec 1, 2005, 11:12:28 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/subprojects/importer/multitex.cc
r5865 r5866 33 33 TextureSequence* seq; 34 34 Texture* test; 35 Material* testMat; 36 35 37 float counter = 0; 38 36 39 37 40 void Framework::moduleInit(int argc, char** argv) 38 41 { 39 42 ResourceManager::getInstance()->addImageDir("./"); 43 44 testMat = new Material; 40 45 41 46 seq = new TextureSequence(); … … 46 51 } 47 52 test = new Texture(argv[1]); 53 testMat->setDiffuseMap(argv[1]); 48 54 49 55 ResourceManager::getInstance()->addImageDir(""); 50 56 51 57 52 obj = new PrimitiveModel(PRIM_ CYLINDER);58 obj = new PrimitiveModel(PRIM_SPHERE, 10.0); 53 59 54 60 ResourceManager::getInstance()->debug(); … … 84 90 void Framework::moduleDraw(void) const 85 91 { 86 float diffuse[] = {1,1,1,1}; 87 float ambient[] = {1,0,0,1}; 88 float specular[] = {1,0,1,1}; 89 // setting diffuse color 90 // glColor3f (diffuse[0], diffuse[1], diffuse[2]); 91 glMaterialfv(GL_FRONT, GL_DIFFUSE, diffuse); 92 93 // setting ambient color 94 glMaterialfv(GL_FRONT, GL_AMBIENT, ambient); 95 96 // setting up Sprecular 97 glMaterialfv(GL_FRONT, GL_SPECULAR, specular); 98 99 // setting up Shininess 100 glMaterialf(GL_FRONT, GL_SHININESS, .4); 101 glShadeModel(GL_SMOOTH); 102 103 glEnable(GL_TEXTURE_2D); 92 testMat->select(); 104 93 glBindTexture(GL_TEXTURE_2D, seq->getTexture()); 105 // printf("Number = %d\n", seq->getTexture());106 /* This allows alpha blending of 2D textures with the scene */107 // if (seq->hasAlpha())108 // {109 // glEnable(GL_BLEND);110 // glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);111 // }112 113 94 obj->draw(); 114 95
Note: See TracChangeset
for help on using the changeset viewer.