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
47fe838b
Commit
47fe838b
authored
Jun 28, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Move wglMakeContextCurrentARB to the WGL driver.
parent
7a031d9b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
8 deletions
+29
-8
wgl.c
dlls/opengl32/wgl.c
+22
-1
opengl.c
dlls/winex11.drv/opengl.c
+5
-6
gdi_driver.h
include/wine/gdi_driver.h
+2
-1
No files found.
dlls/opengl32/wgl.c
View file @
47fe838b
...
...
@@ -133,6 +133,14 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
}
/***********************************************************************
* wglMakeContextCurrentARB (wrapper for the extension function returned by the driver)
*/
static
BOOL
WINAPI
wglMakeContextCurrentARB
(
HDC
draw_hdc
,
HDC
read_hdc
,
HGLRC
hglrc
)
{
return
wgl_driver
->
p_wglMakeContextCurrentARB
(
draw_hdc
,
read_hdc
,
hglrc
);
}
/***********************************************************************
* wglShareLists (OPENGL32.@)
*/
BOOL
WINAPI
wglShareLists
(
HGLRC
hglrc1
,
HGLRC
hglrc2
)
...
...
@@ -487,7 +495,20 @@ PROC WINAPI wglGetProcAddress(LPCSTR lpszProc) {
if
(
ext_ret
==
NULL
)
{
/* If the function name starts with a 'w', it is a WGL extension */
if
(
lpszProc
[
0
]
==
'w'
)
return
wine_wgl
.
p_wglGetProcAddress
(
lpszProc
);
{
local_func
=
wine_wgl
.
p_wglGetProcAddress
(
lpszProc
);
if
(
local_func
==
(
void
*
)
1
)
/* special function that needs a wrapper */
{
if
(
!
strcmp
(
lpszProc
,
"wglMakeContextCurrentARB"
))
local_func
=
wglMakeContextCurrentARB
;
else
{
FIXME
(
"wrapper missing for %s
\n
"
,
lpszProc
);
local_func
=
NULL
;
}
}
return
local_func
;
}
/* We are dealing with an unknown GL extension */
WARN
(
"Extension '%s' not defined in opengl32.dll's function table!
\n
"
,
lpszProc
);
...
...
dlls/winex11.drv/opengl.c
View file @
47fe838b
...
...
@@ -1654,12 +1654,10 @@ static BOOL glxdrv_wglMakeCurrent(HDC hdc, HGLRC hglrc)
return
ret
;
}
/**
* X11DRV_wglMakeContextCurrentARB
*
* For OpenGL32 wglMakeContextCurrentARB
/***********************************************************************
* glxdrv_wglMakeContextCurrentARB
*/
static
BOOL
WINAPI
X11DRV
_wglMakeContextCurrentARB
(
HDC
draw_hdc
,
HDC
read_hdc
,
HGLRC
hglrc
)
static
BOOL
glxdrv
_wglMakeContextCurrentARB
(
HDC
draw_hdc
,
HDC
read_hdc
,
HGLRC
hglrc
)
{
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
hglrc
;
Wine_GLContext
*
prev_ctx
=
NtCurrentTeb
()
->
glContext
;
...
...
@@ -3095,7 +3093,7 @@ static const WineGLExtension WGL_ARB_make_current_read =
"WGL_ARB_make_current_read"
,
{
{
"wglGetCurrentReadDCARB"
,
X11DRV_wglGetCurrentReadDCARB
},
{
"wglMakeContextCurrentARB"
,
X11DRV_wglMakeContextCurrentARB
},
{
"wglMakeContextCurrentARB"
,
(
void
*
)
1
/* called through the glxdrv_wgl_funcs driver */
},
}
};
...
...
@@ -3604,6 +3602,7 @@ static const struct wgl_funcs glxdrv_wgl_funcs =
glxdrv_wglCopyContext
,
/* p_wglCopyContext */
glxdrv_wglDeleteContext
,
/* p_wglDeleteContext */
glxdrv_wglGetCurrentDC
,
/* p_wglGetCurrentDC */
glxdrv_wglMakeContextCurrentARB
,
/* p_wglMakeContextCurrentARB */
glxdrv_wglMakeCurrent
,
/* p_wglMakeCurrent */
glxdrv_wglShareLists
,
/* p_wglShareLists */
};
...
...
include/wine/gdi_driver.h
View file @
47fe838b
...
...
@@ -203,7 +203,7 @@ struct gdi_dc_funcs
};
/* increment this when you change the DC function table */
#define WINE_GDI_DRIVER_VERSION 3
3
#define WINE_GDI_DRIVER_VERSION 3
4
#define GDI_PRIORITY_NULL_DRV 0
/* null driver */
#define GDI_PRIORITY_FONT_DRV 100
/* any font driver */
...
...
@@ -236,6 +236,7 @@ struct wgl_funcs
BOOL
(
*
p_wglCopyContext
)(
HGLRC
,
HGLRC
,
UINT
);
BOOL
(
*
p_wglDeleteContext
)(
HGLRC
);
HDC
(
*
p_wglGetCurrentDC
)(
void
);
BOOL
(
*
p_wglMakeContextCurrentARB
)(
HDC
,
HDC
,
HGLRC
);
BOOL
(
*
p_wglMakeCurrent
)(
HDC
,
HGLRC
);
BOOL
(
*
p_wglShareLists
)(
HGLRC
,
HGLRC
);
};
...
...
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