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
2506677c
Commit
2506677c
authored
Oct 31, 2006
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Oct 31, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Route wglMakeContextCurrentARB through gdi32.
parent
d2abcecd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
6 deletions
+47
-6
driver.c
dlls/gdi32/driver.c
+1
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
opengl.c
dlls/gdi32/opengl.c
+39
-1
opengl.c
dlls/winex11.drv/opengl.c
+5
-5
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+1
-0
No files found.
dlls/gdi32/driver.c
View file @
2506677c
...
@@ -199,6 +199,7 @@ static struct graphics_driver *create_driver( HMODULE module )
...
@@ -199,6 +199,7 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC
(
wglCreateContext
);
GET_FUNC
(
wglCreateContext
);
GET_FUNC
(
wglDeleteContext
);
GET_FUNC
(
wglDeleteContext
);
GET_FUNC
(
wglGetProcAddress
);
GET_FUNC
(
wglGetProcAddress
);
GET_FUNC
(
wglMakeContextCurrentARB
);
GET_FUNC
(
wglMakeCurrent
);
GET_FUNC
(
wglMakeCurrent
);
GET_FUNC
(
wglShareLists
);
GET_FUNC
(
wglShareLists
);
GET_FUNC
(
wglUseFontBitmapsA
);
GET_FUNC
(
wglUseFontBitmapsA
);
...
...
dlls/gdi32/gdi_private.h
View file @
2506677c
...
@@ -188,6 +188,7 @@ typedef struct tagDC_FUNCS
...
@@ -188,6 +188,7 @@ typedef struct tagDC_FUNCS
BOOL
(
*
pwglDeleteContext
)(
HGLRC
);
BOOL
(
*
pwglDeleteContext
)(
HGLRC
);
PROC
(
*
pwglGetProcAddress
)(
LPCSTR
);
PROC
(
*
pwglGetProcAddress
)(
LPCSTR
);
BOOL
(
*
pwglMakeCurrent
)(
PHYSDEV
,
HGLRC
);
BOOL
(
*
pwglMakeCurrent
)(
PHYSDEV
,
HGLRC
);
BOOL
(
*
pwglMakeContextCurrentARB
)(
PHYSDEV
,
PHYSDEV
,
HGLRC
);
BOOL
(
*
pwglShareLists
)(
HGLRC
hglrc1
,
HGLRC
hglrc2
);
BOOL
(
*
pwglShareLists
)(
HGLRC
hglrc1
,
HGLRC
hglrc2
);
BOOL
(
*
pwglUseFontBitmapsA
)(
PHYSDEV
,
DWORD
,
DWORD
,
DWORD
);
BOOL
(
*
pwglUseFontBitmapsA
)(
PHYSDEV
,
DWORD
,
DWORD
,
DWORD
);
BOOL
(
*
pwglUseFontBitmapsW
)(
PHYSDEV
,
DWORD
,
DWORD
,
DWORD
);
BOOL
(
*
pwglUseFontBitmapsW
)(
PHYSDEV
,
DWORD
,
DWORD
,
DWORD
);
...
...
dlls/gdi32/opengl.c
View file @
2506677c
...
@@ -161,6 +161,36 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
...
@@ -161,6 +161,36 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
}
}
/***********************************************************************
/***********************************************************************
* wglMakeContextCurrentARB
*/
static
BOOL
WINAPI
wglMakeContextCurrentARB
(
HDC
hDrawDC
,
HDC
hReadDC
,
HGLRC
hglrc
)
{
BOOL
ret
=
FALSE
;
DC
*
DrawDC
;
DC
*
ReadDC
;
TRACE
(
"hDrawDC: (%p), hReadDC: (%p) hglrc: (%p)
\n
"
,
hDrawDC
,
hReadDC
,
hglrc
);
/* Both hDrawDC and hReadDC need to be valid */
DrawDC
=
DC_GetDCPtr
(
hDrawDC
);
if
(
!
DrawDC
)
return
FALSE
;
ReadDC
=
DC_GetDCPtr
(
hReadDC
);
if
(
!
ReadDC
)
{
GDI_ReleaseObj
(
hDrawDC
);
return
FALSE
;
}
if
(
!
DrawDC
->
funcs
->
pwglMakeContextCurrentARB
)
FIXME
(
" :stub
\n
"
);
else
ret
=
DrawDC
->
funcs
->
pwglMakeContextCurrentARB
(
DrawDC
->
physDev
,
ReadDC
->
physDev
,
hglrc
);
GDI_ReleaseObj
(
hDrawDC
);
GDI_ReleaseObj
(
hReadDC
);
return
ret
;
}
/***********************************************************************
* wglShareLists (OPENGL32.@)
* wglShareLists (OPENGL32.@)
*/
*/
BOOL
WINAPI
wglShareLists
(
HGLRC
hglrc1
,
HGLRC
hglrc2
)
BOOL
WINAPI
wglShareLists
(
HGLRC
hglrc1
,
HGLRC
hglrc2
)
...
@@ -228,7 +258,7 @@ BOOL WINAPI wglUseFontBitmapsW(HDC hdc, DWORD first, DWORD count, DWORD listBase
...
@@ -228,7 +258,7 @@ BOOL WINAPI wglUseFontBitmapsW(HDC hdc, DWORD first, DWORD count, DWORD listBase
PROC
WINAPI
wglGetProcAddress
(
LPCSTR
func
)
PROC
WINAPI
wglGetProcAddress
(
LPCSTR
func
)
{
{
PROC
ret
=
NULL
;
PROC
ret
=
NULL
;
DC
*
dc
=
NULL
;
DC
*
dc
;
if
(
!
func
)
if
(
!
func
)
return
NULL
;
return
NULL
;
...
@@ -244,5 +274,13 @@ PROC WINAPI wglGetProcAddress(LPCSTR func)
...
@@ -244,5 +274,13 @@ PROC WINAPI wglGetProcAddress(LPCSTR func)
GDI_ReleaseObj
(
default_hdc
);
GDI_ReleaseObj
(
default_hdc
);
/* At the moment we implement one WGL extension which requires a HDC. When we
* are looking up this call and when the Extension is available (that is the case
* when a non-NULL value is returned by wglGetProcAddress), we return the address
* of a wrapper function which will handle the HDC->PhysDev conversion.
*/
if
(
ret
&&
strcmp
(
func
,
"wglMakeContextCurrentARB"
)
==
0
)
return
wglMakeContextCurrentARB
;
return
ret
;
return
ret
;
}
}
dlls/winex11.drv/opengl.c
View file @
2506677c
...
@@ -1376,10 +1376,10 @@ BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) {
...
@@ -1376,10 +1376,10 @@ BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) {
}
}
/* OpenGL32 wglMakeContextCurrentARB */
/* OpenGL32 wglMakeContextCurrentARB */
static
BOOL
WINAPI
X11DRV_wglMakeContextCurrentARB
(
HDC
hDrawDC
,
HDC
hReadDC
,
HGLRC
hglrc
)
BOOL
X11DRV_wglMakeContextCurrentARB
(
X11DRV_PDEVICE
*
hDrawDev
,
X11DRV_PDEVICE
*
hReadDev
,
HGLRC
hglrc
)
{
{
BOOL
ret
;
BOOL
ret
;
TRACE
(
"(%p,%p,%p)
\n
"
,
hDrawD
C
,
hReadDC
,
hglrc
);
TRACE
(
"(%p,%p,%p)
\n
"
,
hDrawD
ev
,
hReadDev
,
hglrc
);
wine_tsx11_lock
();
wine_tsx11_lock
();
if
(
hglrc
==
NULL
)
{
if
(
hglrc
==
NULL
)
{
...
@@ -1390,11 +1390,11 @@ static BOOL WINAPI X11DRV_wglMakeContextCurrentARB(HDC hDrawDC, HDC hReadDC, HGL
...
@@ -1390,11 +1390,11 @@ static BOOL WINAPI X11DRV_wglMakeContextCurrentARB(HDC hDrawDC, HDC hReadDC, HGL
ret
=
FALSE
;
ret
=
FALSE
;
}
else
{
}
else
{
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
hglrc
;
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
hglrc
;
Drawable
d_draw
=
get_
drawable
(
hDrawDC
);
Drawable
d_draw
=
get_
glxdrawable
(
hDrawDev
);
Drawable
d_read
=
get_
drawable
(
hReadDC
);
Drawable
d_read
=
get_
glxdrawable
(
hReadDev
);
if
(
ctx
->
ctx
==
NULL
)
{
if
(
ctx
->
ctx
==
NULL
)
{
ctx
->
ctx
=
pglXCreateContext
(
ctx
->
display
,
ctx
->
vis
,
NULL
,
GetObjectType
(
hDrawD
C
)
==
OBJ_MEMDC
?
False
:
True
);
ctx
->
ctx
=
pglXCreateContext
(
ctx
->
display
,
ctx
->
vis
,
NULL
,
GetObjectType
(
hDrawD
ev
->
hdc
)
==
OBJ_MEMDC
?
False
:
True
);
TRACE
(
" created a delayed OpenGL context (%p)
\n
"
,
ctx
->
ctx
);
TRACE
(
" created a delayed OpenGL context (%p)
\n
"
,
ctx
->
ctx
);
}
}
ret
=
pglXMakeContextCurrent
(
ctx
->
display
,
d_draw
,
d_read
,
ctx
->
ctx
);
ret
=
pglXMakeContextCurrent
(
ctx
->
display
,
d_draw
,
d_read
,
ctx
->
ctx
);
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
2506677c
...
@@ -134,6 +134,7 @@
...
@@ -134,6 +134,7 @@
@ cdecl wglCreateContext(long) X11DRV_wglCreateContext
@ cdecl wglCreateContext(long) X11DRV_wglCreateContext
@ cdecl wglDeleteContext(long) X11DRV_wglDeleteContext
@ cdecl wglDeleteContext(long) X11DRV_wglDeleteContext
@ cdecl wglGetProcAddress(ptr) X11DRV_wglGetProcAddress
@ cdecl wglGetProcAddress(ptr) X11DRV_wglGetProcAddress
@ cdecl wglMakeContextCurrentARB(ptr ptr long) X11DRV_wglMakeContextCurrentARB
@ cdecl wglMakeCurrent(long long) X11DRV_wglMakeCurrent
@ cdecl wglMakeCurrent(long long) X11DRV_wglMakeCurrent
@ cdecl wglShareLists(long long) X11DRV_wglShareLists
@ cdecl wglShareLists(long long) X11DRV_wglShareLists
@ cdecl wglUseFontBitmapsA(long long long long) X11DRV_wglUseFontBitmapsA
@ cdecl wglUseFontBitmapsA(long long long long) X11DRV_wglUseFontBitmapsA
...
...
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