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
8295c547
Commit
8295c547
authored
Nov 11, 2007
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Nov 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wgl: Add wglCopyContext support.
parent
db28edc7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
74 additions
and
13 deletions
+74
-13
gdi32.spec
dlls/gdi32/gdi32.spec
+1
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
opengl.c
dlls/gdi32/opengl.c
+25
-0
make_opengl
dlls/opengl32/make_opengl
+1
-1
opengl32.spec
dlls/opengl32/opengl32.spec
+1
-1
wgl.c
dlls/opengl32/wgl.c
+0
-11
opengl.c
dlls/winex11.drv/opengl.c
+44
-0
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-0
No files found.
dlls/gdi32/gdi32.spec
View file @
8295c547
...
...
@@ -498,6 +498,7 @@
################################################################
# Wine extensions: OpenGL support
#
@ stdcall wglCopyContext(long long long)
@ stdcall wglCreateContext(long)
@ stdcall wglDeleteContext(long)
@ stdcall wglGetCurrentContext()
...
...
dlls/gdi32/gdi_private.h
View file @
8295c547
...
...
@@ -223,6 +223,7 @@ typedef struct tagDC_FUNCS
BOOL
(
*
pWidenPath
)(
PHYSDEV
);
/* OpenGL32 */
BOOL
(
*
pwglCopyContext
)(
HGLRC
,
HGLRC
,
UINT
);
HGLRC
(
*
pwglCreateContext
)(
PHYSDEV
);
BOOL
(
*
pwglDeleteContext
)(
HGLRC
);
PROC
(
*
pwglGetProcAddress
)(
LPCSTR
);
...
...
dlls/gdi32/opengl.c
View file @
8295c547
...
...
@@ -60,6 +60,31 @@ static DC* OPENGL_GetDefaultDC(void)
}
/***********************************************************************
* wglCopyContext (OPENGL32.@)
*/
BOOL
WINAPI
wglCopyContext
(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
)
{
DC
*
dc
;
BOOL
ret
=
FALSE
;
OPENGL_Context
ctx
=
(
OPENGL_Context
)
hglrcSrc
;
TRACE
(
"hglrcSrc: (%p), hglrcDst: (%p), mask: %#x
\n
"
,
hglrcSrc
,
hglrcDst
,
mask
);
/* If no context is set, this call doesn't have a purpose */
if
(
!
hglrcSrc
||
!
hglrcDst
)
return
FALSE
;
/* Retrieve the HDC associated with the context to access the display driver */
dc
=
get_dc_ptr
(
ctx
->
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
!
dc
->
funcs
->
pwglCopyContext
)
FIXME
(
" :stub
\n
"
);
else
ret
=
dc
->
funcs
->
pwglCopyContext
(
hglrcSrc
,
hglrcDst
,
mask
);
release_dc_ptr
(
dc
);
return
ret
;
}
/***********************************************************************
* wglCreateContext (OPENGL32.@)
*/
HGLRC
WINAPI
wglCreateContext
(
HDC
hdc
)
...
...
dlls/opengl32/make_opengl
View file @
8295c547
...
...
@@ -616,7 +616,7 @@ foreach (sort keys %norm_functions) {
print
SPEC
"@ stub glGetLevelParameterfv
@ stub glGetLevelParameteriv
@ stdcall wglChoosePixelFormat(long ptr) gdi32.ChoosePixelFormat
@ stdcall wglCopyContext(long long long)
@ stdcall wglCopyContext(long long long)
gdi32.wglCopyContext
@ stdcall wglCreateContext(long) gdi32.wglCreateContext
@ stdcall wglCreateLayerContext(long long)
@ stdcall wglDeleteContext(long) gdi32.wglDeleteContext
...
...
dlls/opengl32/opengl32.spec
View file @
8295c547
...
...
@@ -375,7 +375,7 @@
@ stdcall glVertexPointer( long long long ptr ) wine_glVertexPointer
@ stdcall glViewport( long long long long ) wine_glViewport
@ stdcall wglChoosePixelFormat(long ptr) gdi32.ChoosePixelFormat
@ stdcall wglCopyContext(long long long)
@ stdcall wglCopyContext(long long long)
gdi32.wglCopyContext
@ stdcall wglCreateContext(long) gdi32.wglCreateContext
@ stdcall wglCreateLayerContext(long long)
@ stdcall wglDeleteContext(long) gdi32.wglDeleteContext
...
...
dlls/opengl32/wgl.c
View file @
8295c547
...
...
@@ -121,17 +121,6 @@ HGLRC WINAPI wglCreateLayerContext(HDC hdc,
}
/***********************************************************************
* wglCopyContext (OPENGL32.@)
*/
BOOL
WINAPI
wglCopyContext
(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
)
{
FIXME
(
"(%p,%p,%d)
\n
"
,
hglrcSrc
,
hglrcDst
,
mask
);
return
FALSE
;
}
/***********************************************************************
* wglDescribeLayerPlane (OPENGL32.@)
*/
BOOL
WINAPI
wglDescribeLayerPlane
(
HDC
hdc
,
...
...
dlls/winex11.drv/opengl.c
View file @
8295c547
...
...
@@ -211,6 +211,7 @@ static void dump_PIXELFORMATDESCRIPTOR(const PIXELFORMATDESCRIPTOR *ppfd) {
#define MAKE_FUNCPTR(f) static typeof(f) * p##f;
/* GLX 1.0 */
MAKE_FUNCPTR
(
glXChooseVisual
)
MAKE_FUNCPTR
(
glXCopyContext
)
MAKE_FUNCPTR
(
glXCreateContext
)
MAKE_FUNCPTR
(
glXCreateGLXPixmap
)
MAKE_FUNCPTR
(
glXGetCurrentContext
)
...
...
@@ -379,6 +380,7 @@ static BOOL has_opengl(void)
#define LOAD_FUNCPTR(f) if((p##f = (void*)pglXGetProcAddressARB((const unsigned char*)#f)) == NULL) goto sym_not_found;
/* GLX 1.0 */
LOAD_FUNCPTR
(
glXChooseVisual
)
LOAD_FUNCPTR
(
glXCopyContext
)
LOAD_FUNCPTR
(
glXCreateContext
)
LOAD_FUNCPTR
(
glXCreateGLXPixmap
)
LOAD_FUNCPTR
(
glXGetCurrentContext
)
...
...
@@ -1508,6 +1510,38 @@ BOOL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
}
/**
* X11DRV_wglCopyContext
*
* For OpenGL32 wglCopyContext.
*/
BOOL
X11DRV_wglCopyContext
(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
)
{
Wine_GLContext
*
src
=
(
Wine_GLContext
*
)
hglrcSrc
;
Wine_GLContext
*
dst
=
(
Wine_GLContext
*
)
hglrcDst
;
TRACE
(
"hglrcSrc: (%p), hglrcDst: (%p), mask: %#x
\n
"
,
hglrcSrc
,
hglrcDst
,
mask
);
/* There is a slight difference in the way GL contexts share display lists in WGL and GLX.
* In case of GLX you need to specify this at context creation time but in case of WGL you
* do this using wglShareLists which you can call after creating the context.
* To emulate WGL we try to delay the creation of the context until wglShareLists or wglMakeCurrent.
* Upto now that works fine.
*
* The delayed GLX context creation could cause issues for wglCopyContext as it might get called
* when there is no GLX context yet. Warn the user about it and let him report a bug report.
* The chance this will cause problems is small as at the time of writing Wine has had OpenGL support
* for more than 7 years and this function has remained a stub ever since then.
*/
if
(
!
src
->
ctx
||
!
dst
->
ctx
)
{
FIXME
(
"No source or destination context available! This could indicate a Wine bug."
);
return
FALSE
;
}
pglXCopyContext
(
gdi_display
,
src
->
ctx
,
dst
->
ctx
,
mask
);
/* As opposed to wglCopyContext, glXCopyContext doesn't return anything, so hopefully we passed */
return
TRUE
;
}
/**
* X11DRV_wglCreateContext
*
* For OpenGL32 wglCreateContext.
...
...
@@ -3457,6 +3491,16 @@ BOOL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) {
}
/**
* X11DRV_wglCopyContext
*
* For OpenGL32 wglCopyContext.
*/
BOOL
X11DRV_wglCopyContext
(
HGLRC
hglrcSrc
,
HGLRC
hglrcDst
,
UINT
mask
)
{
ERR_
(
opengl
)(
"No OpenGL support compiled in.
\n
"
);
return
FALSE
;
}
/**
* X11DRV_wglCreateContext
*
* For OpenGL32 wglCreateContext.
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
8295c547
...
...
@@ -132,6 +132,7 @@
@ cdecl ForceXIMReset(long) X11DRV_ForceXIMReset
# OpenGL
@ cdecl wglCopyContext(long long long) X11DRV_wglCopyContext
@ cdecl wglCreateContext(ptr) X11DRV_wglCreateContext
@ cdecl wglDeleteContext(long) X11DRV_wglDeleteContext
@ cdecl wglGetProcAddress(str) X11DRV_wglGetProcAddress
...
...
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