On 10/9/06, Thibault Genessay <[EMAIL PROTECTED]> wrote:
Hi
On 10/9/06, Serge Lages <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Sorry for this basic question, but I can't manage to get the screen
> resolution of my app during run-time. I tried to use the display
> settings but the values returned don't seem correct (something like
> 0.6 where I need 1024 for example).
>
> Have I missed something ?
>
If by "resolution" you mean the physical dimensions of the window, then you
can do:
int x,y;
unsigned int width, height;
Producer::RenderSurface* rs = viewer.getCamera(0)->getRenderSurface();
rs->getWindowRectangle(x, y, width, height);
std::cout << "Window size & pos: " << width << "x" << height << " at " << x
<< "," << y << std::endl;
Thank you very much, it goes totally out of my mind to look at where
it is the most logical, the camera. Let's say I was tired.... :)
--
Serge Lages
http://www.magrathea-engine.org
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/