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
08efea02
Commit
08efea02
authored
Jun 25, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Move wglCopyContext and wglDeleteContext to the internal OpenGL extension functions.
parent
beeba895
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
15 deletions
+26
-15
wgl.c
dlls/opengl32/wgl.c
+16
-6
directx.c
dlls/wined3d/directx.c
+2
-0
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+0
-1
opengl.c
dlls/winex11.drv/opengl.c
+8
-8
No files found.
dlls/opengl32/wgl.c
View file @
08efea02
...
...
@@ -49,8 +49,6 @@ static struct
{
PROC
(
WINAPI
*
p_wglGetProcAddress
)(
LPCSTR
lpszProc
);
BOOL
(
WINAPI
*
p_SetPixelFormat
)(
HDC
hdc
,
INT
iPixelFormat
,
const
PIXELFORMATDESCRIPTOR
*
ppfd
);
BOOL
(
WINAPI
*
p_wglCopyContext
)(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
);
BOOL
(
WINAPI
*
p_wglDeleteContext
)(
HGLRC
hglrc
);
BOOL
(
WINAPI
*
p_wglMakeCurrent
)(
HDC
hdc
,
HGLRC
hglrc
);
HDC
(
WINAPI
*
p_wglGetCurrentDC
)(
void
);
HGLRC
(
WINAPI
*
p_wglCreateContext
)(
HDC
hdc
);
...
...
@@ -60,6 +58,8 @@ static struct
INT
(
WINAPI
*
p_GetPixelFormat
)(
HDC
hdc
);
/* internal WGL functions */
BOOL
(
WINAPI
*
p_wglCopyContext
)(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
);
BOOL
(
WINAPI
*
p_wglDeleteContext
)(
HGLRC
hglrc
);
void
(
WINAPI
*
p_wglGetIntegerv
)(
GLenum
pname
,
GLint
*
params
);
void
(
WINAPI
*
p_wglFinish
)(
void
);
void
(
WINAPI
*
p_wglFlush
)(
void
);
...
...
@@ -104,7 +104,12 @@ BOOL WINAPI wglSetPixelFormat( HDC hdc, INT iPixelFormat,
*/
BOOL
WINAPI
wglCopyContext
(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
)
{
return
wine_wgl
.
p_wglCopyContext
(
hglrcSrc
,
hglrcDst
,
mask
);
if
(
!
hglrcSrc
||
!
hglrcDst
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
return
wine_wgl
.
p_wglCopyContext
(
hglrcSrc
,
hglrcDst
,
mask
);
}
/***********************************************************************
...
...
@@ -112,7 +117,12 @@ BOOL WINAPI wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask)
*/
BOOL
WINAPI
wglDeleteContext
(
HGLRC
hglrc
)
{
return
wine_wgl
.
p_wglDeleteContext
(
hglrc
);
if
(
!
hglrc
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
return
wine_wgl
.
p_wglDeleteContext
(
hglrc
);
}
/***********************************************************************
...
...
@@ -921,8 +931,6 @@ static BOOL process_attach(void)
wine_wgl
.
p_wglGetProcAddress
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglGetProcAddress"
);
wine_wgl
.
p_SetPixelFormat
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"SetPixelFormat"
);
wine_wgl
.
p_wglCopyContext
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglCopyContext"
);
wine_wgl
.
p_wglDeleteContext
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglDeleteContext"
);
wine_wgl
.
p_wglMakeCurrent
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglMakeCurrent"
);
wine_wgl
.
p_wglGetCurrentDC
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglGetCurrentDC"
);
wine_wgl
.
p_wglCreateContext
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglCreateContext"
);
...
...
@@ -932,6 +940,8 @@ static BOOL process_attach(void)
wine_wgl
.
p_GetPixelFormat
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"GetPixelFormat"
);
/* internal WGL functions */
wine_wgl
.
p_wglCopyContext
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglCopyContext"
);
wine_wgl
.
p_wglDeleteContext
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglDeleteContext"
);
wine_wgl
.
p_wglGetIntegerv
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglGetIntegerv"
);
wine_wgl
.
p_wglFinish
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglFinish"
);
wine_wgl
.
p_wglFlush
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglFlush"
);
...
...
dlls/wined3d/directx.c
View file @
08efea02
...
...
@@ -5359,10 +5359,12 @@ 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"
);
pwglShareLists
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglShareLists"
);
#else
wglFinish
=
(
void
*
)
pwglGetProcAddress
(
"wglFinish"
);
wglFlush
=
(
void
*
)
pwglGetProcAddress
(
"wglFlush"
);
pwglDeleteContext
=
(
void
*
)
pwglGetProcAddress
(
"wglDeleteContext"
);
pwglShareLists
=
(
void
*
)
pwglGetProcAddress
(
"wglShareLists"
);
#endif
...
...
dlls/wined3d/wined3d_gl.h
View file @
08efea02
...
...
@@ -1713,7 +1713,6 @@ BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN;
#define WGL_FUNCS_GEN \
USE_WGL_FUNC(wglCreateContext) \
USE_WGL_FUNC(wglDeleteContext) \
USE_WGL_FUNC(wglGetCurrentContext) \
USE_WGL_FUNC(wglGetCurrentDC) \
USE_WGL_FUNC(wglGetProcAddress) \
...
...
dlls/winex11.drv/opengl.c
View file @
08efea02
...
...
@@ -1624,11 +1624,11 @@ static BOOL glxdrv_SetPixelFormat(PHYSDEV dev, int iPixelFormat, const PIXELFORM
}
/**
*
glxdrv
_wglCopyContext
*
X11DRV
_wglCopyContext
*
* For OpenGL32 wglCopyContext.
*/
static
BOOL
glxdrv
_wglCopyContext
(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
)
static
BOOL
WINAPI
X11DRV
_wglCopyContext
(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
)
{
Wine_GLContext
*
src
=
(
Wine_GLContext
*
)
hglrcSrc
;
Wine_GLContext
*
dst
=
(
Wine_GLContext
*
)
hglrcDst
;
...
...
@@ -1688,18 +1688,16 @@ static HGLRC glxdrv_wglCreateContext(PHYSDEV dev)
}
/**
*
glxdrv
_wglDeleteContext
*
X11DRV
_wglDeleteContext
*
* For OpenGL32 wglDeleteContext.
*/
static
BOOL
glxdrv
_wglDeleteContext
(
HGLRC
hglrc
)
static
BOOL
WINAPI
X11DRV
_wglDeleteContext
(
HGLRC
hglrc
)
{
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
hglrc
;
TRACE
(
"(%p)
\n
"
,
hglrc
);
if
(
!
has_opengl
())
return
0
;
if
(
!
is_valid_context
(
ctx
))
{
WARN
(
"Error deleting context !
\n
"
);
...
...
@@ -3251,6 +3249,8 @@ static const WineGLExtension WGL_internal_functions =
{
""
,
{
{
"wglCopyContext"
,
X11DRV_wglCopyContext
},
{
"wglDeleteContext"
,
X11DRV_wglDeleteContext
},
{
"wglGetIntegerv"
,
X11DRV_wglGetIntegerv
},
{
"wglFinish"
,
X11DRV_wglFinish
},
{
"wglFlush"
,
X11DRV_wglFlush
},
...
...
@@ -3755,10 +3755,10 @@ static const struct gdi_dc_funcs glxdrv_funcs =
glxdrv_SwapBuffers
,
/* pSwapBuffers */
NULL
,
/* pUnrealizePalette */
NULL
,
/* pWidenPath */
glxdrv_wglCopyContext
,
/* pwglCopyContext */
NULL
,
/* pwglCopyContext */
glxdrv_wglCreateContext
,
/* pwglCreateContext */
glxdrv_wglCreateContextAttribsARB
,
/* pwglCreateContextAttribsARB */
glxdrv_wglDeleteContext
,
/* pwglDeleteContext */
NULL
,
/* pwglDeleteContext */
glxdrv_wglGetProcAddress
,
/* pwglGetProcAddress */
glxdrv_wglMakeContextCurrentARB
,
/* pwglMakeContextCurrentARB */
glxdrv_wglMakeCurrent
,
/* pwglMakeCurrent */
...
...
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