Changeset 76269 in vbox for trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
- Timestamp:
- Dec 17, 2018 6:05:17 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 127546
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r76266 r76269 3032 3032 /* get an X display and make sure we have glX 1.3 */ 3033 3033 pState->display = XOpenDisplay(0); 3034 Assert (pState->display);3034 AssertLogRelMsgReturn(pState->display, ("XOpenDisplay failed"), VERR_INTERNAL_ERROR); 3035 3035 int glxMajor, glxMinor; 3036 3036 Bool ret = glXQueryVersion(pState->display, &glxMajor, &glxMinor); 3037 Assert MsgReturn(ret && glxMajor == 1 && glxMinor >= 3, ("glX >=1.3 not present"), VERR_INTERNAL_ERROR);3037 AssertLogRelMsgReturn(ret && glxMajor == 1 && glxMinor >= 3, ("glX >=1.3 not present"), VERR_INTERNAL_ERROR); 3038 3038 /* start our X event handling thread */ 3039 3039 rc = RTThreadCreate(&pState->pWindowThread, vmsvga3dXEventThread, pState, 0, RTTHREADTYPE_GUI, RTTHREADFLAGS_WAITABLE, "VMSVGA3DXEVENT"); 3040 if (RT_FAILURE(rc)) 3041 { 3042 AssertMsgFailed(("%s: Async IO Thread creation for 3d window handling failed rc=%d\n", __FUNCTION__, rc)); 3043 return rc; 3044 } 3045 } 3046 3040 AssertLogRelMsgReturn(RT_SUCCESS(rc), ("Async IO Thread creation for 3d window handling failed rc=%Rrc\n", rc), rc); 3041 } 3042 3043 Window defaultRootWindow = XDefaultRootWindow(pState->display); 3047 3044 /* Create a small 4x4 window required for GL context. */ 3048 3045 int attrib[] = … … 3057 3054 }; 3058 3055 XVisualInfo *vi = glXChooseVisual(pState->display, DefaultScreen(pState->display), attrib); 3056 AssertLogRelMsgReturn(vi, ("glXChooseVisual failed"), VERR_INTERNAL_ERROR); 3059 3057 XSetWindowAttributes swa; 3060 swa.colormap = XCreateColormap(pState->display, XDefaultRootWindow(pState->display), vi->visual, AllocNone); 3058 swa.colormap = XCreateColormap(pState->display, defaultRootWindow, vi->visual, AllocNone); 3059 AssertLogRelMsgReturn(swa.colormap, ("XCreateColormap failed"), VERR_INTERNAL_ERROR); 3061 3060 swa.border_pixel = 0; 3062 3061 swa.background_pixel = 0; 3063 3062 swa.event_mask = StructureNotifyMask; 3064 3063 unsigned long flags = CWBorderPixel | CWBackPixel | CWColormap | CWEventMask; 3065 pContext->window = XCreateWindow(pState->display, XDefaultRootWindow(pState->display),3064 pContext->window = XCreateWindow(pState->display, defaultRootWindow, 3066 3065 0, 0, 4, 4, 3067 3066 0, vi->depth, InputOutput,
Note:
See TracChangeset
for help on using the changeset viewer.