[fixed]CBillboardSceneNode color serialization issue

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
pc0de
Posts: 300
Joined: Wed Dec 05, 2007 4:41 pm

[fixed]CBillboardSceneNode color serialization issue

Post by pc0de »

Only the upper/lower right vertex colors are being set. Quick fix:

Code: Select all

Index: source/Irrlicht/CBillboardSceneNode.cpp
===================================================================
--- source/Irrlicht/CBillboardSceneNode.cpp     (revision 3845)
+++ source/Irrlicht/CBillboardSceneNode.cpp     (working copy)
@@ -179,7 +179,9 @@

        Size.Width = in->getAttributeAsFloat("Width");
        Size.Height = in->getAttributeAsFloat("Height");
+       vertices[2].Color =
        vertices[1].Color = in->getAttributeAsColor ( "Shade_Top" );
+       vertices[3].Color =
        vertices[0].Color = in->getAttributeAsColor ( "Shade_Down" );

        setSize(Size);
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Thanks! I've changed it in svn release branch 1.7 r3849. svn trunk will follow on next merge.
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
Post Reply