Add support for cubemap rendertarget textures on D3D9.
(OpenGL still needs to be done). Example will follow. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5627 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
f41aad6c6d
commit
b795ba324b
@ -15,6 +15,17 @@ namespace video
|
|||||||
{
|
{
|
||||||
class ITexture;
|
class ITexture;
|
||||||
|
|
||||||
|
//! Enumeration of cube texture surfaces
|
||||||
|
enum E_CUBE_SURFACE
|
||||||
|
{
|
||||||
|
ECS_POSX = 0,
|
||||||
|
ECS_NEGX,
|
||||||
|
ECS_POSY,
|
||||||
|
ECS_NEGY,
|
||||||
|
ECS_POSZ,
|
||||||
|
ECS_NEGZ
|
||||||
|
};
|
||||||
|
|
||||||
//! Interface of a Render Target.
|
//! Interface of a Render Target.
|
||||||
class IRenderTarget : public virtual IReferenceCounted
|
class IRenderTarget : public virtual IReferenceCounted
|
||||||
{
|
{
|
||||||
@ -41,8 +52,10 @@ namespace video
|
|||||||
/** Set multiple textures for the render target.
|
/** Set multiple textures for the render target.
|
||||||
\param texture Array of texture objects. These textures are used for a color outputs.
|
\param texture Array of texture objects. These textures are used for a color outputs.
|
||||||
\param depthStencil Depth or packed depth-stencil texture. This texture is used as depth
|
\param depthStencil Depth or packed depth-stencil texture. This texture is used as depth
|
||||||
or depth-stencil buffer. */
|
or depth-stencil buffer.
|
||||||
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil) = 0;
|
\param cubeSurfaces When rendering to cube textures, set the surface to be used for each texture. Can be empty otherwise.
|
||||||
|
*/
|
||||||
|
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces = core::array<E_CUBE_SURFACE>()) = 0;
|
||||||
|
|
||||||
//! Set one texture.
|
//! Set one texture.
|
||||||
void setTexture(ITexture* texture, ITexture* depthStencil)
|
void setTexture(ITexture* texture, ITexture* depthStencil)
|
||||||
@ -53,6 +66,18 @@ namespace video
|
|||||||
setTexture(textureArray, depthStencil);
|
setTexture(textureArray, depthStencil);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Set one cube surface texture.
|
||||||
|
void setTexture(ITexture* texture, ITexture* depthStencil, E_CUBE_SURFACE cubeSurface)
|
||||||
|
{
|
||||||
|
core::array<ITexture*> textureArray(1);
|
||||||
|
textureArray.push_back(texture);
|
||||||
|
|
||||||
|
core::array<E_CUBE_SURFACE> cubeSurfaces(1);
|
||||||
|
cubeSurfaces.push_back(cubeSurface);
|
||||||
|
|
||||||
|
setTexture(textureArray, depthStencil, cubeSurfaces);
|
||||||
|
}
|
||||||
|
|
||||||
//! Get driver type of render target.
|
//! Get driver type of render target.
|
||||||
E_DRIVER_TYPE getDriverType() const
|
E_DRIVER_TYPE getDriverType() const
|
||||||
{
|
{
|
||||||
@ -67,6 +92,9 @@ namespace video
|
|||||||
//! Depth or packed depth-stencil texture assigned to render target.
|
//! Depth or packed depth-stencil texture assigned to render target.
|
||||||
ITexture* DepthStencil;
|
ITexture* DepthStencil;
|
||||||
|
|
||||||
|
//! Active surface of cube textures
|
||||||
|
core::array<E_CUBE_SURFACE> CubeSurfaces;
|
||||||
|
|
||||||
//! Driver type of render target.
|
//! Driver type of render target.
|
||||||
E_DRIVER_TYPE DriverType;
|
E_DRIVER_TYPE DriverType;
|
||||||
|
|
||||||
|
@ -391,6 +391,18 @@ namespace video
|
|||||||
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
|
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
|
||||||
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
|
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
|
||||||
|
|
||||||
|
//! Adds a new render target texture with 6 sides for a cubemap map to the texture cache.
|
||||||
|
/** NOTE: Only supported on D3D9 so far.
|
||||||
|
\param sideLen Length of one cubemap side.
|
||||||
|
\param name A name for the texture. Later calls of getTexture() with this name will return this texture.
|
||||||
|
The name can _not_ be empty.
|
||||||
|
\param format The color format of the render target. Floating point formats are supported.
|
||||||
|
\return Pointer to the created texture or 0 if the texture
|
||||||
|
could not be created. This pointer should not be dropped. See
|
||||||
|
IReferenceCounted::drop() for more information. */
|
||||||
|
virtual ITexture* addRenderTargetTextureCubemap(const irr::u32 sideLen,
|
||||||
|
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
|
||||||
|
|
||||||
//! Removes a texture from the texture cache and deletes it.
|
//! Removes a texture from the texture cache and deletes it.
|
||||||
/** This method can free a lot of memory!
|
/** This method can free a lot of memory!
|
||||||
Please note that after calling this, the pointer to the
|
Please note that after calling this, the pointer to the
|
||||||
|
@ -3221,7 +3221,7 @@ ITexture* CD3D9Driver::addRenderTargetTexture(const core::dimension2d<u32>& size
|
|||||||
const io::path& name,
|
const io::path& name,
|
||||||
const ECOLOR_FORMAT format)
|
const ECOLOR_FORMAT format)
|
||||||
{
|
{
|
||||||
CD3D9Texture* tex = new CD3D9Texture(this, size, name, format);
|
CD3D9Texture* tex = new CD3D9Texture(this, size, name, ETT_2D, format);
|
||||||
if (tex)
|
if (tex)
|
||||||
{
|
{
|
||||||
if (!tex->Texture)
|
if (!tex->Texture)
|
||||||
@ -3236,6 +3236,24 @@ ITexture* CD3D9Driver::addRenderTargetTexture(const core::dimension2d<u32>& size
|
|||||||
return tex;
|
return tex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ITexture* CD3D9Driver::addRenderTargetTextureCubemap(const irr::u32 sideLen,
|
||||||
|
const io::path& name, const ECOLOR_FORMAT format)
|
||||||
|
{
|
||||||
|
CD3D9Texture* tex = new CD3D9Texture(this, core::dimension2d<u32>(sideLen, sideLen), name, ETT_CUBEMAP, format);
|
||||||
|
if (tex)
|
||||||
|
{
|
||||||
|
if (!tex->CubeTexture)
|
||||||
|
{
|
||||||
|
tex->drop();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
addTexture(tex);
|
||||||
|
tex->drop();
|
||||||
|
}
|
||||||
|
return tex;
|
||||||
|
}
|
||||||
|
|
||||||
void CD3D9Driver::clearBuffers(u16 flag, SColor color, f32 depth, u8 stencil)
|
void CD3D9Driver::clearBuffers(u16 flag, SColor color, f32 depth, u8 stencil)
|
||||||
{
|
{
|
||||||
DWORD internalFlag = 0;
|
DWORD internalFlag = 0;
|
||||||
|
@ -266,6 +266,10 @@ namespace video
|
|||||||
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
|
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
|
||||||
const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN) _IRR_OVERRIDE_;
|
const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN) _IRR_OVERRIDE_;
|
||||||
|
|
||||||
|
//! Creates a render target texture for a cubemap
|
||||||
|
ITexture* addRenderTargetTextureCubemap(const irr::u32 sideLen,
|
||||||
|
const io::path& name, const ECOLOR_FORMAT format) _IRR_OVERRIDE_;
|
||||||
|
|
||||||
virtual void clearBuffers(u16 flag, SColor color = SColor(255,0,0,0), f32 depth = 1.f, u8 stencil = 0) _IRR_OVERRIDE_;
|
virtual void clearBuffers(u16 flag, SColor color = SColor(255,0,0,0), f32 depth = 1.f, u8 stencil = 0) _IRR_OVERRIDE_;
|
||||||
|
|
||||||
//! Returns an image created from the last rendered frame.
|
//! Returns an image created from the last rendered frame.
|
||||||
|
@ -49,9 +49,9 @@ namespace irr
|
|||||||
DepthStencil->drop();
|
DepthStencil->drop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CD3D9RenderTarget::setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil)
|
void CD3D9RenderTarget::setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces)
|
||||||
{
|
{
|
||||||
bool textureUpdate = (Texture != texture) ? true : false;
|
bool textureUpdate = (Texture != texture) || (CubeSurfaces != cubeSurfaces) ? true : false;
|
||||||
bool depthStencilUpdate = (DepthStencil != depthStencil) ? true : false;
|
bool depthStencilUpdate = (DepthStencil != depthStencil) ? true : false;
|
||||||
|
|
||||||
if (textureUpdate || depthStencilUpdate)
|
if (textureUpdate || depthStencilUpdate)
|
||||||
@ -60,6 +60,8 @@ namespace irr
|
|||||||
|
|
||||||
if (textureUpdate)
|
if (textureUpdate)
|
||||||
{
|
{
|
||||||
|
CubeSurfaces = cubeSurfaces;
|
||||||
|
|
||||||
if (texture.size() > Driver->ActiveRenderTarget.size())
|
if (texture.size() > Driver->ActiveRenderTarget.size())
|
||||||
{
|
{
|
||||||
core::stringc message = "This GPU supports up to ";
|
core::stringc message = "This GPU supports up to ";
|
||||||
@ -92,13 +94,15 @@ namespace irr
|
|||||||
CD3D9Texture* currentTexture = (texture[i] && texture[i]->getDriverType() == DriverType) ? static_cast<CD3D9Texture*>(texture[i]) : 0;
|
CD3D9Texture* currentTexture = (texture[i] && texture[i]->getDriverType() == DriverType) ? static_cast<CD3D9Texture*>(texture[i]) : 0;
|
||||||
|
|
||||||
IDirect3DTexture9* textureID = 0;
|
IDirect3DTexture9* textureID = 0;
|
||||||
|
IDirect3DCubeTexture9* cubeTextureId = 0;
|
||||||
|
UINT level = 0; // no support for rendering to to other mip-levels so far
|
||||||
|
|
||||||
if (currentTexture)
|
if (currentTexture)
|
||||||
{
|
{
|
||||||
if (currentTexture->getType() == ETT_2D)
|
if (currentTexture->getType() == ETT_2D)
|
||||||
textureID = currentTexture->getDX9Texture();
|
textureID = currentTexture->getDX9Texture();
|
||||||
else
|
else if ( currentTexture->getType() == ETT_CUBEMAP )
|
||||||
os::Printer::log("This driver doesn't support render to cubemaps.", ELL_WARNING);
|
cubeTextureId = currentTexture->getDX9CubeTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (textureID)
|
if (textureID)
|
||||||
@ -107,7 +111,18 @@ namespace irr
|
|||||||
Texture[i]->grab();
|
Texture[i]->grab();
|
||||||
|
|
||||||
IDirect3DSurface9* currentSurface = 0;
|
IDirect3DSurface9* currentSurface = 0;
|
||||||
textureID->GetSurfaceLevel(0, ¤tSurface);
|
textureID->GetSurfaceLevel(level, ¤tSurface);
|
||||||
|
|
||||||
|
Surface[i] = currentSurface;
|
||||||
|
}
|
||||||
|
else if ( cubeTextureId )
|
||||||
|
{
|
||||||
|
Texture[i] = texture[i];
|
||||||
|
Texture[i]->grab();
|
||||||
|
|
||||||
|
IDirect3DSurface9* currentSurface = 0;
|
||||||
|
D3DCUBEMAP_FACES face = (D3DCUBEMAP_FACES)CubeSurfaces[i]; // we use same numbering
|
||||||
|
cubeTextureId->GetCubeMapSurface(face, level, ¤tSurface);
|
||||||
|
|
||||||
Surface[i] = currentSurface;
|
Surface[i] = currentSurface;
|
||||||
}
|
}
|
||||||
@ -146,7 +161,7 @@ namespace irr
|
|||||||
if (currentTexture->getType() == ETT_2D)
|
if (currentTexture->getType() == ETT_2D)
|
||||||
textureID = currentTexture->getDX9Texture();
|
textureID = currentTexture->getDX9Texture();
|
||||||
else
|
else
|
||||||
os::Printer::log("This driver doesn't support render to cubemaps.", ELL_WARNING);
|
os::Printer::log("This driver doesn't support depth/stencil to cubemaps.", ELL_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (textureID)
|
if (textureID)
|
||||||
|
@ -29,7 +29,7 @@ namespace irr
|
|||||||
CD3D9RenderTarget(CD3D9Driver* driver);
|
CD3D9RenderTarget(CD3D9Driver* driver);
|
||||||
virtual ~CD3D9RenderTarget();
|
virtual ~CD3D9RenderTarget();
|
||||||
|
|
||||||
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil) _IRR_OVERRIDE_;
|
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces) _IRR_OVERRIDE_;
|
||||||
|
|
||||||
const core::dimension2d<u32>& getSize() const;
|
const core::dimension2d<u32>& getSize() const;
|
||||||
|
|
||||||
|
@ -74,10 +74,10 @@ CD3D9Texture::CD3D9Texture(const io::path& name, const core::array<IImage*>& ima
|
|||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case ETT_2D:
|
case ETT_2D:
|
||||||
Device->CreateTexture(Size.Width, Size.Height, HasMipMaps ? 0 : 1, flags, InternalFormat, D3DPOOL_MANAGED, &Texture, NULL);
|
hr = Device->CreateTexture(Size.Width, Size.Height, HasMipMaps ? 0 : 1, flags, InternalFormat, D3DPOOL_MANAGED, &Texture, NULL);
|
||||||
break;
|
break;
|
||||||
case ETT_CUBEMAP:
|
case ETT_CUBEMAP:
|
||||||
Device->CreateCubeTexture(Size.Width, HasMipMaps ? 0 : 1, flags, InternalFormat, D3DPOOL_MANAGED, &CubeTexture, NULL);
|
hr = Device->CreateCubeTexture(Size.Width, HasMipMaps ? 0 : 1, flags, InternalFormat, D3DPOOL_MANAGED, &CubeTexture, NULL);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_IRR_DEBUG_BREAK_IF(true)
|
_IRR_DEBUG_BREAK_IF(true)
|
||||||
@ -114,8 +114,8 @@ CD3D9Texture::CD3D9Texture(const io::path& name, const core::array<IImage*>& ima
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CD3D9Texture::CD3D9Texture(CD3D9Driver* driver, const core::dimension2d<u32>& size, const io::path& name, const ECOLOR_FORMAT format)
|
CD3D9Texture::CD3D9Texture(CD3D9Driver* driver, const core::dimension2d<u32>& size, const io::path& name, E_TEXTURE_TYPE type, const ECOLOR_FORMAT format)
|
||||||
: ITexture(name, ETT_2D), Driver(driver), InternalFormat(D3DFMT_UNKNOWN), LockReadOnly(false), LockData(0), LockLayer(0),
|
: ITexture(name, type), Driver(driver), InternalFormat(D3DFMT_UNKNOWN), LockReadOnly(false), LockData(0), LockLayer(0),
|
||||||
AutoGenerateMipMaps(false), Device(0), Texture(0), CubeTexture(0), RTTSurface(0)
|
AutoGenerateMipMaps(false), Device(0), Texture(0), CubeTexture(0), RTTSurface(0)
|
||||||
{
|
{
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
@ -344,32 +344,44 @@ void CD3D9Texture::releaseTexture()
|
|||||||
|
|
||||||
void CD3D9Texture::generateRenderTarget()
|
void CD3D9Texture::generateRenderTarget()
|
||||||
{
|
{
|
||||||
if (!Texture)
|
DWORD flags = (IImage::isDepthFormat(ColorFormat)) ? D3DUSAGE_DEPTHSTENCIL : D3DUSAGE_RENDERTARGET;
|
||||||
|
|
||||||
|
HRESULT hr = 0;
|
||||||
|
|
||||||
|
switch (Type)
|
||||||
{
|
{
|
||||||
DWORD flag = (IImage::isDepthFormat(ColorFormat)) ? D3DUSAGE_DEPTHSTENCIL : D3DUSAGE_RENDERTARGET;
|
case ETT_2D:
|
||||||
|
hr = Device->CreateTexture(Size.Width, Size.Height, 1, flags, InternalFormat, D3DPOOL_DEFAULT, &Texture, NULL);
|
||||||
|
break;
|
||||||
|
case ETT_CUBEMAP:
|
||||||
|
hr = Device->CreateCubeTexture(Size.Width, 1, flags, InternalFormat, D3DPOOL_DEFAULT, &CubeTexture, NULL);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
_IRR_DEBUG_BREAK_IF(true)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
HRESULT hr = Device->CreateTexture(Size.Width, Size.Height, 1, flag, InternalFormat, D3DPOOL_DEFAULT, &Texture, NULL);
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
if (FAILED(hr))
|
if (D3DERR_INVALIDCALL == hr)
|
||||||
{
|
os::Printer::log("Could not create render target texture", "Invalid Call", irr::ELL_ERROR);
|
||||||
if (D3DERR_INVALIDCALL == hr)
|
else if (D3DERR_OUTOFVIDEOMEMORY == hr)
|
||||||
os::Printer::log("Could not create render target texture", "Invalid Call", irr::ELL_ERROR);
|
os::Printer::log("Could not create render target texture", "Out of Video Memory", irr::ELL_ERROR);
|
||||||
else if (D3DERR_OUTOFVIDEOMEMORY == hr)
|
else if (E_OUTOFMEMORY == hr)
|
||||||
os::Printer::log("Could not create render target texture", "Out of Video Memory", irr::ELL_ERROR);
|
os::Printer::log("Could not create render target texture", "Out of Memory", irr::ELL_ERROR);
|
||||||
else if (E_OUTOFMEMORY == hr)
|
else
|
||||||
os::Printer::log("Could not create render target texture", "Out of Memory", irr::ELL_ERROR);
|
os::Printer::log("Could not create render target texture", irr::ELL_ERROR);
|
||||||
else
|
core::stringc params("Width:");
|
||||||
os::Printer::log("Could not create render target texture", irr::ELL_ERROR);
|
params += (unsigned int)Size.Width;
|
||||||
core::stringc params("Width:");
|
params += " Height: ";
|
||||||
params += (unsigned int)Size.Width;
|
params += (unsigned int)Size.Height;
|
||||||
params += " Height: ";
|
params += " flag: ";
|
||||||
params += (unsigned int)Size.Height;
|
params += (unsigned int)flags;
|
||||||
params += " flag: ";
|
params += " format";
|
||||||
params += (unsigned int)flag;
|
params += (unsigned int)InternalFormat;
|
||||||
params += " format";
|
params += " Type: ";
|
||||||
params += (unsigned int)InternalFormat;
|
params += (unsigned int)Type;
|
||||||
os::Printer::log(params.c_str(), irr::ELL_ERROR);
|
os::Printer::log(params.c_str(), irr::ELL_ERROR);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class CD3D9Texture : public ITexture
|
|||||||
public:
|
public:
|
||||||
CD3D9Texture(const io::path& name, const core::array<IImage*>& image, E_TEXTURE_TYPE type, CD3D9Driver* driver);
|
CD3D9Texture(const io::path& name, const core::array<IImage*>& image, E_TEXTURE_TYPE type, CD3D9Driver* driver);
|
||||||
|
|
||||||
CD3D9Texture(CD3D9Driver* driver, const core::dimension2d<u32>& size, const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN);
|
CD3D9Texture(CD3D9Driver* driver, const core::dimension2d<u32>& size, const io::path& name, E_TEXTURE_TYPE type, const ECOLOR_FORMAT format = ECF_UNKNOWN);
|
||||||
|
|
||||||
virtual ~CD3D9Texture();
|
virtual ~CD3D9Texture();
|
||||||
|
|
||||||
|
@ -2610,6 +2610,12 @@ ITexture* CNullDriver::addRenderTargetTexture(const core::dimension2d<u32>& size
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ITexture* CNullDriver::addRenderTargetTextureCubemap(const irr::u32 sideLen,
|
||||||
|
const io::path& name, const ECOLOR_FORMAT format)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void CNullDriver::clearBuffers(u16 flag, SColor color, f32 depth, u8 stencil)
|
void CNullDriver::clearBuffers(u16 flag, SColor color, f32 depth, u8 stencil)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -319,6 +319,10 @@ namespace video
|
|||||||
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
|
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
|
||||||
const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN) _IRR_OVERRIDE_;
|
const io::path& name, const ECOLOR_FORMAT format = ECF_UNKNOWN) _IRR_OVERRIDE_;
|
||||||
|
|
||||||
|
//! Creates a render target texture for a cubemap
|
||||||
|
ITexture* CNullDriver::addRenderTargetTextureCubemap(const irr::u32 sideLen,
|
||||||
|
const io::path& name, const ECOLOR_FORMAT format) _IRR_OVERRIDE_;
|
||||||
|
|
||||||
//! Creates an 1bit alpha channel of the texture based of an color key.
|
//! Creates an 1bit alpha channel of the texture based of an color key.
|
||||||
virtual void makeColorKeyTexture(video::ITexture* texture, video::SColor color, bool zeroTexels) const _IRR_OVERRIDE_;
|
virtual void makeColorKeyTexture(video::ITexture* texture, video::SColor color, bool zeroTexels) const _IRR_OVERRIDE_;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
DepthStencil->drop();
|
DepthStencil->drop();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil) _IRR_OVERRIDE_
|
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces) _IRR_OVERRIDE_
|
||||||
{
|
{
|
||||||
bool textureUpdate = (Texture != texture) ? true : false;
|
bool textureUpdate = (Texture != texture) ? true : false;
|
||||||
bool depthStencilUpdate = (DepthStencil != depthStencil) ? true : false;
|
bool depthStencilUpdate = (DepthStencil != depthStencil) ? true : false;
|
||||||
|
@ -129,7 +129,7 @@ CSoftwareRenderTarget::~CSoftwareRenderTarget()
|
|||||||
Texture[0]->drop();
|
Texture[0]->drop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSoftwareRenderTarget::setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil)
|
void CSoftwareRenderTarget::setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces)
|
||||||
{
|
{
|
||||||
if (Texture != texture)
|
if (Texture != texture)
|
||||||
{
|
{
|
||||||
|
@ -57,7 +57,7 @@ public:
|
|||||||
CSoftwareRenderTarget(CSoftwareDriver* driver);
|
CSoftwareRenderTarget(CSoftwareDriver* driver);
|
||||||
virtual ~CSoftwareRenderTarget();
|
virtual ~CSoftwareRenderTarget();
|
||||||
|
|
||||||
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil) _IRR_OVERRIDE_;
|
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces) _IRR_OVERRIDE_;
|
||||||
|
|
||||||
ITexture* getTexture() const;
|
ITexture* getTexture() const;
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ CSoftwareRenderTarget2::~CSoftwareRenderTarget2()
|
|||||||
Texture[0]->drop();
|
Texture[0]->drop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSoftwareRenderTarget2::setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil)
|
void CSoftwareRenderTarget2::setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces)
|
||||||
{
|
{
|
||||||
if (Texture != texture)
|
if (Texture != texture)
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ public:
|
|||||||
CSoftwareRenderTarget2(CBurningVideoDriver* driver);
|
CSoftwareRenderTarget2(CBurningVideoDriver* driver);
|
||||||
virtual ~CSoftwareRenderTarget2();
|
virtual ~CSoftwareRenderTarget2();
|
||||||
|
|
||||||
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil) _IRR_OVERRIDE_;
|
virtual void setTexture(const core::array<ITexture*>& texture, ITexture* depthStencil, const core::array<E_CUBE_SURFACE>& cubeSurfaces) _IRR_OVERRIDE_;
|
||||||
|
|
||||||
ITexture* getTexture() const;
|
ITexture* getTexture() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user