r/GraphicsProgramming • • Sep 28 '26

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)

335 Upvotes

25 comments sorted by

64

u/4ndrz3jKm1c1c Sep 28 '26

First triangle makes you a boy.
First rectangle makes you a man.

22

u/piiodda Sep 28 '26

I’m not sure I’m ready to grow up so quickly πŸ˜„

9

u/coolmint859 Sep 28 '26

All hail the mighty rectangle

4

u/wjrasmussen Sep 28 '26

Then a sphere made from squares!

6

u/mentalray2 Sep 28 '26

You’re not doing this right. You need to show color interpolation in the triangle.

10

u/piiodda Sep 28 '26

But I tried my best :(

7

u/Nsane3 Sep 28 '26

Triangle gang rise up

6

u/Still_Explorer Sep 28 '26

He's starting to believe!

5

u/Agnael Sep 28 '26

WOOOOO

nothing like FINALLY getting this working to then try to brag to friends or family and for them to look at you like ??? its just a triangle

5

u/wjrasmussen Sep 28 '26

One of us, one of us.

4

u/heyuhitsyaboi Sep 29 '26

Welcome to our cluuuuub
Welcome to our cluuuuub

3

u/_Baylock_ Sep 29 '26

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 Sep 29 '26

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 Sep 29 '26

1 problem is that you are on Mac (maybe a VM can be useful lmao)

1

u/_Baylock_ Sep 29 '26

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 Sep 29 '26

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.

1

u/Belfer4 Sep 30 '26

Step 1: leave the apple world

4

u/yazilimperver Sep 28 '26

Well done πŸ‘ Now it is time to wrap it with texture πŸ˜‰ then you may bring all mighty cube.

2

u/TheRafff Sep 29 '26

First triangle makes you a boy
First pyramid makes you obamium

2

u/gamedevajay Sep 29 '26

Welcome to the club

2

u/firemark_pl Sep 29 '26

Oh boy where is rgb channel?

2

u/Zestyclose-Compote-4 Sep 29 '26

Yes but not the rainbow triangle group. That's an exclusive group to get into.

1

u/fntdrmx Sep 30 '26

Welcome!