5 ms·
So reading this: > [Vulkan] really is overkill for learning 3D graphics...using modern OpenGL to introduce all the standard concepts, vertices, triangles, text
by wk_end 5y ago
So reading this:
> [Vulkan] really is overkill for learning 3D graphics...using modern OpenGL to introduce all the standard concepts, vertices, triangles, textures, shaders, fragments/pixels, the transformation pipeline etc. first is much better than trying to teach them Vulkan and graphics at the same time...
...got me wondering. I haven't really kept up with modern graphics programming, but my - possibly incorrect - understanding was that not only is Vulkan lower-level than OpenGL, it was also motivated by lots of questionable design decisions that OpenGL was kind of stuck with. So, with the above quote in mind, is it the case that:
* Vulkan is good (?) but too low-level for most users.
* OpenGL is a good environment to learn or do nuts & bolts 3D programming in - i.e. it's the right level of abstraction for that - but is kind of a mess.
Is that correct? Is there anything that splits the difference? How's Direct3D these days? Metal? Has anyone built a library on top of Vulkan, targeted roughly around the abstraction level of OpenGL, but with a better design?
- qbasic_forever 5y agoIMHO check out Three.js for learning and beginners, it's a very nice abstraction and scene graph that you can just start hacking on right in your browser on any device.
- jms55 5y ago> Has anyone built a library on top of Vulkan, targeted roughly around the abstraction level of OpenGL, but with a better design? WebGPU more or less fills this gap. It's built on top Vulkan/Metal/DirectX12 primarily, and targeted as a WebGL2 replacement, but there's also major interest (and right now, better support) around using it natively for games and other programs. There are bindings for Rust, C++, C, and Javascript (either through the browser, or using deno for native). Here's an excellent tutorial that uses Rust, although the API is more or less identical across languages https://sotrh.github.io/learn-wgpu/ https://sotrh.github.io/learn-wgpu/.
- sandGorgon 5y agohttps://docs.imgtec.com/Introduction_to_APIs/Vulkan_Migrating_from_OpenGLES/topics/vulkan_migrating_introduction.html https://docs.imgtec.com/Introduction_to_APIs/Vulkan_Migratin... This is a very nice comparison for people looking to explore Vulkan...even versus native frameworks like Metal (on OSX). P.S. I dont think OpenGL is supported on OSX anymore. However Vulkan has MoltenVK which works on OSX - https://github.com/KhronosGroup/MoltenVK https://github.com/KhronosGroup/MoltenVK MoltenVK is officially supported and is a big part of the Vulkan Portability initiative - https://www.vulkan.org/portability https://www.vulkan.org/portability MoltenVK is fully production ready. Multiple games use MoltenVK to run on OSX using Vulkan. Including the big one - DOTA 2 (https://www.gamingonlinux.com/2021/09/dota-2-to-drop-opengl-and-32bit-vulkan-default-on-linux-and-ti-21-tickets-on-september-22/ https://www.gamingonlinux.com/2021/09/dota-2-to-drop-opengl-...). The bug tracker for DOTA2/Vulkan is here - https://github.com/ValveSoftware/Dota-2-Vulkan https://github.com/ValveSoftware/Dota-2-Vulkan https://www.youtube.com/watch?v=xDGQcjqpYqI https://www.youtube.com/watch?v=xDGQcjqpYqI (M1 macbooks running moltenvk games)
- valleyer 5y agoOpenGL is still supported on macOS, though its use is discouraged. (This is what Apple means when it says it's "deprecated".)
- thatjoeoverthr 5y agoLast time I had to use it, it had an old version and was missing some features, disallowing use of compute shaders.
- inDigiNeous 5y agoOpenGL on macOS has been stuck on 4.1 + some 4.2 extensions since 2012 IIRC.
- barchar 5y agoApple's OpenGL implementation has always been mediocre even when it was technically supported.
- Jasper_ 5y agoAs a professional graphics programmer at a well-known game studio, who has taught and mentored a lot of people: Direct3D 11 is quite good. D3D12 is a bit more like Vulkan, but not too far in that direction. In order of recommendation for learners, just rating each API on its own merits without considering other factors like portability: D3D11, Metal, WebGPU, D3D12, OpenGL and Vulkan. OpenGL and Vulkan score last place for similar and opposite reasons: both their APIs are a mess, the debugging and tooling story is still underdeveloped. But while OpenGL has backwards API design that often gives users a wrong impression about how GPUs work, Vulkan instead is much more annoying, requiring the user to cross their T's and dot their I's, while still not giving good guidance towards how they should be structuring their rendering code. I am also eternally annoyed at things like VkFramebuffer which should have never existed (yes I do know it is not required in the latest version). I would rank WebGPU higher (disclaimer: I contribute to the WebGPU spec) since the API is a great intermediate, except WGSL is too new and too underbaked for me to seriously recommend it right now. The native implementations Dawn and wgpu are committed to supporting SPIR-V input, which is how I would recommend using it right now. Happy to answer questions or elaborate on this.
- bsder 5y agoYour Windows bias is showing. :) Personally, I find the Vulkan API to be one of the best designed APIs ever, and the debugging tools on desktop are okay. On Android, I'd say the Vulkan tools are, in fact, quite excellent. I can't compare them to iOS though. The problem with Vulkan and DirectX 12 (which I find to be so close as to be indistinguishable) has nothing to do with their APIs. The main problem is that "modern" graphics is only tangentially related to rendering triangles--and rendering triangles is normally what beginners really want to do. A lot of beginners also want to render 2D paths--and graphics APIs for that are horrifically bad. "Modern" graphics is mostly about creating a bunch of low-resolution "geometry buffers" and then scanning every single pixel on the screen only once while building the pixel up from some mathematical combination of those lower resolution buffers. Yes, there are triangles involved at a Platonic level, but many of the triangles are smaller than a pixel. See the Unreal Engine 5 demos: https://www.youtube.com/watch?v=qC5KtatMcUw https://www.youtube.com/watch?v=qC5KtatMcUw It's reached a point that "modern" graphics almost doesn't even want a triangle renderer--it just wants pure access to the massively parallel memory and computation pipeline on the GPU and the ability to smash the results into a framebuffer. Vulkan and DX12 reflect this, so they don't really mesh well with beginners. (I'm being a bit glib, but there really is a massive chasm between "modern" game rendering techniques and the kind of 2D/3D that GUI/CAD/Application developers want to use.)
- deleted 5y ago[deleted]