wined3d: Rename basetexture functions to reflect that they're not COM functions.

This commit is contained in:
Henri Verbeet 2008-12-02 18:41:32 +01:00 committed by Alexandre Julliard
parent 8c6495cc23
commit 4d60b6633c
5 changed files with 77 additions and 64 deletions

View File

@ -27,7 +27,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture); WINE_DEFAULT_DEBUG_CHANNEL(d3d_texture);
#define GLINFO_LOCATION This->resource.wineD3DDevice->adapter->gl_info #define GLINFO_LOCATION This->resource.wineD3DDevice->adapter->gl_info
void IWineD3DBaseTextureImpl_CleanUp(IWineD3DBaseTexture *iface) { void basetexture_cleanup(IWineD3DBaseTexture *iface)
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
@ -42,7 +43,8 @@ void IWineD3DBaseTextureImpl_CleanUp(IWineD3DBaseTexture *iface) {
IWineD3DResourceImpl_CleanUp((IWineD3DResource *)iface); IWineD3DResourceImpl_CleanUp((IWineD3DResource *)iface);
} }
void WINAPI IWineD3DBaseTextureImpl_UnLoad(IWineD3DBaseTexture *iface) { void basetexture_unload(IWineD3DBaseTexture *iface)
{
IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface; IWineD3DTextureImpl *This = (IWineD3DTextureImpl *)iface;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
@ -58,7 +60,8 @@ void WINAPI IWineD3DBaseTextureImpl_UnLoad(IWineD3DBaseTexture *iface
/* There is no OpenGL equivalent of setLOD, getLOD. All they do anyway is prioritize texture loading /* There is no OpenGL equivalent of setLOD, getLOD. All they do anyway is prioritize texture loading
* so just pretend that they work unless something really needs a failure. */ * so just pretend that they work unless something really needs a failure. */
DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew) { DWORD basetexture_set_lod(IWineD3DBaseTexture *iface, DWORD LODNew)
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
if (This->resource.pool != WINED3DPOOL_MANAGED) { if (This->resource.pool != WINED3DPOOL_MANAGED) {
@ -74,7 +77,8 @@ DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LO
return This->baseTexture.LOD; return This->baseTexture.LOD;
} }
DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface) { DWORD basetexture_get_lod(IWineD3DBaseTexture *iface)
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
if (This->resource.pool != WINED3DPOOL_MANAGED) { if (This->resource.pool != WINED3DPOOL_MANAGED) {
@ -86,13 +90,15 @@ DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface) {
return This->baseTexture.LOD; return This->baseTexture.LOD;
} }
DWORD WINAPI IWineD3DBaseTextureImpl_GetLevelCount(IWineD3DBaseTexture *iface) { DWORD basetexture_get_level_count(IWineD3DBaseTexture *iface)
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
TRACE("(%p) : returning %d\n", This, This->baseTexture.levels); TRACE("(%p) : returning %d\n", This, This->baseTexture.levels);
return This->baseTexture.levels; return This->baseTexture.levels;
} }
HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) { HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType)
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice; IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
UINT textureDimensions = IWineD3DBaseTexture_GetTextureDimensions(iface); UINT textureDimensions = IWineD3DBaseTexture_GetTextureDimensions(iface);
@ -134,7 +140,8 @@ HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture
return WINED3D_OK; return WINED3D_OK;
} }
WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DBaseTextureImpl_GetAutoGenFilterType(IWineD3DBaseTexture *iface) { WINED3DTEXTUREFILTERTYPE basetexture_get_autogen_filter_type(IWineD3DBaseTexture *iface)
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
FIXME("(%p) : stub\n", This); FIXME("(%p) : stub\n", This);
if (!(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)) { if (!(This->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)) {
@ -143,14 +150,16 @@ WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DBaseTextureImpl_GetAutoGenFilterType(IWi
return This->baseTexture.filterType; return This->baseTexture.filterType;
} }
void WINAPI IWineD3DBaseTextureImpl_GenerateMipSubLevels(IWineD3DBaseTexture *iface) { void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface)
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
/* TODO: implement filters using GL_SGI_generate_mipmaps http://oss.sgi.com/projects/ogl-sample/registry/SGIS/generate_mipmap.txt */ /* TODO: implement filters using GL_SGI_generate_mipmaps http://oss.sgi.com/projects/ogl-sample/registry/SGIS/generate_mipmap.txt */
FIXME("(%p) : stub\n", This); FIXME("(%p) : stub\n", This);
return ; return ;
} }
BOOL WINAPI IWineD3DBaseTextureImpl_SetDirty(IWineD3DBaseTexture *iface, BOOL dirty) { BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty)
{
BOOL old; BOOL old;
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
old = This->baseTexture.dirty; old = This->baseTexture.dirty;
@ -158,12 +167,14 @@ BOOL WINAPI IWineD3DBaseTextureImpl_SetDirty(IWineD3DBaseTexture *iface, BOOL di
return old; return old;
} }
BOOL WINAPI IWineD3DBaseTextureImpl_GetDirty(IWineD3DBaseTexture *iface) { BOOL basetexture_get_dirty(IWineD3DBaseTexture *iface)
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
return This->baseTexture.dirty; return This->baseTexture.dirty;
} }
HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface) { HRESULT basetexture_bind(IWineD3DBaseTexture *iface)
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
HRESULT hr = WINED3D_OK; HRESULT hr = WINED3D_OK;
UINT textureDimensions; UINT textureDimensions;
@ -272,9 +283,10 @@ static inline void apply_wrap(const GLint textureDimensions, const DWORD state,
} }
} }
void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface, void basetexture_apply_state_changes(IWineD3DBaseTexture *iface,
const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1],
const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) { const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1])
{
IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface; IWineD3DBaseTextureImpl *This = (IWineD3DBaseTextureImpl *)iface;
DWORD state; DWORD state;
GLint textureDimensions = IWineD3DBaseTexture_GetTextureDimensions(iface); GLint textureDimensions = IWineD3DBaseTexture_GetTextureDimensions(iface);

View File

@ -176,7 +176,7 @@ static void WINAPI IWineD3DCubeTextureImpl_UnLoad(IWineD3DCubeTexture *iface) {
} }
} }
IWineD3DBaseTextureImpl_UnLoad((IWineD3DBaseTexture *) iface); basetexture_unload((IWineD3DBaseTexture *)iface);
} }
static WINED3DRESOURCETYPE WINAPI IWineD3DCubeTextureImpl_GetType(IWineD3DCubeTexture *iface) { static WINED3DRESOURCETYPE WINAPI IWineD3DCubeTextureImpl_GetType(IWineD3DCubeTexture *iface) {
@ -191,37 +191,37 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_GetParent(IWineD3DCubeTexture *ifa
IWineD3DCubeTexture IWineD3DBaseTexture parts follow IWineD3DCubeTexture IWineD3DBaseTexture parts follow
****************************************************** */ ****************************************************** */
static DWORD WINAPI IWineD3DCubeTextureImpl_SetLOD(IWineD3DCubeTexture *iface, DWORD LODNew) { static DWORD WINAPI IWineD3DCubeTextureImpl_SetLOD(IWineD3DCubeTexture *iface, DWORD LODNew) {
return IWineD3DBaseTextureImpl_SetLOD((IWineD3DBaseTexture *)iface, LODNew); return basetexture_set_lod((IWineD3DBaseTexture *)iface, LODNew);
} }
static DWORD WINAPI IWineD3DCubeTextureImpl_GetLOD(IWineD3DCubeTexture *iface) { static DWORD WINAPI IWineD3DCubeTextureImpl_GetLOD(IWineD3DCubeTexture *iface) {
return IWineD3DBaseTextureImpl_GetLOD((IWineD3DBaseTexture *)iface); return basetexture_get_lod((IWineD3DBaseTexture *)iface);
} }
static DWORD WINAPI IWineD3DCubeTextureImpl_GetLevelCount(IWineD3DCubeTexture *iface) { static DWORD WINAPI IWineD3DCubeTextureImpl_GetLevelCount(IWineD3DCubeTexture *iface) {
return IWineD3DBaseTextureImpl_GetLevelCount((IWineD3DBaseTexture *)iface); return basetexture_get_level_count((IWineD3DBaseTexture *)iface);
} }
static HRESULT WINAPI IWineD3DCubeTextureImpl_SetAutoGenFilterType(IWineD3DCubeTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) { static HRESULT WINAPI IWineD3DCubeTextureImpl_SetAutoGenFilterType(IWineD3DCubeTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) {
return IWineD3DBaseTextureImpl_SetAutoGenFilterType((IWineD3DBaseTexture *)iface, FilterType); return basetexture_set_autogen_filter_type((IWineD3DBaseTexture *)iface, FilterType);
} }
static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DCubeTextureImpl_GetAutoGenFilterType(IWineD3DCubeTexture *iface) { static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DCubeTextureImpl_GetAutoGenFilterType(IWineD3DCubeTexture *iface) {
return IWineD3DBaseTextureImpl_GetAutoGenFilterType((IWineD3DBaseTexture *)iface); return basetexture_get_autogen_filter_type((IWineD3DBaseTexture *)iface);
} }
static void WINAPI IWineD3DCubeTextureImpl_GenerateMipSubLevels(IWineD3DCubeTexture *iface) { static void WINAPI IWineD3DCubeTextureImpl_GenerateMipSubLevels(IWineD3DCubeTexture *iface) {
IWineD3DBaseTextureImpl_GenerateMipSubLevels((IWineD3DBaseTexture *)iface); basetexture_generate_mipmaps((IWineD3DBaseTexture *)iface);
} }
/* Internal function, No d3d mapping */ /* Internal function, No d3d mapping */
static BOOL WINAPI IWineD3DCubeTextureImpl_SetDirty(IWineD3DCubeTexture *iface, BOOL dirty) { static BOOL WINAPI IWineD3DCubeTextureImpl_SetDirty(IWineD3DCubeTexture *iface, BOOL dirty) {
return IWineD3DBaseTextureImpl_SetDirty((IWineD3DBaseTexture *)iface, dirty); return basetexture_set_dirty((IWineD3DBaseTexture *)iface, dirty);
} }
/* Internal function, No d3d mapping */ /* Internal function, No d3d mapping */
static BOOL WINAPI IWineD3DCubeTextureImpl_GetDirty(IWineD3DCubeTexture *iface) { static BOOL WINAPI IWineD3DCubeTextureImpl_GetDirty(IWineD3DCubeTexture *iface) {
return IWineD3DBaseTextureImpl_GetDirty((IWineD3DBaseTexture *)iface); return basetexture_get_dirty((IWineD3DBaseTexture *)iface);
} }
static HRESULT WINAPI IWineD3DCubeTextureImpl_BindTexture(IWineD3DCubeTexture *iface) { static HRESULT WINAPI IWineD3DCubeTextureImpl_BindTexture(IWineD3DCubeTexture *iface) {
@ -231,7 +231,7 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_BindTexture(IWineD3DCubeTexture *i
TRACE("(%p) : relay to BaseTexture\n", This); TRACE("(%p) : relay to BaseTexture\n", This);
hr = IWineD3DBaseTextureImpl_BindTexture((IWineD3DBaseTexture *)iface); hr = basetexture_bind((IWineD3DBaseTexture *)iface);
if (set_gl_texture_desc && SUCCEEDED(hr)) { if (set_gl_texture_desc && SUCCEEDED(hr)) {
UINT i, j; UINT i, j;
for (i = 0; i < This->baseTexture.levels; ++i) { for (i = 0; i < This->baseTexture.levels; ++i) {
@ -262,7 +262,7 @@ static void WINAPI IWineD3DCubeTextureImpl_ApplyStateChanges(IWineD3DCubeTexture
const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1],
const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) { const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) {
TRACE("(%p) : relay to BaseTexture\n", iface); TRACE("(%p) : relay to BaseTexture\n", iface);
IWineD3DBaseTextureImpl_ApplyStateChanges((IWineD3DBaseTexture *)iface, textureStates, samplerStates); basetexture_apply_state_changes((IWineD3DBaseTexture *)iface, textureStates, samplerStates);
} }
@ -286,7 +286,7 @@ static void WINAPI IWineD3DCubeTextureImpl_Destroy(IWineD3DCubeTexture *iface, D
} }
} }
} }
IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *) iface); basetexture_cleanup((IWineD3DBaseTexture *)iface);
/* finally delete the object */ /* finally delete the object */
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
} }

