PDA

View Full Version : Full Screen Mode



moxx
01-13-2002, 10:29 AM
Does anybody know how set something like an exlusive mode using Only OpenGL, without having any business with DirectX? And to adjust Screen Resolution I want?
Thnx.

Leyder Dylan
01-13-2002, 10:41 AM
Glut

zed
01-13-2002, 11:17 AM
i prefer sdl to glut

pleopard
01-13-2002, 12:28 PM
It cant be done with OpenGL alone. Why? Because OpenGL is not a windowing API, rather it is a graphics API for rendering stuff in previously acquired contexts. You can use glutFullScreen() if you are using the GLUT tooliit, you can use ChangeDisplaySettings() in the Win32 API. I am sure there are other ways but the answer is that OpenGL aint gonna do it for ya.

moxx
01-13-2002, 01:22 PM
Ok. glut. But I'm using Borland Builder C++ and it doesn't support neither GLUT nor GLAUX! What should I Do?
Isn't it dangerous to use DirectDraw, for instance, with OpenGL. I mean functions like:
- SetCooperativeLevel;
- SetDisplayMode.
Thnx

Omaha
01-13-2002, 01:43 PM
There's a plain vanilla Win32 call named ChangeDisplaySettings. It should do what you need, so do look it up.

Anders
01-14-2002, 02:34 AM
You might want to take a look at this tutorial:http://nehe.gamedev.net/tutorials/lesson01.asp

It explains how to set up a full screen app. without Glut. There should be a link at the bottom for a Borland 5.0 implementation of it. Hope it helps.

moxx
01-15-2002, 12:02 PM
Thank You ALL. It works. I hope for Your help in future

marcus256
01-16-2002, 12:29 AM
I'm not sure about how GLUT does it, but the NeHe version has some flaws (for instance it does not handle ALT+TAB situations). Version 2.0 of GLFW will do the trick. It will hopefully be released within a few weeks, until then you can check out GLFW 1.0.2 at http://opengl.freehosting.net/glfw/

With GLFW you open a fullscreen window with the command:

// GLFW v1.x
glfwOpenWindow(
640, 480, // Screen size
5, 6, 5, // R,G,B bits
0, // Alpha bits
16, // Depth bits
0, // Stencil bits
GL_TRUE // We want fullscreen
);

// GLFW v2.x
glfwOpenWindow(
640, 480, // Screen size
5, 6, 5, // R,G,B bits
0, // Alpha bits
16, // Depth bits
0, // Stencil bits
GLFW_FULLSCREEN // We want fullscreen
);
Unlike the NeHe code, you will always get fullscreen mode if you request it (but it may have other dimensions and/or color/alpha/stencil buffer depths than you request). Under GLFW v2.0 things like Alt+Tab are handled (and can even be disabled with the command glfwDisable( GLFW_SYSTEM_KEYS ) http://www.opengl.org/discussion_boards/ubb/wink.gif.