checkpoint - BaseVertex compiles
This commit is contained in:
parent
35c3a86363
commit
fe33e413a6
4 changed files with 260 additions and 255 deletions
|
|
@ -12,61 +12,61 @@ baseVertexFormulae = {
|
|||
'DrawElements' : {
|
||||
'entries' : [ 'gl(Multi|)Draw(Range|)Elements(Instanced|)BaseVertex(BaseInstance|)' ],
|
||||
'impl' : [
|
||||
'if( _context->bv->gl${m1}Draw${m2}Elements${m3}BaseVertex${m4}( *_context, ${arg0plus} ) ) {',
|
||||
'if( self->gl${m1}Draw${m2}Elements${m3}BaseVertex${m4}( ${arg0plus} ) ) {',
|
||||
' return;',
|
||||
'}',
|
||||
],
|
||||
},
|
||||
'Bind' : {
|
||||
'entries' : [ 'glBind(Vertex|)(Buffer|Array)' ],
|
||||
'prefix' : [ '_context->bv->glBind${m1}${m2}( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->glBind${m1}${m2}( ${arg0plus} );', ],
|
||||
},
|
||||
'EnableDisable' : {
|
||||
'entries' : [ 'gl(Enable|Disable)(ClientState|VertexAttribArray|)(i|Indexed|)(EXT|)' ],
|
||||
'prefix' : [ '_context->bv->gl${m1}${m2}${m3}${m4}( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->gl${m1}${m2}${m3}${m4}( ${arg0plus} );', ],
|
||||
},
|
||||
'Pointer' : {
|
||||
'entries' : [ 'gl(Color|EdgeFlag|FogCoord|Index|Normal|SecondaryColor|TexCoord|Vertex)Pointer' ],
|
||||
'prefix' : [ '_context->bv->gl${m1}Pointer( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->gl${m1}Pointer( ${arg0plus} );', ],
|
||||
},
|
||||
'VertexAttrib' : {
|
||||
'entries' : [ 'glVertexAttrib(I|L|)(Binding|Format)' ],
|
||||
'prefix' : [ '_context->bv->glVertexAttrib${m1}${m2}( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->glVertexAttrib${m1}${m2}( ${arg0plus} );', ],
|
||||
},
|
||||
'MultiTexCoordPointerEXT': {
|
||||
'entries' : [ 'glMultiTexCoordPointerEXT' ],
|
||||
'prefix' : [ '_context->bv->glMultiTexCoordPointerEXT( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->glMultiTexCoordPointerEXT( ${arg0plus} );', ],
|
||||
},
|
||||
'ClientActiveTexture' : {
|
||||
'entries' : [ 'glClientActiveTexture(ARB|)' ],
|
||||
'prefix' : [ '_context->bv->glClientActiveTexture( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->glClientActiveTexture( ${arg0plus} );', ],
|
||||
},
|
||||
'PrimitiveRestartIndex' : {
|
||||
'entries' : [ 'glPrimitiveRestartIndex' ],
|
||||
'prefix' : [ '_context->bv->glPrimitiveRestartIndex( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->glPrimitiveRestartIndex( ${arg0plus} );', ],
|
||||
},
|
||||
'VertexDivisor' : {
|
||||
'entries' : [ 'glVertex(Attrib|Binding)Divisor' ],
|
||||
'prefix' : [ '_context->bv->glVertex${m1}Divisor( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->glVertex${m1}Divisor( ${arg0plus} );', ],
|
||||
},
|
||||
'VertexAttribPointer' : {
|
||||
'entries' : [ 'glVertexAttrib(I|L|)Pointer' ],
|
||||
'prefix' : [ '_context->bv->glVertexAttrib${m1}Pointer( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->glVertexAttrib${m1}Pointer( ${arg0plus} );', ],
|
||||
},
|
||||
'VertexArrayEnable' : {
|
||||
'entries' : [ 'gl(Enable|Disable)VertexArrayEXT' ],
|
||||
'prefix' : [ '_context->bv->gl${m1}VertexArrayEXT( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->gl${m1}VertexArrayEXT( ${arg0plus} );', ],
|
||||
},
|
||||
'VertexArrayAttribEnable' : {
|
||||
'entries' : [ 'gl(Enable|Disable)VertexArrayAttribEXT' ],
|
||||
'prefix' : [ '_context->bv->gl${m1}VertexArrayAttribEXT( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->gl${m1}VertexArrayAttribEXT( ${arg0plus} );', ],
|
||||
},
|
||||
'DsaVertexArrayOffsetCommands' : {
|
||||
'entries' : [ 'glVertexArray(EdgeFlag|Index|Normal|FogCoord|Vertex|Color|TexCoord|SecondaryColor|VertexAttribI|MultiTexCoord|VertexAttrib)OffsetEXT' ],
|
||||
'prefix' : [ '_context->bv->glVertexArray${m1}OffsetEXT( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->glVertexArray${m1}OffsetEXT( ${arg0plus} );', ],
|
||||
},
|
||||
'InterleavedArrays ' : {
|
||||
'entries' : [ 'glInterleavedArrays' ],
|
||||
'prefix' : [ '_context->bv->glInterleavedArrays( ${arg0plus} );', ],
|
||||
'prefix' : [ 'self->glInterleavedArrays( ${arg0plus} );', ],
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,18 +92,18 @@ namespace ClientState
|
|||
inline static void enable(Procs &dt, RegalContext * ctx, const GLenum cap, const GLboolean enable)
|
||||
{
|
||||
if (enable)
|
||||
dt.glEnableClientState(ctx,cap);
|
||||
RglEnableClientState( dt,cap);
|
||||
else
|
||||
dt.glDisableClientState(ctx,cap);
|
||||
RglDisableClientState( dt,cap);
|
||||
}
|
||||
|
||||
template <typename Procs>
|
||||
inline static void enablei(Procs &dt, RegalContext * ctx, const GLenum cap, const GLuint index, const GLboolean enable)
|
||||
{
|
||||
if (enable)
|
||||
dt.glEnableClientStateiEXT(ctx,cap,index);
|
||||
RglEnableClientStateiEXT( dt,cap,index);
|
||||
else
|
||||
dt.glDisableClientStateiEXT(ctx,cap,index);
|
||||
RglDisableClientStateiEXT( dt,cap,index);
|
||||
}
|
||||
|
||||
inline static void enableToString(string_list& tmp, const GLboolean b, const char* bEnum, const char *delim = "\n")
|
||||
|
|
@ -225,29 +225,29 @@ namespace ClientState
|
|||
if (vaInt < 7)
|
||||
{
|
||||
enable(dt,ctx,vaEnum[vaInt][0],enabled);
|
||||
dt.glBindBuffer(ctx, GL_ARRAY_BUFFER,buffer);
|
||||
RglBindBuffer( dt, GL_ARRAY_BUFFER,buffer);
|
||||
switch (vaInt)
|
||||
{
|
||||
case VERTEX:
|
||||
dt.glVertexPointer(ctx, size,type,stride,pointer);
|
||||
RglVertexPointer( dt, size,type,stride,pointer);
|
||||
break;
|
||||
case NORMAL:
|
||||
dt.glNormalPointer(ctx, type,stride,pointer);
|
||||
RglNormalPointer( dt, type,stride,pointer);
|
||||
break;
|
||||
case FOG_COORD:
|
||||
dt.glFogCoordPointer(ctx, type,stride,pointer);
|
||||
RglFogCoordPointer( dt, type,stride,pointer);
|
||||
break;
|
||||
case COLOR:
|
||||
dt.glColorPointer(ctx, size,type,stride,pointer);
|
||||
RglColorPointer( dt, size,type,stride,pointer);
|
||||
break;
|
||||
case SECONDARY_COLOR:
|
||||
dt.glSecondaryColorPointer(ctx, size,type,stride,pointer);
|
||||
RglSecondaryColorPointer( dt, size,type,stride,pointer);
|
||||
break;
|
||||
case INDEX:
|
||||
dt.glIndexPointer(ctx, type,stride,pointer);
|
||||
RglIndexPointer( dt, type,stride,pointer);
|
||||
break;
|
||||
case EDGE_FLAG:
|
||||
dt.glEdgeFlagPointer(ctx, stride,pointer);
|
||||
RglEdgeFlagPointer( dt, stride,pointer);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -257,8 +257,8 @@ namespace ClientState
|
|||
{
|
||||
GLuint index = static_cast<GLuint>(vaInt - 7);
|
||||
enablei(dt,ctx,vaEnum[7][0],index,enabled);
|
||||
dt.glBindBuffer(ctx, GL_ARRAY_BUFFER,buffer);
|
||||
dt.glMultiTexCoordPointerEXT(ctx, GL_TEXTURE0+index,size,type,stride,pointer);
|
||||
RglBindBuffer( dt, GL_ARRAY_BUFFER,buffer);
|
||||
RglMultiTexCoordPointerEXT( dt, GL_TEXTURE0+index,size,type,stride,pointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -284,7 +284,7 @@ namespace ClientState
|
|||
if (buffer != to.buffer)
|
||||
{
|
||||
buffer = to.buffer;
|
||||
dt.glBindBuffer(ctx, GL_ARRAY_BUFFER,buffer);
|
||||
RglBindBuffer( dt, GL_ARRAY_BUFFER,buffer);
|
||||
}
|
||||
if (size != to.size ||
|
||||
type != to.type ||
|
||||
|
|
@ -298,25 +298,25 @@ namespace ClientState
|
|||
switch (vaInt)
|
||||
{
|
||||
case VERTEX:
|
||||
dt.glVertexPointer(ctx, size,type,stride,pointer);
|
||||
RglVertexPointer( dt, size,type,stride,pointer);
|
||||
break;
|
||||
case NORMAL:
|
||||
dt.glNormalPointer(ctx, type,stride,pointer);
|
||||
RglNormalPointer( dt, type,stride,pointer);
|
||||
break;
|
||||
case FOG_COORD:
|
||||
dt.glFogCoordPointer(ctx, type,stride,pointer);
|
||||
RglFogCoordPointer( dt, type,stride,pointer);
|
||||
break;
|
||||
case COLOR:
|
||||
dt.glColorPointer(ctx, size,type,stride,pointer);
|
||||
RglColorPointer( dt, size,type,stride,pointer);
|
||||
break;
|
||||
case SECONDARY_COLOR:
|
||||
dt.glSecondaryColorPointer(ctx, size,type,stride,pointer);
|
||||
RglSecondaryColorPointer( dt, size,type,stride,pointer);
|
||||
break;
|
||||
case INDEX:
|
||||
dt.glIndexPointer(ctx, type,stride,pointer);
|
||||
RglIndexPointer( dt, type,stride,pointer);
|
||||
break;
|
||||
case EDGE_FLAG:
|
||||
dt.glEdgeFlagPointer(ctx, stride,pointer);
|
||||
RglEdgeFlagPointer( dt, stride,pointer);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -334,7 +334,7 @@ namespace ClientState
|
|||
if (buffer != to.buffer)
|
||||
{
|
||||
buffer = to.buffer;
|
||||
dt.glBindBuffer(ctx, GL_ARRAY_BUFFER,buffer);
|
||||
RglBindBuffer( dt, GL_ARRAY_BUFFER,buffer);
|
||||
}
|
||||
if (size != to.size ||
|
||||
type != to.type ||
|
||||
|
|
@ -345,7 +345,7 @@ namespace ClientState
|
|||
type = to.type;
|
||||
stride = to.stride;
|
||||
pointer = to.pointer;
|
||||
dt.glMultiTexCoordPointerEXT(ctx, GL_TEXTURE0+index,size,type,stride,pointer);
|
||||
RglMultiTexCoordPointerEXT( dt, GL_TEXTURE0+index,size,type,stride,pointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -438,10 +438,10 @@ namespace ClientState
|
|||
RegalAssert(index < REGAL_EMU_MAX_VERTEX_ATTRIB_BINDINGS);
|
||||
if (index < REGAL_EMU_MAX_VERTEX_ATTRIB_BINDINGS)
|
||||
{
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,reinterpret_cast<GLint*>(&buffer));
|
||||
dt.glGetVertexAttribPointerv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_POINTER,reinterpret_cast<GLvoid **>(&offset));
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_STRIDE,reinterpret_cast<GLint*>(&stride));
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_DIVISOR,reinterpret_cast<GLint*>(&divisor));
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,reinterpret_cast<GLint*>(&buffer));
|
||||
RglGetVertexAttribPointerv( dt, index,GL_VERTEX_ATTRIB_ARRAY_POINTER,reinterpret_cast<GLvoid **>(&offset));
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_STRIDE,reinterpret_cast<GLint*>(&stride));
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_DIVISOR,reinterpret_cast<GLint*>(&divisor));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -452,8 +452,8 @@ namespace ClientState
|
|||
RegalAssert(index < REGAL_EMU_MAX_VERTEX_ATTRIB_BINDINGS);
|
||||
if (index < REGAL_EMU_MAX_VERTEX_ATTRIB_BINDINGS)
|
||||
{
|
||||
dt.glBindVertexBuffer(ctx, index,buffer,offset,stride);
|
||||
dt.glVertexBindingDivisor(ctx, index,divisor);
|
||||
RglBindVertexBuffer( dt, index,buffer,offset,stride);
|
||||
RglVertexBindingDivisor( dt, index,divisor);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -471,12 +471,12 @@ namespace ClientState
|
|||
buffer = to.buffer;
|
||||
offset = to.offset;
|
||||
stride = to.stride;
|
||||
dt.glBindVertexBuffer(ctx, index,buffer,offset,stride);
|
||||
RglBindVertexBuffer( dt, index,buffer,offset,stride);
|
||||
}
|
||||
if (divisor != to.divisor)
|
||||
{
|
||||
divisor = to.divisor;
|
||||
dt.glVertexBindingDivisor(ctx, index,divisor);
|
||||
RglVertexBindingDivisor( dt, index,divisor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -543,18 +543,18 @@ namespace ClientState
|
|||
{
|
||||
GLint val;
|
||||
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_ENABLED,&val);
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_ENABLED,&val);
|
||||
enabled = static_cast<GLboolean>(val);
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_SIZE,reinterpret_cast<GLint*>(&size));
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_TYPE,reinterpret_cast<GLint*>(&type));
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_RELATIVE_OFFSET,reinterpret_cast<GLint*>(&relativeOffset));
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_NORMALIZED,&val);
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_SIZE,reinterpret_cast<GLint*>(&size));
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_TYPE,reinterpret_cast<GLint*>(&type));
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_RELATIVE_OFFSET,reinterpret_cast<GLint*>(&relativeOffset));
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_NORMALIZED,&val);
|
||||
normalized = static_cast<GLboolean>(val);
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_INTEGER,&val);
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_INTEGER,&val);
|
||||
isInteger = static_cast<GLboolean>(val);
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_LONG,&val);
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_LONG,&val);
|
||||
isLong = static_cast<GLboolean>(val);
|
||||
dt.glGetVertexAttribiv(ctx, index,GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,reinterpret_cast<GLint*>(&bindingIndex));
|
||||
RglGetVertexAttribiv( dt, index,GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,reinterpret_cast<GLint*>(&bindingIndex));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -566,16 +566,16 @@ namespace ClientState
|
|||
if (index < REGAL_EMU_MAX_VERTEX_ATTRIBS)
|
||||
{
|
||||
if (enabled)
|
||||
dt.glEnableVertexAttribArray(ctx, index);
|
||||
RglEnableVertexAttribArray( dt, index);
|
||||
else
|
||||
dt.glDisableVertexAttribArray(ctx, index);
|
||||
RglDisableVertexAttribArray( dt, index);
|
||||
if (isInteger)
|
||||
dt.glVertexAttribIFormat(ctx, index,size,type,relativeOffset);
|
||||
RglVertexAttribIFormat( dt, index,size,type,relativeOffset);
|
||||
else if (isLong)
|
||||
dt.glVertexAttribLFormat(ctx, index,size,type,relativeOffset);
|
||||
RglVertexAttribLFormat( dt, index,size,type,relativeOffset);
|
||||
else
|
||||
dt.glVertexAttribFormat(ctx, index,size,type,normalized,relativeOffset);
|
||||
dt.glVertexAttribBinding(ctx, index,bindingIndex);
|
||||
RglVertexAttribFormat( dt, index,size,type,normalized,relativeOffset);
|
||||
RglVertexAttribBinding( dt, index,bindingIndex);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -590,9 +590,9 @@ namespace ClientState
|
|||
{
|
||||
enabled = to.enabled;
|
||||
if (enabled)
|
||||
dt.glEnableVertexAttribArray(ctx, index);
|
||||
RglEnableVertexAttribArray( dt, index);
|
||||
else
|
||||
dt.glDisableVertexAttribArray(ctx, index);
|
||||
RglDisableVertexAttribArray( dt, index);
|
||||
}
|
||||
if (isInteger != to.isInteger ||
|
||||
isLong != to.isLong ||
|
||||
|
|
@ -609,16 +609,16 @@ namespace ClientState
|
|||
relativeOffset = to.relativeOffset;
|
||||
|
||||
if (isInteger)
|
||||
dt.glVertexAttribIFormat(ctx, index,size,type,relativeOffset);
|
||||
RglVertexAttribIFormat( dt, index,size,type,relativeOffset);
|
||||
else if (isLong)
|
||||
dt.glVertexAttribLFormat(ctx, index,size,type,relativeOffset);
|
||||
RglVertexAttribLFormat( dt, index,size,type,relativeOffset);
|
||||
else
|
||||
dt.glVertexAttribFormat(ctx, index,size,type,normalized,relativeOffset);
|
||||
RglVertexAttribFormat( dt, index,size,type,normalized,relativeOffset);
|
||||
}
|
||||
if (bindingIndex != to.bindingIndex)
|
||||
{
|
||||
bindingIndex = to.bindingIndex;
|
||||
dt.glVertexAttribBinding(ctx, index,bindingIndex);
|
||||
RglVertexAttribBinding( dt, index,bindingIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -730,9 +730,9 @@ namespace ClientState
|
|||
template <typename Procs>
|
||||
VertexArray &get(Procs &dt, RegalContext * ctx)
|
||||
{
|
||||
dt.glGetIntegerv(ctx, GL_VERTEX_ARRAY_BINDING,reinterpret_cast<GLint*>(&vertexArrayBinding));
|
||||
RglGetIntegerv( dt, GL_VERTEX_ARRAY_BINDING,reinterpret_cast<GLint*>(&vertexArrayBinding));
|
||||
if (vertexArrayBinding)
|
||||
dt.glBindVertexArray(ctx, 0);
|
||||
RglBindVertexArray( dt, 0);
|
||||
size_t n = array_size( named );
|
||||
for (size_t ii=0; ii<n; ii++)
|
||||
named[ii].get(dt,static_cast<vaName>(ii));
|
||||
|
|
@ -742,21 +742,21 @@ namespace ClientState
|
|||
n = array_size( generic );
|
||||
for (size_t ii=0; ii<n; ii++)
|
||||
generic[ii].get(dt,static_cast<GLuint>(ii));
|
||||
dt.glGetIntegerv(ctx, GL_ELEMENT_ARRAY_BUFFER_BINDING,reinterpret_cast<GLint*>(&elementArrayBufferBinding));
|
||||
dt.glGetIntegerv(ctx, GL_CLIENT_ACTIVE_TEXTURE,reinterpret_cast<GLint*>(&clientActiveTexture));
|
||||
primitiveRestartFixedIndex = dt.glIsEnabled(ctx, GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
primitiveRestart = dt.glIsEnabled(ctx, GL_PRIMITIVE_RESTART);
|
||||
dt.glGetIntegerv(ctx, GL_PRIMITIVE_RESTART_INDEX,reinterpret_cast<GLint*>(&primitiveRestartIndex));
|
||||
dt.glGetIntegerv(ctx, GL_ARRAY_BUFFER_BINDING,reinterpret_cast<GLint*>(&arrayBufferBinding));
|
||||
RglGetIntegerv( dt, GL_ELEMENT_ARRAY_BUFFER_BINDING,reinterpret_cast<GLint*>(&elementArrayBufferBinding));
|
||||
RglGetIntegerv( dt, GL_CLIENT_ACTIVE_TEXTURE,reinterpret_cast<GLint*>(&clientActiveTexture));
|
||||
primitiveRestartFixedIndex = RglIsEnabled( dt, GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
primitiveRestart = RglIsEnabled( dt, GL_PRIMITIVE_RESTART);
|
||||
RglGetIntegerv( dt, GL_PRIMITIVE_RESTART_INDEX,reinterpret_cast<GLint*>(&primitiveRestartIndex));
|
||||
RglGetIntegerv( dt, GL_ARRAY_BUFFER_BINDING,reinterpret_cast<GLint*>(&arrayBufferBinding));
|
||||
if (vertexArrayBinding)
|
||||
dt.glBindVertexArray(ctx, vertexArrayBinding);
|
||||
RglBindVertexArray( dt, vertexArrayBinding);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Procs>
|
||||
const VertexArray &set(Procs &dt, RegalContext * ctx, bool driverAllowsVertexAttributeArraysWithoutBoundBuffer) const
|
||||
{
|
||||
dt.glBindVertexArray(ctx, 0);
|
||||
RglBindVertexArray( dt, 0);
|
||||
size_t n = array_size( named );
|
||||
for (size_t ii=0; ii<n; ii++)
|
||||
named[n-ii-1].set(dt,ctx,static_cast<vaName>(n-ii-1),driverAllowsVertexAttributeArraysWithoutBoundBuffer);
|
||||
|
|
@ -766,19 +766,19 @@ namespace ClientState
|
|||
n = array_size( generic );
|
||||
for (size_t ii=0; ii<n; ii++)
|
||||
generic[n-ii-1].set(dt,ctx,static_cast<GLuint>(n-ii-1));
|
||||
dt.glBindBuffer(ctx, GL_ELEMENT_ARRAY_BUFFER,elementArrayBufferBinding);
|
||||
dt.glClientActiveTexture(ctx, clientActiveTexture);
|
||||
RglBindBuffer( dt, GL_ELEMENT_ARRAY_BUFFER,elementArrayBufferBinding);
|
||||
RglClientActiveTexture( dt, clientActiveTexture);
|
||||
if (primitiveRestartFixedIndex)
|
||||
dt.glEnable(ctx, GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
RglEnable( dt, GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
else
|
||||
dt.glDisable(ctx, GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
RglDisable( dt, GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
if (primitiveRestart)
|
||||
dt.glEnable(ctx, GL_PRIMITIVE_RESTART);
|
||||
RglEnable( dt, GL_PRIMITIVE_RESTART);
|
||||
else
|
||||
dt.glDisable(ctx, GL_PRIMITIVE_RESTART);
|
||||
dt.glPrimitiveRestartIndex(ctx, primitiveRestartIndex);
|
||||
dt.glBindBuffer(ctx, GL_ARRAY_BUFFER,arrayBufferBinding);
|
||||
dt.glBindVertexArray(ctx, vertexArrayBinding);
|
||||
RglDisable( dt, GL_PRIMITIVE_RESTART);
|
||||
RglPrimitiveRestartIndex( dt, primitiveRestartIndex);
|
||||
RglBindBuffer( dt, GL_ARRAY_BUFFER,arrayBufferBinding);
|
||||
RglBindVertexArray( dt, vertexArrayBinding);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -788,7 +788,7 @@ namespace ClientState
|
|||
GLuint tmpVertexArrayBinding = to.vertexArrayBinding;
|
||||
if (vertexArrayBinding) {
|
||||
vertexArrayBinding = 0;
|
||||
dt.glBindVertexArray(ctx,vertexArrayBinding);
|
||||
RglBindVertexArray( dt,vertexArrayBinding);
|
||||
}
|
||||
size_t n = array_size( named );
|
||||
for (size_t ii=0; ii<n; ii++)
|
||||
|
|
@ -801,37 +801,37 @@ namespace ClientState
|
|||
generic[n-ii-1].transition(dt,ctx,to.generic[n-ii-1],static_cast<GLuint>(n-ii-1));
|
||||
if (elementArrayBufferBinding != to.elementArrayBufferBinding) {
|
||||
elementArrayBufferBinding = to.elementArrayBufferBinding;
|
||||
dt.glBindBuffer(ctx,GL_ELEMENT_ARRAY_BUFFER,elementArrayBufferBinding);
|
||||
RglBindBuffer( dt,GL_ELEMENT_ARRAY_BUFFER,elementArrayBufferBinding);
|
||||
}
|
||||
if (clientActiveTexture != to.clientActiveTexture) {
|
||||
clientActiveTexture = to.clientActiveTexture;
|
||||
dt.glClientActiveTexture(ctx,clientActiveTexture);
|
||||
RglClientActiveTexture( dt,clientActiveTexture);
|
||||
}
|
||||
if (primitiveRestartFixedIndex != to.primitiveRestartFixedIndex) {
|
||||
primitiveRestartFixedIndex = to.primitiveRestartFixedIndex;
|
||||
if (primitiveRestartFixedIndex)
|
||||
dt.glEnable(ctx,GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
RglEnable( dt,GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
else
|
||||
dt.glDisable(ctx,GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
RglDisable( dt,GL_PRIMITIVE_RESTART_FIXED_INDEX);
|
||||
}
|
||||
if (primitiveRestart != to.primitiveRestart) {
|
||||
primitiveRestart = to.primitiveRestart;
|
||||
if (primitiveRestart)
|
||||
dt.glEnable(ctx,GL_PRIMITIVE_RESTART);
|
||||
RglEnable( dt,GL_PRIMITIVE_RESTART);
|
||||
else
|
||||
dt.glDisable(ctx,GL_PRIMITIVE_RESTART);
|
||||
RglDisable( dt,GL_PRIMITIVE_RESTART);
|
||||
}
|
||||
if (primitiveRestartIndex != to.primitiveRestartIndex) {
|
||||
primitiveRestartIndex = to.primitiveRestartIndex;
|
||||
dt.glPrimitiveRestartIndex(ctx,primitiveRestartIndex);
|
||||
RglPrimitiveRestartIndex( dt,primitiveRestartIndex);
|
||||
}
|
||||
if (arrayBufferBinding != to.arrayBufferBinding) {
|
||||
arrayBufferBinding = to.arrayBufferBinding;
|
||||
dt.glBindBuffer(ctx,GL_ARRAY_BUFFER,arrayBufferBinding);
|
||||
RglBindBuffer( dt,GL_ARRAY_BUFFER,arrayBufferBinding);
|
||||
}
|
||||
if (vertexArrayBinding != tmpVertexArrayBinding) {
|
||||
vertexArrayBinding = tmpVertexArrayBinding;
|
||||
dt.glBindVertexArray(ctx,vertexArrayBinding);
|
||||
RglBindVertexArray( dt,vertexArrayBinding);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1800,48 +1800,48 @@ namespace ClientState
|
|||
template <typename Procs>
|
||||
PixelStore &get(Procs &dt, RegalContext * ctx)
|
||||
{
|
||||
dt.glGetBooleanv(ctx, GL_UNPACK_SWAP_BYTES,&unpackSwapBytes);
|
||||
dt.glGetBooleanv(ctx, GL_UNPACK_LSB_FIRST,&unpackLsbFirst);
|
||||
dt.glGetIntegerv(ctx, GL_UNPACK_IMAGE_HEIGHT,&unpackImageHeight);
|
||||
dt.glGetIntegerv(ctx, GL_UNPACK_SKIP_IMAGES,&unpackSkipImages);
|
||||
dt.glGetIntegerv(ctx, GL_UNPACK_ROW_LENGTH,&unpackRowLength);
|
||||
dt.glGetIntegerv(ctx, GL_UNPACK_SKIP_ROWS,&unpackSkipRows);
|
||||
dt.glGetIntegerv(ctx, GL_UNPACK_SKIP_PIXELS,&unpackSkipPixels);
|
||||
dt.glGetIntegerv(ctx, GL_UNPACK_ALIGNMENT,&unpackAlignment);
|
||||
dt.glGetBooleanv(ctx, GL_PACK_SWAP_BYTES,&packSwapBytes);
|
||||
dt.glGetBooleanv(ctx, GL_PACK_LSB_FIRST,&packLsbFirst);
|
||||
dt.glGetIntegerv(ctx, GL_PACK_IMAGE_HEIGHT,&packImageHeight);
|
||||
dt.glGetIntegerv(ctx, GL_PACK_SKIP_IMAGES,&packSkipImages);
|
||||
dt.glGetIntegerv(ctx, GL_PACK_ROW_LENGTH,&packRowLength);
|
||||
dt.glGetIntegerv(ctx, GL_PACK_SKIP_ROWS,&packSkipRows);
|
||||
dt.glGetIntegerv(ctx, GL_PACK_SKIP_PIXELS,&packSkipPixels);
|
||||
dt.glGetIntegerv(ctx, GL_PACK_ALIGNMENT,&packAlignment);
|
||||
dt.glGetIntegerv(ctx, GL_PIXEL_UNPACK_BUFFER_BINDING,reinterpret_cast<GLint*>(&pixelUnpackBufferBinding));
|
||||
dt.glGetIntegerv(ctx, GL_PIXEL_PACK_BUFFER_BINDING,reinterpret_cast<GLint*>(&pixelPackBufferBinding));
|
||||
RglGetBooleanv( dt, GL_UNPACK_SWAP_BYTES,&unpackSwapBytes);
|
||||
RglGetBooleanv( dt, GL_UNPACK_LSB_FIRST,&unpackLsbFirst);
|
||||
RglGetIntegerv( dt, GL_UNPACK_IMAGE_HEIGHT,&unpackImageHeight);
|
||||
RglGetIntegerv( dt, GL_UNPACK_SKIP_IMAGES,&unpackSkipImages);
|
||||
RglGetIntegerv( dt, GL_UNPACK_ROW_LENGTH,&unpackRowLength);
|
||||
RglGetIntegerv( dt, GL_UNPACK_SKIP_ROWS,&unpackSkipRows);
|
||||
RglGetIntegerv( dt, GL_UNPACK_SKIP_PIXELS,&unpackSkipPixels);
|
||||
RglGetIntegerv( dt, GL_UNPACK_ALIGNMENT,&unpackAlignment);
|
||||
RglGetBooleanv( dt, GL_PACK_SWAP_BYTES,&packSwapBytes);
|
||||
RglGetBooleanv( dt, GL_PACK_LSB_FIRST,&packLsbFirst);
|
||||
RglGetIntegerv( dt, GL_PACK_IMAGE_HEIGHT,&packImageHeight);
|
||||
RglGetIntegerv( dt, GL_PACK_SKIP_IMAGES,&packSkipImages);
|
||||
RglGetIntegerv( dt, GL_PACK_ROW_LENGTH,&packRowLength);
|
||||
RglGetIntegerv( dt, GL_PACK_SKIP_ROWS,&packSkipRows);
|
||||
RglGetIntegerv( dt, GL_PACK_SKIP_PIXELS,&packSkipPixels);
|
||||
RglGetIntegerv( dt, GL_PACK_ALIGNMENT,&packAlignment);
|
||||
RglGetIntegerv( dt, GL_PIXEL_UNPACK_BUFFER_BINDING,reinterpret_cast<GLint*>(&pixelUnpackBufferBinding));
|
||||
RglGetIntegerv( dt, GL_PIXEL_PACK_BUFFER_BINDING,reinterpret_cast<GLint*>(&pixelPackBufferBinding));
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <typename Procs>
|
||||
const PixelStore &set(Procs &dt, RegalContext * ctx) const
|
||||
{
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_SWAP_BYTES,unpackSwapBytes);
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_LSB_FIRST,unpackLsbFirst);
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_IMAGE_HEIGHT,unpackImageHeight);
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_SKIP_IMAGES,unpackSkipImages);
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_ROW_LENGTH,unpackRowLength);
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_SKIP_ROWS,unpackSkipRows);
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_SKIP_PIXELS,unpackSkipPixels);
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_ALIGNMENT,unpackAlignment);
|
||||
dt.glPixelStorei(ctx, GL_PACK_SWAP_BYTES,packSwapBytes);
|
||||
dt.glPixelStorei(ctx, GL_PACK_LSB_FIRST,packLsbFirst);
|
||||
dt.glPixelStorei(ctx, GL_PACK_IMAGE_HEIGHT,packImageHeight);
|
||||
dt.glPixelStorei(ctx, GL_PACK_SKIP_IMAGES,packSkipImages);
|
||||
dt.glPixelStorei(ctx, GL_PACK_ROW_LENGTH,packRowLength);
|
||||
dt.glPixelStorei(ctx, GL_PACK_SKIP_ROWS,packSkipRows);
|
||||
dt.glPixelStorei(ctx, GL_PACK_SKIP_PIXELS,packSkipPixels);
|
||||
dt.glPixelStorei(ctx, GL_PACK_ALIGNMENT,packAlignment);
|
||||
dt.glBindBuffer(ctx, GL_PIXEL_UNPACK_BUFFER,pixelUnpackBufferBinding);
|
||||
dt.glBindBuffer(ctx, GL_PIXEL_PACK_BUFFER,pixelPackBufferBinding);
|
||||
RglPixelStorei( dt, GL_UNPACK_SWAP_BYTES,unpackSwapBytes);
|
||||
RglPixelStorei( dt, GL_UNPACK_LSB_FIRST,unpackLsbFirst);
|
||||
RglPixelStorei( dt, GL_UNPACK_IMAGE_HEIGHT,unpackImageHeight);
|
||||
RglPixelStorei( dt, GL_UNPACK_SKIP_IMAGES,unpackSkipImages);
|
||||
RglPixelStorei( dt, GL_UNPACK_ROW_LENGTH,unpackRowLength);
|
||||
RglPixelStorei( dt, GL_UNPACK_SKIP_ROWS,unpackSkipRows);
|
||||
RglPixelStorei( dt, GL_UNPACK_SKIP_PIXELS,unpackSkipPixels);
|
||||
RglPixelStorei( dt, GL_UNPACK_ALIGNMENT,unpackAlignment);
|
||||
RglPixelStorei( dt, GL_PACK_SWAP_BYTES,packSwapBytes);
|
||||
RglPixelStorei( dt, GL_PACK_LSB_FIRST,packLsbFirst);
|
||||
RglPixelStorei( dt, GL_PACK_IMAGE_HEIGHT,packImageHeight);
|
||||
RglPixelStorei( dt, GL_PACK_SKIP_IMAGES,packSkipImages);
|
||||
RglPixelStorei( dt, GL_PACK_ROW_LENGTH,packRowLength);
|
||||
RglPixelStorei( dt, GL_PACK_SKIP_ROWS,packSkipRows);
|
||||
RglPixelStorei( dt, GL_PACK_SKIP_PIXELS,packSkipPixels);
|
||||
RglPixelStorei( dt, GL_PACK_ALIGNMENT,packAlignment);
|
||||
RglBindBuffer( dt, GL_PIXEL_UNPACK_BUFFER,pixelUnpackBufferBinding);
|
||||
RglBindBuffer( dt, GL_PIXEL_PACK_BUFFER,pixelPackBufferBinding);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
@ -1850,75 +1850,75 @@ namespace ClientState
|
|||
{
|
||||
if (unpackSwapBytes != to.unpackSwapBytes) {
|
||||
unpackSwapBytes = to.unpackSwapBytes;
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_SWAP_BYTES,unpackSwapBytes);
|
||||
RglPixelStorei( dt, GL_UNPACK_SWAP_BYTES,unpackSwapBytes);
|
||||
}
|
||||
if (unpackLsbFirst != to.unpackLsbFirst) {
|
||||
unpackLsbFirst = to.unpackLsbFirst;
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_LSB_FIRST,unpackLsbFirst);
|
||||
RglPixelStorei( dt, GL_UNPACK_LSB_FIRST,unpackLsbFirst);
|
||||
}
|
||||
if (unpackImageHeight != to.unpackImageHeight) {
|
||||
unpackImageHeight = to.unpackImageHeight;
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_IMAGE_HEIGHT,unpackImageHeight);
|
||||
RglPixelStorei( dt, GL_UNPACK_IMAGE_HEIGHT,unpackImageHeight);
|
||||
}
|
||||
if (unpackSkipImages != to.unpackSkipImages) {
|
||||
unpackSkipImages = to.unpackSkipImages;
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_SKIP_IMAGES,unpackSkipImages);
|
||||
RglPixelStorei( dt, GL_UNPACK_SKIP_IMAGES,unpackSkipImages);
|
||||
}
|
||||
if (unpackRowLength != to.unpackRowLength) {
|
||||
unpackRowLength = to.unpackRowLength;
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_ROW_LENGTH,unpackRowLength);
|
||||
RglPixelStorei( dt, GL_UNPACK_ROW_LENGTH,unpackRowLength);
|
||||
}
|
||||
if (unpackSkipRows != to.unpackSkipRows) {
|
||||
unpackSkipRows = to.unpackSkipRows;
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_SKIP_ROWS,unpackSkipRows);
|
||||
RglPixelStorei( dt, GL_UNPACK_SKIP_ROWS,unpackSkipRows);
|
||||
}
|
||||
if (unpackSkipPixels != to.unpackSkipPixels) {
|
||||
unpackSkipPixels = to.unpackSkipPixels;
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_SKIP_PIXELS,unpackSkipPixels);
|
||||
RglPixelStorei( dt, GL_UNPACK_SKIP_PIXELS,unpackSkipPixels);
|
||||
}
|
||||
if (unpackAlignment != to.unpackAlignment) {
|
||||
unpackAlignment = to.unpackAlignment;
|
||||
dt.glPixelStorei(ctx, GL_UNPACK_ALIGNMENT,unpackAlignment);
|
||||
RglPixelStorei( dt, GL_UNPACK_ALIGNMENT,unpackAlignment);
|
||||
}
|
||||
if (packSwapBytes != to.packSwapBytes) {
|
||||
packSwapBytes = to.packSwapBytes;
|
||||
dt.glPixelStorei(ctx, GL_PACK_SWAP_BYTES,packSwapBytes);
|
||||
RglPixelStorei( dt, GL_PACK_SWAP_BYTES,packSwapBytes);
|
||||
}
|
||||
if (packLsbFirst != to.packLsbFirst) {
|
||||
packLsbFirst = to.packLsbFirst;
|
||||
dt.glPixelStorei(ctx, GL_PACK_LSB_FIRST,packLsbFirst);
|
||||
RglPixelStorei( dt, GL_PACK_LSB_FIRST,packLsbFirst);
|
||||
}
|
||||
if (packImageHeight != to.packImageHeight) {
|
||||
packImageHeight = to.packImageHeight;
|
||||
dt.glPixelStorei(ctx, GL_PACK_IMAGE_HEIGHT,packImageHeight);
|
||||
RglPixelStorei( dt, GL_PACK_IMAGE_HEIGHT,packImageHeight);
|
||||
}
|
||||
if (packSkipImages != to.packSkipImages) {
|
||||
packSkipImages = to.packSkipImages;
|
||||
dt.glPixelStorei(ctx, GL_PACK_SKIP_IMAGES,packSkipImages);
|
||||
RglPixelStorei( dt, GL_PACK_SKIP_IMAGES,packSkipImages);
|
||||
}
|
||||
if (packRowLength != to.packRowLength) {
|
||||
packRowLength = to.packRowLength;
|
||||
dt.glPixelStorei(ctx, GL_PACK_ROW_LENGTH,packRowLength);
|
||||
RglPixelStorei( dt, GL_PACK_ROW_LENGTH,packRowLength);
|
||||
}
|
||||
if (packSkipRows != to.packSkipRows) {
|
||||
packSkipRows = to.packSkipRows;
|
||||
dt.glPixelStorei(ctx, GL_PACK_SKIP_ROWS,packSkipRows);
|
||||
RglPixelStorei( dt, GL_PACK_SKIP_ROWS,packSkipRows);
|
||||
}
|
||||
if (packSkipPixels != to.packSkipPixels) {
|
||||
packSkipPixels = to.packSkipPixels;
|
||||
dt.glPixelStorei(ctx, GL_PACK_SKIP_PIXELS,packSkipPixels);
|
||||
RglPixelStorei( dt, GL_PACK_SKIP_PIXELS,packSkipPixels);
|
||||
}
|
||||
if (packAlignment != to.packAlignment) {
|
||||
packAlignment = to.packAlignment;
|
||||
dt.glPixelStorei(ctx, GL_PACK_ALIGNMENT,packAlignment);
|
||||
RglPixelStorei( dt, GL_PACK_ALIGNMENT,packAlignment);
|
||||
}
|
||||
if (pixelUnpackBufferBinding != to.pixelUnpackBufferBinding) {
|
||||
pixelUnpackBufferBinding = to.pixelUnpackBufferBinding;
|
||||
dt.glBindBuffer(ctx, GL_PIXEL_UNPACK_BUFFER,pixelUnpackBufferBinding);
|
||||
RglBindBuffer( dt, GL_PIXEL_UNPACK_BUFFER,pixelUnpackBufferBinding);
|
||||
}
|
||||
if (pixelPackBufferBinding != to.pixelPackBufferBinding) {
|
||||
pixelPackBufferBinding = to.pixelPackBufferBinding;
|
||||
dt.glBindBuffer(ctx, GL_PIXEL_PACK_BUFFER,pixelPackBufferBinding);
|
||||
RglBindBuffer( dt, GL_PIXEL_PACK_BUFFER,pixelPackBufferBinding);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ REGAL_GLOBAL_BEGIN
|
|||
#include "RegalEmu.h"
|
||||
#include "RegalContext.h"
|
||||
#include "RegalContextInfo.h"
|
||||
#include "RegalEmuProcsBaseVertex.h"
|
||||
#include "BaseVertexProcs.h"
|
||||
|
||||
REGAL_GLOBAL_END
|
||||
|
||||
|
|
@ -64,22 +64,27 @@ REGAL_NAMESPACE_BEGIN
|
|||
|
||||
namespace Emu {
|
||||
|
||||
struct BaseVertex : public ClientState::VertexArray
|
||||
struct BaseVertex : public Layer, public ClientState::VertexArray
|
||||
{
|
||||
EmuProcsOriginateBaseVertex orig;
|
||||
BaseVertex( RegalContext * ctx ) : Layer( ctx ) {}
|
||||
|
||||
void Init(RegalContext &ctx)
|
||||
{
|
||||
orig.Initialize( ctx.dispatchGL );
|
||||
EmuProcsInterceptBaseVertex( ctx.dispatchGL );
|
||||
virtual std::string GetName() { return "bv"; }
|
||||
|
||||
virtual void ResetInterception() {
|
||||
RegalContext * ctx = GetContext();
|
||||
orig.Initialize( ctx->dispatchGL );
|
||||
BaseVertexIntercept( this, ctx->dispatchGL );
|
||||
}
|
||||
|
||||
virtual bool Initialize( const std::string & instanceInfo ) {
|
||||
ResetInterception();
|
||||
return true;
|
||||
}
|
||||
|
||||
void Cleanup(RegalContext &ctx)
|
||||
{
|
||||
UNUSED_PARAMETER(ctx);
|
||||
}
|
||||
|
||||
void adjust(RegalContext &ctx, EmuProcsOriginateBaseVertex &orig, GLint basevertex)
|
||||
|
||||
BaseVertexOriginate orig;
|
||||
|
||||
void adjust(GLint basevertex)
|
||||
{
|
||||
UNUSED_PARAMETER(ctx);
|
||||
|
||||
|
|
@ -95,7 +100,7 @@ struct BaseVertex : public ClientState::VertexArray
|
|||
if (currentVBO != n.buffer)
|
||||
{
|
||||
currentVBO = n.buffer;
|
||||
orig.glBindBuffer( &ctx, GL_ARRAY_BUFFER, currentVBO);
|
||||
RglBindBuffer( orig, GL_ARRAY_BUFFER, currentVBO);
|
||||
}
|
||||
|
||||
if (ii < 7)
|
||||
|
|
@ -103,25 +108,25 @@ struct BaseVertex : public ClientState::VertexArray
|
|||
switch (ii)
|
||||
{
|
||||
case ClientState::VERTEX:
|
||||
orig.glVertexPointer(&ctx, n.size, n.type, n.stride, n.pointer);
|
||||
RglVertexPointer( orig, n.size, n.type, n.stride, n.pointer);
|
||||
break;
|
||||
case ClientState::NORMAL:
|
||||
orig.glNormalPointer(&ctx, n.type, n.stride, n.pointer);
|
||||
RglNormalPointer( orig, n.type, n.stride, n.pointer);
|
||||
break;
|
||||
case ClientState::FOG_COORD:
|
||||
orig.glFogCoordPointer(&ctx, n.type, n.stride, n.pointer);
|
||||
RglFogCoordPointer( orig, n.type, n.stride, n.pointer);
|
||||
break;
|
||||
case ClientState::COLOR:
|
||||
orig.glColorPointer(&ctx, n.size, n.type, n.stride, n.pointer);
|
||||
RglColorPointer( orig, n.size, n.type, n.stride, n.pointer);
|
||||
break;
|
||||
case ClientState::SECONDARY_COLOR:
|
||||
orig.glSecondaryColorPointer(&ctx, n.size, n.type, n.stride, n.pointer);
|
||||
RglSecondaryColorPointer( orig, n.size, n.type, n.stride, n.pointer);
|
||||
break;
|
||||
case ClientState::INDEX:
|
||||
orig.glIndexPointer(&ctx, n.type, n.stride, n.pointer);
|
||||
RglIndexPointer( orig, n.type, n.stride, n.pointer);
|
||||
break;
|
||||
case ClientState::EDGE_FLAG:
|
||||
orig.glEdgeFlagPointer(&ctx, n.stride, n.pointer);
|
||||
RglEdgeFlagPointer( orig, n.stride, n.pointer);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -130,7 +135,7 @@ struct BaseVertex : public ClientState::VertexArray
|
|||
else
|
||||
{
|
||||
GLuint index = static_cast<GLuint>(ii - 7);
|
||||
orig.glMultiTexCoordPointerEXT(&ctx, GL_TEXTURE0+index, n.size, n.type, n.stride, n.pointer);
|
||||
RglMultiTexCoordPointerEXT( orig, GL_TEXTURE0+index, n.size, n.type, n.stride, n.pointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -149,72 +154,72 @@ struct BaseVertex : public ClientState::VertexArray
|
|||
if (currentVBO != b.buffer)
|
||||
{
|
||||
currentVBO = b.buffer;
|
||||
orig.glBindBuffer(&ctx, GL_ARRAY_BUFFER, currentVBO);
|
||||
RglBindBuffer( orig, GL_ARRAY_BUFFER, currentVBO);
|
||||
}
|
||||
|
||||
GLsizei index = static_cast<GLsizei>(ii);
|
||||
if (g.isInteger)
|
||||
orig.glVertexAttribIPointer(&ctx, index, g.size, g.type, b.stride, p);
|
||||
RglVertexAttribIPointer( orig, index, g.size, g.type, b.stride, p);
|
||||
else if (g.isLong)
|
||||
orig.glVertexAttribLPointer(&ctx, index, g.size, g.type, b.stride, p);
|
||||
RglVertexAttribLPointer( orig, index, g.size, g.type, b.stride, p);
|
||||
else
|
||||
orig.glVertexAttribPointer(&ctx, index, g.size, g.type, g.normalized, b.stride, p);
|
||||
RglVertexAttribPointer( orig, index, g.size, g.type, g.normalized, b.stride, p);
|
||||
}
|
||||
}
|
||||
|
||||
if (currentVBO != ClientState::VertexArray::arrayBufferBinding)
|
||||
orig.glBindBuffer(&ctx, GL_ARRAY_BUFFER, ClientState::VertexArray::arrayBufferBinding);
|
||||
RglBindBuffer( orig, GL_ARRAY_BUFFER, ClientState::VertexArray::arrayBufferBinding);
|
||||
}
|
||||
|
||||
bool glDrawElementsBaseVertex(RegalContext &ctx, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
|
||||
bool glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
|
||||
{
|
||||
if (basevertex)
|
||||
adjust(ctx, orig, basevertex);
|
||||
orig.glDrawElements(&ctx, mode, count, type, indices);
|
||||
adjust( basevertex);
|
||||
RglDrawElements( orig, mode, count, type, indices);
|
||||
if (basevertex)
|
||||
adjust(ctx, orig, 0);
|
||||
adjust( 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool glDrawRangeElementsBaseVertex(RegalContext &ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
|
||||
bool glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)
|
||||
{
|
||||
if (basevertex)
|
||||
adjust(ctx, orig, basevertex);
|
||||
orig.glDrawRangeElements(&ctx, mode, start, end, count, type, indices);
|
||||
adjust( basevertex);
|
||||
RglDrawRangeElements( orig, mode, start, end, count, type, indices);
|
||||
if (basevertex)
|
||||
adjust(ctx, orig, 0);
|
||||
adjust( 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool glDrawElementsInstancedBaseVertex(RegalContext &ctx, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex)
|
||||
bool glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex)
|
||||
{
|
||||
if (basevertex)
|
||||
adjust(ctx, orig, basevertex);
|
||||
orig.glDrawElementsInstanced(&ctx, mode, count, type, indices, primcount);
|
||||
adjust( basevertex);
|
||||
RglDrawElementsInstanced( orig, mode, count, type, indices, primcount);
|
||||
if (basevertex)
|
||||
adjust(ctx, orig, 0);
|
||||
adjust( 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool glDrawElementsInstancedBaseVertexBaseInstance(RegalContext &ctx, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance)
|
||||
bool glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount, GLint basevertex, GLuint baseinstance)
|
||||
{
|
||||
if (basevertex)
|
||||
adjust(ctx, orig, basevertex);
|
||||
orig.glDrawElementsInstancedBaseInstance(&ctx, mode, count, type, indices, primcount, baseinstance);
|
||||
adjust( basevertex);
|
||||
RglDrawElementsInstancedBaseInstance( orig, mode, count, type, indices, primcount, baseinstance);
|
||||
if (basevertex)
|
||||
adjust(ctx, orig, 0);
|
||||
adjust( 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool glMultiDrawElementsBaseVertex(RegalContext &ctx, GLenum mode, const GLsizei *count, GLenum type, const GLvoid * const* indices, GLsizei primcount, const GLint *basevertex)
|
||||
bool glMultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, GLenum type, const GLvoid * const* indices, GLsizei primcount, const GLint *basevertex)
|
||||
{
|
||||
for (GLsizei ii=0; ii<primcount; ii++)
|
||||
{
|
||||
if (basevertex[ii])
|
||||
adjust(ctx, orig, basevertex[ii]);
|
||||
orig.glDrawElements(&ctx, mode, count[ii], type, indices[ii]);
|
||||
adjust( basevertex[ii]);
|
||||
RglDrawElements( orig, mode, count[ii], type, indices[ii]);
|
||||
if (basevertex[ii])
|
||||
adjust(ctx, orig, 0);
|
||||
adjust( 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ static void REGAL_CALL bv_glBindBuffer(Layer *_layer, GLenum target, GLuint buff
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glBindBuffer( target, buffer );
|
||||
self->glBindBuffer( target, buffer );
|
||||
|
||||
RglBindBuffer( orig, target, buffer );
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ static void REGAL_CALL bv_glBindVertexArray(Layer *_layer, GLuint array)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glBindVertexArray( array );
|
||||
self->glBindVertexArray( array );
|
||||
|
||||
RglBindVertexArray( orig, array );
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ static void REGAL_CALL bv_glBindVertexBuffer(Layer *_layer, GLuint bindingindex,
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glBindVertexBuffer( bindingindex, buffer, offset, stride );
|
||||
self->glBindVertexBuffer( bindingindex, buffer, offset, stride );
|
||||
|
||||
RglBindVertexBuffer( orig, bindingindex, buffer, offset, stride );
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ static void REGAL_CALL bv_glClientActiveTexture(Layer *_layer, GLenum texture)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glClientActiveTexture( texture );
|
||||
self->glClientActiveTexture( texture );
|
||||
|
||||
RglClientActiveTexture( orig, texture );
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ static void REGAL_CALL bv_glClientActiveTextureARB(Layer *_layer, GLenum texture
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glClientActiveTexture( texture );
|
||||
self->glClientActiveTexture( texture );
|
||||
|
||||
RglClientActiveTextureARB( orig, texture );
|
||||
|
||||
|
|
@ -128,7 +128,7 @@ static void REGAL_CALL bv_glColorPointer(Layer *_layer, GLint size, GLenum type,
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glColorPointer( size, type, stride, pointer );
|
||||
self->glColorPointer( size, type, stride, pointer );
|
||||
|
||||
RglColorPointer( orig, size, type, stride, pointer );
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ static void REGAL_CALL bv_glDisable(Layer *_layer, GLenum cap)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glDisable( cap );
|
||||
self->glDisable( cap );
|
||||
|
||||
RglDisable( orig, cap );
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ static void REGAL_CALL bv_glDisableClientState(Layer *_layer, GLenum cap)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glDisableClientState( cap );
|
||||
self->glDisableClientState( cap );
|
||||
|
||||
RglDisableClientState( orig, cap );
|
||||
|
||||
|
|
@ -167,7 +167,7 @@ static void REGAL_CALL bv_glDisableClientStateIndexedEXT(Layer *_layer, GLenum a
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glDisableClientStateIndexedEXT( array, index );
|
||||
self->glDisableClientStateIndexedEXT( array, index );
|
||||
|
||||
RglDisableClientStateIndexedEXT( orig, array, index );
|
||||
|
||||
|
|
@ -180,7 +180,7 @@ static void REGAL_CALL bv_glDisableClientStateiEXT(Layer *_layer, GLenum array,
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glDisableClientStateiEXT( array, index );
|
||||
self->glDisableClientStateiEXT( array, index );
|
||||
|
||||
RglDisableClientStateiEXT( orig, array, index );
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ static void REGAL_CALL bv_glDisableIndexedEXT(Layer *_layer, GLenum target, GLui
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glDisableIndexedEXT( target, index );
|
||||
self->glDisableIndexedEXT( target, index );
|
||||
|
||||
RglDisableIndexedEXT( orig, target, index );
|
||||
|
||||
|
|
@ -206,7 +206,7 @@ static void REGAL_CALL bv_glDisableVertexArrayAttribEXT(Layer *_layer, GLuint va
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glDisableVertexArrayAttribEXT( vaobj, array );
|
||||
self->glDisableVertexArrayAttribEXT( vaobj, array );
|
||||
|
||||
RglDisableVertexArrayAttribEXT( orig, vaobj, array );
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ static void REGAL_CALL bv_glDisableVertexArrayEXT(Layer *_layer, GLuint vaobj, G
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glDisableVertexArrayEXT( vaobj, array );
|
||||
self->glDisableVertexArrayEXT( vaobj, array );
|
||||
|
||||
RglDisableVertexArrayEXT( orig, vaobj, array );
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ static void REGAL_CALL bv_glDisableVertexAttribArray(Layer *_layer, GLuint index
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glDisableVertexAttribArray( index );
|
||||
self->glDisableVertexAttribArray( index );
|
||||
|
||||
RglDisableVertexAttribArray( orig, index );
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ static void REGAL_CALL bv_glDisablei(Layer *_layer, GLenum cap, GLuint index)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glDisablei( cap, index );
|
||||
self->glDisablei( cap, index );
|
||||
|
||||
RglDisablei( orig, cap, index );
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ static void REGAL_CALL bv_glDrawElementsBaseVertex(Layer *_layer, GLenum mode, G
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// impl
|
||||
if( _context->bv->glDrawElementsBaseVertex( *_context, mode, count, type, indices, basevertex ) ) {
|
||||
if( self->glDrawElementsBaseVertex( mode, count, type, indices, basevertex ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ static void REGAL_CALL bv_glDrawElementsInstancedBaseVertex(Layer *_layer, GLenu
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// impl
|
||||
if( _context->bv->glDrawElementsInstancedBaseVertex( *_context, mode, count, type, indices, primcount, basevertex ) ) {
|
||||
if( self->glDrawElementsInstancedBaseVertex( mode, count, type, indices, primcount, basevertex ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -288,7 +288,7 @@ static void REGAL_CALL bv_glDrawElementsInstancedBaseVertexBaseInstance(Layer *_
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// impl
|
||||
if( _context->bv->glDrawElementsInstancedBaseVertexBaseInstance( *_context, mode, count, type, indices, primcount, basevertex, baseinstance ) ) {
|
||||
if( self->glDrawElementsInstancedBaseVertexBaseInstance( mode, count, type, indices, primcount, basevertex, baseinstance ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -303,7 +303,7 @@ static void REGAL_CALL bv_glDrawRangeElementsBaseVertex(Layer *_layer, GLenum mo
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// impl
|
||||
if( _context->bv->glDrawRangeElementsBaseVertex( *_context, mode, start, end, count, type, indices, basevertex ) ) {
|
||||
if( self->glDrawRangeElementsBaseVertex( mode, start, end, count, type, indices, basevertex ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -318,7 +318,7 @@ static void REGAL_CALL bv_glEdgeFlagPointer(Layer *_layer, GLsizei stride, const
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEdgeFlagPointer( stride, pointer );
|
||||
self->glEdgeFlagPointer( stride, pointer );
|
||||
|
||||
RglEdgeFlagPointer( orig, stride, pointer );
|
||||
|
||||
|
|
@ -331,7 +331,7 @@ static void REGAL_CALL bv_glEnable(Layer *_layer, GLenum cap)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEnable( cap );
|
||||
self->glEnable( cap );
|
||||
|
||||
RglEnable( orig, cap );
|
||||
|
||||
|
|
@ -344,7 +344,7 @@ static void REGAL_CALL bv_glEnableClientState(Layer *_layer, GLenum cap)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEnableClientState( cap );
|
||||
self->glEnableClientState( cap );
|
||||
|
||||
RglEnableClientState( orig, cap );
|
||||
|
||||
|
|
@ -357,7 +357,7 @@ static void REGAL_CALL bv_glEnableClientStateIndexedEXT(Layer *_layer, GLenum ar
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEnableClientStateIndexedEXT( array, index );
|
||||
self->glEnableClientStateIndexedEXT( array, index );
|
||||
|
||||
RglEnableClientStateIndexedEXT( orig, array, index );
|
||||
|
||||
|
|
@ -370,7 +370,7 @@ static void REGAL_CALL bv_glEnableClientStateiEXT(Layer *_layer, GLenum array, G
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEnableClientStateiEXT( array, index );
|
||||
self->glEnableClientStateiEXT( array, index );
|
||||
|
||||
RglEnableClientStateiEXT( orig, array, index );
|
||||
|
||||
|
|
@ -383,7 +383,7 @@ static void REGAL_CALL bv_glEnableIndexedEXT(Layer *_layer, GLenum target, GLuin
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEnableIndexedEXT( target, index );
|
||||
self->glEnableIndexedEXT( target, index );
|
||||
|
||||
RglEnableIndexedEXT( orig, target, index );
|
||||
|
||||
|
|
@ -396,7 +396,7 @@ static void REGAL_CALL bv_glEnableVertexArrayAttribEXT(Layer *_layer, GLuint vao
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEnableVertexArrayAttribEXT( vaobj, array );
|
||||
self->glEnableVertexArrayAttribEXT( vaobj, array );
|
||||
|
||||
RglEnableVertexArrayAttribEXT( orig, vaobj, array );
|
||||
|
||||
|
|
@ -409,7 +409,7 @@ static void REGAL_CALL bv_glEnableVertexArrayEXT(Layer *_layer, GLuint vaobj, GL
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEnableVertexArrayEXT( vaobj, array );
|
||||
self->glEnableVertexArrayEXT( vaobj, array );
|
||||
|
||||
RglEnableVertexArrayEXT( orig, vaobj, array );
|
||||
|
||||
|
|
@ -422,7 +422,7 @@ static void REGAL_CALL bv_glEnableVertexAttribArray(Layer *_layer, GLuint index)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEnableVertexAttribArray( index );
|
||||
self->glEnableVertexAttribArray( index );
|
||||
|
||||
RglEnableVertexAttribArray( orig, index );
|
||||
|
||||
|
|
@ -435,7 +435,7 @@ static void REGAL_CALL bv_glEnablei(Layer *_layer, GLenum cap, GLuint index)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glEnablei( cap, index );
|
||||
self->glEnablei( cap, index );
|
||||
|
||||
RglEnablei( orig, cap, index );
|
||||
|
||||
|
|
@ -448,7 +448,7 @@ static void REGAL_CALL bv_glFogCoordPointer(Layer *_layer, GLenum type, GLsizei
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glFogCoordPointer( type, stride, pointer );
|
||||
self->glFogCoordPointer( type, stride, pointer );
|
||||
|
||||
RglFogCoordPointer( orig, type, stride, pointer );
|
||||
|
||||
|
|
@ -461,7 +461,7 @@ static void REGAL_CALL bv_glIndexPointer(Layer *_layer, GLenum type, GLsizei str
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glIndexPointer( type, stride, pointer );
|
||||
self->glIndexPointer( type, stride, pointer );
|
||||
|
||||
RglIndexPointer( orig, type, stride, pointer );
|
||||
|
||||
|
|
@ -474,7 +474,7 @@ static void REGAL_CALL bv_glInterleavedArrays(Layer *_layer, GLenum format, GLsi
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glInterleavedArrays( format, stride, pointer );
|
||||
self->glInterleavedArrays( format, stride, pointer );
|
||||
|
||||
RglInterleavedArrays( orig, format, stride, pointer );
|
||||
|
||||
|
|
@ -487,7 +487,7 @@ static void REGAL_CALL bv_glMultiDrawElementsBaseVertex(Layer *_layer, GLenum mo
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// impl
|
||||
if( _context->bv->glMultiDrawElementsBaseVertex( *_context, mode, count, type, indices, primcount, basevertex ) ) {
|
||||
if( self->glMultiDrawElementsBaseVertex( mode, count, type, indices, primcount, basevertex ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ static void REGAL_CALL bv_glMultiTexCoordPointerEXT(Layer *_layer, GLenum texuni
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glMultiTexCoordPointerEXT( texunit, size, type, stride, pointer );
|
||||
self->glMultiTexCoordPointerEXT( texunit, size, type, stride, pointer );
|
||||
|
||||
RglMultiTexCoordPointerEXT( orig, texunit, size, type, stride, pointer );
|
||||
|
||||
|
|
@ -515,7 +515,7 @@ static void REGAL_CALL bv_glNormalPointer(Layer *_layer, GLenum type, GLsizei st
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glNormalPointer( type, stride, pointer );
|
||||
self->glNormalPointer( type, stride, pointer );
|
||||
|
||||
RglNormalPointer( orig, type, stride, pointer );
|
||||
|
||||
|
|
@ -528,7 +528,7 @@ static void REGAL_CALL bv_glPrimitiveRestartIndex(Layer *_layer, GLuint index)
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glPrimitiveRestartIndex( index );
|
||||
self->glPrimitiveRestartIndex( index );
|
||||
|
||||
RglPrimitiveRestartIndex( orig, index );
|
||||
|
||||
|
|
@ -541,7 +541,7 @@ static void REGAL_CALL bv_glSecondaryColorPointer(Layer *_layer, GLint size, GLe
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glSecondaryColorPointer( size, type, stride, pointer );
|
||||
self->glSecondaryColorPointer( size, type, stride, pointer );
|
||||
|
||||
RglSecondaryColorPointer( orig, size, type, stride, pointer );
|
||||
|
||||
|
|
@ -554,7 +554,7 @@ static void REGAL_CALL bv_glTexCoordPointer(Layer *_layer, GLint size, GLenum ty
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glTexCoordPointer( size, type, stride, pointer );
|
||||
self->glTexCoordPointer( size, type, stride, pointer );
|
||||
|
||||
RglTexCoordPointer( orig, size, type, stride, pointer );
|
||||
|
||||
|
|
@ -567,7 +567,7 @@ static void REGAL_CALL bv_glVertexArrayColorOffsetEXT(Layer *_layer, GLuint vaob
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayColorOffsetEXT( vaobj, buffer, size, type, stride, offset );
|
||||
self->glVertexArrayColorOffsetEXT( vaobj, buffer, size, type, stride, offset );
|
||||
|
||||
RglVertexArrayColorOffsetEXT( orig, vaobj, buffer, size, type, stride, offset );
|
||||
|
||||
|
|
@ -580,7 +580,7 @@ static void REGAL_CALL bv_glVertexArrayEdgeFlagOffsetEXT(Layer *_layer, GLuint v
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayEdgeFlagOffsetEXT( vaobj, buffer, stride, offset );
|
||||
self->glVertexArrayEdgeFlagOffsetEXT( vaobj, buffer, stride, offset );
|
||||
|
||||
RglVertexArrayEdgeFlagOffsetEXT( orig, vaobj, buffer, stride, offset );
|
||||
|
||||
|
|
@ -593,7 +593,7 @@ static void REGAL_CALL bv_glVertexArrayFogCoordOffsetEXT(Layer *_layer, GLuint v
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayFogCoordOffsetEXT( vaobj, buffer, type, stride, offset );
|
||||
self->glVertexArrayFogCoordOffsetEXT( vaobj, buffer, type, stride, offset );
|
||||
|
||||
RglVertexArrayFogCoordOffsetEXT( orig, vaobj, buffer, type, stride, offset );
|
||||
|
||||
|
|
@ -606,7 +606,7 @@ static void REGAL_CALL bv_glVertexArrayIndexOffsetEXT(Layer *_layer, GLuint vaob
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayIndexOffsetEXT( vaobj, buffer, type, stride, offset );
|
||||
self->glVertexArrayIndexOffsetEXT( vaobj, buffer, type, stride, offset );
|
||||
|
||||
RglVertexArrayIndexOffsetEXT( orig, vaobj, buffer, type, stride, offset );
|
||||
|
||||
|
|
@ -619,7 +619,7 @@ static void REGAL_CALL bv_glVertexArrayMultiTexCoordOffsetEXT(Layer *_layer, GLu
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayMultiTexCoordOffsetEXT( vaobj, buffer, texunit, size, type, stride, offset );
|
||||
self->glVertexArrayMultiTexCoordOffsetEXT( vaobj, buffer, texunit, size, type, stride, offset );
|
||||
|
||||
RglVertexArrayMultiTexCoordOffsetEXT( orig, vaobj, buffer, texunit, size, type, stride, offset );
|
||||
|
||||
|
|
@ -632,7 +632,7 @@ static void REGAL_CALL bv_glVertexArrayNormalOffsetEXT(Layer *_layer, GLuint vao
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayNormalOffsetEXT( vaobj, buffer, type, stride, offset );
|
||||
self->glVertexArrayNormalOffsetEXT( vaobj, buffer, type, stride, offset );
|
||||
|
||||
RglVertexArrayNormalOffsetEXT( orig, vaobj, buffer, type, stride, offset );
|
||||
|
||||
|
|
@ -645,7 +645,7 @@ static void REGAL_CALL bv_glVertexArraySecondaryColorOffsetEXT(Layer *_layer, GL
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArraySecondaryColorOffsetEXT( vaobj, buffer, size, type, stride, offset );
|
||||
self->glVertexArraySecondaryColorOffsetEXT( vaobj, buffer, size, type, stride, offset );
|
||||
|
||||
RglVertexArraySecondaryColorOffsetEXT( orig, vaobj, buffer, size, type, stride, offset );
|
||||
|
||||
|
|
@ -658,7 +658,7 @@ static void REGAL_CALL bv_glVertexArrayTexCoordOffsetEXT(Layer *_layer, GLuint v
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayTexCoordOffsetEXT( vaobj, buffer, size, type, stride, offset );
|
||||
self->glVertexArrayTexCoordOffsetEXT( vaobj, buffer, size, type, stride, offset );
|
||||
|
||||
RglVertexArrayTexCoordOffsetEXT( orig, vaobj, buffer, size, type, stride, offset );
|
||||
|
||||
|
|
@ -671,7 +671,7 @@ static void REGAL_CALL bv_glVertexArrayVertexAttribIOffsetEXT(Layer *_layer, GLu
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayVertexAttribIOffsetEXT( vaobj, buffer, index, size, type, stride, offset );
|
||||
self->glVertexArrayVertexAttribIOffsetEXT( vaobj, buffer, index, size, type, stride, offset );
|
||||
|
||||
RglVertexArrayVertexAttribIOffsetEXT( orig, vaobj, buffer, index, size, type, stride, offset );
|
||||
|
||||
|
|
@ -684,7 +684,7 @@ static void REGAL_CALL bv_glVertexArrayVertexAttribOffsetEXT(Layer *_layer, GLui
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayVertexAttribOffsetEXT( vaobj, buffer, index, size, type, normalized, stride, offset );
|
||||
self->glVertexArrayVertexAttribOffsetEXT( vaobj, buffer, index, size, type, normalized, stride, offset );
|
||||
|
||||
RglVertexArrayVertexAttribOffsetEXT( orig, vaobj, buffer, index, size, type, normalized, stride, offset );
|
||||
|
||||
|
|
@ -697,7 +697,7 @@ static void REGAL_CALL bv_glVertexArrayVertexOffsetEXT(Layer *_layer, GLuint vao
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexArrayVertexOffsetEXT( vaobj, buffer, size, type, stride, offset );
|
||||
self->glVertexArrayVertexOffsetEXT( vaobj, buffer, size, type, stride, offset );
|
||||
|
||||
RglVertexArrayVertexOffsetEXT( orig, vaobj, buffer, size, type, stride, offset );
|
||||
|
||||
|
|
@ -710,7 +710,7 @@ static void REGAL_CALL bv_glVertexAttribBinding(Layer *_layer, GLuint attribinde
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexAttribBinding( attribindex, bindingindex );
|
||||
self->glVertexAttribBinding( attribindex, bindingindex );
|
||||
|
||||
RglVertexAttribBinding( orig, attribindex, bindingindex );
|
||||
|
||||
|
|
@ -723,7 +723,7 @@ static void REGAL_CALL bv_glVertexAttribDivisor(Layer *_layer, GLuint index, GLu
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexAttribDivisor( index, divisor );
|
||||
self->glVertexAttribDivisor( index, divisor );
|
||||
|
||||
RglVertexAttribDivisor( orig, index, divisor );
|
||||
|
||||
|
|
@ -736,7 +736,7 @@ static void REGAL_CALL bv_glVertexAttribFormat(Layer *_layer, GLuint attribindex
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexAttribFormat( attribindex, size, type, normalized, relativeoffset );
|
||||
self->glVertexAttribFormat( attribindex, size, type, normalized, relativeoffset );
|
||||
|
||||
RglVertexAttribFormat( orig, attribindex, size, type, normalized, relativeoffset );
|
||||
|
||||
|
|
@ -749,7 +749,7 @@ static void REGAL_CALL bv_glVertexAttribIFormat(Layer *_layer, GLuint attribinde
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexAttribIFormat( attribindex, size, type, relativeoffset );
|
||||
self->glVertexAttribIFormat( attribindex, size, type, relativeoffset );
|
||||
|
||||
RglVertexAttribIFormat( orig, attribindex, size, type, relativeoffset );
|
||||
|
||||
|
|
@ -762,7 +762,7 @@ static void REGAL_CALL bv_glVertexAttribIPointer(Layer *_layer, GLuint index, GL
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexAttribIPointer( index, size, type, stride, pointer );
|
||||
self->glVertexAttribIPointer( index, size, type, stride, pointer );
|
||||
|
||||
RglVertexAttribIPointer( orig, index, size, type, stride, pointer );
|
||||
|
||||
|
|
@ -775,7 +775,7 @@ static void REGAL_CALL bv_glVertexAttribLFormat(Layer *_layer, GLuint attribinde
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexAttribLFormat( attribindex, size, type, relativeoffset );
|
||||
self->glVertexAttribLFormat( attribindex, size, type, relativeoffset );
|
||||
|
||||
RglVertexAttribLFormat( orig, attribindex, size, type, relativeoffset );
|
||||
|
||||
|
|
@ -788,7 +788,7 @@ static void REGAL_CALL bv_glVertexAttribLPointer(Layer *_layer, GLuint index, GL
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexAttribLPointer( index, size, type, stride, pointer );
|
||||
self->glVertexAttribLPointer( index, size, type, stride, pointer );
|
||||
|
||||
RglVertexAttribLPointer( orig, index, size, type, stride, pointer );
|
||||
|
||||
|
|
@ -801,7 +801,7 @@ static void REGAL_CALL bv_glVertexAttribPointer(Layer *_layer, GLuint index, GLi
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexAttribPointer( index, size, type, normalized, stride, pointer );
|
||||
self->glVertexAttribPointer( index, size, type, normalized, stride, pointer );
|
||||
|
||||
RglVertexAttribPointer( orig, index, size, type, normalized, stride, pointer );
|
||||
|
||||
|
|
@ -814,7 +814,7 @@ static void REGAL_CALL bv_glVertexBindingDivisor(Layer *_layer, GLuint bindingin
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexBindingDivisor( bindingindex, divisor );
|
||||
self->glVertexBindingDivisor( bindingindex, divisor );
|
||||
|
||||
RglVertexBindingDivisor( orig, bindingindex, divisor );
|
||||
|
||||
|
|
@ -827,7 +827,7 @@ static void REGAL_CALL bv_glVertexPointer(Layer *_layer, GLint size, GLenum type
|
|||
BaseVertexOriginate & orig = self->orig;
|
||||
|
||||
// prefix
|
||||
_context->bv->glVertexPointer( size, type, stride, pointer );
|
||||
self->glVertexPointer( size, type, stride, pointer );
|
||||
|
||||
RglVertexPointer( orig, size, type, stride, pointer );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue