Changeset 46966 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Jul 4, 2013 6:08:11 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 86974
- Location:
- trunk/src/VBox/Additions/common/crOpenGL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/defs.py
r46227 r46966 498 498 VBoxCreateContext 499 499 VBoxGetWindowId 500 VBoxGetContextId 500 501 VBoxFlushToHost""" 501 502 #print "DllMain" -
trunk/src/VBox/Additions/common/crOpenGL/defs64.py
r46227 r46966 479 479 VBoxCreateContext 480 480 VBoxGetWindowId 481 VBoxGetContextId 481 482 VBoxFlushToHost""" 482 483 #print "DllMain" -
trunk/src/VBox/Additions/common/crOpenGL/wgl.c
r45484 r46966 329 329 DECLEXPORT(GLint) WINAPI VBoxGetWindowId( HDC hdc ) 330 330 { 331 WindowInfo *window = stubGetWindowInfo(hdc); 331 WindowInfo *window; 332 GLint winid = 0; 333 334 CR_DDI_PROLOGUE(); 335 336 crHashtableLock(stub.windowTable); 337 338 window = stubGetWindowInfo(hdc); 332 339 if (!window) 333 340 { 334 CRASSERT(0);335 341 crWarning("stubGetWindowInfo: window not found!"); 336 return 0;342 goto end; 337 343 } 338 344 if (!window->spuWindow) 339 345 { 340 CRASSERT(0);341 346 crWarning("stubGetWindowInfo: window is null!"); 342 return 0; 343 } 344 return window->spuWindow; 345 } 347 goto end; 348 } 349 350 winid = window->spuWindow; 351 352 end: 353 crHashtableUnlock(stub.windowTable); 354 return winid; 355 } 356 357 DECLEXPORT(GLint) WINAPI VBoxGetContextId( HGLRC hglrc ) 358 { 359 ContextInfo *context; 360 GLint ctxid = 0; 361 362 CR_DDI_PROLOGUE(); 363 364 // crHashtableLock(stub.windowTable); 365 crHashtableLock(stub.contextTable); 366 367 context = (ContextInfo *) crHashtableSearch(stub.contextTable, (unsigned long) hglrc); 368 if (!context) 369 { 370 crWarning("crHashtableSearch: context not found!"); 371 goto end; 372 } 373 374 if (context->type != CHROMIUM) 375 { 376 crWarning("unexpected context type %d", context->type); 377 goto end; 378 } 379 380 if (context->spuContext <= 0) 381 { 382 crWarning("no spuSontext defined"); 383 goto end; 384 } 385 386 ctxid = context->spuContext; 387 388 end: 389 crHashtableUnlock(stub.contextTable); 390 return ctxid; 391 } 392 346 393 347 394 DECLEXPORT(HGLRC) WINAPI wglCreateContext_prox( HDC hdc )
Note:
See TracChangeset
for help on using the changeset viewer.