From: havoc Date: Mon, 26 May 2003 18:17:48 +0000 (+0000) Subject: vertex pointers are now const X-Git-Tag: xonotic-v0.1.0preview~6608 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3be52c1fd807e79df4af9ec19659ebbb71729a36;p=xonotic%2Fdarkplaces.git vertex pointers are now const git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3046 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_backend.c b/gl_backend.c index 1ab98969..cc88e36d 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -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 diff --git a/gl_backend.h b/gl_backend.h index 83125962..12061681 100644 --- a/gl_backend.h +++ b/gl_backend.h @@ -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;