cubetexture.c 18 KB
Newer Older
1
/*
2
 * IWineD3DCubeTexture implementation
3 4
 *
 * Copyright 2002-2005 Jason Edmeades
5 6
 * Copyright 2002-2005 Raphael Junqueira
 * Copyright 2005 Oliver Stieber
7 8 9 10 11 12 13 14 15 16 17 18 19
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 22 23 24 25 26
 */

#include "config.h"
#include "wined3d_private.h"

WINE_DEFAULT_DEBUG_CHANNEL(d3d);
27
#define GLINFO_LOCATION This->resource.wineD3DDevice->adapter->gl_info
28 29 30 31 32 33 34 35 36 37 38 39 40

static const GLenum cube_targets[6] = {
  GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB,
  GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB,
  GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB,
  GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB,
  GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB,
  GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
};

/* *******************************************
   IWineD3DCubeTexture IUnknown parts follow
   ******************************************* */
41
static HRESULT WINAPI IWineD3DCubeTextureImpl_QueryInterface(IWineD3DCubeTexture *iface, REFIID riid, LPVOID *ppobj)
42 43
{
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
44 45
    TRACE("(%p)->(%s,%p)\n",This,debugstr_guid(riid),ppobj);
    if (IsEqualGUID(riid, &IID_IUnknown)
46
        || IsEqualGUID(riid, &IID_IWineD3DBase)
47 48 49 50 51
        || IsEqualGUID(riid, &IID_IWineD3DResource)
        || IsEqualGUID(riid, &IID_IWineD3DBaseTexture)
        || IsEqualGUID(riid, &IID_IWineD3DTexture)) {
        IUnknown_AddRef(iface);
        *ppobj = This;
52
        return S_OK;
53
    }
54
    *ppobj = NULL;
55 56 57
    return E_NOINTERFACE;
}

58
static ULONG WINAPI IWineD3DCubeTextureImpl_AddRef(IWineD3DCubeTexture *iface) {
59
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
60
    TRACE("(%p) : AddRef increasing from %d\n", This, This->resource.ref);
61 62 63
    return InterlockedIncrement(&This->resource.ref);
}

64
static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DCubeTexture *iface) {
65 66
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
    ULONG ref;
67
    TRACE("(%p) : Releasing from %d\n", This, This->resource.ref);
68 69
    ref = InterlockedDecrement(&This->resource.ref);
    if (ref == 0) {
70
        IWineD3DCubeTexture_Destroy(iface, D3DCB_DefaultDestroySurface);
71 72 73 74 75 76 77
    }
    return ref;
}

/* ****************************************************
   IWineD3DCubeTexture IWineD3DResource parts follow
   **************************************************** */
78
static HRESULT WINAPI IWineD3DCubeTextureImpl_GetDevice(IWineD3DCubeTexture *iface, IWineD3DDevice** ppDevice) {
79 80 81
    return IWineD3DResourceImpl_GetDevice((IWineD3DResource *)iface, ppDevice);
}

