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
8a2e38cc
Commit
8a2e38cc
authored
Oct 30, 2011
by
Louis Lenders
Committed by
Alexandre Julliard
Nov 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Use wrappers for wglCreateContext and wglMakeCurrent instead of…
opengl32: Use wrappers for wglCreateContext and wglMakeCurrent instead of directly forwarding to gdi32.
parent
e14e8383
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
12 deletions
+29
-12
opengl32.spec
dlls/opengl32/opengl32.spec
+2
-2
wgl.c
dlls/opengl32/wgl.c
+27
-10
No files found.
dlls/opengl32/opengl32.spec
View file @
8a2e38cc
...
...
@@ -336,7 +336,7 @@
@ stdcall glViewport( long long long long ) wine_glViewport
@ stdcall wglChoosePixelFormat(long ptr) gdi32.ChoosePixelFormat
@ stdcall wglCopyContext(long long long) gdi32.wglCopyContext
@ stdcall wglCreateContext(long)
gdi32.wglCreateContext
@ stdcall wglCreateContext(long)
@ stdcall wglCreateLayerContext(long long)
@ stdcall wglDeleteContext(long) gdi32.wglDeleteContext
@ stdcall wglDescribeLayerPlane(long long long long ptr)
...
...
@@ -347,7 +347,7 @@
@ stdcall wglGetLayerPaletteEntries(long long long long ptr)
@ stdcall wglGetPixelFormat(long) gdi32.GetPixelFormat
@ stdcall wglGetProcAddress(str)
@ stdcall wglMakeCurrent(long long)
gdi32.wglMakeCurrent
@ stdcall wglMakeCurrent(long long)
@ stdcall wglRealizeLayerPalette(long long long)
@ stdcall wglSetLayerPaletteEntries(long long long long ptr)
@ stdcall wglSetPixelFormat(long long ptr) gdi32.SetPixelFormat
...
...
dlls/opengl32/wgl.c
View file @
8a2e38cc
...
...
@@ -45,16 +45,15 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wgl
);
WINE_DECLARE_DEBUG_CHANNEL
(
opengl
);
typedef
struct
wine_wgl_s
{
PROC
WINAPI
(
*
p_wglGetProcAddress
)(
LPCSTR
lpszProc
);
void
WINAPI
(
*
p_wglGetIntegerv
)(
GLenum
pname
,
GLint
*
params
);
void
WINAPI
(
*
p_wglFinish
)(
void
);
void
WINAPI
(
*
p_wglFlush
)(
void
);
}
wine_wgl_t
;
/** global wgl object */
static
wine_wgl_t
wine_wgl
;
static
struct
{
PROC
(
WINAPI
*
p_wglGetProcAddress
)(
LPCSTR
lpszProc
);
BOOL
(
WINAPI
*
p_wglMakeCurrent
)(
HDC
hdc
,
HGLRC
hglrc
);
HGLRC
(
WINAPI
*
p_wglCreateContext
)(
HDC
hdc
);
void
(
WINAPI
*
p_wglGetIntegerv
)(
GLenum
pname
,
GLint
*
params
);
void
(
WINAPI
*
p_wglFinish
)(
void
);
void
(
WINAPI
*
p_wglFlush
)(
void
);
}
wine_wgl
;
#ifdef SONAME_LIBGLU
#define MAKE_FUNCPTR(f) static typeof(f) * p##f;
...
...
@@ -117,6 +116,22 @@ void enter_gl(void)
const
GLubyte
*
WINAPI
wine_glGetString
(
GLenum
name
);
/***********************************************************************
* wglMakeCurrent (OPENGL32.@)
*/
BOOL
WINAPI
wglMakeCurrent
(
HDC
hdc
,
HGLRC
hglrc
)
{
return
wine_wgl
.
p_wglMakeCurrent
(
hdc
,
hglrc
);
}
/***********************************************************************
* wglCreateContext (OPENGL32.@)
*/
HGLRC
WINAPI
wglCreateContext
(
HDC
hdc
)
{
return
wine_wgl
.
p_wglCreateContext
(
hdc
);
}
/***********************************************************************
* wglCreateLayerContext (OPENGL32.@)
*/
HGLRC
WINAPI
wglCreateLayerContext
(
HDC
hdc
,
...
...
@@ -720,6 +735,8 @@ static BOOL process_attach(void)
wine_tsx11_unlock_ptr
=
(
void
*
)
GetProcAddress
(
mod_x11
,
"wine_tsx11_unlock"
);
wine_wgl
.
p_wglGetProcAddress
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglGetProcAddress"
);
wine_wgl
.
p_wglMakeCurrent
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglMakeCurrent"
);
wine_wgl
.
p_wglCreateContext
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglCreateContext"
);
/* Interal WGL function */
wine_wgl
.
p_wglGetIntegerv
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglGetIntegerv"
);
...
...
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