Hi there,
I´ve been trying to get the GrassNode working properly but I couldn't get it to work!
The grass is appearing all black.
I don't know if is the 1.4 Irrlicht version that I am using, I tried using other textures (thought it was an alfa or color key problem) but no success.
Can anyone help?
I believe its very simple problem, but I just cant see where is it!
Thanks,
Braun
Grass Node "Black Rectangles"
Thanks for the quick reply JP,
Yeah, I got a light and the node is set lightning false, just like the example.
The scene has other objects, only the grass isn't appearing properly.
I thought it was something wrong in my code, so I compiled the "original" source code and the same thing happens there.
Thanks,
Braun
Yeah, I got a light and the node is set lightning false, just like the example.
The scene has other objects, only the grass isn't appearing properly.
I thought it was something wrong in my code, so I compiled the "original" source code and the same thing happens there.
Thanks,
Braun
Ahh yes... If you can't find working code then try and fix it yourself. Basically check all the functions of the grass node against those in ISceneNode and make sure they have the right parameters and qualifiers. Some functions became const in irrlicht since the grass node was originally written and some functions changed their parameters or return values, such as s32s being changed to u32s.
That worked! It was really simple, but hard to see!Ahh yes... If you can't find working code then try and fix it yourself. Basically check all the functions of the grass node against those in ISceneNode and make sure they have the right parameters and qualifiers. Some functions became const in irrlicht since the grass node was originally written and some functions changed their parameters or return values, such as s32s being changed to u32s.
There was a "const" missing in the "getMaterialCount()" function, so it was always returning 0.
For 1.4 or 1.5 Irrlicht version here it is:
Code: Select all
//! Returns amount of materials used by this scene node.
virtual u32 getMaterialCount() const;
Thanks a lot JP and hybrid, I was losing my mind!
Braun
Nice!
Really good shot hbraun!
I was having a headache too. Saved me a lot of time!
I was having a headache too. Saved me a lot of time!