How to make DirectDraw work with OpenGL?

Started by
7 comments, last by ayden 22 years, 9 months ago
Hi ppl! Does anyone know how to make DirectDraw work with OpenGL? Is it possible? Pls advise. Thanks.
Advertisement
No you can''t get them to work together. Both API:s try to control the graphicscard.



/JanneVee
"Some People even believe that COBOL is a real programming language." Scott Meyers - Effective C++
/JanneVee"Some People even believe that COBOL is a real programming language." Scott Meyers - Effective C++
actually it''s been done before.

HHSDrum@yahoo.com
Polarisoft Home Page
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
it is possible with certain cards but not all cards thus its not advisable to do it

http://members.xoom.com/myBollux
Not gonna work unless you put an insane amount of work into it, and have patience... In the end, its not going to work. Don''t try, pretend that you are actually having it work though. That may ease your programming ego a bit. Sorry, I''m tired. Bye.

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials
Isnt it possible firstly to call DDraw, use it, then release it and initialize OpenGL??? I mean firstly to call DDraw to make menus and stuff, for so to call OpenGL when the game starts... To try to make them cooperate in game would be to practicaly murder the performance
Sirion----------------We`re all doomed
1) don''t do it at the same time. you will not remain sane
2) you probably could use ddraw, draw 2d only, release and init opengl for the game, but why? You can do 2D easily in GL and at a fair performance. glDrawPixels is notoriously slow, but if you make your components all parts of an RGBA texture and use polygons in ortho mode its fine and no more difficult than regular 2d drawing. saves headaches. See PLGUI for an example (part of the portalib distribution in 0.3)

HTH...

~~~
Cheers!
Brett Porter
PortaLib3D : A portable 3D game/demo libary for OpenGL
~~~Cheers!Brett PorterPortaLib3D : A portable 3D game/demo libary for OpenGLCommunity Service Announcement: Read How to ask questions the smart way before posting!
Just popping in to reiterate what others have said above. A lot of OpenGL drivers make use of DirectDraw internally and that usage will conflict with your usage of DirectDraw causing all sorts of ugly problems. You may get it to work with your particular video card, but it will fail with others. Don't do it.

There was some push to get Microsoft to allow merging DirectDraw and OpenGL back in the DX3/OpenGL war days, but Microsoft never publically addressed the issue and let it fall by the wayside.

Of course, you can still use other DirectX components (like DirectInput and DirectSound) with OpenGL. And you can use OpenGL to do 2D rendering, using either texture mapped orthographic quads or its pixel drawing routines (which tend to be slow, I suggest looking into using the 3D texture hardware for blits). If you look around on sites like this (and search on google) for 'OpenGL and 2D' you'll find a bunch of useful information.



Edited by - gmcbay on July 14, 2001 12:44:17 AM
quote:Original post by ayden
Hi ppl! Does anyone know how to make DirectDraw work with OpenGL? Is it possible? Pls advise. Thanks.


Ok, first of all, as everydoby mentioned already, it''s not going to work. It can be done, but in the end, you still have to choose between one or the other or some of the functions will clash... Anyhow, why would you need to have DirectDraw with OGL???



"And that''s the bottom line cause I said so!"

Cyberdrek
Headhunter Soft
A division of DLC Multimedia

Resist Windows XP''s Invasive Production Activation Technology!

"gitty up" -- Kramer
[Cyberdrek | ]

This topic is closed to new replies.

Advertisement