views:

429

answers:

3

Hi,

I'm developing an application with two windows:

  • Window 1: Renders direct draw surfaces
  • Window 2: I'd like to have it do pure OpenGL calls

I don't want to mix OpenGL and DirectDraw in the same window.

I see from the Open GL FAQ (http://www.opengl.org/resources/faq/technical/mswindows.htm) that you can't mix the API calls inside the same window.

So, my question is: can one application have a window doing direct draw and another doing OpenGL?

Thanks. Jeff

+1  A: 

Worst-case: have your main program spawn do one type of rendering (DirectDraw, let's say). Have it spawn a process which does the other type (OpenGL). Communicate between the two using pipes. This will require you to have two executables, and it might be a bit of a workaround, but it will at least work.

Claudiu
You can have two processes with the same executable: just use a different conditional branch in the child process.
Judge Maygarden
A: 

Hmmmm.....I've isolated the OpenGL stuff to one thread. Is that what you mean? Or, I think you are saying start a new process.

The issue is: I'm seeing the DirectDraw code crash on a BLT. It is random, but I'm concerned that the OpenGL stuff is killing it.

A: 

There should be no problems running both in the same process, barring of course bugs in the ICD video driver.

Probably the quickest way to tell is commenting out OpenGL code and check if the application still crashes.

Or, force your OpenGL code to use Microsoft implementation - it's software based on XP and Direct3D based on Vista - that should not have conflicts. If the ddraw problem still is there, most probably is not OGL fault.

Marco M.