VirtualBox

Changeset 76247 in vbox


Ignore:
Timestamp:
Dec 15, 2018 10:53:09 PM (6 years ago)
Author:
vboxsync
Message:

DevVGA-SVGA3d: more for dynamic loading of opengl

Location:
trunk/src/VBox/Devices/Graphics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.cpp

    r76245 r76247  
    109109    if (s_glXGetProcAddress)
    110110    {
    111         return glXGetProcAddress((const GLubyte *)pszSymbol);
     111        void *p = glXGetProcAddress((const GLubyte *)pszSymbol);
     112        if (RT_VALID_PTR(p))
     113            return p;
     114
     115        /* Might be an exported symbol. */
     116        rc = RTLdrGetSymbol(s_hGL, pszSymbol, (void **)&p);
     117        if (RT_SUCCESS(rc))
     118            return p;
    112119    }
    113120
     
    189196    pfn_glVertexPointer = 0;
    190197    pfn_glViewport = 0;
     198#ifdef RT_OS_WINDOWS
     199    pfn_wglCreateContext = 0;
     200    pfn_wglDeleteContext = 0;
     201    pfn_wglMakeCurrent = 0;
     202    pfn_wglShareLists = 0;
     203#elif defined(RT_OS_LINUX)
     204    pfn_glXQueryVersion = 0;
     205    pfn_glXChooseVisual = 0;
     206    pfn_glXCreateContext = 0;
     207    pfn_glXMakeCurrent = 0;
     208    pfn_glXDestroyContext = 0;
     209#endif
    191210
    192211    GLGETPROC_(glAlphaFunc, "");
     
    258277    GLGETPROC_(wglMakeCurrent, "");
    259278    GLGETPROC_(wglShareLists, "");
     279#elif defined(RT_OS_LINUX)
     280    GLGETPROC_(glXQueryVersion, "");
     281    GLGETPROC_(glXChooseVisual, "");
     282    GLGETPROC_(glXCreateContext, "");
     283    GLGETPROC_(glXMakeCurrent, "");
     284    GLGETPROC_(glXDestroyContext, "");
    260285#endif
    261286    return VINF_SUCCESS;
  • trunk/src/VBox/Devices/Graphics/DevVGA-SVGA3d-glLdr.h

    r76245 r76247  
    306306GLPFN BOOL (WINAPI *pfn_wglShareLists)(HGLRC, HGLRC);
    307307#define wglShareLists pfn_wglShareLists
    308 #endif
    309 
    310 #endif
     308
     309#elif defined(RT_OS_LINUX)
     310/*
     311 * GLX
     312 */
     313GLPFN Bool (* pfn_glXQueryVersion)(Display * dpy,  int * major,  int * minor);
     314#define glXQueryVersion pfn_glXQueryVersion
     315
     316GLPFN XVisualInfo* (* pfn_glXChooseVisual)(Display * dpy,  int screen,  int * attribList);
     317#define glXChooseVisual pfn_glXChooseVisual
     318
     319GLPFN GLXContext (* pfn_glXCreateContext)(Display * dpy,  XVisualInfo * vis,  GLXContext shareList,  Bool direct);
     320#define glXCreateContext pfn_glXCreateContext
     321
     322GLPFN Bool (* pfn_glXMakeCurrent)(Display * dpy,  GLXDrawable drawable,  GLXContext ctx);
     323#define glXMakeCurrent pfn_glXMakeCurrent
     324
     325GLPFN void (* pfn_glXDestroyContext)(Display * dpy,  GLXContext ctx);
     326#define glXDestroyContext pfn_glXDestroyContext
     327
     328#endif
     329
     330#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette