8 ms·
What about OpenGL?
by LockAndLol 7y ago
What about OpenGL?
- flohofwoe 7y agoOpenGL is on the way out, and for rendering 2D image data it requires too much setup code (need to create the GL context, a swap chain, a texture, and (unless GL 1.x is used) a vertex buffer, shader and setting up tons of render state). For 3D rendering, WebGPU would be the better option to support in WASI because it has standalone native implementations: https://dawn.googlesource.com/dawn https://dawn.googlesource.com/dawn https://github.com/gfx-rs/wgpu https://github.com/gfx-rs/wgpu But for blitting CPU-generated 2D image data to the screen WebGPU is also sort of overkill (of course it would be possible to create a much simplified wrapper library in WASM).
- gdxhyrd 7y agoNo, OpenGL is not "on the way out". Please back up your claims.
- Godel_unicode 7y agoOpenGL is certainly used by a number of creative apps like Photoshop, but you can't deny that the number of games released with OpenGL is down significantly since say 2010.
- gdxhyrd 7y agoA lot of games and apps are being released using OpenGL today. Then there is WebGL and OpenGL ES, widely used everywhere too. So, no, it is not going anywhere. In fact, Khronos themselves have said so.
- Godel_unicode 7y agoI didn't say that there were no OpenGL games being released in 2019/2020 but that the ratio is definitely skewing away from OpenGL. "A lot of games" seems like a stretch compared with what the numbers used to be. Also I think it's obvious but I'll say it anyway; it's not up to khronos it's up to developers. It doesn't matter if they continue to support OpenGL if developers move to some combination of dx11/12, Vulkan, and Metal. WebGL and OpenGL ES aren't OpenGL. Their uptake or lack thereof in other arenas is orthogonal to whether people are moving away from OpenGL for game development.
- gdxhyrd 7y agoConsidering UE4 and Unity both support OpenGL, yes, a lot if not the majority of games. WebGL and OpenGL ES are pretty much OpenGL. Formally they are different standards, but they are based all in OpenGL: if you know one, you know the others pretty well, which is what is important for developers as you agree in the second paragraph.
- Godel_unicode 7y agoOnce again, that's support not implementation. Developers could use OpenGL in Unreal. They could, but they haven't in general. Vulkan is the default, and is the more common choice. If it were true that lots of games were picking OpenGL, why is it so hard to make a long list of them? It's easy to make such a list for vulkan.
- drfuchs 7y ago“Apple deprecates OpenGL across all OSes”: https://www.anandtech.com/show/12894/apple-deprecates-opengl-across-all-oses https://www.anandtech.com/show/12894/apple-deprecates-opengl...
- gdxhyrd 7y agoApple is not Khronos. They haven't supported OpenGL for years anyway, so the fact they deprecate it now is irrelevant.
- dahfizz 7y agoA cross platform library loses its potency if it doesn't work cross platform.
- gdxhyrd 7y agoOpenGL does not stop being cross-platform just because it does not work natively in 1 platform. In any case, abstraction layers for macOS already exist. And, going by your definition, if Apple only allows Metal, then no API will be cross-platform ever anyway.
- pjmlp 7y agoOpenGL was never supported on games consoles, so....
- flohofwoe 7y agoThe GL tools rot is already starting. E.g. the Radeon GPU Profiler supports Vulkan, D3D12, OpenCL, but not OpenGL: https://gpuopen.com/gaming-product/radeon-gpu-profiler-rgp/ https://gpuopen.com/gaming-product/radeon-gpu-profiler-rgp/
- gdxhyrd 7y agoThat profiler is meant for low-level debugging as its own description says. That is why it does not support DX11 either.
- flohofwoe 7y agoAMD's OpenGL tools don't look too active either, e.g. the last release of CodeXL is from 2018, and this only updated dependencies or removed functionality, for instance this nugget from the release notes: --- * Removal of components which have been replaced by new standalone tools: * FrameAnalysis - use https://github.com/GPUOpen-Tools/Radeon-GPUProfiler https://github.com/GPUOpen-Tools/Radeon-GPUProfiler --- ...that Radeon-GPUProfiler is that tool which has only D3D12 and Vulkan support. Look around for AMD's OpenGL activity more recently, there's not much, which isn't surprising because they've been lagging behind NVIDIA with their GL drivers since forever. I bet they're eager to close that chapter. NVIDIA seems more committed to GL still, but without having all GPU vendors on board to continue supporting OpenGL, Khronos won't be able to do much to keep it alive.
- gdxhyrd 7y agoAMD has always lacked tools and has never produced much on the software side. That is not news, and that has nothing to do with the state of OpenGL. Please, stop spreading misinformation about OpenGL.
- Reelin 7y ago> but without having all GPU vendors on board to continue supporting OpenGL, Khronos won't be able to do much to keep it alive Please don't make things up. OpenGL 4.6 was released in July 2017. According to Wikipedia, modern AMD and NVIDIA cards both gained driver support for it in April 2018. Intel drivers have support since May 2019. (https://en.wikipedia.org/wiki/OpenGL#OpenGL_4.6 https://en.wikipedia.org/wiki/OpenGL#OpenGL_4.6)
- WAHa_06x36 7y agoOpenGL absolutely is a legacy API today. It has been an awful impedance mismatch to modern GPUs for about a decade now.
- pnako 7y agoIt's a high-level API. It went through N generations of graphics hardware for 30 years (40 if you consider IRIS GL).
- WAHa_06x36 7y agoAnd it became increasingly less of a good fit with each one. By now, it is ridiculously mismatched to the task it needs to perform. Just leave it to die.
- pjmlp 7y agoOpenGL will not be on the way out until Khronos defines an high level alternative to Vulkan, as not everyone enjoys being a GPU driver writer for doing graphics.
- WAHa_06x36 7y agoThat will most likely be the already mentioned WebGPU.
- pjmlp 7y agoThat is only for browsers.
- grovesNL 7y agoAs mentioned by flohofwoe in the parent comment, Dawn and wgpu are both native implementations of WebGPU for use outside the browser. In particular wgpu-rs will allow users to target both the browser API and run natively. Dawn and wgpu are also collaborating on a common set of native headers (https://github.com/webgpu-native/webgpu-headers https://github.com/webgpu-native/webgpu-headers) to make it easy to switch between implementations.
- pjmlp 7y agoThat is not a solution, OpenGL 4.6 with AZDO is more capable than WebGPU, just like WebGL 2.0 still lacks many of the OpenGL ES 3.2 capabilities.
- grovesNL 7y agoI think it's debatable whether WebGPU is less capable than OpenGL 4.6 with AZDO. Even if it is less capable, it doesn't mean WebGPU is not a solution nor only usable by browsers. Regardless it's the closest portable solution at the moment, and it will continue to add capabilities. The WebGPU CG has already had public meetings with Khronos to talk about running WebGPU on top of Vulkan, and running Vulkan Portability on top of WebGPU. So I think there's a lot of interest in making WebGPU succeed on both web and native targets.
- _pmf_ 7y ago> What about OpenGL? You cannot create a window or handle input with OpenGL.
- xet7 7y agoOpenGL is deprecated on macOS and iOS, because Apple has changed to use Metal: https://github.com/godotengine/godot/issues/19368 https://github.com/godotengine/godot/issues/19368 That's why Godot is moving to Vulkan, that can also run on Metal: https://godotengine.org/article/retrospective-and-future https://godotengine.org/article/retrospective-and-future For Godot game developers, this will not be visible in any way, it's under the hood change to engine. For other apps, there is in progress development to run full OpenGL on top of Vulkan with Zink. There is a blogpost about it here: https://www.collabora.com/news-and-blog/blog/2018/10/31/introducing-zink-opengl-implementation-vulkan/ https://www.collabora.com/news-and-blog/blog/2018/10/31/intr... There is also a talk about it at The X.Org Developer's Conference 2019-10-02 here, for example Blender seems to work already: https://youtu.be/rV0P1ChE_5o?t=3970 https://youtu.be/rV0P1ChE_5o?t=3970 All conference recordings are listed at conference website: https://xdc2019.x.org/ https://xdc2019.x.org/
- fenwick67 7y agoThanks for sharing Zink, this gives me hope for OpenGL's future.
- WAHa_06x36 7y agoOpenGL really is a legacy API in 2020. There is a massive mismatch between modern GPU design and the OpenGL API design. The only reason it wasn't left behind a decade ago is that there wasn't a decent replacement. Today, with Vulkan and soon WebGPU available, there really is very little reason to hang on to OpenGL for anything but legacy.
- pjmlp 7y agoYeah, because everyone wants to be a driver writer and compiler expert, in addition to graphics programming.
- fenwick67 7y agoThe only platform that has marked it as legacy doesn't support Vulkan (directly) either so I'm not convinced it's dead yet. The simpler API for the minor performance trade-off is still compelling for lots of uses.