- Timestamp:
- Apr 1, 2005, 5:59:36 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/shadows/src/shadow.cc
r3711 r3712 101 101 void Shadow::createShadow() 102 102 { 103 glViewport(0,0, SIZE,SIZE);104 glScissor(0,0, SIZE,SIZE);103 glViewport(0,0,2*SIZE,2*SIZE); 104 glScissor(0,0,2*SIZE,2*SIZE); 105 105 glEnable(GL_SCISSOR_TEST); 106 106 glBindTexture(GL_TEXTURE_2D,this->shadow_id); … … 110 110 glMatrixMode(GL_PROJECTION); 111 111 glLoadIdentity(); 112 glOrtho(- 1,1,-1,1,-100,100);112 glOrtho(-4.2,4.2,-4.2,4.2,-100,100); 113 113 glMatrixMode(GL_MODELVIEW); 114 114 glLoadIdentity(); … … 116 116 gluLookAt(this->lightPos[0],this->lightPos[1],this->lightPos[2],this->playerPos[0],this->playerPos[1],this->playerPos[2],0,0,1); 117 117 118 glColor3f(. 4,.4,.4);118 glColor3f(.1,.1,.1); 119 119 glTranslatef(this->playerPos[0],this->playerPos[1],this->playerPos[2]); 120 120 //die Variable angle ist im Player.h als public definiert!!! deshalb kann … … 122 122 glRotatef(this->playerangle->angle,1.0,0.0,0.0); 123 123 124 124 //Lighting has to be disabled for the shadow to become nice black respectively grey (color(.1,.1,.1)) 125 glDisable(GL_LIGHTING); 125 126 glCallList(this->player_id); 127 glEnable(GL_LIGHTING); 128 126 129 glColor3f(1,1,1); 127 130 glReadPixels(0,0,SIZE,SIZE,GL_RGB,GL_UNSIGNED_BYTE,this->image);
Note: See TracChangeset
for help on using the changeset viewer.