Fullscreen OpenGL

Started by
1 comment, last by playworker 21 years, 12 months ago
Just a quickie, is the only way to do fullscreen OpenGL to create a maximised window with no border and toolbar or is there a better way?
Advertisement
This is how I do it:

After setting the screen resolution using ChangeDisplaySettings, call the following code:

SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, width of screen, height of screen, 0);
ShowWindow(m_hWnd, SW_SHOWNORMAL);
UpdateWindow(m_hWnd);

m_hWnd is the handle of the window, of course.

Now you can create your OpenGL instance and tag it to the program window, and it will be full screen.

The window itself was created with the style WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS



[edited by - Waverider on April 26, 2002 8:11:26 AM]

[edited by - Waverider on April 26, 2002 8:11:39 AM]

[edited by - Waverider on April 26, 2002 8:12:07 AM]
It's not what you're taught, it's what you learn.
Thanks, I was just making sure I was doing it right

This topic is closed to new replies.

Advertisement