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
c48a3bd3
Commit
c48a3bd3
authored
Nov 03, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Make the GL driver function table const.
parent
f27ac1bb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
12 deletions
+12
-12
make_opengl
dlls/opengl32/make_opengl
+1
-1
unix_private.h
dlls/opengl32/unix_private.h
+2
-2
unix_wgl.c
dlls/opengl32/unix_wgl.c
+7
-7
dc.c
dlls/win32u/dc.c
+1
-1
wgl_driver.h
include/wine/wgl_driver.h
+1
-1
No files found.
dlls/opengl32/make_opengl
View file @
c48a3bd3
...
...
@@ -920,7 +920,7 @@ foreach (sort keys %norm_functions)
}
print
HEADER
"\n\n"
;
print
HEADER
"extern struct opengl_funcs *__wine_get_wgl_driver( HDC hdc, UINT version );\n\n"
;
print
HEADER
"extern
const
struct opengl_funcs *__wine_get_wgl_driver( HDC hdc, UINT version );\n\n"
;
print
HEADER
"#endif /* __WINE_WGL_DRIVER_H */\n"
;
close
HEADER
;
...
...
dlls/opengl32/unix_private.h
View file @
c48a3bd3
...
...
@@ -43,9 +43,9 @@ extern const int extension_registry_size DECLSPEC_HIDDEN;
extern
struct
opengl_funcs
null_opengl_funcs
DECLSPEC_HIDDEN
;
static
inline
struct
opengl_funcs
*
get_dc_funcs
(
HDC
hdc
)
static
inline
const
struct
opengl_funcs
*
get_dc_funcs
(
HDC
hdc
)
{
struct
opengl_funcs
*
funcs
=
__wine_get_wgl_driver
(
hdc
,
WINE_WGL_DRIVER_VERSION
);
const
struct
opengl_funcs
*
funcs
=
__wine_get_wgl_driver
(
hdc
,
WINE_WGL_DRIVER_VERSION
);
if
(
!
funcs
)
RtlSetLastWin32Error
(
ERROR_INVALID_HANDLE
);
else
if
(
funcs
==
(
void
*
)
-
1
)
funcs
=
&
null_opengl_funcs
;
return
funcs
;
...
...
dlls/opengl32/unix_wgl.c
View file @
c48a3bd3
...
...
@@ -77,7 +77,7 @@ struct opengl_context
struct
wgl_handle
{
UINT
handle
;
struct
opengl_funcs
*
funcs
;
const
struct
opengl_funcs
*
funcs
;
union
{
struct
opengl_context
*
context
;
/* for HANDLE_CONTEXT */
...
...
@@ -117,7 +117,7 @@ static struct wgl_handle *get_handle_ptr( HANDLE handle, enum wgl_handle_type ty
return
NULL
;
}
static
HANDLE
alloc_handle
(
enum
wgl_handle_type
type
,
struct
opengl_funcs
*
funcs
,
void
*
user_ptr
)
static
HANDLE
alloc_handle
(
enum
wgl_handle_type
type
,
const
struct
opengl_funcs
*
funcs
,
void
*
user_ptr
)
{
HANDLE
handle
=
0
;
struct
wgl_handle
*
ptr
=
NULL
;
...
...
@@ -647,7 +647,7 @@ static HGLRC wrap_wglCreateContext( HDC hdc )
HGLRC
ret
=
0
;
struct
wgl_context
*
drv_ctx
;
struct
opengl_context
*
context
;
struct
opengl_funcs
*
funcs
=
get_dc_funcs
(
hdc
);
const
struct
opengl_funcs
*
funcs
=
get_dc_funcs
(
hdc
);
if
(
!
funcs
)
return
0
;
if
(
!
(
drv_ctx
=
funcs
->
wgl
.
p_wglCreateContext
(
hdc
)))
return
0
;
...
...
@@ -679,7 +679,7 @@ static BOOL wrap_wglMakeCurrent( TEB *teb, HDC hdc, HGLRC hglrc )
teb
->
glReserved1
[
0
]
=
hdc
;
teb
->
glReserved1
[
1
]
=
hdc
;
teb
->
glCurrentRC
=
hglrc
;
teb
->
glTable
=
ptr
->
funcs
;
teb
->
glTable
=
(
void
*
)
ptr
->
funcs
;
}
}
else
...
...
@@ -751,7 +751,7 @@ static HGLRC wrap_wglCreateContextAttribsARB( HDC hdc, HGLRC share, const int *a
struct
wgl_context
*
drv_ctx
;
struct
wgl_handle
*
share_ptr
=
NULL
;
struct
opengl_context
*
context
;
struct
opengl_funcs
*
funcs
=
get_dc_funcs
(
hdc
);
const
struct
opengl_funcs
*
funcs
=
get_dc_funcs
(
hdc
);
if
(
!
funcs
)
{
...
...
@@ -796,7 +796,7 @@ static HPBUFFERARB wrap_wglCreatePbufferARB( HDC hdc, int format, int width, int
{
HPBUFFERARB
ret
;
struct
wgl_pbuffer
*
pbuffer
;
struct
opengl_funcs
*
funcs
=
get_dc_funcs
(
hdc
);
const
struct
opengl_funcs
*
funcs
=
get_dc_funcs
(
hdc
);
if
(
!
funcs
||
!
funcs
->
ext
.
p_wglCreatePbufferARB
)
return
0
;
if
(
!
(
pbuffer
=
funcs
->
ext
.
p_wglCreatePbufferARB
(
hdc
,
format
,
width
,
height
,
attribs
)))
return
0
;
...
...
@@ -842,7 +842,7 @@ static BOOL wrap_wglMakeContextCurrentARB( TEB *teb, HDC draw_hdc, HDC read_hdc,
teb
->
glReserved1
[
0
]
=
draw_hdc
;
teb
->
glReserved1
[
1
]
=
read_hdc
;
teb
->
glCurrentRC
=
hglrc
;
teb
->
glTable
=
ptr
->
funcs
;
teb
->
glTable
=
(
void
*
)
ptr
->
funcs
;
}
}
else
...
...
dlls/win32u/dc.c
View file @
c48a3bd3
...
...
@@ -1490,7 +1490,7 @@ BOOL WINAPI __wine_get_icm_profile( HDC hdc, BOOL allow_default, DWORD *size, WC
/***********************************************************************
* __wine_get_wgl_driver (win32u.@)
*/
struct
opengl_funcs
*
__wine_get_wgl_driver
(
HDC
hdc
,
UINT
version
)
const
struct
opengl_funcs
*
__wine_get_wgl_driver
(
HDC
hdc
,
UINT
version
)
{
BOOL
is_display
,
is_memdc
;
DC
*
dc
;
...
...
include/wine/wgl_driver.h
View file @
c48a3bd3
...
...
@@ -3405,6 +3405,6 @@ struct opengl_funcs
USE_GL_FUNC(glVertexPointer) \
USE_GL_FUNC(glViewport)
extern
struct
opengl_funcs
*
__wine_get_wgl_driver
(
HDC
hdc
,
UINT
version
);
extern
const
struct
opengl_funcs
*
__wine_get_wgl_driver
(
HDC
hdc
,
UINT
version
);
#endif
/* __WINE_WGL_DRIVER_H */
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