• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

OpenGL vs DirectX

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Originally posted by: BenSkywalkerDX9 has a lot better shading then PS 2.0 or OGL 1.5- PS 3.0. It will all be spelled out even more explicitly then it has been stated the thousands of times to date when the next gen parts hit.

What does PS3.0 give you over PS2.0 other than loops and the ability to load a specific texture LOD? It is true the OpenGL fragment program 1.0 specification does not have looping, but I assume there is a new version in the works to add looping if any next generation products support it. AFAIK GLSL already supports loops. Also AFAIK you can't actually use the current DX9 SDK to produce PS3.0 applications, so it is basically no better than vapourware at this point (not that it is vapourware, just that today it doesn't yet exist).

I still don't really see any shading advantage. For either API.
 
Originally posted by: chsh1ca
Originally posted by: titananandtech

How is D3D ahead of OpenGL?
Less demand/arguing over what gets put into the API means quicker adoption of new features offered by hardware developers. OpenGL as a standardized API lacks many of the features that actually get implemented in OpenGL games, since in the games they tend to use different codepaths based on the hardware vendor.

Which new feature was slow to be adopted? I can only think of one that was been a bit slow, but it is a bit of an exception. As I stated earlier OpenGL, through the standard API, was able to take advantage of PS2.0 level hardware before D3D. Even though they argued over the fragment program standard it came out better than the PS2.0 standard AND came out sooner. That is a very recent example of a major feature to the API.

Which API components are missing from the standard API that go into OpenGL games? Even in D3D you get games using multiple code paths; multiple DX7 paths based on the number of textures per pass (2 for GeForce1, 3 for Radeon, 4 for Intel/PowerVR), PS1.1-PS1.4, PS2.0, etc. I'm not sure specifically what you're thinking of...
 
What does PS3.0 give you over PS2.0 other than loops and the ability to load a specific texture LOD?

Conditional branching is the big one.

Also AFAIK you can't actually use the current DX9 SDK to produce PS3.0 applications

Using DX's HLSL. You can do anything supported through the API if you aren't relying on their HLSL(for comparison you could argue that OGL has no shader support outside of Cg).

Which new feature was slow to be adopted?

All of them. I still don't have any OpenGL 1.5 drivers for my R9800Pro- and as you pointed out that was ratified eighteen months ago. OpenGL adoption is excruciatingly slow to put it nicely.

Which API components are missing from the standard API that go into OpenGL games? Even in D3D you get games using multiple code paths; multiple DX7 paths based on the number of textures per pass (2 for GeForce1, 3 for Radeon, 4 for Intel/PowerVR), PS1.1-PS1.4, PS2.0, etc. I'm not sure specifically what you're thinking of...

Very different case with OpenGL. You don't write code for vendor proprietary extensions under D3D which you do deal with on the OpenGL side of things. I'm not talking about general cases which is what you are using for D3D- take DooM3 as an example. It has it's 'low quality' fallback mode(which the R1x0 parts will use), then it has the NV1x path, the NV2x path, NV3x path, R2x0 path and 'ARB2' path. There are a few different boards that have feature parity(in terms of the D3 engine and how it will utilize the hardware) that are still using seperate code paths due to vendor implementations and lack of concrete extensions when these new features came about.
 
Which new feature was slow to be adopted? I can only think of one that was been a bit slow, but it is a bit of an exception

Ever hear of OpenGL 2.0? How long was that supposed to be coming out, and still isn't because the ARB can't decide on one plan on what to put it and what to not put in
 
Originally posted by: titananandtech
Originally posted by: chsh1ca
Originally posted by: Insomniak
Like everything else, they both have strengths and weaknesses - personally I think DirectX's strengths put it ahead of OpenGL pound for pound.
In a sense of raw technological capabilities, I'd agree, DirectX is a step ahead of OpenGL.

How is D3D ahead of OpenGL?


Well, it just has a more expanded feature set. But really, as said, it's more about what the developer does with it.
 
i Like opengl the best
can't live without linux games...
but recently dx has been rising up and being implemented more in new windows games over opengl

if i was a game programmer i would learn opengl first, just cause i would be able to market the game to more people on more os's

i do miss the options in games to run 3 or 4 different api's
dx, opengl, glide, software rendering
it adds a whole new dimension to the vid card competition
 
Originally posted by: reever
Which new feature was slow to be adopted? I can only think of one that was been a bit slow, but it is a bit of an exception

Ever hear of OpenGL 2.0? How long was that supposed to be coming out, and still isn't because the ARB can't decide on one plan on what to put it and what to not put in

What is openGL 2? (I've heard of it, my question is what is the difference between "OpenGL 2.0" and OpenGL 1.5. What part of OpenGL 1.5 is getting in the way of developers? What new features do you think OpenGL 2.0 would give you couldn't have through standard ARB means with OpenGL 1.4 or earlier?)

