One-sided sprites are now one-sided.

git-svn-id: https://svn.eduke32.com/eduke32@691 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2008-04-04 07:40:15 +00:00
parent 9942e1de54
commit 405a5f878f
2 changed files with 6 additions and 2 deletions

View file

@ -3190,11 +3190,9 @@ static void drawsprite(int snum)
bglEnable(GL_ALPHA_TEST); bglEnable(GL_ALPHA_TEST);
bglEnable(GL_BLEND); bglEnable(GL_BLEND);
bglEnable(GL_POLYGON_OFFSET_FILL); bglEnable(GL_POLYGON_OFFSET_FILL);
bglEnable(GL_CULL_FACE);
polymer_drawsprite(snum); polymer_drawsprite(snum);
bglDisable(GL_CULL_FACE);
bglDisable(GL_POLYGON_OFFSET_FILL); bglDisable(GL_POLYGON_OFFSET_FILL);
bglDisable(GL_BLEND); bglDisable(GL_BLEND);
bglDisable(GL_ALPHA_TEST); bglDisable(GL_ALPHA_TEST);

View file

@ -614,10 +614,16 @@ void polymer_drawsprite(int snum)
bglBindTexture(GL_TEXTURE_2D, glpic); bglBindTexture(GL_TEXTURE_2D, glpic);
bglColor4f(color[0], color[1], color[2], color[3]); bglColor4f(color[0], color[1], color[2], color[3]);
if (tspr->cstat & 64)
bglEnable(GL_CULL_FACE);
bglVertexPointer(3, GL_FLOAT, 5 * sizeof(GLfloat), curspritedata); bglVertexPointer(3, GL_FLOAT, 5 * sizeof(GLfloat), curspritedata);
bglTexCoordPointer(2, GL_FLOAT, 5 * sizeof(GLfloat), &curspritedata[3]); bglTexCoordPointer(2, GL_FLOAT, 5 * sizeof(GLfloat), &curspritedata[3]);
bglDrawArrays(GL_QUADS, 0, 4); bglDrawArrays(GL_QUADS, 0, 4);
if (tspr->cstat & 64)
bglDisable(GL_CULL_FACE);
bglLoadIdentity(); bglLoadIdentity();
bglMatrixMode(GL_MODELVIEW); bglMatrixMode(GL_MODELVIEW);
bglPopMatrix(); bglPopMatrix();