mirror of
https://github.com/reactos/wine.git
synced 2024-11-29 22:50:43 +00:00
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_set_texture_target().
This commit is contained in:
parent
294d9dae8f
commit
f78d85ffe1
@ -126,7 +126,7 @@ static void cubetexture_cleanup(IWineD3DCubeTextureImpl *This)
|
||||
* surface doesn't try and release it. */
|
||||
surface_set_texture_name(surface, 0, TRUE);
|
||||
surface_set_texture_name(surface, 0, FALSE);
|
||||
surface_set_texture_target((IWineD3DSurface *)surface, 0);
|
||||
surface_set_texture_target(surface, 0);
|
||||
IWineD3DSurface_SetContainer((IWineD3DSurface *)surface, NULL);
|
||||
IWineD3DSurface_Release((IWineD3DSurface *)surface);
|
||||
}
|
||||
@ -559,7 +559,7 @@ HRESULT cubetexture_init(IWineD3DCubeTextureImpl *texture, UINT edge_length, UIN
|
||||
}
|
||||
|
||||
IWineD3DSurface_SetContainer(surface, (IWineD3DBase *)texture);
|
||||
surface_set_texture_target(surface, cube_targets[j]);
|
||||
surface_set_texture_target((IWineD3DSurfaceImpl *)surface, cube_targets[j]);
|
||||
texture->baseTexture.sub_resources[idx] = (IWineD3DResourceImpl *)surface;
|
||||
TRACE("Created surface level %u @ %p.\n", i, surface);
|
||||
}
|
||||
|
@ -499,25 +499,23 @@ void surface_set_texture_name(IWineD3DSurfaceImpl *surface, GLuint new_name, BOO
|
||||
surface_force_reload(surface);
|
||||
}
|
||||
|
||||
void surface_set_texture_target(IWineD3DSurface *iface, GLenum target)
|
||||
void surface_set_texture_target(IWineD3DSurfaceImpl *surface, GLenum target)
|
||||
{
|
||||
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
|
||||
TRACE("surface %p, target %#x.\n", surface, target);
|
||||
|
||||
TRACE("(%p) : setting target %#x\n", This, target);
|
||||
|
||||
if (This->texture_target != target)
|
||||
if (surface->texture_target != target)
|
||||
{
|
||||
if (target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
{
|
||||
This->Flags &= ~SFLAG_NORMCOORD;
|
||||
surface->Flags &= ~SFLAG_NORMCOORD;
|
||||
}
|
||||
else if (This->texture_target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
else if (surface->texture_target == GL_TEXTURE_RECTANGLE_ARB)
|
||||
{
|
||||
This->Flags |= SFLAG_NORMCOORD;
|
||||
surface->Flags |= SFLAG_NORMCOORD;
|
||||
}
|
||||
}
|
||||
This->texture_target = target;
|
||||
surface_force_reload(This);
|
||||
surface->texture_target = target;
|
||||
surface_force_reload(surface);
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
|
@ -118,7 +118,7 @@ static void texture_cleanup(IWineD3DTextureImpl *This)
|
||||
* surface doesn't try and release it */
|
||||
surface_set_texture_name(surface, 0, TRUE);
|
||||
surface_set_texture_name(surface, 0, FALSE);
|
||||
surface_set_texture_target((IWineD3DSurface *)surface, 0);
|
||||
surface_set_texture_target(surface, 0);
|
||||
IWineD3DSurface_SetContainer((IWineD3DSurface *)surface, NULL);
|
||||
IWineD3DSurface_Release((IWineD3DSurface *)surface);
|
||||
}
|
||||
@ -612,7 +612,7 @@ HRESULT texture_init(IWineD3DTextureImpl *texture, UINT width, UINT height, UINT
|
||||
}
|
||||
|
||||
IWineD3DSurface_SetContainer(surface, (IWineD3DBase *)texture);
|
||||
surface_set_texture_target(surface, texture->target);
|
||||
surface_set_texture_target((IWineD3DSurfaceImpl *)surface, texture->target);
|
||||
texture->baseTexture.sub_resources[i] = (IWineD3DResourceImpl *)surface;
|
||||
TRACE("Created surface level %u @ %p.\n", i, surface);
|
||||
/* Calculate the next mipmap level. */
|
||||
|
@ -2681,7 +2681,7 @@ void surface_modify_ds_location(IWineD3DSurfaceImpl *surface, DWORD location) DE
|
||||
void surface_set_compatible_renderbuffer(IWineD3DSurfaceImpl *surface,
|
||||
unsigned int width, unsigned int height) DECLSPEC_HIDDEN;
|
||||
void surface_set_texture_name(IWineD3DSurfaceImpl *surface, GLuint name, BOOL srgb_name) DECLSPEC_HIDDEN;
|
||||
void surface_set_texture_target(IWineD3DSurface *iface, GLenum target) DECLSPEC_HIDDEN;
|
||||
void surface_set_texture_target(IWineD3DSurfaceImpl *surface, GLenum target) DECLSPEC_HIDDEN;
|
||||
|
||||
BOOL getColorBits(const struct wined3d_format_desc *format_desc,
|
||||
short *redSize, short *greenSize, short *blueSize, short *alphaSize, short *totalSize) DECLSPEC_HIDDEN;
|
||||
|
Loading…
Reference in New Issue
Block a user