Changeset 35852 in vbox for trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c
- Timestamp:
- Feb 4, 2011 2:31:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c
r31808 r35852 1445 1445 } 1446 1446 1447 static GLboolean crStateCanLockClientPointer(CRClientPointer* cp) 1448 { 1449 return !(cp->enabled && cp->buffer && cp->buffer->id); 1450 } 1451 1447 1452 void STATE_APIENTRY crStateLockArraysEXT(GLint first, GLint count) 1448 1453 { 1449 1454 CRContext *g = GetCurrentContext(); 1450 1455 CRClientState *c = &(g->client); 1451 unsigned int i; 1456 int i; 1457 1458 for (i=0; i<CRSTATECLIENT_MAX_VERTEXARRAYS; ++i) 1459 { 1460 if (!crStateCanLockClientPointer(crStateGetClientPointerByIndex(i, &c->array))) 1461 { 1462 break; 1463 } 1464 } 1465 if (i<CRSTATECLIENT_MAX_VERTEXARRAYS) 1466 { 1467 crDebug("crStateLockArraysEXT ignored because array %i have a bound VBO", i); 1468 return; 1469 } 1452 1470 1453 1471 c->array.locked = GL_TRUE; … … 1458 1476 #endif 1459 1477 1460 crStateLockClientPointer(&c->array.v); 1461 crStateLockClientPointer(&c->array.c); 1462 crStateLockClientPointer(&c->array.f); 1463 crStateLockClientPointer(&c->array.s); 1464 crStateLockClientPointer(&c->array.e); 1465 crStateLockClientPointer(&c->array.i); 1466 crStateLockClientPointer(&c->array.n); 1467 for (i = 0 ; i < CR_MAX_TEXTURE_UNITS ; i++) 1468 { 1469 crStateLockClientPointer(&c->array.t[i]); 1470 } 1471 for (i = 0; i < CR_MAX_VERTEX_ATTRIBS; i++) 1472 { 1473 crStateLockClientPointer(&c->array.a[i]); 1478 for (i=0; i<CRSTATECLIENT_MAX_VERTEXARRAYS; ++i) 1479 { 1480 crStateLockClientPointer(crStateGetClientPointerByIndex(i, &c->array)); 1474 1481 } 1475 1482 } … … 1479 1486 CRContext *g = GetCurrentContext(); 1480 1487 CRClientState *c = &(g->client); 1481 unsignedint i;1488 int i; 1482 1489 1483 1490 c->array.locked = GL_FALSE; … … 1486 1493 #endif 1487 1494 1488 crStateUnlockClientPointer(&c->array.v); 1489 crStateUnlockClientPointer(&c->array.c); 1490 crStateUnlockClientPointer(&c->array.f); 1491 crStateUnlockClientPointer(&c->array.s); 1492 crStateUnlockClientPointer(&c->array.e); 1493 crStateUnlockClientPointer(&c->array.i); 1494 crStateUnlockClientPointer(&c->array.n); 1495 for (i = 0 ; i < CR_MAX_TEXTURE_UNITS ; i++) 1496 { 1497 crStateUnlockClientPointer(&c->array.t[i]); 1498 } 1499 for (i = 0; i < CR_MAX_VERTEX_ATTRIBS; i++) 1500 { 1501 crStateUnlockClientPointer(&c->array.a[i]); 1495 for (i=0; i<CRSTATECLIENT_MAX_VERTEXARRAYS; ++i) 1496 { 1497 crStateUnlockClientPointer(crStateGetClientPointerByIndex(i, &c->array)); 1502 1498 } 1503 1499 }
Note:
See TracChangeset
for help on using the changeset viewer.