From f7a01c60a4d633c8c6f5326d28c26d2d99f6f959 Mon Sep 17 00:00:00 2001
From: mazmazz <mar.marcoz@outlook.com>
Date: Thu, 27 Dec 2018 00:54:27 -0500
Subject: [PATCH] Buildbot fixes

---
 src/hardware/r_opengl/r_opengl.c | 10 +++++++---
 src/hardware/r_opengl/r_opengl.h |  4 +++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c
index fd4cfe958..9b92cac6c 100644
--- a/src/hardware/r_opengl/r_opengl.c
+++ b/src/hardware/r_opengl/r_opengl.c
@@ -1417,6 +1417,10 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo  *pSurf,
 		GLdouble    px = 0.0f, py = 0.0f, pz = -1.0f;
 		GLfloat     scalef = 0.0f;
 
+		GLubyte c[4];
+
+		float alpha;
+
 		cx = (pOutVerts[0].x + pOutVerts[2].x) / 2.0f; // we should change the coronas' ...
 		cy = (pOutVerts[0].y + pOutVerts[2].y) / 2.0f; // ... code so its only done once.
 		cz = pOutVerts[0].z;
@@ -1452,12 +1456,12 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo  *pSurf,
 		if (scalef < 0.05f)
 			return;
 
-		GLubyte c[4];
+		// GLubyte c[4];
 		c[0] = pSurf->FlatColor.s.red;
 		c[1] = pSurf->FlatColor.s.green;
 		c[2] = pSurf->FlatColor.s.blue;
 
-		float alpha = byte2float[pSurf->FlatColor.s.alpha];
+		alpha = byte2float[pSurf->FlatColor.s.alpha];
 		alpha *= scalef; // change the alpha value (it seems better than changing the size of the corona)
 		c[3] = (unsigned char)(alpha * 255);
 		pglColor4ubv(c);
@@ -1916,7 +1920,7 @@ static void DrawModelEx(model_t *model, INT32 frameIndex, INT32 duration, INT32
 				pglBindBuffer(GL_ARRAY_BUFFER, frame->vboID);
 				pglVertexPointer(3, GL_SHORT, sizeof(vbotiny_t), BUFFER_OFFSET(0));
 				pglNormalPointer(GL_BYTE, sizeof(vbotiny_t), BUFFER_OFFSET(sizeof(short)*3));
-				pglTexCoordPointer(2, GL_FLOAT, sizeof(vbotiny_t), BUFFER_OFFSET(sizeof(short) * 3 + sizeof(byte) * 6));
+				pglTexCoordPointer(2, GL_FLOAT, sizeof(vbotiny_t), BUFFER_OFFSET(sizeof(short) * 3 + sizeof(char) * 6));
 
 				pglDrawElements(GL_TRIANGLES, mesh->numTriangles * 3, GL_UNSIGNED_SHORT, mesh->indices);
 				pglBindBuffer(GL_ARRAY_BUFFER, 0);
diff --git a/src/hardware/r_opengl/r_opengl.h b/src/hardware/r_opengl/r_opengl.h
index b543749fc..b5187a587 100644
--- a/src/hardware/r_opengl/r_opengl.h
+++ b/src/hardware/r_opengl/r_opengl.h
@@ -118,9 +118,11 @@ typedef void (APIENTRY * PFNglGetIntegerv) (GLenum pname, GLint *params);
 extern PFNglGetIntegerv pglGetIntegerv;
 typedef const GLubyte* (APIENTRY  * PFNglGetString) (GLenum name);
 extern PFNglGetString pglGetString;
-typedef void (APIENTRY * PFNglEnableClientState) (GLenum cap);
+#if 0
+typedef void (APIENTRY * PFNglEnableClientState) (GLenum cap); // redefined in r_opengl.c
 static PFNglEnableClientState pglEnableClientState;
 #endif
+#endif
 
 // ==========================================================================
 //                                                                     GLOBAL