]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
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 1ab98969ce70260e7872419c838aef201af7c7d8..cc88e36d5d6ccc391e76d76be195fbb65f0b5787 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 83125962ba5c081d161ef583c2be19bd130f34e9..12061681e954b59574375ac88a2570d57d5d0fb1 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;