Changeset 4008 in orxonox.OLD for orxonox/branches/shadows/src
- Timestamp:
- Apr 29, 2005, 11:10:15 AM (20 years ago)
- Location:
- orxonox/branches/shadows/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/shadows/src/orxonox.cc
r3839 r4008 133 133 134 134 int bpp = 16; 135 int width = 1024;136 int height = 768;135 int width = 400; 136 int height = 300; 137 137 //Uint32 flags = SDL_HWSURFACE | SDL_OPENGL | SDL_GL_DOUBLEBUFFER; /* \todo: SDL_OPENGL doen't permit to load images*/ 138 138 //Uint32 flags = SDL_HWSURFACE | SDL_GL_DOUBLEBUFFER; … … 185 185 glEnable (GL_LIGHTING); 186 186 glEnable (GL_LIGHT0); 187 glEnable (GL_LIGHT1);187 //glEnable (GL_LIGHT1); 188 188 glEnable (GL_DEPTH_TEST); 189 189 glLightfv (GL_LIGHT0, GL_POSITION, lightPosition); -
orxonox/branches/shadows/src/shadow.cc
r3861 r4008 90 90 this->player_id=glGenLists(1); 91 91 glNewList(this->player_id,GL_COMPILE); 92 93 92 this->player->draw(); 94 95 93 glEndList(); 96 94 … … 102 100 103 101 void Shadow::createShadow() 104 { 102 { 105 103 glViewport(0,0,SIZE,SIZE); 106 104 glScissor(0,0,SIZE,SIZE); … … 143 141 144 142 glDisable(GL_SCISSOR_TEST); 145 glViewport(0,0, 1024,768); //Achtung: hier Aufloesung von Orxonox einstellen!143 glViewport(0,0,400,300); //Achtung: hier Aufloesung von Orxonox einstellen! 146 144 147 145 //Die oben veraenderten und zwischengespeicherten werte wieder herstellen! … … 159 157 float m[16],im[16]; 160 158 161 createShadow(); 162 //glClearColor(0,0,0,1); 163 //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 164 //glMatrixMode(GL_PROJECTION); 165 //glLoadIdentity(); 166 //gluPerspective(45,4.0/3.0,.5,100); 167 //glMatrixMode(GL_MODELVIEW); 168 //glLoadIdentity(); 159 //createShadow(); 160 169 161 170 //this->mat->select(); 171 //glCallList(this->ground_id); 172 173 glDisable(GL_TEXTURE_2D); 162 glDisable(GL_COLOR_MATERIAL); 163 this->mat->select(); 164 glCallList(this->ground_id); 165 166 174 167 175 168 /*shadow*/ … … 189 182 190 183 glMultMatrixf(im); 191 glEnable(GL_TEXTURE_2D);192 glBindTexture(GL_TEXTURE_2D,this->shadow_id);184 //glEnable(GL_TEXTURE_2D); 185 //glBindTexture(GL_TEXTURE_2D,this->shadow_id); 193 186 glEnable(GL_BLEND); 194 187 glBlendFunc(GL_DST_COLOR,GL_SRC_COLOR); 195 glCallList(this->ground_id);188 //glCallList(this->ground_id); 196 189 glDisable(GL_BLEND); 197 //glDisable(GL_TEXTURE_2D);198 199 //glLoadIdentity();190 191 192 glLoadIdentity(); 200 193 glMatrixMode(GL_MODELVIEW); 201 194 glDisable(GL_TEXTURE_GEN_S); -
orxonox/branches/shadows/src/world.cc
r3861 r4008 894 894 */ 895 895 void World::display () 896 { 896 { shadow->createShadow(); 897 897 // clear buffer 898 898 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
Note: See TracChangeset
for help on using the changeset viewer.