Programming Languages for 3d simulation and games

By: nobody ( Nobody/Anonymous )
Direct3D is not faster.
2003-04-26 10:12
Hi I like the web site very much it is proving to be an invaluable source of information for
me while working my hobby which is writing some physics-robotics software.

But I would like to suggest a small change to the following paragraph of the website
primarily in support of openGL

your paragraph at
https://www.euclideanspace.com/software/language/index.htm
states the following points about >>
Graphics standards and class library's

* OpenGL tends to be used by graphics and CAD programs.
* GLUT is a library for using OpenGL from C++.
* Direct3d is faster but, less accurate, and tends to be used by games.
* OpenGL is supported on PCs, unix, linux, etc.
* Direct3D is supported only on Microsoft platforms, PCs and X-box.
* I think the other games platforms tend to use their own graphics interfaces.

Could be changed to.

* OpenGL is faster and tends to be used by both graphics and CAD programs and games.
* GLUT is a library for using OpenGL from C++.
* Direct3d is less accurate, and tends to be used by games.
* OpenGL is supported on Windows, Macintosh, UNIX workstations, PCs, X-Box, linux, etc.
* Direct3D is supported only on Microsoft windows platforms and X-box.
* I think the other games platforms tend to use their own graphics interfaces.

or something similar :-)

The company which makes the Xbox GPU ie Nvidia provides the following information.

http://www.nvidia.com/view.asp?IO=cg_faq

From what i can tell DirectX support on the X-Box is actually dependent on an
underlying and very fast openGL implementation. This agrees with the points forwarded by
Chris Hecker (who apparently worked for microsoft) in his article
about 3D api's opengl and Direct3D.

http://www.d6.com/users/checker/pdfs/gdmogl.pdf

Ie Which tends to indicate that openGL is in theory either equal in speed
or faster than Direct3D. ( in practice the theory seems to hold as well)

The following links detail similar information.

see http://www.d6.com/users/checker/openglpr.htm
http://www.wired.com/news/technology/0,1282,4952,00.html
http://www.vcnet.com/bms/features/3d.html

So the following point is debatable and very probably incorrect.
* Direct3d is faster but, less accurate, and tends to be used by games.

because Direct3D is not any faster than openGL.
I fully agree though that Direct3D is less accurate; The rendered output from the
direct3D drivers on my and other peoples computers i have seen is invariabley lower
quality because it has very obvious problems with aliasing and texture mapping distortion.
Many new games provide the capability of selecting opengl or direct3d drivers,
we allways end up using the opengl drivers they are at least equal or faster in speed
and produce a better output.

The following point is true.

* OpenGL tends to be used by graphics and CAD programs.

But it is also used in many 3D games. From my own experience with 3D windows games,
openGL is supported in as often if not more so than Direct3D. When Direct3D
has been supported i find the open OpenGL driver always produces better quality output
and equal or higher frame rates, when i have compared the output in games which support
both drivers.

Cheers Steve.


By: nobody ( Nobody/Anonymous )
RE: Direct3D is not faster.
2003-04-26 22:40
I have heard both versions of the speed issue and I cannot add anything to this issue because I have never benchmarked or run other tests. I do however have issues with Direct3d.
When build 3d apps it seems that the largest speed increases can be had by manipulating the object level of detail and space patitioning techniques not the API used. It is still up to the programmer to figure out what they want to do.
The main difference between Direct3d and OpenGL is the design of the API. The OpenGL interface has been designed to be loosely coupled with a system. Meaning there was little system specific code. I did not have to call functions which had no meaning outside the world of 3d graphics programming. The more I used it the more I appreciated how intuitive it was. Focus is directed at building and debugging your 3d code not your system specific code.
Whenever I see Direct3d, or many of windows APIs I think of APIs which have been tightly couples to some Windows design. This means a considerable amount of your time will be spent outside the 3d rendering part of you code and in the windows specific portion of your code. This also causes much pain and suffering when porting code to another system.
It is in Microsoft's interest to have as many users as possible invest time and money into their proprietary solutions. Once you have the initial investment then it would cost time and money to port your code or you are forced to develop 2 very different versions of a product.
I would choose OpenGL over Direct3d for all 3d projects I have worked on. If Microsoft had designed an easy to use, more intuitive API then I would have a different opinion.


By: martinbaker ( Martin Baker )
RE: Direct3D is not faster.
2003-04-27 15:33
Thank you both, it is really good to get the benefit of your practical experience.

I have made the changes suggested by Steve, except that I have not made any comments about the speed issue either way, instead I have included a link to this discussion.

While I was updating the page I have also changed it to say that .net 1.1 (Visual Basic 2003 and C# 2003) now supports directx 9 without the need for 3rd party plugins. I guess this may lead some people who are learning to program in 3D down the direct3D route.

Cheers,

Martin



metadata block
see also:
Correspondence about this page

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.