Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e9827cc9
Commit
e9827cc9
authored
Jul 30, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Always load glFinish and glFlush from opengl32.dll.
parent
399825cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
5 deletions
+19
-5
directx.c
dlls/wined3d/directx.c
+13
-1
wined3d_gl.h
include/wine/wined3d_gl.h
+6
-4
No files found.
dlls/wined3d/directx.c
View file @
e9827cc9
...
...
@@ -3971,7 +3971,7 @@ void fillGLAttribFuncs(WineD3D_GL_Info *gl_info) {
#define PUSH1(att) attribs[nAttribs++] = (att);
BOOL
InitAdapters
(
void
)
{
static
HMODULE
mod_gl
;
static
HMODULE
mod_gl
,
mod_win32gl
;
BOOL
ret
;
int
ps_selected_mode
,
vs_selected_mode
;
...
...
@@ -3990,10 +3990,16 @@ BOOL InitAdapters(void) {
ERR
(
"Can't load opengl32.dll!
\n
"
);
goto
nogl_adapter
;
}
mod_win32gl
=
mod_gl
;
#else
#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"
);
mod_win32gl
=
LoadLibraryA
(
"opengl32.dll"
);
if
(
!
mod_win32gl
)
{
ERR
(
"Can't load opengl32.dll!
\n
"
);
goto
nogl_adapter
;
}
#endif
}
...
...
@@ -4011,6 +4017,12 @@ BOOL InitAdapters(void) {
GL_FUNCS_GEN
;
#undef USE_GL_FUNC
/* Load glFinish and glFlush from opengl32.dll even if we're not using WIN32 opengl
* otherwise because we have to use winex11.drv's override
*/
glFinish
=
(
void
*
)
GetProcAddress
(
mod_win32gl
,
"glFinish"
);
glFlush
=
(
void
*
)
GetProcAddress
(
mod_win32gl
,
"glFlush"
);
/* For now only one default adapter */
{
int
iPixelFormat
;
...
...
include/wine/wined3d_gl.h
View file @
e9827cc9
...
...
@@ -890,8 +890,6 @@ void (WINE_GLAPI *glEvalMesh2) (GLenum mode, GLint i1, GLint i2, GLint j1, GLint
void
(
WINE_GLAPI
*
glEvalPoint1
)
(
GLint
i
);
void
(
WINE_GLAPI
*
glEvalPoint2
)
(
GLint
i
,
GLint
j
);
void
(
WINE_GLAPI
*
glFeedbackBuffer
)
(
GLsizei
size
,
GLenum
type
,
GLfloat
*
buffer
);
void
(
WINE_GLAPI
*
glFinish
)
();
void
(
WINE_GLAPI
*
glFlush
)
();
void
(
WINE_GLAPI
*
glFogf
)
(
GLenum
pname
,
GLfloat
param
);
void
(
WINE_GLAPI
*
glFogfv
)
(
GLenum
pname
,
const
GLfloat
*
params
);
void
(
WINE_GLAPI
*
glFogi
)
(
GLenum
pname
,
GLint
param
);
...
...
@@ -1139,6 +1137,12 @@ void (WINE_GLAPI *glVertexPointer) (GLint size, GLenum type, GLsizei stride, con
void
(
WINE_GLAPI
*
glViewport
)
(
GLint
x
,
GLint
y
,
GLsizei
width
,
GLsizei
height
);
void
(
WINE_GLAPI
*
glPointParameterfv
)
(
GLenum
pname
,
const
GLfloat
*
params
);
/* glFinish and glFlush are always loaded from opengl32.dll, thus they always have
* __stdcall calling convention
*/
void
(
__stdcall
*
glFinish
)
();
void
(
__stdcall
*
glFlush
)
();
/* WGL functions */
HGLRC
(
WINAPI
*
pwglCreateContext
)(
HDC
);
BOOL
(
WINAPI
*
pwglDeleteContext
)(
HGLRC
);
...
...
@@ -1238,8 +1242,6 @@ BOOL (WINAPI *pwglShareLists)(HGLRC,HGLRC);
USE_GL_FUNC(glEvalPoint1) \
USE_GL_FUNC(glEvalPoint2) \
USE_GL_FUNC(glFeedbackBuffer) \
USE_GL_FUNC(glFinish) \
USE_GL_FUNC(glFlush) \
USE_GL_FUNC(glFogf) \
USE_GL_FUNC(glFogfv) \
USE_GL_FUNC(glFogi) \
...
...
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