Changeset 3467 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Jul 5, 2007 1:49:32 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 22679
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/glwindrv.cpp
r3463 r3467 419 419 bool vboxDrvIsExtensionAvailable(char *pszExtFunctionName) 420 420 { 421 Log(("vboxDrvIsExtensionAvailable %s -> %d\n", pszExtFunctionName, !!wglGetProcAddress(pszExtFunctionName))); 422 return !!wglGetProcAddress(pszExtFunctionName); 423 } 421 PIXELFORMATDESCRIPTOR pfd; 422 int iFormat; 423 HDC hdc = GetDC(0); 424 425 /** @todo rather expensive -> check all known extensions in one go */ 426 ZeroMemory(&pfd, sizeof(pfd)); 427 pfd.nSize = sizeof(pfd); 428 pfd.nVersion = 1; 429 pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; 430 pfd.iPixelType = PFD_TYPE_RGBA; 431 pfd.cColorBits = 24; 432 pfd.cDepthBits = 16; 433 pfd.iLayerType = PFD_MAIN_PLANE; 434 iFormat = ChoosePixelFormat(hdc, &pfd); 435 SetPixelFormat(hdc, iFormat, &pfd); 436 437 HGLRC hRC = wglCreateContext(hdc); 438 wglMakeCurrent(hdc, hRC); 439 440 bool fAvailable = !!wglGetProcAddress(pszExtFunctionName); 441 442 Log(("vboxDrvIsExtensionAvailable %s -> %d\n", pszExtFunctionName, fAvailable)); 443 444 wglMakeCurrent(NULL, NULL); 445 wglDeleteContext(hRC); 446 ReleaseDC(0, hdc); 447 448 return fAvailable; 449 } -
trunk/src/VBox/HostServices/SharedOpenGL/service.cpp
r3461 r3467 280 280 /* sanity checks */ 281 281 if ( cbExtFnName > 256 282 || pszExtFnName[cbExtFnName ] != 0282 || pszExtFnName[cbExtFnName-1] != 0 283 283 ) 284 284 { -
trunk/src/VBox/HostServices/SharedOpenGL/vboxgl.cpp
r3441 r3467 126 126 AssertMsgReturn(pCmd->enmOp < VBOX_OGL_OP_Last, ("Invalid OpenGL cmd %x\n", pCmd->enmOp), VERR_INVALID_PARAMETER); 127 127 128 Log2(("Flush cmd %s cParams=%d cbCmd=%x\n", pszVBoxOGLCmd[pCmd->enmOp], pCmd->cParams, pCmd->cbCmd)); 128 if ( pCmd->enmOp != VBOX_OGL_OP_Vertex3f 129 && pCmd->enmOp != VBOX_OGL_OP_Normal3f) 130 Log(("Flush cmd %s cParams=%d cbCmd=%x\n", pszVBoxOGLCmd[pCmd->enmOp], pCmd->cParams, pCmd->cbCmd)); 129 131 130 132 /* call wrapper */
Note:
See TracChangeset
for help on using the changeset viewer.