diff --git a/include/QF/GL/qf_funcs_list.h b/include/QF/GL/qf_funcs_list.h index 31f662573..d2b481039 100644 --- a/include/QF/GL/qf_funcs_list.h +++ b/include/QF/GL/qf_funcs_list.h @@ -81,7 +81,7 @@ QFGL_DONT_NEED (void, glColor4i, (GLint red, GLint green, GLint blue, GLint alph QFGL_DONT_NEED (void, glColor4iv, (const GLint * v)); QFGL_DONT_NEED (void, glColor4s, (GLshort red, GLshort green, GLshort blue, GLshort alpha)); QFGL_DONT_NEED (void, glColor4sv, (const GLshort * v)); -QFGL_DONT_NEED (void, glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)); +QFGL_NEED (void, glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)); QFGL_NEED (void, glColor4ubv, (const GLubyte * v)); QFGL_DONT_NEED (void, glColor4ui, (GLuint red, GLuint green, GLuint blue, GLuint alpha)); QFGL_DONT_NEED (void, glColor4uiv, (const GLuint * v)); diff --git a/include/varrays.h b/include/varrays.h index fa79177b8..fa783d1ae 100644 --- a/include/varrays.h +++ b/include/varrays.h @@ -59,6 +59,6 @@ typedef struct varray_t2f_c4f_n3f_v3f_s { } varray_t2f_c4f_n3f_v3f_t; #define MAX_VARRAY_VERTS 10000 -extern varray_t2f_c4f_v3f_t varray[MAX_VARRAY_VERTS]; +extern varray_t2f_c4ub_v3f_t varray[MAX_VARRAY_VERTS]; #endif // __qf_varrays_h diff --git a/libs/video/renderer/gl/gl_draw.c b/libs/video/renderer/gl/gl_draw.c index 31fedbefa..0e9e9c6fc 100644 --- a/libs/video/renderer/gl/gl_draw.c +++ b/libs/video/renderer/gl/gl_draw.c @@ -608,7 +608,7 @@ void Draw_FadeScreen (void) { qfglDisable (GL_TEXTURE_2D); - qfglColor4f (0, 0, 0, 0.7); + qfglColor4ub (0, 0, 0, 179); qfglBegin (GL_QUADS); qfglVertex2f (0, 0); diff --git a/libs/video/renderer/gl/gl_dyn_part.c b/libs/video/renderer/gl/gl_dyn_part.c index 965f7e68c..c0e6ee887 100644 --- a/libs/video/renderer/gl/gl_dyn_part.c +++ b/libs/video/renderer/gl/gl_dyn_part.c @@ -655,12 +655,12 @@ R_VoorTrail (entity_t *ent) void R_DrawParticles (void) { - byte alpha, i; - unsigned char *at; - float dvel, grav, fast_grav, minparticledist, scale; - int activeparticles, maxparticle, j, k; - particle_t *part; - vec3_t up_scale, right_scale, up_right_scale, down_right_scale; + byte i; + unsigned char *at; + float dvel, grav, fast_grav, minparticledist, scale; + int activeparticles, maxparticle, j, k; + particle_t *part; + vec3_t up_scale, right_scale, up_right_scale, down_right_scale; if (!r_particles->int_val) return; @@ -697,12 +697,11 @@ R_DrawParticles (void) // Note, we must still do physics and such on them. if (!(DotProduct (part->org, vpn) < minparticledist)) { at = (byte *) & d_8to24table[(byte) part->color]; - alpha = part->alpha; - varray[0].color[0] = (float) at[0] / 255; - varray[0].color[1] = (float) at[1] / 255; - varray[0].color[2] = (float) at[2] / 255; - varray[0].color[3] = (float) alpha / 255; + varray[0].color[0] = at[0]; + varray[0].color[1] = at[1]; + varray[0].color[2] = at[2]; + varray[0].color[3] = part->alpha; memcpy(varray[1].color, varray[0].color, sizeof(varray[0].color)); memcpy(varray[2].color, varray[0].color, sizeof(varray[0].color)); diff --git a/libs/video/renderer/gl/gl_rmisc.c b/libs/video/renderer/gl/gl_rmisc.c index d14f6dc01..0d80c579e 100644 --- a/libs/video/renderer/gl/gl_rmisc.c +++ b/libs/video/renderer/gl/gl_rmisc.c @@ -57,7 +57,7 @@ #include "r_local.h" #include "varrays.h" -varray_t2f_c4f_v3f_t varray[MAX_VARRAY_VERTS]; +varray_t2f_c4ub_v3f_t varray[MAX_VARRAY_VERTS]; qboolean VID_Is8bit (void); void R_InitBubble (void); @@ -169,7 +169,7 @@ R_Init (void) // qfglInterleavedArrays(GL_T2F_C4F_N3F_V3F, 0, varray); qfglTexCoordPointer (2, GL_FLOAT, sizeof(varray[0]), varray[0].texcoord); - qfglColorPointer (4, GL_FLOAT, sizeof(varray[0]), varray[0].color); + qfglColorPointer (4, GL_UNSIGNED_BYTE, sizeof(varray[0]), varray[0].color); qfglVertexPointer (3, GL_FLOAT, sizeof(varray[0]), varray[0].vertex); } diff --git a/libs/video/renderer/gl/gl_sky_clip.c b/libs/video/renderer/gl/gl_sky_clip.c index dac2c15c7..fdbbd7be9 100644 --- a/libs/video/renderer/gl/gl_sky_clip.c +++ b/libs/video/renderer/gl/gl_sky_clip.c @@ -793,7 +793,7 @@ R_DrawSkyChain (msurface_t *sky_chain) #if 0 qfglDisable (GL_TEXTURE_2D); sc = sky_chain; - qfglColor3f (1, 1, 1); + qfglColor3ubv (255, 255, 255); while (sc) { glpoly_t *p = sc->polys; while (p) { @@ -808,7 +808,7 @@ R_DrawSkyChain (msurface_t *sky_chain) sc = sc->texturechain; } sc = sky_chain; - qfglColor3f (0, 1, 0); + qfglColor3ubv (0, 255, 0); qfglBegin (GL_POINTS); while (sc) { glpoly_t *p = sc->polys; @@ -829,7 +829,7 @@ R_DrawSkyChain (msurface_t *sky_chain) qfglEnd (); if (skyloaded) { int i, j; - qfglColor3f (1, 0, 0); + qfglColor3ubv (255, 0, 0); for (i = 0; i < 6; i++) { vec3_t v; qfglBegin (GL_LINE_LOOP);