If the problem is the version number is stuck only at 1.5 then yeah, OpenGL is way behind D3D. If you want to use OpenGL to have access to cool new features of hardware like PS2.0 via standard ARB defined methods then OpenGL isn't behind.
 
OpenGL is supposed to standardize shading in a more uniform and defined fashion.

If you want to use OpenGL to have access to cool new features of hardware like PS2.0 via standard ARB defined methods then OpenGL isn't behind.
But it is behind in that respect; previous versions of OpenGL needed to use a lot of vendor specific extensions in order to expose that functionality.
 
What is openGL 2?

A major revision to OpenGL, a far larger jump then the move from 1.4-1.5 was. OGL 2.0 will allow for shaders that exceed PS/VS 3.0 standards, of course we don't know if they will actually get it done before DXNext so it may end up still being behind D3D.
 
Also AFAIK you can't actually use the current DX9 SDK to produce PS3.0 applications
Using DX's HLSL. You can do anything supported through the API if you aren't relying on their HLSL(for comparison you could argue that OGL has no shader support outside of Cg).

So as long as you don't use HLSL you can use the current DX runtime with PS2.0? Why can't you compile HLSL as ps3.0 instead of just 2.0, 1.4, 1.3, 1.2, and 1.1?

I still don't have any OpenGL 1.5 drivers for my R9800Pro- and as you pointed out that was ratified eighteen months ago. OpenGL adoption is excruciatingly slow to put it nicely.

But what features are you missing? I just took a quick look at what new features are in 1.5:
-GLSL shader extension
-VBO as core
-occulsion query (can you even do this in D3D9?)
-shadow function (generalized)
-sdk (not driver) token changes
The 9800 has the GLSL extension, VBOs, occulsion query, and basic shadow functions. The only thing ATI is missing (maybe not) is generalized depth shadow functions, which is a very minor feature. Other than the GLSL extension ATI has supported those features for a long time.

But this is changing the subject from if OpenGL supports something to if a vendor supports OpenGL. They may be saving changing the OpenGL version to 1.5 for internal reasons like matching the release of their next generation hardware. <speculation>It doesn't matter that they don't call their driver 1.5 because they support all the features of 1.5 then developers are happy because they can use 1.5 now on ATI hardware which is really all that matters, and marketting is happy because they can release a new special driver with their next hardware which adds OpenGL 1.5 support. Most people who don't look what is actually new will get all excited that ATI has added OpenGL 1.5 to their new drivers for their new hardware and talk about it like it is a great new feature, when in reality they basically already supported it for months on their old hardware 🙂</speculation>

Very different case with OpenGL. You don't write code for vendor proprietary extensions under D3D which you do deal with on the OpenGL side of things. I'm not talking about general cases which is what you are using for D3D- take DooM3 as an example. It has it's 'low quality' fallback mode(which the R1x0 parts will use), then it has the NV1x path, the NV2x path, NV3x path, R2x0 path and 'ARB2' path. There are a few different boards that have feature parity(in terms of the D3 engine and how it will utilize the hardware) that are still using seperate code paths due to vendor implementations and lack of concrete extensions when these new features came about.

That is true. The one nice thing about D3D is when you write the r2x0 specific code path in D3D is it is called "Pixel Shader 1.4" not "ATI_fragment_shader". In reality it is a R2x0 specific code path because only the r2x0 would use it, all the rest would use the ARB2/ps2.0 path. Of course any company is just as free to implement the ATI_fragment_shader extension in OpenGL as they are to support PS1.4 in D3D. For example Matrox uses the ATI VAO extension and 3Dlabs implements the nvidia register combine extension. But you're completely right, naming it PS1.4 will make it more likely for another vendor to support it than to name it ATI_fragment_shader. That is an advantage for D3D, even if in reality it isn't any different because PS1.4 is just the same as writing a R2x0 specific code path in OpenGL.

