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
cf92569c
Commit
cf92569c
authored
Jan 16, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jan 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl32: Store the OpenGL context version in the handle value.
parent
bfd088db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
wgl.c
dlls/opengl32/wgl.c
+20
-3
No files found.
dlls/opengl32/wgl.c
View file @
cf92569c
...
...
@@ -51,8 +51,9 @@ extern struct opengl_funcs null_opengl_funcs;
enum
wgl_handle_type
{
HANDLE_CONTEXT
=
0
<<
12
,
HANDLE_PBUFFER
=
1
<<
12
,
HANDLE_PBUFFER
=
0
<<
12
,
HANDLE_CONTEXT
=
1
<<
12
,
HANDLE_CONTEXT_V3
=
3
<<
12
,
HANDLE_TYPE_MASK
=
15
<<
12
};
...
...
@@ -270,8 +271,24 @@ HGLRC WINAPI wglCreateContextAttribsARB( HDC hdc, HGLRC share, const int *attrib
{
if
((
context
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
context
)
)))
{
enum
wgl_handle_type
type
=
HANDLE_CONTEXT
;
if
(
attribs
)
{
while
(
*
attribs
)
{
if
(
attribs
[
0
]
==
WGL_CONTEXT_MAJOR_VERSION_ARB
)
{
if
(
attribs
[
1
]
>=
3
)
type
=
HANDLE_CONTEXT_V3
;
break
;
}
attribs
+=
2
;
}
}
context
->
drv_ctx
=
drv_ctx
;
if
(
!
(
ret
=
alloc_handle
(
HANDLE_CONTEXT
,
funcs
,
context
)))
if
(
!
(
ret
=
alloc_handle
(
type
,
funcs
,
context
)))
HeapFree
(
GetProcessHeap
(),
0
,
context
);
}
if
(
!
ret
)
funcs
->
wgl
.
p_wglDeleteContext
(
drv_ctx
);
...
...
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