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
ba6fac69
Commit
ba6fac69
authored
Sep 19, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Sep 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Create a separate function for deleting GL textures.
parent
529e6737
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
basetexture.c
dlls/wined3d/basetexture.c
+15
-10
No files found.
dlls/wined3d/basetexture.c
View file @
ba6fac69
...
...
@@ -70,25 +70,30 @@ void basetexture_cleanup(IWineD3DBaseTexture *iface)
resource_cleanup
((
IWineD3DResource
*
)
iface
);
}
/* A GL context is provided by the caller */
static
void
gltexture_delete
(
struct
gl_texture
*
tex
)
{
ENTER_GL
();
glDeleteTextures
(
1
,
&
tex
->
name
);
LEAVE_GL
();
tex
->
name
=
0
;
}
void
basetexture_unload
(
IWineD3DBaseTexture
*
iface
)
{
IWineD3DTextureImpl
*
This
=
(
IWineD3DTextureImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
if
(
This
->
baseTexture
.
texture_rgb
.
name
)
{
if
(
This
->
baseTexture
.
texture_rgb
.
name
||
This
->
baseTexture
.
texture_srgb
.
name
)
{
ActivateContext
(
device
,
NULL
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
texture_rgb
.
name
);
This
->
baseTexture
.
texture_rgb
.
name
=
0
;
LEAVE_GL
();
}
if
(
This
->
baseTexture
.
texture_rgb
.
name
)
{
gltexture_delete
(
&
This
->
baseTexture
.
texture_rgb
);
}
if
(
This
->
baseTexture
.
texture_srgb
.
name
)
{
ActivateContext
(
device
,
NULL
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
texture_srgb
.
name
);
This
->
baseTexture
.
texture_srgb
.
name
=
0
;
LEAVE_GL
();
gltexture_delete
(
&
This
->
baseTexture
.
texture_srgb
);
}
This
->
baseTexture
.
texture_rgb
.
dirty
=
TRUE
;
This
->
baseTexture
.
texture_srgb
.
dirty
=
TRUE
;
...
...
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