"Jean-Christophe" wrote in message news:mqtm4q$eq7$
[email protected]...
I'm writing an OpenGL app under Windows and I'd like
to have the viewport to full screen, how do I do that ?
That's pretty much the content of NeHe Lesson1. My
recollection is that NeHe uses 16 bits per pixel which my
current video card and monitor (GTX 650 and 50HU6950)
don't support so you would have to change to 32 bpp.
Also Lesson1 changes resolution to 640 X 480 which is
suboptimal on the above video subsystem. You can use
GetSystemMetrics to get the current dimensions of the
screen which one would normally assume are the optimal
dimensions unless the user like to do things suboptimally.
But since Windows Vista or so, Windows lies to you about the
dimensions of the screen, so you have to use SetProcessDPIAware
to tell Windows not to lie, but since older versions of Windows
don't have this API, you have to attempt to load it dynamically
via LoadLibrary/GetProcAddress and only if that worked you
can invoke SetProcessDPIAware. Annoying that you have to
invoke those extra 3 functions before GetSystemMetrics works,
but that's Windows.
I think I have an example in Fortran at
http://home.comcast.net/~kmbtib/Fortran_stuff/testpattern.zip
Newer versions of Windows use SetProcessDpiAwareness
which complicates matters further and is used also in the
above example.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)