Code: Select all
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
I'm making a top-down tank fighting game and I want to use one texture and draw it using different colors. Also, I want to draw a circular health bar on top of my tank and have it disappear as the player takes damage (change the size of the clip rect based on health pct).
Code: Select all
draw2DImage (const video::ITexture *texture, const core::position2d< s32 > &pos, const core::array< core::rect< s32 > > &sourceRects, const core::array< s32 > &indices, s32 kerningWidth=0, const core::rect< s32 > *clipRect=0, SColor color=SColor(255, 255, 255, 255), bool useAlphaChannelOfTexture=false)=0
Finally:
Code: Select all
draw2DImage (const video::ITexture *texture, const core::rect< s32 > &destRect, const core::rect< s32 > &sourceRect, const core::rect< s32 > *clipRect=0, video::SColor *colors=0, bool useAlphaChannelOfTexture=false)=0
It looks like the draw2DImage function has a lot of different uses, and I would like to tap into these, but I don't quite understand all of what is going on. Any clarification would be greatly helpful, in exchange I'll add anything I find useful to the wiki.
Thanks!