Hi all;
I write this and nothing be not got :
________________________________________________________
driver->draw2DLine(core::position2d<s32>(20,20),
core::position2d<s32>(40,40),
video::SColor(255,255,255,255));
________________________________________________________
PLZ HELP.
________________________
Is it Beforehand thanked.
RESPECTFULLY YOURS i2k
Draw2DLine
-
Peter Müller
- Posts: 292
- Joined: Sun Mar 14, 2004 5:28 pm
- Location: Germany
- Contact:
Is your code including an loop like
Code: Select all
while ((device) && (device->run()))
{
smgr->beginScene(...);
smgr->drawAll(...);
gui->drawAll(...);
smgr->endScene(...);
}
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
Try setting the material of the driver before drawing
Code: Select all
video::SMaterial m;
m.Lighting = false;
driver->setMaterial(m);
driver->draw2DLine(...);
-
Peter Müller
- Posts: 292
- Joined: Sun Mar 14, 2004 5:28 pm
- Location: Germany
- Contact:
Perhaps you forgot to create a camera (or the camera has another target, so you can't see the line)
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer
-
i2k
But this works without any there cameras :Peter Müller wrote:Perhaps you forgot to create a camera (or the camera has another target, so you can't see the line)
_______________________________________________________
driver->draw2DRectangle(video::SColor(255,255,255,255),
core::rect<s32>(140, 80, 140+50, 80+50));
_______________________________________________________
-
Peter Müller
- Posts: 292
- Joined: Sun Mar 14, 2004 5:28 pm
- Location: Germany
- Contact:
Oh, by the way, draw2DLine is only supported by the software renderer in irrlicht 0.6. But AticAtac posted an implementation for directx9 here:
http://irrlicht.sourceforge.net/phpBB2/ ... ctx9#10116
It's a bit tricky but it works!
jox
http://irrlicht.sourceforge.net/phpBB2/ ... ctx9#10116
It's a bit tricky but it works!
jox
-
Peter Müller
- Posts: 292
- Joined: Sun Mar 14, 2004 5:28 pm
- Location: Germany
- Contact:
@jox:
I tried it out with DX9, all worked.
I tried it out with DX9, all worked.
http://www.games-forge.de - Die Community für Nachwuchsprogrammierer