Page 1 of 1

draw3DLine not showing specified color

Posted: Fri Mar 23, 2007 2:58 am
by yoes_san
I try to draw a 3d line in my main loop.

The line shows just fine but not have a specified color, instead it has a texture that I set for another scene node as texture.

Why is that?

Posted: Fri Mar 23, 2007 5:07 am
by vitek
You need to set the material [driver->setMaterial(mtl)] and the world transform [driver->setTransform(video::ETS_WORLD, mat)] just before you call driver->draw3DLine(). If you don't specify these, the graphics subsystem will use the last material and world transform that was set, and this usually comes from the last scene node that was rendered.

Travis

Posted: Mon Mar 26, 2007 3:58 am
by yoes_san
Thanks vitek, it's works as I intended now.