libpsys

diff src/psys_gl.c @ 2:6e5342a2529a

more stuff done
author John Tsiombikas <nuclear@mutantstargoat.com>
date Sun, 25 Sep 2011 04:26:51 +0300
parents 874a942853ad
children 133094e2f5a5
line diff
     1.1 --- a/src/psys_gl.c	Sat Sep 24 20:44:42 2011 +0300
     1.2 +++ b/src/psys_gl.c	Sun Sep 25 04:26:51 2011 +0300
     1.3 @@ -10,27 +10,26 @@
     1.4  {
     1.5  	float xform[16];
     1.6  
     1.7 -	vec3_t pos = psys_get_pos(em);
     1.8 -
     1.9 -	glPointSize(5.0);
    1.10 -	glBegin(GL_POINTS);
    1.11 -	glColor3f(1, 0, 0);
    1.12 -	glVertex3f(pos.x, pos.y, pos.z);
    1.13 -	glColor3f(1, 1, 1);
    1.14 -	glEnd();
    1.15 -
    1.16  	glMatrixMode(GL_MODELVIEW);
    1.17  	glPushMatrix();
    1.18  
    1.19  	glGetFloatv(GL_MODELVIEW_MATRIX, xform);
    1.20 -	xform[3] = xform[7] = xform[11] = xform[12] = xform[13] = xform[14] = 0.0f;
    1.21 -	xform[15] = 1.0f;
    1.22 +	xform[0] = xform[5] = xform[10] = 1.0;
    1.23 +	xform[1] = xform[2] = xform[4] = xform[6] = xform[8] = xform[9] = 0.0;
    1.24  
    1.25  	glLoadMatrixf(xform);
    1.26  
    1.27  	glPushAttrib(GL_ENABLE_BIT);
    1.28  	glDisable(GL_LIGHTING);
    1.29  
    1.30 +	glEnable(GL_BLEND);
    1.31 +	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    1.32 +
    1.33 +	if(em->tex) {
    1.34 +		glEnable(GL_TEXTURE_2D);
    1.35 +		glBindTexture(GL_TEXTURE_2D, em->tex);
    1.36 +	}
    1.37 +
    1.38  	glDepthMask(0);
    1.39  
    1.40  	glBegin(GL_QUADS);