PDA

View Full Version : Why openGl



microbug
12-24-2003, 09:08 PM
Can u tell me why i use openGl instead of Direct X.

Thanx

Ostsol
12-24-2003, 09:17 PM
Of course not. If you don't have your own answer to that, you are indeed a truly confused person. http://www.opengl.org/discussion_boards/ubb/wink.gif

Overmind
12-25-2003, 02:29 AM
I think the question should read:
Can you tell me why I should use OpenGL instead of Direct3D?

If you want facts:
- OpenGL runs on many platforms, Direct3D only on Windows.
- New hardware features are generally faster available in OpenGL via extensions

If you want opinions:
- OpenGL is easier to learn
- OpenGL produces nicer, cleaner code

One last thing: Don't expect to get an objective answer on an OpenGL board...

wizzo
12-25-2003, 04:34 AM
I agree with overmind, especially on the last two point :

Direct 3D is a real mess, in my opinion...

wizzo

jwatte
12-25-2003, 02:55 PM
Microsoft keeps waffling about what level of support there will be for OpenGL in Longhorn. Longhorn is only about two years out.

microbug
12-25-2003, 04:05 PM
Hello,

Thanx for reply, I have a sound experience in different languages but fairly new to this environment, I mean a pure game programmig world. I want to start from scratch so that I know all plateform and programming details...................

Thanx.

JanHH
12-25-2003, 05:21 PM
I use OpenGL because I am only writing for linux platforms. If you want to make windows-only games, d3d might be a better choice due to the fact that more graphics chips support d3d there, and d3d is a more pixel-exact specification than OpenGL, the chance that your program will run and look like you intented it do do are bigger. but as everyone has a gf or radeon anyway, this advante doesn't count too much.

Another reason might be that it doesn't sound like a good idea to rely on something that is proprietarily microsoft-only.

Jan

Overmind
12-26-2003, 08:25 AM
I would be interested which chips don't support OpenGL but support Direct3D (with hw acceleration of course...), I can't think of any. An please don't say 3dfx, they are long dead...

As for the pixel exact spec: Who cares? It's not that the OpenGL spec is so bad that you can actually see the difference without zooming in.

A real advantage of Direct3D is that there are no vendor specific extensions, so you only need one code path for each feature set (with shaders, with combiners, with multitexturing, ...), not one for ATI, one for nVidia, ... (although it could be better from a performance point of view, but you are not required to). But this is only true if you use the latest hardware features, and often these features are not present in D3D at all so you have to wait for the next DX release while in OpenGL you have a few vendor dependant extensions immidiately.

If you compare OpenGL to Direct3D without looking at the most advanced hardware features and if you don't care about platforms other than Windows, I don't think there are any important differences left except subjective things like nicer code and so on.

V-man
12-26-2003, 09:17 AM
Originally posted by Overmind:
I would be interested which chips don't support OpenGL but support Direct3D (with hw acceleration of course...), I can't think of any. An please don't say 3dfx, they are long dead...

I assume that when people mean a certain card or vendor doesn't support GL, then they mean their drivers are broken. In which case, their d3d support may be poor as well.

Typically, Matrox, Intel, Sis, S3 and others have lousy drivers. Search the user forums and you will see. Old ATI drivers were problematic as well (Rage period)

Last I heard, Intel was making an effort in this area so that every user who buys a ready made box (Compaq, HP, Dell) gets a gaming machine ready to go.

jwatte
12-26-2003, 09:52 AM
I find that Intel has pretty decent OpenGL drivers these days. The problem with Intel is that a general-purpose CPU just isn't able to keep up with what a custom parallel vertex processor can do, so you have to design highly scalable art if you want to push vertices to the max on HT&L but still run well on Intel Extreme.

Matrox does seem to care a bit about their drivers, as they use them also for their video processing boards, which seems to be where they can make money these days (just looking at their web site for that assessment).

3DLabs are said to have great drivers, tuned for DCC applications, but everytime we send a Wildcat into the compatibility lab, back comes a report that they couldn't get the card/drivers installed properly, much less start our app. Go figure. Also, the Wildcats don't support DXTC texture compression.

