Archived

This topic is now archived and is closed to further replies.

Gamekeeper

performance...OGL...DX...

Recommended Posts

VXG    122
Three reasons actually:

1. OpenGL is designed only for graphics programming, whereas DirectX is also designed for sound, input, etc... as well. This means that OpenGL needs to be the ultimate language in graphics programming, with the better syntax and possibilities, if it is to be able to compete with DX. And it is.

2. OpenGL 2.0 is almost here.

3. Ever wondered why John Carmack''s engines are the best?

Share this post


Link to post
Share on other sites
jenova    122
lol. because your in the OpenGL forum.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
Subotron    182
quote:
Original post by Ingenu
Will those stupid questions asked by brainless people ever end ?

(the reply pic says it all)



Ingenu, I bet you asked the same thing when you started.

As an answer to the question: I tried both, and I think there are not a lot of differences. In my opinion OpenGL is easier to use (well, mostly the set-up is easier, the rendering code is almost similar) and I think it''s a little bit nicer/faster than Direct3D. (Of course this really depends on the programmer. But if you look at Counter-Strike, the OpenGL mode is a bit faster and better looking than the Direct3D mode. Just an example)

On the other hand, Direct3D has the effect point sprites, which gives Direct3D an advantage on particle engines. Also, if you use DirectX for input, music, etc. (which would be wise) it might be easier to use DirectX for graphics too.

A minor con to DirectX (I think) is you have to learn a "new" (a bit different) language each time a new version comes out, which is quite often. Of course, often making new versions is also a good thing!

The differences are not really big. I advice you to try the basics of both, and continue with the one you like most. You can also learn both, which may seem really dumb, but they''re much like eachother so it''s not really that much extra work. The best way is to try them for yourself, really. There are many different opinions on which one is "best".

I used Direct3D, but switched to OpenGL. I found Direct3D quite hard to understand and when I saw OpenGL it was all clear to me from the first moment. I found it a lot easier than Direct3D.

IF you choose DirectX though, use the latest version. If you start learning DirectX7 you''re definetly on the wrong way...

If I had to choose for you, I''d say OpenGL. But don''t listen to that, try for yourself

Share this post


Link to post
Share on other sites
Promit    13246
Myopic, if you read this, i highly reccomment you get my article online ASAP if for no other reason than to stem the incessant flow of topics like this.

-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.

Share this post


Link to post
Share on other sites
Myopic Rhino    2315
quote:
Original post by Promit
Myopic, if you read this, i highly reccomment you get my article online ASAP if for no other reason than to stem the incessant flow of topics like this.

I''m working on it, I have a couple of people going over it.

Share this post


Link to post
Share on other sites
Shag    122
OK - this question gets asked all the bloody time ... but i've yet to see any figures to back up either claim.

Has anyone actually written two apps (one in openGL, one in D3D) which do exactly the same thing? Say draw a few dozen rotating cubes on the screen. And then acxtually measure thes FPS per app? These figures would certainly be interesting.

As to the original post - use what ever you feel comfortable with. There's probably so little difference between the two API's you wouldn't notice. Both are optomised in similar ways (via the drivers). The only real benefit of OpenGL is the fact that is multi platform. And with Linux becoming ever more popular, that may well be a deciding factor (especially in commercial apps/games)

PS - for what it's worth. mcraighead and several other nvidia guys have stated on opengl.org that they prefer OpenGL over D3D. I'm sure this doesn't mean they put more effort OpenGL - but they certainly won't put any less in.

Edited by - Shag on January 31, 2002 1:41:07 PM

Share this post


Link to post
Share on other sites
Rube    122
You posted this twice.

In the DX forum I say DX is faster. In the OGL forum I post OGL is faster. It seems to get the least number of flames and seems to be what a good politician would do.

I think the general consensus is that there are no appreciable gains of speed using DX vs OGL or vice versa. It''s your hardware that makes the big difference.

Problem with writing an application in both OGL and D3D then comparing is still problematic. You''d have to test this across a wide variety of hardware to get any solid results. Otherwise you might just have a vendor card that provides better support for OGL or D3D, and not any proof that one is faster than the other.

So, like I said, your speed comes from good algorithms and what hardware/drivers you buy for your machine, not from the API.

R.

Share this post


