regal/scripts/EmuQuads.py
Scott Nations bc7e48247e Enabled use of client-side memory in vertex, element, indirect, and count buffer
Added support for glArrayElement(EXT|) to the immediate mode layer.
    Support NUM_EXTENSIONS in glGet(Integer|Float|Double|Boolean|Integer64)v(EXT|)
    Added interception for glGetStringi and glGetIntergerv
    Improve loading of GLES and EGL libraries on Android
    Various bug fixes...
    Merged pull requests:
     #131  NaCL Pepper now uses GLES2 prefix for ES2.0 functions, rather than gl
     #130  Copyright bump to 2014
     #129  NaCL-related build tweaks for regaltest, nacl example and pnacl.
     #128  GLEW refresh
     #126  boost::print fix for mapping 'long' and 'long long' to 32-bit or 64-bit for length purposes
     #125  Resolve clang compilation error: lookup of 'Depth' in member access expression is ambiguous
     #124  Add Makefile support for gcc-4.4, gcc-4.6 and clang toolchains on Linux.
     #116  Make it compile with Visual Studio 2013 (VC12)
2014-08-07 12:24:42 -05:00

38 lines
1.1 KiB
Python

#!/usr/bin/python -B
quadsFormulae = {
'EnableDisable' : {
'entries' : [ 'gl(En|Dis)able' ],
'prefix' : [ '_context->quads->gl${m1}able( ${arg0plus} );', ],
},
'CullFrontFace' : {
'entries' : [ 'gl(Cull|Front)Face' ],
'prefix' : [ '_context->quads->gl${m1}Face( ${arg0plus} );', ],
},
'PolygonMode' : {
'entries' : [ 'glPolygonMode' ],
'prefix' : [ '_context->quads->glPolygonMode( ${arg0plus} );', ],
},
'ShadeModel' : {
'entries' : [ 'glShadeModel' ],
'prefix' : [ '_context->quads->glShadeModel( ${arg0plus} );', ],
},
'ProvokingVertex' : {
'entries' : [ 'glProvokingVertex(EXT|)' ],
'prefix' : [ '_context->quads->glProvokingVertex( ${arg0plus} );', ],
},
'BindBuffer' : {
'entries' : [ 'glBindBuffer(EXT|)' ],
'prefix' : [ '_context->quads->glBindBuffer( ${arg0plus} );', ],
},
'quads' : {
'entries' : [ 'glDrawArrays(EXT|)' ],
'impl' : [
'''
if ( ! _context->quads->glDrawArrays( _context, ${arg0plus} ) ) {
_context->dispatcher.emulation.glDrawArrays( ${arg0plus} );
}
'''
],
},
}