Jump to content
  • Advertisement
Sign in to follow this  
tc_tianchao

OpenGL OpenGL exclusive fullscreen mode

This topic is 4695 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, As I know, in Direct3D, there are windowed mode and fullscreen mode in which the application uses the video card exclusively. My question is, in OpenGL, is there such an exclusive fullscreen mode? If yes, how can I switch my applications into that mode. Thanks a lot!

Share this post


Link to post
Share on other sites
Advertisement
When creating an OpenGL window you set the fullscreen parameter.

E.G:
CreateGLWindow("Window Title",640,480,16,TRUE)


The first param is the window title, the second is the height, third is the width, fourth is the colour depth and the fifth is fullscreen.

Share this post


Link to post
Share on other sites
Thanks a lot, Undeadlnsanity!

But is "CreateGLWindow" a standard OpenGL call? In fact, what I want to do is to detect an exclusive fullscreen OpenGL application. I think I need to hook the OpenGL method that an application may use to switch itself into fullscreen mode. Is there such a standard OpenGL method?

Share this post


Link to post
Share on other sites
Quote:
Original post by tc_tianchao
My question is, in OpenGL, is there such an exclusive fullscreen mode?


That depends entirely on the operating system and environment. Yes, some systems (for example, Windows, Linux and MacOS) do provide this feature, but the method for doing it is platform-specific.

Some platforms of course support nothing else (Consoles, DOS)

Quote:

If yes, how can I switch my applications into that mode. Thanks a lot!


In some cases you can't "switch" your applications into that mode, you have to choose it at startup (i.e. when (or before) the gl context is created).

Mark

Share this post


Link to post
Share on other sites
Thanks, Geocyte and markr!

In fact, I only care about Windows OS.

markr, do you mean that an application needs to call Windows APIs such as "ChangeDisplaySettings" to get itself in fullscreen mode, and OpenGL itself has no such functionality since it is platform independent?

Actually, what I want to find out is what an OpenGL application will do if it wants to use the video card EXCLUSIVELY. (I don't think "ChangeDisplaySettings" can tell the system whether the application will use the video card exclusively.) Thanks a lot!

Share this post


Link to post
Share on other sites
The CreateGLWindow looks like the NEHE function that wraps up most of the intialization required to get OpenGL running. Using ChangeDisplaySetting correctly should work. I don't understand why you need "exclusive" mode for anything. I think you should go fullscreen mode and leave it at that. Remember, the user might want to alt-tab out of the game so you need to be set up for that to happen. This applies especially in a windows environment because that is why windows was made the way it was, multi-tasking.

Share this post


Link to post
Share on other sites
I think he means that when it goes fullscreen, if you can make it so that only that application has access to the video card, in other words, the video card is all to program when it's in fullscreen.

Also, CreateGLWindow, that's a real function? What library/header?

EDIT: Either it's from SDL or you create it yourself, if you want to know how to create it yourself, I found a very nice page: http://www.morrowland.com/apron/tutorials/gl/gl_window.php

Also, to not waste space and create a new thread, is it possible to go into Fullscreen once already running the app? I know it is, what a dumb question, cause I've seen it in games, but can anyone refer me to any code that does this? Thanks.

Share this post


Link to post
Share on other sites
Thanks, guys!

kburkhart84, this is why I need to know what an OpenGL app will do if it wants to use the video card exclusively. While an exclusive fullscreen game is running, if I start a second exclusive fullscreen game (maybe by calling "CreateProcess" in a program), there will be a conflict and the second game may fail. What I need to do is to detect such games so that I can do something to prevent the conflict to happen. Does anyone have an idea?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!