11 ms·
The combination of C++ and OpenGL is really the ultimate in portability. A language supported on almost every platform by one if not more implementations (some
by Game_Ender 8y ago
The combination of C++ and OpenGL is really the ultimate in portability. A language supported on almost every platform by one if not more implementations (sometimes 3), coupled with probably the most widely supported graphics API. Of course you lose accessibility, and many platform API conveniences, but you get a more stable and performant platform to work with. In fact it's the platform that most web browser themselves are heavily based on. For another example just look at what Epic was able to do with Fortnite, one code base that literally runs everywhere.
Magnum [0] is a favorite of mine for creating portable OpenGL C++ applications. It also has support for compiling to WebAssembly [1] and using WebGL2.
0 - https://magnum.graphics https://magnum.graphics
1 - https://magnum.graphics/showcase/picking/ https://magnum.graphics/showcase/picking/
- ianlevesque 8y agoWell, it was for a while: https://www.anandtech.com/show/12894/apple-deprecates-opengl-across-all-oses https://www.anandtech.com/show/12894/apple-deprecates-opengl...
- Game_Ender 8y agoYeah there is MoltenGL which will probably be open sourced eventually. The real future is Vulkan which is moving to replace OpenGL and for the Apple platforms there is MoltenVK [0] (Vulkan re-implemented on top of Apple's new Metal) which is open source. Magnum has an initial Vulkan backend [1], and many other engines have them or are building them as well. 0 - https://github.com/KhronosGroup/MoltenVK https://github.com/KhronosGroup/MoltenVK 1 - https://blog.magnum.graphics/announcements/2018.10/ https://blog.magnum.graphics/announcements/2018.10/
- ianlevesque 8y agoThat’s cool I didn’t realize MoltenVK was maintained by Khronos.
- AlphaSite 8y agoI think it was donated to them.
- SXX 8y agoValve acquired the project and made it open source.
- Svoka 8y agoFrom what I understand it was bought out by Valve and donated to community in its quest to promote gaming on Linux (where no Metal or Dx12). I can only speculate that it wasn't most successful commercial product.
- Svoka 8y agoMoltenGL proprietary and not the only implementation of the GL library on top of modern APIs. There's also ANGLE. It worked pretty OK-ish in my project running OpenGL game on Windows Phone 8. I was using Microsoft's fork [2]. Another alternative is GLOVE [3], which is a software OpenGL on top of Vulkan. Another interesting project is WebGPU [4] which targets to provide Vulkan-like APIs across various platforms in browsers. As it's offshoot which is not quite related is GFX-rs, which became a cross-platform Rust library providing low level graphics API (HAL layer). looking forward seeing ANGLE getting Metal backend, which been just a promise so far. [1] https://github.com/google/angle https://github.com/google/angle [2] https://github.com/Microsoft/angle https://github.com/Microsoft/angle [3] https://think-silicon.com/products/software/glove/ https://think-silicon.com/products/software/glove/ [4] https://en.wikipedia.org/wiki/WebGPU https://en.wikipedia.org/wiki/WebGPU [5] https://github.com/gfx-rs/gfx https://github.com/gfx-rs/gfx
- Crinus 8y agoOpenGL is deprecated, not removed, you can still use it in current versions of macOS as long as you are fine with the version it ships (which in general should be fine for a ton of 3D games, remember that something like Doom 3 was built on OpenGL 1.5 + extensions and Rage was built on OpenGL 2.0 + extensions). Apple might break it sometime in the future, but Apple might break any API in the future (i have several applications and games that stopped worked every time i upgraded macOS and the developers had abandoned them - one of the reasons i decided to stick with Windows over the years is that old apps keep working) so that comes with the territory.
- ChrisRR 8y agoDoom 3 was released 15 years ago. A lot has changed since then
- Crinus 8y agoIt is still technically more advanced and looks better than the vast majority of indie games and my point was that if something like Doom 3 (or Rage) can be made using OpenGL 1.5+exts (or OpenGL 2.0+exts, for Rage) then OpenGL 4.1+exts that macOS provides is more than enough for a ton of games. Yeah, it'd be nice if macOS supported OpenGL 4.6 and even better if Apple wasn't braindead enough to deprecate OpenGL instead of fixing one of the worst implementations (and still the only that has the core/compatibility divide that makes matters even worse), but even with all that taken into account, OpenGL on macOS is still capable enough for almost every game bar the more high end ones.
- zamadatix 8y agoNo browser by default runs WebGL on native OpenGL on Windows either.
- deleted 8y ago[deleted]
- IvanK_net 8y agoAlso, keep in mind, that while WebGL is based on OpenGL ES, it is emulated using Microsoft Direct X on all Windows machines (by all mainstream browsers through the Angle project https://github.com/google/angle https://github.com/google/angle).
- artursapek 8y agoA viable alternative is Rust + OpenGL, using gfx[1]. I've had success cross-compiling one Rust codebase to Windows, Mac, and Linux native applications that can render OpenGL graphics. I even got the compilation for all three targets working from within a single docker image, meaning the build can easily be set up in any modern CI system. [1] https://github.com/gfx-rs/gfx https://github.com/gfx-rs/gfx
- pjmlp 8y agoRust still lacks support for many platforms where there is a C and C++ compiler, and on Windows it is found lacking regarding COM/UWP.
- justinclift 8y agoGo + OpenGL works too, though the sizes of binaries when generating to WebAssembly isn't yet very good. Needs some optimisation done on that part. ;)
- Arelius 8y agoI'm not sure Fortnite is a very good example, it uses OpenGL on very few of it's platforms.
- pjmlp 8y agoOpenGL never was a thing on game consoles.
- maeln 8y agoAll Sony console use a derivative of OpenGL[0]. [0] https://en.wikipedia.org/wiki/PSGL https://en.wikipedia.org/wiki/PSGL
- pjmlp 8y agoActually, only as footnote on the history of 3D APIs. PSGL was largely ignored by everyone that matters in the game industry and eventually dropped. https://sandstormgames.ca/2011/07/22/debug-playstation3/ https://sandstormgames.ca/2011/07/22/debug-playstation3/ "At one point, Sony was asking developers whether they would be interested in having PSGL conform to the OpenGL ES 2.0 specs (link here). This has unfortunately never happened however, as developers seem to have mostly preferred to go with libGCM as their main graphics API of choice on PS3. This has meant that the development environment has started becoming more libGCM-centric over the years with PSGL eventually becoming a second-class citizen – in fact, new features like 3D stereo mode is not even possible unless you are using libGCM directly." Just like everyone raves around Switch having Vulkan support, when most studios are using Unreal, Unity and the main 3D API, NVN. As rule of thumb, instead of believing what gets posted on FOSS friendly web sites regarding 3D APIs, GDC Vault, Making Games, IGDA, Connect, EDGE, Retro Gamer, and AAA studio dev blogs are a much better source of information.
- TeMPOraL 8y ago> Fortnite, one code base that literally runs everywhere Except Linux?
- TheAceOfHearts 8y agoIt runs on Android. They probably haven't released a desktop Linux version because of the small market share, but there's probably no technical reason why they couldn't.
- ianlevesque 8y agoIndeed. Unreal engine looks compatible since ~2015 https://www.unrealengine.com/en-US/blog/unreal-engine-4-and-linux https://www.unrealengine.com/en-US/blog/unreal-engine-4-and-...
- TeMPOraL 8y agoIf so, then I'm going to guess it's about whatever anti-cheating invasive NSA-in-the-box DRM they use; it probably won't work on Linux.
- pjmlp 8y agoThe Linux kernel is an implementation detail on Android, in what concerns userspace.
- tobyhinloopen 8y agoFortnite doesn't run on my mac though
- de_watcher 8y ago> Fortnite, one code base that literally runs everywhere Dude, you made me think that I've missed the Linux release of the Fortnite!
- _pmf_ 8y ago> The combination of C++ and OpenGL is really the ultimate in portability. Wouldn't the credit belong to Magnum rather that C++ plus OpenGL, given the tremendous amount of work that goes into making things seem portable to the end user of the library?