- Define the values for point parameters in qgl.h. They should be

set by the OpenGL implementation somewhere in gl.h but apperently
  the values are sometimes wrong...
- AND the particle color with 0xFF. This is a no-op with most
  OpenGL implementations but may help Mesa3D. Suggest by
  "hukaru" on IRC.
This commit is contained in:
Yamagi Burmeister 2012-02-09 16:30:17 +00:00
parent d7fdda9d92
commit f8a9f6ead4
2 changed files with 5 additions and 3 deletions

View file

@ -38,6 +38,10 @@
#define GL_TEXTURE0_SGIS 0x835E
#define GL_TEXTURE1_SGIS 0x835F
#define GL_POINT_SIZE_MIN_EXT 0x8126
#define GL_POINT_SIZE_MAX_EXT 0x8127
#define GL_DISTANCE_ATTENUATION_EXT 0x8129
qboolean QGL_Init ( const char *dllname );
void QGL_Shutdown ( void );

View file

@ -503,11 +503,9 @@ R_DrawParticles ( void )
for ( i = 0, p = r_newrefdef.particles; i < r_newrefdef.num_particles; i++, p++ )
{
*(int *) color = d_8to24table [ p->color ];
*(int *) color = d_8to24table [ p->color & 0xFF ];
color [ 3 ] = p->alpha * 255;
qglColor4ubv( color );
qglVertex3fv( p->origin );
}