DX8 level hardware was a bit of a mess, only three vendors ever supported just it (and Matrox isn't that relevent), and they had hugely different functionality. OpenGL does not have a standard way to use PS1.1/PS1.4, so you do need to use extensions for the nv2x or r2x0. But a shader for the nv2x and another for the r2x0 isn't too different than a PS1.1 and a PS1.4 shader. The only company that offers a product that with that functionality that would normally piggy back on the nv2x path is Matrox with PS1.3 support in D3D, but their own fragment shader extension in D3D. However there is full standard support for all cards with VS1.1 functionality. In reality just those Matrox gamers get shafted under OpenGL. Unless Matrox does what 3Dlabs did-they support both the nvidia register combiner extension and the ARB fragment shader.

The ARB had the forsight to forget about wasting time on finding a lowest common denominator standard for only a couple venders that had their own extensions to use that functionality and instead jumped straight to fragment programs/PS2.0 which will be supported by all vendors like S3, and SiS. Hell, nvidia didn't even make a low end DX8 part, they jumped right in with DX9 across the board.

In Doom3 the one thing about the nv1x path is under D3D it is impossible to write the equivilent! Nvidia's hardware goes beyond the DX7 standard, so you can either treat the nv1x like standard DX7 hardware in OpenGL, or you can use nvidia's extensions to use all power of that card. The nv1x will run D3 much better than the R1x0 because of this. It's hard to call this a strike against OpenGL since it is providing something D3D doesn't. Same with the nv3x path, the nv3x is fine running the standard arb2 fragment program path, there is just a nv3x path for increased performance.
 
So as long as you don't use HLSL you can use the current DX runtime with PS2.0?

PS 3.0 too 😉

Why can't you compile HLSL as ps3.0 instead of just 2.0, 1.4, 1.3, 1.2, and 1.1?

Try writing a compiler for a processor that doesn't exist 😛 Seriously though, the original DX9 HLSL compiler was built around what ATi's parts ended up as, they then released another version that outputted code better suited for nVidia.

They may be saving changing the OpenGL version to 1.5 for internal reasons like matching the release of their next generation hardware.

They may, although nVidia will be pushing OpenGL 2.0 so it wouldn't make much sense for ATi to be pushing 1.5. Supporting the extensions also isn't the same as supporting the API fully. nVidia has some PS 3.0 functionality(well, PS 2+- features that aren't required for 2.0 but are for 3.0) in their current parts, and some of that can already be exposed, but they certainly have no way of claiming they have PS 3.0 compliance with their current parts.

That is an advantage for D3D, even if in reality it isn't any different because PS1.4 is just the same as writing a R2x0 specific code path in OpenGL.

It's not though. The FX5200 as an example will be using PS 1.4 quite a bit with current and upcoming titles. At the time the PS1.4 standard came out it was only available on ATi's parts, now it is standard on all boards. This is a fundamental difference. Two years from now, when these features are actually being used, nv_fragment_program is still going to be nVidia's, PS2.0+ will be everyone's.

The ARB had the forsight to forget about wasting time on finding a lowest common denominator standard for only a couple venders that had their own extensions to use that functionality and instead jumped straight to fragment programs/PS2.0 which will be supported by all vendors like S3, and SiS. Hell, nvidia didn't even make a low end DX8 part, they jumped right in with DX9 across the board.

I'm very confused here, the GeForce3 and GeForce4 were DX8 parts, and they likely outsold the FX line by a staggering maring if we look at totals to date. Also, there are now well over a hundred games on the market that utilize DX8 level shaders and two that are using PS2.0. The ARB wasn't smart ignoring more basic shader functionality, they are simply far too slow to deal with something like it unless they plan it years in advance. Due to the ignoring the feature for so lone nVidia now dominates OpenGL shading and Cg has more pull then GLSlang ATM.

In Doom3 the one thing about the nv1x path is under D3D it is impossible to write the equivilent!

Absolutely, and this is a considerable advantage for OpenGL. But this same advantage comes with its own problems. It works both ways, the GF1 never seeing its full potential realized under D3D was a shortcoming of MS's API. That said, a lot more games were able to use the GF1's features quickly on the D3D side of the fence.
 
Originally posted by: Matthias99
Okay... and what about the HL2 and Unreal engines? Both those are based on DirectX... two to one! 😛

Seriously, though, the technical merits of both systems are about equal. You can write fast graphics code in both DirectX and OpenGL. From a programming/API perspective there are some differences, but even there it's not night-and-day. OGL may be an open standard, but all that means is that you have half the world squabbling over what features should go in rather than one company deciding on a standard feature set that will hopefully suit everyone's needs. Sort of a 'damned if you do, damned if you don't' situation.
Summary: in short, OpenGL is better for standardizing hardware innovation, as its momentum is actually controlled and guided. OpenGL can do all the same stuff, but not the same way, and will be behind, but has extensibility that keeps it capable of being on par. However, given the development cycles for games, it really amounts to the preference of those doing the software design.
 
and openGL is the API of choice for id software. just imagine how many games will be based on the doom3 engine. oooooooohhh (smack smack smack smack) mmmmmmm. 😀
 
Originally posted by: g3pro
and openGL is the API of choice for id software. just imagine how many games will be based on the doom3 engine. oooooooohhh (smack smack smack smack) mmmmmmm. 😀
Yup. And think of how many OpenGL games there would be if Carmack wasn't so good 🙂
 
Back
Top