]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_backend.c
fixed hl sprite types to properly handle the palette in each mode
[xonotic/darkplaces.git] / gl_backend.c
index cd1d482650fa49f20ebeb21ded02698a603edc21..782329d1e3b054c82f97cc7f719fba8ac0d9c0d5 100644 (file)
@@ -898,13 +898,13 @@ void R_Mesh_Draw(int firstvertex, int numvertices, int numtriangles, const int *
                const int *p;
                if (!qglIsEnabled(GL_VERTEX_ARRAY))
                        Con_Print("R_Mesh_Draw: vertex array not enabled\n");
-               for (j = 0, size = numvertices * 3, p = gl_state.pointer_vertex + firstvertex * 3;j < size;j++, p++)
+               for (j = 0, size = numvertices * 3, p = (int *)((float *)gl_state.pointer_vertex + firstvertex * 3);j < size;j++, p++)
                        paranoidblah += *p;
                if (gl_state.pointer_color)
                {
                        if (!qglIsEnabled(GL_COLOR_ARRAY))
                                Con_Print("R_Mesh_Draw: color array set but not enabled\n");
-                       for (j = 0, size = numvertices * 4, p = gl_state.pointer_color + firstvertex * 4;j < size;j++, p++)
+                       for (j = 0, size = numvertices * 4, p = (int *)((float *)gl_state.pointer_color + firstvertex * 4);j < size;j++, p++)
                                paranoidblah += *p;
                }
                for (i = 0;i < backendarrayunits;i++)
@@ -914,7 +914,7 @@ void R_Mesh_Draw(int firstvertex, int numvertices, int numtriangles, const int *
                                GL_ClientActiveTexture(i);
                                if (!qglIsEnabled(GL_TEXTURE_COORD_ARRAY))
                                        Con_Print("R_Mesh_Draw: texcoord array set but not enabled\n");
-                               for (j = 0, size = numvertices * gl_state.units[i].arraycomponents, p = gl_state.units[i].pointer_texcoord + firstvertex * gl_state.units[i].arraycomponents;j < size;j++, p++)
+                               for (j = 0, size = numvertices * gl_state.units[i].arraycomponents, p = (int *)((float *)gl_state.units[i].pointer_texcoord + firstvertex * gl_state.units[i].arraycomponents);j < size;j++, p++)
                                        paranoidblah += *p;
                        }
                }