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
a68637b5
Commit
a68637b5
authored
Apr 03, 2008
by
Allan Tong
Committed by
Alexandre Julliard
Apr 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Call ActivateContext before any gl call in IWineD3DSurfaceImpl_Release.
parent
18b9c2bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
surface.c
dlls/wined3d/surface.c
+15
-20
No files found.
dlls/wined3d/surface.c
View file @
a68637b5
...
...
@@ -423,29 +423,31 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface) {
renderbuffer_entry_t
*
entry
,
*
entry2
;
TRACE
(
"(%p) : cleaning up
\n
"
,
This
);
if
(
This
->
glDescription
.
textureName
!=
0
)
{
/* release the openGL texture.. */
/* Need a context to destroy the texture. Use the currently active render target, but only if
* the primary render target exists. Otherwise lastActiveRenderTarget is garbage, see above.
* When destroying the primary rt, Uninit3D will activate a context before doing anything
*/
if
(
device
->
render_targets
&&
device
->
render_targets
[
0
])
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
}
/* Need a context to destroy the texture. Use the currently active render target, but only if
* the primary render target exists. Otherwise lastActiveRenderTarget is garbage, see above.
* When destroying the primary rt, Uninit3D will activate a context before doing anything
*/
if
(
device
->
render_targets
&&
device
->
render_targets
[
0
])
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
}
ENTER_GL
();
if
(
This
->
glDescription
.
textureName
!=
0
)
{
/* release the openGL texture.. */
TRACE
(
"Deleting texture %d
\n
"
,
This
->
glDescription
.
textureName
);
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
glDescription
.
textureName
);
LEAVE_GL
();
}
if
(
This
->
Flags
&
SFLAG_PBO
)
{
/* Delete the PBO */
ENTER_GL
();
GL_EXTCALL
(
glDeleteBuffersARB
(
1
,
&
This
->
pbo
));
LEAVE_GL
();
}
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
entry2
,
&
This
->
renderbuffers
,
renderbuffer_entry_t
,
entry
)
{
GL_EXTCALL
(
glDeleteRenderbuffersEXT
(
1
,
&
entry
->
id
));
HeapFree
(
GetProcessHeap
(),
0
,
entry
);
}
LEAVE_GL
();
if
(
This
->
Flags
&
SFLAG_DIBSECTION
)
{
/* Release the DC */
SelectObject
(
This
->
hDC
,
This
->
dib
.
holdbitmap
);
...
...
@@ -463,13 +465,6 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface) {
if
(
iface
==
device
->
ddraw_primary
)
device
->
ddraw_primary
=
NULL
;
ENTER_GL
();
LIST_FOR_EACH_ENTRY_SAFE
(
entry
,
entry2
,
&
This
->
renderbuffers
,
renderbuffer_entry_t
,
entry
)
{
GL_EXTCALL
(
glDeleteRenderbuffersEXT
(
1
,
&
entry
->
id
));
HeapFree
(
GetProcessHeap
(),
0
,
entry
);
}
LEAVE_GL
();
TRACE
(
"(%p) Released
\n
"
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
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