Changeset 76255 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Dec 16, 2018 6:47:05 PM (6 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.cpp
r76254 r76255 19 19 #include "DevVGA-SVGA3d-glLdr.h" 20 20 21 #include <VBox/vmm/pdmdev.h> 22 #include <VBox/err.h> 21 23 #include <iprt/assert.h> 22 24 #include <iprt/cdefs.h> 23 #include <iprt/err.h>24 25 #include <iprt/ldr.h> 25 26 #include <iprt/log.h> … … 126 127 127 128 #define GLGETPROC_(ProcName, NameSuffix) do { \ 128 *(PFNRT *)&pfn_##ProcName = OGLGETPROCADDRESS(#ProcName NameSuffix); \ 129 AssertLogRelMsgReturn(pfn_##ProcName, ("%s missing\n", #ProcName NameSuffix), VERR_NOT_IMPLEMENTED); \ 129 *(PFNRT *)&pfn_##ProcName = pfnRet = OGLGETPROCADDRESS(#ProcName NameSuffix); \ 130 if (pfnRet) { /* likely */ } \ 131 else \ 132 { \ 133 AssertLogRelMsg(pfnRet, ("%s missing\n", #ProcName NameSuffix)); \ 134 return PDMDevHlpVMSetError(pDevIns, VERR_VGA_GL_SYMBOL_NOT_FOUND, RT_SRC_POS, \ 135 "Missing OpenGL symbol '%s'\n", #ProcName NameSuffix); \ 136 } \ 130 137 } while(0) 131 138 132 int glLdrInit(void) 133 { 139 int glLdrInit(PPDMDEVINS pDevIns) 140 { 141 /** @todo r=bird: Perhaps make this template include file driven? See 142 * include/VBox/dbus.h, include/VBox/dbus-calls.h and iprt/runtime-loader.h for 143 * instance. Regardless, it would be would be nice if we could move up the 144 * RTLdrLoadSystem/dlopen bits and have separate error reporting for those, 145 * making use of VERR_VGA_GL_LOAD_FAILURE. I can look into that, but 146 * probably only after the release is out... */ 147 134 148 pfn_glAlphaFunc = 0; 135 149 pfn_glBindTexture = 0; … … 211 225 #endif 212 226 227 PFNRT pfnRet; 213 228 GLGETPROC_(glAlphaFunc, ""); 214 229 GLGETPROC_(glBindTexture, ""); … … 294 309 } 295 310 296 int glLdrGetExtFunctions(void) 297 { 311 int glLdrGetExtFunctions(PPDMDEVINS pDevIns) 312 { 313 PFNRT pfnRet; 298 314 GLGETPROC_(glBlendColor, ""); 299 315 GLGETPROC_(glBlendEquation, ""); -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.h
r76253 r76255 23 23 #endif 24 24 25 #include < iprt/types.h>25 #include <VBox/types.h> 26 26 27 27 /** @todo VBOX_VMSVGA3D_GL_HACK_LEVEL is not necessary when dynamic loading is used. */ … … 78 78 #endif 79 79 80 /* Load OpenGL library and initialize function pointers. */81 int glLdrInit( void);82 /* Resolve an OpenGL function name. */80 /** Load OpenGL library and initialize function pointers. */ 81 int glLdrInit(PPDMDEVINS pDevIns); 82 /** Resolve an OpenGL function name. */ 83 83 PFNRT glLdrGetProcAddress(const char *pszSymbol); 84 /* Get pointers to extension function. They are available on Windows only when OpenGL context is set. */85 int glLdrGetExtFunctions( void);84 /** Get pointers to extension function. They are available on Windows only when OpenGL context is set. */ 85 int glLdrGetExtFunctions(PPDMDEVINS pDevIns); 86 86 87 87 /* -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-internal.h
r76246 r76255 40 40 41 41 #if defined(VMSVGA3D_DYNAMIC_LOAD) && defined(VMSVGA3D_OPENGL) 42 # include "DevVGA-SVGA3d-glLdr.h"42 # include "DevVGA-SVGA3d-glLdr.h" 43 43 #endif 44 44 -
trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-ogl.cpp
r76253 r76255 592 592 593 593 #ifdef VMSVGA3D_DYNAMIC_LOAD 594 rc = glLdrInit( );594 rc = glLdrInit(pThis->pDevInsR3); 595 595 if (RT_FAILURE(rc)) 596 596 { … … 812 812 #ifdef VMSVGA3D_DYNAMIC_LOAD 813 813 /* Context is set and it is possible now to resolve extension functions. */ 814 rc = glLdrGetExtFunctions( );814 rc = glLdrGetExtFunctions(pThis->pDevInsR3); 815 815 if (RT_FAILURE(rc)) 816 816 {
Note:
See TracChangeset
for help on using the changeset viewer.