| /* NOTE: Do not edit this file, it is generated by a script: |
| Export.py --api gl 4.4 --api wgl 4.4 --api glx 4.4 --api cgl 1.4 --api egl 1.0 --outdir . |
| */ |
| |
| /* |
| Copyright (c) 2011-2013 NVIDIA Corporation |
| Copyright (c) 2011-2013 Cass Everitt |
| Copyright (c) 2012-2013 Scott Nations |
| Copyright (c) 2012 Mathias Schott |
| Copyright (c) 2012-2013 Nigel Stewart |
| Copyright (c) 2012-2013 Google Inc. |
| All rights reserved. |
| |
| Redistribution and use in source and binary forms, with or without modification, |
| are permitted provided that the following conditions are met: |
| |
| Redistributions of source code must retain the above copyright notice, this |
| list of conditions and the following disclaimer. |
| |
| Redistributions in binary form must reproduce the above copyright notice, |
| this list of conditions and the following disclaimer in the documentation |
| and/or other materials provided with the distribution. |
| |
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
| BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
| OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| |
| /* |
| Intended formatting conventions: |
| $ astyle --style=allman --indent=spaces=2 --indent-switches |
| */ |
| |
| #include "RegalUtil.h" |
| |
| #if REGAL_EMULATION |
| |
| REGAL_GLOBAL_BEGIN |
| |
| #include "RegalPrivate.h" |
| #include "RegalContext.h" |
| #include "RegalDispatch.h" |
| #include "RegalFilt.h" |
| #include "RegalEmuProcsFilt.h" |
| |
| REGAL_GLOBAL_END |
| |
| REGAL_NAMESPACE_BEGIN |
| |
| static void REGAL_CALL emuProcInterceptFilt_glAccum(RegalContext *_context, GLenum op, GLfloat value) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glAccum for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glAccum( _context, op, value ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glActiveTextureARB(RegalContext *_context, GLenum texture) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_arb_multitexture) |
| { |
| orig.glActiveTexture( _context,texture); |
| return; |
| } |
| |
| orig.glActiveTextureARB( _context, texture ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glAttachObjectARB(RegalContext *_context, GLhandleARB containerObj, GLhandleARB obj) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || !_context->info->gl_arb_shader_objects) |
| { |
| orig.glAttachShader( _context,containerObj, obj); |
| return; |
| } |
| |
| orig.glAttachObjectARB( _context, containerObj, obj ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBindAttribLocationARB(RegalContext *_context, GLhandleARB programObj, GLuint index, const GLcharARB *name) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || !_context->info->gl_arb_shader_objects) |
| { |
| orig.glBindAttribLocation( _context,programObj, index, name); |
| return; |
| } |
| |
| orig.glBindAttribLocationARB( _context, programObj, index, name ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBindFramebuffer(RegalContext *_context, GLenum target, GLuint framebuffer) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| const bool hasFBBlit = _context->info->gl_ext_framebuffer_blit || _context->info->gl_nv_framebuffer_blit || _context->info->gl_version_major >= 3; |
| if (!hasFBBlit && (target==GL_DRAW_FRAMEBUFFER || target==GL_READ_FRAMEBUFFER)) target = GL_FRAMEBUFFER; |
| } |
| if (_context->filt->BindFramebuffer(*_context, target, framebuffer)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glBindFramebuffer( _context, target, framebuffer ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBindFramebufferEXT(RegalContext *_context, GLenum target, GLuint framebuffer) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glBindFramebuffer( _context,target, framebuffer); |
| return; |
| } |
| |
| orig.glBindFramebufferEXT( _context, target, framebuffer ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBindFramebufferOES(RegalContext *_context, GLenum target, GLuint framebuffer) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| const bool hasFBBlit = _context->info->gl_ext_framebuffer_blit || _context->info->gl_nv_framebuffer_blit || _context->info->gl_version_major >= 3; |
| if (!hasFBBlit && (target==GL_DRAW_FRAMEBUFFER || target==GL_READ_FRAMEBUFFER)) target = GL_FRAMEBUFFER; |
| } |
| if (_context->filt->BindFramebuffer(*_context, target, framebuffer)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glBindFramebufferOES( _context, target, framebuffer ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBindProgramARB(RegalContext *_context, GLenum target, GLuint program) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glBindProgramARB (GL_ARB_vertex_program) for ES 2.0 context - skipping."); |
| return; |
| } |
| |
| orig.glBindProgramARB( _context, target, program ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBindRenderbufferEXT(RegalContext *_context, GLenum target, GLuint renderbuffer) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glBindRenderbuffer( _context,target, renderbuffer); |
| return; |
| } |
| |
| orig.glBindRenderbufferEXT( _context, target, renderbuffer ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBindTexture(RegalContext *_context, GLenum target, GLuint texture) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->BindTexture(*_context, target, texture)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glBindTexture( _context, target, texture ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBitmap(RegalContext *_context, GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glBitmap for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glBitmap( _context, width, height, xorig, yorig, xmove, ymove, bitmap ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBlendColorEXT(RegalContext *_context, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| orig.glBlendColor( _context,red, green, blue, alpha); |
| return; |
| } |
| |
| orig.glBlendColorEXT( _context, red, green, blue, alpha ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBlendEquationEXT(RegalContext *_context, GLenum mode) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| orig.glBlendEquation( _context,mode); |
| return; |
| } |
| |
| orig.glBlendEquationEXT( _context, mode ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBlitFramebuffer(RegalContext *_context, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| if (_context->info->gl_nv_framebuffer_blit) return orig.glBlitFramebufferNV( _context, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); |
| if (_context->info->gl_ext_framebuffer_blit) return orig.glBlitFramebufferEXT( _context, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); |
| } |
| |
| orig.glBlitFramebuffer( _context, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBlitFramebufferANGLE(RegalContext *_context, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glBlitFramebufferANGLE for ES 2.0 - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glBlitFramebufferANGLE( _context, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBlitFramebufferEXT(RegalContext *_context, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_blit) |
| { |
| _context->emuLevel++; |
| orig.glBlitFramebuffer( _context,srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); |
| return; |
| } |
| |
| orig.glBlitFramebufferEXT( _context, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glBufferDataARB(RegalContext *_context, GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| orig.glBufferData( _context,target, size, data, usage); |
| return; |
| } |
| |
| orig.glBufferDataARB( _context, target, size, data, usage ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glCallList(RegalContext *_context, GLuint list) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glCallList for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glCallList( _context, list ); |
| |
| } |
| |
| static GLenum REGAL_CALL emuProcInterceptFilt_glCheckFramebufferStatusEXT(RegalContext *_context, GLenum target) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| return orig.glCheckFramebufferStatus( _context,target); |
| } |
| |
| return orig.glCheckFramebufferStatusEXT( _context, target ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glClearAccum(RegalContext *_context, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glClearAccum for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glClearAccum( _context, red, green, blue, alpha ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glClientActiveTexture(RegalContext *_context, GLenum texture) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glClientActiveTexture for ES 2.0 - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glClientActiveTexture( _context, texture ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glClientActiveTextureARB(RegalContext *_context, GLenum texture) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_arb_multitexture) |
| { |
| _context->emuLevel++; |
| orig.glClientActiveTexture( _context,texture); |
| return; |
| } |
| |
| orig.glClientActiveTextureARB( _context, texture ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glColorMaskIndexedEXT(RegalContext *_context, GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (REGAL_FORCE_ES2_PROFILE || !_context->info->gl_ext_draw_buffers2) |
| { |
| if (!buf) { |
| orig.glColorMask( _context,r, g, b, a); |
| } |
| return; |
| } |
| |
| orig.glColorMaskIndexedEXT( _context, buf, r, g, b, a ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glCompileShaderARB(RegalContext *_context, GLhandleARB shaderObj) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || !_context->info->gl_arb_shader_objects) |
| { |
| orig.glCompileShader( _context,shaderObj); |
| return; |
| } |
| |
| orig.glCompileShaderARB( _context, shaderObj ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glCopyPixels(RegalContext *_context, GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glCopyPixels for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glCopyPixels( _context, x, y, width, height, type ); |
| |
| } |
| |
| static GLhandleARB REGAL_CALL emuProcInterceptFilt_glCreateProgramObjectARB(RegalContext *_context) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || !_context->info->gl_arb_shader_objects) |
| { |
| return orig.glCreateProgram( _context ); |
| } |
| |
| return orig.glCreateProgramObjectARB( _context ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDeleteFramebuffersEXT(RegalContext *_context, GLsizei n, const GLuint *framebuffers) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glDeleteFramebuffers( _context,n, framebuffers); |
| return; |
| } |
| |
| orig.glDeleteFramebuffersEXT( _context, n, framebuffers ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDeleteLists(RegalContext *_context, GLuint list, GLsizei range) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glDeleteLists for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glDeleteLists( _context, list, range ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDeleteRenderbuffersEXT(RegalContext *_context, GLsizei n, const GLuint *renderbuffers) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glDeleteRenderbuffers( _context,n, renderbuffers); |
| return; |
| } |
| |
| orig.glDeleteRenderbuffersEXT( _context, n, renderbuffers ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDisableIndexedEXT(RegalContext *_context, GLenum target, GLuint index) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (target==GL_BLEND && (REGAL_FORCE_ES2_PROFILE || !_context->info->gl_ext_draw_buffers2)) |
| { |
| if (!index) { |
| orig.glDisable( _context,target); |
| } |
| return; |
| } |
| |
| orig.glDisableIndexedEXT( _context, target, index ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDrawBuffer(RegalContext *_context, GLenum mode) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| if (_context->info->gl_nv_framebuffer_blit || _context->info->gl_ext_framebuffer_blit) |
| return orig.glDrawBuffer( _context, mode ); |
| } |
| |
| orig.glDrawBuffer( _context, mode ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDrawBuffers(RegalContext *_context, GLsizei n, const GLenum *bufs) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->DrawBuffers(*_context, n, bufs)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| if (_context->isES2()) |
| { |
| if (_context->info->gl_nv_draw_buffers) |
| { |
| orig.glDrawBuffersNV( _context, n, bufs ); |
| return; |
| } |
| } |
| |
| orig.glDrawBuffers( _context, n, bufs ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDrawBuffersARB(RegalContext *_context, GLsizei n, const GLenum *bufs) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_arb_draw_buffers) |
| { |
| _context->emuLevel++; |
| orig.glDrawBuffers( _context,n, bufs); |
| return; |
| } |
| |
| orig.glDrawBuffersARB( _context, n, bufs ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDrawBuffersATI(RegalContext *_context, GLsizei n, const GLenum *bufs) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ati_draw_buffers) |
| { |
| _context->emuLevel++; |
| orig.glDrawBuffers( _context,n, bufs); |
| return; |
| } |
| |
| orig.glDrawBuffersATI( _context, n, bufs ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDrawPixels(RegalContext *_context, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glDrawPixels for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glDrawPixels( _context, width, height, format, type, pixels ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDrawRangeElements(RegalContext *_context, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| return orig.glDrawElements( _context,mode, count, type, indices); |
| } |
| |
| orig.glDrawRangeElements( _context, mode, start, end, count, type, indices ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glDrawRangeElementsBaseVertex(RegalContext *_context, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (REGAL_FORCE_ES2_PROFILE || !_context->info->gl_arb_draw_elements_base_vertex) |
| { |
| if (basevertex==0) |
| { |
| return orig.glDrawElements( _context,mode, count, type, indices); |
| } |
| else |
| { |
| Warning("Regal does not support glDrawRangeElementsBaseVertex (GL_ARB_draw_elements_base_vertex extension not available) for basevertex!=0 for ES 2.0 - skipping."); |
| return; |
| } |
| } |
| |
| orig.glDrawRangeElementsBaseVertex( _context, mode, start, end, count, type, indices, basevertex ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEdgeFlag(RegalContext *_context, GLboolean flag) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEdgeFlag for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEdgeFlag( _context, flag ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEnableIndexedEXT(RegalContext *_context, GLenum target, GLuint index) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (target==GL_BLEND && (REGAL_FORCE_ES2_PROFILE || !_context->info->gl_ext_draw_buffers2)) |
| { |
| if (!index) { |
| orig.glEnable( _context,target); |
| } |
| return; |
| } |
| |
| orig.glEnableIndexedEXT( _context, target, index ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEndList(RegalContext *_context) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEndList for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEndList( _context ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalCoord1d(RegalContext *_context, GLdouble u) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalCoord1d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalCoord1d( _context, u ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalCoord1dv(RegalContext *_context, const GLdouble *u) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalCoord1dv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalCoord1dv( _context, u ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalCoord1f(RegalContext *_context, GLfloat u) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalCoord1f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalCoord1f( _context, u ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalCoord1fv(RegalContext *_context, const GLfloat *u) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalCoord1fv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalCoord1fv( _context, u ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalCoord2d(RegalContext *_context, GLdouble u, GLdouble v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalCoord2d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalCoord2d( _context, u, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalCoord2dv(RegalContext *_context, const GLdouble *u) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalCoord2dv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalCoord2dv( _context, u ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalCoord2f(RegalContext *_context, GLfloat u, GLfloat v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalCoord2f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalCoord2f( _context, u, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalCoord2fv(RegalContext *_context, const GLfloat *u) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalCoord2fv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalCoord2fv( _context, u ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalMesh1(RegalContext *_context, GLenum mode, GLint i1, GLint i2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalMesh1 for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalMesh1( _context, mode, i1, i2 ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalMesh2(RegalContext *_context, GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalMesh2 for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalMesh2( _context, mode, i1, i2, j1, j2 ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalPoint1(RegalContext *_context, GLint i) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalPoint1 for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalPoint1( _context, i ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glEvalPoint2(RegalContext *_context, GLint i, GLint j) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glEvalPoint2 for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glEvalPoint2( _context, i, j ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glFramebufferRenderbuffer(RegalContext *_context, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->FramebufferAttachmentSupported(*_context, attachment)) |
| orig.glFramebufferRenderbuffer( _context,target, attachment, renderbuffertarget, renderbuffer); |
| return; |
| |
| orig.glFramebufferRenderbuffer( _context, target, attachment, renderbuffertarget, renderbuffer ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glFramebufferRenderbufferEXT(RegalContext *_context, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glFramebufferRenderbuffer( _context,target, attachment, renderbuffertarget, renderbuffer); |
| return; |
| } |
| |
| orig.glFramebufferRenderbufferEXT( _context, target, attachment, renderbuffertarget, renderbuffer ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glFramebufferTexture1D(RegalContext *_context, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->FramebufferAttachmentSupported(*_context, attachment)) |
| orig.glFramebufferTexture1D( _context,target, attachment, textarget, texture, level); |
| return; |
| |
| orig.glFramebufferTexture1D( _context, target, attachment, textarget, texture, level ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glFramebufferTexture1DEXT(RegalContext *_context, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glFramebufferTexture1D( _context,target, attachment, textarget, texture, level); |
| return; |
| } |
| |
| orig.glFramebufferTexture1DEXT( _context, target, attachment, textarget, texture, level ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glFramebufferTexture2D(RegalContext *_context, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->FramebufferTexture2D(*_context, target, attachment, textarget, texture, level)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glFramebufferTexture2D( _context, target, attachment, textarget, texture, level ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glFramebufferTexture2DEXT(RegalContext *_context, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glFramebufferTexture2D( _context,target, attachment, textarget, texture, level); |
| return; |
| } |
| |
| orig.glFramebufferTexture2DEXT( _context, target, attachment, textarget, texture, level ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glFramebufferTexture3D(RegalContext *_context, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->FramebufferAttachmentSupported(*_context, attachment)) |
| orig.glFramebufferTexture3D( _context,target, attachment, textarget, texture, level, layer); |
| return; |
| |
| orig.glFramebufferTexture3D( _context, target, attachment, textarget, texture, level, layer ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glFramebufferTexture3DEXT(RegalContext *_context, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glFramebufferTexture3D( _context,target, attachment, textarget, texture, level, zoffset); |
| return; |
| } |
| |
| orig.glFramebufferTexture3DEXT( _context, target, attachment, textarget, texture, level, zoffset ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGenFramebuffersEXT(RegalContext *_context, GLsizei n, GLuint *framebuffers) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glGenFramebuffers( _context,n, framebuffers); |
| return; |
| } |
| |
| orig.glGenFramebuffersEXT( _context, n, framebuffers ); |
| |
| } |
| |
| static GLuint REGAL_CALL emuProcInterceptFilt_glGenLists(RegalContext *_context, GLsizei range) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glGenLists for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return (( GLuint )0); |
| } |
| |
| return orig.glGenLists( _context, range ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGenProgramsARB(RegalContext *_context, GLsizei n, GLuint *programs) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glGenProgramsARB (GL_ARB_vertex_program) for ES 2.0 context - skipping."); |
| return; |
| } |
| |
| orig.glGenProgramsARB( _context, n, programs ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGenRenderbuffersEXT(RegalContext *_context, GLsizei n, GLuint *renderbuffers) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glGenRenderbuffers( _context,n, renderbuffers); |
| return; |
| } |
| |
| orig.glGenRenderbuffersEXT( _context, n, renderbuffers ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGenSamplers(RegalContext *_context, GLsizei count, GLuint *samplers) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glGenSamplers for ES 2.0 - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGenSamplers( _context, count, samplers ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGenerateMipmap(RegalContext *_context, GLenum target) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->GenerateMipmap(*_context, target)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGenerateMipmap( _context, target ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGenerateMipmapEXT(RegalContext *_context, GLenum target) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glGenerateMipmap( _context,target); |
| return; |
| } |
| |
| orig.glGenerateMipmapEXT( _context, target ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetBooleanIndexedvEXT(RegalContext *_context, GLenum value, GLuint index, GLboolean *data) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (REGAL_FORCE_ES2_PROFILE || !_context->info->gl_ext_draw_buffers2) |
| { |
| if (!index) { |
| orig.glGetBooleanv( _context,value,data); |
| } |
| return; |
| } |
| |
| orig.glGetBooleanIndexedvEXT( _context, value, index, data ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetBooleanv(RegalContext *_context, GLenum pname, GLboolean *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->Get(*_context, pname, params)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGetBooleanv( _context, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetDoublev(RegalContext *_context, GLenum pname, GLdouble *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->Get(*_context, pname, params)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGetDoublev( _context, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetFloatv(RegalContext *_context, GLenum pname, GLfloat *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->Get(*_context, pname, params)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGetFloatv( _context, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetFramebufferAttachmentParameteriv(RegalContext *_context, GLenum target, GLenum attachment, GLenum pname, GLint *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->filt->FramebufferAttachmentSupported(*_context, attachment)) |
| *params = 0; |
| else |
| orig.glGetFramebufferAttachmentParameteriv( _context,target, attachment, pname, params); |
| return; |
| |
| orig.glGetFramebufferAttachmentParameteriv( _context, target, attachment, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetFramebufferAttachmentParameterivEXT(RegalContext *_context, GLenum target, GLenum attachment, GLenum pname, GLint *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glGetFramebufferAttachmentParameteriv( _context,target, attachment, pname, params); |
| return; |
| } |
| |
| orig.glGetFramebufferAttachmentParameterivEXT( _context, target, attachment, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetInfoLogARB(RegalContext *_context, GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || !_context->info->gl_arb_shader_objects) |
| { |
| if (orig.glIsProgram( _context,obj)) |
| orig.glGetProgramInfoLog( _context,obj, maxLength, length, infoLog); |
| else |
| orig.glGetShaderInfoLog( _context,obj, maxLength, length, infoLog); |
| return; |
| } |
| |
| orig.glGetInfoLogARB( _context, obj, maxLength, length, infoLog ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetInteger64v(RegalContext *_context, GLenum pname, GLint64 *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->Get(*_context, pname, params)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGetInteger64v( _context, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetIntegerIndexedvEXT(RegalContext *_context, GLenum value, GLuint index, GLint *data) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (REGAL_FORCE_ES2_PROFILE || !_context->info->gl_ext_draw_buffers2) |
| { |
| if (!index) { |
| orig.glGetIntegerv( _context,value,data); |
| } |
| return; |
| } |
| |
| orig.glGetIntegerIndexedvEXT( _context, value, index, data ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetIntegerv(RegalContext *_context, GLenum pname, GLint *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->Get(*_context, pname, params)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGetIntegerv( _context, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetObjectParameterivARB(RegalContext *_context, GLhandleARB obj, GLenum pname, GLint *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || !_context->info->gl_arb_shader_objects) |
| { |
| if (orig.glIsProgram( _context,obj)) |
| orig.glGetProgramiv( _context,obj, pname, params); |
| else |
| orig.glGetShaderiv( _context,obj, pname, params); |
| return; |
| } |
| |
| orig.glGetObjectParameterivARB( _context, obj, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetProgramivARB(RegalContext *_context, GLenum target, GLenum pname, GLint *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glGetProgramivARB (GL_ARB_vertex_program) for ES 2.0 context - skipping."); |
| return; |
| } |
| |
| orig.glGetProgramivARB( _context, target, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetRenderbufferParameterivEXT(RegalContext *_context, GLenum target, GLenum pname, GLint *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glGetRenderbufferParameteriv( _context,target, pname, params); |
| return; |
| } |
| |
| orig.glGetRenderbufferParameterivEXT( _context, target, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetTexImage(RegalContext *_context, GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glGetTexImage for ES 2.0 - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGetTexImage( _context, target, level, format, type, pixels ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetTexLevelParameterfv(RegalContext *_context, GLenum target, GLint level, GLenum pname, GLfloat *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glGetTexLevelParameterfv for ES 2.0 - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGetTexLevelParameterfv( _context, target, level, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetTexLevelParameteriv(RegalContext *_context, GLenum target, GLint level, GLenum pname, GLint *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glGetTexLevelParameteriv for ES 2.0 - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGetTexLevelParameteriv( _context, target, level, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glGetTexParameteriv(RegalContext *_context, GLenum target, GLenum pname, GLint *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->GetTexParameteriv(*_context, target, pname, params)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glGetTexParameteriv( _context, target, pname, params ); |
| |
| } |
| |
| static GLint REGAL_CALL emuProcInterceptFilt_glGetUniformLocationARB(RegalContext *_context, GLhandleARB programObj, const GLcharARB *name) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || !_context->info->gl_arb_shader_objects) |
| { |
| return orig.glGetUniformLocation( _context,programObj, name); |
| } |
| |
| return orig.glGetUniformLocationARB( _context, programObj, name ); |
| |
| } |
| |
| static GLboolean REGAL_CALL emuProcInterceptFilt_glIsEnabledIndexedEXT(RegalContext *_context, GLenum target, GLuint index) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (target==GL_BLEND && !_context->info->gl_ext_draw_buffers2) |
| { |
| if (!index) { |
| return orig.glIsEnabled( _context,target); |
| } |
| return GL_FALSE; |
| } |
| |
| return orig.glIsEnabledIndexedEXT( _context, target, index ); |
| |
| } |
| |
| static GLboolean REGAL_CALL emuProcInterceptFilt_glIsFramebufferEXT(RegalContext *_context, GLuint framebuffer) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| return orig.glIsFramebuffer( _context,framebuffer); |
| } |
| |
| return orig.glIsFramebufferEXT( _context, framebuffer ); |
| |
| } |
| |
| static GLboolean REGAL_CALL emuProcInterceptFilt_glIsRenderbufferEXT(RegalContext *_context, GLuint renderbuffer) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| return orig.glIsRenderbuffer( _context,renderbuffer); |
| } |
| |
| return orig.glIsRenderbufferEXT( _context, renderbuffer ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glLineStipple(RegalContext *_context, GLint factor, GLushort pattern) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glLineStipple for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glLineStipple( _context, factor, pattern ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glLineWidth(RegalContext *_context, GLfloat width) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isCore()) |
| { |
| Warning("Regal does not support glLineWidth for core profile - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glLineWidth( _context, width ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glMap1d(RegalContext *_context, GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glMap1d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glMap1d( _context, target, u1, u2, stride, order, points ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glMap1f(RegalContext *_context, GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glMap1f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glMap1f( _context, target, u1, u2, stride, order, points ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glMap2d(RegalContext *_context, GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glMap2d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glMap2d( _context, target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glMap2f(RegalContext *_context, GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glMap2f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glMap2f( _context, target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points ); |
| |
| } |
| |
| static GLvoid *REGAL_CALL emuProcInterceptFilt_glMapBuffer(RegalContext *_context, GLenum target, GLenum access) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| return orig.glMapBufferOES( _context,target, access); |
| } |
| |
| return orig.glMapBuffer( _context, target, access ); |
| |
| } |
| |
| static GLvoid *REGAL_CALL emuProcInterceptFilt_glMapBufferARB(RegalContext *_context, GLenum target, GLenum access) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| return orig.glMapBufferOES( _context,target, access); |
| } |
| |
| return orig.glMapBufferARB( _context, target, access ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glMapGrid1d(RegalContext *_context, GLint un, GLdouble u1, GLdouble u2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glMapGrid1d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glMapGrid1d( _context, un, u1, u2 ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glMapGrid1f(RegalContext *_context, GLint un, GLfloat u1, GLfloat u2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glMapGrid1f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glMapGrid1f( _context, un, u1, u2 ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glMapGrid2d(RegalContext *_context, GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glMapGrid2d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glMapGrid2d( _context, un, u1, u2, vn, v1, v2 ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glMapGrid2f(RegalContext *_context, GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glMapGrid2f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glMapGrid2f( _context, un, u1, u2, vn, v1, v2 ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glNewList(RegalContext *_context, GLuint list, GLenum mode) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glNewList for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glNewList( _context, list, mode ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glPixelStoref(RegalContext *_context, GLenum pname, GLfloat param) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glPixelStoref for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glPixelStoref( _context, pname, param ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glPixelStorei(RegalContext *_context, GLenum pname, GLint param) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->PixelStorei(*_context, pname, param)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glPixelStorei( _context, pname, param ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glPixelTransferf(RegalContext *_context, GLenum pname, GLfloat param) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glPixelTransferf for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glPixelTransferf( _context, pname, param ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glPixelTransferi(RegalContext *_context, GLenum pname, GLint param) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glPixelTransferi for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glPixelTransferi( _context, pname, param ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glPixelZoom(RegalContext *_context, GLfloat xfactor, GLfloat yfactor) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glPixelZoom for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glPixelZoom( _context, xfactor, yfactor ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glPolygonMode(RegalContext *_context, GLenum face, GLenum mode) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->PolygonMode(*_context, face, mode)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glPolygonMode( _context, face, mode ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glPopGroupMarkerEXT(RegalContext *_context) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if( ! _context->info->gl_ext_debug_marker ) { |
| return; |
| } |
| |
| orig.glPopGroupMarkerEXT( _context ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glProgramStringARB(RegalContext *_context, GLenum target, GLenum format, GLsizei len, const GLvoid *string) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glProgramStringARB (GL_ARB_vertex_program) for ES 2.0 context - skipping."); |
| return; |
| } |
| |
| orig.glProgramStringARB( _context, target, format, len, string ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glPushGroupMarkerEXT(RegalContext *_context, GLsizei length, const GLchar *marker) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if( ! _context->info->gl_ext_debug_marker ) { |
| return; |
| } |
| |
| orig.glPushGroupMarkerEXT( _context, length, marker ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos2d(RegalContext *_context, GLdouble x, GLdouble y) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos2d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos2d( _context, x, y ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos2dv(RegalContext *_context, const GLdouble *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos2dv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos2dv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos2f(RegalContext *_context, GLfloat x, GLfloat y) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos2f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos2f( _context, x, y ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos2fv(RegalContext *_context, const GLfloat *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos2fv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos2fv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos2i(RegalContext *_context, GLint x, GLint y) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos2i for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos2i( _context, x, y ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos2iv(RegalContext *_context, const GLint *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos2iv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos2iv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos2s(RegalContext *_context, GLshort x, GLshort y) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos2s for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos2s( _context, x, y ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos2sv(RegalContext *_context, const GLshort *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos2sv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos2sv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos3d(RegalContext *_context, GLdouble x, GLdouble y, GLdouble z) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos3d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos3d( _context, x, y, z ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos3dv(RegalContext *_context, const GLdouble *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos3dv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos3dv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos3f(RegalContext *_context, GLfloat x, GLfloat y, GLfloat z) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos3f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos3f( _context, x, y, z ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos3fv(RegalContext *_context, const GLfloat *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos3fv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos3fv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos3i(RegalContext *_context, GLint x, GLint y, GLint z) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos3i for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos3i( _context, x, y, z ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos3iv(RegalContext *_context, const GLint *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos3iv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos3iv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos3s(RegalContext *_context, GLshort x, GLshort y, GLshort z) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos3s for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos3s( _context, x, y, z ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos3sv(RegalContext *_context, const GLshort *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos3sv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos3sv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos4d(RegalContext *_context, GLdouble x, GLdouble y, GLdouble z, GLdouble w) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos4d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos4d( _context, x, y, z, w ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos4dv(RegalContext *_context, const GLdouble *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos4dv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos4dv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos4f(RegalContext *_context, GLfloat x, GLfloat y, GLfloat z, GLfloat w) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos4f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos4f( _context, x, y, z, w ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos4fv(RegalContext *_context, const GLfloat *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos4fv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos4fv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos4i(RegalContext *_context, GLint x, GLint y, GLint z, GLint w) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos4i for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos4i( _context, x, y, z, w ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos4iv(RegalContext *_context, const GLint *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos4iv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos4iv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos4s(RegalContext *_context, GLshort x, GLshort y, GLshort z, GLshort w) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos4s for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos4s( _context, x, y, z, w ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRasterPos4sv(RegalContext *_context, const GLshort *v) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRasterPos4sv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRasterPos4sv( _context, v ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glReadBuffer(RegalContext *_context, GLenum mode) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->ReadBuffer(*_context, mode)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| if (_context->isES2() && _context->info->gl_nv_read_buffer) |
| orig.glReadBufferNV( _context,mode); |
| else |
| orig.glReadBuffer( _context,mode); |
| return; |
| |
| orig.glReadBuffer( _context, mode ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRectd(RegalContext *_context, GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRectd for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRectd( _context, x1, y1, x2, y2 ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRectf(RegalContext *_context, GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRectf for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRectf( _context, x1, y1, x2, y2 ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRecti(RegalContext *_context, GLint x1, GLint y1, GLint x2, GLint y2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRecti for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRecti( _context, x1, y1, x2, y2 ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRects(RegalContext *_context, GLshort x1, GLshort y1, GLshort x2, GLshort y2) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glRects for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glRects( _context, x1, y1, x2, y2 ); |
| |
| } |
| |
| static GLint REGAL_CALL emuProcInterceptFilt_glRenderMode(RegalContext *_context, GLenum mode) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->RenderMode(*_context, mode)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return (( GLint )0); |
| } |
| |
| return orig.glRenderMode( _context, mode ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glRenderbufferStorageEXT(RegalContext *_context, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (!_context->info->gl_ext_framebuffer_object) |
| { |
| _context->emuLevel++; |
| orig.glRenderbufferStorage( _context,target, internalformat, width, height); |
| return; |
| } |
| |
| orig.glRenderbufferStorageEXT( _context, target, internalformat, width, height ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glShadeModel(RegalContext *_context, GLenum mode) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glShadeModel for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glShadeModel( _context, mode ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glTexImage1D(RegalContext *_context, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glTexImage1D for ES 2.0 - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glTexImage1D( _context, target, level, internalformat, width, border, format, type, pixels ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glTexImage2D(RegalContext *_context, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->filt->TexImage2D(*_context, target, level, internalformat, width, height, border, format, type, pixels)) |
| { |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glTexImage2D( _context, target, level, internalformat, width, height, border, format, type, pixels ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glTexImage3D(RegalContext *_context, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| Warning("Regal does not support glTexImage3D for ES 2.0 - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glTexImage3D( _context, target, level, internalformat, width, height, depth, border, format, type, pixels ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glTexParameterf(RegalContext *_context, GLenum target, GLenum pname, GLfloat param) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| |
| if (_context->filt->TexParameter(*_context, target, pname)) |
| return; |
| GLfloat newparam; |
| if (_context->filt->FilterTexParameter(*_context, target, pname, static_cast<GLfloat>(param), newparam)) |
| orig.glTexParameterf( _context, target, pname, newparam); |
| else |
| orig.glTexParameterf( _context, target, pname, param); |
| return; |
| |
| orig.glTexParameterf( _context, target, pname, param ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glTexParameterfv(RegalContext *_context, GLenum target, GLenum pname, const GLfloat *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| |
| if (_context->filt->TexParameter(*_context, target, pname)) |
| return; |
| GLfloat newparam; |
| if (params && _context->filt->FilterTexParameter(*_context, target, pname, static_cast<GLfloat>(params[0]), newparam)) |
| orig.glTexParameterf( _context, target, pname, newparam); |
| else |
| orig.glTexParameterfv( _context, target, pname, params); |
| return; |
| |
| orig.glTexParameterfv( _context, target, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glTexParameteri(RegalContext *_context, GLenum target, GLenum pname, GLint param) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| |
| if (_context->filt->TexParameter(*_context, target, pname)) |
| return; |
| GLfloat newparam; |
| if (_context->filt->FilterTexParameter(*_context, target, pname, static_cast<GLfloat>(param), newparam)) |
| orig.glTexParameterf( _context, target, pname, newparam); |
| else |
| orig.glTexParameteri( _context, target, pname, param); |
| return; |
| |
| orig.glTexParameteri( _context, target, pname, param ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glTexParameteriv(RegalContext *_context, GLenum target, GLenum pname, const GLint *params) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| |
| if (_context->filt->TexParameter(*_context, target, pname)) |
| return; |
| GLfloat newparam; |
| if (params && _context->filt->FilterTexParameter(*_context, target, pname, static_cast<GLfloat>(params[0]), newparam)) |
| orig.glTexParameterf( _context, target, pname, newparam); |
| else |
| orig.glTexParameteriv( _context, target, pname, params); |
| return; |
| |
| orig.glTexParameteriv( _context, target, pname, params ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glUniform1iARB(RegalContext *_context, GLint location, GLint v0) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || !_context->info->gl_arb_shader_objects) |
| { |
| orig.glUniform1i( _context,location, v0); |
| return; |
| } |
| |
| orig.glUniform1iARB( _context, location, v0 ); |
| |
| } |
| |
| static GLboolean REGAL_CALL emuProcInterceptFilt_glUnmapBuffer(RegalContext *_context, GLenum target) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| return orig.glUnmapBufferOES( _context,target); |
| } |
| |
| return orig.glUnmapBuffer( _context, target ); |
| |
| } |
| |
| static GLboolean REGAL_CALL emuProcInterceptFilt_glUnmapBufferARB(RegalContext *_context, GLenum target) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2()) |
| { |
| return orig.glUnmapBufferOES( _context,target); |
| } |
| |
| return orig.glUnmapBufferARB( _context, target ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos2d(RegalContext *_context, GLdouble x, GLdouble y) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos2d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos2d( _context, x, y ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos2dv(RegalContext *_context, const GLdouble *p) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos2dv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos2dv( _context, p ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos2f(RegalContext *_context, GLfloat x, GLfloat y) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos2f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos2f( _context, x, y ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos2fv(RegalContext *_context, const GLfloat *p) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos2fv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos2fv( _context, p ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos2i(RegalContext *_context, GLint x, GLint y) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos2i for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos2i( _context, x, y ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos2iv(RegalContext *_context, const GLint *p) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos2iv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos2iv( _context, p ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos2s(RegalContext *_context, GLshort x, GLshort y) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos2s for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos2s( _context, x, y ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos2sv(RegalContext *_context, const GLshort *p) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos2sv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos2sv( _context, p ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos3d(RegalContext *_context, GLdouble x, GLdouble y, GLdouble z) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos3d for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos3d( _context, x, y, z ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos3dv(RegalContext *_context, const GLdouble *p) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos3dv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos3dv( _context, p ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos3f(RegalContext *_context, GLfloat x, GLfloat y, GLfloat z) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos3f for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos3f( _context, x, y, z ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos3fv(RegalContext *_context, const GLfloat *p) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos3fv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos3fv( _context, p ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos3i(RegalContext *_context, GLint x, GLint y, GLint z) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos3i for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos3i( _context, x, y, z ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos3iv(RegalContext *_context, const GLint *p) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos3iv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos3iv( _context, p ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos3s(RegalContext *_context, GLshort x, GLshort y, GLshort z) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos3s for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos3s( _context, x, y, z ); |
| |
| } |
| |
| static void REGAL_CALL emuProcInterceptFilt_glWindowPos3sv(RegalContext *_context, const GLshort *p) |
| { |
| RegalAssert(_context); |
| EmuProcsOriginateFilt & orig = _context->filt->orig; |
| |
| // impl |
| if (_context->isES2() || _context->isCore()) |
| { |
| Warning("Regal does not support glWindowPos3sv for core or ES2 profiles - skipping."); |
| #if REGAL_BREAK |
| Break::Filter(); |
| #endif |
| return ; |
| } |
| |
| orig.glWindowPos3sv( _context, p ); |
| |
| } |
| |
| void EmuProcsInterceptFilt( Dispatch::GL & dt ) { |
| dt.glAccum = emuProcInterceptFilt_glAccum; |
| dt.glActiveTextureARB = emuProcInterceptFilt_glActiveTextureARB; |
| dt.glAttachObjectARB = emuProcInterceptFilt_glAttachObjectARB; |
| dt.glBindAttribLocationARB = emuProcInterceptFilt_glBindAttribLocationARB; |
| dt.glBindFramebuffer = emuProcInterceptFilt_glBindFramebuffer; |
| dt.glBindFramebufferEXT = emuProcInterceptFilt_glBindFramebufferEXT; |
| dt.glBindFramebufferOES = emuProcInterceptFilt_glBindFramebufferOES; |
| dt.glBindProgramARB = emuProcInterceptFilt_glBindProgramARB; |
| dt.glBindRenderbufferEXT = emuProcInterceptFilt_glBindRenderbufferEXT; |
| dt.glBindTexture = emuProcInterceptFilt_glBindTexture; |
| dt.glBitmap = emuProcInterceptFilt_glBitmap; |
| dt.glBlendColorEXT = emuProcInterceptFilt_glBlendColorEXT; |
| dt.glBlendEquationEXT = emuProcInterceptFilt_glBlendEquationEXT; |
| dt.glBlitFramebuffer = emuProcInterceptFilt_glBlitFramebuffer; |
| dt.glBlitFramebufferANGLE = emuProcInterceptFilt_glBlitFramebufferANGLE; |
| dt.glBlitFramebufferEXT = emuProcInterceptFilt_glBlitFramebufferEXT; |
| dt.glBufferDataARB = emuProcInterceptFilt_glBufferDataARB; |
| dt.glCallList = emuProcInterceptFilt_glCallList; |
| dt.glCheckFramebufferStatusEXT = emuProcInterceptFilt_glCheckFramebufferStatusEXT; |
| dt.glClearAccum = emuProcInterceptFilt_glClearAccum; |
| dt.glClientActiveTexture = emuProcInterceptFilt_glClientActiveTexture; |
| dt.glClientActiveTextureARB = emuProcInterceptFilt_glClientActiveTextureARB; |
| dt.glColorMaskIndexedEXT = emuProcInterceptFilt_glColorMaskIndexedEXT; |
| dt.glCompileShaderARB = emuProcInterceptFilt_glCompileShaderARB; |
| dt.glCopyPixels = emuProcInterceptFilt_glCopyPixels; |
| dt.glCreateProgramObjectARB = emuProcInterceptFilt_glCreateProgramObjectARB; |
| dt.glDeleteFramebuffersEXT = emuProcInterceptFilt_glDeleteFramebuffersEXT; |
| dt.glDeleteLists = emuProcInterceptFilt_glDeleteLists; |
| dt.glDeleteRenderbuffersEXT = emuProcInterceptFilt_glDeleteRenderbuffersEXT; |
| dt.glDisableIndexedEXT = emuProcInterceptFilt_glDisableIndexedEXT; |
| dt.glDrawBuffer = emuProcInterceptFilt_glDrawBuffer; |
| dt.glDrawBuffers = emuProcInterceptFilt_glDrawBuffers; |
| dt.glDrawBuffersARB = emuProcInterceptFilt_glDrawBuffersARB; |
| dt.glDrawBuffersATI = emuProcInterceptFilt_glDrawBuffersATI; |
| dt.glDrawPixels = emuProcInterceptFilt_glDrawPixels; |
| dt.glDrawRangeElements = emuProcInterceptFilt_glDrawRangeElements; |
| dt.glDrawRangeElementsBaseVertex = emuProcInterceptFilt_glDrawRangeElementsBaseVertex; |
| dt.glEdgeFlag = emuProcInterceptFilt_glEdgeFlag; |
| dt.glEnableIndexedEXT = emuProcInterceptFilt_glEnableIndexedEXT; |
| dt.glEndList = emuProcInterceptFilt_glEndList; |
| dt.glEvalCoord1d = emuProcInterceptFilt_glEvalCoord1d; |
| dt.glEvalCoord1dv = emuProcInterceptFilt_glEvalCoord1dv; |
| dt.glEvalCoord1f = emuProcInterceptFilt_glEvalCoord1f; |
| dt.glEvalCoord1fv = emuProcInterceptFilt_glEvalCoord1fv; |
| dt.glEvalCoord2d = emuProcInterceptFilt_glEvalCoord2d; |
| dt.glEvalCoord2dv = emuProcInterceptFilt_glEvalCoord2dv; |
| dt.glEvalCoord2f = emuProcInterceptFilt_glEvalCoord2f; |
| dt.glEvalCoord2fv = emuProcInterceptFilt_glEvalCoord2fv; |
| dt.glEvalMesh1 = emuProcInterceptFilt_glEvalMesh1; |
| dt.glEvalMesh2 = emuProcInterceptFilt_glEvalMesh2; |
| dt.glEvalPoint1 = emuProcInterceptFilt_glEvalPoint1; |
| dt.glEvalPoint2 = emuProcInterceptFilt_glEvalPoint2; |
| dt.glFramebufferRenderbuffer = emuProcInterceptFilt_glFramebufferRenderbuffer; |
| dt.glFramebufferRenderbufferEXT = emuProcInterceptFilt_glFramebufferRenderbufferEXT; |
| dt.glFramebufferTexture1D = emuProcInterceptFilt_glFramebufferTexture1D; |
| dt.glFramebufferTexture1DEXT = emuProcInterceptFilt_glFramebufferTexture1DEXT; |
| dt.glFramebufferTexture2D = emuProcInterceptFilt_glFramebufferTexture2D; |
| dt.glFramebufferTexture2DEXT = emuProcInterceptFilt_glFramebufferTexture2DEXT; |
| dt.glFramebufferTexture3D = emuProcInterceptFilt_glFramebufferTexture3D; |
| dt.glFramebufferTexture3DEXT = emuProcInterceptFilt_glFramebufferTexture3DEXT; |
| dt.glGenFramebuffersEXT = emuProcInterceptFilt_glGenFramebuffersEXT; |
| dt.glGenLists = emuProcInterceptFilt_glGenLists; |
| dt.glGenProgramsARB = emuProcInterceptFilt_glGenProgramsARB; |
| dt.glGenRenderbuffersEXT = emuProcInterceptFilt_glGenRenderbuffersEXT; |
| dt.glGenSamplers = emuProcInterceptFilt_glGenSamplers; |
| dt.glGenerateMipmap = emuProcInterceptFilt_glGenerateMipmap; |
| dt.glGenerateMipmapEXT = emuProcInterceptFilt_glGenerateMipmapEXT; |
| dt.glGetBooleanIndexedvEXT = emuProcInterceptFilt_glGetBooleanIndexedvEXT; |
| dt.glGetBooleanv = emuProcInterceptFilt_glGetBooleanv; |
| dt.glGetDoublev = emuProcInterceptFilt_glGetDoublev; |
| dt.glGetFloatv = emuProcInterceptFilt_glGetFloatv; |
| dt.glGetFramebufferAttachmentParameteriv = emuProcInterceptFilt_glGetFramebufferAttachmentParameteriv; |
| dt.glGetFramebufferAttachmentParameterivEXT = emuProcInterceptFilt_glGetFramebufferAttachmentParameterivEXT; |
| dt.glGetInfoLogARB = emuProcInterceptFilt_glGetInfoLogARB; |
| dt.glGetInteger64v = emuProcInterceptFilt_glGetInteger64v; |
| dt.glGetIntegerIndexedvEXT = emuProcInterceptFilt_glGetIntegerIndexedvEXT; |
| dt.glGetIntegerv = emuProcInterceptFilt_glGetIntegerv; |
| dt.glGetObjectParameterivARB = emuProcInterceptFilt_glGetObjectParameterivARB; |
| dt.glGetProgramivARB = emuProcInterceptFilt_glGetProgramivARB; |
| dt.glGetRenderbufferParameterivEXT = emuProcInterceptFilt_glGetRenderbufferParameterivEXT; |
| dt.glGetTexImage = emuProcInterceptFilt_glGetTexImage; |
| dt.glGetTexLevelParameterfv = emuProcInterceptFilt_glGetTexLevelParameterfv; |
| dt.glGetTexLevelParameteriv = emuProcInterceptFilt_glGetTexLevelParameteriv; |
| dt.glGetTexParameteriv = emuProcInterceptFilt_glGetTexParameteriv; |
| dt.glGetUniformLocationARB = emuProcInterceptFilt_glGetUniformLocationARB; |
| dt.glIsEnabledIndexedEXT = emuProcInterceptFilt_glIsEnabledIndexedEXT; |
| dt.glIsFramebufferEXT = emuProcInterceptFilt_glIsFramebufferEXT; |
| dt.glIsRenderbufferEXT = emuProcInterceptFilt_glIsRenderbufferEXT; |
| dt.glLineStipple = emuProcInterceptFilt_glLineStipple; |
| dt.glLineWidth = emuProcInterceptFilt_glLineWidth; |
| dt.glMap1d = emuProcInterceptFilt_glMap1d; |
| dt.glMap1f = emuProcInterceptFilt_glMap1f; |
| dt.glMap2d = emuProcInterceptFilt_glMap2d; |
| dt.glMap2f = emuProcInterceptFilt_glMap2f; |
| dt.glMapBuffer = emuProcInterceptFilt_glMapBuffer; |
| dt.glMapBufferARB = emuProcInterceptFilt_glMapBufferARB; |
| dt.glMapGrid1d = emuProcInterceptFilt_glMapGrid1d; |
| dt.glMapGrid1f = emuProcInterceptFilt_glMapGrid1f; |
| dt.glMapGrid2d = emuProcInterceptFilt_glMapGrid2d; |
| dt.glMapGrid2f = emuProcInterceptFilt_glMapGrid2f; |
| dt.glNewList = emuProcInterceptFilt_glNewList; |
| dt.glPixelStoref = emuProcInterceptFilt_glPixelStoref; |
| dt.glPixelStorei = emuProcInterceptFilt_glPixelStorei; |
| dt.glPixelTransferf = emuProcInterceptFilt_glPixelTransferf; |
| dt.glPixelTransferi = emuProcInterceptFilt_glPixelTransferi; |
| dt.glPixelZoom = emuProcInterceptFilt_glPixelZoom; |
| dt.glPolygonMode = emuProcInterceptFilt_glPolygonMode; |
| dt.glPopGroupMarkerEXT = emuProcInterceptFilt_glPopGroupMarkerEXT; |
| dt.glProgramStringARB = emuProcInterceptFilt_glProgramStringARB; |
| dt.glPushGroupMarkerEXT = emuProcInterceptFilt_glPushGroupMarkerEXT; |
| dt.glRasterPos2d = emuProcInterceptFilt_glRasterPos2d; |
| dt.glRasterPos2dv = emuProcInterceptFilt_glRasterPos2dv; |
| dt.glRasterPos2f = emuProcInterceptFilt_glRasterPos2f; |
| dt.glRasterPos2fv = emuProcInterceptFilt_glRasterPos2fv; |
| dt.glRasterPos2i = emuProcInterceptFilt_glRasterPos2i; |
| dt.glRasterPos2iv = emuProcInterceptFilt_glRasterPos2iv; |
| dt.glRasterPos2s = emuProcInterceptFilt_glRasterPos2s; |
| dt.glRasterPos2sv = emuProcInterceptFilt_glRasterPos2sv; |
| dt.glRasterPos3d = emuProcInterceptFilt_glRasterPos3d; |
| dt.glRasterPos3dv = emuProcInterceptFilt_glRasterPos3dv; |
| dt.glRasterPos3f = emuProcInterceptFilt_glRasterPos3f; |
| dt.glRasterPos3fv = emuProcInterceptFilt_glRasterPos3fv; |
| dt.glRasterPos3i = emuProcInterceptFilt_glRasterPos3i; |
| dt.glRasterPos3iv = emuProcInterceptFilt_glRasterPos3iv; |
| dt.glRasterPos3s = emuProcInterceptFilt_glRasterPos3s; |
| dt.glRasterPos3sv = emuProcInterceptFilt_glRasterPos3sv; |
| dt.glRasterPos4d = emuProcInterceptFilt_glRasterPos4d; |
| dt.glRasterPos4dv = emuProcInterceptFilt_glRasterPos4dv; |
| dt.glRasterPos4f = emuProcInterceptFilt_glRasterPos4f; |
| dt.glRasterPos4fv = emuProcInterceptFilt_glRasterPos4fv; |
| dt.glRasterPos4i = emuProcInterceptFilt_glRasterPos4i; |
| dt.glRasterPos4iv = emuProcInterceptFilt_glRasterPos4iv; |
| dt.glRasterPos4s = emuProcInterceptFilt_glRasterPos4s; |
| dt.glRasterPos4sv = emuProcInterceptFilt_glRasterPos4sv; |
| dt.glReadBuffer = emuProcInterceptFilt_glReadBuffer; |
| dt.glRectd = emuProcInterceptFilt_glRectd; |
| dt.glRectf = emuProcInterceptFilt_glRectf; |
| dt.glRecti = emuProcInterceptFilt_glRecti; |
| dt.glRects = emuProcInterceptFilt_glRects; |
| dt.glRenderMode = emuProcInterceptFilt_glRenderMode; |
| dt.glRenderbufferStorageEXT = emuProcInterceptFilt_glRenderbufferStorageEXT; |
| dt.glShadeModel = emuProcInterceptFilt_glShadeModel; |
| dt.glTexImage1D = emuProcInterceptFilt_glTexImage1D; |
| dt.glTexImage2D = emuProcInterceptFilt_glTexImage2D; |
| dt.glTexImage3D = emuProcInterceptFilt_glTexImage3D; |
| dt.glTexParameterf = emuProcInterceptFilt_glTexParameterf; |
| dt.glTexParameterfv = emuProcInterceptFilt_glTexParameterfv; |
| dt.glTexParameteri = emuProcInterceptFilt_glTexParameteri; |
| dt.glTexParameteriv = emuProcInterceptFilt_glTexParameteriv; |
| dt.glUniform1iARB = emuProcInterceptFilt_glUniform1iARB; |
| dt.glUnmapBuffer = emuProcInterceptFilt_glUnmapBuffer; |
| dt.glUnmapBufferARB = emuProcInterceptFilt_glUnmapBufferARB; |
| dt.glWindowPos2d = emuProcInterceptFilt_glWindowPos2d; |
| dt.glWindowPos2dv = emuProcInterceptFilt_glWindowPos2dv; |
| dt.glWindowPos2f = emuProcInterceptFilt_glWindowPos2f; |
| dt.glWindowPos2fv = emuProcInterceptFilt_glWindowPos2fv; |
| dt.glWindowPos2i = emuProcInterceptFilt_glWindowPos2i; |
| dt.glWindowPos2iv = emuProcInterceptFilt_glWindowPos2iv; |
| dt.glWindowPos2s = emuProcInterceptFilt_glWindowPos2s; |
| dt.glWindowPos2sv = emuProcInterceptFilt_glWindowPos2sv; |
| dt.glWindowPos3d = emuProcInterceptFilt_glWindowPos3d; |
| dt.glWindowPos3dv = emuProcInterceptFilt_glWindowPos3dv; |
| dt.glWindowPos3f = emuProcInterceptFilt_glWindowPos3f; |
| dt.glWindowPos3fv = emuProcInterceptFilt_glWindowPos3fv; |
| dt.glWindowPos3i = emuProcInterceptFilt_glWindowPos3i; |
| dt.glWindowPos3iv = emuProcInterceptFilt_glWindowPos3iv; |
| dt.glWindowPos3s = emuProcInterceptFilt_glWindowPos3s; |
| dt.glWindowPos3sv = emuProcInterceptFilt_glWindowPos3sv; |
| } |
| |
| REGAL_NAMESPACE_END |
| |
| #endif // REGAL_EMULATION |