From f8a9f6ead47ea2a350d817a00336658f2e32a40c Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Thu, 9 Feb 2012 16:30:17 +0000 Subject: [PATCH] - 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. --- src/refresh/header/qgl.h | 4 ++++ src/refresh/r_main.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/refresh/header/qgl.h b/src/refresh/header/qgl.h index 2f8ce131..e607c49d 100644 --- a/src/refresh/header/qgl.h +++ b/src/refresh/header/qgl.h @@ -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 ); diff --git a/src/refresh/r_main.c b/src/refresh/r_main.c index 36606181..50bf6f9e 100644 --- a/src/refresh/r_main.c +++ b/src/refresh/r_main.c @@ -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 ); }