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
900094cb
Commit
900094cb
authored
Dec 05, 2006
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Dec 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wgl: Cleanup wglMakeCurrent.
parent
9a2c4f71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
21 deletions
+10
-21
opengl.c
dlls/winex11.drv/opengl.c
+10
-21
No files found.
dlls/winex11.drv/opengl.c
View file @
900094cb
...
...
@@ -1464,28 +1464,17 @@ BOOL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) {
Wine_GLContext
*
ctx
=
(
Wine_GLContext
*
)
hglrc
;
Drawable
drawable
=
physDev
->
drawable
;
if
(
ctx
->
ctx
==
NULL
)
{
int
draw_vis_id
,
ctx_vis_id
;
VisualID
visualid
=
(
VisualID
)
GetPropA
(
GetDesktopWindow
(),
"__wine_x11_visual_id"
);
TRACE
(
" Wine desktop VISUAL_ID is 0x%x
\n
"
,
(
unsigned
int
)
visualid
);
draw_vis_id
=
describeDrawable
(
ctx
,
drawable
);
ctx_vis_id
=
describeContext
(
ctx
);
if
(
-
1
==
draw_vis_id
||
(
draw_vis_id
==
visualid
&&
draw_vis_id
!=
ctx_vis_id
))
{
/**
* Inherits from root window so reuse desktop visual
*/
XVisualInfo
template
;
XVisualInfo
*
vis
;
int
num
;
template
.
visualid
=
visualid
;
vis
=
XGetVisualInfo
(
ctx
->
display
,
VisualIDMask
,
&
template
,
&
num
);
TRACE
(
" Creating GLX Context
\n
"
);
ctx
->
ctx
=
pglXCreateContext
(
ctx
->
display
,
vis
,
NULL
,
type
==
OBJ_MEMDC
?
False
:
True
);
}
else
{
TRACE
(
" Creating GLX Context
\n
"
);
ctx
->
ctx
=
pglXCreateContext
(
ctx
->
display
,
ctx
->
vis
,
NULL
,
type
==
OBJ_MEMDC
?
False
:
True
);
/* The describe lines below are for debugging purposes only */
if
(
TRACE_ON
(
wgl
))
{
describeDrawable
(
ctx
,
drawable
);
describeContext
(
ctx
);
}
/* Create a GLX context using the same visual as chosen earlier in wglCreateContext.
* We are certain that the drawable and context are compatible as we only allow compatible formats.
*/
TRACE
(
" Creating GLX Context
\n
"
);
ctx
->
ctx
=
pglXCreateContext
(
ctx
->
display
,
ctx
->
vis
,
NULL
,
type
==
OBJ_MEMDC
?
False
:
True
);
TRACE
(
" created a delayed OpenGL context (%p)
\n
"
,
ctx
->
ctx
);
}
TRACE
(
" make current for dis %p, drawable %p, ctx %p
\n
"
,
ctx
->
display
,
(
void
*
)
drawable
,
ctx
->
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