Changeset 4088 in vbox for trunk/src/VBox/HostServices
- Timestamp:
- Aug 8, 2007 9:12:59 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/gllindrv.cpp
r4071 r4088 5 5 * Simple buffered OpenGL functions 6 6 * 7 * Contribut or: Alexander Eichner7 * Contributed by: Alexander Eichner 8 8 */ 9 9 … … 34 34 * Neccessary because Mesa and DRI cannot handle more than one 35 35 * connection per thread (only hardware acceleration, software rendering 36 * runs fine with more than one connection). 36 * runs fine with more than one connection). 37 37 * Would crash in vboxglDisconnect if on every vboxglConnect 38 38 * a new Display is created */ … … 110 110 GLX_DOUBLEBUFFER, GL_TRUE, /* Request a double-buffered color buffer with */ 111 111 GLX_RED_SIZE, 1, /* the maximum number of bits per component */ 112 GLX_GREEN_SIZE, 1, 112 GLX_GREEN_SIZE, 1, 113 113 GLX_BLUE_SIZE, 1, 114 114 None … … 120 120 121 121 /* we have to set up a rendering context to be able to use glGetString 122 * a window is created but is not mapped to screen (so it's not visible') 122 * a window is created but is not mapped to screen (so it's not visible') 123 123 * and a GLXContext is bound to it */ 124 124 screen_num = DefaultScreen(pClient->dpy); … … 151 151 { 152 152 /* Free all data */ 153 if (pClient->enable.ctx) 153 if (pClient->enable.ctx) 154 154 { 155 155 glFlush(); … … 191 191 if ((major == 1) && (minor >= 3)) { 192 192 Log(("Server GLX 1.3 supported\n")); 193 pClient->glxChooseFBConfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( 193 pClient->glxChooseFBConfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( 194 194 (GLubyte *) "glXChooseFBConfig"); 195 pClient->glxGetVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( 195 pClient->glxGetVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( 196 196 (GLubyte *) "glXGetVisualFromFBConfig"); 197 197 pClient->glxCreateNewContext = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) glXGetProcAddressARB( … … 199 199 } else if (vboxglCheckExtension(pClient->dpy, screenNum, "GLX_SGIX_fbconfig")) { 200 200 Log(("GLX_SGIX_fbconfig extension supported\n")); 201 pClient->glxChooseFBConfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( 201 pClient->glxChooseFBConfig = (PFNGLXCHOOSEFBCONFIGSGIXPROC) glXGetProcAddressARB( 202 202 (GLubyte *) "glXChooseFBConfigSGIX"); 203 pClient->glxGetVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( 203 pClient->glxGetVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) glXGetProcAddressARB( 204 204 (GLubyte *) "glXGetVisualFromFBConfigSGIX"); 205 205 pClient->glxCreateNewContext = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) glXGetProcAddressARB( … … 271 271 attr.event_mask = StructureNotifyMask | ExposureMask; 272 272 mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; 273 pClient->xWindow = XCreateWindow(pClient->dpy, 274 RootWindow(pClient->dpy, screen_num), 273 pClient->xWindow = XCreateWindow(pClient->dpy, 274 RootWindow(pClient->dpy, screen_num), 275 275 0, 0, pClient->winWidth, pClient->winHeight, 0, 276 276 visinfo->depth, InputOutput, … … 382 382 attr.event_mask = StructureNotifyMask | ExposureMask; 383 383 mask = CWBackPixel | CWBorderPixel | CWColormap | CWEventMask; 384 pClient->xWindow = XCreateWindow(pClient->dpy, 385 RootWindow(pClient->dpy, screen_num), 384 pClient->xWindow = XCreateWindow(pClient->dpy, 385 RootWindow(pClient->dpy, screen_num), 386 386 0, 0, pClient->winWidth, pClient->winHeight, 0, 387 387 visinfo->depth, InputOutput, … … 534 534 /* First get number of all visuals for the return value */ 535 535 screenNum = DefaultScreen(pClient->dpy); 536 allFBConfigs = glXGetFBConfigs(pClient->dpy, screenNum, 536 allFBConfigs = glXGetFBConfigs(pClient->dpy, screenNum, 537 537 &pClient->numFBConfigs); 538 538 pClient->PixelFormatToFBConfigMapper = allFBConfigs;
Note:
See TracChangeset
for help on using the changeset viewer.