Changeset 78375 in vbox for trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_stencil.c
- Timestamp:
- May 3, 2019 9:51:02 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_stencil.c
r69392 r78375 11 11 12 12 13 static GLint crStateStencilBufferGetIdxAndCount( CRStencilState *s, GLenum face, GLint *pIdx, GLint *pBitsIdx)13 static GLint crStateStencilBufferGetIdxAndCount(PCRStateTracker pState, CRStencilState *s, GLenum face, GLint *pIdx, GLint *pBitsIdx) 14 14 { 15 15 switch (face) … … 39 39 return 1; 40 40 default: 41 crStateError( __LINE__,__FILE__,GL_INVALID_ENUM, "crStateStencilBufferGetIdxAndCount");41 crStateError(pState, __LINE__,__FILE__,GL_INVALID_ENUM, "crStateStencilBufferGetIdxAndCount"); 42 42 return 0; 43 43 } … … 68 68 { 69 69 CRStencilState *s = &ctx->stencil; 70 CRStateBits *stateb = GetCurrentBits( );70 CRStateBits *stateb = GetCurrentBits(ctx->pStateTracker); 71 71 CRStencilBits *sb = &(stateb->stencil); 72 72 int i; … … 108 108 } 109 109 110 static void crStateStencilFuncPerform( GLenum face, GLenum func, GLint ref, GLuint mask)111 { 112 CRContext *g = GetCurrentContext( );110 static void crStateStencilFuncPerform(PCRStateTracker pState, GLenum face, GLenum func, GLint ref, GLuint mask) 111 { 112 CRContext *g = GetCurrentContext(pState); 113 113 CRStencilState *s = &(g->stencil); 114 CRStateBits *stateb = GetCurrentBits( );114 CRStateBits *stateb = GetCurrentBits(pState); 115 115 CRStencilBits *sb = &(stateb->stencil); 116 116 GLint idx, bitsIdx, count, i; … … 119 119 if (g->current.inBeginEnd) 120 120 { 121 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION,121 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, 122 122 "glStencilFunc called in begin/end"); 123 123 return; … … 135 135 func != GL_ALWAYS) 136 136 { 137 crStateError( __LINE__, __FILE__, GL_INVALID_ENUM,137 crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM, 138 138 "glStencilFunc called with bogu func: %d", func); 139 139 return; 140 140 } 141 141 142 count = crStateStencilBufferGetIdxAndCount( s, face, &idx, &bitsIdx);142 count = crStateStencilBufferGetIdxAndCount(pState, s, face, &idx, &bitsIdx); 143 143 if (count) 144 144 { … … 153 153 } 154 154 155 void STATE_APIENTRY crStateStencilFuncSeparate( GLenum face, GLenum func, GLint ref, GLuint mask)155 void STATE_APIENTRY crStateStencilFuncSeparate(PCRStateTracker pState, GLenum face, GLenum func, GLint ref, GLuint mask) 156 156 { 157 157 if (!face) … … 159 159 /* crStateStencilFuncPerform accepts 0 value, while glStencilFuncSeparate does not, 160 160 * filter it out here */ 161 crStateError( __LINE__,__FILE__,GL_INVALID_ENUM, "crStateStencilFuncSeparate");161 crStateError(pState, __LINE__,__FILE__,GL_INVALID_ENUM, "crStateStencilFuncSeparate"); 162 162 return; 163 163 } 164 crStateStencilFuncPerform( face, func, ref, mask);165 } 166 167 void STATE_APIENTRY crStateStencilFunc( GLenum func, GLint ref, GLuint mask)168 { 169 crStateStencilFuncPerform( 0, func, ref, mask);164 crStateStencilFuncPerform(pState, face, func, ref, mask); 165 } 166 167 void STATE_APIENTRY crStateStencilFunc(PCRStateTracker pState, GLenum func, GLint ref, GLuint mask) 168 { 169 crStateStencilFuncPerform(pState, 0, func, ref, mask); 170 170 } 171 171 … … 178 178 } 179 179 180 static void crStateStencilOpPerform ( GLenum face, GLenum fail, GLenum zfail, GLenum zpass)181 { 182 CRContext *g = GetCurrentContext( );180 static void crStateStencilOpPerform (PCRStateTracker pState, GLenum face, GLenum fail, GLenum zfail, GLenum zpass) 181 { 182 CRContext *g = GetCurrentContext(pState); 183 183 CRStencilState *s = &(g->stencil); 184 CRStateBits *stateb = GetCurrentBits( );184 CRStateBits *stateb = GetCurrentBits(pState); 185 185 CRStencilBits *sb = &(stateb->stencil); 186 186 GLint idx, bitsIdx, count, i; … … 188 188 if (g->current.inBeginEnd) 189 189 { 190 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION,190 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, 191 191 "glStencilOp called in begin/end"); 192 192 return; … … 208 208 break; 209 209 default: 210 crStateError( __LINE__, __FILE__, GL_INVALID_ENUM,210 crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM, 211 211 "glStencilOp called with bogus fail: %d", fail); 212 212 return; … … 226 226 break; 227 227 default: 228 crStateError( __LINE__, __FILE__, GL_INVALID_ENUM,228 crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM, 229 229 "glStencilOp called with bogus zfail: %d", zfail); 230 230 return; … … 244 244 break; 245 245 default: 246 crStateError( __LINE__, __FILE__, GL_INVALID_ENUM,246 crStateError(pState, __LINE__, __FILE__, GL_INVALID_ENUM, 247 247 "glStencilOp called with bogus zpass: %d", zpass); 248 248 return; 249 249 } 250 250 251 count = crStateStencilBufferGetIdxAndCount( s, face, &idx, &bitsIdx);251 count = crStateStencilBufferGetIdxAndCount(pState, s, face, &idx, &bitsIdx); 252 252 if (count) 253 253 { … … 263 263 } 264 264 265 void STATE_APIENTRY crStateStencilOpSeparate ( GLenum face, GLenum fail, GLenum zfail, GLenum zpass)265 void STATE_APIENTRY crStateStencilOpSeparate (PCRStateTracker pState, GLenum face, GLenum fail, GLenum zfail, GLenum zpass) 266 266 { 267 267 if (!face) … … 269 269 /* crStateStencilOpPerform accepts 0 value, while glStencilOpSeparate does not, 270 270 * filter it out here */ 271 crStateError( __LINE__,__FILE__,GL_INVALID_ENUM, "crStateStencilOpSeparate");271 crStateError(pState, __LINE__,__FILE__,GL_INVALID_ENUM, "crStateStencilOpSeparate"); 272 272 return; 273 273 } 274 crStateStencilOpPerform ( 0, fail, zfail, zpass);275 } 276 277 void STATE_APIENTRY crStateStencilOp ( GLenum fail, GLenum zfail, GLenum zpass)278 { 279 crStateStencilOpPerform ( 0, fail, zfail, zpass);280 } 281 282 void STATE_APIENTRY crStateClearStencil ( GLint c)283 { 284 CRContext *g = GetCurrentContext( );274 crStateStencilOpPerform (pState, 0, fail, zfail, zpass); 275 } 276 277 void STATE_APIENTRY crStateStencilOp (PCRStateTracker pState, GLenum fail, GLenum zfail, GLenum zpass) 278 { 279 crStateStencilOpPerform (pState, 0, fail, zfail, zpass); 280 } 281 282 void STATE_APIENTRY crStateClearStencil (PCRStateTracker pState, GLint c) 283 { 284 CRContext *g = GetCurrentContext(pState); 285 285 CRStencilState *s = &(g->stencil); 286 CRStateBits *stateb = GetCurrentBits( );286 CRStateBits *stateb = GetCurrentBits(pState); 287 287 CRStencilBits *sb = &(stateb->stencil); 288 288 289 289 if (g->current.inBeginEnd) 290 290 { 291 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION,291 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, 292 292 "glClearStencil called in begin/end"); 293 293 return; … … 302 302 } 303 303 304 void STATE_APIENTRY crStateStencilMask ( GLuint mask)305 { 306 CRContext *g = GetCurrentContext( );304 void STATE_APIENTRY crStateStencilMask (PCRStateTracker pState, GLuint mask) 305 { 306 CRContext *g = GetCurrentContext(pState); 307 307 CRStencilState *s = &(g->stencil); 308 CRStateBits *stateb = GetCurrentBits( );308 CRStateBits *stateb = GetCurrentBits(pState); 309 309 CRStencilBits *sb = &(stateb->stencil); 310 310 311 311 if (g->current.inBeginEnd) 312 312 { 313 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION,313 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, 314 314 "glStencilMask called in begin/end"); 315 315 return; … … 324 324 } 325 325 326 void STATE_APIENTRY crStateActiveStencilFaceEXT ( GLenum face)327 { 328 CRContext *g = GetCurrentContext( );326 void STATE_APIENTRY crStateActiveStencilFaceEXT (PCRStateTracker pState, GLenum face) 327 { 328 CRContext *g = GetCurrentContext(pState); 329 329 CRStencilState *s = &(g->stencil); 330 CRStateBits *stateb = GetCurrentBits( );330 CRStateBits *stateb = GetCurrentBits(pState); 331 331 CRStencilBits *sb = &(stateb->stencil); 332 332 … … 338 338 break; 339 339 default: 340 crStateError( __LINE__,__FILE__,GL_INVALID_ENUM, "crStateActiveStencilFaceEXT");340 crStateError(pState, __LINE__,__FILE__,GL_INVALID_ENUM, "crStateActiveStencilFaceEXT"); 341 341 return; 342 342 } … … 348 348 #ifdef CRSTATE_DEBUG_STENCIL_ERR 349 349 #define CRSTATE_CLEARERR() do { \ 350 while ( diff_api.GetError() != GL_NO_ERROR) {} \350 while (pState->diff_api.GetError() != GL_NO_ERROR) {} \ 351 351 } while (0) 352 352 … … 355 355 CRSTATE_CLEARERR(); \ 356 356 _op; \ 357 while ((_glErr = diff_api.GetError()) != GL_NO_ERROR) { Assert(0);} \357 while ((_glErr = pState->diff_api.GetError()) != GL_NO_ERROR) { Assert(0);} \ 358 358 }while (0) 359 359 #else … … 388 388 CRContext *fromCtx, CRContext *toCtx) 389 389 { 390 PCRStateTracker pState = fromCtx->pStateTracker; 390 391 CRStencilState *from = &(fromCtx->stencil); 391 392 CRStencilState *to = &(toCtx->stencil); … … 395 396 GLchar frontMatch = -1, backMatch = -1, toFrontBackMatch = -1; 396 397 CRbitvalue nbitID[CR_MAX_BITARRAY]; 398 399 CRASSERT(fromCtx->pStateTracker == toCtx->pStateTracker); 400 397 401 for (j=0;j<CR_MAX_BITARRAY;j++) 398 402 nbitID[j] = ~bitID[j]; … … 402 406 { 403 407 glAble able[2]; 404 able[0] = diff_api.Disable;405 able[1] = diff_api.Enable;408 able[0] = pState->diff_api.Disable; 409 able[1] = pState->diff_api.Enable; 406 410 if (from->stencilTest != to->stencilTest) 407 411 { … … 415 419 { 416 420 glAble able[2]; 417 able[0] = diff_api.Disable;418 able[1] = diff_api.Enable;421 able[0] = pState->diff_api.Disable; 422 able[1] = pState->diff_api.Enable; 419 423 if (from->stencilTwoSideEXT != to->stencilTwoSideEXT) 420 424 { … … 429 433 if (from->clearValue != to->clearValue) 430 434 { 431 diff_api.ClearStencil (to->clearValue);435 pState->diff_api.ClearStencil (to->clearValue); 432 436 from->clearValue = to->clearValue; 433 437 } … … 466 470 if (activeFace == GL_BACK) 467 471 { 468 diff_api.ActiveStencilFaceEXT(GL_FRONT);472 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 469 473 activeFace = GL_FRONT; 470 474 } 471 475 472 diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,476 pState->diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 473 477 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 474 478 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask); … … 483 487 if (activeFace == GL_BACK) 484 488 { 485 diff_api.ActiveStencilFaceEXT(GL_FRONT);489 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 486 490 activeFace = GL_FRONT; 487 491 } 488 492 489 diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,493 pState->diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 490 494 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 491 495 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask); … … 498 502 if (activeFace == GL_BACK) 499 503 { 500 diff_api.ActiveStencilFaceEXT(GL_FRONT);504 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 501 505 activeFace = GL_FRONT; 502 506 } 503 507 504 diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func,508 pState->diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func, 505 509 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].ref, 506 510 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].mask); … … 525 529 if (activeFace == GL_BACK) 526 530 { 527 diff_api.ActiveStencilFaceEXT(GL_FRONT);528 activeFace = GL_FRONT; 529 } 530 531 diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,531 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 532 activeFace = GL_FRONT; 533 } 534 535 pState->diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 532 536 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 533 537 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask); … … 546 550 if (activeFace == GL_BACK) 547 551 { 548 diff_api.ActiveStencilFaceEXT(GL_FRONT);549 activeFace = GL_FRONT; 550 } 551 552 diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,552 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 553 activeFace = GL_FRONT; 554 } 555 556 pState->diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 553 557 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 554 558 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask); … … 564 568 if (activeFace == GL_BACK) 565 569 { 566 diff_api.ActiveStencilFaceEXT(GL_FRONT);567 activeFace = GL_FRONT; 568 } 569 570 diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func,570 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 571 activeFace = GL_FRONT; 572 } 573 574 pState->diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func, 571 575 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].ref, 572 576 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].mask); … … 590 594 if (activeFace == GL_BACK) 591 595 { 592 diff_api.ActiveStencilFaceEXT(GL_FRONT);593 activeFace = GL_FRONT; 594 } 595 596 diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,596 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 597 activeFace = GL_FRONT; 598 } 599 600 pState->diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 597 601 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 598 602 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask); … … 611 615 if (activeFace == GL_BACK) 612 616 { 613 diff_api.ActiveStencilFaceEXT(GL_FRONT);614 activeFace = GL_FRONT; 615 } 616 617 diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,617 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 618 activeFace = GL_FRONT; 619 } 620 621 pState->diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 618 622 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 619 623 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask); … … 629 633 if (activeFace == GL_BACK) 630 634 { 631 diff_api.ActiveStencilFaceEXT(GL_FRONT);632 activeFace = GL_FRONT; 633 } 634 635 diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func,635 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 636 activeFace = GL_FRONT; 637 } 638 639 pState->diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func, 636 640 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].ref, 637 641 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].mask); … … 650 654 if (activeFace == GL_FRONT) 651 655 { 652 diff_api.ActiveStencilFaceEXT(GL_BACK);656 pState->diff_api.ActiveStencilFaceEXT(GL_BACK); 653 657 activeFace = GL_BACK; 654 658 } 655 659 656 diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].func,660 pState->diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].func, 657 661 to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].ref, 658 662 to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].mask); … … 697 701 if (activeFace == GL_BACK) 698 702 { 699 diff_api.ActiveStencilFaceEXT(GL_FRONT);703 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 700 704 activeFace = GL_FRONT; 701 705 } 702 706 703 diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,707 pState->diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 704 708 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 705 709 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass); … … 715 719 if (activeFace == GL_BACK) 716 720 { 717 diff_api.ActiveStencilFaceEXT(GL_FRONT);721 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 718 722 activeFace = GL_FRONT; 719 723 } 720 724 721 diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,725 pState->diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 722 726 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 723 727 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass); … … 729 733 if (activeFace == GL_BACK) 730 734 { 731 diff_api.ActiveStencilFaceEXT(GL_FRONT);735 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 732 736 activeFace = GL_FRONT; 733 737 } 734 738 735 diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail,739 pState->diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail, 736 740 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthFail, 737 741 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthPass); … … 754 758 if (activeFace == GL_BACK) 755 759 { 756 diff_api.ActiveStencilFaceEXT(GL_FRONT);757 activeFace = GL_FRONT; 758 } 759 760 diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,760 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 761 activeFace = GL_FRONT; 762 } 763 764 pState->diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 761 765 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 762 766 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass); … … 775 779 if (activeFace == GL_BACK) 776 780 { 777 diff_api.ActiveStencilFaceEXT(GL_FRONT);778 activeFace = GL_FRONT; 779 } 780 781 diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,781 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 782 activeFace = GL_FRONT; 783 } 784 785 pState->diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 782 786 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 783 787 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass); … … 794 798 if (activeFace == GL_BACK) 795 799 { 796 diff_api.ActiveStencilFaceEXT(GL_FRONT);797 activeFace = GL_FRONT; 798 } 799 800 diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail,800 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 801 activeFace = GL_FRONT; 802 } 803 804 pState->diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail, 801 805 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthFail, 802 806 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthPass); … … 820 824 if (activeFace == GL_BACK) 821 825 { 822 diff_api.ActiveStencilFaceEXT(GL_FRONT);823 activeFace = GL_FRONT; 824 } 825 826 diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,826 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 827 activeFace = GL_FRONT; 828 } 829 830 pState->diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 827 831 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 828 832 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass); … … 841 845 if (activeFace == GL_BACK) 842 846 { 843 diff_api.ActiveStencilFaceEXT(GL_FRONT);844 activeFace = GL_FRONT; 845 } 846 847 diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,847 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 848 activeFace = GL_FRONT; 849 } 850 851 pState->diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 848 852 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 849 853 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass); … … 860 864 if (activeFace == GL_BACK) 861 865 { 862 diff_api.ActiveStencilFaceEXT(GL_FRONT);863 activeFace = GL_FRONT; 864 } 865 866 diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail,866 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 867 activeFace = GL_FRONT; 868 } 869 870 pState->diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail, 867 871 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthFail, 868 872 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthPass); … … 881 885 if (activeFace == GL_FRONT) 882 886 { 883 diff_api.ActiveStencilFaceEXT(GL_BACK);887 pState->diff_api.ActiveStencilFaceEXT(GL_BACK); 884 888 activeFace = GL_BACK; 885 889 } 886 890 887 diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].fail,891 pState->diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].fail, 888 892 to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].passDepthFail, 889 893 to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].passDepthPass); … … 900 904 if (activeFace != to->activeStencilFace) 901 905 { 902 diff_api.ActiveStencilFaceEXT(activeFace);906 pState->diff_api.ActiveStencilFaceEXT(activeFace); 903 907 } 904 908 … … 918 922 if (from->writeMask != to->writeMask) 919 923 { 920 diff_api.StencilMask (to->writeMask);924 pState->diff_api.StencilMask (to->writeMask); 921 925 from->writeMask = to->writeMask; 922 926 } … … 929 933 CRContext *fromCtx, CRContext *toCtx) 930 934 { 935 PCRStateTracker pState = fromCtx->pStateTracker; 931 936 CRStencilState *from = &(fromCtx->stencil); 932 937 CRStencilState *to = &(toCtx->stencil); … … 936 941 GLchar frontMatch = -1, backMatch = -1, toFrontBackMatch = -1; 937 942 CRbitvalue nbitID[CR_MAX_BITARRAY]; 943 944 CRASSERT(fromCtx->pStateTracker == toCtx->pStateTracker); 945 938 946 for (j=0;j<CR_MAX_BITARRAY;j++) 939 947 nbitID[j] = ~bitID[j]; … … 943 951 { 944 952 glAble able[2]; 945 able[0] = diff_api.Disable;946 able[1] = diff_api.Enable;953 able[0] = pState->diff_api.Disable; 954 able[1] = pState->diff_api.Enable; 947 955 if (from->stencilTest != to->stencilTest) 948 956 { … … 956 964 { 957 965 glAble able[2]; 958 able[0] = diff_api.Disable;959 able[1] = diff_api.Enable;966 able[0] = pState->diff_api.Disable; 967 able[1] = pState->diff_api.Enable; 960 968 if (from->stencilTwoSideEXT != to->stencilTwoSideEXT) 961 969 { … … 970 978 if (from->clearValue != to->clearValue) 971 979 { 972 CRSTATE_CHECKGLERR( diff_api.ClearStencil (to->clearValue));980 CRSTATE_CHECKGLERR(pState->diff_api.ClearStencil (to->clearValue)); 973 981 FILLDIRTY(b->clearValue); 974 982 FILLDIRTY(b->dirty); … … 1007 1015 if (activeFace == GL_BACK) 1008 1016 { 1009 diff_api.ActiveStencilFaceEXT(GL_FRONT);1017 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 1010 1018 activeFace = GL_FRONT; 1011 1019 } 1012 1020 1013 CRSTATE_CHECKGLERR( diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,1021 CRSTATE_CHECKGLERR(pState->diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 1014 1022 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 1015 1023 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask)); … … 1022 1030 if (activeFace == GL_BACK) 1023 1031 { 1024 diff_api.ActiveStencilFaceEXT(GL_FRONT);1032 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 1025 1033 activeFace = GL_FRONT; 1026 1034 } 1027 1035 1028 CRSTATE_CHECKGLERR( diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,1036 CRSTATE_CHECKGLERR(pState->diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 1029 1037 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 1030 1038 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask)); … … 1035 1043 if (activeFace == GL_BACK) 1036 1044 { 1037 diff_api.ActiveStencilFaceEXT(GL_FRONT);1045 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 1038 1046 activeFace = GL_FRONT; 1039 1047 } 1040 1048 1041 CRSTATE_CHECKGLERR( diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func,1049 CRSTATE_CHECKGLERR(pState->diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func, 1042 1050 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].ref, 1043 1051 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].mask)); … … 1061 1069 if (activeFace == GL_BACK) 1062 1070 { 1063 diff_api.ActiveStencilFaceEXT(GL_FRONT);1064 activeFace = GL_FRONT; 1065 } 1066 1067 CRSTATE_CHECKGLERR( diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,1071 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 1072 activeFace = GL_FRONT; 1073 } 1074 1075 CRSTATE_CHECKGLERR(pState->diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 1068 1076 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 1069 1077 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask)); … … 1079 1087 if (activeFace == GL_BACK) 1080 1088 { 1081 diff_api.ActiveStencilFaceEXT(GL_FRONT);1082 activeFace = GL_FRONT; 1083 } 1084 1085 CRSTATE_CHECKGLERR( diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,1089 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 1090 activeFace = GL_FRONT; 1091 } 1092 1093 CRSTATE_CHECKGLERR(pState->diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 1086 1094 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 1087 1095 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask)); … … 1095 1103 if (activeFace == GL_BACK) 1096 1104 { 1097 diff_api.ActiveStencilFaceEXT(GL_FRONT);1098 activeFace = GL_FRONT; 1099 } 1100 1101 CRSTATE_CHECKGLERR( diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func,1105 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 1106 activeFace = GL_FRONT; 1107 } 1108 1109 CRSTATE_CHECKGLERR(pState->diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func, 1102 1110 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].ref, 1103 1111 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].mask)); … … 1122 1130 if (activeFace == GL_BACK) 1123 1131 { 1124 diff_api.ActiveStencilFaceEXT(GL_FRONT);1125 activeFace = GL_FRONT; 1126 } 1127 1128 CRSTATE_CHECKGLERR( diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,1132 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 1133 activeFace = GL_FRONT; 1134 } 1135 1136 CRSTATE_CHECKGLERR(pState->diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 1129 1137 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 1130 1138 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask)); … … 1140 1148 if (activeFace == GL_BACK) 1141 1149 { 1142 diff_api.ActiveStencilFaceEXT(GL_FRONT);1143 activeFace = GL_FRONT; 1144 } 1145 1146 CRSTATE_CHECKGLERR( diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func,1150 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 1151 activeFace = GL_FRONT; 1152 } 1153 1154 CRSTATE_CHECKGLERR(pState->diff_api.StencilFuncSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].func, 1147 1155 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].ref, 1148 1156 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].mask)); … … 1156 1164 if (activeFace == GL_BACK) 1157 1165 { 1158 diff_api.ActiveStencilFaceEXT(GL_FRONT);1159 activeFace = GL_FRONT; 1160 } 1161 1162 CRSTATE_CHECKGLERR( diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func,1166 pState->diff_api.ActiveStencilFaceEXT(GL_FRONT); 1167 activeFace = GL_FRONT; 1168 } 1169 1170 CRSTATE_CHECKGLERR(pState->diff_api.StencilFuncSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].func, 1163 1171 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].ref, 1164 1172 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].mask)); … … 1178 1186 if (activeFace == GL_FRONT) 1179 1187 { 1180 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_BACK));1188 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_BACK)); 1181 1189 activeFace = GL_BACK; 1182 1190 } 1183 1191 1184 CRSTATE_CHECKGLERR( diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].func,1192 CRSTATE_CHECKGLERR(pState->diff_api.StencilFunc (to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].func, 1185 1193 to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].ref, 1186 1194 to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].mask)); … … 1227 1235 if (activeFace == GL_BACK) 1228 1236 { 1229 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_FRONT));1237 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_FRONT)); 1230 1238 activeFace = GL_FRONT; 1231 1239 } 1232 1240 1233 CRSTATE_CHECKGLERR( diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,1241 CRSTATE_CHECKGLERR(pState->diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 1234 1242 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 1235 1243 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass)); … … 1242 1250 if (activeFace == GL_BACK) 1243 1251 { 1244 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_FRONT));1252 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_FRONT)); 1245 1253 activeFace = GL_FRONT; 1246 1254 } 1247 1255 1248 CRSTATE_CHECKGLERR( diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,1256 CRSTATE_CHECKGLERR(pState->diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 1249 1257 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 1250 1258 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass)); … … 1255 1263 if (activeFace == GL_BACK) 1256 1264 { 1257 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_FRONT));1265 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_FRONT)); 1258 1266 activeFace = GL_FRONT; 1259 1267 } 1260 1268 1261 CRSTATE_CHECKGLERR( diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail,1269 CRSTATE_CHECKGLERR(pState->diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail, 1262 1270 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthFail, 1263 1271 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthPass)); … … 1281 1289 if (activeFace == GL_BACK) 1282 1290 { 1283 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_FRONT));1284 activeFace = GL_FRONT; 1285 } 1286 1287 CRSTATE_CHECKGLERR( diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,1291 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_FRONT)); 1292 activeFace = GL_FRONT; 1293 } 1294 1295 CRSTATE_CHECKGLERR(pState->diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 1288 1296 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 1289 1297 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass)); … … 1299 1307 if (activeFace == GL_BACK) 1300 1308 { 1301 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_FRONT));1302 activeFace = GL_FRONT; 1303 } 1304 1305 CRSTATE_CHECKGLERR( diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,1309 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_FRONT)); 1310 activeFace = GL_FRONT; 1311 } 1312 1313 CRSTATE_CHECKGLERR(pState->diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 1306 1314 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 1307 1315 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass)); … … 1315 1323 if (activeFace == GL_BACK) 1316 1324 { 1317 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_FRONT));1318 activeFace = GL_FRONT; 1319 } 1320 1321 CRSTATE_CHECKGLERR( diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail,1325 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_FRONT)); 1326 activeFace = GL_FRONT; 1327 } 1328 1329 CRSTATE_CHECKGLERR(pState->diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail, 1322 1330 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthFail, 1323 1331 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthPass)); … … 1343 1351 if (activeFace == GL_BACK) 1344 1352 { 1345 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_FRONT));1346 activeFace = GL_FRONT; 1347 } 1348 1349 CRSTATE_CHECKGLERR( diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,1353 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_FRONT)); 1354 activeFace = GL_FRONT; 1355 } 1356 1357 CRSTATE_CHECKGLERR(pState->diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 1350 1358 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 1351 1359 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass)); … … 1361 1369 if (activeFace == GL_BACK) 1362 1370 { 1363 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_FRONT));1364 activeFace = GL_FRONT; 1365 } 1366 1367 CRSTATE_CHECKGLERR( diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail,1371 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_FRONT)); 1372 activeFace = GL_FRONT; 1373 } 1374 1375 CRSTATE_CHECKGLERR(pState->diff_api.StencilOpSeparate (GL_FRONT, to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].fail, 1368 1376 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthFail, 1369 1377 to->buffers[CRSTATE_STENCIL_BUFFER_ID_FRONT].passDepthPass)); … … 1377 1385 if (activeFace == GL_BACK) 1378 1386 { 1379 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_FRONT));1380 activeFace = GL_FRONT; 1381 } 1382 1383 CRSTATE_CHECKGLERR( diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail,1387 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_FRONT)); 1388 activeFace = GL_FRONT; 1389 } 1390 1391 CRSTATE_CHECKGLERR(pState->diff_api.StencilOpSeparate (GL_BACK, to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].fail, 1384 1392 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthFail, 1385 1393 to->buffers[CRSTATE_STENCIL_BUFFER_ID_BACK].passDepthPass)); … … 1400 1408 if (activeFace == GL_FRONT) 1401 1409 { 1402 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(GL_BACK));1410 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(GL_BACK)); 1403 1411 activeFace = GL_BACK; 1404 1412 } 1405 1413 1406 CRSTATE_CHECKGLERR( diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].fail,1414 CRSTATE_CHECKGLERR(pState->diff_api.StencilOp (to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].fail, 1407 1415 to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].passDepthFail, 1408 1416 to->buffers[CRSTATE_STENCIL_BUFFER_ID_TWO_SIDE_BACK].passDepthPass)); … … 1420 1428 if (activeFace != to->activeStencilFace) 1421 1429 { 1422 CRSTATE_CHECKGLERR( diff_api.ActiveStencilFaceEXT(activeFace));1430 CRSTATE_CHECKGLERR(pState->diff_api.ActiveStencilFaceEXT(activeFace)); 1423 1431 } 1424 1432 … … 1439 1447 if (from->writeMask != to->writeMask) 1440 1448 { 1441 CRSTATE_CHECKGLERR( diff_api.StencilMask (to->writeMask));1449 CRSTATE_CHECKGLERR(pState->diff_api.StencilMask (to->writeMask)); 1442 1450 FILLDIRTY(b->writeMask); 1443 1451 FILLDIRTY(b->dirty);
Note:
See TracChangeset
for help on using the changeset viewer.