Issues with OpenGL and Aero on Windows 7

Started by
3 comments, last by Bearhugger 14 years, 2 months ago
I'm not sure if it is OpenGL or SDL that is the problem, so sorry if this is not the right board. Anyway, I have a small (but annoying) issue with my OpenGL game. Whenever I run my game in full-screen, Aero dies and I lose the transparency effect of every window, the small window previews when I hover the mouse cursor over a window's button in the task bar, and other similar desktop features of Windows 7. (Same effect as when I unplug my laptop and the system goes to battery saving mode.) I did some searchs on Google and I discovered that some graphic card drivers disable Aero when a OpenGL application goes full-screen in order to preserve performance. This is totally fine, except that Aero is never re-enabled, and the only way I have found to restore it is to reboot my system. I've run other applications that use OpenGL to make sure that it is not my game, and the same thing happens. These problems began occuring recently, so I suppose it is a driver update that caused this... but I could be wrong. Does anyone have a solution to fix this? Or should I just port the game to DirectX and get over with this sloppy OpenGL support?
Advertisement
OpenGL isn't sloopy. I had the same Issue with Win7 Beta. I am using SDL with OpenGL too. Having Win7 Ultimate now, solved the issue for me. What version are u running?

This is how I initialize OpenGL:
#define NIGHTLIGHT_SDL_VIDEO_FLAG SDL_OPENGL//-----------------------------------------------    // Start SDL    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER ) == -1)    {        NLTrace("Cannot initialize SDL!");        throw NLException("Cannot initialize SDL!", true);            }    // Prepare Flags for SDL    long flags = NIGHTLIGHT_SDL_VIDEO_FLAG;    if (m_settings.fullscreen)    {        flags |= SDL_FULLSCREEN;    }    // OpenGL-Flags    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);    SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);    SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);    SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, m_settings.bpp);    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);    SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, m_settings.fsaa);    // Create Window    m_window = SDL_SetVideoMode(m_settings.width, m_settings.height, m_settings.bpp, flags);    if (m_window == NULL)    {        NLTrace("Cannot create SDL-Window!");        throw NLException("Cannot create SDL-Window!", true);    }    // Choose perspective    if (m_settings.mode == NightLight::OpenGL2D)    {        this->initGL2D(m_settings.width, m_settings.height);        NLTrace("Ortho-View chosen by NLWindow().");    }    if (m_settings.mode == NightLight::OpenGL)    {        this->initGL(m_settings.width, m_settings.height);        NLTrace("Perspective-View chosen by NLWindow().");    }    // Init Glew    glewInit();  	// Dump infos about renderDevice to the log.    this->dumpInfos();    // Bring mouse to the middle of the screen.    SDL_WarpMouse(m_settings.width / 2, m_settings.height / 2);    // Set Caption    SDL_WM_SetCaption(m_settings.caption.c_str(), NULL);

HTH
regards
I use and create games with OpenGL and Windows 7 x64 and have yet to encouter any problems like you describe. If SDL handles the windows I would probably say its something your doing wrong with SDL.
I had similar issues that were fixed with different drivers. In one case I was just left with a transparent rectangle where the opengl context should be when rendering with aero turned on, and it worked fine when rendering in the windows classic theme.
Thanks for the answers.

I don't think it is my code that has a problem because running World of Warcraft with the OpenGL flag gives me the same effect, and ditto with ZSNES.

My version of Windows 7 is Family Premium Edition. I've tried updating my driver and the OS but everything is up-to-date. If it matters, the problems I describe occur on a recent laptop with a GeForce GT 220M video card.

This topic is closed to new replies.

Advertisement