From 1491b85a7075c42088868a000004ee33a718eebb Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 17 Jul 2013 04:05:48 +0000 Subject: [PATCH] fix an unused variable warning with USE_GLES2 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11971 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=e66d8b8a94503f2af68166f7d8aef3d74ed3d153 --- gl_draw.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/gl_draw.c b/gl_draw.c index 88431d9a..0f0c3670 100644 --- a/gl_draw.c +++ b/gl_draw.c @@ -1971,8 +1971,6 @@ void DrawQ_Mesh (drawqueuemesh_t *mesh, int flags, qboolean hasalpha) void DrawQ_LineLoop (drawqueuemesh_t *mesh, int flags) { - int num; - _DrawQ_SetupAndProcessDrawFlag(flags, NULL, 1); if(!r_draw2d.integer && !r_draw2d_force) return; @@ -1984,16 +1982,19 @@ void DrawQ_LineLoop (drawqueuemesh_t *mesh, int flags) case RENDERPATH_GL13: case RENDERPATH_GL20: #ifndef USE_GLES2 - CHECKGLERROR - qglBegin(GL_LINE_LOOP); - for (num = 0;num < mesh->num_vertices;num++) { - if (mesh->data_color4f) - GL_Color(mesh->data_color4f[num*4+0], mesh->data_color4f[num*4+1], mesh->data_color4f[num*4+2], mesh->data_color4f[num*4+3]); - qglVertex2f(mesh->data_vertex3f[num*3+0], mesh->data_vertex3f[num*3+1]); + int num; + CHECKGLERROR + qglBegin(GL_LINE_LOOP); + for (num = 0;num < mesh->num_vertices;num++) + { + if (mesh->data_color4f) + GL_Color(mesh->data_color4f[num*4+0], mesh->data_color4f[num*4+1], mesh->data_color4f[num*4+2], mesh->data_color4f[num*4+3]); + qglVertex2f(mesh->data_vertex3f[num*3+0], mesh->data_vertex3f[num*3+1]); + } + qglEnd(); + CHECKGLERROR } - qglEnd(); - CHECKGLERROR #endif break; case RENDERPATH_D3D9: -- 2.39.2