7 ms·
Learn OpenGL, extensive tutorial resource for learning Modern OpenGL
- AspisAiantos 3mo agoI've gotten through the Getting Started section and found it to be quite good overall. A few times it seems to make some jumps back and forth between slightly different setups, which might lead to some problems debugging. I definitely recommend it to anyone interested! Honestly one of the biggest things it helps with is explaining the setup boilerplate for OpenGL.
- MoltenMan 3mo agoMan, this takes me back! I made a Minecraft clone called Mindacraft in Java using LWJGL (the same framework Minecraft uses) about 6 or 7 years ago using this tutorial. I vividly remember this tutorial being the most useful resource for OpenGL by an order of magnitude, and that was with it being written in a language that actually had pointers and buffers! (Using OpenGL in Java is very weird because you have to use pointers and buffers through a bunch of wrapper classes, and it makes things a lot weirder. It's like using unsafe in Rust if unsafe wasn't even in Rust).
- SomeHacker44 3mo agoAny recommendations on how to use OpenGL from the CLR (.Net/C#) please?
- Sleaker 3mo agoTypically just find bindings for your language and adapt the startup/bootstrap to match your language syntax. Opengl calls are fairly agnostic especially when you move to the shader logic. The biggest issue with c# dev is OS specific window management. CLR doesn't have good wayland support yet if you're trying to do this from a modern Linux distro.
- arjonagelhout 3mo agoI can recommend OpenTK [0]. I've used it recently to create a 3D renderer, and I have not run into any issues. [0] https://opentk.net/ https://opentk.net/
- AyanamiKaine 3mo agoIf you want to use the learned knowledge I would recommend to use something like Sokol [0] or use the SDL-GPU API [1]. While Sokol is more higher level both can be used. Otherwise learn opengl is a really good introduction. [0] https://github.com/floooh/sokol https://github.com/floooh/sokol [1] https://wiki.libsdl.org/SDL3/CategoryGPU https://wiki.libsdl.org/SDL3/CategoryGPU
- the__alchemist 3mo agoIn 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)
- samiv 3mo agoOpenGL is not obsolete and is totally fine for many use cases. Vulkan is way too complicated and cumbersome for many. Even if OpenGL doesn't get new features what exists now will continue to work for decades.
- reactordev 3mo agoSadly, the OP is right, OpenGL is deprecated on a number of platforms and down right removed from others. Please don't learn this now. Vulkan has the shape of every modern graphics api out there, DX included. Learn this or at the very least WebGPU.
- flohofwoe 3mo agoThe problem with OpenGL isn't so much that its programming model is outdated, but that it is an incredibly confusing and (in many places) just plain badly designed API (just look at VAOs, it's hard to come up with a more broken and useless feature - some of the problems have been salvaged on more recent OpenGL versions, but those are not portable to macOS or GLES3.x). Another (related) problem is that the many sediment layers that have accumulated over nearly three decades are not clearly separated (and Vulkan is starting to suffer from the same problem btw, there's always at least five different ways to do the same thing, three of which are outdated or not recommended to be used on specific GPU architectures, and the other two have complicated relationships and interdependencies with other redundant or optional features, it's apparently some sort of Khronos curse to always create the biggest possible mess when it comes to 3D APIs). On Windows (maybe even on Linux via Proton), starting with D3D11 makes a lot more sense, or on macOS with Metal v1. Both APIs are 'close enough' to modern 3D APIs to carry a lot of the knowledge over, but without being too low-level like Vulkan or D3D12, WebGPU running in browsers is also a good choice (even though it inherits some bad design decisions from Vulkan 1.0 when it comes to resource bindings, and is in some places actually slower than WebGL2).
- brcmthrowaway 3mo agoThe old primitive API was the best. Who invented the new shader API? They ruined my life.
- cyber_kinetist 3mo agoIf you want to use glBegin() / glEnd() - like immediate API with modern OpenGL, I reecommend using a library called RLGL (https://github.com/raysan5/raylib/blob/master/src/rlgl.h https://github.com/raysan5/raylib/blob/master/src/rlgl.h), from Raylib. You'll feel straight at home!
- nuxi 3mo agoSame 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 https://learnopengl.com/Getting-started/Hello-Triangle Vulkan - I don't even want to know.
- DavidPiper 3mo ago> Vulkan - I don't even want to know Almost 1000: https://github.com/Overv/VulkanTutorial/blob/main/code/15_hello_triangle.cpp https://github.com/Overv/VulkanTutorial/blob/main/code/15_he... (From Chapter 15 of the Vulkan Tutorial from vulkan-tutorial.com)
- cyber_kinetist 3mo agoThe 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 to do some more low-level compute stuff on the GPU (sorry, but you should just buy an NVIDIA card, CUDA is just that good). Or if you actually want to just make things but want to use a nicer cross-platform graphics API than OpenGL, then I recommend SDL3. (Or use Metal if you want to make macOS exclusive apps - it's actually a quite nice API) Vulkan or DX12 are currently flawed APIs that are unnecessarily complex and doesn't even match the performance characteristics of current-gen hardware anymore. (see the titular post: https://www.sebastianaaltonen.com/blog/no-graphics-api https://www.sebastianaaltonen.com/blog/no-graphics-api). However if you want a computer graphics career (either in the game industry or in other niche domains) having experience with these APIs will be beneficial since these are what many production apps are currently stuck with - though honestly the job market for graphics really suck nowadays. (The biggest sector was triple-A game companies with their own engines, but the game industry is imploding right now...)
- anaisbetts 3mo agoI'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
- godwinson__4-8 3mo agoIndeed, 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.
- fsloth 3mo ago"The "universal" nature of WebGPU with the "web" focus feels a lot like the graphics API equivalent of WASM" Having shipped non-trivial WASM code in two projects That's not a positive thing. WASM is stuck in zone between living and the dead - just good enough (barely) to merit creating production code when you need the perf in browser but not good enough to register as industrial quality tool as it's not possible really to debug a WASM application. If you really, really need the perf in your browser app, WASM may be the only option, but it's not really a good one.
- coffeeaddict1 3mo agoHonestly, in 2026 I would not really bother with OpenGL. Just start with WebGPU, it's much nicer. You can use it easily on most modern browsers or better can even use native libraries like Dawn or WGPU.
- torlok 3mo agoOpenGL is still the simplest way to start learning hardware accelerated rendering, and it runs on all modern platforms.
- rezmason 3mo agoIn light of WebGPU, I respectfully disagree. Because it has us building shader modules, buffers, and pipelines up-front with descriptors, the task of figuring out why something isn't working is often front-loaded. Pair that with its eloquent warnings (in comparison to, like, gl.getProgramParameter(shader, gl. COMPILE_STATUS) ) and the ability to label all your stuff to see it referred to by name in aforementioned warnings text... I'm rambling, but, there's just a lot of helpful stuff in WebGPU that I don't think OpenGL has, that stands to really help newcomers along
- pjmlp 3mo agoGame consoles aren't modern platforms?
- leecommamichael 3mo agoAt this point GL is an interface, implementations will come and go, but the interface refuses to die. It's still the simplest way to get started, and the browser (WebGL) demands portability for code written against the API.
- BraveOPotato 3mo agoShaders 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
- zokier 3mo ago> executes on all pixels sequentially or in parallel?
- BraveOPotato 3mo agoNow that I think about it, parallel makes more sense since it's GPU accelerated, but now I'm back to being confused lol
- chainingsolid 3mo agoWell depending on transparency and depth buffer it either doesn't matter or really really does.... Also for your confusion it truely is parallel, the best kind in fact. The trivial kind, each pixel's color is independent of every other pixel so you can and thus want too do them ALL at the same time!
- Bad_CRC 3mo agoI remember learning OpenGL back in the day with the NeHe tutorials, coding for the Dreamcast :)
- aweiland 3mo agoThat's a name I haven't heard in a long time. It was NeHe and the red book for me.
- brasswood 3mo agoCem Yuksel's lecture videos for Interactive Computer Graphics at the University of Utah are another free and fantastic resource. https://www.youtube.com/playlist?list=PLplnkTzzqsZS3R5DjmCQsqupu43oS9CFN https://www.youtube.com/playlist?list=PLplnkTzzqsZS3R5DjmCQs...
- mawadev 3mo agoI cannot imagine a field more rewarding than programming with opengl when you grew up playing games. I'm talking about hobbyist engine type of development. It is almost like therapy for any dev that does web/cloud stuff during a day job.
- nickmonad 3mo agoI'm not as interested in game development but I'm one of these web/cloud people who finds graphics work extremely therapeutic. I made a box move around on the screen with various easing animations and it was some of the most fun I've ever had programming.
- dilawar 3mo agoLol.. I am the same. My day job is Rust + car headunit development. My drugs of choice are tikz and openscad..
- mlvljr 3mo ago[dead]
- QGQBGdeZREunxLe 3mo agoIs it possible to complete this course on an M1 Mac?
- bschwindHN 3mo agoShould be, OpenGL still runs on MacOS.
- torlok 3mo agoYes, OpenGL 4.1 is available, just deprecated. It's emulated through Metal, and so will work on M chips.
- oumua_don17 3mo agoIf you really want to learn from first principles, I'd recommend writing a software renderer without any graphics API. If you're looking for a course, see [1]. Next up, extend the software renderer to render a 3D character model (an obj file will suffice) which [1] covers and animate that 3D model with skeletal animation all the while on the CPU. Use quake's md5mesh and md5anim files to render the skeletal animation from [2]. This just lays down a clear foundation of what a rendering pipeline looks like. Then pick up something like Modern OpenGL and you'll easily intuit if you've put in the hard yards above, which parts of this pipeline are fixed and which are programmable on a hardware designed specifically to do 3D. It just so happens that the same is reusable for compute and there you go with all the D/ML jazz. After this, read up on the HW architecture of GPU's (the literature is sparse as these are vendor locked) but realtimhrendering books has chapters on it and you can find out why Vulkan, DX12, Metal are in vogue now and OpenGL has been deprecated. [1] https://pikuma.com/courses/learn-3d-computer-graphics-programming https://pikuma.com/courses/learn-3d-computer-graphics-progra... [2] http://tfc.duke.free.fr/coding/md5-specs-en.html http://tfc.duke.free.fr/coding/md5-specs-en.html
- metroholografix 3mo agoThere's no need to pay for questionable courses. Here's an excellent free alternative that covers all the basics: https://haqr.eu/tinyrenderer/ https://haqr.eu/tinyrenderer/
- lesquivemeau 3mo agoThe author of this course is among the best professors I’ve had back in university, I’m happily surprised to see his work shared here
- dbdr 3mo agoThat course was posted just yesterday, in case you are interested in the discussion about it: https://news.ycombinator.com/item?id=49022038 https://news.ycombinator.com/item?id=49022038
- 3mo ago
- richard_chase 3mo agoHow does this compare to The OpenGL Programming Guide?
- evolighting 3mo agoCould you please give some advice on whether there are options as good as Metal for targeting Windows and Linux platforms separately?
- Zenul_Abidin 3mo agoMany years ago, I used Learn OpenGL to learn about graphics. It's good to see that it's getting some love now.
- jokoon 3mo agoI fear that in the future, opengl will be made obsolete and GPU vendors will stop supplying drivers for it, because it won't be worth it for them. Of course there are layers to be put on top of vulkan, but I don't know if they're reliable enough and can support 100% of opengl. I would say that's one thing that the "stop killing games" movement would not see coming. I am not expert enough in graphics programming. I am wary because lately, I realized I could not run blender 4.5 on a thinkpad from 2014, on windows, I had to use a 3.x version because that thinkpad has a chipset. Generally in software, making things work for a long time doesn't generate profits, and it feels like opengl is getting a bit old already. I hope it won't happen and people can contradict me here.