Skip to content

Commit

Permalink
Another batch of misses
Browse files Browse the repository at this point in the history
  • Loading branch information
revelator authored Nov 18, 2024
1 parent a2d68e3 commit ff4ab55
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 2 deletions.
12 changes: 10 additions & 2 deletions neo/renderer/RenderSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand All @@ -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;
Expand Down
56 changes: 56 additions & 0 deletions neo/renderer/qgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <SDL3/SDL_opengl.h>
#else // SDL1.2 or SDL2
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions neo/renderer/qgl_proc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit ff4ab55

Please sign in to comment.