Advantage to OpenGL

Started by
14 comments, last by PsYcHoPrOg 24 years, 1 month ago
Pythius, I understand where you''re coming from, but unfortunately, you''re completely wrong.

I know both API''s reasonably well ( well actually I told Direct3D to bugger off after version 3 ).
I''m a halfway decent graphics programmer ( I''m doing a PhD in computer graphics ), and having used both I know the advantages.

DirectX: DirectDraw is great - nearly direct-to-memory access under protected mode windows.. there''s a reason even quake used it to have its OpenGL calls draw to. The reason it''s great? ''cause Microsoft made damn sure you couldn''t do it without DirectDraw. So it''s just great ''cause there is nothing else.
Direct3D: UGH! Initialisation is worse than OpenGL... code is convoluted. Com makes entry-level programmers cringe. And then there was that nice thing where Microsoft said: Windows NT doesn''t need a DirectX version larger than 3, we''ll implement that in NT5! ( now Win2k ).

That SINGULAR mistake has put me off using DirectX forever. If microsoft feels they can alienate the entire professional developing world by limiting their high-performance graphics API to win95 and win98 they can go suck a lemon. Sure, now with win2k there''s support for DirectX7, about 3 years too late!


You say OpenGL offers less control. Maybe, but that''s not a bad thing, and it has a very good reason. It gives hardware vendors the chance to do it "their way" under the hood. All that needs to happen is that on a standard OpenGL call you get OpenGL conformant output, and how it''s done doesn''t interest anyone. By keeping the standard tight, it allows for much better hardware integration for basic functionality, and if you wish to use the hardware to the hilt you''ll have to go to assembler anyway.

OpenGL and Direct3D were going to merge at one point, in Fahrenheit, but talks broke down, allegedly over Microsoft''s unwavering line on their own system. They would not respect any of OpenGL''s original design principles.

So now they''ve gone their separate ways. Microsoft has copied openGL with their directprimitive stuff, if I recall correctly, and OpenGL is heading towards general acceptance of the 1.2 specification, hopefully including the image manipulation parts.
I will continue to use OpenGL for as much of my basic 3D as possible, and for the rasterisation stage, because of conformance and ease of use.


It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
Advertisement
Just for the record, I largely prefer OpenGL -- but you might want to take a look at newer versions of Direct3D, Keith, as Microsoft has addressed a large number of issues since version 3. I understand how many people might have been put off of it forever though, based on the early versions....

The thing I dislike most about OpenGL that isn't an issue with Direct3D is that, under Windows/wgl at least, there's no really usable option for mixing pure 2D with 3D. You can't access DirectDraw and the restrictions on using GDI with OpenGL are so strict that its virtually useless for games. Add to that the fact that the gl*Pixel routines on most drivers totally destroy performance when used and overlay support with consumer hardware drivers has been a bit spotty. So you're stuck taking bitmaps and texturing them onto flat polygons to get 2D effects like HUDs, etc... Which is fine for some things, but there are many cases where I'd much rather just blit some pixels to the backbuffer and be done with it.

Also, in recent years the OpenGL ARB has been a bit lax in getting new features and extentions into the main spec -- and many OS vendors still don't support 1.2 anyway. The end result of which is that we'll end up with a crazy number of vendor-inserted extentions that may or may not (usually not) do the same things in different ways (ie. two or more different extention APIs to do hardware bumpmapping). I think now that Fahrenheit is dead in the water this might be changing -- I hope so.

So... I feel OpenGL is far more elegant, and the cross-platformness of it is great. But Microsoft has the benefit of being dictator of what DirectX is -- which is bad insomuch as it means DirectX will basically only ever be for Windows derivatives, but its good in that they can move the technology forward with the hardware makers directly and not have to worry about the overhead of dealing with a multi-company committee.

Oh, and Keith, Quake doesn't use DirectDraw to draw OpenGL calls -- you can't do that reliably (it might work on some hardware/drivers but not all). They did use DirectDraw for the software renderer of Quake1/2, but when running OpenGL mode, DirectDraw was not used, just DirectSound and DirectInput were.





Edited by - gmcbay on 3/16/00 9:54:04 AM
File laoding code examples for various 3d files are available for OpenGL. dxf, 3ds, md2, half-life, cob, obj,lwo,,.

If people have a little patience, they can find them in the net. All free!

Joe
OpenGL is crossplatform, in a time when most people don''t want to be under M$ rule anymore, I think it''s very good.

OpenGL is well designed and supported by people who thought.
That''s a big difference between OpenGL and Direct3D, while one is following(Direct3D), the other is planning and previewing the future(OpenGL).

Of course all is not bad with Direct3D, I used the 7.0 and I find it usefull, but OpenGL is best to me.
It fit best in my logic.

The only reason why I continue being interested by Direct3D is the Dreamcast.
Even if the PowerVR chip prefer OpenGL.
(It''s a matter of facts)

Something you must think of :
As a PC user do you accept M$ rule, are you happy to see your favorite games only available for windows ?
If not, then don''t support only their platform, use openGL, if yes, use DirectX.

-* Sounds, music and story makes the difference between good and great games *-
-* So many things to do, so little time to spend. *-
Hmm, I''m sure you can get your OpenGL calls onto a DirectDraw surface.. I''ve never tried it though.

I was probably wrong about Quake''s GL calls then, but I know they never used Direct3D.

OpenGL''s 2D operation is indeed lacking so far. I was hoping that would change with the 1.2 spec because of support for convolution filters and such, but it seems they consider only 3D in their API. It''s hard to compare the two (OpenGL/DirectX) anyway, because they can do vastly dissimilar things. OpenGL and Direct3D perform just about the same functions though, and at more or less the same performance I suspect.

I think we need that new OpenAL, and an Open2D as well
But I''m going to stick with OpenGL, I''m never using Direct3D again.
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
openGL's problems on PCs are largely caused by crap graphics card drivers, which are optimized for the most common routines, and not for the less common ones (such as glreadPixels etc). Hopefully the situation will improve now that all PC graphics cards (worth mentioning) support the full openGL 1.1 implementation.

BTW, Keith, openGL can be used as a 2D graphics api by using an orthogonal perspective matrix, although I take the point that its functionality is somewhat limited compared to direct draw.


Edited by - benjamin bunny on 3/16/00 10:43:46 AM

____________________________________________________________www.elf-stone.com | Automated GL Extension Loading: GLee 5.00 for Win32 and Linux

This topic is closed to new replies.

Advertisement