82
static HRESULT WINAPI IWineD3DCubeTextureImpl_SetPrivateData(IWineD3DCubeTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
83 84 85
    return IWineD3DResourceImpl_SetPrivateData((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
}

86
static HRESULT WINAPI IWineD3DCubeTextureImpl_GetPrivateData(IWineD3DCubeTexture *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
87 88 89
    return IWineD3DResourceImpl_GetPrivateData((IWineD3DResource *)iface, refguid, pData, pSizeOfData);
}

90
static HRESULT WINAPI IWineD3DCubeTextureImpl_FreePrivateData(IWineD3DCubeTexture *iface, REFGUID refguid) {
91 92 93
    return IWineD3DResourceImpl_FreePrivateData((IWineD3DResource *)iface, refguid);
}

94
static DWORD WINAPI IWineD3DCubeTextureImpl_SetPriority(IWineD3DCubeTexture *iface, DWORD PriorityNew) {
95 96 97
    return IWineD3DResourceImpl_SetPriority((IWineD3DResource *)iface, PriorityNew);
}

98
static DWORD WINAPI IWineD3DCubeTextureImpl_GetPriority(IWineD3DCubeTexture *iface) {
99 100 101
    return IWineD3DResourceImpl_GetPriority((IWineD3DResource *)iface);
}

102
static void WINAPI IWineD3DCubeTextureImpl_PreLoad(IWineD3DCubeTexture *iface) {
103 104
    /* Override the IWineD3DResource Preload method */
    unsigned int i,j;
105
    BOOL setGlTextureDesc = FALSE;
106
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
107
    IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
108 109
    BOOL srgb_mode = This->baseTexture.is_srgb;
    BOOL srgb_was_toggled = FALSE;
110

111 112
    TRACE("(%p) : About to load texture: dirtified(%d)\n", This, This->baseTexture.dirty);

113 114
    if (This->baseTexture.textureName == 0)  setGlTextureDesc = TRUE;

115 116 117 118 119 120 121 122
    /* We only have to activate a context for gl when we're not drawing. In most cases PreLoad will be called during draw
     * and a context was activated at the beginning of drawPrimitive
     */
    if(!device->isInDraw) {
        /* No danger of recursive calls, ActivateContext sets isInDraw to true when loading
         * offscreen render targets into their texture
         */
        ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
123 124 125 126
    } else if (GL_SUPPORT(EXT_TEXTURE_SRGB) && This->baseTexture.bindCount > 0) {
        srgb_mode = device->stateBlock->samplerState[This->baseTexture.sampler][WINED3DSAMP_SRGBTEXTURE];
        srgb_was_toggled = (This->baseTexture.is_srgb != srgb_mode);
        This->baseTexture.is_srgb = srgb_mode;
127
    }
128
    IWineD3DCubeTexture_BindTexture(iface);
129

130
    ENTER_GL();
131
    /* If the texture is marked dirty or the srgb sampler setting has changed since the last load then reload the surfaces */
132
    if (This->baseTexture.dirty) {
133
        for (i = 0; i < This->baseTexture.levels; i++) {
134
            for (j = WINED3DCUBEMAP_FACE_POSITIVE_X; j <= WINED3DCUBEMAP_FACE_NEGATIVE_Z ; j++) {
135 136
                if(setGlTextureDesc)
                      IWineD3DSurface_SetGlTextureDesc(This->surfaces[j][i], This->baseTexture.textureName, cube_targets[j]);
137
                IWineD3DSurface_LoadTexture(This->surfaces[j][i], srgb_mode);
138
            }
139
        }
140 141 142 143 144 145 146 147 148 149 150
    } else if (srgb_was_toggled) {
        /* Loop is repeated in the else block with the extra AddDirtyRect line to avoid the alternative of
         * checking srgb_was_toggled in every iteration, even when the texture is just dirty
         */
        if (This->baseTexture.srgb_mode_change_count < 20)
            ++This->baseTexture.srgb_mode_change_count;
        else
            FIXME("Cubetexture (%p) has been reloaded at least 20 times due to WINED3DSAMP_SRGBTEXTURE changes on it\'s sampler\n", This);

        for (i = 0; i < This->baseTexture.levels; i++) {
            for (j = WINED3DCUBEMAP_FACE_POSITIVE_X; j <= WINED3DCUBEMAP_FACE_NEGATIVE_Z ; j++) {
151
                IWineD3DSurface_AddDirtyRect(This->surfaces[j][i], NULL);
152 153 154 155 156 157
                IWineD3DSurface_SetGlTextureDesc(This->surfaces[j][i], This->baseTexture.textureName, cube_targets[j]);
                IWineD3DSurface_LoadTexture(This->surfaces[j][i], srgb_mode);
            }
        }
    } else {
        TRACE("(%p) Texture not dirty, nothing to do\n" , iface);
158
    }
159
    LEAVE_GL();
160 161 162

    /* No longer dirty */
    This->baseTexture.dirty = FALSE;
163 164 165
    return ;
}

166
static WINED3DRESOURCETYPE WINAPI IWineD3DCubeTextureImpl_GetType(IWineD3DCubeTexture *iface) {
167 168 169
    return IWineD3DResourceImpl_GetType((IWineD3DResource *)iface);
}

170
static HRESULT WINAPI IWineD3DCubeTextureImpl_GetParent(IWineD3DCubeTexture *iface, IUnknown **pParent) {
171 172 173 174 175 176
    return IWineD3DResourceImpl_GetParent((IWineD3DResource *)iface, pParent);
}

/* ******************************************************
   IWineD3DCubeTexture IWineD3DBaseTexture parts follow
   ****************************************************** */
177
static DWORD WINAPI IWineD3DCubeTextureImpl_SetLOD(IWineD3DCubeTexture *iface, DWORD LODNew) {
178 179 180
    return IWineD3DBaseTextureImpl_SetLOD((IWineD3DBaseTexture *)iface, LODNew);
}

181
static DWORD WINAPI IWineD3DCubeTextureImpl_GetLOD(IWineD3DCubeTexture *iface) {
182 183 184
    return IWineD3DBaseTextureImpl_GetLOD((IWineD3DBaseTexture *)iface);
}

185
static DWORD WINAPI IWineD3DCubeTextureImpl_GetLevelCount(IWineD3DCubeTexture *iface) {
186 187 188
    return IWineD3DBaseTextureImpl_GetLevelCount((IWineD3DBaseTexture *)iface);
}

189
static HRESULT WINAPI IWineD3DCubeTextureImpl_SetAutoGenFilterType(IWineD3DCubeTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) {
190 191 192
  return IWineD3DBaseTextureImpl_SetAutoGenFilterType((IWineD3DBaseTexture *)iface, FilterType);
}

193
static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DCubeTextureImpl_GetAutoGenFilterType(IWineD3DCubeTexture *iface) {
194 195 196
  return IWineD3DBaseTextureImpl_GetAutoGenFilterType((IWineD3DBaseTexture *)iface);
}

197
static void WINAPI IWineD3DCubeTextureImpl_GenerateMipSubLevels(IWineD3DCubeTexture *iface) {
198
    IWineD3DBaseTextureImpl_GenerateMipSubLevels((IWineD3DBaseTexture *)iface);
199 200 201
}

/* Internal function, No d3d mapping */
202
static BOOL WINAPI IWineD3DCubeTextureImpl_SetDirty(IWineD3DCubeTexture *iface, BOOL dirty) {
203
    return IWineD3DBaseTextureImpl_SetDirty((IWineD3DBaseTexture *)iface, dirty);
204 205
}

206
/* Internal function, No d3d mapping */
207
static BOOL WINAPI IWineD3DCubeTextureImpl_GetDirty(IWineD3DCubeTexture *iface) {
208 209 210
    return IWineD3DBaseTextureImpl_GetDirty((IWineD3DBaseTexture *)iface);
}

211
static HRESULT WINAPI IWineD3DCubeTextureImpl_BindTexture(IWineD3DCubeTexture *iface) {
212
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
213
    TRACE("(%p) : relay to BaseTexture\n", This);
214
    return IWineD3DBaseTextureImpl_BindTexture((IWineD3DBaseTexture *)iface);
215 216
}

217
static HRESULT WINAPI IWineD3DCubeTextureImpl_UnBindTexture(IWineD3DCubeTexture *iface) {
218
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
219
    TRACE("(%p) : relay to BaseTexture\n", This);
220
    return IWineD3DBaseTextureImpl_UnBindTexture((IWineD3DBaseTexture *)iface);
221 222
}

223
static UINT WINAPI IWineD3DCubeTextureImpl_GetTextureDimensions(IWineD3DCubeTexture *iface){
224
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
225
    TRACE("(%p)\n", This);
226

227
    return GL_TEXTURE_CUBE_MAP_ARB;
228 229
}

230
static void WINAPI IWineD3DCubeTextureImpl_ApplyStateChanges(IWineD3DCubeTexture *iface, 
231 232
                                                        const DWORD textureStates[WINED3D_HIGHEST_TEXTURE_STATE + 1], 
                                                        const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1]) {
233 234
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
    float matrix[16];
235
    IWineD3DBaseTextureImpl_ApplyStateChanges((IWineD3DBaseTexture *)iface, textureStates, samplerStates);
236 237 238 239


    /* Apply non-power2 mappings and texture offsets so long as the texture coords aren't projected or generated */
    if(This->pow2scalingFactor != 1.0f) {
240
        if((textureStates[WINED3DTSS_TEXCOORDINDEX] & 0xFFFF0000) == WINED3DTSS_TCI_PASSTHRU &&
241 242
           (~textureStates[WINED3DTSS_TEXTURETRANSFORMFLAGS] & WINED3DTTFF_PROJECTED)) {

243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266
            glMatrixMode(GL_TEXTURE);
            memset(matrix, 0 , sizeof(matrix));

            matrix[0] = This->pow2scalingFactor;
            matrix[5] = This->pow2scalingFactor;
            matrix[10] = This->pow2scalingFactor;
#if 0 /* Translation fixup is no longer required (here for reminder) */
            matrix[12] = -0.25f / (float)This->edgeLength;
            matrix[13] = -0.75f / (float)This->edgeLength;
            matrix[14] = -0.25f / (float)This->edgeLength;
#endif
            TRACE("(%p) Setup Matrix:\n", This);
            TRACE(" %f %f %f %f\n", matrix[0], matrix[1], matrix[2], matrix[3]);
            TRACE(" %f %f %f %f\n", matrix[4], matrix[5], matrix[6], matrix[7]);
            TRACE(" %f %f %f %f\n", matrix[8], matrix[9], matrix[10], matrix[11]);
            TRACE(" %f %f %f %f\n", matrix[12], matrix[13], matrix[14], matrix[15]);
            TRACE("\n");
            glMultMatrixf(matrix);
        } else {
            /* I don't expect nonpower 2 textures to be used with generated texture coordinates, but if they are present a fixme. */
            FIXME("Non-power2 texture being used with generated texture coords\n");
        }
    }

267 268 269
}


270 271 272
/* *******************************************
   IWineD3DCubeTexture IWineD3DCubeTexture parts follow
   ******************************************* */
273 274
static void WINAPI IWineD3DCubeTextureImpl_Destroy(IWineD3DCubeTexture *iface, D3DCB_DESTROYSURFACEFN D3DCB_DestroySurface) {
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
275
    unsigned int i,j;
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
    TRACE("(%p) : Cleaning up\n",This);
    for (i = 0; i < This->baseTexture.levels; i++) {
        for (j = 0; j < 6; j++) {
            if (This->surfaces[j][i] != NULL) {
                /* Clean out the texture name we gave to the surface so that the surface doesn't try and release it */
                IWineD3DSurface_SetGlTextureDesc(This->surfaces[j][i], 0, 0);
                /* Cleanup the container */
                IWineD3DSurface_SetContainer(This->surfaces[j][i], 0);
                D3DCB_DestroySurface(This->surfaces[j][i]);
            }
        }
    }
    IWineD3DBaseTextureImpl_CleanUp((IWineD3DBaseTexture *) iface);
    /* finally delete the object */
    HeapFree(GetProcessHeap(), 0, This);
}

293
static HRESULT WINAPI IWineD3DCubeTextureImpl_GetLevelDesc(IWineD3DCubeTexture *iface, UINT Level, WINED3DSURFACE_DESC* pDesc) {
294
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
295

296 297
    if (Level < This->baseTexture.levels) {
        TRACE("(%p) level (%d)\n", This, Level);
298
        return IWineD3DSurface_GetDesc(This->surfaces[0][Level], pDesc);
299 300
    }
    FIXME("(%p) level(%d) overflow Levels(%d)\n", This, Level, This->baseTexture.levels);
301
    return WINED3DERR_INVALIDCALL;
302 303
}

304
static HRESULT WINAPI IWineD3DCubeTextureImpl_GetCubeMapSurface(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level, IWineD3DSurface** ppCubeMapSurface) {
305
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
306
    HRESULT hr = WINED3DERR_INVALIDCALL;
307

308
    if (Level < This->baseTexture.levels && FaceType >= WINED3DCUBEMAP_FACE_POSITIVE_X && FaceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z) {
309 310 311
        *ppCubeMapSurface = This->surfaces[FaceType][Level];
        IWineD3DSurface_AddRef(*ppCubeMapSurface);

312
        hr = WINED3D_OK;
313
    }
314
    if (WINED3D_OK == hr) {
315
        TRACE("(%p) -> faceType(%d) level(%d) returning surface@%p\n", This, FaceType, Level, This->surfaces[FaceType][Level]);
316
    } else {
317
        WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType);
318
    }
319 320

    return hr;
321 322
}

