top | item 7822178

(no title)

pyalot2 | 11 years ago

This post is factually wrong, and misguided. Here's why:

#Preamble: Except on Windows you cannot run Direct3D anywhere else. Unless you plan not to publish on Android, iOS, OSX, Linux, Steambox, PS4 etc. you will have to target OpenGL, no matter how much you dislike it.

#1: Yes the lowest common denominator issue is annoying. However, in some cases you can make use of varying features by implementing different renderpaths, and in other cases it doesn't matter much. But factually wrong is that there would be something like a "restricted subset of GL4". Such a thing does not exist. You either have GL4 core with all its features, or you don't. Perhaps author means that GL4 isn't available everywhere, and they have to fall back to GL3?

#2: Yes driver quality for OpenGL is bad. It is getting better though, and I'd suggest rather than complaining about OpenGL, how about you complain about Microsoft, Dell, HP, Nvidia, AMD etc.?

#compiler in the driver: Factually this conclusion is completely backwards. First of all the syntactic compile overhead isn't what makes compilation slow necessairly. GCC can compile dozens of megabytes of C source code in a very short time (<10ms). Drivers may not implement their lexers etc. quite well, but that's not the failing of the specification. Secondly, Direct3D is also moving away from its intermediary bytecode compile target, and is favoring delivery of HLSL source code more.

#Threading: As author mentions himself, DX11 didn't manage to solve this issue. In fact, the issue isn't with OpenGL at all. It's in the nature of GPUs and how drivers talk to them. Again author seems to be railing against the wrong machine.

#Sampler state: Again factually wrong information. This extension http://www.opengl.org/registry/specs/ARB/sampler_objects.txt allows to decouple texture state from sampler state. This has been elevated to core functionality in GL4. The unit issue has not been resolved however, but nvidia did propose a DSA extension, which so far wasn't taken up by any other vendor. Suffice to say, most hardware does not support DSA, and underneath, it's all texture units, even in Direct3D, so railing against texture units is a complete red herring.

#Many ways to do the same thing: Again many factual errors. Most of the "many ways" that author is railing against are legacy functions, that are not available in core profile. It's considered extremely bad taste to run a compatibility (to earlier versions) profile and mix&mash various strata of APIs together. That'd be a bit like using Direct3D 8 and 11 functionality in the same program. Author seems to basically fail in setting up his GL context cleanly, or doesn't even know what "core profile" means.

#Remainder: Lots of handwaving about various vaguely defined things and objecting to condjmp in the driver, again, author seems to be railing against the wrong machine.

Conclusion: Around 90% of the article is garbage. But sure, OpenGL isn't perfect, and it's got its warts, like everything, and it should be improved. But how about you get the facts right next time?

discuss

order

fixermark|11 years ago

Every time I read the words "The extension," I cringe a little. In my experience, "There's an OpenGL extension for it" translates almost directly to "This will not work on a critical percentage of your customer's machines, and will work in a way that violates the extension's documentation in another critical percentage."

If key parts of the API that you need live in "the extensions," then the API itself is not a properly-tuned abstraction to serve your needs well.

admax88q|11 years ago

> This has been elevated to core functionality in GL4.

wisienkas|11 years ago

but java does fine with it needs of extensions to everything. How do you justify that?

to3m|11 years ago

"Like it or lump it" is not a great advertising strategy :)

