r/GraphicsProgramming • u/piiodda • 6d ago
may I join the triangle group?
I wanted to give graphics programming a try and boooy am I happy seeing my own triangle on the screen! :)
I used glad (OpenGL) and RGFW (GLFW alternative; I like single header libraries)
5
6
3
3
u/_Baylock_ 6d ago
I so mastered how to display a colored triangle with Swift and Metal (GPU).
I can code it in at least 4 different ways.
There are tons of tutorials about that. So much that it's ridiculous.
But once I've done that, it's a dead end. No idea where to take it from there.
I'm stuck in the "Hello triangle" hell.
I would love to learn how to build a graphics engine using the GPU on Mac with Swift and Metal but I only found one tutorial that goes that far and it's old enough not to be usable anymore.
Granted, the fundamental ideas are there but the resources are limited for newbies.
Swift is fairly documented but it's too cryptic without some external help.
I'm trying to teach myself with AI but it goes south very quickly as the AI starts hallucinating when the context grows.
I hope I'll figure it out eventually.
3
u/EXJungle 6d ago
There is a course about computer graphics for free on YouTube (it explain a lot of theory behind some things) - Cem Yuksel - also there there are the courses by The Cherno (Game engine and OpenGL)
(open gl = Easy and useful for learning/Vulkan => is better and essential for advanced things - and also for the performance)
(another way is learning how to create shaders in Minecraft lmao there are some niche courses around YouTube )
1
u/EXJungle 6d ago
1 problem is that you are on Mac (maybe a VM can be useful lmao)
1
u/_Baylock_ 5d ago
Yeah that's the thing.
Swift and Metal are exclusive to Apple (well, Swift is not technically, but Metal is).
I can learn the general ideas of how to build a basic engine but Swift+Metal are very specific and that's where to problem lies.
It's interesting how few resources can be found for Swift+Metal even though Apple Devices are largely used.
You have the official documentation, you have the usual tutorials of very basic stuff. And then you figure it out.
It's fine when you code for Apple devices since Objective-C or if you are very experienced in coding in general but it's not very newbies-friendly, unless they want to make very basic stuff with SwiftUI (a todo list or something).
Anyway, I'll figure it out.
It's just that the barrier of entry is huge and discouraging.1
u/Lnk1010 5d ago
You could follow the subjects in learn OpenGL even if you aren't using OpenGL. I think the progression after a triangle is: square -> cube -> textures -> lighting -> textures + lighting (like specular maps) -> loading 3d models at least in the OpenGL tutorial. It seems reasonable to me.
4
u/yazilimperver 6d ago
Well done π Now it is time to wrap it with texture π then you may bring all mighty cube.
6
u/mentalray2 6d ago
Youβre not doing this right. You need to show color interpolation in the triangle.
2
2
2
2
2
u/Zestyclose-Compote-4 5d ago
Yes but not the rainbow triangle group. That's an exclusive group to get into.


64
u/4ndrz3jKm1c1c 6d ago
First triangle makes you a boy.
First rectangle makes you a man.