diff --git a/neo/renderer/RenderSystem.h b/neo/renderer/RenderSystem.h index 1474ee4f2..d741b98ce 100644 --- a/neo/renderer/RenderSystem.h +++ b/neo/renderer/RenderSystem.h @@ -41,6 +41,12 @@ If you have questions concerning this license or the applicable additional terms =============================================================================== */ +enum glVendor_t { + glvAny, + glvAMD, + glvIntel, + glvNVIDIA, +}; // Contains variables specific to the OpenGL configuration being run right now. // These are constant once the OpenGL subsystem is initialized. @@ -51,7 +57,7 @@ typedef struct glconfig_s { const char *extensions_string; float glVersion; // atof( version_string ) - + glVendor_t vendor; int maxTextureSize; // queried from GL int maxTextureUnits; @@ -72,9 +78,11 @@ typedef struct glconfig_s { bool envDot3Available; bool texture3DAvailable; bool sharedTexturePaletteAvailable; - bool ARBVertexBufferObjectAvailable; bool ARBVertexProgramAvailable; bool ARBFragmentProgramAvailable; + bool ARBMapBufferRangeAvailable; + bool ARBShadingLanguageAvailable; + bool ARBVertexBufferObjectAvailable; bool twoSidedStencilAvailable; bool textureNonPowerOfTwoAvailable; bool depthBoundsTestAvailable; diff --git a/neo/renderer/qgl.h b/neo/renderer/qgl.h index abce7a8ea..7f42d68bf 100644 --- a/neo/renderer/qgl.h +++ b/neo/renderer/qgl.h @@ -42,6 +42,8 @@ If you have questions concerning this license or the applicable additional terms #endif #endif +#define GL_GLEXT_PROTOTYPES + #ifdef D3_SDL3 #include #else // SDL1.2 or SDL2 @@ -77,6 +79,60 @@ extern void ( APIENTRY * qglMultiTexCoord2fvARB )( GLenum texture, GLfloat *st ) extern void ( APIENTRY * qglActiveTextureARB )( GLenum texture ); extern void ( APIENTRY * qglClientActiveTextureARB )( GLenum texture ); +// ARB_MapBufferRange +extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC qglFlushMappedBufferRange; +extern PFNGLMAPBUFFERRANGEPROC qglMapBufferRange; + +// ARB_shading_language_100 +extern PFNGLUNIFORM1FPROC qglUniform1f; +extern PFNGLUNIFORM1FVPROC qglUniform1fv; +extern PFNGLUNIFORM1IPROC qglUniform1i; +extern PFNGLUNIFORM1IVPROC qglUniform1iv; +extern PFNGLUNIFORM2FPROC qglUniform2f; +extern PFNGLUNIFORM2FVPROC qglUniform2fv; +extern PFNGLUNIFORM2IPROC qglUniform2i; +extern PFNGLUNIFORM2IVPROC qglUniform2iv; +extern PFNGLUNIFORM3FPROC qglUniform3f; +extern PFNGLUNIFORM3FVPROC qglUniform3fv; +extern PFNGLUNIFORM3IPROC qglUniform3i; +extern PFNGLUNIFORM3IVPROC qglUniform3iv; +extern PFNGLUNIFORM4FPROC qglUniform4f; +extern PFNGLUNIFORM4FVPROC qglUniform4fv; +extern PFNGLUNIFORM4IPROC qglUniform4i; +extern PFNGLUNIFORM4IVPROC qglUniform4iv; +extern PFNGLUNIFORMMATRIX2FVPROC qglUniformMatrix2fv; +extern PFNGLUNIFORMMATRIX3FVPROC qglUniformMatrix3fv; +extern PFNGLUNIFORMMATRIX4FVPROC qglUniformMatrix4fv; +extern PFNGLUNIFORMMATRIX2X3FVPROC qglUniformMatrix2x3fv; +extern PFNGLUNIFORMMATRIX2X4FVPROC qglUniformMatrix2x4fv; +extern PFNGLUNIFORMMATRIX3X2FVPROC qglUniformMatrix3x2fv; +extern PFNGLUNIFORMMATRIX3X4FVPROC qglUniformMatrix3x4fv; +extern PFNGLUNIFORMMATRIX4X2FVPROC qglUniformMatrix4x2fv; +extern PFNGLUNIFORMMATRIX4X3FVPROC qglUniformMatrix4x3fv; + +extern PFNGLISPROGRAMPROC qglIsProgram; +extern PFNGLCREATEPROGRAMPROC qglCreateProgram; +extern PFNGLVALIDATEPROGRAMPROC qglValidateProgram; +extern PFNGLLINKPROGRAMPROC qglLinkProgram; + +extern PFNGLISSHADERPROC qglIsShader; +extern PFNGLSHADERSOURCEPROC qglShaderSource; +extern PFNGLCREATESHADERPROC qglCreateShader; +extern PFNGLATTACHSHADERPROC qglAttachShader; +extern PFNGLBINDATTRIBLOCATIONPROC qglBindAttribLocation; +extern PFNGLCOMPILESHADERPROC qglCompileShader; +extern PFNGLDETACHSHADERPROC qglDetachShader; +extern PFNGLDELETESHADERPROC qglDeleteShader; + +extern PFNGLGETPROGRAMINFOLOGPROC qglGetProgramInfoLog; +extern PFNGLGETPROGRAMIVPROC qglGetProgramiv; +extern PFNGLGETSHADERINFOLOGPROC qglGetShaderInfoLog; +extern PFNGLGETSHADERSOURCEPROC qglGetShaderSource; +extern PFNGLGETSHADERIVPROC qglGetShaderiv; +extern PFNGLGETUNIFORMLOCATIONPROC qglGetUniformLocation; +extern PFNGLGETUNIFORMFVPROC qglGetUniformfv; +extern PFNGLGETUNIFORMIVPROC qglGetUniformiv; + // ARB_vertex_buffer_object extern PFNGLBINDBUFFERARBPROC qglBindBufferARB; extern PFNGLDELETEBUFFERSARBPROC qglDeleteBuffersARB; diff --git a/neo/renderer/qgl_proc.h b/neo/renderer/qgl_proc.h index af0146d0f..49662dfa3 100644 --- a/neo/renderer/qgl_proc.h +++ b/neo/renderer/qgl_proc.h @@ -90,6 +90,7 @@ QGLPROC(glCopyTexSubImage1D, void, (GLenum target, GLint level, GLint xoffset, G QGLPROC(glCopyTexSubImage2D, void, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) QGLPROC(glCullFace, void, (GLenum mode)) QGLPROC(glDeleteLists, void, (GLuint list, GLsizei range)) +QGLPROC(glDeleteProgram, void, (GLuint program)) QGLPROC(glDeleteTextures, void, (GLsizei n, const GLuint *textures)) QGLPROC(glDepthFunc, void, (GLenum func)) QGLPROC(glDepthMask, void, (GLboolean flag)) @@ -341,6 +342,7 @@ QGLPROC(glTexSubImage1D, void, (GLenum target, GLint level, GLint xoffset, GLsiz QGLPROC(glTexSubImage2D, void, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) QGLPROC(glTranslated, void, (GLdouble x, GLdouble y, GLdouble z)) QGLPROC(glTranslatef, void, (GLfloat x, GLfloat y, GLfloat z)) +QGLPROC(glUseProgram, void,(GLuint program)) QGLPROC(glVertex2d, void, (GLdouble x, GLdouble y)) QGLPROC(glVertex2dv, void, (const GLdouble *v)) QGLPROC(glVertex2f, void, (GLfloat x, GLfloat y))