Advertisement

opengl full screen

Started by February 10, 2000 09:33 PM
1 comment, last by ECKILLER 25 years, 1 month ago
is there a full screen flag for opengl like there is for DX??? if so what is it and to what function do i pass it to. thanks. ec ECKILLER
ECKILLER
You can call a win32 function called ChangeDisplaySettings:

DEVMODE dm;
memset(&dm, 0, sizeof(DEVMODE));
dm.dmSize = sizeof(DEVMODE);
dm.dmPelsWidth = 640; // your windowsize
dm.dmPelsHeight = 480; // your windowsize
dm.dmFields = DM_PELSWIDTH / DM_PELSHEIGHT;

ChangeDisplaySettings(&dm, CDS_FULLSCREEN);

When you create your window, don´t forget to use the
WS_POPUP flag (3rd argument).

Gandalf the White


Edited by - Gandalf on 2/11/00 5:36:15 AM
Gandalf the Black
Advertisement
Also, if you''re in glut, you can just call glutFullScreen(). Source code for that function is also available if you just want to copy and paste from inside it.

This topic is closed to new replies.

Advertisement