Changeset 22284 in vbox for trunk/src/VBox/Additions/common/crOpenGL
- Timestamp:
- Aug 17, 2009 8:44:47 AM (15 years ago)
- Location:
- trunk/src/VBox/Additions/common/crOpenGL/pack
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_client.c
r21564 r22284 137 137 } 138 138 139 void PACKSPU_APIENTRY packspu_IndexPointer( GLenum type, GLsizei stride, const GLvoid *pointer ) 140 { 141 #if CR_ARB_vertex_buffer_object 142 GET_CONTEXT(ctx); 143 if (ctx->clientState->extensions.ARB_vertex_buffer_object) { 144 if (pack_spu.swap) 145 crPackIndexPointerSWAP( type, stride, pointer ); 146 else 147 crPackIndexPointer( type, stride, pointer ); 148 } 149 #endif 150 crStateIndexPointer(type, stride, pointer); 151 } 152 139 153 void PACKSPU_APIENTRY packspu_GetPointerv( GLenum pname, GLvoid **params ) 140 154 { … … 175 189 176 190 if (serverArrays) { 191 GET_CONTEXT(ctx); 192 CRClientState *clientState = &(ctx->clientState->client); 193 194 /*Note the comment in packspu_LockArraysEXT*/ 195 if (clientState->array.locked && !clientState->array.synced) 196 { 197 crPackLockArraysEXT(clientState->array.lockFirst, clientState->array.lockCount); 198 clientState->array.synced = GL_TRUE; 199 } 200 177 201 /* Send the DrawArrays command over the wire */ 178 202 if (pack_spu.swap) … … 211 235 212 236 if (serverArrays) { 237 GET_CONTEXT(ctx); 238 CRClientState *clientState = &(ctx->clientState->client); 239 240 /*Note the comment in packspu_LockArraysEXT*/ 241 if (clientState->array.locked && !clientState->array.synced) 242 { 243 crPackLockArraysEXT(clientState->array.lockFirst, clientState->array.lockCount); 244 clientState->array.synced = GL_TRUE; 245 } 246 213 247 /* Send the DrawArrays command over the wire */ 214 248 if (pack_spu.swap) … … 246 280 247 281 if (serverArrays) { 282 GET_CONTEXT(ctx); 283 CRClientState *clientState = &(ctx->clientState->client); 284 285 /*Note the comment in packspu_LockArraysEXT*/ 286 if (clientState->array.locked && !clientState->array.synced) 287 { 288 crPackLockArraysEXT(clientState->array.lockFirst, clientState->array.lockCount); 289 clientState->array.synced = GL_TRUE; 290 } 291 248 292 /* Send the DrawRangeElements command over the wire */ 249 293 if (pack_spu.swap) … … 279 323 280 324 if (serverArrays) { 325 GET_CONTEXT(ctx); 326 CRClientState *clientState = &(ctx->clientState->client); 327 328 /*Note the comment in packspu_LockArraysEXT*/ 329 if (clientState->array.locked && !clientState->array.synced) 330 { 331 crPackLockArraysEXT(clientState->array.lockFirst, clientState->array.lockCount); 332 clientState->array.synced = GL_TRUE; 333 } 334 281 335 /* Send the DrawArrays command over the wire */ 282 336 if (pack_spu.swap) … … 402 456 crPackPopClientAttrib(); 403 457 } 458 459 void PACKSPU_APIENTRY packspu_LockArraysEXT(GLint first, GLint count) 460 { 461 if (first>=0 && count>0) 462 { 463 crStateLockArraysEXT(first, count); 464 /*Note: this is a workaround for quake3 based apps. 465 It's modifying vertex data between glLockArraysEXT and glDrawElements calls, 466 so we'd pass data to host right before the glDrawSomething call. 467 */ 468 /*crPackLockArraysEXT(first, count);*/ 469 } 470 else crDebug("Ignoring packspu_LockArraysEXT: first:%i, count:%i", first, count); 471 } 472 473 void PACKSPU_APIENTRY packspu_UnlockArraysEXT() 474 { 475 crStateUnlockArraysEXT(); 476 crPackUnlockArraysEXT(); 477 } -
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_special
r21308 r22284 22 22 TexCoordPointer 23 23 EdgeFlagPointer 24 IndexPointer 24 25 ArrayElement 25 26 DrawArrays … … 77 78 GetBufferSubDataARB 78 79 IsEnabled 80 LockArraysEXT 81 UnlockArraysEXT
Note:
See TracChangeset
for help on using the changeset viewer.