View File

@ -165,7 +165,7 @@ static void WINAPI IWineD3DTextureImpl_UnLoad(IWineD3DTexture *iface) {
surface_set_texture_name(This->surfaces[i], 0); surface_set_texture_name(This->surfaces[i], 0);
} }
IWineD3DBaseTextureImpl_UnLoad((IWineD3DBaseTexture *) iface); basetexture_unload((IWineD3DBaseTexture *)iface);
} }
static WINED3DRESOURCETYPE WINAPI IWineD3DTextureImpl_GetType(IWineD3DTexture *iface) { static WINED3DRESOURCETYPE WINAPI IWineD3DTextureImpl_GetType(IWineD3DTexture *iface) {
@ -180,36 +180,36 @@ static HRESULT WINAPI IWineD3DTextureImpl_GetParent(IWineD3DTexture *iface, IUnk
IWineD3DTexture IWineD3DBaseTexture parts follow IWineD3DTexture IWineD3DBaseTexture parts follow
****************************************************** */ ****************************************************** */
static DWORD WINAPI IWineD3DTextureImpl_SetLOD(IWineD3DTexture *iface, DWORD LODNew) { static DWORD WINAPI IWineD3DTextureImpl_SetLOD(IWineD3DTexture *iface, DWORD LODNew) {
return IWineD3DBaseTextureImpl_SetLOD((IWineD3DBaseTexture *)iface, LODNew); return basetexture_set_lod((IWineD3DBaseTexture *)iface, LODNew);
} }
static DWORD WINAPI IWineD3DTextureImpl_GetLOD(IWineD3DTexture *iface) { static DWORD WINAPI IWineD3DTextureImpl_GetLOD(IWineD3DTexture *iface) {
return IWineD3DBaseTextureImpl_GetLOD((IWineD3DBaseTexture *)iface); return basetexture_get_lod((IWineD3DBaseTexture *)iface);
} }
static DWORD WINAPI IWineD3DTextureImpl_GetLevelCount(IWineD3DTexture *iface) { static DWORD WINAPI IWineD3DTextureImpl_GetLevelCount(IWineD3DTexture *iface) {
return IWineD3DBaseTextureImpl_GetLevelCount((IWineD3DBaseTexture *)iface); return basetexture_get_level_count((IWineD3DBaseTexture *)iface);
} }
static HRESULT WINAPI IWineD3DTextureImpl_SetAutoGenFilterType(IWineD3DTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) { static HRESULT WINAPI IWineD3DTextureImpl_SetAutoGenFilterType(IWineD3DTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) {
return IWineD3DBaseTextureImpl_SetAutoGenFilterType((IWineD3DBaseTexture *)iface, FilterType); return basetexture_set_autogen_filter_type((IWineD3DBaseTexture *)iface, FilterType);
} }
static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DTextureImpl_GetAutoGenFilterType(IWineD3DTexture *iface) { static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DTextureImpl_GetAutoGenFilterType(IWineD3DTexture *iface) {
return IWineD3DBaseTextureImpl_GetAutoGenFilterType((IWineD3DBaseTexture *)iface); return basetexture_get_autogen_filter_type((IWineD3DBaseTexture *)iface);
} }
static void WINAPI IWineD3DTextureImpl_GenerateMipSubLevels(IWineD3DTexture *iface) { static void WINAPI IWineD3DTextureImpl_GenerateMipSubLevels(IWineD3DTexture *iface) {
IWineD3DBaseTextureImpl_GenerateMipSubLevels((IWineD3DBaseTexture *)iface); basetexture_generate_mipmaps((IWineD3DBaseTexture *)iface);
} }
/* Internal function, No d3d mapping */ /* Internal function, No d3d mapping */
static BOOL WINAPI IWineD3DTextureImpl_SetDirty(IWineD3DTexture *iface, BOOL dirty) { static BOOL WINAPI IWineD3DTextureImpl_SetDirty(IWineD3DTexture *iface, BOOL dirty) {
return IWineD3DBaseTextureImpl_SetDirty((IWineD3DBaseTexture *)iface, dirty); return basetexture_set_dirty((IWineD3DBaseTexture *)iface, dirty);
} }
static BOOL WINAPI IWineD3DTextureImpl_GetDirty(IWineD3DTexture *iface) { static BOOL WINAPI IWineD3DTextureImpl_GetDirty(IWineD3DTexture *iface) {
return IWineD3DBaseTextureImpl_GetDirty((IWineD3DBaseTexture *)iface); return basetexture_get_dirty((IWineD3DBaseTexture *)iface);
} }
static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface) { static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface) {
@ -219,7 +219,7 @@ static HRESULT WINAPI IWineD3DTextureImpl_BindTexture(IWineD3DTexture *iface) {
TRACE("(%p) : relay to BaseTexture\n", This); TRACE("(%p) : relay to BaseTexture\n", This);
hr = IWineD3DBaseTextureImpl_BindTexture((IWineD3DBaseTexture *)iface); hr = basetexture_bind((IWineD3DBaseTexture *)iface);
if (set_gl_texture_desc && SUCCEEDED(hr)) { if (set_gl_texture_desc && SUCCEEDED(hr)) {
UINT i; UINT i;
for (i = 0; i < This->baseTexture.levels; ++i) { for (i = 0; i < This->baseTexture.levels; ++i) {
@ -270,7 +270,7 @@ static void WINAPI IWineD3DTextureImpl_ApplyStateChanges(IWineD3DTexture *iface,
const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1],
const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) { const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) {
TRACE("(%p) : relay to BaseTexture\n", iface); TRACE("(%p) : relay to BaseTexture\n", iface);
IWineD3DBaseTextureImpl_ApplyStateChanges((IWineD3DBaseTexture *)iface, textureStates, samplerStates); basetexture_apply_state_changes((IWineD3DBaseTexture *)iface, textureStates, samplerStates);
} }
/* ******************************************* /* *******************************************
@ -291,7 +291,7 @@ static void WINAPI IWineD3DTextureImpl_Destroy(IWineD3DTexture *iface, D3DCB_DES
} }
} }
TRACE("(%p) : cleaning up base texture\n", This); TRACE("(%p) : cleaning up base texture\n", This);
IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *)iface); basetexture_cleanup((IWineD3DBaseTexture *)iface);
/* free the object */ /* free the object */
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
} }

View File

@ -145,7 +145,7 @@ static void WINAPI IWineD3DVolumeTextureImpl_UnLoad(IWineD3DVolumeTexture *iface
IWineD3DVolume_UnLoad(This->volumes[i]); IWineD3DVolume_UnLoad(This->volumes[i]);
} }
IWineD3DBaseTextureImpl_UnLoad((IWineD3DBaseTexture *) iface); basetexture_unload((IWineD3DBaseTexture *)iface);
} }
static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DVolumeTexture *iface) { static WINED3DRESOURCETYPE WINAPI IWineD3DVolumeTextureImpl_GetType(IWineD3DVolumeTexture *iface) {
@ -160,42 +160,42 @@ static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetParent(IWineD3DVolumeTexture
IWineD3DVolumeTexture IWineD3DBaseTexture parts follow IWineD3DVolumeTexture IWineD3DBaseTexture parts follow
****************************************************** */ ****************************************************** */
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetLOD(IWineD3DVolumeTexture *iface, DWORD LODNew) { static DWORD WINAPI IWineD3DVolumeTextureImpl_SetLOD(IWineD3DVolumeTexture *iface, DWORD LODNew) {
return IWineD3DBaseTextureImpl_SetLOD((IWineD3DBaseTexture *)iface, LODNew); return basetexture_set_lod((IWineD3DBaseTexture *)iface, LODNew);
} }
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLOD(IWineD3DVolumeTexture *iface) { static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLOD(IWineD3DVolumeTexture *iface) {
return IWineD3DBaseTextureImpl_GetLOD((IWineD3DBaseTexture *)iface); return basetexture_get_lod((IWineD3DBaseTexture *)iface);
} }
static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLevelCount(IWineD3DVolumeTexture *iface) { static DWORD WINAPI IWineD3DVolumeTextureImpl_GetLevelCount(IWineD3DVolumeTexture *iface) {
return IWineD3DBaseTextureImpl_GetLevelCount((IWineD3DBaseTexture *)iface); return basetexture_get_level_count((IWineD3DBaseTexture *)iface);
} }
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetAutoGenFilterType(IWineD3DVolumeTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) { static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetAutoGenFilterType(IWineD3DVolumeTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) {
return IWineD3DBaseTextureImpl_SetAutoGenFilterType((IWineD3DBaseTexture *)iface, FilterType); return basetexture_set_autogen_filter_type((IWineD3DBaseTexture *)iface, FilterType);
} }
static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DVolumeTextureImpl_GetAutoGenFilterType(IWineD3DVolumeTexture *iface) { static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DVolumeTextureImpl_GetAutoGenFilterType(IWineD3DVolumeTexture *iface) {
return IWineD3DBaseTextureImpl_GetAutoGenFilterType((IWineD3DBaseTexture *)iface); return basetexture_get_autogen_filter_type((IWineD3DBaseTexture *)iface);
} }
static void WINAPI IWineD3DVolumeTextureImpl_GenerateMipSubLevels(IWineD3DVolumeTexture *iface) { static void WINAPI IWineD3DVolumeTextureImpl_GenerateMipSubLevels(IWineD3DVolumeTexture *iface) {
IWineD3DBaseTextureImpl_GenerateMipSubLevels((IWineD3DBaseTexture *)iface); basetexture_generate_mipmaps((IWineD3DBaseTexture *)iface);
} }
/* Internal function, No d3d mapping */ /* Internal function, No d3d mapping */
static BOOL WINAPI IWineD3DVolumeTextureImpl_SetDirty(IWineD3DVolumeTexture *iface, BOOL dirty) { static BOOL WINAPI IWineD3DVolumeTextureImpl_SetDirty(IWineD3DVolumeTexture *iface, BOOL dirty) {
return IWineD3DBaseTextureImpl_SetDirty((IWineD3DBaseTexture *)iface, dirty); return basetexture_set_dirty((IWineD3DBaseTexture *)iface, dirty);
} }
static BOOL WINAPI IWineD3DVolumeTextureImpl_GetDirty(IWineD3DVolumeTexture *iface) { static BOOL WINAPI IWineD3DVolumeTextureImpl_GetDirty(IWineD3DVolumeTexture *iface) {
return IWineD3DBaseTextureImpl_GetDirty((IWineD3DBaseTexture *)iface); return basetexture_get_dirty((IWineD3DBaseTexture *)iface);
} }
static HRESULT WINAPI IWineD3DVolumeTextureImpl_BindTexture(IWineD3DVolumeTexture *iface) { static HRESULT WINAPI IWineD3DVolumeTextureImpl_BindTexture(IWineD3DVolumeTexture *iface) {
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
TRACE("(%p) : relay to BaseTexture\n", This); TRACE("(%p) : relay to BaseTexture\n", This);
return IWineD3DBaseTextureImpl_BindTexture((IWineD3DBaseTexture *)iface); return basetexture_bind((IWineD3DBaseTexture *)iface);
} }
static UINT WINAPI IWineD3DVolumeTextureImpl_GetTextureDimensions(IWineD3DVolumeTexture *iface) { static UINT WINAPI IWineD3DVolumeTextureImpl_GetTextureDimensions(IWineD3DVolumeTexture *iface) {
@ -216,7 +216,7 @@ static void WINAPI IWineD3DVolumeTextureImpl_ApplyStateChanges(IWineD3DVolumeTex
const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) { const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) {
IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface; IWineD3DVolumeTextureImpl *This = (IWineD3DVolumeTextureImpl *)iface;
TRACE("(%p) : nothing to do, passing to base texture\n", This); TRACE("(%p) : nothing to do, passing to base texture\n", This);
IWineD3DBaseTextureImpl_ApplyStateChanges((IWineD3DBaseTexture *)iface, textureStates, samplerStates); basetexture_apply_state_changes((IWineD3DBaseTexture *)iface, textureStates, samplerStates);
} }
@ -234,7 +234,7 @@ static void WINAPI IWineD3DVolumeTextureImpl_Destroy(IWineD3DVolumeTexture *ifac
D3DCB_DestroyVolume(This->volumes[i]); D3DCB_DestroyVolume(This->volumes[i]);
} }
} }
IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *) iface); basetexture_cleanup((IWineD3DBaseTexture *)iface);
HeapFree(GetProcessHeap(), 0, This); HeapFree(GetProcessHeap(), 0, This);
} }