323
static HRESULT WINAPI IWineD3DCubeTextureImpl_LockRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level, WINED3DLOCKED_RECT* pLockedRect, CONST RECT* pRect, DWORD Flags) {
324
    HRESULT hr = WINED3DERR_INVALIDCALL;
325 326
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;

327
    if (Level < This->baseTexture.levels && FaceType >= WINED3DCUBEMAP_FACE_POSITIVE_X && FaceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z) {
328 329 330
        hr = IWineD3DSurface_LockRect(This->surfaces[FaceType][Level], pLockedRect, pRect, Flags);
    }

331
    if (WINED3D_OK == hr) {
332
        TRACE("(%p) -> faceType(%d) level(%d) returning memory@%p success(%u)\n", This, FaceType, Level, pLockedRect->pBits, hr);
333
    } else {
334
        WARN("(%p) level(%d) overflow Levels(%d)  Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType);
335
    }
336

337 338 339
    return hr;
}

340
static HRESULT WINAPI IWineD3DCubeTextureImpl_UnlockRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, UINT Level) {
341
    HRESULT hr = WINED3DERR_INVALIDCALL;
342 343
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;

344
    if (Level < This->baseTexture.levels && FaceType >= WINED3DCUBEMAP_FACE_POSITIVE_X && FaceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z) {
345
        hr = IWineD3DSurface_UnlockRect(This->surfaces[FaceType][Level]);
346 347
    }

348
    if (WINED3D_OK == hr) {
349
        TRACE("(%p) -> faceType(%d) level(%d) success(%u)\n", This, FaceType, Level, hr);
350
    } else {
351
        WARN("(%p) level(%d) overflow Levels(%d) Or FaceType(%d)\n", This, Level, This->baseTexture.levels, FaceType);
352 353 354 355
    }
    return hr;
}

