In the second sample(your code), the 'device' is defined after the level is loaded, when loading the file it has to have an active window.
So you might have to leave the device before the level loading, but you could change when the level is loaded(e.g. after a certain button is pressed it loads the map and nodes)
Don't know if this is any help I'm fairly new to irrlicht, so this post isn't 100% credible
The Null device is meant for such purposes. Create a NULL device, do the file handling, close the device and reopen the one which has the specified driver.
Anonymous wrote:or do it the "recomended" way and use the registry!
After searching about two hours for "registry" in ISO C++ standards and Linux programming guides I give up. So what is this fancy new "recommended" and portable technique You failed
BTW: How would you choose the driver initially without having a device and thus without having a GUI? And using files is not restricted to Irrlicht devices, so you could use C++ methods for this as well. This would keep portability instead of mess with registry.
he said he was reading a config FILE and did not mention portability or a user selecting a driver on startup. reading the registry is far cleaner than creating a null device just to loose it. if that is ALL he want's to do. The stuff you added are different question all together to which I would never have answered as I did previously
Read up on MS guidlines sometime, your job as a windows coder is not to follow c++ standards if it means making tasks more convoluted and unclean on windows systems. You can read the registry with a few simple calls using mssdks files (just copy the code into your own files job done).
If he is writing for some other OS then he should specifiy that, I think it's safe to assume windows is being used unless specified.
If you're following Windows guidelines you won't be able to use OpenGL in the near future, so what should be the choice for the user? So in this case just try DirectX9, if that fails use DirectX8. So what?
OpenGL will be not 'directly' supported only in windowed mode (in windowed mode the library will translate opengl instructions in directX instructions). There will be full support for opengl in fullscreen mode.