Page 1 of 1

get width and height of screen

Posted: Mon Nov 01, 2010 5:40 pm
by nevarim
hi all

how can i get height and width of screen resolution ?

thanks

Nevarim

Re: get width and height of screen

Posted: Tue Nov 02, 2010 1:17 am
by alexdbkim
nevarim wrote:hi all

how can i get height and width of screen resolution ?

thanks

Nevarim
Hi Nevarim,

your question is little bit vague. =) Are you want to know the screen resolution of your monitor? or your application? If it was your application then I guess you are referring to the viewport of your application.

http://www.ogre3d.org/docs/api/html/cla ... wport.html

There are a number of useful methods in the class allow you to get the viewport size values.

Regards,
Alex Kim

Re: get width and height of screen

Posted: Tue Nov 02, 2010 1:28 am
by haltendehand
The vertical resolution of your application window is returned by the function getActualHeight in the Ogre::Viewport class.
The horizontal resolution of your application window is returned by the function getActualWidth in the Ogre::Viewport class.

Re: get width and height of screen

Posted: Tue Nov 02, 2010 12:39 pm
by nevarim
is this :D thanks

Re: get width and height of screen

Posted: Tue Jun 16, 2015 7:15 pm
by swuth
I find that this doesnt work when using 1280x1024.

The width is correct but for some bizarre reason the height is returned as 993..... anyone else experiencing this?