Board index » cppbuilder » OpenGL vs DirectX

OpenGL vs DirectX

I'm wondering about the relative ease-of-use, and functionality of OpenGL
and DirectX. Anybody have an opinion on which native API (non-component) is
a) easier to implement, b) richer, in terms of built-in functionality?
Thanks for any comments!
Regards,
Rob Wilson

 

Re:OpenGL vs DirectX


First of all, DirectX is a collection of more than just graphics
technologies. It also supports networking, sound, etc.
The graphics technologies are called DirectDraw, and Direct3D
RetainedMode/ImmediateMode.
DirectDraw is cool. It actually gives the developer access to video
memory. It is very fast and relatively easy to use.
Direct3D RetainedMode is a high level library for 3D programming. It
provides COM interfaces to create a 3D scene rather easily.
Direct3D ImmediateMode is the underlying low level technology of
RetainedMode. ImmediateMode is what is used to render each indvidual
triangle to the screen.
I cover the use of DirectDraw and Direct3D RetainedMode with Builder in
the upcoming "Borland C++ Builder3 Unleashed" book from SAMS/Borland
Press. If you are interested in these technologies, these chapters would
be a good introduction.

OpenGL is a 3D graphics library. It is low-level like Direct3D
ImmediateMode but way easier to use. OpenGL is also system independent.
This is because OpenGL was designed to be this way. It is not owned by
any company and is defined by a review board. For more information on
OpenGL check out www.opengl.org. You may also consider using one of the
OpenGL components available for Builder to get  quickly up and running.

As far as your questions of which API is
a.)easier to implement and
b.)is richer, in terms of built-in functionality
I will side with OpenGL. However, I must mention, OpenGL doesn't get the
same performance on a Windows machine as DirectX. But hopefully this
will change with the slew of OpenGL accelerated video cards hitting the
market.
//jt

Re:OpenGL vs DirectX


I agree OpenGL is much easier to work with...but good news Microsoft and Sun
have joined together to implement a new OpenGL version for the Windows
environment ( and probably other OSs )  OpenGL IMHO appears to be a fairly
rich set of graphics libraries that make game programming ( and heck other
graphics programming too ) very easy.

 DirectX has the benefit of being widely support by almost every Windows 95
accelerator card...though I'd still go with OpenGL.

Hey maybe the next version of Direct3D ( after DirectX6 ) will be called
DirectGL :)?

Joel Dudgeon
GRea...@netcom.ca

P.S.  John where can I get those OpenGL components you spoke of?
         Thanks

Re:OpenGL vs DirectX


Quote
"Joel Dudgeon" <grea...@spam-me-not.netcom.ca> wrote:

*  Hey maybe the next version of Direct3D ( after DirectX6 ) will be called
*  DirectGL :)?

Wow man you have *vision*

Maybe you should consider a job at Microsoft PR...

---
Design your Exception class hierarchy well...

       VCL+MFC+API+OCX == new *Modern_Developer;

Re:OpenGL vs DirectX


Thanks for both your replies. John, I'm looking forward to your BCB3
unleashed, but so far haven't been able to find it in the bookstores. I'm
sure it'll show up soon though...
It sounds like OpenGL is the way I want to go, but what about sound? Do you
miss DirectSound (or what's it called?) or do you usually find there's
enough in the Win32 API to take care of sound in, say, a game kind of
thing. Thanks again...
Rob Wilson

Re:OpenGL vs DirectX


Quote
> P.S.  John where can I get those OpenGL components you spoke of?

The first one I had seen(so it's been around the longest) can be found
at  http://pc-heartbreak.physiol.ox.ac.uk/. It was written by Alan Garny
who is a frequent contributor to this group. There is another one by a
Daniel Plakosh but I am not sure how to get it. His email
is                         dplak...@michelle.cobweb.net.
//jt

Re:OpenGL vs DirectX


DirectSound appears to be the way to go...I am actually not aware of any
other optimized library/API for actually doing high performance sound.
Standard WIN32 sound APIs are fine for applications but not for high
performance games ( first-person, flying etc ) games.

Hey if its good enough for Quake II and the idsoftware crew I think its good
enough
Though I should point out that many people ( including some at idsoftware )
have said that DirectSound is dreadfully slow..but slow relative to what I
don't know...and yet it is very widely used...

So:

Use OpenGL and DirectSound :)

Joel Dudgeon
GRea...@netcom.ca

Quote
Rob Wilson wrote in message <01bd4cb3$1e817720$04010a0a@rocco>...
>Thanks for both your replies. John, I'm looking forward to your BCB3
>unleashed, but so far haven't been able to find it in the bookstores. I'm
>sure it'll show up soon though...
>It sounds like OpenGL is the way I want to go, but what about sound? Do you
>miss DirectSound (or what's it called?) or do you usually find there's
>enough in the Win32 API to take care of sound in, say, a game kind of
>thing. Thanks again...
>Rob Wilson

Re:OpenGL vs DirectX


OpenGL is easier, it's clean, you'll be up and running in 1/2 an hour
- try that with Direct3d.
To get a nice picture, sign up to the openGL and direct3d game dev
lists and look at the traffic:
OpenGL - cool stuff based i.e. how to do shadows, optimizing etc.
Direct3d - where is my surface, by is the screen black ect. :)

-Ed

Rob Wilson <me@myplace> wrote in article
<01bd4ab4$fb51c250$04010a0a@rocco>...

Quote
> I'm wondering about the relative ease-of-use, and functionality of
OpenGL
> and DirectX. Anybody have an opinion on which native API
(non-component) is
> a) easier to implement, b) richer, in terms of built-in
functionality?
> Thanks for any comments!
> Regards,
> Rob Wilson

Re:OpenGL vs DirectX


Quote
In article <01bd5944$0504c9d0$02000064@grommit>, "Edward Povazan" <epova...@compuserve.com> wrote:
>OpenGL is easier, it's clean, you'll be up and running in 1/2 an hour
>- try that with Direct3d.
>To get a nice picture, sign up to the openGL and direct3d game dev
>lists and look at the traffic:
>OpenGL - cool stuff based i.e. how to do shadows, optimizing etc.
>Direct3d - where is my surface, by is the screen black ect. :)

>-Ed

Can you post where to get on those lists at?

Milo

Other Threads