Commit 6a34c5fd authored by hybrid's avatar hybrid

Export the color conversion method

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3277 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 72581f0c
...@@ -1384,7 +1384,7 @@ namespace video ...@@ -1384,7 +1384,7 @@ namespace video
enabled or disabled. */ enabled or disabled. */
virtual void enableMaterial2D(bool enable=true) =0; virtual void enableMaterial2D(bool enable=true) =0;
//! Returns the graphics card vendor name. //! Get the graphics card vendor name.
virtual core::stringc getVendorInfo() =0; virtual core::stringc getVendorInfo() =0;
//! Only used by the engine internally. //! Only used by the engine internally.
...@@ -1399,8 +1399,21 @@ namespace video ...@@ -1399,8 +1399,21 @@ namespace video
\param flag Default behavior is to disable ZWrite, i.e. false. */ \param flag Default behavior is to disable ZWrite, i.e. false. */
virtual void setAllowZWriteOnTransparent(bool flag) =0; virtual void setAllowZWriteOnTransparent(bool flag) =0;
//! Returns the maximum texture size supported. //! Get the maximum texture size supported.
virtual core::dimension2du getMaxTextureSize() const =0; virtual core::dimension2du getMaxTextureSize() const =0;
//! Color conversion convenience function
/** Convert an image (as array of pixels) from source to destination
array, thereby converting the color format. The pixel size is
determined by the color formats.
\param sP Pointer to source
\param sF Color format of source
\param sN Number of pixels to convert, both array must be large enough
\param dP Pointer to destination
\param dF Color format of destination
*/
virtual void convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN,
void* dP, ECOLOR_FORMAT dF) const =0;
}; };
} // end namespace video } // end namespace video
......
...@@ -2332,5 +2332,22 @@ core::dimension2du CNullDriver::getMaxTextureSize() const ...@@ -2332,5 +2332,22 @@ core::dimension2du CNullDriver::getMaxTextureSize() const
} }
//! Color conversion convenience function
/** Convert an image (as array of pixels) from source to destination
array, thereby converting the color format. The pixel size is
determined by the color formats.
\param sP Pointer to source
\param sF Color format of source
\param sN Number of pixels to convert, both array must be large enough
\param dP Pointer to destination
\param dF Color format of destination
*/
void CNullDriver::convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN,
void* dP, ECOLOR_FORMAT dF) const
{
video::CColorConverter::convert_viaFormat(sP, sF, sN, dP, dF);
}
} // end namespace } // end namespace
} // end namespace } // end namespace
...@@ -632,6 +632,19 @@ namespace video ...@@ -632,6 +632,19 @@ namespace video
//! Returns the maximum texture size supported. //! Returns the maximum texture size supported.
virtual core::dimension2du getMaxTextureSize() const; virtual core::dimension2du getMaxTextureSize() const;
//! Color conversion convenience function
/** Convert an image (as array of pixels) from source to destination
array, thereby converting the color format. The pixel size is
determined by the color formats.
\param sP Pointer to source
\param sF Color format of source
\param sN Number of pixels to convert, both array must be large enough
\param dP Pointer to destination
\param dF Color format of destination
*/
virtual void convertColor(const void* sP, ECOLOR_FORMAT sF, s32 sN,
void* dP, ECOLOR_FORMAT dF) const;
//! deprecated method //! deprecated method
virtual ITexture* createRenderTargetTexture(const core::dimension2d<u32>& size, virtual ITexture* createRenderTargetTexture(const core::dimension2d<u32>& size,
const c8* name=0); const c8* name=0);
......
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