Get dimensions?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
eudemon
Posts: 14
Joined: Mon Jul 04, 2005 2:48 am

Get dimensions?

Post by eudemon »

I feel dumb asking this, but is there no function that returns the current resolution of the irrlicht device? It seems like it would be simple and useful, but after searching the forums, API documentation, and the source itself for a little while, I cannot seem to find it.

I suppose it wouldn't be that difficult to add myself if necesary though. Just wondering if I'm missing something obvious.
Guest

Post by Guest »

getVideoModeResolution
Guest

Post by Guest »

Ah, thanks.
Guest

Post by Guest »

This was exactly what I needed, thanks again.

Now, how would one check to see whether the device is fullscreen, or using a stencilbuffer or vsync? As far as I can tell neither, the device, nor the driver, nor the videoModeList has a function to return these parameters.

Also, whenever I use the getVideoModeDepth function, it returns a zero. Shouldn't this be either 16 or 32, depending on what the orginal parameter was in createDevice?
Guest

Post by Guest »

SIrrlichtCreationParameters
eudemon(logged out)

Post by eudemon(logged out) »

Yes, I know about SIrrlichtCreationParameters struct, but will that allow me to find information about a device that already exists? I thought it was strictly for use by the createDeviceEx() function.
eudemon
Posts: 14
Joined: Mon Jul 04, 2005 2:48 am

Post by eudemon »

I've replaced the several globals with the single struct, which is a little better I guess. But I'd still like to limit the global objects to the device itself if at all possible. Is there any way to access these parameters directly from the device, rather than using the seperate object to store them?

Also, I still am only getting a zero from getVideoModeDepth. Anyone have any idea what I'm doing wrong?
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

Code: Select all

video::IVideoModeList* modesExist = device->getVideoModeList();
s32 DesktopDepth = modesExist->getDesktopDepth();
eudemon
Posts: 14
Joined: Mon Jul 04, 2005 2:48 am

Post by eudemon »

That gives me a zero as well. :?
Post Reply