Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
94abcd53
Commit
94abcd53
authored
Jun 27, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Always load wgl functions from opengl32.dll.
parent
6207d964
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
directx.c
dlls/wined3d/directx.c
+11
-17
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+5
-2
No files found.
dlls/wined3d/directx.c
View file @
94abcd53
...
...
@@ -5374,18 +5374,25 @@ static BOOL InitAdapters(struct wined3d *wined3d)
TRACE
(
"Initializing adapters
\n
"
);
if
(
!
mod_gl
)
{
#ifdef USE_WIN32_OPENGL
#define USE_GL_FUNC(pfn) pfn = (void*)GetProcAddress(mod_gl, #pfn);
mod_gl
=
LoadLibraryA
(
"opengl32.dll"
);
if
(
!
mod_gl
)
{
ERR
(
"Can't load opengl32.dll!
\n
"
);
goto
nogl_adapter
;
}
}
#ifdef USE_WIN32_OPENGL
pwglGetProcAddress
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglGetProcAddress"
);
#define USE_GL_FUNC(pfn) pfn = (void*)GetProcAddress(mod_gl, #pfn);
#else
/* To bypass the opengl32 thunks load wglGetProcAddress from gdi32 instead of opengl32 */
pwglGetProcAddress
=
(
void
*
)
GetProcAddress
(
GetModuleHandleA
(
"gdi32.dll"
),
"wglGetProcAddress"
);
#define USE_GL_FUNC(pfn) pfn = (void*)pwglGetProcAddress(#pfn);
/* To bypass the opengl32 thunks load wglGetProcAddress from gdi32 (glXGetProcAddress wrapper) instead of opengl32's */
mod_gl
=
GetModuleHandleA
(
"gdi32.dll"
);
#endif
if
(
!
pwglGetProcAddress
)
{
ERR
(
"Unable to load wglGetProcAddress!
\n
"
);
goto
nogl_adapter
;
}
/* Load WGL core functions from opengl32.dll */
...
...
@@ -5393,11 +5400,6 @@ static BOOL InitAdapters(struct wined3d *wined3d)
WGL_FUNCS_GEN
;
#undef USE_WGL_FUNC
if
(
!
pwglGetProcAddress
)
{
ERR
(
"Unable to load wglGetProcAddress!
\n
"
);
goto
nogl_adapter
;
}
/* Dynamically load all GL core functions */
GL_FUNCS_GEN
;
#undef USE_GL_FUNC
...
...
@@ -5408,17 +5410,9 @@ static BOOL InitAdapters(struct wined3d *wined3d)
#ifdef USE_WIN32_OPENGL
wglFinish
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"glFinish"
);
wglFlush
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"glFlush"
);
pwglDeleteContext
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglDeleteContext"
);
pwglGetCurrentContext
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglGetCurrentContext"
);
pwglGetCurrentDC
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglGetCurrentDC"
);
pwglShareLists
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglShareLists"
);
#else
wglFinish
=
(
void
*
)
pwglGetProcAddress
(
"wglFinish"
);
wglFlush
=
(
void
*
)
pwglGetProcAddress
(
"wglFlush"
);
pwglDeleteContext
=
(
void
*
)
pwglGetProcAddress
(
"wglDeleteContext"
);
pwglGetCurrentContext
=
(
void
*
)
pwglGetProcAddress
(
"wglGetCurrentContext"
);
pwglGetCurrentDC
=
(
void
*
)
pwglGetProcAddress
(
"wglGetCurrentDC"
);
pwglShareLists
=
(
void
*
)
pwglGetProcAddress
(
"wglShareLists"
);
#endif
glEnableWINE
=
glEnable
;
...
...
dlls/wined3d/wined3d_gl.h
View file @
94abcd53
...
...
@@ -1713,8 +1713,11 @@ BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN;
#define WGL_FUNCS_GEN \
USE_WGL_FUNC(wglCreateContext) \
USE_WGL_FUNC(wglGetProcAddress) \
USE_WGL_FUNC(wglMakeCurrent)
USE_WGL_FUNC(wglDeleteContext) \
USE_WGL_FUNC(wglGetCurrentContext) \
USE_WGL_FUNC(wglGetCurrentDC) \
USE_WGL_FUNC(wglMakeCurrent) \
USE_WGL_FUNC(wglShareLists)
/* OpenGL extensions. */
enum
wined3d_gl_extension
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment