Changeset 78375 in vbox for trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c
- Timestamp:
- May 3, 2019 9:51:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c
r78190 r78375 19 19 } 20 20 #endif 21 crStateFogCoordPointerEXT( type, stride, pointer );21 crStateFogCoordPointerEXT(&pack_spu.StateTracker, type, stride, pointer ); 22 22 } 23 23 … … 30 30 } 31 31 #endif 32 crStateColorPointer( size, type, stride, pointer );32 crStateColorPointer(&pack_spu.StateTracker, size, type, stride, pointer ); 33 33 } 34 34 … … 41 41 } 42 42 #endif 43 crStateSecondaryColorPointerEXT( size, type, stride, pointer );43 crStateSecondaryColorPointerEXT(&pack_spu.StateTracker, size, type, stride, pointer ); 44 44 } 45 45 … … 53 53 } 54 54 #endif 55 crStateVertexPointer( size, type, stride, pointer );55 crStateVertexPointer(&pack_spu.StateTracker, size, type, stride, pointer ); 56 56 } 57 57 … … 64 64 } 65 65 #endif 66 crStateTexCoordPointer( size, type, stride, pointer );66 crStateTexCoordPointer(&pack_spu.StateTracker, size, type, stride, pointer ); 67 67 } 68 68 … … 75 75 } 76 76 #endif 77 crStateNormalPointer( type, stride, pointer );77 crStateNormalPointer(&pack_spu.StateTracker, type, stride, pointer ); 78 78 } 79 79 … … 86 86 } 87 87 #endif 88 crStateEdgeFlagPointer( stride, pointer );88 crStateEdgeFlagPointer(&pack_spu.StateTracker, stride, pointer ); 89 89 } 90 90 … … 97 97 } 98 98 #endif 99 crStateVertexAttribPointerARB( index, size, type, normalized, stride, pointer );99 crStateVertexAttribPointerARB(&pack_spu.StateTracker, index, size, type, normalized, stride, pointer ); 100 100 } 101 101 … … 108 108 } 109 109 #endif 110 crStateVertexAttribPointerNV( index, size, type, stride, pointer );110 crStateVertexAttribPointerNV(&pack_spu.StateTracker, index, size, type, stride, pointer ); 111 111 } 112 112 … … 119 119 } 120 120 #endif 121 crStateIndexPointer( type, stride, pointer);121 crStateIndexPointer(&pack_spu.StateTracker, type, stride, pointer); 122 122 } 123 123 124 124 void PACKSPU_APIENTRY packspu_GetPointerv( GLenum pname, GLvoid **params ) 125 125 { 126 crStateGetPointerv( pname, params );126 crStateGetPointerv(&pack_spu.StateTracker, pname, params ); 127 127 } 128 128 … … 138 138 /*crDebug("packspu_InterleavedArrays");*/ 139 139 140 crStateInterleavedArrays( format, stride, pointer );140 crStateInterleavedArrays(&pack_spu.StateTracker, format, stride, pointer ); 141 141 } 142 142 … … 219 219 #ifdef DEBUG 220 220 { 221 CRContext *pCurState = crStateGetCurrent( );221 CRContext *pCurState = crStateGetCurrent(&pack_spu.StateTracker); 222 222 223 223 Assert(g == pCurState); … … 282 282 { 283 283 CRContext *g = pRestoreCtx->pCtx->clientState; 284 CRContext *pCurState = crStateGetCurrent( );284 CRContext *pCurState = crStateGetCurrent(&pack_spu.StateTracker); 285 285 286 286 Assert(g == pCurState); … … 319 319 if (ctx->clientState->extensions.ARB_vertex_buffer_object) 320 320 { 321 serverArrays = crStateUseServerArrays( );321 serverArrays = crStateUseServerArrays(&pack_spu.StateTracker); 322 322 if (ctx->fCheckZerroVertAttr) 323 323 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib); … … 395 395 { 396 396 GET_CONTEXT(ctx); 397 elementsBuffer = crStateGetCurrent( )->bufferobject.elementsBuffer;397 elementsBuffer = crStateGetCurrent(&pack_spu.StateTracker)->bufferobject.elementsBuffer; 398 398 /*crDebug("DrawElements count=%d, indices=%p", count, indices);*/ 399 399 if (ctx->clientState->extensions.ARB_vertex_buffer_object) 400 400 { 401 serverArrays = crStateUseServerArrays( );401 serverArrays = crStateUseServerArrays(&pack_spu.StateTracker); 402 402 if (ctx->fCheckZerroVertAttr) 403 403 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib); … … 452 452 if ((max-min)<(GLuint)(2*count)) 453 453 { 454 crStateLockArraysEXT( min, max-min+1);454 crStateLockArraysEXT(&pack_spu.StateTracker, min, max-min+1); 455 455 456 456 serverArrays = crStateUseServerArrays(); … … 461 461 else 462 462 { 463 crStateUnlockArraysEXT( );463 crStateUnlockArraysEXT(&pack_spu.StateTracker); 464 464 } 465 465 } … … 539 539 if (ctx->clientState->extensions.ARB_vertex_buffer_object) 540 540 { 541 serverArrays = crStateUseServerArrays( );541 serverArrays = crStateUseServerArrays(&pack_spu.StateTracker); 542 542 if (ctx->fCheckZerroVertAttr) 543 543 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib); … … 608 608 if (ctx->clientState->extensions.ARB_vertex_buffer_object) 609 609 { 610 serverArrays = crStateUseServerArrays( );610 serverArrays = crStateUseServerArrays(&pack_spu.StateTracker); 611 611 if (ctx->fCheckZerroVertAttr) 612 612 cZvaValues = crStateNeedDummyZeroVertexArray(thread->currentContext->clientState, &thread->packer->current, aAttrib); … … 617 617 if (!serverArrays && !ctx->clientState->client.array.locked && (count>3)) 618 618 { 619 crStateLockArraysEXT( first, count);620 serverArrays = crStateUseServerArrays( );619 crStateLockArraysEXT(&pack_spu.StateTracker, first, count); 620 serverArrays = crStateUseServerArrays(&pack_spu.StateTracker); 621 621 if (serverArrays) 622 622 { … … 625 625 else 626 626 { 627 crStateUnlockArraysEXT( );627 crStateUnlockArraysEXT(&pack_spu.StateTracker); 628 628 } 629 629 } … … 714 714 void PACKSPU_APIENTRY packspu_EnableClientState( GLenum array ) 715 715 { 716 crStateEnableClientState( array);716 crStateEnableClientState(&pack_spu.StateTracker, array); 717 717 crPackEnableClientState(array); 718 718 } … … 720 720 void PACKSPU_APIENTRY packspu_DisableClientState( GLenum array ) 721 721 { 722 crStateDisableClientState( array);722 crStateDisableClientState(&pack_spu.StateTracker, array); 723 723 crPackDisableClientState(array); 724 724 } … … 726 726 void PACKSPU_APIENTRY packspu_ClientActiveTextureARB( GLenum texUnit ) 727 727 { 728 crStateClientActiveTextureARB( texUnit);728 crStateClientActiveTextureARB(&pack_spu.StateTracker, texUnit); 729 729 crPackClientActiveTextureARB(texUnit); 730 730 } … … 732 732 void PACKSPU_APIENTRY packspu_EnableVertexAttribArrayARB(GLuint index) 733 733 { 734 crStateEnableVertexAttribArrayARB( index);734 crStateEnableVertexAttribArrayARB(&pack_spu.StateTracker, index); 735 735 crPackEnableVertexAttribArrayARB(index); 736 736 } … … 739 739 void PACKSPU_APIENTRY packspu_DisableVertexAttribArrayARB(GLuint index) 740 740 { 741 crStateDisableVertexAttribArrayARB( index);741 crStateDisableVertexAttribArrayARB(&pack_spu.StateTracker, index); 742 742 crPackDisableVertexAttribArrayARB(index); 743 743 } … … 747 747 if (cap!=GL_LIGHT_MODEL_TWO_SIDE) 748 748 { 749 crStateEnable( cap);749 crStateEnable(&pack_spu.StateTracker, cap); 750 750 crPackEnable(cap); 751 751 } … … 758 758 g_glmts1_warn=1; 759 759 } 760 crStateLightModeli( GL_LIGHT_MODEL_TWO_SIDE, 1);760 crStateLightModeli(&pack_spu.StateTracker, GL_LIGHT_MODEL_TWO_SIDE, 1); 761 761 crPackLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 1); 762 762 } … … 768 768 if (cap!=GL_LIGHT_MODEL_TWO_SIDE) 769 769 { 770 crStateDisable( cap);770 crStateDisable(&pack_spu.StateTracker, cap); 771 771 crPackDisable(cap); 772 772 } … … 779 779 g_glmts0_warn=1; 780 780 } 781 crStateLightModeli( GL_LIGHT_MODEL_TWO_SIDE, 0);781 crStateLightModeli(&pack_spu.StateTracker, GL_LIGHT_MODEL_TWO_SIDE, 0); 782 782 crPackLightModeli(GL_LIGHT_MODEL_TWO_SIDE, 0); 783 783 } … … 786 786 GLboolean PACKSPU_APIENTRY packspu_IsEnabled(GLenum cap) 787 787 { 788 GLboolean res = crStateIsEnabled( cap);788 GLboolean res = crStateIsEnabled(&pack_spu.StateTracker, cap); 789 789 #ifdef DEBUG 790 790 { … … 804 804 void PACKSPU_APIENTRY packspu_PushClientAttrib( GLbitfield mask ) 805 805 { 806 crStatePushClientAttrib( mask);806 crStatePushClientAttrib(&pack_spu.StateTracker, mask); 807 807 crPackPushClientAttrib(mask); 808 808 } … … 810 810 void PACKSPU_APIENTRY packspu_PopClientAttrib( void ) 811 811 { 812 crStatePopClientAttrib( );812 crStatePopClientAttrib(&pack_spu.StateTracker); 813 813 crPackPopClientAttrib(); 814 814 } … … 818 818 if (first>=0 && count>0) 819 819 { 820 crStateLockArraysEXT( first, count);820 crStateLockArraysEXT(&pack_spu.StateTracker, first, count); 821 821 /*Note: this is a workaround for quake3 based apps. 822 822 It's modifying vertex data between glLockArraysEXT and glDrawElements calls, … … 838 838 } 839 839 840 crStateUnlockArraysEXT( );841 } 840 crStateUnlockArraysEXT(&pack_spu.StateTracker); 841 }
Note:
See TracChangeset
for help on using the changeset viewer.