Template class problem when trying to use static text in gui

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
stryker1
Posts: 5
Joined: Mon May 01, 2006 1:16 am

Template class problem when trying to use static text in gui

Post 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?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post 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)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply