Changeset 78375 in vbox for trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_pixel.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_pixel.c
r74890 r78375 14 14 { 15 15 CRPixelState *p = &ctx->pixel; 16 CRStateBits *sb = GetCurrentBits( );16 CRStateBits *sb = GetCurrentBits(ctx->pStateTracker); 17 17 CRPixelBits *pb = &(sb->pixel); 18 18 GLcolorf zero_color = {0.0f, 0.0f, 0.0f, 0.0f}; … … 58 58 } 59 59 60 void STATE_APIENTRY crStatePixelTransferi ( GLenum pname, GLint param)61 { 62 crStatePixelTransferf( pname, (GLfloat) param );63 } 64 65 void STATE_APIENTRY crStatePixelTransferf ( GLenum pname, GLfloat param)66 { 67 CRContext *g = GetCurrentContext( );60 void STATE_APIENTRY crStatePixelTransferi (PCRStateTracker pState, GLenum pname, GLint param) 61 { 62 crStatePixelTransferf(pState, pname, (GLfloat) param ); 63 } 64 65 void STATE_APIENTRY crStatePixelTransferf (PCRStateTracker pState, GLenum pname, GLfloat param) 66 { 67 CRContext *g = GetCurrentContext(pState); 68 68 CRPixelState *p = &(g->pixel); 69 CRStateBits *sb = GetCurrentBits( );69 CRStateBits *sb = GetCurrentBits(pState); 70 70 CRPixelBits *pb = &(sb->pixel); 71 71 72 72 if (g->current.inBeginEnd) 73 73 { 74 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION, "PixelTransfer{if} called in Begin/End");74 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, "PixelTransfer{if} called in Begin/End"); 75 75 return; 76 76 } … … 123 123 break; 124 124 default: 125 crStateError( __LINE__, __FILE__, GL_INVALID_VALUE, "Unknown glPixelTransfer pname: %d", pname );125 crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, "Unknown glPixelTransfer pname: %d", pname ); 126 126 return; 127 127 } … … 130 130 } 131 131 132 void STATE_APIENTRY crStatePixelZoom ( GLfloat xfactor, GLfloat yfactor)133 { 134 CRContext *g = GetCurrentContext( );132 void STATE_APIENTRY crStatePixelZoom (PCRStateTracker pState, GLfloat xfactor, GLfloat yfactor) 133 { 134 CRContext *g = GetCurrentContext(pState); 135 135 CRPixelState *p = &(g->pixel); 136 CRStateBits *sb = GetCurrentBits( );136 CRStateBits *sb = GetCurrentBits(pState); 137 137 CRPixelBits *pb = &(sb->pixel); 138 138 139 139 if (g->current.inBeginEnd) 140 140 { 141 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION, "PixelZoom called in Begin/End");141 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, "PixelZoom called in Begin/End"); 142 142 return; 143 143 } … … 152 152 153 153 154 void STATE_APIENTRY crStateBitmap( GLsizei width, GLsizei height,154 void STATE_APIENTRY crStateBitmap(PCRStateTracker pState, GLsizei width, GLsizei height, 155 155 GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, 156 156 const GLubyte *bitmap) 157 157 { 158 CRContext *g = GetCurrentContext( );158 CRContext *g = GetCurrentContext(pState); 159 159 CRCurrentState *c = &(g->current); 160 CRStateBits *sb = GetCurrentBits( );160 CRStateBits *sb = GetCurrentBits(pState); 161 161 CRCurrentBits *cb = &(sb->current); 162 162 … … 170 170 if (g->current.inBeginEnd) 171 171 { 172 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION,172 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, 173 173 "Bitmap called in begin/end"); 174 174 return; … … 177 177 if (width < 0 || height < 0) 178 178 { 179 crStateError( __LINE__, __FILE__, GL_INVALID_VALUE,179 crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, 180 180 "Bitmap called with neg dims: %dx%d", width, height); 181 181 return; … … 201 201 #define CLAMP(x, min, max) ((x) < (min) ? (min) : ((x) > (max) ? (max) : (x))) 202 202 203 void STATE_APIENTRY crStatePixelMapfv ( GLenum map, GLint mapsize, const GLfloat * values)204 { 205 CRContext *g = GetCurrentContext( );203 void STATE_APIENTRY crStatePixelMapfv (PCRStateTracker pState, GLenum map, GLint mapsize, const GLfloat * values) 204 { 205 CRContext *g = GetCurrentContext(pState); 206 206 CRPixelState *p = &(g->pixel); 207 CRStateBits *sb = GetCurrentBits( );207 CRStateBits *sb = GetCurrentBits(pState); 208 208 CRPixelBits *pb = &(sb->pixel); 209 209 GLint i; 210 GLboolean unpackbuffer = crStateIsBufferBound( GL_PIXEL_UNPACK_BUFFER_ARB);210 GLboolean unpackbuffer = crStateIsBufferBound(pState, GL_PIXEL_UNPACK_BUFFER_ARB); 211 211 212 212 if (g->current.inBeginEnd) { 213 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION, "PixelMap called in Begin/End");213 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, "PixelMap called in Begin/End"); 214 214 return; 215 215 } … … 218 218 219 219 if (mapsize < 0 || mapsize > CR_MAX_PIXEL_MAP_TABLE) { 220 crStateError( __LINE__, __FILE__, GL_INVALID_VALUE, "PixelMap(mapsize)");220 crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, "PixelMap(mapsize)"); 221 221 return; 222 222 } … … 302 302 break; 303 303 default: 304 crStateError( __LINE__, __FILE__, GL_INVALID_VALUE, "PixelMap(map)");304 crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, "PixelMap(map)"); 305 305 return; 306 306 } … … 310 310 } 311 311 312 void STATE_APIENTRY crStatePixelMapuiv ( GLenum map, GLint mapsize, const GLuint * values)312 void STATE_APIENTRY crStatePixelMapuiv (PCRStateTracker pState, GLenum map, GLint mapsize, const GLuint * values) 313 313 { 314 314 if (mapsize < 0 || mapsize > CR_MAX_PIXEL_MAP_TABLE) … … 318 318 } 319 319 320 if (!crStateIsBufferBound( GL_PIXEL_UNPACK_BUFFER_ARB))320 if (!crStateIsBufferBound(pState, GL_PIXEL_UNPACK_BUFFER_ARB)) 321 321 { 322 322 GLfloat fvalues[CR_MAX_PIXEL_MAP_TABLE]; … … 333 333 } 334 334 } 335 crStatePixelMapfv( map, mapsize, fvalues);335 crStatePixelMapfv(pState, map, mapsize, fvalues); 336 336 } 337 337 else 338 338 { 339 crStatePixelMapfv( map, mapsize, (const GLfloat*) values);339 crStatePixelMapfv(pState, map, mapsize, (const GLfloat*) values); 340 340 } 341 341 } 342 342 343 void STATE_APIENTRY crStatePixelMapusv ( GLenum map, GLint mapsize, const GLushort * values)343 void STATE_APIENTRY crStatePixelMapusv (PCRStateTracker pState, GLenum map, GLint mapsize, const GLushort * values) 344 344 { 345 345 if (mapsize < 0 || mapsize > CR_MAX_PIXEL_MAP_TABLE) … … 349 349 } 350 350 351 if (!crStateIsBufferBound( GL_PIXEL_UNPACK_BUFFER_ARB))351 if (!crStateIsBufferBound(pState, GL_PIXEL_UNPACK_BUFFER_ARB)) 352 352 { 353 353 GLfloat fvalues[CR_MAX_PIXEL_MAP_TABLE]; … … 364 364 } 365 365 } 366 crStatePixelMapfv( map, mapsize, fvalues);366 crStatePixelMapfv(pState, map, mapsize, fvalues); 367 367 } 368 368 else 369 369 { 370 crStatePixelMapfv( map, mapsize, (const GLfloat*) values);370 crStatePixelMapfv(pState, map, mapsize, (const GLfloat*) values); 371 371 } 372 372 } 373 373 374 374 375 void STATE_APIENTRY crStateGetPixelMapfv ( GLenum map, GLfloat * values)376 { 377 CRContext *g = GetCurrentContext( );375 void STATE_APIENTRY crStateGetPixelMapfv (PCRStateTracker pState, GLenum map, GLfloat * values) 376 { 377 CRContext *g = GetCurrentContext(pState); 378 378 CRPixelState *p = &(g->pixel); 379 379 GLint i; 380 380 381 381 if (g->current.inBeginEnd) { 382 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION,382 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, 383 383 "GetPixelMapfv called in Begin/End"); 384 384 return; … … 421 421 break; 422 422 default: 423 crStateError( __LINE__, __FILE__, GL_INVALID_VALUE, "GetPixelMap(map)");423 crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, "GetPixelMap(map)"); 424 424 return; 425 425 } 426 426 } 427 427 428 void STATE_APIENTRY crStateGetPixelMapuiv ( GLenum map, GLuint * values)429 { 430 CRContext *g = GetCurrentContext( );428 void STATE_APIENTRY crStateGetPixelMapuiv (PCRStateTracker pState, GLenum map, GLuint * values) 429 { 430 CRContext *g = GetCurrentContext(pState); 431 431 const GLfloat maxUint = 4294967295.0F; 432 432 CRPixelState *p = &(g->pixel); … … 434 434 435 435 if (g->current.inBeginEnd) { 436 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION,436 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, 437 437 "GetPixelMapuiv called in Begin/End"); 438 438 return; … … 491 491 break; 492 492 default: 493 crStateError( __LINE__, __FILE__, GL_INVALID_VALUE, "GetPixelMapuiv(map)");493 crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, "GetPixelMapuiv(map)"); 494 494 return; 495 495 } 496 496 } 497 497 498 void STATE_APIENTRY crStateGetPixelMapusv ( GLenum map, GLushort * values)499 { 500 CRContext *g = GetCurrentContext( );498 void STATE_APIENTRY crStateGetPixelMapusv (PCRStateTracker pState, GLenum map, GLushort * values) 499 { 500 CRContext *g = GetCurrentContext(pState); 501 501 const GLfloat maxUshort = 65535.0F; 502 502 CRPixelState *p = &(g->pixel); … … 504 504 505 505 if (g->current.inBeginEnd) { 506 crStateError( __LINE__, __FILE__, GL_INVALID_OPERATION,506 crStateError(pState, __LINE__, __FILE__, GL_INVALID_OPERATION, 507 507 "GetPixelMapusv called in Begin/End"); 508 508 return; … … 561 561 break; 562 562 default: 563 crStateError( __LINE__, __FILE__, GL_INVALID_VALUE, "GetPixelMapusv(map)");563 crStateError(pState, __LINE__, __FILE__, GL_INVALID_VALUE, "GetPixelMapusv(map)"); 564 564 return; 565 565 } … … 569 569 CRContext *fromCtx, CRContext *toCtx) 570 570 { 571 PCRStateTracker pState = fromCtx->pStateTracker; 571 572 CRPixelState *from = &(fromCtx->pixel); 572 573 CRPixelState *to = &(toCtx->pixel); 573 574 int j, i; 574 575 CRbitvalue nbitID[CR_MAX_BITARRAY]; 576 577 CRASSERT(fromCtx->pStateTracker == toCtx->pStateTracker); 578 575 579 for (j=0;j<CR_MAX_BITARRAY;j++) 576 580 nbitID[j] = ~bitID[j]; … … 580 584 if (from->mapColor != to->mapColor) 581 585 { 582 diff_api.PixelTransferi (GL_MAP_COLOR, to->mapColor);586 pState->diff_api.PixelTransferi (GL_MAP_COLOR, to->mapColor); 583 587 from->mapColor = to->mapColor; 584 588 } 585 589 if (from->mapStencil != to->mapStencil) 586 590 { 587 diff_api.PixelTransferi (GL_MAP_STENCIL, to->mapStencil);591 pState->diff_api.PixelTransferi (GL_MAP_STENCIL, to->mapStencil); 588 592 from->mapStencil = to->mapStencil; 589 593 } 590 594 if (from->indexOffset != to->indexOffset) 591 595 { 592 diff_api.PixelTransferi (GL_INDEX_OFFSET, to->indexOffset);596 pState->diff_api.PixelTransferi (GL_INDEX_OFFSET, to->indexOffset); 593 597 from->indexOffset = to->indexOffset; 594 598 } 595 599 if (from->indexShift != to->indexShift) 596 600 { 597 diff_api.PixelTransferi (GL_INDEX_SHIFT, to->indexShift);601 pState->diff_api.PixelTransferi (GL_INDEX_SHIFT, to->indexShift); 598 602 from->indexShift = to->indexShift; 599 603 } 600 604 if (from->scale.r != to->scale.r) 601 605 { 602 diff_api.PixelTransferf (GL_RED_SCALE, to->scale.r);606 pState->diff_api.PixelTransferf (GL_RED_SCALE, to->scale.r); 603 607 from->scale.r = to->scale.r; 604 608 } 605 609 if (from->scale.g != to->scale.g) 606 610 { 607 diff_api.PixelTransferf (GL_GREEN_SCALE, to->scale.g);611 pState->diff_api.PixelTransferf (GL_GREEN_SCALE, to->scale.g); 608 612 from->scale.g = to->scale.g; 609 613 } 610 614 if (from->scale.b != to->scale.b) 611 615 { 612 diff_api.PixelTransferf (GL_BLUE_SCALE, to->scale.b);616 pState->diff_api.PixelTransferf (GL_BLUE_SCALE, to->scale.b); 613 617 from->scale.b = to->scale.b; 614 618 } 615 619 if (from->scale.a != to->scale.a) 616 620 { 617 diff_api.PixelTransferf (GL_ALPHA_SCALE, to->scale.a);621 pState->diff_api.PixelTransferf (GL_ALPHA_SCALE, to->scale.a); 618 622 from->scale.a = to->scale.a; 619 623 } 620 624 if (from->bias.r != to->bias.r) 621 625 { 622 diff_api.PixelTransferf (GL_RED_BIAS, to->bias.r);626 pState->diff_api.PixelTransferf (GL_RED_BIAS, to->bias.r); 623 627 from->bias.r = to->bias.r; 624 628 } 625 629 if (from->bias.g != to->bias.g) 626 630 { 627 diff_api.PixelTransferf (GL_GREEN_BIAS, to->bias.g);631 pState->diff_api.PixelTransferf (GL_GREEN_BIAS, to->bias.g); 628 632 from->bias.g = to->bias.g; 629 633 } 630 634 if (from->bias.b != to->bias.b) 631 635 { 632 diff_api.PixelTransferf (GL_BLUE_BIAS, to->bias.b);636 pState->diff_api.PixelTransferf (GL_BLUE_BIAS, to->bias.b); 633 637 from->bias.b = to->bias.b; 634 638 } 635 639 if (from->bias.a != to->bias.a) 636 640 { 637 diff_api.PixelTransferf (GL_ALPHA_BIAS, to->bias.a);641 pState->diff_api.PixelTransferf (GL_ALPHA_BIAS, to->bias.a); 638 642 from->bias.a = to->bias.a; 639 643 } 640 644 if (from->depthScale != to->depthScale) 641 645 { 642 diff_api.PixelTransferf (GL_DEPTH_SCALE, to->depthScale);646 pState->diff_api.PixelTransferf (GL_DEPTH_SCALE, to->depthScale); 643 647 from->depthScale = to->depthScale; 644 648 } 645 649 if (from->depthBias != to->depthBias) 646 650 { 647 diff_api.PixelTransferf (GL_DEPTH_BIAS, to->depthBias);651 pState->diff_api.PixelTransferf (GL_DEPTH_BIAS, to->depthBias); 648 652 from->depthBias = to->depthBias; 649 653 } … … 655 659 from->yZoom != to->yZoom) 656 660 { 657 diff_api.PixelZoom (to->xZoom, 658 to->yZoom); 661 pState->diff_api.PixelZoom (to->xZoom, to->yZoom); 659 662 from->xZoom = to->xZoom; 660 663 from->yZoom = to->yZoom; … … 665 668 { 666 669 if (crMemcmp(to->mapStoS, from->mapStoS, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 667 diff_api.PixelMapfv(GL_PIXEL_MAP_S_TO_S,to->mapStoSsize,(GLfloat*)to->mapStoS);670 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_S_TO_S,to->mapStoSsize,(GLfloat*)to->mapStoS); 668 671 if (crMemcmp(to->mapItoI, from->mapItoI, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 669 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_I,to->mapItoIsize,(GLfloat*)to->mapItoI);672 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_I,to->mapItoIsize,(GLfloat*)to->mapItoI); 670 673 if (crMemcmp(to->mapItoR, from->mapItoR, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 671 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_R,to->mapItoRsize,(GLfloat*)to->mapItoR);674 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_R,to->mapItoRsize,(GLfloat*)to->mapItoR); 672 675 if (crMemcmp(to->mapItoG, from->mapItoG, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 673 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_G,to->mapItoGsize,(GLfloat*)to->mapItoG);676 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_G,to->mapItoGsize,(GLfloat*)to->mapItoG); 674 677 if (crMemcmp(to->mapItoB, from->mapItoB, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 675 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_B,to->mapItoBsize,(GLfloat*)to->mapItoB);678 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_B,to->mapItoBsize,(GLfloat*)to->mapItoB); 676 679 if (crMemcmp(to->mapItoA, from->mapItoA, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 677 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_A,to->mapItoAsize,(GLfloat*)to->mapItoA);680 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_A,to->mapItoAsize,(GLfloat*)to->mapItoA); 678 681 if (crMemcmp(to->mapRtoR, from->mapRtoR, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 679 diff_api.PixelMapfv(GL_PIXEL_MAP_R_TO_R,to->mapRtoRsize,(GLfloat*)to->mapRtoR);682 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_R_TO_R,to->mapRtoRsize,(GLfloat*)to->mapRtoR); 680 683 if (crMemcmp(to->mapGtoG, from->mapGtoG, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 681 diff_api.PixelMapfv(GL_PIXEL_MAP_G_TO_G,to->mapGtoGsize,(GLfloat*)to->mapGtoG);684 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_G_TO_G,to->mapGtoGsize,(GLfloat*)to->mapGtoG); 682 685 if (crMemcmp(to->mapBtoB, from->mapBtoB, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 683 diff_api.PixelMapfv(GL_PIXEL_MAP_B_TO_B,to->mapBtoBsize,(GLfloat*)to->mapBtoB);686 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_B_TO_B,to->mapBtoBsize,(GLfloat*)to->mapBtoB); 684 687 if (crMemcmp(to->mapAtoA, from->mapAtoA, CR_MAX_PIXEL_MAP_TABLE*sizeof(GLfloat))) 685 diff_api.PixelMapfv(GL_PIXEL_MAP_A_TO_A,to->mapAtoAsize,(GLfloat*)to->mapAtoA);688 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_A_TO_A,to->mapAtoAsize,(GLfloat*)to->mapAtoA); 686 689 CLEARDIRTY(b->maps, nbitID); 687 690 } … … 692 695 CRContext *fromCtx, CRContext *toCtx) 693 696 { 697 PCRStateTracker pState = fromCtx->pStateTracker; 694 698 CRPixelState *from = &(fromCtx->pixel); 695 699 CRPixelState *to = &(toCtx->pixel); 696 700 int j, i; 697 701 CRbitvalue nbitID[CR_MAX_BITARRAY]; 702 703 CRASSERT(fromCtx->pStateTracker == toCtx->pStateTracker); 704 698 705 for (j=0;j<CR_MAX_BITARRAY;j++) 699 706 nbitID[j] = ~bitID[j]; … … 703 710 if (from->mapColor != to->mapColor) 704 711 { 705 diff_api.PixelTransferi (GL_MAP_COLOR, to->mapColor);712 pState->diff_api.PixelTransferi (GL_MAP_COLOR, to->mapColor); 706 713 FILLDIRTY(b->transfer); 707 714 FILLDIRTY(b->dirty); … … 709 716 if (from->mapStencil != to->mapStencil) 710 717 { 711 diff_api.PixelTransferi (GL_MAP_STENCIL, to->mapStencil);718 pState->diff_api.PixelTransferi (GL_MAP_STENCIL, to->mapStencil); 712 719 FILLDIRTY(b->transfer); 713 720 FILLDIRTY(b->dirty); … … 715 722 if (from->indexOffset != to->indexOffset) 716 723 { 717 diff_api.PixelTransferi (GL_INDEX_OFFSET, to->indexOffset);724 pState->diff_api.PixelTransferi (GL_INDEX_OFFSET, to->indexOffset); 718 725 FILLDIRTY(b->transfer); 719 726 FILLDIRTY(b->dirty); … … 721 728 if (from->indexShift != to->indexShift) 722 729 { 723 diff_api.PixelTransferi (GL_INDEX_SHIFT, to->indexShift);730 pState->diff_api.PixelTransferi (GL_INDEX_SHIFT, to->indexShift); 724 731 FILLDIRTY(b->transfer); 725 732 FILLDIRTY(b->dirty); … … 727 734 if (from->scale.r != to->scale.r) 728 735 { 729 diff_api.PixelTransferf (GL_RED_SCALE, to->scale.r);736 pState->diff_api.PixelTransferf (GL_RED_SCALE, to->scale.r); 730 737 FILLDIRTY(b->transfer); 731 738 FILLDIRTY(b->dirty); … … 733 740 if (from->scale.g != to->scale.g) 734 741 { 735 diff_api.PixelTransferf (GL_GREEN_SCALE, to->scale.g);742 pState->diff_api.PixelTransferf (GL_GREEN_SCALE, to->scale.g); 736 743 FILLDIRTY(b->transfer); 737 744 FILLDIRTY(b->dirty); … … 739 746 if (from->scale.b != to->scale.b) 740 747 { 741 diff_api.PixelTransferf (GL_BLUE_SCALE, to->scale.b);748 pState->diff_api.PixelTransferf (GL_BLUE_SCALE, to->scale.b); 742 749 FILLDIRTY(b->transfer); 743 750 FILLDIRTY(b->dirty); … … 745 752 if (from->scale.a != to->scale.a) 746 753 { 747 diff_api.PixelTransferf (GL_ALPHA_SCALE, to->scale.a);754 pState->diff_api.PixelTransferf (GL_ALPHA_SCALE, to->scale.a); 748 755 FILLDIRTY(b->transfer); 749 756 FILLDIRTY(b->dirty); … … 751 758 if (from->bias.r != to->bias.r) 752 759 { 753 diff_api.PixelTransferf (GL_RED_BIAS, to->bias.r);760 pState->diff_api.PixelTransferf (GL_RED_BIAS, to->bias.r); 754 761 FILLDIRTY(b->transfer); 755 762 FILLDIRTY(b->dirty); … … 757 764 if (from->bias.g != to->bias.g) 758 765 { 759 diff_api.PixelTransferf (GL_GREEN_BIAS, to->bias.g);766 pState->diff_api.PixelTransferf (GL_GREEN_BIAS, to->bias.g); 760 767 FILLDIRTY(b->transfer); 761 768 FILLDIRTY(b->dirty); … … 763 770 if (from->bias.b != to->bias.b) 764 771 { 765 diff_api.PixelTransferf (GL_BLUE_BIAS, to->bias.b);772 pState->diff_api.PixelTransferf (GL_BLUE_BIAS, to->bias.b); 766 773 FILLDIRTY(b->transfer); 767 774 FILLDIRTY(b->dirty); … … 769 776 if (from->bias.a != to->bias.a) 770 777 { 771 diff_api.PixelTransferf (GL_ALPHA_BIAS, to->bias.a);778 pState->diff_api.PixelTransferf (GL_ALPHA_BIAS, to->bias.a); 772 779 FILLDIRTY(b->transfer); 773 780 FILLDIRTY(b->dirty); … … 775 782 if (from->depthScale != to->depthScale) 776 783 { 777 diff_api.PixelTransferf (GL_DEPTH_SCALE, to->depthScale);784 pState->diff_api.PixelTransferf (GL_DEPTH_SCALE, to->depthScale); 778 785 FILLDIRTY(b->transfer); 779 786 FILLDIRTY(b->dirty); … … 781 788 if (from->depthBias != to->depthBias) 782 789 { 783 diff_api.PixelTransferf (GL_DEPTH_BIAS, to->depthBias);790 pState->diff_api.PixelTransferf (GL_DEPTH_BIAS, to->depthBias); 784 791 FILLDIRTY(b->transfer); 785 792 FILLDIRTY(b->dirty); … … 792 799 from->yZoom != to->yZoom) 793 800 { 794 diff_api.PixelZoom (to->xZoom, 795 to->yZoom); 801 pState->diff_api.PixelZoom (to->xZoom, to->yZoom); 796 802 FILLDIRTY(b->zoom); 797 803 FILLDIRTY(b->dirty); … … 802 808 { 803 809 if (crMemcmp(to->mapStoS, from->mapStoS, CR_MAX_PIXEL_MAP_TABLE)) { 804 diff_api.PixelMapfv(GL_PIXEL_MAP_S_TO_S,to->mapStoSsize,(GLfloat*)to->mapStoS);810 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_S_TO_S,to->mapStoSsize,(GLfloat*)to->mapStoS); 805 811 FILLDIRTY(b->maps); 806 812 FILLDIRTY(b->dirty); 807 813 } 808 814 if (crMemcmp(to->mapItoI, from->mapItoI, CR_MAX_PIXEL_MAP_TABLE)) { 809 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_I,to->mapItoIsize,(GLfloat*)to->mapItoI);815 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_I,to->mapItoIsize,(GLfloat*)to->mapItoI); 810 816 FILLDIRTY(b->maps); 811 817 FILLDIRTY(b->dirty); 812 818 } 813 819 if (crMemcmp(to->mapItoR, from->mapItoR, CR_MAX_PIXEL_MAP_TABLE)) { 814 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_R,to->mapItoRsize,(GLfloat*)to->mapItoR);820 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_R,to->mapItoRsize,(GLfloat*)to->mapItoR); 815 821 FILLDIRTY(b->maps); 816 822 FILLDIRTY(b->dirty); 817 823 } 818 824 if (crMemcmp(to->mapItoG, from->mapItoG, CR_MAX_PIXEL_MAP_TABLE)) { 819 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_G,to->mapItoGsize,(GLfloat*)to->mapItoG);825 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_G,to->mapItoGsize,(GLfloat*)to->mapItoG); 820 826 FILLDIRTY(b->maps); 821 827 FILLDIRTY(b->dirty); 822 828 } 823 829 if (crMemcmp(to->mapItoB, from->mapItoB, CR_MAX_PIXEL_MAP_TABLE)) { 824 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_B,to->mapItoBsize,(GLfloat*)to->mapItoB);830 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_B,to->mapItoBsize,(GLfloat*)to->mapItoB); 825 831 FILLDIRTY(b->maps); 826 832 FILLDIRTY(b->dirty); 827 833 } 828 834 if (crMemcmp(to->mapItoA, from->mapItoA, CR_MAX_PIXEL_MAP_TABLE)) { 829 diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_A,to->mapItoAsize,(GLfloat*)to->mapItoA);835 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_I_TO_A,to->mapItoAsize,(GLfloat*)to->mapItoA); 830 836 FILLDIRTY(b->maps); 831 837 FILLDIRTY(b->dirty); 832 838 } 833 839 if (crMemcmp(to->mapRtoR, from->mapRtoR, CR_MAX_PIXEL_MAP_TABLE)) { 834 diff_api.PixelMapfv(GL_PIXEL_MAP_R_TO_R,to->mapRtoRsize,(GLfloat*)to->mapRtoR);840 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_R_TO_R,to->mapRtoRsize,(GLfloat*)to->mapRtoR); 835 841 FILLDIRTY(b->maps); 836 842 FILLDIRTY(b->dirty); 837 843 } 838 844 if (crMemcmp(to->mapGtoG, from->mapGtoG, CR_MAX_PIXEL_MAP_TABLE)) { 839 diff_api.PixelMapfv(GL_PIXEL_MAP_G_TO_G,to->mapGtoGsize,(GLfloat*)to->mapGtoG);845 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_G_TO_G,to->mapGtoGsize,(GLfloat*)to->mapGtoG); 840 846 FILLDIRTY(b->maps); 841 847 FILLDIRTY(b->dirty); 842 848 } 843 849 if (crMemcmp(to->mapBtoB, from->mapBtoB, CR_MAX_PIXEL_MAP_TABLE)) { 844 diff_api.PixelMapfv(GL_PIXEL_MAP_B_TO_B,to->mapBtoBsize,(GLfloat*)to->mapBtoB);850 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_B_TO_B,to->mapBtoBsize,(GLfloat*)to->mapBtoB); 845 851 FILLDIRTY(b->maps); 846 852 FILLDIRTY(b->dirty); 847 853 } 848 854 if (crMemcmp(to->mapAtoA, from->mapAtoA, CR_MAX_PIXEL_MAP_TABLE)) { 849 diff_api.PixelMapfv(GL_PIXEL_MAP_A_TO_A,to->mapAtoAsize,(GLfloat*)to->mapAtoA);855 pState->diff_api.PixelMapfv(GL_PIXEL_MAP_A_TO_A,to->mapAtoAsize,(GLfloat*)to->mapAtoA); 850 856 FILLDIRTY(b->maps); 851 857 FILLDIRTY(b->dirty);
Note:
See TracChangeset
for help on using the changeset viewer.