From 3d86dc56ac2a23c6ac00d3bfcd57d51cadf16f9a Mon Sep 17 00:00:00 2001 From: Spoike Date: Sun, 3 Mar 2019 02:02:29 +0000 Subject: [PATCH] gles fixes git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5422 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/gl/gl_vidcommon.c | 4 ++-- engine/gl/glsupp.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/gl/gl_vidcommon.c b/engine/gl/gl_vidcommon.c index aa91278c6..a6b84becf 100644 --- a/engine/gl/gl_vidcommon.c +++ b/engine/gl/gl_vidcommon.c @@ -58,6 +58,7 @@ const GLubyte * (APIENTRY *qglGetString) (GLenum name); void (APIENTRY *qglHint) (GLenum target, GLenum mode); GLboolean (APIENTRY *qglIsEnabled) (GLenum cap); void (APIENTRY *qglPolygonOffset) (GLfloat factor, GLfloat units); +void (APIENTRY *qglLineWidth) (GLfloat width); void (APIENTRY *qglReadPixels) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); void (APIENTRY *qglTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); void (APIENTRY *qglTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); @@ -170,7 +171,6 @@ void (APIENTRY *qglMultMatrixf) (const GLfloat *m); void (APIENTRY *qglNewList) (GLuint list, GLenum mode); //void (APIENTRY *qglOrtho) (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); void (APIENTRY *qglPolygonMode) (GLenum face, GLenum mode); -void (APIENTRY *qglLineWidth) (GLfloat width); void (APIENTRY *qglPopMatrix) (void); void (APIENTRY *qglPushMatrix) (void); void (APIENTRY *qglReadBuffer) (GLenum mode); @@ -3201,6 +3201,7 @@ qboolean GL_Init(rendererstate_t *info, void *(*getglfunction) (char *name)) qglStencilFunc = (void *)getglcore("glStencilFunc"); qglScissor = (void *)getglcore("glScissor"); qglPolygonOffset = (void *)getglext("glPolygonOffset"); + qglLineWidth = (void *)getglcore("glLineWidth"); #endif #ifndef FTE_TARGET_WEB qglAlphaFunc = (void *)getglcore("glAlphaFunc"); @@ -3229,7 +3230,6 @@ qboolean GL_Init(rendererstate_t *info, void *(*getglfunction) (char *name)) qglMultMatrixf = (void *)getglcore("glMultMatrixf"); // qglOrtho = (void *)getglcore("glOrtho"); qglPolygonMode = (void *)getglcore("glPolygonMode"); - qglLineWidth = (void *)getglcore("glLineWidth"); qglPopMatrix = (void *)getglcore("glPopMatrix"); qglPushMatrix = (void *)getglcore("glPushMatrix"); qglReadBuffer = (void *)getglcore("glReadBuffer"); diff --git a/engine/gl/glsupp.h b/engine/gl/glsupp.h index fb6d114a6..33ca3edf2 100644 --- a/engine/gl/glsupp.h +++ b/engine/gl/glsupp.h @@ -932,6 +932,9 @@ typedef void (APIENTRY * PFNGLUNLOCKARRAYSEXTPROC) (void); #define GL_LUMINANCE8_ALPHA8 0x8045 //not in gles2, nor gl3core (use gl_red+swizzles for gles3) #endif +#ifndef GL_LINE +#define GL_LINE 0x1B01 +#endif #ifndef GL_SAMPLES_PASSED_ARB #define GL_SAMPLES_PASSED_ARB 0x8914