draw2DImage bug?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
moriwo
Posts: 40
Joined: Fri Jul 04, 2008 9:29 pm

draw2DImage bug?

Post by moriwo »

i want to use draw2DImage 6 param version.

this is my code:

Code: Select all

 Driver->draw2DImage(tex,rect<s32>(100,100,200,500),rect<s32>(0,0,1000,1000),rect<s32>(0,0,0,0),SColor(100,100,100,100),false);
but, it is compile error.

error C2664:
'void irr::video::IVideoDriver::draw2DImage(const irr::video::ITexture *,const irr::core::position2d<T> &,const irr::core::rect<T> &,const irr::core::rect<T> *,irr::video::SColor,bool)' : second param cant translate from 'irr::core::rect<T>' to 'const irr::core::position2d<T> &'

(I translated this error message from Japanese.

is this a irrlicht bug?
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

what's your problem with that?

second parameter isn't rect<s32> but position2d<s32>

Driver->draw2DImage(tex,rect<s32>(100,100,200,500),rect<s32>(0,0,1000,1000),rect<s32>(0,0,0,0),SColor(100,100,100,100),false);

change it to position2d<s32>(100,100)

japanese visual c? cool xD i need that too xD
moriwo
Posts: 40
Joined: Fri Jul 04, 2008 9:29 pm

Post by moriwo »

I seems to have the 6 param version.
the second param is rect<s32>.

IVideoDriver.h

Code: Select all

		virtual void 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;
CD3D9Driver.h

Code: Select all

		//! Draws a part of the texture into the rectangle.
		virtual void 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);
Is this not a problem of irrlicht but a problem of my visual c?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

No, the problem is that you're using a version which doesn't exist. It's basically due to som ethings which would require pointers instead of references. Watch the types exactly.
Post Reply