Live data from Hacker News

Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

learnopengl.com

71–80 of 148 posts

Re: Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

#71
post #60

Earlier quoted context omitted.

Have you actually read the linked site beyond its name? The site is about fundamentals. Yes, it contains OpenGL code, but what it covers is the fundamentals of real time graphics, not just OpenGL API.

> Have you actually read the linked site beyond its name? The site is about fundamentals. Is it? All the fundamentals are tied to how it's done in OpenGL with somewhat sparse explanations in between. And many "fundamentals" are literally something like #version 330 core struct Material {

Here's the Vulkan version of that:

    #version 450
    struct Material {
Despite the name, GLSL is still used all over the place in Vulkan pipelines. The site teaches you the shader approach (rather than the fixed function pipeline of the 90s) which is what the "modern" Vulkan stack uses too.

Re: Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

#72

In 2026: Please don't learn this; it's obsolete. Learn Vulkan (Or another modern API; or how to build engines on top of them; or how to write shaders; or how to do GPU compute using CUDA etc)

Wonder how this opinion will age. Won't be surprised if in 10 years OpenGL will be more widely supported and used than Vulkan. It's the Lindy effect after all.

Re: Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

#74
post #60

Earlier quoted context omitted.

> Have you actually read the linked site beyond its name? The site is about fundamentals. Is it? All the fundamentals are tied to how it's done in OpenGL with somewhat sparse explanations in between. And many "fundamentals" are literally something like #version 330 core struct Material {

Yes, it is. Most articles there are practically API-agnostic. Just because the code examples happen to be written with OpenGL it doesn't mean it's about OpenGL. https://learnopengl.com/PBR/Lighting Even the code snippets start with "#version 330", if you implement these in another tech stack (say vulkan+slang) the relevant shader code would look very similar. It's quite strange to me that you think just because of "#…

It's not just because of that. Everything is steeped in OpenGL API. All the "fundamentals" are about OpenGL.

Another link floated to the top of HN discussion just now, and every sibgle link there is better than these "fundamentals": https://news.ycombinator.com/item?id=49022038 E.g. "Computer Graphics from Scratch" https://gabrielgambetta.com/computer-graphics-from-scratch/ or Mathematics for Computer Graphics https://www.amazon.co.uk/Mathematics-Computer-Graphics-John-...

Re: Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

#75
post #71
post #60

Earlier quoted context omitted.

> Have you actually read the linked site beyond its name? The site is about fundamentals. Is it? All the fundamentals are tied to how it's done in OpenGL with somewhat sparse explanations in between. And many "fundamentals" are literally something like #version 330 core struct Material {

Here's the Vulkan version of that: #version 450 struct Material { Despite the name, GLSL is still used all over the place in Vulkan pipelines. The site teaches you the shader approach (rather than the fixed function pipeline of the 90s) which is what the "modern" Vulkan stack uses too.

That was the absolute minimal example of where "fundamentals" immediately devolve into a very specific code targeting a very specific API. See also sibling comment: https://news.ycombinator.com/item?id=49027094

Re: Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

#76

Shaders used to not make any sense to me. The tutorial writes a simple expression and boom the screen is displaying all kinds of funky things. Then I realized you're just writing code that executes on all pixels sequentially. That made it easier to understand

> executes on all pixels sequentially

or in parallel?

Re: Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

#77

The old primitive API was the best. Who invented the new shader API? They ruined my life.

Same sentiment here. My litmus test is - after creating a window - "how many lines of code does it take to render a triangle?".

With the old OpenGL API you could do this in like 10 lines of code (probably even less with SGI's GL).

With the new/shader-based API, well... https://learnopengl.com/Getting-started/Hello-Triangle

Vulkan - I don't even want to know.

Re: Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

#78

The one and only Holy Bible of Graphics Programming. If you're starting to learn computer graphics, just study through the entire site and do the examples one by one. It doesn't matter one bit that it uses a slightly outdated API called OpenGL - you're supposed to learn how to render things first, not about some weird obscure hardware / driver details! After you've learned it, you can start learning CUDA if you want…

I've heard that learning WebGPU is a pretty decent alternative, it's cross-platform, has runners that are non-web, and has some of the niceties of Metal without being platform lock-in

Re: Learn OpenGL, extensive tutorial resource for learning Modern OpenGL

#80

The one and only Holy Bible of Graphics Programming. If you're starting to learn computer graphics, just study through the entire site and do the examples one by one. It doesn't matter one bit that it uses a slightly outdated API called OpenGL - you're supposed to learn how to render things first, not about some weird obscure hardware / driver details! After you've learned it, you can start learning CUDA if you want…

I've heard that learning WebGPU is a pretty decent alternative, it's cross-platform, has runners that are non-web, and has some of the niceties of Metal without being platform lock-in

Indeed, and a well regarded WebGPU guide is also trending on the front page at the same time :P

The "universal" nature of WebGPU with the "web" focus feels a lot like the graphics API equivalent of WASM. In that regard there are also some interesting projects/opportunities.

Post reply on HN