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
8c32dd77
Commit
8c32dd77
authored
Oct 14, 2006
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Oct 16, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wgl: Move wglGetCurrentDC to gdi32.
parent
ad7bc71c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
40 deletions
+24
-40
gdi32.spec
dlls/gdi/gdi32.spec
+1
-0
opengl.c
dlls/gdi/opengl.c
+21
-0
opengl32.spec
dlls/opengl32/opengl32.spec
+1
-1
wgl.c
dlls/opengl32/wgl.c
+0
-10
opengl.c
dlls/winex11.drv/opengl.c
+1
-28
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+0
-1
No files found.
dlls/gdi/gdi32.spec
View file @
8c32dd77
...
...
@@ -500,6 +500,7 @@
#
@ stdcall wglCreateContext(long)
@ stdcall wglGetCurrentContext()
@ stdcall wglGetCurrentDC()
@ stdcall wglMakeCurrent(long long)
@ stdcall wglUseFontBitmapsA(long long long long)
@ stdcall wglUseFontBitmapsW(long long long long)
...
...
dlls/gdi/opengl.c
View file @
8c32dd77
...
...
@@ -41,6 +41,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(wgl);
static
HDC
default_hdc
=
0
;
typedef
struct
opengl_context
{
HDC
hdc
;
}
*
OPENGL_Context
;
/* We route all wgl functions from opengl32.dll through gdi32.dll to
* the display driver. Various wgl calls have a hDC as one of their parameters.
* Using DC_GetDCPtr we get access to the functions exported by the driver.
...
...
@@ -85,6 +90,22 @@ HGLRC WINAPI wglGetCurrentContext(void)
}
/***********************************************************************
* wglGetCurrentDC (OPENGL32.@)
*/
HDC
WINAPI
wglGetCurrentDC
(
void
)
{
OPENGL_Context
ctx
=
(
OPENGL_Context
)
wglGetCurrentContext
();
TRACE
(
" found context: %p
\n
"
,
ctx
);
if
(
ctx
==
NULL
)
return
NULL
;
/* Retrieve the current DC from the active context */
TRACE
(
" returning hdc: %p
\n
"
,
ctx
->
hdc
);
return
ctx
->
hdc
;
}
/***********************************************************************
* wglMakeCurrent (OPENGL32.@)
*/
BOOL
WINAPI
wglMakeCurrent
(
HDC
hdc
,
HGLRC
hglrc
)
...
...
dlls/opengl32/opengl32.spec
View file @
8c32dd77
...
...
@@ -382,7 +382,7 @@
@ stdcall wglDescribeLayerPlane(long long long long ptr)
@ stdcall wglDescribePixelFormat(long long long ptr) gdi32.DescribePixelFormat
@ stdcall wglGetCurrentContext() gdi32.wglGetCurrentContext
@ stdcall wglGetCurrentDC()
@ stdcall wglGetCurrentDC()
gdi32.wglGetCurrentDC
@ stub wglGetDefaultProcAddress
@ stdcall wglGetLayerPaletteEntries(long long long long ptr)
@ stdcall wglGetPixelFormat(long) gdi32.GetPixelFormat
...
...
dlls/opengl32/wgl.c
View file @
8c32dd77
...
...
@@ -48,7 +48,6 @@ WINE_DECLARE_DEBUG_CHANNEL(opengl);
typedef
struct
wine_wgl_s
{
BOOL
WINAPI
(
*
p_wglDeleteContext
)(
HGLRC
hglrc
);
HDC
WINAPI
(
*
p_wglGetCurrentDC
)(
void
);
PROC
WINAPI
(
*
p_wglGetProcAddress
)(
LPCSTR
lpszProc
);
BOOL
WINAPI
(
*
p_wglShareLists
)(
HGLRC
hglrc1
,
HGLRC
hglrc2
);
...
...
@@ -172,14 +171,6 @@ BOOL WINAPI wglDescribeLayerPlane(HDC hdc,
}
/***********************************************************************
* wglGetCurrentDC (OPENGL32.@)
*/
HDC
WINAPI
wglGetCurrentDC
(
void
)
{
TRACE
(
"
\n
"
);
return
wine_wgl
.
p_wglGetCurrentDC
();
}
/***********************************************************************
* wglGetLayerPaletteEntries (OPENGL32.@)
*/
int
WINAPI
wglGetLayerPaletteEntries
(
HDC
hdc
,
...
...
@@ -641,7 +632,6 @@ static BOOL process_attach(void)
/* Load WGL function pointers from winex11.drv */
wine_wgl
.
p_wglDeleteContext
=
(
void
*
)
GetProcAddress
(
mod
,
"wglDeleteContext"
);
wine_wgl
.
p_wglGetCurrentDC
=
(
void
*
)
GetProcAddress
(
mod
,
"wglGetCurrentDC"
);
wine_wgl
.
p_wglGetProcAddress
=
(
void
*
)
GetProcAddress
(
mod
,
"wglGetProcAddress"
);
wine_wgl
.
p_wglShareLists
=
(
void
*
)
GetProcAddress
(
mod
,
"wglShareLists"
);
...
...
dlls/winex11.drv/opengl.c
View file @
8c32dd77
...
...
@@ -1272,27 +1272,6 @@ BOOL WINAPI X11DRV_wglDeleteContext(HGLRC hglrc)
return
ret
;
}
/* OpenGL32 wglGetCurrentDC */
HDC
WINAPI
X11DRV_wglGetCurrentDC
(
void
)
{
GLXContext
gl_ctx
;
Wine_GLContext
*
ret
;
TRACE
(
"()
\n
"
);
wine_tsx11_lock
();
gl_ctx
=
pglXGetCurrentContext
();
ret
=
get_context_from_GLXContext
(
gl_ctx
);
wine_tsx11_unlock
();
if
(
ret
)
{
TRACE
(
" returning %p (GL context %p - Wine context %p)
\n
"
,
ret
->
hdc
,
gl_ctx
,
ret
);
return
ret
->
hdc
;
}
else
{
TRACE
(
" no Wine context found for GLX context %p
\n
"
,
gl_ctx
);
return
0
;
}
}
/* OpenGL32 wglGetCurrentReadDCARB */
static
HDC
WINAPI
X11DRV_wglGetCurrentReadDCARB
(
void
)
{
...
...
@@ -2353,7 +2332,7 @@ static GLboolean WINAPI X11DRV_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuf
object
->
render_ctx
=
wglCreateContext
(
object
->
render_hdc
);
do_init
=
1
;
}
object
->
prev_hdc
=
X11DRV_
wglGetCurrentDC
();
object
->
prev_hdc
=
wglGetCurrentDC
();
object
->
prev_ctx
=
wglGetCurrentContext
();
/* FIXME: This is routed through gdi32.dll to winex11.drv, replace this with GLX calls */
wglMakeCurrent
(
object
->
render_hdc
,
object
->
render_ctx
);
...
...
@@ -2784,12 +2763,6 @@ BOOL WINAPI X11DRV_wglDeleteContext(HGLRC hglrc) {
return
FALSE
;
}
/* OpenGL32 wglGetCurrentDC */
HDC
WINAPI
X11DRV_wglGetCurrentDC
(
void
)
{
ERR_
(
opengl
)(
"No OpenGL support compiled in.
\n
"
);
return
0
;
}
/* OpenGL32: wglGetProcAddress */
PROC
X11DRV_wglGetProcAddress
(
LPCSTR
lpszProc
)
{
ERR_
(
opengl
)(
"No OpenGL support compiled in.
\n
"
);
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
8c32dd77
...
...
@@ -131,7 +131,6 @@
# OpenGL
@ cdecl wglCreateContext(long) X11DRV_wglCreateContext
@ cdecl wglDeleteContext(long) X11DRV_wglDeleteContext
@ cdecl wglGetCurrentDC() X11DRV_wglGetCurrentDC
@ cdecl wglGetIntegerv(long ptr) X11DRV_wglGetIntegerv
@ cdecl wglGetProcAddress(ptr) X11DRV_wglGetProcAddress
@ cdecl wglMakeCurrent(long long) X11DRV_wglMakeCurrent
...
...
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