Changeset 57946 in vbox
- Timestamp:
- Sep 29, 2015 3:28:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c
r54582 r57946 426 426 } 427 427 428 /* Check that OpenGL extensions listed in pszRequiredExts string also exist in the pszAvailableExts string. */ 429 static void renderCompareGLExtensions(const char *pszAvailableExts, const char *pszRequiredExts) 430 { 431 unsigned char fPrintHeader = 1; 432 const char *pszExt = pszRequiredExts; 433 434 for (;;) 435 { 436 const char *pszSrc = pszAvailableExts; 437 size_t offExtEnd; 438 439 while (*pszExt == ' ') 440 ++pszExt; 441 442 if (!*pszExt) 443 break; 444 445 offExtEnd = RTStrOffCharOrTerm(pszExt, ' '); 446 447 for (;;) 448 { 449 size_t offSrcEnd; 450 451 while (*pszSrc == ' ') 452 ++pszSrc; 453 454 if (!*pszSrc) 455 break; 456 457 offSrcEnd = RTStrOffCharOrTerm(pszSrc, ' '); 458 459 if ( offSrcEnd == offExtEnd 460 && memcmp(pszSrc, pszExt, offSrcEnd) == 0) 461 break; 462 463 pszSrc += offSrcEnd; 464 } 465 466 if (!*pszSrc) 467 { 468 if (fPrintHeader) 469 { 470 fPrintHeader = 0; 471 crInfo("Host does not support OpenGL extension(s):"); 472 } 473 crInfo("%.*s", offExtEnd, pszExt); 474 } 475 476 pszExt += offExtEnd; 477 } 478 } 479 428 480 void renderspuPerformMakeCurrent(WindowInfo *window, GLint nativeWindow, ContextInfo *context) 429 481 { … … 449 501 renderspu_SystemMakeCurrent( window, nativeWindow, context ); 450 502 if (!context->everCurrent) { 503 static volatile uint32_t u32ExtCompared = 0; 451 504 /* print OpenGL info */ 452 505 const char *extString = (const char *) render_spu.ws.glGetString( GL_EXTENSIONS ); … … 458 511 crInfo( "Render SPU: GL_VERSION: %s", render_spu.ws.glGetString( GL_VERSION ) ); 459 512 crInfo( "Render SPU: GL_EXTENSIONS: %s", render_spu.ws.glGetString( GL_EXTENSIONS ) ); 513 514 if (ASMAtomicCmpXchgU32(&u32ExtCompared, 1, 0)) 515 renderCompareGLExtensions(extString, crExtensions); 516 460 517 if (crStrstr(extString, "GL_ARB_window_pos")) 461 518 context->haveWindowPosARB = GL_TRUE;
Note:
See TracChangeset
for help on using the changeset viewer.

