[HN Gopher] Learning Modern 3D Graphics Programming (2012)
       ___________________________________________________________________
        
       Learning Modern 3D Graphics Programming (2012)
        
       Author : jasim
       Score  : 59 points
       Date   : 2022-12-28 20:10 UTC (2 hours ago)
        
 (HTM) web link (paroj.github.io)
 (TXT) w3m dump (paroj.github.io)
        
       | hactually wrote:
       | I'd recommend taking a look at either https://vkguide.dev or my
       | preferred https://vulkan-tutorial.com/
       | 
       | I remember learning "modern" OpenGL back in 2005
        
         | dinkumthinkum wrote:
         | Did you have a time machine? OpenGL 3.3 came out in 2010.
        
         | bobharris wrote:
         | ThankYou. Are these the learnopengl.com of vulkan?
        
       | bmitc wrote:
       | If you were designing a new application from scratch, meant to be
       | cross-platform on Windows, macOS, and Linux, what 2D graphics
       | library would you use? I have been operating under the assumption
       | that Skia is that library but would like to hear thoughts.
       | 
       | What about 3D?
       | 
       | This is all assuming one wants something packaged and does not
       | want to write OpenGL or Vulkan code.
        
         | pak9rabid wrote:
         | Maybe check out QT?
        
       | overgard wrote:
       | https://vkguide.dev/ Might be a better alternative for 2022
        
       | aappleby wrote:
       | Old graphics dev here who has mentored new hires in basic
       | rendering tech.
       | 
       | Learn JavaScript+WebGL to the point where you can render simple
       | models with textures, shaders, and a basic camera controller.
       | 
       | Then, if you enjoy it and want to go further, do the same but in
       | your favorite language + Vulkan.
        
         | bobharris wrote:
         | Inspiring. Thanks.
        
         | boppo1 wrote:
         | Once I've got some neat stuff, how do I find someone to pay me
         | money to work with these technologies?
        
         | aappleby wrote:
         | (Or WebGPU, I keep forgetting that one exists...)
        
           | pjmlp wrote:
           | No wonder, they are years away of doing 1.0 MVP.
        
             | bialpio wrote:
             | If all goes well, looks like it'll be shipping enabled by
             | default in Chrome M113 (scheduled to go out at the
             | beginning of May).
             | 
             | https://groups.google.com/a/chromium.org/g/blink-
             | dev/c/VomzP...
        
         | _the_inflator wrote:
         | I agree. You can start with https://threejs.org/ to get things
         | rolling.
        
       | gfxgirl wrote:
       | Given that OpenGL is basically deprecated at this point this
       | arguably is no longer "modern 3D graphics programming"
       | 
       | If you still want to learn OpenGL there's https://learnopengl.com
        
         | bmitc wrote:
         | Is OpenGL really deprecated? I know Apple wants to kill it, but
         | isn't there a _ton_ of software that is written on top of
         | OpenGL?
        
           | soup10 wrote:
           | a bunch of industry lobbyists that run committees decided to
           | kill it, the alternatives are worse for many applications
           | though
        
         | dinkumthinkum wrote:
         | Modern OpenGL is not deprecated on non-MacOS platforms and even
         | then there are shims for Vulkan.
        
         | mkl95 wrote:
         | OpenGL is not close to deprecation. It may be decades before
         | mainstream GPUs stop supporting it. The amount of non abandoned
         | software built on top of OpenGL that is not being migrated to
         | Vulkan is mindboggling.
        
         | pjmlp wrote:
         | Kind of, GL 4.6 is still much easier to deal with than Vulkan.
         | 
         | Also it took a decade for good enough WebGL support, and WebGPU
         | is yet a year away to make its 1.0 release on Chrome, let alone
         | other browsers.
        
           | dinkumthinkum wrote:
           | Still much easier? They is a truly massive understatement.
        
         | synergy20 wrote:
         | This is also like 10 years old. OpenGL did not die easily, the
         | new replacements are at wars and I have yet to see an universal
         | API/library replaces OpenGL.
        
           | pjmlp wrote:
           | OpenGL was never universal on game consoles, despite urban
           | myths of support.
        
       | dang wrote:
       | Related:
       | 
       |  _Learning Modern 3D Graphics Programming_ -
       | https://news.ycombinator.com/item?id=7746192 - May 2014 (11
       | comments)
       | 
       |  _Learning Modern 3D Graphics Programming_ -
       | https://news.ycombinator.com/item?id=3294840 - Nov 2011 (51
       | comments)
       | 
       |  _Learning Modern 3D Graphics Programming with OpenGL 3_ -
       | https://news.ycombinator.com/item?id=2528740 - May 2011 (16
       | comments)
        
         | synergy20 wrote:
         | all dead links?
         | 
         | The one from 2012 seems great, in the meantime it is 10 years
         | old, is there newer version on the same topic somewhere else?
        
           | tmpburning wrote:
           | > > Learning Modern 3D Graphics Programming -
           | https://news.ycombinator.com/item?id=7746192 - May 2014 (11
           | comments)
           | 
           | > > Learning Modern 3D Graphics Programming -
           | https://news.ycombinator.com/item?id=3294840 - Nov 2011 (51
           | comments)
           | 
           | > > Learning Modern 3D Graphics Programming with OpenGL 3 -
           | https://news.ycombinator.com/item?id=2528740 - May 2011 (16
           | comments)
           | 
           | > all dead links?
           | 
           | dang is a robot.. ChatGPT will soon take over.
        
           | dang wrote:
           | Those 'related' lists are mostly so people can look at the
           | old comment threads, which are not dead, and hopefully won't
           | be for a long time.
           | 
           | archive.org has copies of most URLs that have been submitted
           | to HN over the years, and one of these days (years) we should
           | try to take advantage of that more formally. In the meantime
           | you have to look them up manually or write code to do that.
        
       | pjmlp wrote:
       | Not so modern after a decade.
       | 
       | For OpenGL, there is DSA and SPIR-V support.
       | 
       | And then there is Metal, Vulkan and DX 12, alongside NVN and
       | LibGNM/GNMX.
        
         | synergy20 wrote:
         | Every big players are running their own 3D graphic APIs these
         | days, wish they all agreed on something like Vulkan.
        
           | pjmlp wrote:
           | Khronos keeps not having an idea how to make APIs not full of
           | extensions and low level SDK tooling.
           | 
           | Big players have always used their own 3D APIs since the dawn
           | of 3D graphics.
        
             | psychphysic wrote:
             | I don't think it's entirely khronos support as basically
             | each vendor what's to embrace, extend and extinguish it
             | constantly.
             | 
             | CUDA is kind of winning it for nvidea.
        
               | pjmlp wrote:
               | Sure it is, not even LunarG's SDK is at the same level as
               | proprietary API SDKs in frameworks, debugging, IDE
               | integration, beyond the basics.
               | 
               | CUDA is winning on compute exactly because of that as
               | well.
        
             | dinkumthinkum wrote:
             | You think the big players don't (didn't) use OpenGL,
             | Vulkan, DX, etc?
        
               | pjmlp wrote:
               | Sony definitely not, Nintendo to some extent after GX,
               | Apple only after adopting NeXTSTEP (QuickDraw 3D was
               | their thing), Microsoft alongside NVidia and AMD design
               | first for DX, then the features get ported into GL/Vulkan
               | as extensions,...
        
           | Animats wrote:
           | Yes. WGPU is often being used as a common layer to abstract
           | Vulkan, Apple's Metal, and Microsoft's DX12, which do pretty
           | much the same thing.
           | 
           | Modern 3D graphics programming mostly abstracts to:
           | 
           | - Load standard gLTF shaders into GPU.
           | 
           | - Create mesh objects. Send to GPU.
           | 
           | - Create texture maps. Send to GPU.
           | 
           | - Create light objects. Send to GPU.
           | 
           | - Create 4x4 transform matrices. Send to GPU.
           | 
           | - Create objects referencing meshes, textures, and
           | transforms. Send to GPU.
           | 
           | - Create camera transform matrix. Send to GPU.
           | 
           | - Tell GPU "Go!".
           | 
           | Beyond that, it's mostly special effects, such as atmosphere,
           | lens flare, etc.
           | 
           | Most of the headaches today involve managing the memory in
           | the GPU, for which there are libraries.
        
       | andsoitis wrote:
       | The most popular modern graphics (GPU) APIs are DirectX 12
       | (Microsoft), Metal (Apple), and Vulkan (Khronos Group).
       | 
       | Targeting all three can be tough, hence WebGPU which lets you
       | write to a single API. Support on non-web runtimes have been
       | appearing as well, so you're not necessarily limited to the
       | browser (e.g. https://github.com/samdauwe/webgpu-native-
       | examples).
       | 
       | Good read: https://surma.dev/things/webgpu/
       | 
       | Tutorial for learning Vulkan:
       | https://www.vulkan.org/learn#vulkan-tutorials
        
         | vegabook wrote:
         | worth mentioning that Vulkan is the only API that runs on all
         | three major platforms. Natively on Windows and Linux, via
         | MoltenVK on MacOS.
        
           | slimsag wrote:
           | Vulkan has a lot going for it these days, but IMO the problem
           | with its future is that (a) it's too verbose to use without
           | an abstraction on top and (b) vendors won't stop pushing
           | their native APIs as a competitive advantage (Microsoft still
           | pushing DirectX - often getting features a year or two ahead
           | of Vulkan, Apple is pushing Metal, GNM[X] from Sony, etc.)
           | 
           | I think this means the future of graphics APIs is software
           | abstractions around the truly native APIs (DirectX, Metal,
           | etc.) - things like WebGPU, sokol_gfx, SDL's new GPU
           | abstraction, and Sebastian Aaltonen's stuff.
        
           | pjmlp wrote:
           | Middleware runs on more platforms, with more friendly
           | tooling.
        
         | slimsag wrote:
         | samdauwe's work is fantastic. We're using WebGPU in Mach
         | engine, and also have quite a large set of examples for how to
         | use WebGPU from Zig[0] that are pretty much standalone (only
         | use our engine for windowing/input), may be a bit easier for
         | folks to run (zero-fuss installation, you can cross compile
         | seamlessly to any OS, etc.):
         | 
         | [0] https://machengine.org/gpu/
        
         | pjmlp wrote:
         | Middleware is a better option, given consoles support, and
         | being the way studios have always dealt with multiple API
         | support.
        
           | AlbertoGP wrote:
           | Is "Middleware" the name of a graphics library? Or are you
           | talking in general, saying that using an intermediate library
           | is better than using the platform's API?
        
         | dinkumthinkum wrote:
         | Are you into graphics? Vulkan and DX 12 are not what you start
         | with to learn modern graphics programming. One thing, you
         | should realize by modern they mean use modern graphics pipeline
         | programming instead of an immediate mode API. So "Modern
         | OpenGL" is modern graphics programming and actually it is
         | sufficient for many cases but not for AAA real-time graphics
         | but learning DX11 or Modern OpenGL is the right place to start.
        
       | keepquestioning wrote:
       | Outdated. Learn VULKAN
        
         | synergy20 wrote:
         | are all big players supporting it? is there a good document.
         | 
         | while this is all about graphics, I wonder how GPGPU will end
         | up in the future. OpenCL did not get much love, CUDA still
         | rules the market(leaves Intel's OneAPI and AMD's ROCm and the
         | legendary OpenMP etc in the dust). Apple's Metal does both
         | graphics and GPGPU, Vulkan is also said to do both graphics and
         | GPGPU, not sure about Microsoft's, does it even have a GPGPU
         | API considering it is the only player without its own hardware.
        
           | psychphysic wrote:
           | What really killed them (as in not CUDA) is no easy way to
           | use them.
           | 
           | OpenCl pretty much broken on mesa so really amd is no better
           | than Nvidia on Linux. And Nvidia killing it with CUDA where
           | it works.
        
       ___________________________________________________________________
       (page generated 2022-12-28 23:00 UTC)