HI ALL
i am newbie .i have question;
+how to use u32 and s32 ?
+IrrlichtDevice *irrDevice .how to pointer *irrDevice use ?
IrrlichtDevice is class or struct ? i can't find in include file
thankss. my english is bad
difference between u32 vs s32 and pointer in irrlicht
Re: difference between u32 vs s32 and pointer in irrlicht
Hi caiten,
u32 and s32 (or irr::u32 and irr::s32 with explicit namespace) are just typedefs for integer types with 32-bit size.
IrrlichtDevice documentation is here: http://irrlicht.sourceforge.net/docu/cl ... evice.html
u32 and s32 (or irr::u32 and irr::s32 with explicit namespace) are just typedefs for integer types with 32-bit size.
IrrlichtDevice documentation is here: http://irrlicht.sourceforge.net/docu/cl ... evice.html
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: difference between u32 vs s32 and pointer in irrlicht
-u32 and s32 are unsigned and signed 32 bits integers and can be used as such.
You should program more so you get used to pointers, classes and structs.
You should program more so you get used to pointers, classes and structs.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: difference between u32 vs s32 and pointer in irrlicht
I agree with mel: Get used to working with classes and structs before using the engine; you'll thank yourself later.
The Open Descent Foundation is always looking for programmers! http://www.odf-online.org
"I'll find out if what I deleted was vital here shortly..." -d3jake
"I'll find out if what I deleted was vital here shortly..." -d3jake
Re: difference between u32 vs s32 and pointer in irrlicht
but i replace u32 and s32 in example :CuteAlien wrote:Hi caiten,
u32 and s32 (or irr::u32 and irr::s32 with explicit namespace) are just typedefs for integer types with 32-bit size.
IrrlichtDevice documentation is here: http://irrlicht.sourceforge.net/docu/cl ... evice.html
Code: Select all
IrrlichtDevice *irrDevice = createDevice(EDT_OPENGL,
dimension2d<irr::u32>(1000, 1000),
16,
false,
true,
0);
1>main.cpp(25): error C2664: 'irr::createDevice' : cannot convert parameter 2 from 'irr::core::dimension2d<T>' to 'const irr::core::dimension2d<T> &'
1> with
1> [
1> T=irr::s32
1> ]
1> and
1> [
1> T=irr::u32
1> ]
1> Reason: cannot convert from 'irr::core::dimension2d<T>' to 'const irr::core::dimension2d<T>'
1> with
1> [
1> T=irr::s32
1> ]
1> and
1> [
1> T=irr::u32
1> ]
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: difference between u32 vs s32 and pointer in irrlicht
Well, the error clearly says that you pass in s32, not u32. While your code fragment shows it different. So either you have some more createDevice somewhere, or you didn't compile the code you showed here.
Re: difference between u32 vs s32 and pointer in irrlicht
C++ enforeces the strict usage of types, so you can't exchange from u32 to s32 in a template freely because they end being diferent types. And besides, it is not safe to cast s32 variables to u32 variables because there is the posibility that the sign can't be converted properly.
The createDevice function parameters have their own types, as all of the classes and structs in Irrlicht and in C++ in general, and you should use parameters of the proper type only. That is basic programming knowledge. Get used to it.
The createDevice function parameters have their own types, as all of the classes and structs in Irrlicht and in C++ in general, and you should use parameters of the proper type only. That is basic programming knowledge. Get used to it.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: difference between u32 vs s32 and pointer in irrlicht
thanksss all you