356
static HRESULT  WINAPI IWineD3DCubeTextureImpl_AddDirtyRect(IWineD3DCubeTexture *iface, WINED3DCUBEMAP_FACES FaceType, CONST RECT* pDirtyRect) {
357
    HRESULT hr = WINED3DERR_INVALIDCALL;
358 359
    IWineD3DCubeTextureImpl *This = (IWineD3DCubeTextureImpl *)iface;
    This->baseTexture.dirty = TRUE;
360
    TRACE("(%p) : dirtyfication of faceType(%d) Level (0)\n", This, FaceType);
361
    if (FaceType >= WINED3DCUBEMAP_FACE_POSITIVE_X && FaceType <= WINED3DCUBEMAP_FACE_NEGATIVE_Z) {
362 363 364 365 366
        hr = IWineD3DSurface_AddDirtyRect(This->surfaces[FaceType][0], pDirtyRect);
    } else {
        WARN("(%p) overflow FaceType(%d)\n", This, FaceType);
    }
    return hr;
367 368 369
}


370
const IWineD3DCubeTextureVtbl IWineD3DCubeTexture_Vtbl =
371
{
372
    /* IUnknown */
373 374 375
    IWineD3DCubeTextureImpl_QueryInterface,
    IWineD3DCubeTextureImpl_AddRef,
    IWineD3DCubeTextureImpl_Release,
376
    /* IWineD3DResource */
377 378 379 380 381 382 383 384 385
    IWineD3DCubeTextureImpl_GetParent,
    IWineD3DCubeTextureImpl_GetDevice,
    IWineD3DCubeTextureImpl_SetPrivateData,
    IWineD3DCubeTextureImpl_GetPrivateData,
    IWineD3DCubeTextureImpl_FreePrivateData,
    IWineD3DCubeTextureImpl_SetPriority,
    IWineD3DCubeTextureImpl_GetPriority,
    IWineD3DCubeTextureImpl_PreLoad,
    IWineD3DCubeTextureImpl_GetType,
386
    /* IWineD3DBaseTexture */
387 388 389 390 391 392 393 394
    IWineD3DCubeTextureImpl_SetLOD,
    IWineD3DCubeTextureImpl_GetLOD,
    IWineD3DCubeTextureImpl_GetLevelCount,
    IWineD3DCubeTextureImpl_SetAutoGenFilterType,
    IWineD3DCubeTextureImpl_GetAutoGenFilterType,
    IWineD3DCubeTextureImpl_GenerateMipSubLevels,
    IWineD3DCubeTextureImpl_SetDirty,
    IWineD3DCubeTextureImpl_GetDirty,
395 396
    IWineD3DCubeTextureImpl_BindTexture,
    IWineD3DCubeTextureImpl_UnBindTexture,
397
    IWineD3DCubeTextureImpl_GetTextureDimensions,
398
    IWineD3DCubeTextureImpl_ApplyStateChanges,
399
    /* IWineD3DCubeTexture */
400
    IWineD3DCubeTextureImpl_Destroy,
401 402 403 404 405 406
    IWineD3DCubeTextureImpl_GetLevelDesc,
    IWineD3DCubeTextureImpl_GetCubeMapSurface,
    IWineD3DCubeTextureImpl_LockRect,
    IWineD3DCubeTextureImpl_UnlockRect,
    IWineD3DCubeTextureImpl_AddDirtyRect
};