Commit 165b266b authored by nadro's avatar nadro

- Fixed problem with dynamic_cast.

- Restored const-correctness for draw2DImage methods (it was changed in previous revision).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4405 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 6238406c
......@@ -809,7 +809,7 @@ namespace video
/** \param texture Pointer to texture to use.
\param destPos Upper left 2d destination position where the
image will be drawn. */
virtual void draw2DImage(video::ITexture* texture,
virtual void draw2DImage(const video::ITexture* texture,
const core::position2d<s32>& destPos) =0;
//! Draws a 2d image using a color
......@@ -828,7 +828,7 @@ namespace video
will be transparent.
\param useAlphaChannelOfTexture: If true, the alpha channel of
the texture is used to draw the image.*/
virtual void draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0,
SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false) =0;
......@@ -852,7 +852,7 @@ namespace video
255, the image will be transparent.
\param useAlphaChannelOfTexture: If true, the alpha channel of
the texture is used to draw the image. */
virtual void draw2DImageBatch(video::ITexture* texture,
virtual void draw2DImageBatch(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::array<core::rect<s32> >& sourceRects,
const core::array<s32>& indices,
......@@ -877,7 +877,7 @@ namespace video
255, the image will be transparent.
\param useAlphaChannelOfTexture: If true, the alpha channel of
the texture is used to draw the image. */
virtual void draw2DImageBatch(video::ITexture* texture,
virtual void draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect=0,
......@@ -894,7 +894,7 @@ namespace video
the corners of the destRect
\param useAlphaChannelOfTexture True if alpha channel will be
blended. */
virtual void draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect =0,
const video::SColor * const colors=0, bool useAlphaChannelOfTexture=false) =0;
......
......@@ -1003,7 +1003,7 @@ void CD3D8Driver::draw2D3DVertexPrimitiveList(const void* vertices,
//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
void CD3D8Driver::draw2DImage(video::ITexture* texture,
void CD3D8Driver::draw2DImage(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::rect<s32>& sourceRect,
const core::rect<s32>* clipRect, SColor color,
......@@ -1137,7 +1137,7 @@ void CD3D8Driver::draw2DImage(video::ITexture* texture,
}
void CD3D8Driver::draw2DImage(video::ITexture* texture,
void CD3D8Driver::draw2DImage(const video::ITexture* texture,
const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect,
const core::rect<s32>* clipRect,
......
......@@ -79,12 +79,12 @@ namespace video
E_INDEX_TYPE iType);
//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
virtual void draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false);
//! Draws a part of the texture into the rectangle.
virtual void draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false);
......
......@@ -1567,7 +1567,7 @@ void CD3D9Driver::draw2D3DVertexPrimitiveList(const void* vertices,
}
void CD3D9Driver::draw2DImage(video::ITexture* texture,
void CD3D9Driver::draw2DImage(const video::ITexture* texture,
const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect,
const core::rect<s32>* clipRect,
......@@ -1639,7 +1639,7 @@ void CD3D9Driver::draw2DImage(video::ITexture* texture,
}
void CD3D9Driver::draw2DImageBatch(video::ITexture* texture,
void CD3D9Driver::draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect,
......@@ -1787,7 +1787,7 @@ void CD3D9Driver::draw2DImageBatch(video::ITexture* texture,
//! draws a 2d image, using a color and the alpha channel of the texture if
//! desired. The image is drawn at pos and clipped against clipRect (if != 0).
void CD3D9Driver::draw2DImage(video::ITexture* texture,
void CD3D9Driver::draw2DImage(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::rect<s32>& sourceRect,
const core::rect<s32>* clipRect, SColor color,
......
......@@ -161,17 +161,17 @@ namespace video
E_INDEX_TYPE iType);
//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
virtual void draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false);
//! Draws a part of the texture into the rectangle.
virtual void draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false);
//! Draws a set of 2d images, using a color and the alpha channel of the texture.
virtual void draw2DImageBatch(video::ITexture* texture,
virtual void draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect=0,
......
......@@ -152,7 +152,7 @@ void CGUISpriteBank::draw2DSprite(u32 index, const core::position2di& pos,
frame = (f >= Sprites[index].Frames.size()) ? Sprites[index].Frames.size()-1 : f;
}
video::ITexture* tex = getTexture(Sprites[index].Frames[frame].textureNumber);
const video::ITexture* tex = getTexture(Sprites[index].Frames[frame].textureNumber);
if (!tex)
return;
......
......@@ -714,7 +714,7 @@ void CNullDriver::draw3DBox(const core::aabbox3d<f32>& box, SColor color)
//! draws an 2d image
void CNullDriver::draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos)
void CNullDriver::draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos)
{
if (!texture)
return;
......@@ -730,7 +730,7 @@ void CNullDriver::draw2DImage(video::ITexture* texture, const core::position2d<s
//! in one line. All drawings are clipped against clipRect (if != 0).
//! The subtextures are defined by the array of sourceRects and are chosen
//! by the indices given.
void CNullDriver::draw2DImageBatch(video::ITexture* texture,
void CNullDriver::draw2DImageBatch(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::array<core::rect<s32> >& sourceRects,
const core::array<s32>& indices,
......@@ -751,7 +751,7 @@ void CNullDriver::draw2DImageBatch(video::ITexture* texture,
//! draws a set of 2d images, using a color and the alpha channel of the
//! texture if desired.
void CNullDriver::draw2DImageBatch(video::ITexture* texture,
void CNullDriver::draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect,
......@@ -769,7 +769,7 @@ void CNullDriver::draw2DImageBatch(video::ITexture* texture,
//! Draws a part of the texture into the rectangle.
void CNullDriver::draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
void CNullDriver::draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect,
const video::SColor* const colors, bool useAlphaChannelOfTexture)
{
......@@ -781,7 +781,7 @@ void CNullDriver::draw2DImage(video::ITexture* texture, const core::rect<s32>& d
//! Draws a 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
void CNullDriver::draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
void CNullDriver::draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect,
const core::rect<s32>* clipRect, SColor color,
bool useAlphaChannelOfTexture)
......
......@@ -141,7 +141,7 @@ namespace video
SColor color = SColor(255,255,255,255));
//! draws an 2d image
virtual void draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos);
virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos);
//! draws a set of 2d images, using a color and the alpha
/** channel of the texture if desired. The images are drawn
......@@ -160,7 +160,7 @@ namespace video
Note that the alpha component is used: If alpha is other than 255, the image will be transparent.
\param useAlphaChannelOfTexture: If true, the alpha channel of the texture is
used to draw the image. */
virtual void draw2DImageBatch(video::ITexture* texture,
virtual void draw2DImageBatch(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::array<core::rect<s32> >& sourceRects,
const core::array<s32>& indices,
......@@ -185,7 +185,7 @@ namespace video
255, the image will be transparent.
\param useAlphaChannelOfTexture: If true, the alpha channel of
the texture is used to draw the image. */
virtual void draw2DImageBatch(video::ITexture* texture,
virtual void draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect=0,
......@@ -193,12 +193,12 @@ namespace video
bool useAlphaChannelOfTexture=false);
//! Draws a 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
virtual void draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false);
//! Draws a part of the texture into the rectangle.
virtual void draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false);
......
......@@ -1919,7 +1919,7 @@ void COpenGLDriver::draw2DVertexPrimitiveList(const void* vertices, u32 vertexCo
//! draws a set of 2d images, using a color and the alpha channel of the
//! texture if desired.
void COpenGLDriver::draw2DImageBatch(video::ITexture* texture,
void COpenGLDriver::draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect,
......@@ -2056,7 +2056,7 @@ void COpenGLDriver::draw2DImageBatch(video::ITexture* texture,
//! draws a 2d image, using a color and the alpha channel of the texture if
//! desired. The image is drawn at pos, clipped against clipRect (if != 0).
//! Only the subtexture defined by sourceRect is used.
void COpenGLDriver::draw2DImage(video::ITexture* texture,
void COpenGLDriver::draw2DImage(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::rect<s32>& sourceRect,
const core::rect<s32>* clipRect, SColor color,
......@@ -2186,7 +2186,7 @@ void COpenGLDriver::draw2DImage(video::ITexture* texture,
//! The same, but with a four element array of colors, one for each vertex
void COpenGLDriver::draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
void COpenGLDriver::draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect,
const video::SColor* const colors, bool useAlphaChannelOfTexture)
{
......@@ -2259,7 +2259,7 @@ void COpenGLDriver::draw2DImage(video::ITexture* texture, const core::rect<s32>&
//! in one line. All drawings are clipped against clipRect (if != 0).
//! The subtextures are defined by the array of sourceRects and are chosen
//! by the indices given.
void COpenGLDriver::draw2DImage(video::ITexture* texture,
void COpenGLDriver::draw2DImage(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::array<core::rect<s32> >& sourceRects,
const core::array<s32>& indices,
......@@ -2436,7 +2436,7 @@ void COpenGLDriver::drawPixel(u32 x, u32 y, const SColor &color)
glEnd();
}
bool COpenGLDriver::setActiveTexture(u32 stage, video::ITexture* texture)
bool COpenGLDriver::setActiveTexture(u32 stage, const video::ITexture* texture)
{
if (stage >= MaxSupportedTextures)
return false;
......@@ -2851,7 +2851,7 @@ void COpenGLDriver::setBasicRenderStates(const SMaterial& material, const SMater
else if (i>0)
break;
COpenGLTexture* tmpTexture = static_cast<COpenGLTexture*>(CurrentTexture[i]);
const COpenGLTexture* tmpTexture = static_cast<const COpenGLTexture*>(CurrentTexture[i]);
if(resetAllRenderStates)
tmpTexture->setCacheStatus(false);
......
......@@ -151,7 +151,7 @@ namespace video
//! draws a set of 2d images, using a color and the alpha channel of the
//! texture if desired.
void draw2DImageBatch(video::ITexture* texture,
void draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect,
......@@ -159,7 +159,7 @@ namespace video
bool useAlphaChannelOfTexture);
//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
virtual void draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false);
......@@ -179,7 +179,7 @@ namespace video
Note that the alpha component is used: If alpha is other than 255, the image will be transparent.
\param useAlphaChannelOfTexture: If true, the alpha channel of the texture is
used to draw the image. */
virtual void draw2DImage(video::ITexture* texture,
virtual void draw2DImage(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::array<core::rect<s32> >& sourceRects,
const core::array<s32>& indices,
......@@ -188,7 +188,7 @@ namespace video
bool useAlphaChannelOfTexture=false);
//! Draws a part of the texture into the rectangle.
virtual void draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false);
......@@ -303,7 +303,7 @@ namespace video
//! sets the current Texture
//! Returns whether setting was a success or not.
bool setActiveTexture(u32 stage, video::ITexture* texture);
bool setActiveTexture(u32 stage, const video::ITexture* texture);
//! disables all textures beginning with the optional fromStage parameter. Otherwise all texture stages are disabled.
//! Returns whether disabling was successful or not.
......@@ -484,7 +484,7 @@ namespace video
core::array<video::IRenderTarget> MRTargets;
class STextureStageCache
{
ITexture* CurrentTexture[MATERIAL_MAX_TEXTURES];
const ITexture* CurrentTexture[MATERIAL_MAX_TEXTURES];
public:
STextureStageCache()
{
......@@ -499,7 +499,7 @@ namespace video
clear();
}
void set(u32 stage, ITexture* tex)
void set(u32 stage, const ITexture* tex)
{
if (stage<MATERIAL_MAX_TEXTURES)
{
......@@ -512,7 +512,7 @@ namespace video
}
}
ITexture* operator[](int stage) const
const ITexture* operator[](int stage) const
{
if ((u32)stage<MATERIAL_MAX_TEXTURES)
return CurrentTexture[stage];
......
......@@ -57,7 +57,7 @@ COpenGLSLMaterialRenderer::COpenGLSLMaterialRenderer(video::COpenGLDriver* drive
if (baseMaterial == EMT_ONETEXTURE_BLEND || baseMaterial == EMT_TRANSPARENT_ADD_COLOR || baseMaterial == EMT_TRANSPARENT_VERTEX_ALPHA ||
baseMaterial == EMT_TRANSPARENT_ALPHA_CHANNEL || baseMaterial == EMT_TRANSPARENT_ALPHA_CHANNEL_REF)
{
BaseMaterial = dynamic_cast<COpenGLMaterialRenderer*>(Driver->getMaterialRenderer(baseMaterial));
BaseMaterial = static_cast<COpenGLMaterialRenderer*>(Driver->getMaterialRenderer(baseMaterial));
}
if (BaseMaterial)
......@@ -83,7 +83,7 @@ COpenGLSLMaterialRenderer::COpenGLSLMaterialRenderer(COpenGLDriver* driver,
if (baseMaterial == EMT_ONETEXTURE_BLEND || baseMaterial == EMT_TRANSPARENT_ADD_COLOR || baseMaterial == EMT_TRANSPARENT_VERTEX_ALPHA ||
baseMaterial == EMT_TRANSPARENT_ALPHA_CHANNEL || baseMaterial == EMT_TRANSPARENT_ALPHA_CHANNEL_REF)
{
BaseMaterial = dynamic_cast<COpenGLMaterialRenderer*>(Driver->getMaterialRenderer(baseMaterial));
BaseMaterial = static_cast<COpenGLMaterialRenderer*>(Driver->getMaterialRenderer(baseMaterial));
}
if (BaseMaterial)
......
......@@ -665,7 +665,7 @@ u8 COpenGLTexture::getTextureWrapU() const
return WrapU;
}
void COpenGLTexture::setTextureWrapU(u8 value)
void COpenGLTexture::setTextureWrapU(u8 value) const
{
WrapU = value;
}
......@@ -675,7 +675,7 @@ u8 COpenGLTexture::getTextureWrapV() const
return WrapV;
}
void COpenGLTexture::setTextureWrapV(u8 value)
void COpenGLTexture::setTextureWrapV(u8 value) const
{
WrapV = value;
}
......@@ -685,7 +685,7 @@ bool COpenGLTexture::getBilinearFilter() const
return Bilinear;
}
void COpenGLTexture::setBilinearFilter(bool value)
void COpenGLTexture::setBilinearFilter(bool value) const
{
Bilinear = value;
}
......@@ -695,7 +695,7 @@ bool COpenGLTexture::getTrilinearFilter() const
return Trilinear;
}
void COpenGLTexture::setTrilinearFilter(bool value)
void COpenGLTexture::setTrilinearFilter(bool value) const
{
Trilinear = value;
}
......@@ -705,7 +705,7 @@ u8 COpenGLTexture::getAnisotropicFilter() const
return Anisotropic;
}
void COpenGLTexture::setAnisotropicFilter(u8 value)
void COpenGLTexture::setAnisotropicFilter(u8 value) const
{
Anisotropic = value;
}
......@@ -715,7 +715,7 @@ bool COpenGLTexture::getMipMapsStatus() const
return MipMapStatus;
}
void COpenGLTexture::setMipMapsStatus(bool value)
void COpenGLTexture::setMipMapsStatus(bool value) const
{
MipMapStatus = value;
}
......@@ -725,7 +725,7 @@ bool COpenGLTexture::getCacheStatus() const
return CacheStatus;
}
void COpenGLTexture::setCacheStatus(bool value)
void COpenGLTexture::setCacheStatus(bool value) const
{
CacheStatus = value;
}
......
......@@ -106,25 +106,25 @@ public:
//! Cache methods.
u8 getTextureWrapU() const;
void setTextureWrapU(u8 value);
void setTextureWrapU(u8 value) const;
u8 getTextureWrapV() const;
void setTextureWrapV(u8 value);
void setTextureWrapV(u8 value) const;
bool getBilinearFilter() const;
void setBilinearFilter(bool value);
void setBilinearFilter(bool value) const;
bool getTrilinearFilter() const;
void setTrilinearFilter(bool value);
void setTrilinearFilter(bool value) const;
u8 getAnisotropicFilter() const;
void setAnisotropicFilter(u8 value);
void setAnisotropicFilter(u8 value) const;
bool getMipMapsStatus() const;
void setMipMapsStatus(bool value);
void setMipMapsStatus(bool value) const;
bool getCacheStatus() const;
void setCacheStatus(bool value);
void setCacheStatus(bool value) const;
protected:
......@@ -167,13 +167,13 @@ protected:
bool ReadOnlyLock;
bool KeepImage;
u8 WrapU;
u8 WrapV;
bool Bilinear;
bool Trilinear;
u8 Anisotropic;
bool MipMapStatus;
bool CacheStatus;
mutable u8 WrapU;
mutable u8 WrapV;
mutable bool Bilinear;
mutable bool Trilinear;
mutable u8 Anisotropic;
mutable bool MipMapStatus;
mutable bool CacheStatus;
};
//! OpenGL FBO texture.
......
......@@ -792,7 +792,7 @@ const core::dimension2d<u32>& CSoftwareDriver::getCurrentRenderTargetSize() cons
//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
void CSoftwareDriver::draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
void CSoftwareDriver::draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect,
const core::rect<s32>* clipRect, SColor color,
bool useAlphaChannelOfTexture)
......
......@@ -65,7 +65,7 @@ namespace video
const core::vector3df& end, SColor color = SColor(255,255,255,255));
//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
virtual void draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false);
......
......@@ -2188,7 +2188,7 @@ void CBurningVideoDriver::lightVertex ( s4DVertex *dest, u32 vertexargb )
//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
void CBurningVideoDriver::draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
void CBurningVideoDriver::draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect,
const core::rect<s32>* clipRect, SColor color,
bool useAlphaChannelOfTexture)
......@@ -2227,7 +2227,7 @@ void CBurningVideoDriver::draw2DImage(video::ITexture* texture, const core::posi
//! Draws a part of the texture into the rectangle.
void CBurningVideoDriver::draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
void CBurningVideoDriver::draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect,
const video::SColor* const colors, bool useAlphaChannelOfTexture)
{
......
......@@ -85,12 +85,12 @@ namespace video
E_VERTEX_TYPE vType, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType);
//! draws an 2d image, using a color (if color is other then Color(255,255,255,255)) and the alpha channel of the texture if wanted.
virtual void draw2DImage(video::ITexture* texture, const core::position2d<s32>& destPos,
virtual void draw2DImage(const video::ITexture* texture, const core::position2d<s32>& destPos,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
SColor color=SColor(255,255,255,255), bool useAlphaChannelOfTexture=false);
//! Draws a part of the texture into the rectangle.
virtual void draw2DImage(video::ITexture* texture, const core::rect<s32>& destRect,
virtual void draw2DImage(const video::ITexture* texture, const core::rect<s32>& destRect,
const core::rect<s32>& sourceRect, const core::rect<s32>* clipRect = 0,
const video::SColor* const colors=0, bool useAlphaChannelOfTexture=false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment