Sign in to follow this  
SteveDeFacto

Can DirectX and OpenGL render to the same window?

Recommended Posts

SteveDeFacto    109
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
the_edd    2109
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
Erik Rufelt    5901
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this