Jump to content
  • Advertisement
Sign in to follow this  
jmakitalo

Hiding OpenGL window in SDL

This topic is 2773 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, is it possible to hide an OpenGL window once it has been created with

SDL_SetVideoMode(wndWidth, wndHeight, 0, SDL_OPENGL | SDL_RESIZABLE |)

I have been googling this but have not found a working solution. Most of game data in my program
can be loaded only after the window has been created (OpenGL textures etc.) and I want the user
to see the console messages during the load, not a blank window. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
If SDL can't hide a window, maybe there is a way to set the focus on the console window so it is visible. Edited by avocados

Share this post


Link to post
Share on other sites
Just had an idea while working on my own event poll but it doesn't sound like it will work. I thought you could SDL_PushEvent an SDL_ActiveEvent but it sounds like it just copies this event into the event queue instead of creating the event.

http://wiki.libsdl.org/moin.cgi/SDL_ActiveEvent
http://wiki.libsdl.org/moin.cgi/SDL_PushEvent

Share this post


Link to post
Share on other sites
1. How about just resizing the window so it's very small?

2. This isn't how games normally display these messages -- they render them to the game window...

3. SDL_WM_LowerWindow() -- this requests the window be "lowered". It ought to put it behind your console window. There's a Raise to bring it back after the load has finished.

Share this post


Link to post
Share on other sites
4. SDL_WM_IconifyWindow -- SDL draws naming conventions from X11 in places. An "iconified" window in X11 is akin to a minimised one in Windows. There'll be one to bring it back afterwards.

Share this post


Link to post
Share on other sites

1. How about just resizing the window so it's very small?

2. This isn't how games normally display these messages -- they render them to the game window...

3. SDL_WM_LowerWindow() -- this requests the window be "lowered". It ought to put it behind your console window. There's a Raise to bring it back after the load has finished.


1. A bit of a hack. Also, I'm not sure that openGL window can be resized so that the context remains intact (textures etc.).

2. I think it still fits the mood of linux to display the loading messages in the regular terminal. Might scare the windows users, but I don't mind.

3. The iconification works ok. I tried to google for the function to bring up the window again, but didn't find it yet. Can you remember what it is?

Thanks for your replies. It is kind of odd that there doesn't seem to exist a direct way to hide the window.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!