void crUnpackTexImage3DEXT( void ) { GLenum target = READ_DATA( sizeof( int ) + 0, GLenum ); GLint level = READ_DATA( sizeof( int ) + 4, GLint ); GLenum internalformat = READ_DATA( sizeof( int ) + 8, GLint ); GLsizei width = READ_DATA( sizeof( int ) + 12, GLsizei ); GLsizei height = READ_DATA( sizeof( int ) + 16, GLsizei ); GLsizei depth = READ_DATA( sizeof( int ) + 20, GLsizei ); GLint border = READ_DATA( sizeof( int ) + 24, GLint ); GLenum format = READ_DATA( sizeof( int ) + 28, GLenum ); GLenum type = READ_DATA( sizeof( int ) + 32, GLenum ); int noimagedata = READ_DATA( sizeof( int ) + 36, int ); GLvoid *pixels; /*If there's no imagedata send, it's either that passed pointer was NULL or there was GL_PIXEL_UNPACK_BUFFER_ARB bound, in both cases 4bytes of passed pointer would convert to either NULL or offset in the bound buffer. */ if ( noimagedata ) pixels = (void*) (uintptr_t) READ_DATA(sizeof(int)+40, GLint); else pixels = DATA_POINTER( sizeof( int ) + 44, GLvoid ); cr_unpackDispatch.TexImage3DEXT(target, level, internalformat, width, height, depth, border, format, type, pixels); INCR_VAR_PTR(); }
void crUnpackExtendShaderSource(void) { GLint *length = NULL; GLuint shader = READ_DATA(8, GLuint); GLsizei count = READ_DATA(12, GLsizei); GLint hasNonLocalLen = READ_DATA(16, GLsizei); GLint *pLocalLength = DATA_POINTER(20, GLint); const char **ppStrings = NULL; GLsizei i; int pos=20+count*sizeof(*pLocalLength); if (hasNonLocalLen>0) { length = DATA_POINTER(pos, GLint); pos += count*sizeof(*length); } ppStrings = crAlloc(count*sizeof(char*)); if (!ppStrings) return; for (i=0; i<count; ++i) { ppStrings[i] = DATA_POINTER(pos, char); pos += pLocalLength[i]; if (!length) { pLocalLength[i] -= 1; } } cr_unpackDispatch.ShaderSource(shader, count, ppStrings, length ? length : pLocalLength); crFree(ppStrings); }
void crUnpackExtendFogCoordPointerEXT(void) { GLenum type = READ_DATA( 8, GLenum ); GLsizei stride = READ_DATA( 12, GLsizei ); GLintptrARB pointer = READ_DATA( 16, GLuint ); cr_unpackDispatch.FogCoordPointerEXT( type, stride, (void *) pointer ); }
void crUnpackExtendLockArraysEXT(void) { GLint first = READ_DATA(sizeof(int) + 4, GLint); GLint count = READ_DATA(sizeof(int) + 8, GLint); int numenabled = READ_DATA(sizeof(int) + 12, int); CRContext *g = crStateGetCurrent(); CRClientState *c = &g->client; CRClientPointer *cp; int i, index, offset; unsigned char *data; offset = 2*sizeof(int)+12; /*crDebug("crUnpackExtendLockArraysEXT(%i, %i) ne=%i", first, count, numenabled);*/ for (i=0; i<numenabled; ++i) { index = READ_DATA(offset, int); offset += sizeof(int); cp = crStateGetClientPointerByIndex(index, &c->array); CRASSERT(cp && cp->enabled && (!cp->buffer || !cp->buffer->id)); data = crAlloc((first+count)*cp->bytesPerIndex); crMemcpy(data+first*cp->bytesPerIndex, DATA_POINTER(offset, GLvoid), count*cp->bytesPerIndex); offset += count*cp->bytesPerIndex; /*crDebug("crUnpackExtendLockArraysEXT: old cp(%i): en/l=%i(%i) p=%p size=%i type=0x%x n=%i str=%i pp=%p pstr=%i", index, cp->enabled, cp->locked, cp->p, cp->size, cp->type, cp->normalized, cp->stride, cp->prevPtr, cp->prevStride);*/ crUnpackSetClientPointerByIndex(index, cp->size, cp->type, cp->normalized, 0, data, c); /*crDebug("crUnpackExtendLockArraysEXT: new cp(%i): en/l=%i(%i) p=%p size=%i type=0x%x n=%i str=%i pp=%p pstr=%i", index, cp->enabled, cp->locked, cp->p, cp->size, cp->type, cp->normalized, cp->stride, cp->prevPtr, cp->prevStride);*/ } cr_unpackDispatch.LockArraysEXT(first, count); }
void crUnpackExtendNormalPointer(void) { GLenum type = READ_DATA( 8, GLenum ); GLsizei stride = READ_DATA( 12, GLsizei ); GLintptrARB pointer = READ_DATA( 16, GLuint ); cr_unpackDispatch.NormalPointer( type, stride, (void *) pointer ); }
void crUnpackExtendInterleavedArrays(void) { GLenum format = READ_DATA( 8, GLenum ); GLsizei stride = READ_DATA( 12, GLsizei ); GLintptrARB pointer = READ_DATA( 16, GLuint ); cr_unpackDispatch.InterleavedArrays( format, stride, (void *) pointer ); }
void crUnpackExtendCompressedTexSubImage3DARB( void ) { GLenum target = READ_DATA( 4 + sizeof(int) + 0, GLenum ); GLint level = READ_DATA( 4 + sizeof(int) + 4, GLint ); GLint xoffset = READ_DATA( 4 + sizeof(int) + 8, GLint ); GLint yoffset = READ_DATA( 4 + sizeof(int) + 12, GLint ); GLint zoffset = READ_DATA( 4 + sizeof(int) + 16, GLint ); GLsizei width = READ_DATA( 4 + sizeof(int) + 20, GLsizei ); GLsizei height = READ_DATA( 4 + sizeof(int) + 24, GLsizei ); GLsizei depth = READ_DATA( 4 + sizeof(int) + 28, GLsizei ); GLenum format = READ_DATA( 4 + sizeof(int) + 32, GLenum ); GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 36, GLsizei ); int is_null = READ_DATA( 4 + sizeof(int) + 40, int ); GLvoid *pixels; if( is_null ) pixels = NULL; else pixels = DATA_POINTER( 4 + sizeof(int) + 44, GLvoid ); cr_unpackDispatch.CompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imagesize, pixels); }
void crUnpackExtendUniform2fv(void) { GLint location = READ_DATA(8, GLint); GLsizei count = READ_DATA(12, GLsizei); const GLfloat *value = DATA_POINTER(16, const GLfloat); cr_unpackDispatch.Uniform2fv(location, count, value); }
void crUnpackExtendWindowVisibleRegion( void ) { GLint window = READ_DATA( 8, GLint ); GLint cRects = READ_DATA( 12, GLint ); GLvoid *pRects = DATA_POINTER( 16, GLvoid );; cr_unpackDispatch.WindowVisibleRegion( window, cRects, pRects ); }
void crUnpackExtendSecondaryColorPointerEXT(void) { GLint size = READ_DATA( 8, GLint ); GLenum type = READ_DATA( 12, GLenum ); GLsizei stride = READ_DATA( 16, GLsizei ); GLintptrARB pointer = READ_DATA( 20, GLuint ); cr_unpackDispatch.SecondaryColorPointerEXT( size, type, stride, (void *) pointer ); }
void crUnpackExtendTexCoordPointer(void) { GLint size = READ_DATA( 8, GLint ); GLenum type = READ_DATA( 12, GLenum ); GLsizei stride = READ_DATA( 16, GLsizei ); GLintptrARB pointer = READ_DATA( 20, GLuint ); cr_unpackDispatch.TexCoordPointer( size, type, stride, (void *) pointer ); }
void crUnpackExtendDrawElements(void) { GLenum mode = READ_DATA( 8, GLenum ); GLsizei count = READ_DATA( 12, GLsizei ); GLenum type = READ_DATA( 16, GLenum ); GLintptrARB indices = READ_DATA( 20, GLintptrARB ); cr_unpackDispatch.DrawElements( mode, count, type, (void *) indices); }
void crUnpackExtendGetShaderSource(void) { GLuint shader = READ_DATA(8, GLuint); GLsizei bufSize = READ_DATA(12, GLsizei); SET_RETURN_PTR(16); SET_WRITEBACK_PTR(24); cr_unpackDispatch.GetShaderSource(shader, bufSize, NULL, NULL); }
void crUnpackExtendGetUniformsLocations(void) { GLuint program = READ_DATA(8, GLuint); GLsizei maxcbData = READ_DATA(12, GLsizei); SET_RETURN_PTR(16); SET_WRITEBACK_PTR(24); cr_unpackDispatch.GetUniformsLocations(program, maxcbData, NULL, NULL); }
void crUnpackExtendProgramStringARB(void) { GLenum target = READ_DATA(8, GLenum); GLenum format = READ_DATA(12, GLuint); GLsizei len = READ_DATA(16, GLsizei); GLvoid *program = DATA_POINTER(20, GLvoid); cr_unpackDispatch.ProgramStringARB(target, format, len, program); }
void crUnpackExtendGetProgramInfoLog(void) { GLuint program = READ_DATA(8, GLuint); GLsizei bufSize = READ_DATA(12, GLsizei); SET_RETURN_PTR(16); SET_WRITEBACK_PTR(24); cr_unpackDispatch.GetProgramInfoLog(program, bufSize, NULL, NULL); }
void crUnpackExtendGetAttachedShaders(void) { GLuint program = READ_DATA(8, GLuint); GLsizei maxCount = READ_DATA(12, GLsizei); SET_RETURN_PTR(16); SET_WRITEBACK_PTR(24); cr_unpackDispatch.GetAttachedShaders(program, maxCount, NULL, NULL); }
void crUnpackExtendGetAttachedObjectsARB(void) { VBoxGLhandleARB containerObj = READ_DATA(8, VBoxGLhandleARB); GLsizei maxCount = READ_DATA(12, GLsizei); SET_RETURN_PTR(16); SET_WRITEBACK_PTR(24); cr_unpackDispatch.GetAttachedObjectsARB(containerObj, maxCount, NULL, NULL); }
void crUnpackExtendUniformMatrix4x3fv(void) { GLint location = READ_DATA(8, GLint); GLsizei count = READ_DATA(12, GLsizei); GLboolean transpose = READ_DATA(16, GLboolean); const GLfloat *value = DATA_POINTER(16+sizeof(GLboolean), const GLfloat); cr_unpackDispatch.UniformMatrix4x3fv(location, count, transpose, value); }
void crUnpackExtendBindAttribLocation(void) { GLuint program = READ_DATA(8, GLuint); GLuint index = READ_DATA(12, GLuint); const char *name = DATA_POINTER(16, const char); cr_unpackDispatch.BindAttribLocation(program, index, name); }
void crUnpackExtendLoadProgramNV(void) { GLenum target = READ_DATA(8, GLenum); GLuint id = READ_DATA(12, GLuint); GLsizei len = READ_DATA(16, GLsizei); GLvoid *program = DATA_POINTER(20, GLvoid); cr_unpackDispatch.LoadProgramNV(target, id, len, program); }
void crUnpackExtendGetInfoLogARB(void) { VBoxGLhandleARB obj = READ_DATA(8, VBoxGLhandleARB); GLsizei maxLength = READ_DATA(12, GLsizei); SET_RETURN_PTR(16); SET_WRITEBACK_PTR(24); cr_unpackDispatch.GetInfoLogARB(obj, maxLength, NULL, NULL); }
void crUnpackTexParameteri( void ) { GLenum target = READ_DATA( sizeof( int ) + 0, GLenum ); GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum ); GLint param = READ_DATA( sizeof( int ) + 8, GLint ); cr_unpackDispatch.TexParameteri( target, pname, param ); INCR_VAR_PTR(); }
void crUnpackExtendVertexAttribPointerNV(void) { GLuint index = READ_DATA( 8, GLuint); GLint size = READ_DATA( 12, GLint ); GLenum type = READ_DATA( 16, GLenum ); GLsizei stride = READ_DATA( 20, GLsizei ); GLintptrARB pointer = READ_DATA( 24, GLuint ); cr_unpackDispatch.VertexAttribPointerNV( index, size, type, stride, (void *) pointer ); }
void crUnpackCallLists( void ) { GLint n = READ_DATA( sizeof( int ) + 0, GLint ); GLenum type = READ_DATA( sizeof( int ) + 4, GLenum ); GLvoid *lists = DATA_POINTER( sizeof( int ) + 8, GLvoid ); cr_unpackDispatch.CallLists( n, type, lists ); INCR_VAR_PTR(); }
void crUnpackExtendGetActiveUniform(void) { GLuint program = READ_DATA(8, GLuint); GLuint index = READ_DATA(12, GLuint); GLsizei bufSize = READ_DATA(16, GLsizei); SET_RETURN_PTR(20); SET_WRITEBACK_PTR(28); cr_unpackDispatch.GetActiveUniform(program, index, bufSize, NULL, NULL, NULL, NULL); }
void crUnpackExtendBufferSubDataARB( void ) { GLenum target = READ_DATA( sizeof(int) + 4, GLenum ); GLintptrARB offset = READ_DATA( sizeof(int) + 8, GLintptrARB ); GLsizeiptrARB size = READ_DATA( sizeof(int) + 12, GLsizeiptrARB ); GLvoid *data = DATA_POINTER( sizeof(int) + 16, GLvoid ); cr_unpackDispatch.BufferSubDataARB( target, offset, size, data ); }
void crUnpackTexEnviv( void ) { GLenum target = READ_DATA( sizeof( int ) + 0, GLenum ); GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum ); GLint *params = DATA_POINTER( sizeof( int ) + 8, GLint ); cr_unpackDispatch.TexEnviv( target, pname, params ); INCR_VAR_PTR(); }
void crUnpackTexGeniv( void ) { GLenum coord = READ_DATA( sizeof( int ) + 0, GLenum ); GLenum pname = READ_DATA( sizeof( int ) + 4, GLenum ); GLint *params = DATA_POINTER( sizeof( int ) + 8, GLint ); cr_unpackDispatch.TexGeniv( coord, pname, params ); INCR_VAR_PTR(); }
void crUnpackExtendGetProgramNamedParameterfvNV(void) { GLuint id = READ_DATA(8, GLuint); GLsizei len = READ_DATA(12, GLsizei); const GLubyte *name = DATA_POINTER(16, GLubyte); SET_RETURN_PTR(16+len); SET_WRITEBACK_PTR(16+len+8); cr_unpackDispatch.GetProgramNamedParameterfvNV(id, len, name, NULL); }