Ejemplo n.º 1
0
/* Do not call while under the GL lock. */
static void volumetexture_unload(struct wined3d_resource *resource)
{
    IWineD3DBaseTextureImpl *texture = basetexture_from_resource(resource);
    unsigned int i;

    TRACE("texture %p.\n", texture);

    for (i = 0; i < texture->baseTexture.level_count; ++i)
    {
        struct wined3d_resource *sub_resource = texture->baseTexture.sub_resources[i];
        sub_resource->resource_ops->resource_unload(sub_resource);
    }

    basetexture_unload(texture);
}
Ejemplo n.º 2
0
static void WINAPI IWineD3DVolumeTextureImpl_UnLoad(IWineD3DVolumeTexture *iface) {
    unsigned int i;
    IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
    TRACE("(%p)\n", This);

    /* Unload all the surfaces and reset the texture name. If UnLoad was called on the
     * surface before, this one will be a NOP and vice versa. Unloading an unloaded
     * surface is fine
     */
    for (i = 0; i < This->baseTexture.levels; i++) {
        IWineD3DVolume_UnLoad(This->volumes[i]);
    }

    basetexture_unload((IWineD3DBaseTexture *)iface);
}
Ejemplo n.º 3
0
static void WINAPI IWineD3DTextureImpl_UnLoad(IWineD3DTexture *iface) {
    unsigned int i;
    IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
    TRACE("(%p)\n", This);

    /* Unload all the surfaces and reset the texture name. If UnLoad was called on the
     * surface before, this one will be a NOP and vice versa. Unloading an unloaded
     * surface is fine
     */
    for (i = 0; i < This->baseTexture.levels; i++) {
        IWineD3DSurface_UnLoad(This->surfaces[i]);
        surface_set_texture_name(This->surfaces[i], 0, FALSE); /* Delete rgb name */
        surface_set_texture_name(This->surfaces[i], 0, TRUE); /* delete srgb name */
    }

    basetexture_unload((IWineD3DBaseTexture *)iface);
}
Ejemplo n.º 4
0
/* Do not call while under the GL lock. */
static void texture_unload(struct wined3d_resource *resource)
{
    IWineD3DBaseTextureImpl *texture = basetexture_from_resource(resource);
    unsigned int i;

    TRACE("texture %p.\n", texture);

    for (i = 0; i < texture->baseTexture.level_count; ++i)
    {
        struct wined3d_resource *sub_resource = texture->baseTexture.sub_resources[i];
        IWineD3DSurfaceImpl *surface = surface_from_resource(sub_resource);

        sub_resource->resource_ops->resource_unload(sub_resource);
        surface_set_texture_name(surface, 0, FALSE); /* Delete rgb name */
        surface_set_texture_name(surface, 0, TRUE); /* delete srgb name */
    }

    basetexture_unload(texture);
}
Ejemplo n.º 5
0
void basetexture_cleanup(IWineD3DBaseTexture *iface)
{
    basetexture_unload(iface);
    HeapFree(GetProcessHeap(), 0, ((IWineD3DBaseTextureImpl *)iface)->baseTexture.sub_resources);
    resource_cleanup((IWineD3DResource *)iface);
}
Ejemplo n.º 6
0
void basetexture_cleanup(IWineD3DBaseTextureImpl *texture)
{
    basetexture_unload(texture);
    HeapFree(GetProcessHeap(), 0, texture->baseTexture.sub_resources);
    resource_cleanup(&texture->resource);
}
Ejemplo n.º 7
0
void basetexture_cleanup(IWineD3DBaseTexture *iface)
{
    basetexture_unload(iface);
    resource_cleanup((IWineD3DResource *)iface);
}