示例#1
0
文件: basetexture.c 项目: r6144/wine
void basetexture_unload(IWineD3DBaseTexture *iface)
{
    IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
    IWineD3DDeviceImpl *device = This->resource.device;
    struct wined3d_context *context = NULL;

    if (This->baseTexture.texture_rgb.name || This->baseTexture.texture_srgb.name)
    {
        context = context_acquire(device, NULL);
    }

    if(This->baseTexture.texture_rgb.name) {
        gltexture_delete(&This->baseTexture.texture_rgb);
    }
    if(This->baseTexture.texture_srgb.name) {
        gltexture_delete(&This->baseTexture.texture_srgb);
    }

    if (context) context_release(context);

    This->baseTexture.texture_rgb.dirty = TRUE;
    This->baseTexture.texture_srgb.dirty = TRUE;

    resource_unload((IWineD3DResourceImpl *)This);
}
示例#2
0
void basetexture_unload(IWineD3DBaseTexture *iface)
{
    IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
    IWineD3DDeviceImpl *device = This->resource.device;

#ifdef VBOX_WITH_WDDM
    if (VBOXSHRC_IS_SHARED_OPENED(This))
    {
        This->baseTexture.texture_rgb.name = 0;
        This->baseTexture.texture_srgb.name = 0;
    }
    else
#endif
    {
        struct wined3d_context *context = NULL;
        if (This->baseTexture.texture_rgb.name || This->baseTexture.texture_srgb.name)
        {
            context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD);
        }

        if(This->baseTexture.texture_rgb.name) {
            gltexture_delete(&This->baseTexture.texture_rgb);
        }
        if(This->baseTexture.texture_srgb.name) {
            gltexture_delete(&This->baseTexture.texture_srgb);
        }

        if (context) context_release(context);
    }

    This->baseTexture.texture_rgb.dirty = TRUE;
    This->baseTexture.texture_srgb.dirty = TRUE;
}
示例#3
0
文件: basetexture.c 项目: dvdhoo/wine
void basetexture_unload(IWineD3DBaseTextureImpl *texture)
{
    IWineD3DDeviceImpl *device = texture->resource.device;
    struct wined3d_context *context = NULL;

    if (texture->baseTexture.texture_rgb.name || texture->baseTexture.texture_srgb.name)
    {
        context = context_acquire(device, NULL);
    }

    if (texture->baseTexture.texture_rgb.name)
        gltexture_delete(&texture->baseTexture.texture_rgb);

    if (texture->baseTexture.texture_srgb.name)
        gltexture_delete(&texture->baseTexture.texture_srgb);

    if (context) context_release(context);

    basetexture_set_dirty(texture, TRUE);

    resource_unload(&texture->resource);
}
示例#4
0
static void wined3d_texture_unload(struct wined3d_texture *texture)
{
    struct wined3d_device *device = texture->resource.device;
    struct wined3d_context *context = NULL;

    if (texture->texture_rgb.name || texture->texture_srgb.name)
    {
        context = context_acquire(device, NULL);
    }

    if (texture->texture_rgb.name)
        gltexture_delete(context->gl_info, &texture->texture_rgb);

    if (texture->texture_srgb.name)
        gltexture_delete(context->gl_info, &texture->texture_srgb);

    if (context) context_release(context);

    wined3d_texture_set_dirty(texture, TRUE);

    resource_unload(&texture->resource);
}