volumetexture.c revision 3a343ca21a267ec3c54e2317e2ed18fe99b8ebbb
/*
* IWineD3DVolumeTexture implementation
*
* Copyright 2002-2005 Jason Edmeades
* Copyright 2002-2005 Raphael Junqueira
* Copyright 2005 Oliver Stieber
* Copyright 2009 Henri Verbeet for CodeWeavers
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#include "config.h"
#include "wined3d_private.h"
{
/* Override the IWineD3DResource Preload method. */
unsigned int i;
{
}
/* If the texture is marked dirty or the srgb sampler setting has changed
* since the last load then reload the volumes. */
{
{
}
}
else if (srgb_was_toggled)
{
{
}
}
else
{
}
/* No longer dirty */
}
{
unsigned int i;
{
if (volume)
{
/* Cleanup the container. */
}
}
}
/* *******************************************
IWineD3DTexture IUnknown parts follow
******************************************* */
static HRESULT WINAPI IWineD3DVolumeTextureImpl_QueryInterface(IWineD3DVolumeTexture *iface, REFIID riid, LPVOID *ppobj)
{
return S_OK;
}
return E_NOINTERFACE;
}
}
if (!ref)
{
}
return ref;
}
/* ****************************************************
IWineD3DVolumeTexture IWineD3DResource parts follow
**************************************************** */
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetPrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_FreePrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid) {
}
static DWORD WINAPI IWineD3DVolumeTextureImpl_SetPriority(IWineD3DVolumeTexture *iface, DWORD PriorityNew) {
}
}
}
unsigned int i;
/* 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
*/
}
}
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetParent(IWineD3DVolumeTexture *iface, IUnknown **pParent) {
}
/* ******************************************************
IWineD3DVolumeTexture IWineD3DBaseTexture parts follow
****************************************************** */
}
}
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetAutoGenFilterType(IWineD3DVolumeTexture *iface, WINED3DTEXTUREFILTERTYPE FilterType) {
}
static WINED3DTEXTUREFILTERTYPE WINAPI IWineD3DVolumeTextureImpl_GetAutoGenFilterType(IWineD3DVolumeTexture *iface) {
}
}
/* Internal function, No d3d mapping */
}
}
/* Context activation is done by the caller. */
static HRESULT WINAPI IWineD3DVolumeTextureImpl_BindTexture(IWineD3DVolumeTexture *iface, BOOL srgb)
{
}
{
return GL_TEXTURE_3D;
}
{
return FALSE;
}
/* *******************************************
IWineD3DVolumeTexture IWineD3DVolumeTexture parts follow
******************************************* */
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetLevelDesc(IWineD3DVolumeTexture *iface, UINT Level,WINED3DVOLUME_DESC *pDesc) {
} else {
}
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetVolumeLevel(IWineD3DVolumeTexture *iface, UINT Level, IWineD3DVolume** ppVolumeLevel) {
} else {
return WINED3DERR_INVALIDCALL;
}
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_LockBox(IWineD3DVolumeTexture *iface, UINT Level, WINED3DLOCKED_BOX* pLockedVolume, CONST WINED3DBOX* pBox, DWORD Flags) {
} else {
return WINED3DERR_INVALIDCALL;
}
return hr;
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_UnlockBox(IWineD3DVolumeTexture *iface, UINT Level) {
} else {
return WINED3DERR_INVALIDCALL;
}
return hr;
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_AddDirtyBox(IWineD3DVolumeTexture *iface, CONST WINED3DBOX* pDirtyBox) {
return WINED3D_OK;
}
static const IWineD3DVolumeTextureVtbl IWineD3DVolumeTexture_Vtbl =
{
/* IUnknown */
/* resource */
#ifdef VBOX_WITH_WDDM
#endif
/* BaseTexture */
/* not in d3d */
/* volume texture */
};
{
unsigned int i;
/* TODO: It should only be possible to create textures for formats
* that are reported as supported. */
if (WINED3DFMT_UNKNOWN >= format)
{
return WINED3DERR_INVALIDCALL;
}
{
return WINED3DERR_INVALIDCALL;
}
/* Calculate levels for mip mapping. */
if (usage & WINED3DUSAGE_AUTOGENMIPMAP)
{
{
WARN("No mipmap generation support, returning D3DERR_INVALIDCALL.\n");
return WINED3DERR_INVALIDCALL;
}
if (levels > 1)
{
WARN("D3DUSAGE_AUTOGENMIPMAP is set, and level count > 1, returning D3DERR_INVALIDCALL.\n");
return WINED3DERR_INVALIDCALL;
}
levels = 1;
}
else if (!levels)
{
}
#ifdef VBOX_WITH_WDDM
#endif
);
{
return hr;
}
/* Is NP2 support for volumes needed? */
/* Generate all the surfaces. */
{
/* Create the volume. */
{
return hr;
}
/* Set its container to this texture. */
/* Calculate the next mipmap level. */
}
return WINED3D_OK;
}