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
a0f2e6e5
Commit
a0f2e6e5
authored
Jan 25, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move some UnLoad code to the base texture class.
parent
4c99bd5f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
25 deletions
+14
-25
basetexture.c
dlls/wined3d/basetexture.c
+10
-1
cubetexture.c
dlls/wined3d/cubetexture.c
+1
-8
texture.c
dlls/wined3d/texture.c
+1
-8
volumetexture.c
dlls/wined3d/volumetexture.c
+1
-8
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/basetexture.c
View file @
a0f2e6e5
...
...
@@ -112,7 +112,16 @@ void WINAPI IWineD3DBaseTextureImpl_PreLoad(IWineD3DBaseTexture *ifac
}
void
WINAPI
IWineD3DBaseTextureImpl_UnLoad
(
IWineD3DBaseTexture
*
iface
)
{
IWineD3DResourceImpl_UnLoad
((
IWineD3DResource
*
)
iface
);
IWineD3DTextureImpl
*
This
=
(
IWineD3DTextureImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
if
(
This
->
baseTexture
.
textureName
)
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
textureName
);
This
->
baseTexture
.
textureName
=
0
;
LEAVE_GL
();
}
}
WINED3DRESOURCETYPE
WINAPI
IWineD3DBaseTextureImpl_GetType
(
IWineD3DBaseTexture
*
iface
)
{
...
...
dlls/wined3d/cubetexture.c
View file @
a0f2e6e5
...
...
@@ -161,7 +161,6 @@ static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DCubeTexture *iface) {
static
void
WINAPI
IWineD3DCubeTextureImpl_UnLoad
(
IWineD3DCubeTexture
*
iface
)
{
unsigned
int
i
,
j
;
IWineD3DCubeTextureImpl
*
This
=
(
IWineD3DCubeTextureImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
TRACE
(
"(%p)
\n
"
,
This
);
/* Unload all the surfaces and reset the texture name. If UnLoad was called on the
...
...
@@ -175,13 +174,7 @@ static void WINAPI IWineD3DCubeTextureImpl_UnLoad(IWineD3DCubeTexture *iface) {
}
}
if
(
This
->
baseTexture
.
textureName
)
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
textureName
);
This
->
baseTexture
.
textureName
=
0
;
LEAVE_GL
();
}
IWineD3DBaseTextureImpl_UnLoad
((
IWineD3DBaseTexture
*
)
iface
);
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DCubeTextureImpl_GetType
(
IWineD3DCubeTexture
*
iface
)
{
...
...
dlls/wined3d/texture.c
View file @
a0f2e6e5
...
...
@@ -145,7 +145,6 @@ static void WINAPI IWineD3DTextureImpl_PreLoad(IWineD3DTexture *iface) {
static
void
WINAPI
IWineD3DTextureImpl_UnLoad
(
IWineD3DTexture
*
iface
)
{
unsigned
int
i
;
IWineD3DTextureImpl
*
This
=
(
IWineD3DTextureImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
TRACE
(
"(%p)
\n
"
,
This
);
/* Unload all the surfaces and reset the texture name. If UnLoad was called on the
...
...
@@ -157,13 +156,7 @@ static void WINAPI IWineD3DTextureImpl_UnLoad(IWineD3DTexture *iface) {
IWineD3DSurface_SetGlTextureDesc
(
This
->
surfaces
[
i
],
0
,
IWineD3DTexture_GetTextureDimensions
(
iface
));
}
if
(
This
->
baseTexture
.
textureName
)
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
textureName
);
This
->
baseTexture
.
textureName
=
0
;
LEAVE_GL
();
}
IWineD3DBaseTextureImpl_UnLoad
((
IWineD3DBaseTexture
*
)
iface
);
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DTextureImpl_GetType
(
IWineD3DTexture
*
iface
)
{
...
...
dlls/wined3d/volumetexture.c
View file @
a0f2e6e5
...
...
@@ -138,7 +138,6 @@ static void WINAPI IWineD3DVolumeTextureImpl_PreLoad(IWineD3DVolumeTexture *ifac
static
void
WINAPI
IWineD3DVolumeTextureImpl_UnLoad
(
IWineD3DVolumeTexture
*
iface
)
{
unsigned
int
i
;
IWineD3DVolumeTextureImpl
*
This
=
(
IWineD3DVolumeTextureImpl
*
)
iface
;
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
TRACE
(
"(%p)
\n
"
,
This
);
/* Unload all the surfaces and reset the texture name. If UnLoad was called on the
...
...
@@ -149,13 +148,7 @@ static void WINAPI IWineD3DVolumeTextureImpl_UnLoad(IWineD3DVolumeTexture *iface
IWineD3DVolume_UnLoad
(
This
->
volumes
[
i
]);
}
if
(
This
->
baseTexture
.
textureName
)
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
ENTER_GL
();
glDeleteTextures
(
1
,
&
This
->
baseTexture
.
textureName
);
This
->
baseTexture
.
textureName
=
0
;
LEAVE_GL
();
}
IWineD3DBaseTextureImpl_UnLoad
((
IWineD3DBaseTexture
*
)
iface
);
}
static
WINED3DRESOURCETYPE
WINAPI
IWineD3DVolumeTextureImpl_GetType
(
IWineD3DVolumeTexture
*
iface
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
a0f2e6e5
...
...
@@ -1622,6 +1622,7 @@ unsigned int count_bits(unsigned int mask);
extern
DWORD
WINAPI
IWineD3DBaseTextureImpl_SetPriority
(
IWineD3DBaseTexture
*
iface
,
DWORD
PriorityNew
);
extern
DWORD
WINAPI
IWineD3DBaseTextureImpl_GetPriority
(
IWineD3DBaseTexture
*
iface
);
extern
void
WINAPI
IWineD3DBaseTextureImpl_PreLoad
(
IWineD3DBaseTexture
*
iface
);
extern
void
WINAPI
IWineD3DBaseTextureImpl_UnLoad
(
IWineD3DBaseTexture
*
iface
);
extern
WINED3DRESOURCETYPE
WINAPI
IWineD3DBaseTextureImpl_GetType
(
IWineD3DBaseTexture
*
iface
);
/*** IWineD3DBaseTexture methods ***/
extern
DWORD
WINAPI
IWineD3DBaseTextureImpl_SetLOD
(
IWineD3DBaseTexture
*
iface
,
DWORD
LODNew
);
...
...
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