- Timestamp:
- Dec 21, 2015 2:18:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_config.c
r54905 r59198 59 59 60 60 /* Check if host reports minimal OpenGL capabilities. 61 * 62 * Require OpenGL 2.1 or later. 63 * 61 64 * For example, on Windows host this may happen if host has no graphics 62 65 * card drivers installed or drivers were not properly signed or VBox … … 67 70 static bool crServerHasInsufficientCaps() 68 71 { 69 const char *sRealRender; 70 const char *sRealVersion; 72 const char *pszRealVersion; 73 int rc; 74 uint32_t u32VerMajor = 0; 75 uint32_t u32VerMinor = 0; 76 char *pszNext = NULL; 71 77 72 78 if (!cr_server.head_spu) 73 79 return true; 74 80 75 sRealRender = (const char *)cr_server.head_spu->dispatch_table.GetString(GL_REAL_RENDERER); 76 sRealVersion = (const char *)cr_server.head_spu->dispatch_table.GetString(GL_REAL_VERSION); 77 78 if (sRealRender && RTStrCmp(sRealRender, "GDI Generic") == 0) 79 if (sRealVersion && RTStrCmp(sRealVersion, "1.1.0") == 0) 80 return true; 81 return false; 81 pszRealVersion = (const char *)cr_server.head_spu->dispatch_table.GetString(GL_REAL_VERSION); 82 if (!pszRealVersion) 83 return true; /* No version == insufficient. */ 84 85 rc = RTStrToUInt32Ex(pszRealVersion, &pszNext, 10, &u32VerMajor); 86 if ( RT_SUCCESS(rc) 87 && *pszNext == '.') 88 RTStrToUInt32Ex(pszNext + 1, NULL, 10, &u32VerMinor); 89 90 crInfo("Host supports version %d.%d [%s]", u32VerMajor, u32VerMinor, pszRealVersion); 91 92 if ( u32VerMajor > 2 93 || (u32VerMajor == 2 && u32VerMinor >= 1)) 94 return false; /* >= 2.1, i.e. good enough. */ 95 96 return true; /* Insufficient. */ 82 97 } 83 98
Note:
See TracChangeset
for help on using the changeset viewer.

