aboutsummaryrefslogtreecommitdiff
path: root/quake/src/WinQuake/r_part.cpp
diff options
context:
space:
mode:
authorJack Palevich <jackpal@google.com>2009-09-24 18:38:46 -0700
committerJack Palevich <jackpal@google.com>2009-09-24 18:38:46 -0700
commitf343e13d48b72e893dbc8f0a44c93a4977ac48b5 (patch)
treed5bd1ad71232459598f8d3867f8616b47da0acff /quake/src/WinQuake/r_part.cpp
parent72cead5e5712e5704ab702f521b53bce367ee6db (diff)
downloadquake-f343e13d48b72e893dbc8f0a44c93a4977ac48b5.tar.gz
Fix Quake particle effect.
1) Longstanding bug where U/V coordinates were specified incorrectly. 2) Very recent bug where alpha was specified incorrectly. 3) Turn texture filtering back on, should work fine on hardware OpenGL.
Diffstat (limited to 'quake/src/WinQuake/r_part.cpp')
-rwxr-xr-xquake/src/WinQuake/r_part.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/quake/src/WinQuake/r_part.cpp b/quake/src/WinQuake/r_part.cpp
index 9ed4223..b6fcdca 100755
--- a/quake/src/WinQuake/r_part.cpp
+++ b/quake/src/WinQuake/r_part.cpp
@@ -666,14 +666,14 @@ void R_DrawParticles (void)
vec3_t up, right;
float scale;
- GL_Bind(particletexture);
+ GL_Bind(particletexture);
glEnable (GL_BLEND);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
#ifdef USE_OPENGLES
glEnableClientState(GL_COLOR_ARRAY);
- glVertexPointer(3, GL_FLOAT, 0, gVertexBuffer);
+ glVertexPointer(3, GL_FLOAT, 0, gVertexBuffer);
glTexCoordPointer(2, GL_BYTE, 0, gTexCoordBuffer);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, gColorBuffer);
glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
@@ -745,7 +745,7 @@ void R_DrawParticles (void)
}
memcpy(pColor, (byte *)&d_8to24table[(int)p->color], 3);
- pColor[3] = 1.0f;
+ pColor[3] = 255;
pColor += 4;
*pUV++ = 0;
*pUV++ = 0;
@@ -754,19 +754,19 @@ void R_DrawParticles (void)
*pPos++ = p->org[2];
memcpy(pColor, (byte *)&d_8to24table[(int)p->color], 3);
- pColor[3] = 1.0f;
+ pColor[3] = 255;
pColor += 4;
- *pUV++ = 255;
+ *pUV++ = 1;
*pUV++ = 0;
*pPos++ = p->org[0] + up[0]*scale;
*pPos++ = p->org[1] + up[1]*scale;
*pPos++ = p->org[2] + up[2]*scale;
memcpy(pColor, (byte *)&d_8to24table[(int)p->color], 3);
- pColor[3] = 1.0f;
+ pColor[3] = 255;
pColor += 4;
*pUV++ = 0;
- *pUV++ = 255;
+ *pUV++ = 1;
*pPos++ = p->org[0] + right[0]*scale;
*pPos++ = p->org[1] + right[1]*scale;
*pPos++ = p->org[2] + right[2]*scale;