Changeset 76269 in vbox for trunk/src/VBox
- Timestamp:
- Dec 17, 2018 6:05:17 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.cpp
r76263 r76269 133 133 { 134 134 static const char s_szLibX11[] = "libX11.so.6"; 135 rc = RTLdrLoadEx(s_szLibX11, &s_hX11, RTLDRLOAD_FLAGS_ GLOBAL | RTLDRLOAD_FLAGS_NO_UNLOAD, NULL);135 rc = RTLdrLoadEx(s_szLibX11, &s_hX11, RTLDRLOAD_FLAGS_LOCAL | RTLDRLOAD_FLAGS_NO_UNLOAD, NULL); 136 136 if (RT_FAILURE(rc)) 137 137 { … … 182 182 * probably only after the release is out... */ 183 183 184 #ifdef RT_OS_WINDOWS 185 pfn_wglCreateContext = 0; 186 pfn_wglDeleteContext = 0; 187 pfn_wglMakeCurrent = 0; 188 pfn_wglShareLists = 0; 189 #elif defined(RT_OS_LINUX) 190 pfn_glXQueryVersion = 0; 191 pfn_glXChooseVisual = 0; 192 pfn_glXCreateContext = 0; 193 pfn_glXMakeCurrent = 0; 194 pfn_glXDestroyContext = 0; 195 pfn_XConfigureWindow = 0; 196 pfn_XCloseDisplay = 0; 197 pfn_XCreateColormap = 0; 198 pfn_XCreateWindow = 0; 199 pfn_XDefaultRootWindow = 0; 200 pfn_XDestroyWindow = 0; 201 pfn_XNextEvent = 0; 202 pfn_XOpenDisplay = 0; 203 pfn_XPending = 0; 204 #endif 184 205 pfn_glAlphaFunc = 0; 185 206 pfn_glBindTexture = 0; … … 248 269 pfn_glVertexPointer = 0; 249 270 pfn_glViewport = 0; 271 272 PFNRT pfnRet; 250 273 #ifdef RT_OS_WINDOWS 251 pfn_wglCreateContext = 0;252 pfn_wglDeleteContext = 0;253 pfn_wglMakeCurrent = 0;254 pfn_wglShareLists = 0;274 GLGETPROC_(wglCreateContext, ""); 275 GLGETPROC_(wglDeleteContext, ""); 276 GLGETPROC_(wglMakeCurrent, ""); 277 GLGETPROC_(wglShareLists, ""); 255 278 #elif defined(RT_OS_LINUX) 256 pfn_glXQueryVersion = 0;257 pfn_glXChooseVisual = 0;258 pfn_glXCreateContext = 0;259 pfn_glXMakeCurrent = 0;260 pfn_glXDestroyContext = 0;261 pfn_XConfigureWindow = 0;262 pfn_XCloseDisplay = 0;263 pfn_XCreateColormap = 0;264 pfn_XCreateWindow = 0;265 pfn_XDefaultRootWindow = 0;266 pfn_XDestroyWindow = 0;267 pfn_XNextEvent = 0;268 pfn_XOpenDisplay = 0;269 pfn_XPending = 0;279 X11GETPROC_(XConfigureWindow); 280 X11GETPROC_(XCloseDisplay); 281 X11GETPROC_(XCreateColormap); 282 X11GETPROC_(XCreateWindow); 283 X11GETPROC_(XDefaultRootWindow); 284 X11GETPROC_(XDestroyWindow); 285 X11GETPROC_(XNextEvent); 286 X11GETPROC_(XOpenDisplay); 287 X11GETPROC_(XPending); 288 GLGETPROC_(glXQueryVersion, ""); 289 GLGETPROC_(glXChooseVisual, ""); 290 GLGETPROC_(glXCreateContext, ""); 291 GLGETPROC_(glXMakeCurrent, ""); 292 GLGETPROC_(glXDestroyContext, ""); 270 293 #endif 271 272 PFNRT pfnRet;273 294 GLGETPROC_(glAlphaFunc, ""); 274 295 GLGETPROC_(glBindTexture, ""); … … 334 355 GLGETPROC_(glVertexPointer, ""); 335 356 GLGETPROC_(glViewport, ""); 336 #ifdef RT_OS_WINDOWS337 GLGETPROC_(wglCreateContext, "");338 GLGETPROC_(wglDeleteContext, "");339 GLGETPROC_(wglMakeCurrent, "");340 GLGETPROC_(wglShareLists, "");341 #elif defined(RT_OS_LINUX)342 GLGETPROC_(glXQueryVersion, "");343 GLGETPROC_(glXChooseVisual, "");344 GLGETPROC_(glXCreateContext, "");345 GLGETPROC_(glXMakeCurrent, "");346 GLGETPROC_(glXDestroyContext, "");347 X11GETPROC_(XConfigureWindow);348 X11GETPROC_(XCloseDisplay);349 X11GETPROC_(XCreateColormap);350 X11GETPROC_(XCreateWindow);351 X11GETPROC_(XDefaultRootWindow);352 X11GETPROC_(XDestroyWindow);353 X11GETPROC_(XNextEvent);354 X11GETPROC_(XOpenDisplay);355 X11GETPROC_(XPending);356 #endif357 357 return VINF_SUCCESS; 358 358 } -
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.