Page 1 of 1

How to use CTreeSceneNode?

Posted: Tue Mar 20, 2007 3:39 am
by gamemaker981
Hello,
I was browsing through the forum when I came across CTreeSceneNode, that can be used to render trees with Irrlicht.

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=10909

I downloaded it, and found it's only a few header files and cpp files.
:(

I use Dev-Cpp on Windows for Irrlicht. How can I use CTreeSceneNode?

Posted: Tue Mar 20, 2007 3:48 am
by gamemaker981
OK. got it figured out somehow.

I started a new project, and added all the cpp and .h files to it.
When I compile, I get the following error:

7 F:\Game Development\Game Development Tools\irrlicht-1.2\Trees\CBillboardGroupSceneNode.cpp In file included from CBillboardGroupSceneNode.cpp

52 F:\Game Development\Game Development Tools\irrlicht-1.2\Trees\CBillboardGroupSceneNode.h conflicting return type specified for `virtual irr::u32 irr::scene::CBillboardGroupSceneNode::getMaterialCount()'

323 C:\Dev-Cpp\include\ISceneNode.h overriding `virtual irr::s32 irr::scene::ISceneNode::getMaterialCount()'


Obviously, I didn't expect any errors. :( Please help...

Posted: Tue Mar 20, 2007 8:25 am
by hybrid
Change s32 to u32 in header and cpp file for the mentioned method.

Posted: Tue Mar 20, 2007 9:12 am
by Klasker
You need to download the proper version of the trees. It looks like you are using Irrlicht 1.2 with the trees for version 1.3.

If you are using Irrlicht 1.2: Download here
If you are using Irrlicht 1.3: Download here

Then copy all the header and cpp files into your project's directory and add them to your Dev-C++ project.

Posted: Wed Mar 21, 2007 2:29 am
by gamemaker981
189 F:\Game Development\Game Development Tools\irrlicht-1.2\Trees-irr1.2\CTreeGenerator.cpp `_wtof' undeclared (first use this function)

:( :( :( :( :( :(

I'm using Irrlicht 1.2 and downloaded Trees 1.2

Looks like _wtof() is not defined anywhere, stdlib.h, wchar.h etc. :(