Is backface culling turned on by default??
-
Guest
Is backface culling turned on by default??
Just a quick question, is backface culling turned on by default for all code paths?? Thats it, thankx.
-
Guest
Actually there is no such a direct call (as far as I know) but you can find it out indirectly.
1st Way: When you start Irrlicht you call createDevice function where the first parameter is the driverType (DX, GL, Soft, of Null). The engine tries to create device ONLY of the type you specified. So if you've specified DX8 then engine will work in DX mode or won't work at all.
You can check out if it works by getting result of getVideoDriver function.
As an example you can get this:
2nd Way: you can specify "error listener" (event reciever). If something goes wrong (abywhere) engine alerts you. In this case it will be a ELL_ERROR alert (see, e.g., CIrrDeviceWin32.cpp line 324).
So you can handle this as following:
so, hope that's enough... 
1st Way: When you start Irrlicht you call createDevice function where the first parameter is the driverType (DX, GL, Soft, of Null). The engine tries to create device ONLY of the type you specified. So if you've specified DX8 then engine will work in DX mode or won't work at all.
You can check out if it works by getting result of getVideoDriver function.
As an example you can get this:
Code: Select all
IrrlichtDevice* device = createDevice(EDT_DIRECTX8, dimension2d<s32>(640, 480), 16);
IVideoDriver* video;
if (device)
{
video = device->getVideoDriver();
if (video)
{
// ok. It's DX8 mode
}
else
{
// do what you like, e.g. try to work in GL mode:
if (device)
device->drop();
device = createDevice(EDT_OPENGL, dimension2d<s32>(640, 480), 16);
// check device and video again... etc.
}So you can handle this as following:
Code: Select all
class CErrorListener : public IEventReceiver
{
public:
bool OnEvent(SEvent event)
{
if (event.EventType == EET_LOG_TEXT_EVENT)
{
if (event.LogEvent.Level == ELL_ERROR)
{
// check event.LogEvent.text here
return true;
}
}
return false;
}
};
// in creating device just specify this class object as listener
CErrorListener listener;
IrrlichtDevice* device = createDevice(EDT_DIRECTX8, dimension2d<s32>(640, 480), 16, false, false, &listener);