diff options
Diffstat (limited to 'lib/wx/c_src/gen/gl_funcs.cpp')
-rw-r--r-- | lib/wx/c_src/gen/gl_funcs.cpp | 2137 |
1 files changed, 1916 insertions, 221 deletions
diff --git a/lib/wx/c_src/gen/gl_funcs.cpp b/lib/wx/c_src/gen/gl_funcs.cpp index de73ccf555..ea82635846 100644 --- a/lib/wx/c_src/gen/gl_funcs.cpp +++ b/lib/wx/c_src/gen/gl_funcs.cpp @@ -24,7 +24,7 @@ #include "gl_fdefs.h" int gl_error_op; -void egl_dispatch(int op, char *bp, ErlDrvPort port, ErlDrvTermData caller, char *bins[]){ +void egl_dispatch(int op, char *bp, ErlDrvPort port, ErlDrvTermData caller, char *bins[], int bins_sz[]){ gl_error_op = op; switch(op) { @@ -131,10 +131,10 @@ case 5015: { // gluBuild3DMipmaps driver_send_term(port,caller,rt,AP); }; break; case 5016: { // gluCheckExtension - int * extNameLen = (int *) bp; bp += 4; - GLubyte * extName = (GLubyte *) bp; bp += (8-((*extNameLen*1+4)%8))%8; - int * extStringLen = (int *) bp; bp += 4; - GLubyte * extString = (GLubyte *) bp; bp += (8-((*extStringLen*1+4)%8))%8; + GLubyte *extName = (GLubyte *) bp; + int extNameLen[1] = {strlen((char *)extName)}; bp += extNameLen[0]+1+((8-((1+extNameLen[0]+0)%8))%8); + GLubyte *extString = (GLubyte *) bp; + int extStringLen[1] = {strlen((char *)extString)}; bp += extStringLen[0]+1+((8-((1+extStringLen[0]+0)%8))%8); GLboolean result = wegluCheckExtension(extName,extString); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -1077,16 +1077,14 @@ case 5135: { // glGetPixelMapusv driver_send_term(port,caller,rt,AP); }; break; case 5136: { // glGetPolygonStipple - GLubyte mask[128]; - weglGetPolygonStipple(mask); + ErlDrvBinary *mask = driver_alloc_binary(128); + weglGetPolygonStipple((GLubyte*) mask->orig_bytes); int AP = 0; ErlDrvTermData rt[8]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); - ErlDrvBinary * BinCopy = driver_alloc_binary(128); - memcpy(BinCopy->orig_bytes, mask, 128); - rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) BinCopy; rt[AP++] = 128; rt[AP++] = 0; + rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) mask; rt[AP++] = 128; rt[AP++] = 0; rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); - driver_free_binary(BinCopy); + driver_free_binary(mask); }; break; case 5137: { // glGetString GLenum *name = (GLenum *) bp; bp += 4; @@ -3227,11 +3225,11 @@ case 5442: { // glStencilOpSeparate weglStencilOpSeparate(*face,*sfail,*dpfail,*dppass); }; break; case 5443: { // glStencilFuncSeparate - GLenum *frontfunc = (GLenum *) bp; bp += 4; - GLenum *backfunc = (GLenum *) bp; bp += 4; + GLenum *face = (GLenum *) bp; bp += 4; + GLenum *func = (GLenum *) bp; bp += 4; GLint *ref = (GLint *) bp; bp += 4; GLuint *mask = (GLuint *) bp; bp += 4; - weglStencilFuncSeparate(*frontfunc,*backfunc,*ref,*mask); + weglStencilFuncSeparate(*face,*func,*ref,*mask); }; break; case 5444: { // glStencilMaskSeparate GLenum *face = (GLenum *) bp; bp += 4; @@ -3247,7 +3245,7 @@ case 5446: { // glBindAttribLocation GLuint *program = (GLuint *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); weglBindAttribLocation(*program,*index,name); }; break; case 5447: { // glCompileShader @@ -3353,7 +3351,7 @@ case 5457: { // glGetAttachedShaders case 5458: { // glGetAttribLocation GLuint *program = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); GLint result = weglGetAttribLocation(*program,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -3428,7 +3426,7 @@ case 5463: { // glGetShaderSource case 5464: { // glGetUniformLocation GLuint *program = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); GLint result = weglGetUniformLocation(*program,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4095,7 +4093,67 @@ case 5544: { // glGetVertexAttribIuiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5545: { // glGetUniformuiv +case 5545: { // glVertexAttribI1iv + GLuint *index = (GLuint *) bp; bp += 4; + GLint *v = (GLint *) bp; bp += 4; + weglVertexAttribI1iv(*index,v); +}; break; +case 5546: { // glVertexAttribI2iv + GLuint *index = (GLuint *) bp; bp += 4; + GLint *v = (GLint *) bp; bp += 4; + weglVertexAttribI2iv(*index,v); +}; break; +case 5547: { // glVertexAttribI3iv + GLuint *index = (GLuint *) bp; bp += 4; + GLint *v = (GLint *) bp; bp += 4; + weglVertexAttribI3iv(*index,v); +}; break; +case 5548: { // glVertexAttribI4iv + GLuint *index = (GLuint *) bp; bp += 4; + GLint * v = (GLint *) bp; bp += 16; + weglVertexAttribI4iv(*index,v); +}; break; +case 5549: { // glVertexAttribI1uiv + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *v = (GLuint *) bp; bp += 4; + weglVertexAttribI1uiv(*index,v); +}; break; +case 5550: { // glVertexAttribI2uiv + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *v = (GLuint *) bp; bp += 4; + weglVertexAttribI2uiv(*index,v); +}; break; +case 5551: { // glVertexAttribI3uiv + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *v = (GLuint *) bp; bp += 4; + weglVertexAttribI3uiv(*index,v); +}; break; +case 5552: { // glVertexAttribI4uiv + GLuint *index = (GLuint *) bp; bp += 4; + GLuint * v = (GLuint *) bp; bp += 16; + weglVertexAttribI4uiv(*index,v); +}; break; +case 5553: { // glVertexAttribI4bv + GLuint *index = (GLuint *) bp; bp += 4; + GLbyte * v = (GLbyte *) bp; bp += 4; + weglVertexAttribI4bv(*index,v); +}; break; +case 5554: { // glVertexAttribI4sv + GLuint *index = (GLuint *) bp; bp += 4; + GLshort * v = (GLshort *) bp; bp += 8; + weglVertexAttribI4sv(*index,v); +}; break; +case 5555: { // glVertexAttribI4ubv + GLuint *index = (GLuint *) bp; bp += 4; + GLubyte * v = (GLubyte *) bp; bp += 4; + weglVertexAttribI4ubv(*index,v); +}; break; +case 5556: { // glVertexAttribI4usv + GLuint *index = (GLuint *) bp; bp += 4; + GLushort * v = (GLushort *) bp; bp += 8; + weglVertexAttribI4usv(*index,v); +}; break; +case 5557: { // glGetUniformuiv GLuint *program = (GLuint *) bp; bp += 4; GLint *location = (GLint *) bp; bp += 4; GLuint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; @@ -4123,17 +4181,17 @@ case 5545: { // glGetUniformuiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5546: { // glBindFragDataLocation +case 5558: { // glBindFragDataLocation GLuint *program = (GLuint *) bp; bp += 4; GLuint *color = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); weglBindFragDataLocation(*program,*color,name); }; break; -case 5547: { // glGetFragDataLocation +case 5559: { // glGetFragDataLocation GLuint *program = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); GLint result = weglGetFragDataLocation(*program,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4141,25 +4199,25 @@ case 5547: { // glGetFragDataLocation rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5548: { // glUniform1ui +case 5560: { // glUniform1ui GLint *location = (GLint *) bp; bp += 4; GLuint *v0 = (GLuint *) bp; bp += 4; weglUniform1ui(*location,*v0); }; break; -case 5549: { // glUniform2ui +case 5561: { // glUniform2ui GLint *location = (GLint *) bp; bp += 4; GLuint *v0 = (GLuint *) bp; bp += 4; GLuint *v1 = (GLuint *) bp; bp += 4; weglUniform2ui(*location,*v0,*v1); }; break; -case 5550: { // glUniform3ui +case 5562: { // glUniform3ui GLint *location = (GLint *) bp; bp += 4; GLuint *v0 = (GLuint *) bp; bp += 4; GLuint *v1 = (GLuint *) bp; bp += 4; GLuint *v2 = (GLuint *) bp; bp += 4; weglUniform3ui(*location,*v0,*v1,*v2); }; break; -case 5551: { // glUniform4ui +case 5563: { // glUniform4ui GLint *location = (GLint *) bp; bp += 4; GLuint *v0 = (GLuint *) bp; bp += 4; GLuint *v1 = (GLuint *) bp; bp += 4; @@ -4167,45 +4225,45 @@ case 5551: { // glUniform4ui GLuint *v3 = (GLuint *) bp; bp += 4; weglUniform4ui(*location,*v0,*v1,*v2,*v3); }; break; -case 5552: { // glUniform1uiv +case 5564: { // glUniform1uiv GLint *location = (GLint *) bp; bp += 4; int * valueLen = (int *) bp; bp += 4; GLuint * value = (GLuint *) bp; bp += (8-((*valueLen*4+0)%8))%8; weglUniform1uiv(*location,*valueLen,value); }; break; -case 5553: { // glUniform2uiv +case 5565: { // glUniform2uiv GLint *location = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLuint * value = (GLuint *) bp; bp += *valueLen*8; weglUniform2uiv(*location,*valueLen,value); }; break; -case 5554: { // glUniform3uiv +case 5566: { // glUniform3uiv GLint *location = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLuint * value = (GLuint *) bp; bp += *valueLen*12; weglUniform3uiv(*location,*valueLen,value); }; break; -case 5555: { // glUniform4uiv +case 5567: { // glUniform4uiv GLint *location = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLuint * value = (GLuint *) bp; bp += *valueLen*16; weglUniform4uiv(*location,*valueLen,value); }; break; -case 5556: { // glTexParameterIiv +case 5568: { // glTexParameterIiv GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; int *paramsLen = (int *) bp; bp += 4; GLint *params = (GLint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; weglTexParameterIiv(*target,*pname,params); }; break; -case 5557: { // glTexParameterIuiv +case 5569: { // glTexParameterIuiv GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; int *paramsLen = (int *) bp; bp += 4; GLuint *params = (GLuint *) bp; bp += *paramsLen*4+((*paramsLen)+1)%2*4; weglTexParameterIuiv(*target,*pname,params); }; break; -case 5558: { // glGetTexParameterIiv +case 5570: { // glGetTexParameterIiv GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; GLint params[4] = {0,0,0,0}; @@ -4221,7 +4279,7 @@ case 5558: { // glGetTexParameterIiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5559: { // glGetTexParameterIuiv +case 5571: { // glGetTexParameterIuiv GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; GLuint params[4] = {0,0,0,0}; @@ -4237,35 +4295,35 @@ case 5559: { // glGetTexParameterIuiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5560: { // glClearBufferiv +case 5572: { // glClearBufferiv GLenum *buffer = (GLenum *) bp; bp += 4; GLint *drawbuffer = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLint *value = (GLint *) bp; bp += *valueLen*4+((*valueLen)+1)%2*4; weglClearBufferiv(*buffer,*drawbuffer,value); }; break; -case 5561: { // glClearBufferuiv +case 5573: { // glClearBufferuiv GLenum *buffer = (GLenum *) bp; bp += 4; GLint *drawbuffer = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLuint *value = (GLuint *) bp; bp += *valueLen*4+((*valueLen)+1)%2*4; weglClearBufferuiv(*buffer,*drawbuffer,value); }; break; -case 5562: { // glClearBufferfv +case 5574: { // glClearBufferfv GLenum *buffer = (GLenum *) bp; bp += 4; GLint *drawbuffer = (GLint *) bp; bp += 4; int *valueLen = (int *) bp; bp += 4; GLfloat *value = (GLfloat *) bp; bp += *valueLen*4+((*valueLen)+1)%2*4; weglClearBufferfv(*buffer,*drawbuffer,value); }; break; -case 5563: { // glClearBufferfi +case 5575: { // glClearBufferfi GLenum *buffer = (GLenum *) bp; bp += 4; GLint *drawbuffer = (GLint *) bp; bp += 4; GLfloat *depth = (GLfloat *) bp; bp += 4; GLint *stencil = (GLint *) bp; bp += 4; weglClearBufferfi(*buffer,*drawbuffer,*depth,*stencil); }; break; -case 5564: { // glGetStringi +case 5576: { // glGetStringi GLenum *name = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; const GLubyte * result = weglGetStringi(*name,*index); @@ -4275,66 +4333,6 @@ case 5564: { // glGetStringi rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5565: { // glVertexAttribI1iv - GLuint *index = (GLuint *) bp; bp += 4; - GLint *v = (GLint *) bp; bp += 4; - weglVertexAttribI1iv(*index,v); -}; break; -case 5566: { // glVertexAttribI2iv - GLuint *index = (GLuint *) bp; bp += 4; - GLint *v = (GLint *) bp; bp += 4; - weglVertexAttribI2iv(*index,v); -}; break; -case 5567: { // glVertexAttribI3iv - GLuint *index = (GLuint *) bp; bp += 4; - GLint *v = (GLint *) bp; bp += 4; - weglVertexAttribI3iv(*index,v); -}; break; -case 5568: { // glVertexAttribI4iv - GLuint *index = (GLuint *) bp; bp += 4; - GLint * v = (GLint *) bp; bp += 16; - weglVertexAttribI4iv(*index,v); -}; break; -case 5569: { // glVertexAttribI1uiv - GLuint *index = (GLuint *) bp; bp += 4; - GLuint *v = (GLuint *) bp; bp += 4; - weglVertexAttribI1uiv(*index,v); -}; break; -case 5570: { // glVertexAttribI2uiv - GLuint *index = (GLuint *) bp; bp += 4; - GLuint *v = (GLuint *) bp; bp += 4; - weglVertexAttribI2uiv(*index,v); -}; break; -case 5571: { // glVertexAttribI3uiv - GLuint *index = (GLuint *) bp; bp += 4; - GLuint *v = (GLuint *) bp; bp += 4; - weglVertexAttribI3uiv(*index,v); -}; break; -case 5572: { // glVertexAttribI4uiv - GLuint *index = (GLuint *) bp; bp += 4; - GLuint * v = (GLuint *) bp; bp += 16; - weglVertexAttribI4uiv(*index,v); -}; break; -case 5573: { // glVertexAttribI4bv - GLuint *index = (GLuint *) bp; bp += 4; - GLbyte * v = (GLbyte *) bp; bp += 4; - weglVertexAttribI4bv(*index,v); -}; break; -case 5574: { // glVertexAttribI4sv - GLuint *index = (GLuint *) bp; bp += 4; - GLshort * v = (GLshort *) bp; bp += 8; - weglVertexAttribI4sv(*index,v); -}; break; -case 5575: { // glVertexAttribI4ubv - GLuint *index = (GLuint *) bp; bp += 4; - GLubyte * v = (GLubyte *) bp; bp += 4; - weglVertexAttribI4ubv(*index,v); -}; break; -case 5576: { // glVertexAttribI4usv - GLuint *index = (GLuint *) bp; bp += 4; - GLushort * v = (GLushort *) bp; bp += 8; - weglVertexAttribI4usv(*index,v); -}; break; case 5577: { // glDrawArraysInstanced GLenum *mode = (GLenum *) bp; bp += 4; GLint *first = (GLint *) bp; bp += 4; @@ -4368,103 +4366,200 @@ case 5581: { // glPrimitiveRestartIndex GLuint *index = (GLuint *) bp; bp += 4; weglPrimitiveRestartIndex(*index); }; break; -case 5582: { // glLoadTransposeMatrixfARB +case 5582: { // glGetInteger64i_v + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLint64 data[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + weglGetInteger64i_v(*target,*index,data); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint64 *dataTmp = data; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *dataTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5583: { // glGetBufferParameteri64v + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint64 params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + weglGetBufferParameteri64v(*target,*pname,params); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint64 *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5584: { // glFramebufferTexture + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *attachment = (GLenum *) bp; bp += 4; + GLuint *texture = (GLuint *) bp; bp += 4; + GLint *level = (GLint *) bp; bp += 4; + weglFramebufferTexture(*target,*attachment,*texture,*level); +}; break; +case 5585: { // glVertexAttribDivisor + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *divisor = (GLuint *) bp; bp += 4; + weglVertexAttribDivisor(*index,*divisor); +}; break; +case 5586: { // glMinSampleShading + GLclampf *value = (GLclampf *) bp; bp += 4; + weglMinSampleShading(*value); +}; break; +case 5587: { // glBlendEquationi + GLuint *buf = (GLuint *) bp; bp += 4; + GLenum *mode = (GLenum *) bp; bp += 4; + weglBlendEquationi(*buf,*mode); +}; break; +case 5588: { // glBlendEquationSeparatei + GLuint *buf = (GLuint *) bp; bp += 4; + GLenum *modeRGB = (GLenum *) bp; bp += 4; + GLenum *modeAlpha = (GLenum *) bp; bp += 4; + weglBlendEquationSeparatei(*buf,*modeRGB,*modeAlpha); +}; break; +case 5589: { // glBlendFunci + GLuint *buf = (GLuint *) bp; bp += 4; + GLenum *src = (GLenum *) bp; bp += 4; + GLenum *dst = (GLenum *) bp; bp += 4; + weglBlendFunci(*buf,*src,*dst); +}; break; +case 5590: { // glBlendFuncSeparatei + GLuint *buf = (GLuint *) bp; bp += 4; + GLenum *srcRGB = (GLenum *) bp; bp += 4; + GLenum *dstRGB = (GLenum *) bp; bp += 4; + GLenum *srcAlpha = (GLenum *) bp; bp += 4; + GLenum *dstAlpha = (GLenum *) bp; bp += 4; + weglBlendFuncSeparatei(*buf,*srcRGB,*dstRGB,*srcAlpha,*dstAlpha); +}; break; +case 5591: { // glLoadTransposeMatrixfARB GLfloat * m = (GLfloat *) bp; bp += 64; weglLoadTransposeMatrixfARB(m); }; break; -case 5583: { // glLoadTransposeMatrixdARB +case 5592: { // glLoadTransposeMatrixdARB GLdouble * m = (GLdouble *) bp; bp += 128; weglLoadTransposeMatrixdARB(m); }; break; -case 5584: { // glMultTransposeMatrixfARB +case 5593: { // glMultTransposeMatrixfARB GLfloat * m = (GLfloat *) bp; bp += 64; weglMultTransposeMatrixfARB(m); }; break; -case 5585: { // glMultTransposeMatrixdARB +case 5594: { // glMultTransposeMatrixdARB GLdouble * m = (GLdouble *) bp; bp += 128; weglMultTransposeMatrixdARB(m); }; break; -case 5586: { // glWeightbvARB +case 5595: { // glWeightbvARB int * weightsLen = (int *) bp; bp += 4; GLbyte * weights = (GLbyte *) bp; bp += (8-((*weightsLen*1+4)%8))%8; weglWeightbvARB(*weightsLen,weights); }; break; -case 5587: { // glWeightsvARB +case 5596: { // glWeightsvARB int * weightsLen = (int *) bp; bp += 4; GLshort * weights = (GLshort *) bp; bp += (8-((*weightsLen*2+4)%8))%8; weglWeightsvARB(*weightsLen,weights); }; break; -case 5588: { // glWeightivARB +case 5597: { // glWeightivARB int * weightsLen = (int *) bp; bp += 4; GLint * weights = (GLint *) bp; bp += (8-((*weightsLen*4+4)%8))%8; weglWeightivARB(*weightsLen,weights); }; break; -case 5589: { // glWeightfvARB +case 5598: { // glWeightfvARB int * weightsLen = (int *) bp; bp += 4; GLfloat * weights = (GLfloat *) bp; bp += (8-((*weightsLen*4+4)%8))%8; weglWeightfvARB(*weightsLen,weights); }; break; -case 5590: { // glWeightdvARB +case 5599: { // glWeightdvARB int * weightsLen = (int *) bp; bp += 8; GLdouble * weights = (GLdouble *) bp; bp += (8-((*weightsLen*8+0)%8))%8; weglWeightdvARB(*weightsLen,weights); }; break; -case 5591: { // glWeightubvARB +case 5600: { // glWeightubvARB int * weightsLen = (int *) bp; bp += 4; GLubyte * weights = (GLubyte *) bp; bp += (8-((*weightsLen*1+4)%8))%8; weglWeightubvARB(*weightsLen,weights); }; break; -case 5592: { // glWeightusvARB +case 5601: { // glWeightusvARB int * weightsLen = (int *) bp; bp += 4; GLushort * weights = (GLushort *) bp; bp += (8-((*weightsLen*2+4)%8))%8; weglWeightusvARB(*weightsLen,weights); }; break; -case 5593: { // glWeightuivARB +case 5602: { // glWeightuivARB int * weightsLen = (int *) bp; bp += 4; GLuint * weights = (GLuint *) bp; bp += (8-((*weightsLen*4+4)%8))%8; weglWeightuivARB(*weightsLen,weights); }; break; -case 5594: { // glVertexBlendARB +case 5603: { // glVertexBlendARB GLint *count = (GLint *) bp; bp += 4; weglVertexBlendARB(*count); }; break; -case 5595: { // glCurrentPaletteMatrixARB +case 5604: { // glCurrentPaletteMatrixARB GLint *index = (GLint *) bp; bp += 4; weglCurrentPaletteMatrixARB(*index); }; break; -case 5596: { // glMatrixIndexubvARB +case 5605: { // glMatrixIndexubvARB int * indicesLen = (int *) bp; bp += 4; GLubyte * indices = (GLubyte *) bp; bp += (8-((*indicesLen*1+4)%8))%8; weglMatrixIndexubvARB(*indicesLen,indices); }; break; -case 5597: { // glMatrixIndexusvARB +case 5606: { // glMatrixIndexusvARB int * indicesLen = (int *) bp; bp += 4; GLushort * indices = (GLushort *) bp; bp += (8-((*indicesLen*2+4)%8))%8; weglMatrixIndexusvARB(*indicesLen,indices); }; break; -case 5598: { // glMatrixIndexuivARB +case 5607: { // glMatrixIndexuivARB int * indicesLen = (int *) bp; bp += 4; GLuint * indices = (GLuint *) bp; bp += (8-((*indicesLen*4+4)%8))%8; weglMatrixIndexuivARB(*indicesLen,indices); }; break; -case 5599: { // glProgramStringARB +case 5608: { // glProgramStringARB GLenum *target = (GLenum *) bp; bp += 4; GLenum *format = (GLenum *) bp; bp += 4; GLvoid *string = (GLvoid *) bp; - int stringLen = strlen((char *)string); bp += stringLen+1+((8-((1+stringLen+0)%8))%8); - weglProgramStringARB(*target,*format,stringLen,string); + int stringLen[1] = {strlen((char *)string)}; bp += stringLen[0]+1+((8-((1+stringLen[0]+0)%8))%8); + weglProgramStringARB(*target,*format,*stringLen,string); }; break; -case 5600: { // glBindProgramARB +case 5609: { // glBindProgramARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *program = (GLuint *) bp; bp += 4; weglBindProgramARB(*target,*program); }; break; -case 5601: { // glDeleteProgramsARB +case 5610: { // glDeleteProgramsARB int * programsLen = (int *) bp; bp += 4; GLuint * programs = (GLuint *) bp; bp += (8-((*programsLen*4+4)%8))%8; weglDeleteProgramsARB(*programsLen,programs); }; break; -case 5602: { // glGenProgramsARB +case 5611: { // glGenProgramsARB GLsizei *n = (GLsizei *) bp; bp += 4; GLuint *programs; programs = (GLuint *) driver_alloc(sizeof(GLuint) * *n); @@ -4480,7 +4575,7 @@ case 5602: { // glGenProgramsARB driver_free(rt); driver_free(programs); }; break; -case 5603: { // glProgramEnvParameter4dARB +case 5612: { // glProgramEnvParameter4dARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble *x = (GLdouble *) bp; bp += 8; @@ -4489,13 +4584,13 @@ case 5603: { // glProgramEnvParameter4dARB GLdouble *w = (GLdouble *) bp; bp += 8; weglProgramEnvParameter4dARB(*target,*index,*x,*y,*z,*w); }; break; -case 5604: { // glProgramEnvParameter4dvARB +case 5613: { // glProgramEnvParameter4dvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble * params = (GLdouble *) bp; bp += 32; weglProgramEnvParameter4dvARB(*target,*index,params); }; break; -case 5605: { // glProgramEnvParameter4fARB +case 5614: { // glProgramEnvParameter4fARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat *x = (GLfloat *) bp; bp += 4; @@ -4504,13 +4599,13 @@ case 5605: { // glProgramEnvParameter4fARB GLfloat *w = (GLfloat *) bp; bp += 4; weglProgramEnvParameter4fARB(*target,*index,*x,*y,*z,*w); }; break; -case 5606: { // glProgramEnvParameter4fvARB +case 5615: { // glProgramEnvParameter4fvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat * params = (GLfloat *) bp; bp += 16; weglProgramEnvParameter4fvARB(*target,*index,params); }; break; -case 5607: { // glProgramLocalParameter4dARB +case 5616: { // glProgramLocalParameter4dARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble *x = (GLdouble *) bp; bp += 8; @@ -4519,13 +4614,13 @@ case 5607: { // glProgramLocalParameter4dARB GLdouble *w = (GLdouble *) bp; bp += 8; weglProgramLocalParameter4dARB(*target,*index,*x,*y,*z,*w); }; break; -case 5608: { // glProgramLocalParameter4dvARB +case 5617: { // glProgramLocalParameter4dvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble * params = (GLdouble *) bp; bp += 32; weglProgramLocalParameter4dvARB(*target,*index,params); }; break; -case 5609: { // glProgramLocalParameter4fARB +case 5618: { // glProgramLocalParameter4fARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat *x = (GLfloat *) bp; bp += 4; @@ -4534,13 +4629,13 @@ case 5609: { // glProgramLocalParameter4fARB GLfloat *w = (GLfloat *) bp; bp += 4; weglProgramLocalParameter4fARB(*target,*index,*x,*y,*z,*w); }; break; -case 5610: { // glProgramLocalParameter4fvARB +case 5619: { // glProgramLocalParameter4fvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat * params = (GLfloat *) bp; bp += 16; weglProgramLocalParameter4fvARB(*target,*index,params); }; break; -case 5611: { // glGetProgramEnvParameterdvARB +case 5620: { // glGetProgramEnvParameterdvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble params[4] = {0.0,0.0,0.0,0.0}; @@ -4556,7 +4651,7 @@ case 5611: { // glGetProgramEnvParameterdvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5612: { // glGetProgramEnvParameterfvARB +case 5621: { // glGetProgramEnvParameterfvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat params[4] = {0.0,0.0,0.0,0.0}; @@ -4573,7 +4668,7 @@ case 5612: { // glGetProgramEnvParameterfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5613: { // glGetProgramLocalParameterdvARB +case 5622: { // glGetProgramLocalParameterdvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLdouble params[4] = {0.0,0.0,0.0,0.0}; @@ -4589,7 +4684,7 @@ case 5613: { // glGetProgramLocalParameterdvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5614: { // glGetProgramLocalParameterfvARB +case 5623: { // glGetProgramLocalParameterfvARB GLenum *target = (GLenum *) bp; bp += 4; GLuint *index = (GLuint *) bp; bp += 4; GLfloat params[4] = {0.0,0.0,0.0,0.0}; @@ -4606,7 +4701,7 @@ case 5614: { // glGetProgramLocalParameterfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5615: { // glGetProgramStringARB +case 5624: { // glGetProgramStringARB GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; GLvoid *string = (GLvoid *) bins[0]; @@ -4617,11 +4712,39 @@ case 5615: { // glGetProgramStringARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5616: { // glDeleteObjectARB +case 5625: { // glGetBufferParameterivARB + GLenum *target = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + weglGetBufferParameterivARB(*target,*pname,params); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5626: { // glDeleteObjectARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglDeleteObjectARB(obj); }; break; -case 5617: { // glGetHandleARB +case 5627: { // glGetHandleARB GLenum *pname = (GLenum *) bp; bp += 4; GLhandleARB result = weglGetHandleARB(*pname); int AP = 0; ErlDrvTermData rt[6]; @@ -4630,12 +4753,12 @@ case 5617: { // glGetHandleARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5618: { // glDetachObjectARB +case 5628: { // glDetachObjectARB GLhandleARB containerObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLhandleARB attachedObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglDetachObjectARB(containerObj,attachedObj); }; break; -case 5619: { // glCreateShaderObjectARB +case 5629: { // glCreateShaderObjectARB GLenum *shaderType = (GLenum *) bp; bp += 4; GLhandleARB result = weglCreateShaderObjectARB(*shaderType); int AP = 0; ErlDrvTermData rt[6]; @@ -4644,7 +4767,7 @@ case 5619: { // glCreateShaderObjectARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5620: { // glShaderSourceARB +case 5630: { // glShaderSourceARB GLhandleARB shaderObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; int * stringLen = (int *) bp; bp += 4; int * stringTotSize = (int *) bp; bp += 4; @@ -4656,11 +4779,11 @@ case 5620: { // glShaderSourceARB weglShaderSourceARB(shaderObj,*stringLen,(const GLchar **) string,NULL); driver_free(string); }; break; -case 5621: { // glCompileShaderARB +case 5631: { // glCompileShaderARB GLhandleARB shaderObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglCompileShaderARB(shaderObj); }; break; -case 5622: { // glCreateProgramObjectARB +case 5632: { // glCreateProgramObjectARB GLhandleARB result = weglCreateProgramObjectARB(); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4668,24 +4791,24 @@ case 5622: { // glCreateProgramObjectARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5623: { // glAttachObjectARB +case 5633: { // glAttachObjectARB GLhandleARB containerObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglAttachObjectARB(containerObj,obj); }; break; -case 5624: { // glLinkProgramARB +case 5634: { // glLinkProgramARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglLinkProgramARB(programObj); }; break; -case 5625: { // glUseProgramObjectARB +case 5635: { // glUseProgramObjectARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglUseProgramObjectARB(programObj); }; break; -case 5626: { // glValidateProgramARB +case 5636: { // glValidateProgramARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; weglValidateProgramARB(programObj); }; break; -case 5627: { // glGetObjectParameterfvARB +case 5637: { // glGetObjectParameterfvARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLenum *pname = (GLenum *) bp; bp += 4; GLfloat params[1] = {0.0}; @@ -4697,7 +4820,7 @@ case 5627: { // glGetObjectParameterfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5628: { // glGetObjectParameterivARB +case 5638: { // glGetObjectParameterivARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLenum *pname = (GLenum *) bp; bp += 4; GLint params[1] = {0}; @@ -4708,7 +4831,7 @@ case 5628: { // glGetObjectParameterivARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5629: { // glGetInfoLogARB +case 5639: { // glGetInfoLogARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLsizei *maxLength = (GLsizei *) bp; bp += 4; GLsizei length[1] = {0}; @@ -4722,7 +4845,7 @@ case 5629: { // glGetInfoLogARB driver_send_term(port,caller,rt,AP); driver_free(infoLog); }; break; -case 5630: { // glGetAttachedObjectsARB +case 5640: { // glGetAttachedObjectsARB GLhandleARB containerObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLsizei *maxCount = (GLsizei *) bp; bp += 4; GLsizei count[1] = {0}; @@ -4740,10 +4863,10 @@ case 5630: { // glGetAttachedObjectsARB driver_free(rt); driver_free(obj); }; break; -case 5631: { // glGetUniformLocationARB +case 5641: { // glGetUniformLocationARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); GLint result = weglGetUniformLocationARB(programObj,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4751,7 +4874,7 @@ case 5631: { // glGetUniformLocationARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5632: { // glGetActiveUniformARB +case 5642: { // glGetActiveUniformARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLuint *index = (GLuint *) bp; bp += 4; GLsizei *maxLength = (GLsizei *) bp; bp += 4; @@ -4771,7 +4894,7 @@ case 5632: { // glGetActiveUniformARB driver_send_term(port,caller,rt,AP); driver_free(name); }; break; -case 5633: { // glGetUniformfvARB +case 5643: { // glGetUniformfvARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLint *location = (GLint *) bp; bp += 4; GLfloat params[16] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; @@ -4800,7 +4923,7 @@ case 5633: { // glGetUniformfvARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5634: { // glGetUniformivARB +case 5644: { // glGetUniformivARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLint *location = (GLint *) bp; bp += 4; GLint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; @@ -4828,7 +4951,7 @@ case 5634: { // glGetUniformivARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5635: { // glGetShaderSourceARB +case 5645: { // glGetShaderSourceARB GLhandleARB obj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLsizei *maxLength = (GLsizei *) bp; bp += 4; GLsizei length[1] = {0}; @@ -4842,14 +4965,14 @@ case 5635: { // glGetShaderSourceARB driver_send_term(port,caller,rt,AP); driver_free(source); }; break; -case 5636: { // glBindAttribLocationARB +case 5646: { // glBindAttribLocationARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLuint *index = (GLuint *) bp; bp += 4; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+4)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); weglBindAttribLocationARB(programObj,*index,name); }; break; -case 5637: { // glGetActiveAttribARB +case 5647: { // glGetActiveAttribARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLuint *index = (GLuint *) bp; bp += 4; GLsizei *maxLength = (GLsizei *) bp; bp += 4; @@ -4869,10 +4992,10 @@ case 5637: { // glGetActiveAttribARB driver_send_term(port,caller,rt,AP); driver_free(name); }; break; -case 5638: { // glGetAttribLocationARB +case 5648: { // glGetAttribLocationARB GLhandleARB programObj = (GLhandleARB) * (GLuint64EXT *) bp; bp += 8; GLchar *name = (GLchar *) bp; - int nameLen = strlen((char *)name); bp += nameLen+1+((8-((1+nameLen+0)%8))%8); + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); GLint result = weglGetAttribLocationARB(programObj,name); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -4880,7 +5003,7 @@ case 5638: { // glGetAttribLocationARB rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5639: { // glIsRenderbuffer +case 5649: { // glIsRenderbuffer GLuint *renderbuffer = (GLuint *) bp; bp += 4; GLboolean result = weglIsRenderbuffer(*renderbuffer); int AP = 0; ErlDrvTermData rt[6]; @@ -4889,17 +5012,17 @@ case 5639: { // glIsRenderbuffer rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5640: { // glBindRenderbuffer +case 5650: { // glBindRenderbuffer GLenum *target = (GLenum *) bp; bp += 4; GLuint *renderbuffer = (GLuint *) bp; bp += 4; weglBindRenderbuffer(*target,*renderbuffer); }; break; -case 5641: { // glDeleteRenderbuffers +case 5651: { // glDeleteRenderbuffers int * renderbuffersLen = (int *) bp; bp += 4; GLuint * renderbuffers = (GLuint *) bp; bp += (8-((*renderbuffersLen*4+4)%8))%8; weglDeleteRenderbuffers(*renderbuffersLen,renderbuffers); }; break; -case 5642: { // glGenRenderbuffers +case 5652: { // glGenRenderbuffers GLsizei *n = (GLsizei *) bp; bp += 4; GLuint *renderbuffers; renderbuffers = (GLuint *) driver_alloc(sizeof(GLuint) * *n); @@ -4915,14 +5038,14 @@ case 5642: { // glGenRenderbuffers driver_free(rt); driver_free(renderbuffers); }; break; -case 5643: { // glRenderbufferStorage +case 5653: { // glRenderbufferStorage GLenum *target = (GLenum *) bp; bp += 4; GLenum *internalformat = (GLenum *) bp; bp += 4; GLsizei *width = (GLsizei *) bp; bp += 4; GLsizei *height = (GLsizei *) bp; bp += 4; weglRenderbufferStorage(*target,*internalformat,*width,*height); }; break; -case 5644: { // glGetRenderbufferParameteriv +case 5654: { // glGetRenderbufferParameteriv GLenum *target = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; GLint params[1] = {0}; @@ -4933,7 +5056,7 @@ case 5644: { // glGetRenderbufferParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5645: { // glIsFramebuffer +case 5655: { // glIsFramebuffer GLuint *framebuffer = (GLuint *) bp; bp += 4; GLboolean result = weglIsFramebuffer(*framebuffer); int AP = 0; ErlDrvTermData rt[6]; @@ -4942,17 +5065,17 @@ case 5645: { // glIsFramebuffer rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5646: { // glBindFramebuffer +case 5656: { // glBindFramebuffer GLenum *target = (GLenum *) bp; bp += 4; GLuint *framebuffer = (GLuint *) bp; bp += 4; weglBindFramebuffer(*target,*framebuffer); }; break; -case 5647: { // glDeleteFramebuffers +case 5657: { // glDeleteFramebuffers int * framebuffersLen = (int *) bp; bp += 4; GLuint * framebuffers = (GLuint *) bp; bp += (8-((*framebuffersLen*4+4)%8))%8; weglDeleteFramebuffers(*framebuffersLen,framebuffers); }; break; -case 5648: { // glGenFramebuffers +case 5658: { // glGenFramebuffers GLsizei *n = (GLsizei *) bp; bp += 4; GLuint *framebuffers; framebuffers = (GLuint *) driver_alloc(sizeof(GLuint) * *n); @@ -4968,7 +5091,7 @@ case 5648: { // glGenFramebuffers driver_free(rt); driver_free(framebuffers); }; break; -case 5649: { // glCheckFramebufferStatus +case 5659: { // glCheckFramebufferStatus GLenum *target = (GLenum *) bp; bp += 4; GLenum result = weglCheckFramebufferStatus(*target); int AP = 0; ErlDrvTermData rt[6]; @@ -4977,7 +5100,7 @@ case 5649: { // glCheckFramebufferStatus rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5650: { // glFramebufferTexture1D +case 5660: { // glFramebufferTexture1D GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *textarget = (GLenum *) bp; bp += 4; @@ -4985,7 +5108,7 @@ case 5650: { // glFramebufferTexture1D GLint *level = (GLint *) bp; bp += 4; weglFramebufferTexture1D(*target,*attachment,*textarget,*texture,*level); }; break; -case 5651: { // glFramebufferTexture2D +case 5661: { // glFramebufferTexture2D GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *textarget = (GLenum *) bp; bp += 4; @@ -4993,7 +5116,7 @@ case 5651: { // glFramebufferTexture2D GLint *level = (GLint *) bp; bp += 4; weglFramebufferTexture2D(*target,*attachment,*textarget,*texture,*level); }; break; -case 5652: { // glFramebufferTexture3D +case 5662: { // glFramebufferTexture3D GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *textarget = (GLenum *) bp; bp += 4; @@ -5002,14 +5125,14 @@ case 5652: { // glFramebufferTexture3D GLint *zoffset = (GLint *) bp; bp += 4; weglFramebufferTexture3D(*target,*attachment,*textarget,*texture,*level,*zoffset); }; break; -case 5653: { // glFramebufferRenderbuffer +case 5663: { // glFramebufferRenderbuffer GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *renderbuffertarget = (GLenum *) bp; bp += 4; GLuint *renderbuffer = (GLuint *) bp; bp += 4; weglFramebufferRenderbuffer(*target,*attachment,*renderbuffertarget,*renderbuffer); }; break; -case 5654: { // glGetFramebufferAttachmentParameteriv +case 5664: { // glGetFramebufferAttachmentParameteriv GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; @@ -5021,11 +5144,11 @@ case 5654: { // glGetFramebufferAttachmentParameteriv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5655: { // glGenerateMipmap +case 5665: { // glGenerateMipmap GLenum *target = (GLenum *) bp; bp += 4; weglGenerateMipmap(*target); }; break; -case 5656: { // glBlitFramebuffer +case 5666: { // glBlitFramebuffer GLint *srcX0 = (GLint *) bp; bp += 4; GLint *srcY0 = (GLint *) bp; bp += 4; GLint *srcX1 = (GLint *) bp; bp += 4; @@ -5038,7 +5161,7 @@ case 5656: { // glBlitFramebuffer GLenum *filter = (GLenum *) bp; bp += 4; weglBlitFramebuffer(*srcX0,*srcY0,*srcX1,*srcY1,*dstX0,*dstY0,*dstX1,*dstY1,*mask,*filter); }; break; -case 5657: { // glRenderbufferStorageMultisample +case 5667: { // glRenderbufferStorageMultisample GLenum *target = (GLenum *) bp; bp += 4; GLsizei *samples = (GLsizei *) bp; bp += 4; GLenum *internalformat = (GLenum *) bp; bp += 4; @@ -5046,7 +5169,7 @@ case 5657: { // glRenderbufferStorageMultisample GLsizei *height = (GLsizei *) bp; bp += 4; weglRenderbufferStorageMultisample(*target,*samples,*internalformat,*width,*height); }; break; -case 5658: { // glFramebufferTextureLayer +case 5668: { // glFramebufferTextureLayer GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLuint *texture = (GLuint *) bp; bp += 4; @@ -5054,20 +5177,7 @@ case 5658: { // glFramebufferTextureLayer GLint *layer = (GLint *) bp; bp += 4; weglFramebufferTextureLayer(*target,*attachment,*texture,*level,*layer); }; break; -case 5659: { // glProgramParameteriARB - GLuint *program = (GLuint *) bp; bp += 4; - GLenum *pname = (GLenum *) bp; bp += 4; - GLint *value = (GLint *) bp; bp += 4; - weglProgramParameteriARB(*program,*pname,*value); -}; break; -case 5660: { // glFramebufferTextureARB - GLenum *target = (GLenum *) bp; bp += 4; - GLenum *attachment = (GLenum *) bp; bp += 4; - GLuint *texture = (GLuint *) bp; bp += 4; - GLint *level = (GLint *) bp; bp += 4; - weglFramebufferTextureARB(*target,*attachment,*texture,*level); -}; break; -case 5661: { // glFramebufferTextureFaceARB +case 5669: { // glFramebufferTextureFaceARB GLenum *target = (GLenum *) bp; bp += 4; GLenum *attachment = (GLenum *) bp; bp += 4; GLuint *texture = (GLuint *) bp; bp += 4; @@ -5075,28 +5185,23 @@ case 5661: { // glFramebufferTextureFaceARB GLenum *face = (GLenum *) bp; bp += 4; weglFramebufferTextureFaceARB(*target,*attachment,*texture,*level,*face); }; break; -case 5662: { // glVertexAttribDivisorARB - GLuint *index = (GLuint *) bp; bp += 4; - GLuint *divisor = (GLuint *) bp; bp += 4; - weglVertexAttribDivisorARB(*index,*divisor); -}; break; -case 5663: { // glFlushMappedBufferRange +case 5670: { // glFlushMappedBufferRange GLenum *target = (GLenum *) bp; bp += 4; bp += 4; GLintptr offset = (GLintptr) * (GLuint64EXT *) bp; bp += 8; GLsizeiptr length = (GLsizeiptr) * (GLuint64EXT *) bp; bp += 8; weglFlushMappedBufferRange(*target,offset,length); }; break; -case 5664: { // glBindVertexArray +case 5671: { // glBindVertexArray GLuint *array = (GLuint *) bp; bp += 4; weglBindVertexArray(*array); }; break; -case 5665: { // glDeleteVertexArrays +case 5672: { // glDeleteVertexArrays int * arraysLen = (int *) bp; bp += 4; GLuint * arrays = (GLuint *) bp; bp += (8-((*arraysLen*4+4)%8))%8; weglDeleteVertexArrays(*arraysLen,arrays); }; break; -case 5666: { // glGenVertexArrays +case 5673: { // glGenVertexArrays GLsizei *n = (GLsizei *) bp; bp += 4; GLuint *arrays; arrays = (GLuint *) driver_alloc(sizeof(GLuint) * *n); @@ -5112,7 +5217,7 @@ case 5666: { // glGenVertexArrays driver_free(rt); driver_free(arrays); }; break; -case 5667: { // glIsVertexArray +case 5674: { // glIsVertexArray GLuint *array = (GLuint *) bp; bp += 4; GLboolean result = weglIsVertexArray(*array); int AP = 0; ErlDrvTermData rt[6]; @@ -5121,7 +5226,7 @@ case 5667: { // glIsVertexArray rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5668: { // glGetUniformIndices +case 5675: { // glGetUniformIndices GLuint *program = (GLuint *) bp; bp += 4; int * uniformNamesLen = (int *) bp; bp += 4; int * uniformNamesTotSize = (int *) bp; bp += 4; @@ -5145,7 +5250,7 @@ case 5668: { // glGetUniformIndices driver_free(uniformIndices); driver_free(uniformNames); }; break; -case 5669: { // glGetActiveUniformsiv +case 5676: { // glGetActiveUniformsiv GLuint *program = (GLuint *) bp; bp += 4; int * uniformIndicesLen = (int *) bp; bp += 4; GLuint * uniformIndices = (GLuint *) bp; bp += (8-((*uniformIndicesLen*4+0)%8))%8; @@ -5164,7 +5269,7 @@ case 5669: { // glGetActiveUniformsiv driver_free(rt); driver_free(params); }; break; -case 5670: { // glGetActiveUniformName +case 5677: { // glGetActiveUniformName GLuint *program = (GLuint *) bp; bp += 4; GLuint *uniformIndex = (GLuint *) bp; bp += 4; GLsizei *bufSize = (GLsizei *) bp; bp += 4; @@ -5179,10 +5284,10 @@ case 5670: { // glGetActiveUniformName driver_send_term(port,caller,rt,AP); driver_free(uniformName); }; break; -case 5671: { // glGetUniformBlockIndex +case 5678: { // glGetUniformBlockIndex GLuint *program = (GLuint *) bp; bp += 4; GLchar *uniformBlockName = (GLchar *) bp; - int uniformBlockNameLen = strlen((char *)uniformBlockName); bp += uniformBlockNameLen+1+((8-((1+uniformBlockNameLen+4)%8))%8); + int uniformBlockNameLen[1] = {strlen((char *)uniformBlockName)}; bp += uniformBlockNameLen[0]+1+((8-((1+uniformBlockNameLen[0]+4)%8))%8); GLuint result = weglGetUniformBlockIndex(*program,uniformBlockName); int AP = 0; ErlDrvTermData rt[6]; rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); @@ -5190,7 +5295,7 @@ case 5671: { // glGetUniformBlockIndex rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5672: { // glGetActiveUniformBlockiv +case 5679: { // glGetActiveUniformBlockiv GLuint *program = (GLuint *) bp; bp += 4; GLuint *uniformBlockIndex = (GLuint *) bp; bp += 4; GLenum *pname = (GLenum *) bp; bp += 4; @@ -5202,7 +5307,7 @@ case 5672: { // glGetActiveUniformBlockiv rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; driver_send_term(port,caller,rt,AP); }; break; -case 5673: { // glGetActiveUniformBlockName +case 5680: { // glGetActiveUniformBlockName GLuint *program = (GLuint *) bp; bp += 4; GLuint *uniformBlockIndex = (GLuint *) bp; bp += 4; GLsizei *bufSize = (GLsizei *) bp; bp += 4; @@ -5217,13 +5322,13 @@ case 5673: { // glGetActiveUniformBlockName driver_send_term(port,caller,rt,AP); driver_free(uniformBlockName); }; break; -case 5674: { // glUniformBlockBinding +case 5681: { // glUniformBlockBinding GLuint *program = (GLuint *) bp; bp += 4; GLuint *uniformBlockIndex = (GLuint *) bp; bp += 4; GLuint *uniformBlockBinding = (GLuint *) bp; bp += 4; weglUniformBlockBinding(*program,*uniformBlockIndex,*uniformBlockBinding); }; break; -case 5675: { // glCopyBufferSubData +case 5682: { // glCopyBufferSubData GLenum *readTarget = (GLenum *) bp; bp += 4; GLenum *writeTarget = (GLenum *) bp; bp += 4; GLintptr readOffset = (GLintptr) * (GLuint64EXT *) bp; bp += 8; @@ -5231,31 +5336,1621 @@ case 5675: { // glCopyBufferSubData GLsizeiptr size = (GLsizeiptr) * (GLuint64EXT *) bp; bp += 8; weglCopyBufferSubData(*readTarget,*writeTarget,readOffset,writeOffset,size); }; break; -case 5676: { // glResizeBuffersMESA +case 5683: { // glDrawElementsBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawElementsBaseVertex(*mode,*count,*type,indices,*basevertex); +}; break; +case 5684: { // glDrawElementsBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) bins[0]; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawElementsBaseVertex(*mode,*count,*type,indices,*basevertex); +}; break; +case 5685: { // glDrawRangeElementsBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *start = (GLuint *) bp; bp += 4; + GLuint *end = (GLuint *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawRangeElementsBaseVertex(*mode,*start,*end,*count,*type,indices,*basevertex); +}; break; +case 5686: { // glDrawRangeElementsBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *start = (GLuint *) bp; bp += 4; + GLuint *end = (GLuint *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) bins[0]; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawRangeElementsBaseVertex(*mode,*start,*end,*count,*type,indices,*basevertex); +}; break; +case 5687: { // glDrawElementsInstancedBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) * (int *) bp; bp += 4; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawElementsInstancedBaseVertex(*mode,*count,*type,indices,*primcount,*basevertex); +}; break; +case 5688: { // glDrawElementsInstancedBaseVertex + GLenum *mode = (GLenum *) bp; bp += 4; + GLsizei *count = (GLsizei *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indices = (GLvoid *) bins[0]; + GLsizei *primcount = (GLsizei *) bp; bp += 4; + GLint *basevertex = (GLint *) bp; bp += 4; + weglDrawElementsInstancedBaseVertex(*mode,*count,*type,indices,*primcount,*basevertex); +}; break; +case 5689: { // glProvokingVertex + GLenum *mode = (GLenum *) bp; bp += 4; + weglProvokingVertex(*mode); +}; break; +case 5690: { // glFenceSync + GLenum *condition = (GLenum *) bp; bp += 4; + GLbitfield *flags = (GLbitfield *) bp; bp += 4; + GLsync result = weglFenceSync(*condition,*flags); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5691: { // glIsSync + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + GLboolean result = weglIsSync(sync); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5692: { // glDeleteSync + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + weglDeleteSync(sync); +}; break; +case 5693: { // glClientWaitSync + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + GLbitfield *flags = (GLbitfield *) bp; bp += 4; + bp += 4; + GLuint64 timeout = (GLuint64) * (GLuint64EXT *) bp; bp += 8; + GLenum result = weglClientWaitSync(sync,*flags,timeout); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5694: { // glWaitSync + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + GLbitfield *flags = (GLbitfield *) bp; bp += 4; + bp += 4; + GLuint64 timeout = (GLuint64) * (GLuint64EXT *) bp; bp += 8; + weglWaitSync(sync,*flags,timeout); +}; break; +case 5695: { // glGetInteger64v + GLenum *pname = (GLenum *) bp; bp += 4; + GLint64 params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + weglGetInteger64v(*pname,params); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint64 *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5696: { // glGetSynciv + GLsync sync = (GLsync) * (GLuint64EXT *) bp; bp += 8; + GLenum *pname = (GLenum *) bp; bp += 4; + GLsizei *bufSize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLint *values; + values = (GLint *) driver_alloc(sizeof(GLint) * *bufSize); + weglGetSynciv(sync,*pname,*bufSize,length,values); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*length)*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + for(int i=0; i < *length; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) values[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*length)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(values); +}; break; +case 5697: { // glTexImage2DMultisample + GLenum *target = (GLenum *) bp; bp += 4; + GLsizei *samples = (GLsizei *) bp; bp += 4; + GLint *internalformat = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLboolean *fixedsamplelocations = (GLboolean *) bp; bp += 1; + weglTexImage2DMultisample(*target,*samples,*internalformat,*width,*height,*fixedsamplelocations); +}; break; +case 5698: { // glTexImage3DMultisample + GLenum *target = (GLenum *) bp; bp += 4; + GLsizei *samples = (GLsizei *) bp; bp += 4; + GLint *internalformat = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + GLsizei *depth = (GLsizei *) bp; bp += 4; + GLboolean *fixedsamplelocations = (GLboolean *) bp; bp += 1; + weglTexImage3DMultisample(*target,*samples,*internalformat,*width,*height,*depth,*fixedsamplelocations); +}; break; +case 5699: { // glGetMultisamplefv + GLenum *pname = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLfloat val[2] = {0.0,0.0}; + weglGetMultisamplefv(*pname,*index,val); + int AP = 0; ErlDrvTermData rt[10]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble valConv[2], *valTmp = valConv; + for(int i=0; i < 2; i++) valConv[i] = (GLdouble) val[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) valTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) valTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5700: { // glSampleMaski + GLuint *index = (GLuint *) bp; bp += 4; + GLbitfield *mask = (GLbitfield *) bp; bp += 4; + weglSampleMaski(*index,*mask); +}; break; +case 5701: { // glNamedStringARB + GLenum *type = (GLenum *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); + GLchar *string = (GLchar *) bp; + int stringLen[1] = {strlen((char *)string)}; bp += stringLen[0]+1+((8-((1+stringLen[0]+0)%8))%8); + weglNamedStringARB(*type,*nameLen,name,*stringLen,string); +}; break; +case 5702: { // glDeleteNamedStringARB + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + weglDeleteNamedStringARB(*nameLen,name); +}; break; +case 5703: { // glCompileShaderIncludeARB + GLuint *shader = (GLuint *) bp; bp += 4; + int * pathLen = (int *) bp; bp += 4; + int * pathTotSize = (int *) bp; bp += 4; + GLchar **path; + path = (GLchar **) driver_alloc(sizeof(GLchar *) * *pathLen); + for(int i=0;i<*pathLen;i++) { + path[i] = (GLchar *) bp; bp += 1+strlen(bp);}; + bp += (8 - ((0 + *pathTotSize) % 8)) % 8; + weglCompileShaderIncludeARB(*shader,*pathLen,(const GLchar **) path,NULL); + driver_free(path); +}; break; +case 5704: { // glIsNamedStringARB + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLboolean result = weglIsNamedStringARB(*nameLen,name); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5705: { // glGetNamedStringARB + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLsizei *bufSize = (GLsizei *) bp; bp += 4; + GLint stringlen[1] = {0}; + GLchar *string; + string = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); + weglGetNamedStringARB(*nameLen,name,*bufSize,stringlen,string); + int AP = 0; ErlDrvTermData rt[7]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) string; rt[AP++] = *stringlen; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(string); +}; break; +case 5706: { // glGetNamedStringivARB + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[1] = {0}; + weglGetNamedStringivARB(*nameLen,name,*pname,params); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5707: { // glBindFragDataLocationIndexed + GLuint *program = (GLuint *) bp; bp += 4; + GLuint *colorNumber = (GLuint *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); + weglBindFragDataLocationIndexed(*program,*colorNumber,*index,name); +}; break; +case 5708: { // glGetFragDataIndex + GLuint *program = (GLuint *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+4)%8))%8); + GLint result = weglGetFragDataIndex(*program,name); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5709: { // glGenSamplers + GLsizei *count = (GLsizei *) bp; bp += 4; + GLuint *samplers; + samplers = (GLuint *) driver_alloc(sizeof(GLuint) * *count); + weglGenSamplers(*count,samplers); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*count)*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + for(int i=0; i < *count; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) samplers[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*count)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(samplers); +}; break; +case 5710: { // glDeleteSamplers + int * samplersLen = (int *) bp; bp += 4; + GLuint * samplers = (GLuint *) bp; bp += (8-((*samplersLen*4+4)%8))%8; + weglDeleteSamplers(*samplersLen,samplers); +}; break; +case 5711: { // glIsSampler + GLuint *sampler = (GLuint *) bp; bp += 4; + GLboolean result = weglIsSampler(*sampler); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5712: { // glBindSampler + GLuint *unit = (GLuint *) bp; bp += 4; + GLuint *sampler = (GLuint *) bp; bp += 4; + weglBindSampler(*unit,*sampler); +}; break; +case 5713: { // glSamplerParameteri + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *param = (GLint *) bp; bp += 4; + weglSamplerParameteri(*sampler,*pname,*param); +}; break; +case 5714: { // glSamplerParameteriv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int * paramLen = (int *) bp; bp += 4; + GLint * param = (GLint *) bp; bp += (8-((*paramLen*4+4)%8))%8; + weglSamplerParameteriv(*sampler,*pname,param); +}; break; +case 5715: { // glSamplerParameterf + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat *param = (GLfloat *) bp; bp += 4; + weglSamplerParameterf(*sampler,*pname,*param); +}; break; +case 5716: { // glSamplerParameterfv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int * paramLen = (int *) bp; bp += 4; + GLfloat * param = (GLfloat *) bp; bp += (8-((*paramLen*4+4)%8))%8; + weglSamplerParameterfv(*sampler,*pname,param); +}; break; +case 5717: { // glSamplerParameterIiv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int * paramLen = (int *) bp; bp += 4; + GLint * param = (GLint *) bp; bp += (8-((*paramLen*4+4)%8))%8; + weglSamplerParameterIiv(*sampler,*pname,param); +}; break; +case 5718: { // glSamplerParameterIuiv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + int * paramLen = (int *) bp; bp += 4; + GLuint * param = (GLuint *) bp; bp += (8-((*paramLen*4+4)%8))%8; + weglSamplerParameterIuiv(*sampler,*pname,param); +}; break; +case 5719: { // glGetSamplerParameteriv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[4] = {0,0,0,0}; + weglGetSamplerParameteriv(*sampler,*pname,params); + int AP = 0; ErlDrvTermData rt[15]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 4+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5720: { // glGetSamplerParameterIiv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[4] = {0,0,0,0}; + weglGetSamplerParameterIiv(*sampler,*pname,params); + int AP = 0; ErlDrvTermData rt[15]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 4+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5721: { // glGetSamplerParameterfv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLfloat params[4] = {0.0,0.0,0.0,0.0}; + weglGetSamplerParameterfv(*sampler,*pname,params); + int AP = 0; ErlDrvTermData rt[15]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble paramsConv[4], *paramsTmp = paramsConv; + for(int i=0; i < 4; i++) paramsConv[i] = (GLdouble) params[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 4+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5722: { // glGetSamplerParameterIuiv + GLuint *sampler = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLuint params[4] = {0,0,0,0}; + weglGetSamplerParameterIuiv(*sampler,*pname,params); + int AP = 0; ErlDrvTermData rt[15]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLuint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 4+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5723: { // glQueryCounter + GLuint *id = (GLuint *) bp; bp += 4; + GLenum *target = (GLenum *) bp; bp += 4; + weglQueryCounter(*id,*target); +}; break; +case 5724: { // glGetQueryObjecti64v + GLuint *id = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint64 params[1] = {0}; + weglGetQueryObjecti64v(*id,*pname,params); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5725: { // glGetQueryObjectui64v + GLuint *id = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLuint64 params[1] = {0}; + weglGetQueryObjectui64v(*id,*pname,params); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5726: { // glDrawArraysIndirect + GLenum *mode = (GLenum *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) * (int *) bp; bp += 4; + weglDrawArraysIndirect(*mode,indirect); +}; break; +case 5727: { // glDrawArraysIndirect + GLenum *mode = (GLenum *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) bins[0]; + weglDrawArraysIndirect(*mode,indirect); +}; break; +case 5728: { // glDrawElementsIndirect + GLenum *mode = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) * (int *) bp; bp += 4; + weglDrawElementsIndirect(*mode,*type,indirect); +}; break; +case 5729: { // glDrawElementsIndirect + GLenum *mode = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLvoid *indirect = (GLvoid *) bins[0]; + weglDrawElementsIndirect(*mode,*type,indirect); +}; break; +case 5730: { // glUniform1d + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *x = (GLdouble *) bp; bp += 8; + weglUniform1d(*location,*x); +}; break; +case 5731: { // glUniform2d + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *x = (GLdouble *) bp; bp += 8; + GLdouble *y = (GLdouble *) bp; bp += 8; + weglUniform2d(*location,*x,*y); +}; break; +case 5732: { // glUniform3d + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *x = (GLdouble *) bp; bp += 8; + GLdouble *y = (GLdouble *) bp; bp += 8; + GLdouble *z = (GLdouble *) bp; bp += 8; + weglUniform3d(*location,*x,*y,*z); +}; break; +case 5733: { // glUniform4d + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + GLdouble *x = (GLdouble *) bp; bp += 8; + GLdouble *y = (GLdouble *) bp; bp += 8; + GLdouble *z = (GLdouble *) bp; bp += 8; + GLdouble *w = (GLdouble *) bp; bp += 8; + weglUniform4d(*location,*x,*y,*z,*w); +}; break; +case 5734: { // glUniform1dv + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + int * valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += (8-((*valueLen*8+0)%8))%8; + weglUniform1dv(*location,*valueLen,value); +}; break; +case 5735: { // glUniform2dv + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*16; + weglUniform2dv(*location,*valueLen,value); +}; break; +case 5736: { // glUniform3dv + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*24; + weglUniform3dv(*location,*valueLen,value); +}; break; +case 5737: { // glUniform4dv + GLint *location = (GLint *) bp; bp += 4; + bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*32; + weglUniform4dv(*location,*valueLen,value); +}; break; +case 5738: { // glUniformMatrix2dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*32; + weglUniformMatrix2dv(*location,*valueLen,*transpose,value); +}; break; +case 5739: { // glUniformMatrix3dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*72; + weglUniformMatrix3dv(*location,*valueLen,*transpose,value); +}; break; +case 5740: { // glUniformMatrix4dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*128; + weglUniformMatrix4dv(*location,*valueLen,*transpose,value); +}; break; +case 5741: { // glUniformMatrix2x3dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*48; + weglUniformMatrix2x3dv(*location,*valueLen,*transpose,value); +}; break; +case 5742: { // glUniformMatrix2x4dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*64; + weglUniformMatrix2x4dv(*location,*valueLen,*transpose,value); +}; break; +case 5743: { // glUniformMatrix3x2dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*48; + weglUniformMatrix3x2dv(*location,*valueLen,*transpose,value); +}; break; +case 5744: { // glUniformMatrix3x4dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*96; + weglUniformMatrix3x4dv(*location,*valueLen,*transpose,value); +}; break; +case 5745: { // glUniformMatrix4x2dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*64; + weglUniformMatrix4x2dv(*location,*valueLen,*transpose,value); +}; break; +case 5746: { // glUniformMatrix4x3dv + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*96; + weglUniformMatrix4x3dv(*location,*valueLen,*transpose,value); +}; break; +case 5747: { // glGetUniformdv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLdouble params[16] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; + weglGetUniformdv(*program,*location,params); + int AP = 0; ErlDrvTermData rt[38]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble *paramsTmp = params; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5748: { // glGetSubroutineUniformLocation + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLint result = weglGetSubroutineUniformLocation(*program,*shadertype,name); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5749: { // glGetSubroutineIndex + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLchar *name = (GLchar *) bp; + int nameLen[1] = {strlen((char *)name)}; bp += nameLen[0]+1+((8-((1+nameLen[0]+0)%8))%8); + GLuint result = weglGetSubroutineIndex(*program,*shadertype,name); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5750: { // glGetActiveSubroutineUniformName + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLsizei *bufsize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLchar *name; + name = (GLchar *) driver_alloc(sizeof(GLchar) * *bufsize); + weglGetActiveSubroutineUniformName(*program,*shadertype,*index,*bufsize,length,name); + int AP = 0; ErlDrvTermData rt[7]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) name; rt[AP++] = *length; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(name); +}; break; +case 5751: { // glGetActiveSubroutineName + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLsizei *bufsize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLchar *name; + name = (GLchar *) driver_alloc(sizeof(GLchar) * *bufsize); + weglGetActiveSubroutineName(*program,*shadertype,*index,*bufsize,length,name); + int AP = 0; ErlDrvTermData rt[7]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) name; rt[AP++] = *length; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(name); +}; break; +case 5752: { // glUniformSubroutinesuiv + GLenum *shadertype = (GLenum *) bp; bp += 4; + int * indicesLen = (int *) bp; bp += 4; + GLuint * indices = (GLuint *) bp; bp += (8-((*indicesLen*4+0)%8))%8; + weglUniformSubroutinesuiv(*shadertype,*indicesLen,indices); +}; break; +case 5753: { // glGetUniformSubroutineuiv + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint params[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + weglGetUniformSubroutineuiv(*shadertype,*location,params); + int AP = 0; ErlDrvTermData rt[38]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLuint *paramsTmp = params; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 16; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5754: { // glGetProgramStageiv + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint values[1] = {0}; + weglGetProgramStageiv(*program,*shadertype,*pname,values); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *values; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5755: { // glPatchParameteri + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *value = (GLint *) bp; bp += 4; + weglPatchParameteri(*pname,*value); +}; break; +case 5756: { // glPatchParameterfv + GLenum *pname = (GLenum *) bp; bp += 4; + int * valuesLen = (int *) bp; bp += 4; + GLfloat * values = (GLfloat *) bp; bp += (8-((*valuesLen*4+0)%8))%8; + weglPatchParameterfv(*pname,values); +}; break; +case 5757: { // glBindTransformFeedback + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + weglBindTransformFeedback(*target,*id); +}; break; +case 5758: { // glDeleteTransformFeedbacks + int * idsLen = (int *) bp; bp += 4; + GLuint * ids = (GLuint *) bp; bp += (8-((*idsLen*4+4)%8))%8; + weglDeleteTransformFeedbacks(*idsLen,ids); +}; break; +case 5759: { // glGenTransformFeedbacks + GLsizei *n = (GLsizei *) bp; bp += 4; + GLuint *ids; + ids = (GLuint *) driver_alloc(sizeof(GLuint) * *n); + weglGenTransformFeedbacks(*n,ids); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*n)*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + for(int i=0; i < *n; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) ids[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(ids); +}; break; +case 5760: { // glIsTransformFeedback + GLuint *id = (GLuint *) bp; bp += 4; + GLboolean result = weglIsTransformFeedback(*id); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5761: { // glPauseTransformFeedback + weglPauseTransformFeedback(); +}; break; +case 5762: { // glResumeTransformFeedback + weglResumeTransformFeedback(); +}; break; +case 5763: { // glDrawTransformFeedback + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + weglDrawTransformFeedback(*mode,*id); +}; break; +case 5764: { // glDrawTransformFeedbackStream + GLenum *mode = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + GLuint *stream = (GLuint *) bp; bp += 4; + weglDrawTransformFeedbackStream(*mode,*id,*stream); +}; break; +case 5765: { // glBeginQueryIndexed + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + weglBeginQueryIndexed(*target,*index,*id); +}; break; +case 5766: { // glEndQueryIndexed + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + weglEndQueryIndexed(*target,*index); +}; break; +case 5767: { // glGetQueryIndexediv + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[1] = {0}; + weglGetQueryIndexediv(*target,*index,*pname,params); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5768: { // glReleaseShaderCompiler + weglReleaseShaderCompiler(); +}; break; +case 5769: { // glShaderBinary + int * shadersLen = (int *) bp; bp += 4; + GLuint * shaders = (GLuint *) bp; bp += (8-((*shadersLen*4+4)%8))%8; + GLenum *binaryformat = (GLenum *) bp; bp += 4; + GLvoid *binary = (GLvoid *) bins[0]; + GLsizei binary_size = bins_sz[0]; + weglShaderBinary(*shadersLen,shaders,*binaryformat,binary,binary_size); +}; break; +case 5770: { // glGetShaderPrecisionFormat + GLenum *shadertype = (GLenum *) bp; bp += 4; + GLenum *precisiontype = (GLenum *) bp; bp += 4; + GLint range[2] = {0,0}; + GLint precision[1] = {0}; + weglGetShaderPrecisionFormat(*shadertype,*precisiontype,range,precision); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLint *rangeTmp = range; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *rangeTmp++; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *rangeTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *precision; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5771: { // glDepthRangef + GLclampf *n = (GLclampf *) bp; bp += 4; + GLclampf *f = (GLclampf *) bp; bp += 4; + weglDepthRangef(*n,*f); +}; break; +case 5772: { // glClearDepthf + GLclampf *d = (GLclampf *) bp; bp += 4; + weglClearDepthf(*d); +}; break; +case 5773: { // glGetProgramBinary + GLuint *program = (GLuint *) bp; bp += 4; + GLsizei *bufSize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLenum binaryFormat[1] = {0}; + ErlDrvBinary *binary = driver_alloc_binary(*bufSize); + weglGetProgramBinary(*program,*bufSize,length,binaryFormat,(GLvoid*) binary->orig_bytes); + int AP = 0; ErlDrvTermData rt[12]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *binaryFormat; + rt[AP++] = ERL_DRV_BINARY; rt[AP++] = (ErlDrvTermData) binary; rt[AP++] = *length; rt[AP++] = 0; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free_binary(binary); +}; break; +case 5774: { // glProgramBinary + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *binaryFormat = (GLenum *) bp; bp += 4; + GLvoid *binary = (GLvoid *) bins[0]; + GLsizei binary_size = bins_sz[0]; + weglProgramBinary(*program,*binaryFormat,binary,binary_size); +}; break; +case 5775: { // glProgramParameteri + GLuint *program = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint *value = (GLint *) bp; bp += 4; + weglProgramParameteri(*program,*pname,*value); +}; break; +case 5776: { // glUseProgramStages + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLbitfield *stages = (GLbitfield *) bp; bp += 4; + GLuint *program = (GLuint *) bp; bp += 4; + weglUseProgramStages(*pipeline,*stages,*program); +}; break; +case 5777: { // glActiveShaderProgram + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLuint *program = (GLuint *) bp; bp += 4; + weglActiveShaderProgram(*pipeline,*program); +}; break; +case 5778: { // glCreateShaderProgramv + GLenum *type = (GLenum *) bp; bp += 4; + int * stringsLen = (int *) bp; bp += 4; + int * stringsTotSize = (int *) bp; bp += 4; + GLchar **strings; + strings = (GLchar **) driver_alloc(sizeof(GLchar *) * *stringsLen); + for(int i=0;i<*stringsLen;i++) { + strings[i] = (GLchar *) bp; bp += 1+strlen(bp);}; + bp += (8 - ((0 + *stringsTotSize) % 8)) % 8; + GLuint result = weglCreateShaderProgramv(*type,*stringsLen,(const GLchar **) strings); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(strings); +}; break; +case 5779: { // glBindProgramPipeline + GLuint *pipeline = (GLuint *) bp; bp += 4; + weglBindProgramPipeline(*pipeline); +}; break; +case 5780: { // glDeleteProgramPipelines + int * pipelinesLen = (int *) bp; bp += 4; + GLuint * pipelines = (GLuint *) bp; bp += (8-((*pipelinesLen*4+4)%8))%8; + weglDeleteProgramPipelines(*pipelinesLen,pipelines); +}; break; +case 5781: { // glGenProgramPipelines + GLsizei *n = (GLsizei *) bp; bp += 4; + GLuint *pipelines; + pipelines = (GLuint *) driver_alloc(sizeof(GLuint) * *n); + weglGenProgramPipelines(*n,pipelines); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(7 + (*n)*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + for(int i=0; i < *n; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) pipelines[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = (*n)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(pipelines); +}; break; +case 5782: { // glIsProgramPipeline + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLboolean result = weglIsProgramPipeline(*pipeline); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5783: { // glGetProgramPipelineiv + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLint params[1] = {0}; + weglGetProgramPipelineiv(*pipeline,*pname,params); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) *params; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5784: { // glProgramUniform1i + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLint *v0 = (GLint *) bp; bp += 4; + weglProgramUniform1i(*program,*location,*v0); +}; break; +case 5785: { // glProgramUniform1iv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int * valueLen = (int *) bp; bp += 4; + GLint * value = (GLint *) bp; bp += (8-((*valueLen*4+4)%8))%8; + weglProgramUniform1iv(*program,*location,*valueLen,value); +}; break; +case 5786: { // glProgramUniform1f + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLfloat *v0 = (GLfloat *) bp; bp += 4; + weglProgramUniform1f(*program,*location,*v0); +}; break; +case 5787: { // glProgramUniform1fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int * valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += (8-((*valueLen*4+4)%8))%8; + weglProgramUniform1fv(*program,*location,*valueLen,value); +}; break; +case 5788: { // glProgramUniform1d + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLdouble *v0 = (GLdouble *) bp; bp += 8; + weglProgramUniform1d(*program,*location,*v0); +}; break; +case 5789: { // glProgramUniform1dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int * valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += (8-((*valueLen*8+0)%8))%8; + weglProgramUniform1dv(*program,*location,*valueLen,value); +}; break; +case 5790: { // glProgramUniform1ui + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint *v0 = (GLuint *) bp; bp += 4; + weglProgramUniform1ui(*program,*location,*v0); +}; break; +case 5791: { // glProgramUniform1uiv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int * valueLen = (int *) bp; bp += 4; + GLuint * value = (GLuint *) bp; bp += (8-((*valueLen*4+4)%8))%8; + weglProgramUniform1uiv(*program,*location,*valueLen,value); +}; break; +case 5792: { // glProgramUniform2i + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLint *v0 = (GLint *) bp; bp += 4; + GLint *v1 = (GLint *) bp; bp += 4; + weglProgramUniform2i(*program,*location,*v0,*v1); +}; break; +case 5793: { // glProgramUniform2iv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLint * value = (GLint *) bp; bp += *valueLen*8; + weglProgramUniform2iv(*program,*location,*valueLen,value); +}; break; +case 5794: { // glProgramUniform2f + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLfloat *v0 = (GLfloat *) bp; bp += 4; + GLfloat *v1 = (GLfloat *) bp; bp += 4; + weglProgramUniform2f(*program,*location,*v0,*v1); +}; break; +case 5795: { // glProgramUniform2fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*8; + weglProgramUniform2fv(*program,*location,*valueLen,value); +}; break; +case 5796: { // glProgramUniform2d + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLdouble *v0 = (GLdouble *) bp; bp += 8; + GLdouble *v1 = (GLdouble *) bp; bp += 8; + weglProgramUniform2d(*program,*location,*v0,*v1); +}; break; +case 5797: { // glProgramUniform2dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*16; + weglProgramUniform2dv(*program,*location,*valueLen,value); +}; break; +case 5798: { // glProgramUniform2ui + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint *v0 = (GLuint *) bp; bp += 4; + GLuint *v1 = (GLuint *) bp; bp += 4; + weglProgramUniform2ui(*program,*location,*v0,*v1); +}; break; +case 5799: { // glProgramUniform2uiv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLuint * value = (GLuint *) bp; bp += *valueLen*8; + weglProgramUniform2uiv(*program,*location,*valueLen,value); +}; break; +case 5800: { // glProgramUniform3i + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLint *v0 = (GLint *) bp; bp += 4; + GLint *v1 = (GLint *) bp; bp += 4; + GLint *v2 = (GLint *) bp; bp += 4; + weglProgramUniform3i(*program,*location,*v0,*v1,*v2); +}; break; +case 5801: { // glProgramUniform3iv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLint * value = (GLint *) bp; bp += *valueLen*12; + weglProgramUniform3iv(*program,*location,*valueLen,value); +}; break; +case 5802: { // glProgramUniform3f + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLfloat *v0 = (GLfloat *) bp; bp += 4; + GLfloat *v1 = (GLfloat *) bp; bp += 4; + GLfloat *v2 = (GLfloat *) bp; bp += 4; + weglProgramUniform3f(*program,*location,*v0,*v1,*v2); +}; break; +case 5803: { // glProgramUniform3fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*12; + weglProgramUniform3fv(*program,*location,*valueLen,value); +}; break; +case 5804: { // glProgramUniform3d + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLdouble *v0 = (GLdouble *) bp; bp += 8; + GLdouble *v1 = (GLdouble *) bp; bp += 8; + GLdouble *v2 = (GLdouble *) bp; bp += 8; + weglProgramUniform3d(*program,*location,*v0,*v1,*v2); +}; break; +case 5805: { // glProgramUniform3dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*24; + weglProgramUniform3dv(*program,*location,*valueLen,value); +}; break; +case 5806: { // glProgramUniform3ui + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint *v0 = (GLuint *) bp; bp += 4; + GLuint *v1 = (GLuint *) bp; bp += 4; + GLuint *v2 = (GLuint *) bp; bp += 4; + weglProgramUniform3ui(*program,*location,*v0,*v1,*v2); +}; break; +case 5807: { // glProgramUniform3uiv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLuint * value = (GLuint *) bp; bp += *valueLen*12; + weglProgramUniform3uiv(*program,*location,*valueLen,value); +}; break; +case 5808: { // glProgramUniform4i + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLint *v0 = (GLint *) bp; bp += 4; + GLint *v1 = (GLint *) bp; bp += 4; + GLint *v2 = (GLint *) bp; bp += 4; + GLint *v3 = (GLint *) bp; bp += 4; + weglProgramUniform4i(*program,*location,*v0,*v1,*v2,*v3); +}; break; +case 5809: { // glProgramUniform4iv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLint * value = (GLint *) bp; bp += *valueLen*16; + weglProgramUniform4iv(*program,*location,*valueLen,value); +}; break; +case 5810: { // glProgramUniform4f + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLfloat *v0 = (GLfloat *) bp; bp += 4; + GLfloat *v1 = (GLfloat *) bp; bp += 4; + GLfloat *v2 = (GLfloat *) bp; bp += 4; + GLfloat *v3 = (GLfloat *) bp; bp += 4; + weglProgramUniform4f(*program,*location,*v0,*v1,*v2,*v3); +}; break; +case 5811: { // glProgramUniform4fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*16; + weglProgramUniform4fv(*program,*location,*valueLen,value); +}; break; +case 5812: { // glProgramUniform4d + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLdouble *v0 = (GLdouble *) bp; bp += 8; + GLdouble *v1 = (GLdouble *) bp; bp += 8; + GLdouble *v2 = (GLdouble *) bp; bp += 8; + GLdouble *v3 = (GLdouble *) bp; bp += 8; + weglProgramUniform4d(*program,*location,*v0,*v1,*v2,*v3); +}; break; +case 5813: { // glProgramUniform4dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*32; + weglProgramUniform4dv(*program,*location,*valueLen,value); +}; break; +case 5814: { // glProgramUniform4ui + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLuint *v0 = (GLuint *) bp; bp += 4; + GLuint *v1 = (GLuint *) bp; bp += 4; + GLuint *v2 = (GLuint *) bp; bp += 4; + GLuint *v3 = (GLuint *) bp; bp += 4; + weglProgramUniform4ui(*program,*location,*v0,*v1,*v2,*v3); +}; break; +case 5815: { // glProgramUniform4uiv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + int *valueLen = (int *) bp; bp += 4; + GLuint * value = (GLuint *) bp; bp += *valueLen*16; + weglProgramUniform4uiv(*program,*location,*valueLen,value); +}; break; +case 5816: { // glProgramUniformMatrix2fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*16; + weglProgramUniformMatrix2fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5817: { // glProgramUniformMatrix3fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*36; + weglProgramUniformMatrix3fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5818: { // glProgramUniformMatrix4fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*64; + weglProgramUniformMatrix4fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5819: { // glProgramUniformMatrix2dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*32; + weglProgramUniformMatrix2dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5820: { // glProgramUniformMatrix3dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*72; + weglProgramUniformMatrix3dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5821: { // glProgramUniformMatrix4dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*128; + weglProgramUniformMatrix4dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5822: { // glProgramUniformMatrix2x3fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*24; + weglProgramUniformMatrix2x3fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5823: { // glProgramUniformMatrix3x2fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*24; + weglProgramUniformMatrix3x2fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5824: { // glProgramUniformMatrix2x4fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*32; + weglProgramUniformMatrix2x4fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5825: { // glProgramUniformMatrix4x2fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*32; + weglProgramUniformMatrix4x2fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5826: { // glProgramUniformMatrix3x4fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*48; + weglProgramUniformMatrix3x4fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5827: { // glProgramUniformMatrix4x3fv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 3; + int *valueLen = (int *) bp; bp += 4; + GLfloat * value = (GLfloat *) bp; bp += *valueLen*48; + weglProgramUniformMatrix4x3fv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5828: { // glProgramUniformMatrix2x3dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*48; + weglProgramUniformMatrix2x3dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5829: { // glProgramUniformMatrix3x2dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*48; + weglProgramUniformMatrix3x2dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5830: { // glProgramUniformMatrix2x4dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*64; + weglProgramUniformMatrix2x4dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5831: { // glProgramUniformMatrix4x2dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*64; + weglProgramUniformMatrix4x2dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5832: { // glProgramUniformMatrix3x4dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*96; + weglProgramUniformMatrix3x4dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5833: { // glProgramUniformMatrix4x3dv + GLuint *program = (GLuint *) bp; bp += 4; + GLint *location = (GLint *) bp; bp += 4; + GLboolean *transpose = (GLboolean *) bp; bp += 1; + bp += 7; + int *valueLen = (int *) bp; bp += 8; + GLdouble * value = (GLdouble *) bp; bp += *valueLen*96; + weglProgramUniformMatrix4x3dv(*program,*location,*valueLen,*transpose,value); +}; break; +case 5834: { // glValidateProgramPipeline + GLuint *pipeline = (GLuint *) bp; bp += 4; + weglValidateProgramPipeline(*pipeline); +}; break; +case 5835: { // glGetProgramPipelineInfoLog + GLuint *pipeline = (GLuint *) bp; bp += 4; + GLsizei *bufSize = (GLsizei *) bp; bp += 4; + GLsizei length[1] = {0}; + GLchar *infoLog; + infoLog = (GLchar *) driver_alloc(sizeof(GLchar) * *bufSize); + weglGetProgramPipelineInfoLog(*pipeline,*bufSize,length,infoLog); + int AP = 0; ErlDrvTermData rt[7]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) infoLog; rt[AP++] = *length; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(infoLog); +}; break; +case 5836: { // glVertexAttribL1dv + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertexAttribL1dv(*index,v); +}; break; +case 5837: { // glVertexAttribL2dv + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertexAttribL2dv(*index,v); +}; break; +case 5838: { // glVertexAttribL3dv + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertexAttribL3dv(*index,v); +}; break; +case 5839: { // glVertexAttribL4dv + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLdouble *v = (GLdouble *) bp; bp += 8; + weglVertexAttribL4dv(*index,v); +}; break; +case 5840: { // glVertexAttribLPointer + GLuint *index = (GLuint *) bp; bp += 4; + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) * (int *) bp; bp += 4; + weglVertexAttribLPointer(*index,*size,*type,*stride,pointer); +}; break; +case 5841: { // glVertexAttribLPointer + GLuint *index = (GLuint *) bp; bp += 4; + GLint *size = (GLint *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLsizei *stride = (GLsizei *) bp; bp += 4; + GLvoid *pointer = (GLvoid *) bins[0]; + weglVertexAttribLPointer(*index,*size,*type,*stride,pointer); +}; break; +case 5842: { // glGetVertexAttribLdv + GLuint *index = (GLuint *) bp; bp += 4; + GLenum *pname = (GLenum *) bp; bp += 4; + GLdouble params[4] = {0.0,0.0,0.0,0.0}; + weglGetVertexAttribLdv(*index,*pname,params); + int AP = 0; ErlDrvTermData rt[14]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble *paramsTmp = params; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) paramsTmp++; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 4; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5843: { // glViewportArrayv + GLuint *first = (GLuint *) bp; bp += 4; + int *vLen = (int *) bp; bp += 4; + GLfloat * v = (GLfloat *) bp; bp += *vLen*16; + weglViewportArrayv(*first,*vLen,v); +}; break; +case 5844: { // glViewportIndexedf + GLuint *index = (GLuint *) bp; bp += 4; + GLfloat *x = (GLfloat *) bp; bp += 4; + GLfloat *y = (GLfloat *) bp; bp += 4; + GLfloat *w = (GLfloat *) bp; bp += 4; + GLfloat *h = (GLfloat *) bp; bp += 4; + weglViewportIndexedf(*index,*x,*y,*w,*h); +}; break; +case 5845: { // glViewportIndexedfv + GLuint *index = (GLuint *) bp; bp += 4; + GLfloat * v = (GLfloat *) bp; bp += 16; + weglViewportIndexedfv(*index,v); +}; break; +case 5846: { // glScissorArrayv + GLuint *first = (GLuint *) bp; bp += 4; + int *vLen = (int *) bp; bp += 4; + GLint * v = (GLint *) bp; bp += *vLen*16; + weglScissorArrayv(*first,*vLen,v); +}; break; +case 5847: { // glScissorIndexed + GLuint *index = (GLuint *) bp; bp += 4; + GLint *left = (GLint *) bp; bp += 4; + GLint *bottom = (GLint *) bp; bp += 4; + GLsizei *width = (GLsizei *) bp; bp += 4; + GLsizei *height = (GLsizei *) bp; bp += 4; + weglScissorIndexed(*index,*left,*bottom,*width,*height); +}; break; +case 5848: { // glScissorIndexedv + GLuint *index = (GLuint *) bp; bp += 4; + GLint * v = (GLint *) bp; bp += 16; + weglScissorIndexedv(*index,v); +}; break; +case 5849: { // glDepthRangeArrayv + GLuint *first = (GLuint *) bp; bp += 4; + bp += 4; + int *vLen = (int *) bp; bp += 8; + GLclampd * v = (GLclampd *) bp; bp += *vLen*16; + weglDepthRangeArrayv(*first,*vLen,v); +}; break; +case 5850: { // glDepthRangeIndexed + GLuint *index = (GLuint *) bp; bp += 4; + bp += 4; + GLclampd *n = (GLclampd *) bp; bp += 8; + GLclampd *f = (GLclampd *) bp; bp += 8; + weglDepthRangeIndexed(*index,*n,*f); +}; break; +case 5851: { // glGetFloati_v + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLfloat data[16] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; + weglGetFloati_v(*target,*index,data); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble dataConv[16], *dataTmp = dataConv; + for(int i=0; i < 16; i++) dataConv[i] = (GLdouble) data[i]; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5852: { // glGetDoublei_v + GLenum *target = (GLenum *) bp; bp += 4; + GLuint *index = (GLuint *) bp; bp += 4; + GLdouble data[16] = {0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}; + weglGetDoublei_v(*target,*index,data); + int AP = 0; ErlDrvTermData rt[39]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + GLdouble *dataTmp = data; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_FLOAT; rt[AP++] = (ErlDrvTermData) dataTmp++; + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = 16+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5853: { // glDebugMessageControlARB + GLenum *source = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLenum *severity = (GLenum *) bp; bp += 4; + int * idsLen = (int *) bp; bp += 4; + GLuint * ids = (GLuint *) bp; bp += (8-((*idsLen*4+0)%8))%8; + GLboolean *enabled = (GLboolean *) bp; bp += 1; + weglDebugMessageControlARB(*source,*type,*severity,*idsLen,ids,*enabled); +}; break; +case 5854: { // glDebugMessageInsertARB + GLenum *source = (GLenum *) bp; bp += 4; + GLenum *type = (GLenum *) bp; bp += 4; + GLuint *id = (GLuint *) bp; bp += 4; + GLenum *severity = (GLenum *) bp; bp += 4; + GLchar *buf = (GLchar *) bp; + int bufLen[1] = {strlen((char *)buf)}; bp += bufLen[0]+1+((8-((1+bufLen[0]+0)%8))%8); + weglDebugMessageInsertARB(*source,*type,*id,*severity,*bufLen,buf); +}; break; +case 5855: { // glGetDebugMessageLogARB + GLuint *count = (GLuint *) bp; bp += 4; + GLsizei *bufsize = (GLsizei *) bp; bp += 4; + GLenum *sources; + sources = (GLenum *) driver_alloc(sizeof(GLenum) * *count); + GLenum *types; + types = (GLenum *) driver_alloc(sizeof(GLenum) * *count); + GLuint *ids; + ids = (GLuint *) driver_alloc(sizeof(GLuint) * *count); + GLenum *severities; + severities = (GLenum *) driver_alloc(sizeof(GLenum) * *count); + GLsizei *lengths; + lengths = (GLsizei *) driver_alloc(sizeof(GLsizei) * *count); + GLchar *messageLog; + messageLog = (GLchar *) driver_alloc(sizeof(GLchar) * *bufsize); + GLuint result = weglGetDebugMessageLogARB(*count,*bufsize,sources,types,ids,severities,lengths,messageLog); + int AP = 0; ErlDrvTermData *rt; + rt = (ErlDrvTermData *) driver_alloc(sizeof(ErlDrvTermData)*(23 + result*3 + result*2 + result*2 + result*2 + result*2)); + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + for(int i=0; i < (int) result; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) sources[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + for(int i=0; i < (int) result; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) types[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + for(int i=0; i < (int) result; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) ids[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + for(int i=0; i < (int) result; i++) { + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) severities[i];} + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + for(int i=0; i < (int) result; i++) { + rt[AP++] = ERL_DRV_STRING; rt[AP++] = (ErlDrvTermData) messageLog; rt[AP++] = lengths[i]-1; + messageLog += lengths[i]; } + rt[AP++] = ERL_DRV_NIL; rt[AP++] = ERL_DRV_LIST; rt[AP++] = ((int) result)+1; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 6; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); + driver_free(rt); + driver_free(messageLog); + driver_free(lengths); + driver_free(severities); + driver_free(ids); + driver_free(types); + driver_free(sources); +}; break; +case 5856: { // glGetGraphicsResetStatusARB + GLenum result = weglGetGraphicsResetStatusARB(); + int AP = 0; ErlDrvTermData rt[6]; + rt[AP++]=ERL_DRV_ATOM; rt[AP++]=driver_mk_atom((char *) "_egl_result_"); + rt[AP++] = ERL_DRV_INT; rt[AP++] = (ErlDrvSInt) result; + rt[AP++] = ERL_DRV_TUPLE; rt[AP++] = 2; + driver_send_term(port,caller,rt,AP); +}; break; +case 5857: { // glResizeBuffersMESA weglResizeBuffersMESA(); }; break; -case 5677: { // glWindowPos4dvMESA +case 5858: { // glWindowPos4dvMESA GLdouble *v = (GLdouble *) bp; bp += 8; weglWindowPos4dvMESA(v); }; break; -case 5678: { // glWindowPos4fvMESA +case 5859: { // glWindowPos4fvMESA GLfloat *v = (GLfloat *) bp; bp += 4; weglWindowPos4fvMESA(v); }; break; -case 5679: { // glWindowPos4ivMESA +case 5860: { // glWindowPos4ivMESA GLint *v = (GLint *) bp; bp += 4; weglWindowPos4ivMESA(v); }; break; -case 5680: { // glWindowPos4svMESA +case 5861: { // glWindowPos4svMESA GLshort *v = (GLshort *) bp; bp += 2; weglWindowPos4svMESA(v); }; break; -case 5681: { // glDepthBoundsEXT +case 5862: { // glDepthBoundsEXT GLclampd *zmin = (GLclampd *) bp; bp += 8; GLclampd *zmax = (GLclampd *) bp; bp += 8; weglDepthBoundsEXT(*zmin,*zmax); }; break; -case 5682: { // glStencilClearTagEXT +case 5863: { // glStencilClearTagEXT GLsizei *stencilTagBits = (GLsizei *) bp; bp += 4; GLuint *stencilClearTag = (GLuint *) bp; bp += 4; weglStencilClearTagEXT(*stencilTagBits,*stencilClearTag); |