basic question about irrlicht types

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
trueleowdeo
Posts: 6
Joined: Mon Apr 26, 2010 7:09 am

basic question about irrlicht types

Post by trueleowdeo »

i keep seeing types like f32, u32, etc. i assume that they stand for float and unsigned int.
questions
1.why don't you use familiar types like float and unsigned etc, etc.
2.where is the documentation about these types.

Thanks in advance 8)
kazymjir
Posts: 727
Joined: Sat Feb 20, 2010 4:05 pm
Location: Munich, Bayern

Post by kazymjir »

This types is used for engine portability.
I think you can find it somewhere in typedefs, but you not need to looking for it, names is very intuitive:
s32 32bit signed int
u32 32bit unsigned int
f32 32bit float
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

they are just typedefs to make work easier (less letters to type) and for portability... :lol:
you can find all typedefs in the API: http://irrlicht.sourceforge.net/docu/na ... _type.html
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
agamemnus
Posts: 283
Joined: Sun Jan 31, 2010 6:06 pm

Post by agamemnus »

s32 could be confused with a float, which is a single-precision floating point.

I would have done this--
i32 32bit signed int
ui32 32bit unsigned int
f32 32bit float
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Re: basic question about irrlicht types

Post by bitplane »

trueleowdeo wrote:why don't you use familiar types like float and unsigned etc, etc.
The C++ spec is quite loose around the definition of these types, "int" is 16 or more bits and no longer than a "long", which must be at least 32 bits. We use macros to make sure that they're the same size on all platforms, it keeps things like colour manipulation and file access simple, and makes sure that your programs don't behave strangely on oddball platforms.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Post Reply