I'm having a problem with the OpenGL renderer. I've made a program consisting of various GUI elements and it worked fine in Software mode. However, when I recently tried changing the driver type from Software to OpenGL, the app would always crash at a random point (usually after a few seconds from starting). I found it really strange, so I stripped the code to the following several lines:
Code: Select all
#ifdef _MSC_VER
// We'll also define this to stop MSVC complaining about sprintf().
#define _CRT_SECURE_NO_WARNINGS
#pragma comment(lib, "Irrlicht.lib")
#endif
// include headers
#include <stdio.h>
#include <stdlib.h>
#include <irrlicht.h>
#include <iostream>
using namespace std;
using namespace irr;
int main()
{
IrrlichtDevice* device = createDevice(video::EDT_OPENGL);
if (device == 0)
return 1;
device->setWindowCaption(L"test");
video::IVideoDriver* driver = device->getVideoDriver();
while (device->run())
{
driver->beginScene(true, true, video::SColor(0,200,200,200));
//cout << "something" << endl;
driver->endScene();
}
device->drop();
return 0;
}
Does anyone know what might be causing this problem? I'm using OpenGL all the time for a game I'm developing and I've never encountered such an issue before...
P.S.
I'm using Irrlicht 1.7.2