Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e3ca5765
Commit
e3ca5765
authored
Oct 20, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use context->valid in context_destroy_gl_resources().
Instead of relying on wglMakeCurrent() to do what we want.
parent
43aaaa8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
context.c
dlls/wined3d/context.c
+8
-9
No files found.
dlls/wined3d/context.c
View file @
e3ca5765
...
...
@@ -633,22 +633,19 @@ static void context_destroy_gl_resources(struct wined3d_context *context)
struct
wined3d_occlusion_query
*
occlusion_query
;
struct
wined3d_event_query
*
event_query
;
struct
fbo_entry
*
entry
,
*
entry2
;
BOOL
has_glctx
;
has_glctx
=
pwglMakeCurrent
(
context
->
hdc
,
context
->
glCtx
);
if
(
!
has_glctx
)
WARN
(
"Failed to activate context. Window already destroyed?
\n
"
);
ENTER_GL
();
LIST_FOR_EACH_ENTRY
(
occlusion_query
,
&
context
->
occlusion_queries
,
struct
wined3d_occlusion_query
,
entry
)
{
if
(
has_glctx
&&
GL_SUPPORT
(
ARB_OCCLUSION_QUERY
))
GL_EXTCALL
(
glDeleteQueriesARB
(
1
,
&
occlusion_query
->
id
));
if
(
context
->
valid
&&
GL_SUPPORT
(
ARB_OCCLUSION_QUERY
))
GL_EXTCALL
(
glDeleteQueriesARB
(
1
,
&
occlusion_query
->
id
));
occlusion_query
->
context
=
NULL
;
}
LIST_FOR_EACH_ENTRY
(
event_query
,
&
context
->
event_queries
,
struct
wined3d_event_query
,
entry
)
{
if
(
has_glctx
)
if
(
context
->
valid
)
{
if
(
GL_SUPPORT
(
APPLE_FENCE
))
GL_EXTCALL
(
glDeleteFencesAPPLE
(
1
,
&
event_query
->
id
));
else
if
(
GL_SUPPORT
(
NV_FENCE
))
GL_EXTCALL
(
glDeleteFencesNV
(
1
,
&
event_query
->
id
));
...
...
@@ -656,11 +653,13 @@ static void context_destroy_gl_resources(struct wined3d_context *context)
event_query
->
context
=
NULL
;
}
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
entry2
,
&
context
->
fbo_list
,
struct
fbo_entry
,
entry
)
{
if
(
!
has_glctx
)
entry
->
id
=
0
;
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
entry2
,
&
context
->
fbo_list
,
struct
fbo_entry
,
entry
)
{
if
(
!
context
->
valid
)
entry
->
id
=
0
;
context_destroy_fbo_entry
(
context
,
entry
);
}
if
(
has_glctx
)
if
(
context
->
valid
)
{
if
(
context
->
src_fbo
)
{
...
...
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