12 ms·
OpenGL in 2014
- BadassFractal 12y agoThe saying is that total rewrites are always a bad idea. It'll be interesting to see if this one would be an exception to the rule.
- IshKebab 12y agoIt's not a rule though. Total rewrites are often not a good idea, but sometimes they are.
- tormeh 12y agoFor an API with 20 years of cruft? Rewriting is the only option.
- srcmap 12y agoUnfortunately, it also means GL has 20 yearly of usage history and large numbers of app that using it. Rewriting those will be much more harder. A lof of them probably not open source.
- tormeh 12y agoWhy would you want to rewrite them? The old OpenGL will just stagnate, I imagine, not go away.
- Sanddancer 12y agoThey'll continue working without a hitch. Various versions of OpenGL can live with each other.
- lucb1e 12y agoThe article gives the age as only argument for why it carries all that cruft, but it can never be the only factor. If it were, the 23 year old Linux kernel project would be rotten by now, especially with the 31 year old GNU toolkit. Sure I understand that there might be some stuff that should be deprecated (much like with HTML elements, the old stuff can be supported while newer projects use newer and better stuff), but rewriting from the ground up also means that you have to re-educate every developer out there. They might as well go and release for Windows instead since they probably have some experience with DirectX too. Rewriting something that many people use is a bad idea, especially when there are well-funded competitors trying to get developers onto their own platforms.
- raverbashing 12y agoYeah, but Linux is not afraid of removing cruft. Computers (and the x86-i386 arch) changed very little over the past 20 years, even with the 64-bit stuff Graphical cards evolved much more in the last 15 years. The first Direct3D versions were also bad, but they evolved and removed cruft and broke backwards compatibility.
- ygra 12y agoWell, as the recent article about modernizing less showed, such old projects frequently do show their age.
- diltonm 12y agoI don't do 3D programming but have benefited as a happy Steam customer from the great games on Linux now. Having said that, it's generally a bad idea to re-write software with such a massive customer base on the basis of age. The term cruft doesn't qualify this notion. Refine, update sure but re-writing seems like a major overreaction.
- Tuna-Fish 12y agoThe way I've heard it is: "Total rewrites are always a bad idea. Sometimes they are necessary."
- z303 12y agoWell OpenGL exists in the first place as cleaned up version of IrisGL (it originally was going to be IrisGL 5)
- Dylan16807 12y agoThis is a new API, not a new codebase. New APIs happen all the time.
- fsloth 12y agoThat saying is wrong. Total rewrites for the wrong reasons are a bad idea. Total rewrites for the right reasons and with _a right team_ can be great (i.e. better abstractions, better understood domain requirements which can lead to a more simple, better codebase, enable features that were not feasible before, and so on). Succintly: If the theory of the existing system is still understood well enough and the team understands the domain requirements and has experience of implementing similar systems then a rewrite can be a great idea (ref Naur: 'Programming as theory building' on what the theory of the system means as a concept and what are it's implications). For specific businesses, total rewrites can be startup-level risky and should be done due to specific domain requirements. I think this is usually what is meant by the 'bad idea' meme. Joel Spolsky wrote of this at some point and gave example of Netscape's rewrite attempt. His advice of "don't do it" was highly context dependent, though. When we discuss of creating a new industry standard API, we are not discussing of a single rewrite. There are a few typical patterns how these are done: 'fostering' an existing tech stack under a public institution or developing the API publicly.The public API development usually consists of two parts - agreeing on the theory of the API and implementing one or more reference implementations of the said API at the same time by member institutions. I'm not sure how to gauge the risk of this public API development. There are costs for member organisations but usually they are insignificant when compared to the size of an institution. There is usually no established product whose feature development and support stagnates because of this but rather the development is done to facilitate potential future products and features. Of course, the API adoption can fail (ref. for example OpenVG) but that fait can befall any new development for any number of reasons.
- BadassFractal 12y agoVery informative, thanks for sharing that.
- maaaats 12y agoWe need OpenGL as an alternative. What would Direct3D have been today without competition? But at the same time, GL is such a PITA to use directly that I don't bother without some middleware abstracting it away.
- pjmlp 12y agoAt the same level as the game console APIs. You don't get OpenGL on those.
- shmerl 12y agoThere is no reason not to have OpenGL there, besides the jerkiness of console manufacturers. Hopefully Steam Machines can put an end to such situation.
- eropple 12y agoThe PS3 had OpenGL. Nobody used it because it was vastly slower than libgcm. The PS4 has OpenGL. Almost nobody outside of indie-land has even looked at it because there's no reason to when libgnm is right there and you still pay a significant performance vig, in an industry where you do not get the luxury of ignoring performance, for an only marginally better API. The Xbox One, on the other hand, does provide what appears (I don't have access to any of these consoles, I just know a lot of game devs who like to drink) to be a complete DX11 implementation...and it's plagued with perf issues you don't see on a PC because the assumptions of the API don't map to the actual hardware--which, I understand, the lower-level constructs of DX12 will address. The future of non-indie game development seems very much to be going towards hardware: Mantle, Metal, libgnm, DX12. If you're on a console, you can afford to actually develop for the console. If you're not, you don't matter. (Indies don't care, but few people care about them, so that tail wouldn't wag the dog. Nobody cares about Steam Machines, so I don't know why you'd bring them up.)
- shmerl 12y agoThe fact that OpenGL on consoles has poor performance is the fault of console manufacturers, not of OpenGL itself. Also, their release schedule results in outdated hardware in comparison with regular computers. I.e. developers are forced into mentality of writing on a very low level to squeeze performance from a dated spec. More frequent updates could solve this situation and that's what Steam Machines aim to change as well. There is no valid reason why OpenGL can't be made to perform well on consoles except the lock-in mentality which plagues consoles market.
- pjmlp 12y agoNow they just have to create ONE single API, instead of forcing everyone to write multiple code paths to target the various flavours, extensions and drivers workarounds. Specific graphics APIs only matters when graphics middleware is not an option. Which OpenGL always requires. Since the standard leaves out how image/shader/texture/fonts/GUI/math are handled. I think the commoditization of engines will be the second coming of the OpenGL 2.0 - 3.0 stagnation, if they don't improve on these areas.
- sjtrny 12y agoOpenGL has support for: image/shader/texture/. The standard is quite clear about how these are handled. Anyway the trend (and demand from games programmers) is away from more features and towards a simplified and lower level API.
- pjmlp 12y agoSo in which section are APIs for loading defined? I am having some problems locating the page.
- wlievens 12y agoThat would be an API for asset management. OpenGL doesn't do that. It does do textures and shaders though.
- pjmlp 12y agoWhich was my point, other graphics APIs do offer such support.
- bsenftner 12y agoThat's not the job of a graphics API. It's a convenience utility that is not really feasible for OpenGL because it runs on so many platforms. You're asking for platform specific features on a cross platform library.
- fulafel 12y agoOn Linux you could in principle use the lower level hardware specific command issuing APIs as well. Mesa is not a privileged library.
- bhouston 12y agoGreat article, thank you! Any news as to when we will get a WebGLNext?
- jsheard 12y agoWe're still waiting for WebGL 2.0 to be finished, nevermind widely implemented, and that's based on a GLES version released two years ago rather than one that doesn't exist yet. Don't hold your breath.
- Stolpe 12y agoSo basically, "OpenGL in 2015" will be great!
- _random_ 12y agoWhoever doesn't force me to use C/C++ or JavaScript.
- zerebubuth 12y agoOpenGL might well be the "only truly cross-platform option", but it seems to me that, for games or mobile app development, getting stuff drawn on screen is only part of the problem. The rest is about doing so with the minimum use of cycles - either for better frame rates or better battery life. I can easily imagine that this is a classic 80/20 problem, with the 20% that takes 80% of the time being adequate ("butter smooth") performance. So, given that the capabilities of the graphics hardware can vary a lot, how closely can a single, unified API like glnext approach optimal use of the hardware? And without the kinds of platform-specific code paths which are necessary under current OpenGL?
- Narishma 12y agoAs long as there are multiple different GPUs around, there will always be a need for multiple code paths if you want to get good use of those GPUs, whether you use the same API or not.
- darkmighty 12y agoThe idea isn't to completely eliminate cross platform rewriting (which may sacrifice efficiency), but to make it minimal (and flexible).
- frozenport 12y agoWe all got messed up with the transition to OpenGL 4 and now we are gonna have another OpenGL? I don't see OpenGL getting out of this funk until the language you learn today will be useful tommrow. Perhaps, a new API is a step in the right direction but things are gonna hurt bad bad for years to come, especially when OEMs don't support the API.
- sheng 12y agoAll the whining and complaining makes me wondering how anyone was able to write something with OpenGL at all. This is fascinating because a great amount of people were actually able to write awesome Games and Applications with this API. Look at the whole lot of mobile devices. I have no numbers to base this statement on but I would be bold enough to claim that OpenGL is thanks to the multiplatform ability by far the most successful graphics API out there. The set of devices that brings some or another form of OpenGL support outnumbers other graphics platforms. This alone is a huge accomplishment. Heck, even Minecraft was able to run on PowerPC systems until they pushed the java version supported[1]. But now I need to look at the link and have to admit that the criticism is still correct. The API is still pretty rough and could see some improvements. I know this myself, I also played around with OpenGL at some point. There is a lot of boilerplate code that needs to be written before you can start yourself with the real game. This was always the case. This is why we always had an engine, a framework to built on. But to say that it all is a huge pile of shit is a little bit harsh … [1] https://help.mojang.com/customer/portal/articles/884921-minecraft-java-5-and-powerpc-support https://help.mojang.com/customer/portal/articles/884921-mine...
- ekr 12y ago>The API is still pretty rough and could see some improvements. I know this myself, I also played around with OpenGL at some point. There is a lot of boilerplate code that needs to be written before you can start yourself with the real game. OpenGL is a graphics library (and a rather low-level one too), so it has very little to do with games. It's only a specification for the wrapper above the gpu hardware.
- pjmlp 12y agoExcept other APIs offer what in OpenGL requires an engine/framework. - Font loading - Texture loading - Shader loading - Math library - Geometry loading - Meshes - Integration with the OS UI - Debugging capabilities
- flohofwoe 12y agoWhat other APIs would that be which offer this functionality? In D3D this used to be offloaded into a separate D3DX API, but AFAIK this is no longer supported in Windows8 (at least in the WinRT API) and has been moved into separate mostly personal projects (e.g. http://directxtex.codeplex.com/ http://directxtex.codeplex.com/). A 3D rendering API should only be concerned about efficient 3D rendering and not burden itself with specific resource file formats. For OpenGL there's plenty of libraries to choose from, for instance: - glm for math (http://glm.g-truc.net/0.9.5/index.html http://glm.g-truc.net/0.9.5/index.html) - gli for texture loading (http://gli.g-truc.net/0.5.1/index.html http://gli.g-truc.net/0.5.1/index.html) - assimp for general asset loading: http://assimp.sourceforge.net/index.html http://assimp.sourceforge.net/index.html - the STB headers (not OpenGL specific): https://github.com/nothings/stb https://github.com/nothings/stb - GLFW as window system glue and input wrapper - ...and more which I am not aware of or forgot to list GPU vendors also have SDKs and especially debugging tools (e.g. NVIDIA nSight which integrates into VStudio). It's not in one place like in DirectX, but on the other hand, the OpenGL world has a lot more platforms and usage scenarios to cover then D3D or the various new-style APIs like Metal or Mantle (these are the actual motivation for OpenGL-Next, reducing overhead even when this means a lower-level API which is even more focuses and harder to use then before).
- joliv 12y agoPermalink: http://coffeemoment.weebly.com/blog/a-new-way-of-online-buying-and-selling http://coffeemoment.weebly.com/blog/a-new-way-of-online-buyi...
- shmerl 12y agoIs there any ETA for OpenGL-next?
- fizixer 12y agoIt seems no one has mentioned the long peaks fiasco yet, which is an important part of understanding OpenGL history and the committee(s) in charge of the standard: http://en.wikipedia.org/wiki/OpenGL#Longs_Peak_and_OpenGL_3.0_controversy http://en.wikipedia.org/wiki/OpenGL#Longs_Peak_and_OpenGL_3.... TL;DR: This is not the first time people are pissed at OpenGL. Last time when industry, developers, etc were sick and tired, around 2006-2007, and it was decided to do something about the API, an effort was initiated. Once the work was close to finishing, those who had seen the glimpse of this yet-to-be-released API were excited and were eagerly waiting for the release. Then the OpenGL committee vanished from the scene for a year or so, and when it re-appeared, it released the same old shitty API with a handful of function calls on top of that.
- c3d 12y agoThe multiplicity of APIs demonstrates that the problem is hard. The needs of game developers pull the APIs in a specific direction. And these requirements must be addressed, because the games market is huge and pushes the envelope. But other users may have different needs. OpenGL is used by games, but not just games. For example, at Taodyne, we use OpenGL for real-time 3D rendering of business information on glasses-free 3D screens. I can tell you that my pet peeves with OpenGL have nothing to do with what's being described in any of the articles. Some of the top issues I face include 3D font rendering (way too many polygons), multi-view videos (e.g. tiled videos, which push texture size limites, or multi-stream videos, that bring a whole bag of threading issues), large numbers of large textures without the ability to manually optimise them (e.g. 12G of textures in one use case). Heck, even the basic shader that combines 5, 8 or 9 views into one multiscopic layout for a lenticular display makes a laptop run hot for a mere HD display, and requires a rather beefy card if you want to have any bandwidth left for something else while driving a 4K display. Many of these scenarios have to do with limitations of textures sizes, efficient ways to deal with complex shapes and huge polygon counts that you can't easily reduce, very specific problems with aliasing and smoothing when you deal with individual RGB subpixels, etc. Of course, multiscopic displays are not exactly core business right now, so nobody cares that targeting them efficiently is next to impossible with current APIs.
- electrograv 12y agoSure, the problem is hard. But so are most problems worth solving. That it's hard doesn't mean it's impossible or excuse bad solutions; Direct3D actually does an extremely good job at it, in fact. If you've not used modern Direct3D, it's hard to concisely explain how much better it solves this problem than OpenGL. It's just a cleaner, more elegant, faster API (of course, I know this wasn't always the case, but we're talking about now). Many of the "non-game" problems you mention really have nothing to do with the API and should be solved by third party libraries or the OS. Text rendering is not a GPU feature so don't expect a graphics API to treat it as such. The problems game developers find in a 3D API affect everyone, because at its core the 3D API is just our way of talking to the GPU. The main complaints from "non-game" applications like this are either common to everyone (texture, render target limits), or application specific things that have absolutely nothing to do with the GPU (like text rendering) and have no place in a low level GPU API. I know it would make your life easier if the API was more like a library with exactly your use cases already implemented, but that's simply not the role of a hardware API. P.S. You probably shouldn't be using polygons for font rendering. Nobody does it this way in practice (except rare cases perhaps). But this is another discussion; feel free to message me privately and I'd be glad to provide more info on best practices.
- shurcooL 12y agoMy current approach is to use Go and target WebGL as the lowest common denominator, but with OpenGL (and/or OpenGL ES) backends as well. That way graphics code written once can run on OS X, Linux, Windows, browser (including iOS).
- ndesaulniers 12y agoHow do you target WebGL with Go? Is it possible to cross compile Go to JS?
- graetzer 12y agoIt seems there is a cross compiler for Go https://github.com/gopherjs/gopherjs https://github.com/gopherjs/gopherjs There are also bindings for WebGL https://github.com/gopherjs/webgl https://github.com/gopherjs/webgl
- deleted 12y ago[deleted]
- shurcooL 12y agoAs graetzer said, I use GopherJS and WebGL bindings. For a simple example, see https://github.com/shurcooL/play/commit/cd45204c1b2d8906225566e1e8bfc6d4317ef6ec?diff=unified#commitcomment-7846474 https://github.com/shurcooL/play/commit/cd45204c1b2d89062255....
- illumen 12y agoWebGL OpenGL is now available to more people than ever. By an exponential amount. It is supported by all major browsers. From IE, to Firefox, to Chrome, to Android, to iOS, and more.
- pjmlp 12y ago> ... Android, to iOS ... On iOS, only starting with iOS 8 On Android, only with Firefox. OEM modified browsers don't do it. Chrome only enables it in specific devices.