Board index » cppbuilder » OPENGL VS. Directx

OPENGL VS. Directx

Hi Everybody,
    I want to programming fast graphic in C++ Builder but i don't know
what should i use between DirectX and OpenGL and What different between
them?
Thank you.
 

Re:OPENGL VS. Directx


Quote
bluedragon <bluedra...@hotpop.com> wrote in message

news:38759CC4.DB2FF945@hotpop.com...

Quote
> Hi Everybody,
>     I want to programming fast graphic in C++ Builder but i don't know
> what should i use between DirectX and OpenGL and What different between
> them?

Go to www.deja.com and search the OpenGL and DirectX newsgroups for this
topic.  This "religious war" has been hotly debated.

The 2 most important distinctions are

1) OpenGL is a graphics API.  DirectX is a game API.  Direct3D and
DirectDraw are the subset of DirectX that you need to compare to OpenGL.

2) OpenGL is cross platform ( Intel, Apple, UNIX workstations, and LINUX ).
DirectX is Intel/Microsoft only.

If all you are concerned about is "fast graphics" on Intel/MS systems, then
IMO you can use either one and get the desired results.  OpenGL is better
documented and has a cleaner, easier to learn API.  IMO, OpenGL is easier to
use with Borland compilers.  DirectX 7 has added functions to simplify the
initialization of DirectX, unfortunately, those functions are in a static
library that cannot be used with the Borland compiler.

If you want to build games then DirectX may be a better choice.  DirectX
supports input devices, sound, and music.  You can use DirectInput,
DirectSound, and DirectMusic with OpenGL, ... or you can write your own
functions to handle the non-graphical elements of your game.  The are
several web sites devoted to making games with OpenGL.  Some of the better
known (and free) game engines use OpenGL.

There are hundreds of web sites devoted to these two APIs, there are 1000's
of examples on the web, and there are millions of "zealots" that claim that
1 API is better than the other.

Do some research, build a few eaxamples of your own, then make your choice.

--
Regards,
Scott
http://www.gnt.net/~heiman

Re:OPENGL VS. Directx


"Scott Heiman" <hei...@gnt.net> spake the secret code
<854k0a$r...@bornews.borland.com> thusly:

Quote
>The 2 most important distinctions are

>1) OpenGL is a graphics API.  DirectX is a game API.  Direct3D and
>DirectDraw are the subset of DirectX that you need to compare to OpenGL.

>2) OpenGL is cross platform ( Intel, Apple, UNIX workstations, and LINUX ).
>DirectX is Intel/Microsoft only.

Nonsense.  #2 is an important distinction but #1 is a non-distinction
created by MS' marketing department.  DirectX is a collection of
multimedia API covering sound, graphics, device input, and streaming
audio/video.

The marketing people at MS routinely say "DX is for games, OGL is for
CAD" but this is utter poppycock.  You can certainly make great games
in OGL (Quake, anyone?) and you can certainly make CAD applications
with DX.

The feature sets are nearly identical and performance is comparable.
Besides the platform question, the fundamental differences are:

OGL is procedural.  DX is COM-based.

OGL has two-sided lighting; D3D does not.

OGL has native picking; D3D only has native picking in retained-mode,
which is a deprecated interface now (only bug fixes in the future, no
more features to be added).  You can easily code your own picking in
immediate mode, however.

OGL has point and line size attributes, D3D does not.

Available books are better for OGL than D3D, although this may be
changing.
--
http://www.xmission.com/~legalize Legalize {*word*62}hood!
legal...@xmission.com
``Ain't it funny that they all fire the pistol,     <URL: http://
  at the wrong end of the race?''--PDBT     www.eden.com/~thewho>

Re:OPENGL VS. Directx


Just quickly...

DirectX seems a lot more difficult initially, but in the long run is _much_
more powerful.
As far as DirectX being very painful to use, indeed it is.

Luckily for BCB programmers, we're very busy making the job easy. How about
a native BCB
component library that is very similar to native VCL components, that has
lots of documentation
and that wraps literally everything in DirectX7?

If you are interested, try www.bcb-tools.com

- darren

p.s. DirectX works on SUN hardware, Windows CE enabled devices, etc.
maybe soon we'll even have it on Linux... ;)

Quote
Scott Heiman <hei...@gnt.net> wrote in message

news:854k0a$rf09@bornews.borland.com...
Quote
> bluedragon <bluedra...@hotpop.com> wrote in message
> news:38759CC4.DB2FF945@hotpop.com...
> > Hi Everybody,
> >     I want to programming fast graphic in C++ Builder but i don't know
> > what should i use between DirectX and OpenGL and What different between
> > them?

> Go to www.deja.com and search the OpenGL and DirectX newsgroups for this
> topic.  This "religious war" has been hotly debated.

> The 2 most important distinctions are

> 1) OpenGL is a graphics API.  DirectX is a game API.  Direct3D and
> DirectDraw are the subset of DirectX that you need to compare to OpenGL.

> 2) OpenGL is cross platform ( Intel, Apple, UNIX workstations, and
LINUX ).
> DirectX is Intel/Microsoft only.

> If all you are concerned about is "fast graphics" on Intel/MS systems,
then
> IMO you can use either one and get the desired results.  OpenGL is better
> documented and has a cleaner, easier to learn API.  IMO, OpenGL is easier
to
> use with Borland compilers.  DirectX 7 has added functions to simplify the
> initialization of DirectX, unfortunately, those functions are in a static
> library that cannot be used with the Borland compiler.

> If you want to build games then DirectX may be a better choice.  DirectX
> supports input devices, sound, and music.  You can use DirectInput,
> DirectSound, and DirectMusic with OpenGL, ... or you can write your own
> functions to handle the non-graphical elements of your game.  The are
> several web sites devoted to making games with OpenGL.  Some of the better
> known (and free) game engines use OpenGL.

> There are hundreds of web sites devoted to these two APIs, there are
1000's
> of examples on the web, and there are millions of "zealots" that claim
that
> 1 API is better than the other.

> Do some research, build a few eaxamples of your own, then make your
choice.

> --
> Regards,
> Scott
> http://www.gnt.net/~heiman

Other Threads