From 91619e28b85d513d0676accf3c785e10c31cb1b8 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sun, 22 Sep 2013 09:10:47 -0500 Subject: [PATCH] Pull in the glRenderbufferStorageMultisample function pointer at run time. --- Externals/GLES3/GLES3/gl3.h | 2 +- Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp | 1 + Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp | 4 ++++ Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h | 7 ++++++- 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Externals/GLES3/GLES3/gl3.h b/Externals/GLES3/GLES3/gl3.h index e5bf8f5bfc..01cbeaacf7 100644 --- a/Externals/GLES3/GLES3/gl3.h +++ b/Externals/GLES3/GLES3/gl3.h @@ -965,7 +965,7 @@ GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsi GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +//GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp index 9eac9f603b..a9ea7fbb4e 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp @@ -6,6 +6,7 @@ #include "FramebufferManager.h" #include "VertexShaderGen.h" #include "OnScreenDisplay.h" +#include "GLFunctions.h" #include "TextureConverter.h" #include "Render.h" diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp index 8360f9631e..073e5cc513 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.cpp @@ -32,6 +32,8 @@ PFNGLPROGRAMPARAMETERIPROC glProgramParameteri; PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements; +PFNGLRENDERBUFFERSTORAGEMULTISAMPLE glRenderbufferStorageMultisample; + PFNGLGETUNIFORMBLOCKINDEXPROC glGetUniformBlockIndex; PFNGLUNIFORMBLOCKBINDINGPROC glUniformBlockBinding; @@ -98,6 +100,8 @@ namespace GLFunc LoadFunction("glDrawRangeElements", (void**)&glDrawRangeElements); + LoadFunction("glRenderbufferStorageMultisample", (void**)&glRenderbufferStorageMultisample); + LoadFunction("glGetUniformBlockIndex", (void**)&glGetUniformBlockIndex); LoadFunction("glUniformBlockBinding", (void**)&glUniformBlockBinding); dlclose(self); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h b/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h index 74fed7e227..cbfde1276c 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLFunctions.h @@ -30,7 +30,7 @@ typedef void (*PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); typedef void (*PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint * samplers); typedef void (*PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint* samplers); -//Program binar +//Program binary typedef void (*PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei* length, GLenum *binaryFormat, GLvoid*binary); typedef void (*PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void* binary, GLsizei length); typedef void (*PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); @@ -48,6 +48,9 @@ typedef void (*PFNGLGENQUERIESPROC) (GLsizei n, GLuint* ids); // glDraw* typedef void (*PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices); +// Multisample buffer +typedef void (*PFNGLRENDERBUFFERSTORAGEMULTISAMPLE) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); + // ptrs extern PFNGLBEGINQUERYPROC glBeginQuery; extern PFNGLENDQUERYPROC glEndQuery; @@ -75,6 +78,8 @@ extern PFNGLPROGRAMPARAMETERIPROC glProgramParameteri; extern PFNGLDRAWRANGEELEMENTSPROC glDrawRangeElements; +extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLE glRenderbufferStorageMultisample; + //Sampler extern PFNGLSAMPLERPARAMETERFPROC glSamplerParameterf; extern PFNGLSAMPLERPARAMETERIPROC glSamplerParameteri;