EDIT I tried this line with changing the scolor but that made no difference...
Code: Select all
driver->draw3DLine(core::vector3df(x1, y1, z1), core::vector3df(x2, y2, z2), video::SColor(255,255,255,255));
Code: Select all
#include <irrlicht.h>
#include "driverChoice.h"
using namespace irr;
#ifdef _MSC_VER
#pragma comment(lib, "Irrlicht.lib")
#endif
int main()
{
// ask user for driver
video::E_DRIVER_TYPE driverType=driverChoiceConsole();
if (driverType==video::EDT_COUNT)
return 1;
// create device
IrrlichtDevice *device = createDevice(driverType,
core::dimension2d<u32>(640, 480), 16, false);
if (device == 0)
return 1; // could not create selected driver.
// create engine and camera
device->setWindowCaption(L"Custom Scene Node - Irrlicht Engine Demo");
video::IVideoDriver* driver = device->getVideoDriver();
scene::ISceneManager* smgr = device->getSceneManager();
smgr->addCameraSceneNode(0, core::vector3df(0,-40,0), core::vector3df(0,0,0));
int x1, y1, z1, x2, y2, z2;
x1 = 0;
x2 = 1;
y1 = 0;
y2 = 1;
z1 = 0;
z2 = 1;
while(device->run())
{
driver->beginScene(true, true, video::SColor(0,100,100,100));
driver->draw3DLine(core::vector3df(x1, y1, z1), core::vector3df(x2, y2, z2));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}