View Full Version : School Research Project
02-10-2001, 05:00 PM
Okay, I'm not trying to start an OLG vs. D3D war. For a research project in school I am trying to gather information about the advantages and disadvantages with both OGL and D3D. If anyone would like to submit some ACTUAL(no opinions unless stated as such) examples and info on this please do. It would help a lot.
02-10-2001, 11:32 PM
For starters, you may want to say WHICH version of DX. 3,4,5,6,7 are basically dogs. 8 is pretty good from what I hear.
I would get the SDK for DX (whatever # you want), and just read the functions, and the parameters and all that good stuff, then you can compare if you want.
And yes, that is my opinion. :P
I don't know much about D3D, but here is some cons and prons.
hard to program
doesn't handle textures very well
not so efficient
handles textures nicely
vastly backed up by MS
One difference is that OpenGL games always run faster than D3D (unless your ogl drivers are screwed).
OpenGL programs take longer to develop, but tend to be more efficient.
D3D is easy to develop, but programs are large and inefficient.
Here is a somewhat similar example:
We were supposed to write a program that loads 3D object from a file on the disk. The structure of the file was somewhat fixed, but we had to support object that may have up to 1 million vertices. The program had to do other things like rotations/trackball etc.
So I spent about 2 weeks writing the progy in C using glut. My friend spent 4 days writing it in C++ with help of STL files etc.
The difference? my program is only 64Ks, during loading the cpu usage goes to 70% for a fraction of a second and that's it. My friend's code is 550Ks and loading takes quite a few seconds with the cpu usage at 100%.
This doesn't exactly show the advantage of the opengl over d3d, but the difference of the two is like the above. Using C++ STL for a simple program is like hitting a fly with an elephant. D3d doesn't always have the most elegant solutions. But it is fairly good for prototypes.
Just my 2cents,
02-11-2001, 02:35 AM
opengl is alot easier to use than any version of dx, although I here dx8 is a little better than the previous versions. Linking dx progs is impossible; I first tried 3d programming with dx and after weeks of trying a simple tutorial to load up a blank screen I gave up. I started on OGL and after downloading glut I got started and in about 10 minutes I had a fully working program. It only yook me about a week to race through NeHe's tutorials.
OGL is THE only serious proffesional 3d graphics API with H.W. support (Nvidia Quadro 2 pro, Diamond FireGL 2 etc.)
OGL is amzingly portable and is the only proper API for most other OS like linux, unix, MacOS, FreeBSD, BeOS etc.
The opgl sdk is tiny, infact with windows you probably wont have to download anything depending on your complier- try downloading the dx sdk.
Look at http://msdn.microsoft.com/downloads/default.asp under dx8 sdk downloads and read people's comments- their is alot of Pi**ed off people!
Although dx apears to have lots of useful functions and tools such as loading *.x 3d models once you have progressed these functions are pointless, slow, unused and a waste of space- look at the size of the programs created with dx compared to ogl.
OGL is usualy faster than dx in games although in simple demos this isn't always the case, however the differences is small.
Dx doesn't have a stencil buffer ( hmm, maybe dx 8 does?) and so clipping shadows and reflections is hard.
02-11-2001, 06:01 AM
Rizo, you're some kind of god or something? You think D3D is MORE EASY to program than OGL? I really don't and agree with Tim in almost every point.
02-11-2001, 06:28 AM
Oh come on Tim, the only reason the DX 8 SDK is big is because it contains the runtime files, the debug runtime files, the DirectX control panel, the massive help file, and a ton of examples and source code. You are comparing that to just a few runtime libs and headers you may have gotten with your compiler? The fact that the DX 8 SDK is large, is merely due to Microsoft providing very good support. And yes, DX 8 does support stencil buffering. In fact with DX 8, it is now nearly just as easy to create the device interface as it is in OpenGL to create the RC. Other than that, I'd tend to agree, OGL is supported professionally, and OGL programs tend to be smaller and faster (in my experience at least).
[This message has been edited by DFrey (edited 02-11-2001).]
02-11-2001, 11:35 AM
Here is a little story about D3D.
My co-worker had some OpenGL projects. Then he found that his accelerator doesn't accelerate GL at all. So he started programming his next project (rendering some cubes from MathCAD) on DX7. It was accelerated and worked faster in software mode. But it is many times harder to write anything(sometimes it's a problem to lay textures). He even says that D3D alters his programming style - he has to be more disciplined.
D3D is greatly hardware-dependant(even different software devices produce different images).
And there are no libs for Borland compilers. And MSVC really sux(that's not only my opinion). So he had to make a DLL that translates libs to make it working in C++Builder.
Even IM samples that came with SDK didn't work - they say there are no DX devices(maybe those who wrote that samples were complete idiots).
When he decided to implement font it was a great problem - there is no ready font(like wgl), there is no tesselator.
Then he downloaded DX8 SDK. It has many useful things. But samples work only
on ReferenceRasterizer - thing that is even slower than simple software.
Another problem was that they altered everything.
So he returned to DX7 Immediate Mode. Now his project works fast enough even
on bad computers(where GL works really slow).
02-13-2001, 04:42 AM
I must say that Direct3D (also dx8) is almost impossible to program. It was very easy to start programming with OGL, but when I recently got DX8 SDK, I couldn't do anything with it. In my opinion OGL is a lot more easier to use than DX. Example vertexbuffers in DX is something that I cannot understand after using OGL. In OGL you can use vertexs on fly, but in DX you must define them before you use them?!? (I'm not exactly 100 percent sure about it, but that's how I understood it)
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.