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
66a5995e
Commit
66a5995e
authored
Jun 25, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Move wglGetCurrentContext and wglGetCurrentDC to the internal OpenGL extension functions.
parent
08efea02
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
9 deletions
+33
-9
wgl.c
dlls/opengl32/wgl.c
+6
-6
directx.c
dlls/wined3d/directx.c
+4
-0
wined3d_gl.h
dlls/wined3d/wined3d_gl.h
+0
-2
opengl.c
dlls/winex11.drv/opengl.c
+23
-1
No files found.
dlls/opengl32/wgl.c
View file @
66a5995e
...
...
@@ -50,9 +50,7 @@ static struct
PROC
(
WINAPI
*
p_wglGetProcAddress
)(
LPCSTR
lpszProc
);
BOOL
(
WINAPI
*
p_SetPixelFormat
)(
HDC
hdc
,
INT
iPixelFormat
,
const
PIXELFORMATDESCRIPTOR
*
ppfd
);
BOOL
(
WINAPI
*
p_wglMakeCurrent
)(
HDC
hdc
,
HGLRC
hglrc
);
HDC
(
WINAPI
*
p_wglGetCurrentDC
)(
void
);
HGLRC
(
WINAPI
*
p_wglCreateContext
)(
HDC
hdc
);
HGLRC
(
WINAPI
*
p_wglGetCurrentContext
)(
void
);
INT
(
WINAPI
*
p_ChoosePixelFormat
)(
HDC
hdc
,
const
PIXELFORMATDESCRIPTOR
*
ppfd
);
INT
(
WINAPI
*
p_DescribePixelFormat
)(
HDC
hdc
,
INT
iPixelFormat
,
UINT
nBytes
,
LPPIXELFORMATDESCRIPTOR
ppfd
);
INT
(
WINAPI
*
p_GetPixelFormat
)(
HDC
hdc
);
...
...
@@ -60,9 +58,11 @@ static struct
/* 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
);
HGLRC
(
WINAPI
*
p_wglGetCurrentContext
)(
void
);
HDC
(
WINAPI
*
p_wglGetCurrentDC
)(
void
);
void
(
WINAPI
*
p_wglGetIntegerv
)(
GLenum
pname
,
GLint
*
params
);
BOOL
(
WINAPI
*
p_wglShareLists
)(
HGLRC
hglrc1
,
HGLRC
hglrc2
);
}
wine_wgl
;
...
...
@@ -932,9 +932,7 @@ 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_wglMakeCurrent
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglMakeCurrent"
);
wine_wgl
.
p_wglGetCurrentDC
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglGetCurrentDC"
);
wine_wgl
.
p_wglCreateContext
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglCreateContext"
);
wine_wgl
.
p_wglGetCurrentContext
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"wglGetCurrentContext"
);
wine_wgl
.
p_ChoosePixelFormat
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"ChoosePixelFormat"
);
wine_wgl
.
p_DescribePixelFormat
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"DescribePixelFormat"
);
wine_wgl
.
p_GetPixelFormat
=
(
void
*
)
GetProcAddress
(
mod_gdi32
,
"GetPixelFormat"
);
...
...
@@ -942,9 +940,11 @@ static BOOL process_attach(void)
/* 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"
);
wine_wgl
.
p_wglGetCurrentContext
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglGetCurrentContext"
);
wine_wgl
.
p_wglGetCurrentDC
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglGetCurrentDC"
);
wine_wgl
.
p_wglGetIntegerv
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglGetIntegerv"
);
wine_wgl
.
p_wglShareLists
=
(
void
*
)
wine_wgl
.
p_wglGetProcAddress
(
"wglShareLists"
);
if
(
!
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
OpenGL"
,
&
hkey
))
{
...
...
dlls/wined3d/directx.c
View file @
66a5995e
...
...
@@ -5360,11 +5360,15 @@ static BOOL InitAdapters(struct wined3d *wined3d)
wglFinish
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"glFinish"
);
wglFlush
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"glFlush"
);
pwglDeleteContext
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglDeleteContext"
);
pwglGetCurrentContext
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglGetCurrentContext"
);
pwglGetCurrentDC
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglGetCurrentDC"
);
pwglShareLists
=
(
void
*
)
GetProcAddress
(
mod_gl
,
"wglShareLists"
);
#else
wglFinish
=
(
void
*
)
pwglGetProcAddress
(
"wglFinish"
);
wglFlush
=
(
void
*
)
pwglGetProcAddress
(
"wglFlush"
);
pwglDeleteContext
=
(
void
*
)
pwglGetProcAddress
(
"wglDeleteContext"
);
pwglGetCurrentContext
=
(
void
*
)
pwglGetProcAddress
(
"wglGetCurrentContext"
);
pwglGetCurrentDC
=
(
void
*
)
pwglGetProcAddress
(
"wglGetCurrentDC"
);
pwglShareLists
=
(
void
*
)
pwglGetProcAddress
(
"wglShareLists"
);
#endif
...
...
dlls/wined3d/wined3d_gl.h
View file @
66a5995e
...
...
@@ -1713,8 +1713,6 @@ BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN;
#define WGL_FUNCS_GEN \
USE_WGL_FUNC(wglCreateContext) \
USE_WGL_FUNC(wglGetCurrentContext) \
USE_WGL_FUNC(wglGetCurrentDC) \
USE_WGL_FUNC(wglGetProcAddress) \
USE_WGL_FUNC(wglMakeCurrent)
...
...
dlls/winex11.drv/opengl.c
View file @
66a5995e
...
...
@@ -2005,6 +2005,26 @@ static BOOL WINAPI X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2)
return
FALSE
;
}
/***********************************************************************
* X11DRV_wglGetCurrentContext
*/
static
HGLRC
WINAPI
X11DRV_wglGetCurrentContext
(
void
)
{
return
NtCurrentTeb
()
->
glContext
;
}
/***********************************************************************
* X11DRV_wglGetCurrentDC
*/
static
HDC
WINAPI
X11DRV_wglGetCurrentDC
(
void
)
{
Wine_GLContext
*
ctx
=
NtCurrentTeb
()
->
glContext
;
if
(
!
ctx
)
return
NULL
;
TRACE
(
"hdc %p
\n
"
,
ctx
->
hdc
);
return
ctx
->
hdc
;
}
/* WGL helper function which handles differences in glGetIntegerv from WGL and GLX */
static
void
WINAPI
X11DRV_wglGetIntegerv
(
GLenum
pname
,
GLint
*
params
)
{
...
...
@@ -3251,9 +3271,11 @@ static const WineGLExtension WGL_internal_functions =
{
{
"wglCopyContext"
,
X11DRV_wglCopyContext
},
{
"wglDeleteContext"
,
X11DRV_wglDeleteContext
},
{
"wglGetIntegerv"
,
X11DRV_wglGetIntegerv
},
{
"wglFinish"
,
X11DRV_wglFinish
},
{
"wglFlush"
,
X11DRV_wglFlush
},
{
"wglGetCurrentContext"
,
X11DRV_wglGetCurrentContext
},
{
"wglGetCurrentDC"
,
X11DRV_wglGetCurrentDC
},
{
"wglGetIntegerv"
,
X11DRV_wglGetIntegerv
},
{
"wglShareLists"
,
X11DRV_wglShareLists
},
}
};
...
...
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