diff options
author | Mark Janes <mark.a.janes@intel.com> | 2017-12-08 16:31:32 -0800 |
---|---|---|
committer | Mark Janes <mark.a.janes@intel.com> | 2017-12-08 16:34:03 -0800 |
commit | 61436ecbf644a26292b68f6e2d0344cada19b051 (patch) | |
tree | 271af885fa01b54221aff3a1ff7a318f003b8a80 /retrace | |
parent | f3a2de02a4669b8ec9d517bee141c5cb43972501 (diff) |
Dispatch: enable MapBufferRange/UnmapBuffer
Diffstat (limited to 'retrace')
-rw-r--r-- | retrace/daemon/gldispatch/glframe_glhelper.cpp | 31 | ||||
-rw-r--r-- | retrace/daemon/gldispatch/glframe_glhelper.hpp | 4 |
2 files changed, 34 insertions, 1 deletions
diff --git a/retrace/daemon/gldispatch/glframe_glhelper.cpp b/retrace/daemon/gldispatch/glframe_glhelper.cpp index 028d2ad6..5f795e14 100644 --- a/retrace/daemon/gldispatch/glframe_glhelper.cpp +++ b/retrace/daemon/gldispatch/glframe_glhelper.cpp @@ -130,6 +130,9 @@ static void *pDepthMask = NULL; static void *pFrontFace = NULL; static void *pPolygonOffset = NULL; static void *pSampleCoverage = NULL; +static void *pGetBufferParameteriv = NULL; +static void *pMapBufferRange = NULL; +static void *pUnmapBuffer = NULL; } // namespace @@ -360,6 +363,12 @@ GlFunctions::Init(void *lookup_fn) { assert(pPolygonOffset); pSampleCoverage = _GetProcAddress("glSampleCoverage"); assert(pSampleCoverage); + pGetBufferParameteriv = _GetProcAddress("glGetBufferParameteriv"); + assert(pGetBufferParameteriv); + pMapBufferRange = _GetProcAddress("glMapBufferRange"); + assert(pMapBufferRange); + pUnmapBuffer = _GetProcAddress("glUnmapBuffer"); + assert(pUnmapBuffer); } GLuint @@ -993,7 +1002,6 @@ GlFunctions::LineWidth(GLfloat width) { return ((LINEWIDTH)pLineWidth)(width); } - void GlFunctions::ColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { @@ -1044,3 +1052,24 @@ GlFunctions::SampleCoverage(GLfloat value, GLboolean invert) { typedef void (*SAMPLECOVERAGE)(GLfloat value, GLboolean invert); return ((SAMPLECOVERAGE)pSampleCoverage)(value, invert); } + +void +GlFunctions::GetBufferParameteriv(GLenum target, GLenum pname, GLint *params) { + typedef void (*GETBUFFERPARAMETERIV)(GLenum target, GLenum pname, + GLint *params); + return ((GETBUFFERPARAMETERIV)pGetBufferParameteriv)(target, pname, params); +} + +void * +GlFunctions::MapBufferRange(GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access) { + typedef void *(*MAPBUFFERRANGE)(GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access); + return ((MAPBUFFERRANGE)pMapBufferRange)(target, offset, length, access); +} + +GLboolean +GlFunctions::UnmapBuffer(GLenum target) { + typedef GLboolean (*UNMAPBUFFER)(GLenum target); + return ((UNMAPBUFFER)pUnmapBuffer)(target); +} diff --git a/retrace/daemon/gldispatch/glframe_glhelper.hpp b/retrace/daemon/gldispatch/glframe_glhelper.hpp index d2614762..a59b9689 100644 --- a/retrace/daemon/gldispatch/glframe_glhelper.hpp +++ b/retrace/daemon/gldispatch/glframe_glhelper.hpp @@ -186,6 +186,10 @@ class GlFunctions { static void FrontFace(GLenum mode); static void PolygonOffset(GLfloat factor, GLfloat units); static void SampleCoverage(GLfloat value, GLboolean invert); + static void GetBufferParameteriv(GLenum target, GLenum pname, GLint *params); + static void *MapBufferRange(GLenum target, GLintptr offset, + GLsizeiptr length, GLbitfield access); + static GLboolean UnmapBuffer(GLenum target); private: GlFunctions(); |