Link to post
Share on other sites
AlbertoT    100
I agree with Subotron and I have had the same experience .
First of all it is not a stupid question, maybe it is not an original question but not a stupid one at all.
I myself got started with direct x, I was about to quit with game programming.
Then I read, by chance , on a computer magazine an article using opengl " What ??? " I said " Graphic programmig ?, is it so easy !!! " and I switched to opengl.
If you have still some doubt read the rewies on Amazon on direct x and opengl programming books..
What about performance ?
An Opengl code is easy to develop.... at low level , it is difficult to optimize, so..
The point is that a beginner or even an experienced single shareware developer will never exploit the capability of a graphic API, either direct x or opengl.
Have a look to the games supplied by a 1 or 2 persons game programming company ( the most famous sell about 1.000.000 usd a year ).
Their games are ridicously simple in comparison to the standard we are used to.
Do you really think that it makes differece to use the last xxxxx.xxxx direct x version or opengl 1.0 ?
The right question is " do you want to get fun or and headache? "
In conclusion,in my opinion, opengl is the ideal API to get started.
It is not a flame war ,it is simply the truth.

Share this post


Link to post
Share on other sites
Ingenu    1629
I agree with Rube.
This is very true.

/* hanger zone */

BTW there''s a link about GL vs D3D in the forum.
And:
NO I NEVER ASKED I LEARNT BOTH AND FOUND OUT ALONE !

(I''m tired of seeing people asking before even thinking.)

-* So many things to do, so little time to spend. *-

Share this post


Link to post
Share on other sites
jenova    122
Ingenu: very true....

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
Null and Void    1088
quote:
Original post by Rube
In the DX forum I say DX is faster. In the OGL forum I post OGL is faster. It seems to get the least number of flames and seems to be what a good politician would do.

Good idea .
quote:
Original post by Ingenu
NO I NEVER ASKED I LEARNT BOTH AND FOUND OUT ALONE !


Same here. I expect people to use common sense and do at least minimal research (how hard is using the search feature? how hard is google?) before asking such questions. If they have a realistic and objective (though not necessarily experienced) question, it''s much less annoying.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
quote:
Original post by VXG
Three reasons actually:

1. OpenGL is designed only for graphics programming, whereas DirectX is also designed for sound, input, etc... as well. This means that OpenGL needs to be the ultimate language in graphics programming, with the better syntax and possibilities, if it is to be able to compete with DX. And it is.

2. OpenGL 2.0 is almost here.

3. Ever wondered why John Carmack''s engines are the best?


OGL is not a language...

Share this post


Link to post
Share on other sites
zedzeek    528
as ppl have said there is no big differnece between the 2 api in terms of speed (cause they use the same hardware)
though opengl has an advantage/disadvantage (depending on who u listen to ) that u can do the latest things with the hardware generally before it happens in d3d eg ''GL_HP_occlusion_test'' has just come out on nvidia cards with 27.XX+ drivers, which will perhaps be of benifit performance wise to your app, this feature aint available for d3d8 (perhaps it comes with d3d9 who knows)

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
Ysaneya    1383
> there is no big differnece between the 2 api in terms of speed (cause they use the same hardware)

The hardware can be the same, but the speed different. Talk about drivers. Have you compared the performance of a Radeon 8500 with OpenGL and D3D ? On my machine D3D is more than twice faster ! I''m not generalizing, but to me it sounds naive to say the speed in OGL and D3D is always similar.

Y.

Share this post


Link to post
Share on other sites
zedzeek    528
>>On my machine D3D is more than twice faster <<

then the problem lies in your opengl code

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
Witchcraven    564
OpenGL on my linux box beats the crap out of D3D and OpenGL on windows.On some systems, the windows implementation is faster or the same speed. There are so many factors that could change performance its not even worth trying to find which is better. The only reason I swing to GL is because:
a)Portable
b)It was originally made by SGI, a company devoted to graphics
c)It is easier for me.
d)I dont like Microsoft that much

Share this post


Link to post
Share on other sites
Ysaneya    1383
> then the problem lies in your opengl code

It doesn''t. I''m not exactly an OGL newbie. And i''m not saying D3D is always faster. I just gave a counter-example to your "perfect world" theory.

Y.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I don''t know about Ati (though it might have changed with their latest vertex array object extension), but when talking about nVidia, facts are clear: OpenGL is faster.

I''ll just quote Matt Craighead from nVidia: "A decent VAR/fence implementation will easily outperform both D3D7 and D3D8 on dynamic geometry." (read it here: http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/001606.html).

The quote is already a bit older, but still 100% true.

- AH

Share this post


Link to post
Share on other sites
stefu    120
quote:
Original post by Witchcraven
d)I dont like Microsoft that much



I think thats good reason to use OpenGL
I don''t like too.

Share this post


Link to post
Share on other sites