dungeon_crawler

diff prototype/src/light.cc @ 29:2fc004802739

lalala
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 26 Aug 2012 03:39:32 +0300
parents cbf86e5198a9
children 0357994effe2
line diff
     1.1 --- a/prototype/src/light.cc	Sat Aug 25 20:20:56 2012 +0300
     1.2 +++ b/prototype/src/light.cc	Sun Aug 26 03:39:32 2012 +0300
     1.3 @@ -108,13 +108,14 @@
     1.4  
     1.5  void PointLight::draw() const
     1.6  {
     1.7 -	//glMatrixMode(GL_MODELVIEW);
     1.8 -	//glPushMatrix();
     1.9 -	//glScalef(radius, radius, radius);
    1.10 +	glMatrixMode(GL_MODELVIEW);
    1.11 +	glPushMatrix();
    1.12 +	glTranslatef(pos.x, pos.y, pos.z);
    1.13 +	glScalef(radius, radius, radius);
    1.14  
    1.15  	Light::draw();
    1.16  
    1.17 -	//glPopMatrix();
    1.18 +	glPopMatrix();
    1.19  }
    1.20  
    1.21  
    1.22 @@ -155,13 +156,13 @@
    1.23  		for(int j=0; j<udiv; j++) {
    1.24  			float u = (float)j / (float)udiv;
    1.25  
    1.26 +			*vptr++ = sphvertex(u, v + dv);
    1.27 +			*vptr++ = sphvertex(u + du, v);
    1.28  			*vptr++ = sphvertex(u, v);
    1.29 +
    1.30 +			*vptr++ = sphvertex(u, v + dv);
    1.31 +			*vptr++ = sphvertex(u + du, v + dv);
    1.32  			*vptr++ = sphvertex(u + du, v);
    1.33 -			*vptr++ = sphvertex(u, v + dv);
    1.34 -
    1.35 -			*vptr++ = sphvertex(u + du, v);
    1.36 -			*vptr++ = sphvertex(u + du, v + dv);
    1.37 -			*vptr++ = sphvertex(u, v + dv);
    1.38  		}
    1.39  	}
    1.40  	glUnmapBuffer(GL_ARRAY_BUFFER);