Jump to content
  • Advertisement
Sign in to follow this  
SteveDeFacto

Can DirectX and OpenGL render to the same window?

This topic is 2679 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 know this may sound wacky and useless but if I could render to the same window it would make converting my project from DirectX to OpenGL a breeze because I could just replace different components with out needing to fully clear out all of the DirectX functions.

I know it would be too much work to actually get OpenGL to read or write from a directx back buffer or z-buffer but if I could write pixels to the view of the window I could start the conversion but just replacing the 2D UI and then work my way down from there. This would allow me to continue committing to my SVN repository without a long delay between revisions and a complete switch it the rendering system.

Share this post


Link to post
Share on other sites
Advertisement
You could do your work in a branch that is marked as "private" or "experimental" (by some branch-naming convention, perhaps).

Share this post


Link to post
Share on other sites
If you create a GDI compatible texture, you can lock it to get a HDC and draw to it with OpenGL and a bitmap pixel format. It's probably not the best idea though, and won't be too fast. I'm not sure if you can get alpha values with it even..

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!