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
12063259
Commit
12063259
authored
May 21, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
May 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context_gl structure to context_enter().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ef4f0ebb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
context.c
dlls/wined3d/context.c
+11
-11
No files found.
dlls/wined3d/context.c
View file @
12063259
...
...
@@ -1633,11 +1633,11 @@ void context_restore(struct wined3d_context *context, struct wined3d_texture *te
context_release
(
context
);
}
static
void
context_enter
(
struct
wined3d_context
*
context
)
static
void
wined3d_context_gl_enter
(
struct
wined3d_context_gl
*
context_gl
)
{
TRACE
(
"Entering context %p, level %u.
\n
"
,
context
,
context
->
level
+
1
);
TRACE
(
"Entering context %p, level %u.
\n
"
,
context
_gl
,
context_gl
->
c
.
level
+
1
);
if
(
!
context
->
level
++
)
if
(
!
context
_gl
->
c
.
level
++
)
{
const
struct
wined3d_context
*
current_context
=
context_get_current
();
HGLRC
current_gl
=
wglGetCurrentContext
();
...
...
@@ -1646,13 +1646,13 @@ static void context_enter(struct wined3d_context *context)
{
TRACE
(
"Another GL context (%p on device context %p) is already current.
\n
"
,
current_gl
,
wglGetCurrentDC
());
context
->
restore_ctx
=
current_gl
;
context
->
restore_dc
=
wglGetCurrentDC
();
context
->
needs_set
=
1
;
context
_gl
->
c
.
restore_ctx
=
current_gl
;
context
_gl
->
c
.
restore_dc
=
wglGetCurrentDC
();
context
_gl
->
c
.
needs_set
=
1
;
}
else
if
(
!
context
->
needs_set
&&
!
(
context
->
hdc_is_private
&&
context
->
hdc_has_format
)
&&
context
->
pixel_format
!=
context
->
gl_info
->
gl_ops
.
wgl
.
p_wglGetPixelFormat
(
context
->
hdc
))
context
->
needs_set
=
1
;
else
if
(
!
context
_gl
->
c
.
needs_set
&&
!
(
context_gl
->
c
.
hdc_is_private
&&
context_gl
->
c
.
hdc_has_format
)
&&
context_gl
->
c
.
pixel_format
!=
context_gl
->
c
.
gl_info
->
gl_ops
.
wgl
.
p_wglGetPixelFormat
(
context_gl
->
c
.
hdc
))
context
_gl
->
c
.
needs_set
=
1
;
}
}
...
...
@@ -2113,7 +2113,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi
if
(
!
context
->
pixel_format
)
return
E_FAIL
;
context_enter
(
context
);
wined3d_context_gl_enter
(
context_gl
);
if
(
!
wined3d_context_gl_set_pixel_format
(
context_gl
))
{
...
...
@@ -4217,7 +4217,7 @@ static void context_activate(struct wined3d_context *context,
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
context_enter
(
context
);
wined3d_context_gl_enter
(
context_gl
);
wined3d_context_gl_update_window
(
context_gl
);
context_setup_target
(
context
,
texture
,
sub_resource_idx
);
if
(
!
context
->
valid
)
...
...
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