Changeset 3737 in orxonox.OLD for orxonox/branches/shadows/src/shadow.cc
- Timestamp:
- Apr 6, 2005, 10:56:40 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/shadows/src/shadow.cc
r3728 r3737 84 84 glNewList(this->ground_id,GL_COMPILE); 85 85 86 //blabla86 setGround(); 87 87 88 88 glEndList(); … … 130 130 131 131 glColor3f(1,1,1); 132 glReadPixels(0,0,SIZE,SIZE,GL_RGB,GL_UNSIGNED_BYTE,this->image); 133 blur(this->image,SIZE); 134 glTexSubImage2D(GL_TEXTURE_2D,0,0,0,SIZE,SIZE,GL_RGB,GL_UNSIGNED_BYTE,this->image); 132 133 glCopyTexSubImage2D(GL_TEXTURE_2D,0,0,0,0,0,SIZE,SIZE); 134 //glReadPixels(0,0,SIZE,SIZE,GL_RGB,GL_UNSIGNED_BYTE,this->image); 135 //blur(this->image,SIZE); 136 //glTexSubImage2D(GL_TEXTURE_2D,0,0,0,SIZE,SIZE,GL_RGB,GL_UNSIGNED_BYTE,this->image); 135 137 136 138 glDisable(GL_SCISSOR_TEST); … … 170 172 void Shadow::setGround() 171 173 { 172 this->ground_id=glGenLists(1);173 glNewList(this->ground_id,GL_COMPILE);174 175 174 176 glBegin(GL_QUADS); 175 177 for(int i=0;i<100;i+=1) … … 190 192 } 191 193 glEnd(); 192 glEndList();194 193 195 194 196 … … 254 256 { 255 257 float m[16],im[16]; 258 256 259 createShadow(); 257 258 260 //glClearColor(0,0,0,0); 259 261 //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 260 //glMatrixMode(GL_PROJECTION);261 //glLoadIdentity();262 //gluPerspective(45,4.0/3.0,.5,100);263 //glMatrixMode(GL_MODELVIEW);264 //glLoadIdentity();265 266 //gluLookAt(this->cameraPos[0],this->cameraPos[1],this->cameraPos[2],this->playerPos[0],this->playerPos[1],this->playerPos[2],0,0,1);262 glMatrixMode(GL_PROJECTION); 263 glLoadIdentity(); 264 gluPerspective(45,4.0/3.0,.5,100); 265 glMatrixMode(GL_MODELVIEW); 266 glLoadIdentity(); 267 268 267 269 268 270 glEnable(GL_TEXTURE_GEN_S); … … 274 276 glMatrixMode(GL_TEXTURE); 275 277 glLoadIdentity(); 276 glTranslatef( 0.5,0.5,1.0);277 glScalef(0. 5,0.5,1.0);278 glTranslatef(-.5,.5,0); 279 glScalef(0.3,0.3,1.0); 278 280 glOrtho(-1,1,-1,1,-1,1); 279 281 … … 287 289 glCallList(this->ground_id); 288 290 glDisable(GL_BLEND); 291 glDisable(GL_TEXTURE_2D); 289 292 290 293 glLoadIdentity();
Note: See TracChangeset
for help on using the changeset viewer.