Page 1 of 1

Template class problem when trying to use static text in gui

Posted: Sun Jun 25, 2006 9:07 pm
by stryker1
say I have the following:

Code: Select all

	_gui_text = _gui->addStaticText(L"Your hardware or this renderer is not able to use the "\
			L"needed shaders for this material. Using fall back materials.",
			core::rect(150,20,470,60));
I tells me the following error:
c:\Documents and Settings\bstryker\Desktop\Visual Studio Projects\Space\Game.cpp(35): error C2955: 'irr::core::rect' : use of class template requires template argument list
not sure why this is happening as it is identical to the example. any thoughts?

Posted: Sun Jun 25, 2006 9:22 pm
by Acki
What type of rect do you want to use, float, integer, 32bit, 16bit...
If you have a look at the docu for rect you'll see it needs a template argument (like your compiler told you) !!!
For gui you'll need s32, so use rect<s32>(x1, y1, x2, y2)