Fullscreen OpenGL
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?
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]
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]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement