draw3DLine bug ???
Posted: Fri Apr 20, 2007 12:07 am
hello !
I'm developing a little physics simulation but I have some problems with draw3DLine() function.
I attached these two screenshots. In the first one, the image is ok, some spheres have lines between them... But in the second one, (the camera looks slighty up) the lines between the spheres are gone, but another lines appear at another location...
OK image :
WRONG image :
The code to draw those lines looks like this :
It is called in the while loop between smgr->drawAll() and guienv->drawAll().
As you can see there is an extra draw2DLine() before calling the draw3DLine() functions. That draw2DLine() doesn't appear on screen at all, but it I don't do it, the lines won't appear at all, but they will appear in the wrong state (2nd screenshot).
I'm using Codeblocks with mingw, downloaded the dll for 1.3 from somewhere from forum...
I can post the demo too if someone is interested...
Thanks...
I'm developing a little physics simulation but I have some problems with draw3DLine() function.
I attached these two screenshots. In the first one, the image is ok, some spheres have lines between them... But in the second one, (the camera looks slighty up) the lines between the spheres are gone, but another lines appear at another location...
OK image :
WRONG image :
The code to draw those lines looks like this :
Code: Select all
driver->draw2DLine(position2d<s32>(0, 0), position2d<s32>(100, 100), SColor(0, 255, 255, 255));
for (int i = 0; i < 6 - 1; i++)
for (int j = 0; j < 6; j++)
for (int k = 0; k < 6; k++)
driver->draw3DLine(part[i][j][k]->getPosition(), part[i+1][j][k]->getPosition(), SColor(0, 255, 255, 255));
for (int i = 0; i < 6; i++)
for (int j = 0; j < 6 - 1; j++)
for (int k = 0; k < 6; k++)
driver->draw3DLine(part[i][j][k]->getPosition(), part[i][j+1][k]->getPosition(), SColor(0, 255, 255, 255));
for (int i = 0; i < 6; i++)
for (int j = 0; j < 6; j++)
for (int k = 0; k < 6 - 1; k++)
driver->draw3DLine(part[i][j][k]->getPosition(), part[i][j][k+1]->getPosition(), SColor(0, 255, 255, 255));
As you can see there is an extra draw2DLine() before calling the draw3DLine() functions. That draw2DLine() doesn't appear on screen at all, but it I don't do it, the lines won't appear at all, but they will appear in the wrong state (2nd screenshot).
I'm using Codeblocks with mingw, downloaded the dll for 1.3 from somewhere from forum...
I can post the demo too if someone is interested...
Thanks...