SiS, Trident and VIA/S3 are the three other brands that you'll find on consumer hardware (actually, you'll probably find more of those than of Matrox/3DLabs). All three of those ship some form of OpenGL driver, although it' s usually locked in a time bubble from 1.1 days, and they probably only use Quake as a test case -- stray from that path, and you're probably not going to be too happy. Alas, it seems impossible to get any reply from those vendors regarding software compatibility problems (I've tried several times).

Microsoft may be closed and proprietary, but they have about 95% of the market. As long as you require Windows, you might as well also require Direct3D. I think Microsoft has a driver acceptance test which requires that you are Direct3D compatible; I don't think they have the same thing (or to the same level) for OpenGL compatibility.

zeckensack
12-26-2003, 09:55 AM
Originally posted by Overmind:
As for the pixel exact spec: Who cares? It's not that the OpenGL spec is so bad that you can actually see the difference without zooming in.I can't agree with that ...
OpenGL is a spec, and a very strict one at that. Direct 3D is far from strictly specified, when in doubt you're supposed to "do it like refrast", whatever that means.

A real advantage of Direct3D is that there are no vendor specific extensions, so you only need one code path for each feature set (with shaders, with combiners, with multitexturing, ...), not one for ATI, one for nVidia, ... (although it could be better from a performance point of view, but you are not required to). But this is only true if you use the latest hardware features, and often these features are not present in D3D at all so you have to wait for the next DX release while in OpenGL you have a few vendor dependant extensions immidiately.This IMO is neither an advantage nor disadvantage. It's just a difference in philosophy.
One could say that Direct 3D uses a "restriction model" while OpenGL uses an extension model.

Direct 3D versions allow some maximum functionality and IHVs are free to not implement features. They can never offer more features. OTOH OpenGL versions mandate a minimum functionality and allow arbitrary extensions.

D3D version n: feature set <= "n"
OpenGL version n: feature set >= "n"

arekkusu
12-26-2003, 03:53 PM
Originally posted by Overmind:
As for the pixel exact spec: Who cares? It's not that the OpenGL spec is so bad that you can actually see the difference without zooming in.

You are so wrong. Look at how inexact the results are (http://homepage.mac.com/arekkusu/bugs/invariance) across different renderers. The spec is especially ambiguous about the rendering of antialiased points and lines.

Who cares? Try writing an SVG or PDF renderer in OpenGL. You will suddenly care a lot.

V-man
12-26-2003, 09:41 PM
>>>>
A real advantage of Direct3D is that there are no vendor specific extensions, so you only need one code path for each feature set
<<<<

Only if you code for the XBox.
Otherwise, you have to check for CAPS bits.

In the case of GL, the fact that multiple vendors can offer a similar extension, each with their own extra abilities can piss some people off.

Luckily, their are only 2 guys: ATI and NV
so it is acceptable.

I dont mind coding for both + ARB only for the rest.

JanHH
12-27-2003, 06:34 AM
what I meant is that with d3d your progam is more likely to work on windows computers than when using OpenGL. There are a lot of "dead" chips around in notebooks that do not support OpenGL very good, and yes you can see differences on different OpenGL implementations (for example, compare Quake 3 on a riva128 to quake 3 on a tnt).

But the one big reason against d3d is that it is microsoft-only.. I cannot imagine why one would want to cope with that. Of course I cannot exspect everyone to *love* windows as much as I do, but to become dependant on one company never is a good idea, I think, and apart from that, OpenGL is an _industry_ standard, d3d is a windows gaming standard.

Jan

husakm
12-27-2003, 07:25 AM
I have one more reason why OpenGL - standardized support for in window stereoscopy. Nothinl like this exist in DirectX.
I have one more reason why not OpenGL - bas support for video data processing. DirectX integrate in the form of DirectShow video data processing and HW acceleration together. OpenML is unfortunately not mature yet ...

Zengar
12-27-2003, 07:31 AM
@JanHH: generally I've never met a case that OpenGL would be slower then DX. I don't understand this funny believe(like "OpenGL on windows is crap, because microsoft supports only DX"). Do you remember, there was a thread about WinnXP some years ago? People where afraid that Microsoft would provide only a DirectX wrapper for OpenGL, but not direct support for it(!!). Even now there are some people that believe that crap.

It is not of more advantage to use DirectX on Windows plaftorms.

jwatte
12-27-2003, 08:45 AM
> It is not of more advantage to use DirectX on Windows plaftorms.

If you're willing to restrict yourself to < 50% of the installed market, then that's true.

Overmind
12-27-2003, 12:34 PM
Ok, after visiting arekkusu's link I have to admit I was wrong about differences not being visible without zoom, but these test cases use rather rare features. Who uses line width and strippling for example? I wouldn't bother using it when I have got textured polygons with combiners or even fragment programs...

As for writing a PDF renderer: I wouldn't use OpenGL to do this, neither would I use Direct3D. These APIs are not designed for this kind of application, I would rather use SDL or DirectDraw...

JanHH
12-27-2003, 12:36 PM
I didn't say that d3d is faster, I only said that the program is more likely to run the way it is supposed to.

Apart from that, I personally would not choose d3d even when developing for windows, as I would like my programs to be portable to linux. Also, more innovation seems to come from the OpenGL front (Carmack), in fact I do not even see a reason for d3d to exist at all (apart from marketing reasons). As well as d3d, OpenGL could be the standard windows rendering solution integrated into directx. I really belive the whole reason is microsoftish monopolism. I LOVE these guys.. for example, they are the ones who gave us the big big gift of visual basic *eg*

Cyranose
12-27-2003, 01:03 PM
As a datapoint, I have a client whom I convinced to let me use OpenGL for the app I'm writing for them. I developed it in 1/2 the time I could have in DX and since it didn't use any extensions, ran fine on any HW with current drivers (not withstanding some 2nd monitor/texture issues...)

However, since this is a web-downloadable-click-and-run app, I ultimately had to recode for DirectX because it was decided we couldn't force people to upgrade their OpenGL drivers to use this app.

[And as you may know, a vanilla windows installation will often run OpenGL in software mode, even with NVidia or ATI HW. Don't tell me people should always patch their systems -- it's not me you'd have to convince...]

Thankfully, I abstracted the graphics and built a dual-OGL/DX library underneath so we can now switch on the fly. But I never found a solution to the driver issue that works for this company. So DirectX wins one, but only by an anti-competitive trick.

[edit re V-Man's post below: not an intro to a web site, it's a PC app, but one that's supposed to run without a reboot]

Avi


[This message has been edited by Cyranose (edited 12-27-2003).]

arekkusu
12-27-2003, 01:03 PM
Originally posted by Overmind:
these test cases use rather rare features. Who uses line width and strippling for example? I wouldn't bother using it when I have got textured polygons with combiners or even fragment programs...

This is a case of chicken and egg.

Are the features rarely used because the implementations are broken/different across renderers?

Or are the implementations broken/different because the features are rarely used?

Today's consumer hardware market is largely driven by FPS games. So the hardware & driver vendors don't really care if points and lines (one half of the GL primitive set) are broken. They only care about textured triangles. But that doesn't change the fact that, as written, the GL spec is ambiguous to the point that some features are unusable (if you care at all about reproducibility.) As it is, on today's hardware you have to re-implement points and lines using texture mapped triangles if you want them to look correct. Which is a pain.

Tuttle
12-27-2003, 02:22 PM
D3D is a dead-end technology.

The Microsoft windows game market has been in decline for at least three years now. XBox is a massive failure.

OpenGL. Clean. Elegant. OS X, Linux, MS support. Unless you're a die-hard Microsoft fanatic or still at a company shipping product only for Microsoft systems, there is no reason to care at all about D3D.

V-man
12-27-2003, 02:48 PM
Avi,

if you are making some kind of an intro to a web site, then you should not be doing anything fancy unless you know your audience.

I have turned away from sites that ask for oddball plugins, activeX, flash ...
They should have alternative pages. It's just common sense.

Anyway, you cant do much. MS owns the PC platform and that won't change. It didnt took them much time to control the console business.

Lev
12-27-2003, 03:01 PM
This OT thread is about to become even more OT. Why hasn't it been locked yet?

Regards
-Lev

Edit: spelling

[This message has been edited by Lev (edited 12-27-2003).]

sqrt[-1]
12-27-2003, 04:54 PM
To V-Man

I doubt comming 3rd in the console business is "controlling" it. (It may be second in North America but it is 3rd world wide. )

I also hope that quote "MS owns the PC platform and that won't change." won't come back and haunt you. Predictions in the computing industry (ie 640K,world market etc) can often be way off mark.

zeckensack
12-28-2003, 12:08 AM
Originally posted by arekkusu:
You are so wrong. Look at how inexact the results are (http://homepage.mac.com/arekkusu/bugs/invariance) across different renderers. The spec is especially ambiguous about the rendering of antialiased points and lines.

Who cares? Try writing an SVG or PDF renderer in OpenGL. You will suddenly care a lot.Do these features exist and function as expected in Direct3D? On all hardware?
Otherwise yours is a moot point.


Originally posted by Cyranose:
However, since this is a web-downloadable-click-and-run app, I ultimately had to recode for DirectX because it was decided we couldn't force people to upgrade their OpenGL drivers to use this app.And exactly what happens on an enduser machine that has never had a graphics card driver installed? That's the only circumstance where you don't have accelerated OpenGL ...

V-man
12-28-2003, 08:25 AM
>>>Do these features exist and function as expected in Direct3D? On all hardware?
Otherwise yours is a moot point.<<<

I doubt D3D spec (if it exists) is more precise than GL. The only spec file I've seen is about how D3D renders it's polys and samples texels.

Never seen a comparison of screenshots? Those XORed images that compare rendering on different cards. You can't even count on your textured polys to be rendered the same on diff hw (with FSAA off, with AA off).


About my comments on MS owning the console business ... PS2 is first, XBOX is 2nd, GameCube is 3rd (according the sales)
It is expected that this christmas season, XBox will close in on PS2

Cyranose
12-28-2003, 02:27 PM
Originally posted by zeckensack:
And exactly what happens on an enduser machine that has never had a graphics card driver installed? That's the only circumstance where you don't have accelerated OpenGL ...[/B]

The sneaky thing is that on a clean install of WinXP (for example) the system detects NVidia hardware (for example), says it's installing a microsoft certified NVidia driver, and does accelerate DirectX, but not OpenGL (yet). That requires getting a more recent driver, either from NVidia (which may not be "certified" yet and this may scare some people off) or Windows Update, which may not be the most recent.

Either way, for a user using a "clean" machine (that may even have critical patches applied) and who has never tried to run games, running an OpenGL app may require several not-too-unreasonable steps to get HW acceleration, but my client determined that (especially the reboot) was too much of a hurdle for their app.

Avi

sqrt[-1]
12-28-2003, 04:20 PM
To V-man:
I don't know where you are getting your stats from but all the reports I have read have the PS2 at ~3x the market share of XBOX. And worldwide the GC is ahead of XBOX due to its extemely poor sales in places like Japan.
Quick link I found: http://www.gamemarketwatch.com/news/item.asp?nid=2808

Tuttle
12-28-2003, 05:24 PM
The XBox is in last place worldwide. It is never going to get anywhere near the PS2 installed base, nor anywhere near half the PS2 installed base. Last time I checked, PS2 was in 55+ million range, GC was in the 10+ million, and XBox as last at around 9+ million.

With the rise of Linux, the shrinking MS windows game market, and XBox's marketplace failure, D3D is a dead-end technology.

jwatte
12-28-2003, 06:18 PM
"rise of linux"

That's great! I needed a good chuckle!

Can we lock this thread now?

Tuttle
12-28-2003, 09:09 PM
""rise of linux"

That's great! I needed a good chuckle!

Can we lock this thread now?"

Pointless posts like yours will assure a lock.

Eric
12-29-2003, 06:37 AM
At least now we can avoid getting a new D3D/OpenGL debate once a week! http://www.opengl.org/discussion_boards/ubb/wink.gif