why the line cannot display(solved)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
liusa80
Posts: 17
Joined: Tue Apr 06, 2010 3:24 am

why the line cannot display(solved)

Post by liusa80 »

while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
SMaterial mat;
mat.Thickness = 100;
mat.AntiAliasing=true;
mat.Lighting = false;
driver->setMaterial(mat);

driver->draw3DLine(core::vector3df(2.0,3.0,4.0),core::vector3df(2.0,3.0,8.0),video::SColor(255,0,0,255));
driver->endScene();
}
device->drop();
}
Last edited by liusa80 on Thu Jul 29, 2010 5:21 am, edited 1 time in total.
liusa80
Posts: 17
Joined: Tue Apr 06, 2010 3:24 am

Post by liusa80 »

i modified the coordinate so that it can display on screen
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

this will work as long as there are no other elements in the scene !!! :lol:

if you draw manually you'll have to set the tranformation matrix first:

Code: Select all

      matrix4 tmat;
      driver->setTransform(ETS_WORLD, tmat);
      driver->draw3DLine( ... );
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply