VirtualBox

Ignore:
Timestamp:
Jan 16, 2013 1:16:57 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83229
Message:

wined3d: 1.fix shader gen 2.use vboxogl PixelFormat API directly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_gl.h

    r43488 r44306  
    13811381BOOL (WINAPI *pwglSwapLayerBuffers)(HDC, UINT) DECLSPEC_HIDDEN;
    13821382BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN;
     1383BOOL (WINAPI *pwglChoosePixelFormat)(HDC, const PIXELFORMATDESCRIPTOR *) DECLSPEC_HIDDEN;
     1384int (WINAPI *pwglDescribePixelFormat)(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR) DECLSPEC_HIDDEN;
     1385int (WINAPI *pwglGetPixelFormat)(HDC) DECLSPEC_HIDDEN;
     1386BOOL (WINAPI *pwglSetPixelFormat)(HDC, int, const PIXELFORMATDESCRIPTOR *) DECLSPEC_HIDDEN;
    13831387
    13841388HGLRC (WINAPI *pVBoxCreateContext)(HDC, struct VBOXUHGSMI*) DECLSPEC_HIDDEN;
    13851389void (WINAPI *pVBoxFlushToHost)(HGLRC) DECLSPEC_HIDDEN;
     1390
     1391#if defined(VBOX_WITH_WDDM) || defined(VBOX_WINE_WITH_SINGLE_SWAPCHAIN_CONTEXT)
     1392# define VBOX_WINE_WITH_DIRECT_VBOXOGL
     1393#endif
     1394
     1395#ifdef VBOX_WINE_WITH_DIRECT_VBOXOGL
     1396/* make sure we used stuff from VBoxOGL
     1397 * we do it this way to avoid extra modifications to Wine code */
     1398
     1399/* We're directly using wglMakeCurrent calls skipping GDI layer, which causes GDI SwapBuffers to fail trying to
     1400 * call glFinish, which doesn't have any context set. So we use wglSwapLayerBuffers directly as well.
     1401 */
     1402# define SwapBuffers(_hdc) pwglSwapLayerBuffers((_hdc), WGL_SWAP_MAIN_PLANE)
     1403
     1404/* we avoid using GDI32!*PixelFormat API and use VBoxOGL stuff directly
     1405 * because SetPixelFormat may eventually lead to opengl32 setting its own window proc via SetWindowLongPtr
     1406 * thus wined3d_[un]register_window stuff will become screwed up leading to infinite recursion or other misbehave */
     1407# define ChoosePixelFormat pwglChoosePixelFormat
     1408# define DescribePixelFormat pwglDescribePixelFormat
     1409# define GetPixelFormat pwglGetPixelFormat
     1410# define SetPixelFormat pwglSetPixelFormat
     1411#endif
    13861412
    13871413#define GL_FUNCS_GEN \
     
    17291755    USE_WGL_FUNC(wglMakeCurrent) \
    17301756    USE_WGL_FUNC(wglShareLists) \
    1731     USE_WGL_FUNC(wglSwapLayerBuffers)
     1757    USE_WGL_FUNC(wglSwapLayerBuffers) \
     1758    USE_WGL_FUNC(wglChoosePixelFormat) \
     1759    USE_WGL_FUNC(wglDescribePixelFormat) \
     1760    USE_WGL_FUNC(wglGetPixelFormat) \
     1761    USE_WGL_FUNC(wglSetPixelFormat)
    17321762
    17331763#define VBOX_FUNCS_GEN \
Note: See TracChangeset for help on using the changeset viewer.

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