I am looking to make my game automatically start in full-screen mode at the same screen resolution as the desktop (1440x900 on my machine, variable on others).
On Windows, after including the Windows API, this can be used to create an fullscreen Irrlicht device at the Windows desktop resolution (assuming a 32-bit display, D3D9, plus a receiver object):
> IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D9, core::dimension2d<s32>(GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)), 32, true, false, true, &receiver);
However, I am wondering if this can be done from within Irrlicht without invoking the Windows API?
If so, how is this done?
I also need to grab the desktop resolution for the Linux version of my game (I'm using Ubuntu 8.10).
I successfully ported it from Windows and got it working under Ubuntu, however it lacks this important feature.
If Irrlicht is not able to detect the desktop resolution, can anyone recommend a (small and tight) API which provide this functionality under Linux (especially Ubuntu) AND is usable with Irrlicht?
An example of how this may be done would be particularly helpful here.
How do I grab the desktop resolution for Irrlicht?
maybe this can help you: irr::video::IVideoModeList::getDesktopResolution()
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Thanks for the help.
If I may post the solution to my own question, I got it working the following way (Irrlicht 1.5):
> IrrlichtDevice *nulldevice = createDevice(video::EDT_NULL);
> core::dimension2d<s32> deskres = nulldevice->getVideoModeList()->getDesktopResolution();
> nulldevice -> drop();
> IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D9, deskres, 32, true, false, true, &receiver);
Is this the best way to do this?
If I may post the solution to my own question, I got it working the following way (Irrlicht 1.5):
> IrrlichtDevice *nulldevice = createDevice(video::EDT_NULL);
> core::dimension2d<s32> deskres = nulldevice->getVideoModeList()->getDesktopResolution();
> nulldevice -> drop();
> IrrlichtDevice *device = createDevice(video::EDT_DIRECT3D9, deskres, 32, true, false, true, &receiver);
Is this the best way to do this?
at least it's what I suggested...
and I think it's the easiest way...
and I think it's the easiest way...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java