Jump to content
  • Advertisement
Sign in to follow this  
Toolmaker

OpenGL Windowed OpenGL apps in Vista with Desktop Composition enabled?

This topic is 3628 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

I'm currently attempting to get our application to properly work under Vista with the Desktop Composition enabled. At this moment, I use a registry flag to disable the DWM when our application launches, but this is rather dirty and not very pleasant for the user. When rendering with the DWM enabled, I get a blank screen(Just white). When I force our application to render itself, the screen will flicker briefly, display and then disappear again. Backgrounds: - Application is a 3D CAM package, so full screen isn't an option. - I followed most recommendations in this guide: http://www.opengl.org/pipeline/article/vol003_7/ - I am handling the WM_ERASEBKGND messages - We do some GDI rendering on top of the results. I'm expecting the problems are caused by the GDI rendering. However, we do need to text rendered by the GDI for clarity for the user(The package is geared towards novice users who don't have a lot of experience in 3D space). Question is: what's the most efficient method of rendering everything correctly, without rewriting all our GDI rendering code as OpenGL function calls? Is there a way to render OpenGL to an offscreen bitmap/DIB and then render GDI on top of that? Or is my only solution to rewrite all the rendering of in OpenGL calls? Toolmaker

Share this post


Link to post
Share on other sites
Advertisement
Actually windowed opengl should work fine together with aero enabled. What hardware do u use? Are the drivers up to date? I know that ATI's initial drivers refused to work with opengl windowed mode under vista. The problems should be resolved by now though.

Share this post


Link to post
Share on other sites
Only a tought, but wouldn't rendering your GDI to a DIB and using that as a texture be another option? Might be a little less work than replacing all GDI calls with OpenGL versions.

Share this post


Link to post
Share on other sites
Quote:
Original post by cruZ
Actually windowed opengl should work fine together with aero enabled. What hardware do u use? Are the drivers up to date? I know that ATI's initial drivers refused to work with opengl windowed mode under vista. The problems should be resolved by now though.


It doesn't work on multiple Vista machines. Hardware on these machines are: Intel integrated, NVidia Geforce 8600M GT(Latest drivers) and an ATI HD 2400. On neither of these machines it works.

sebbit: That's an idea, but it would still require a massive amount of work to get around that. I'm currently trying to figure out why the render is overwritten with a blank, but I would appreciate the shortest route to getting it working.

Toolmaker

Share this post


Link to post
Share on other sites
Well, that article is pretty clear: mixing GDI and OpenGL is not supported when Aero is enabled. You can try all sorts of tricks with offscreen bitmaps and whatnot, but in the end it will all result in the same scenario: as soon as you use GDI on the same DC as an OpenGL context, Aero must be disabled. Otherwise everything you do will be undefined.

There might be some exotic tricks to overcome this, but keep in mind that even if they seem legit, you're scratching around in very dark corners of the drivers here. Expect a ton of driver bugs to pop up. OpenGL drivers on non-Nvidia hardware are already shaky enough without pushing them.

In order to get reliable and consistent behaviour across all types of systems, I'm afraid you won't have another choice than either reimplementing the GDI features you need in OpenGL, do something like sebbit suggested (expect a performance hit when doing this) or drop GDI altogether (which is probably not an option due to the existing codebase).

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!