I suspect the point about this subset-of-GL4 thing is that what you can rely on in practice is OpenGL3, plus enough extensions to bring it up to something closer to OpenGL4. Take a look at the Unity3D hardware stats (http://stats.unity3d.com/index.html) or the Steam hardware stats (http://store.steampowered.com/hwsurvey/) - ~50% of the Unity market and ~25% of the Steam market is pre-DX11, which I believe limits it to OpenGL3 at most.

I might agree that the the author of this piece is a bit careless about distinguishing between OpenGL as it is implemented and OpenGL as it is specified. Aside from the bind points nonsense, and the massive pile of random 16-bit values that is GLenum, the OpenGL spec doesn't actually require everything to be this total clusterfuck. I'm not aware of any specified reason why the GLSL compiler couldn't just as easily be a shared component (as it is in Direct3D), for example, and I don't recall the bit where the spec insists on shitty drivers. Still, we have to work with what's there, not with what should be there, and when what's there is a bit of a mess, it's absolutely fair to call it what it is.

to3m|11 years ago

Also, regarding the `many ways' section, which bits are removed in the core profile? It looks like everything he complains about is still there in the 4.3 core profile...

cdash|11 years ago

Your point about Direct3D being only on Windows is true but I just wanted to point out that the PS4 does not in fact use OpenGL at all.

dllthomas|11 years ago

"Drivers may not implement their lexers etc. quite well, but that's not the failing of the specification."

Well, it could be, if the specification of the language requires a lot of work in the lexer, but that's probably not the case.

pyalot2|11 years ago

GLSL isn't anything as hard to parse as C. Besides, the bytecode discussion is a complete red herring. It's been done since ages for the web too, if it's slow to compile, it's either sheer incompetence on the part of the driver writer, or the reason isn't the parsing.

leorocky|11 years ago

> how about you complain about Microsoft, Dell, HP, Nvidia, AMD etc.?

These companies are businesses that need a business reason to support your platform. Until more people are playing triple A games on platforms that use OpenGL you can't really fault them for spending money when it doesn't make sense. Apple designs its own chips for its mobile device so I'd think the OpenGL on iOS would have better driver support.

vetinari|11 years ago

> Apple designs its own chips for its mobile device so I'd think the OpenGL on iOS would have better driver support.

Apple licenses Imagination Technology's PowerVR GPUs, they do not design them themselves. The OpenGL driver also comes from IT.

tmikaeld|11 years ago

Rage and Wolfenstein:The new order are both triple A titles and IdTech 4 & 5 is based on OpenGL.

wolfgke|11 years ago

But laptop manufacturers normally don't support driver updates over many years which is necessary to stay current with OpenGL versions. Often the (semi-official) NVidia Verde drivers from NVidia work when the laptop has an NVidia GPU; for AMD GPUs there's no such support.

pyalot2|11 years ago

OpenGL is the only thing you get on iOS. There is no Direct3D on iOS. Likewise, it's the only thing you get on PS4, Steambox, OSX etc.

But that's not my issue, I acknowledge freely that OpenGL drivers are bad. I just don't quite see how that's a failing of OpenGL, rather than the vendors who actually implement the drivers.

Morgawr|11 years ago

>Until more people are playing triple A games on platforms that use OpenGL you can't really fault them for spending money when it doesn't make sense.

All platforms support OpenGL, not sure where you're getting at.

bitwize|11 years ago

Except on Windows you cannot run Direct3D anywhere else. Unless you plan not to publish on Android, iOS, OSX, Linux, Steambox, PS4 etc. you will have to target OpenGL, no matter how much you dislike it.

Yeah? So? If the graphics API which provides reasonable guarantees of feature availability and performance exists only on one platform, you code for that platform if you need those guarantees. There is a reason why until recently virtually all PC games, and a great many other graphics applications, were Windows only.

Yes driver quality for OpenGL is bad. It is getting better though, and I'd suggest rather than complaining about OpenGL, how about you complain about Microsoft, Dell, HP, Nvidia, AMD etc.?

Khronos Group failing to provide rigorous conformance tests and driver quality standards IS A FAILURE OF OPENGL. That's why Microsoft provided extensive support for OEMs and driver developers from the get-go with Direct3D: they wanted their API to be used.

If you care about graphical performance, then OpenGL is simply not up to the task. You should be using Direct3D, period.

Tmmrn|11 years ago

> If you care about graphical performance, then OpenGL is simply not up to the task.

I'm always confused when people say stuff like that.

1. Random forum user says "OpenGL is not up to the task". 2. AAA game developers says "That the Linux version runs faster than the Windows version (270.6) seems a little counter-intuitive, given the greater amount of time we have spent on the Windows version. However, it does speak to the underlying efficiency of the kernel and OpenGL." http://blogs.valvesoftware.com/linux/faster-zombies/

Who do I believe?