vertex pointers are now const
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 26 May 2003 18:17:48 +0000 (18:17 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 26 May 2003 18:17:48 +0000 (18:17 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3046 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c
gl_backend.h

index 1ab9896..cc88e36 100644 (file)
@@ -493,7 +493,7 @@ typedef struct gltextureunit_s
 {
        int t1d, t2d, t3d, tcubemap;
        int arrayenabled, arrayis3d;
-       void *pointer_texcoord;
+       const void *pointer_texcoord;
        float rgbscale, alphascale;
        int combinergb, combinealpha;
        // FIXME: add more combine stuff
@@ -515,8 +515,8 @@ static struct
        int lockrange_first;
        int lockrange_count;
        int pointervertexcount;
-       void *pointer_vertex;
-       void *pointer_color;
+       const void *pointer_vertex;
+       const void *pointer_color;
 }
 gl_state;
 
@@ -1052,7 +1052,7 @@ void R_Mesh_Matrix(const matrix4x4_t *matrix)
 // sets up the requested state
 void R_Mesh_MainState(const rmeshstate_t *m)
 {
-       void *p;
+       const void *p;
        BACKENDACTIVECHECK
 
        if (gl_state.blendfunc1 != m->blendfunc1 || gl_state.blendfunc2 != m->blendfunc2)
@@ -1152,7 +1152,7 @@ void R_Mesh_TextureState(const rmeshstate_t *m)
        int i, combinergb, combinealpha;
        float scale;
        gltextureunit_t *unit;
-       void *p;
+       const void *p;
 
        BACKENDACTIVECHECK
 
index 8312596..1206168 100644 (file)
@@ -40,9 +40,9 @@ typedef struct
        int texcombinergb[MAX_TEXTUREUNITS]; // works with or without combine for some operations
        int texcombinealpha[MAX_TEXTUREUNITS]; // does nothing without combine
        int pointervertexcount;
-       float *pointer_vertex;
-       float *pointer_color;
-       float *pointer_texcoord[MAX_TEXTUREUNITS];
+       const float *pointer_vertex;
+       const float *pointer_color;
+       const float *pointer_texcoord[MAX_TEXTUREUNITS];
 }
 rmeshstate_t;