Direct Draw with OpenGL

Started by
5 comments, last by Thathmew 23 years, 12 months ago
Any pointers to info on setting up OpenGL to work with DirectDraw? I remember some articles and info on this from a long while back but haven''t been able to find them. And no, I don''t want to use D3D IM. I need OpenGL. thanks for any assistance, -m
mat williamsLead Programmer, DesignerZero Sum Softwarewww.zero-sum.com
Advertisement
Ok..You can''t use OpenGL and DDraw at same time..but, for example, you can initialize the video mode with DDraw and use OpenGL for 3D operations.
Why do you need them both?
Well, the game will be using 3D objects sprites with a 2d isometric background. I need to do the 3D objects in OpenGL and I''d rather do the 2D stuff in DDraw.

There is no overlap in operations, i.e. no DDraw calls in OpenGL.

mat williamsLead Programmer, DesignerZero Sum Softwarewww.zero-sum.com
I think the idea was to initiate DDraw, go fullscreen, create the flipping chain and then get a device context for the back surface and have OpenGL render on that. I''m not sure if anyone''s ever used that in anything big, and I probably don''t remember correctly.
That''s what I''ve ended up doing and it seems to be working well enough so far.
mat williamsLead Programmer, DesignerZero Sum Softwarewww.zero-sum.com
If you expect your program to work on most people''s video cards, anything I''ve read (including the main OpenGL FAQ) states that you should NOT mix the two. The reason is, many windows video drivers use DirectDraw internally to handle the surfaces for OpenGL. Better drivers have their own system to handle them both, but many don''t. You''ll end up having two separate DirectDraws fighting for control of the same window and you won''t like what happens as a result (crashes or freezing). I wouldn''t trust it if you care about compatibility.

This topic is closed to new replies.

Advertisement