View File

@ -1243,6 +1243,21 @@ typedef struct IWineD3DBaseTextureImpl
} IWineD3DBaseTextureImpl; } IWineD3DBaseTextureImpl;
void basetexture_apply_state_changes(IWineD3DBaseTexture *iface,
const DWORD texture_states[WINED3D_HIGHEST_TEXTURE_STATE + 1],
const DWORD sampler_states[WINED3D_HIGHEST_SAMPLER_STATE + 1]);
HRESULT basetexture_bind(IWineD3DBaseTexture *iface);
void basetexture_cleanup(IWineD3DBaseTexture *iface);
void basetexture_generate_mipmaps(IWineD3DBaseTexture *iface);
WINED3DTEXTUREFILTERTYPE basetexture_get_autogen_filter_type(IWineD3DBaseTexture *iface);
BOOL basetexture_get_dirty(IWineD3DBaseTexture *iface);
DWORD basetexture_get_level_count(IWineD3DBaseTexture *iface);
DWORD basetexture_get_lod(IWineD3DBaseTexture *iface);
HRESULT basetexture_set_autogen_filter_type(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE filter_type);
BOOL basetexture_set_dirty(IWineD3DBaseTexture *iface, BOOL dirty);
DWORD basetexture_set_lod(IWineD3DBaseTexture *iface, DWORD new_lod);
void basetexture_unload(IWineD3DBaseTexture *iface);
/***************************************************************************** /*****************************************************************************
* IWineD3DTexture implementation structure (extends IWineD3DBaseTextureImpl) * IWineD3DTexture implementation structure (extends IWineD3DBaseTextureImpl)
*/ */
@ -1942,20 +1957,6 @@ unsigned int count_bits(unsigned int mask);
extern WINED3DRESOURCETYPE WINAPI IWineD3DResourceImpl_GetType(IWineD3DResource *iface); extern WINED3DRESOURCETYPE WINAPI IWineD3DResourceImpl_GetType(IWineD3DResource *iface);
void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface); void IWineD3DResourceImpl_CleanUp(IWineD3DResource *iface);
/* IWineD3DBaseTexture */
void IWineD3DBaseTextureImpl_CleanUp(IWineD3DBaseTexture *iface);
extern void WINAPI IWineD3DBaseTextureImpl_UnLoad(IWineD3DBaseTexture *iface);
extern DWORD WINAPI IWineD3DBaseTextureImpl_SetLOD(IWineD3DBaseTexture *iface, DWORD LODNew);
extern DWORD WINAPI IWineD3DBaseTextureImpl_GetLOD(IWineD3DBaseTexture *iface);
extern DWORD WINAPI IWineD3DBaseTextureImpl_GetLevelCount(IWineD3DBaseTexture *iface);
extern HRESULT WINAPI IWineD3DBaseTextureImpl_SetAutoGenFilterType(IWineD3DBaseTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType);
extern WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DBaseTextureImpl_GetAutoGenFilterType(IWineD3DBaseTexture *iface);
extern void WINAPI IWineD3DBaseTextureImpl_GenerateMipSubLevels(IWineD3DBaseTexture *iface);
extern BOOL WINAPI IWineD3DBaseTextureImpl_SetDirty(IWineD3DBaseTexture *iface, BOOL);
extern BOOL WINAPI IWineD3DBaseTextureImpl_GetDirty(IWineD3DBaseTexture *iface);
extern HRESULT WINAPI IWineD3DBaseTextureImpl_BindTexture(IWineD3DBaseTexture *iface);
extern void WINAPI IWineD3DBaseTextureImpl_ApplyStateChanges(IWineD3DBaseTexture *iface, const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]);
/* IWineD3DVertexBuffer */ /* IWineD3DVertexBuffer */
extern const BYTE *IWineD3DVertexBufferImpl_GetMemory(IWineD3DVertexBuffer* iface, DWORD iOffset, GLint *vbo); extern const BYTE *IWineD3DVertexBufferImpl_GetMemory(IWineD3DVertexBuffer* iface, DWORD iOffset, GLint *vbo);