Jump to content
  • Advertisement
Sign in to follow this  

Can DirectX and OpenGL render to the same window?

This topic is 2591 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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!