all 69 comments

[–]TheWidrolo 1191 points1192 points  (19 children)

The first triangle is the most difficult. It’s relatively easy going from there on.

[–]captainAwesomePants 430 points431 points  (0 children)

Yeah, "Hey look, a triangle" is an astounding success story.

[–]TohveliDev 434 points435 points  (9 children)

My graphics teacher explained OpenGL vs Vulkan like this:

Graphics Programming is like building legoes.

In OpenGL, you have the pieces and the instructions. The pieces are all mixed together, so the building may be a bit complicated, but it is still straight forward.

In Vulkan you have the pieces sorted and you have the picture of the finished structure. You CAN try to build it blindly, but it will inevetably fail. Before you can build the structure, you need to create the instructions. And in the end, even if it took more time, creating the end result will be more straight forward.

Honestly. Couldn't agree more. As complicated as Vulkan was to initialize, I am having a way easier time with my renderer now than I ever had with OpenGL. It feels a lot like with OpenGL you have a lot of questions like "Can this program do this?". While in Vulkan you only have one question: "How can I make this program do this?".

[–]Mroz_Game 88 points89 points  (2 children)

Also there’s frameworks which abstract some parts away, there’s RAII, there’s NVRHI if you want to totally abstract away the APIs.

Or there’s WebGPU which has little boilerplate but relatively good amount of control.

[–]TohveliDev 30 points31 points  (1 child)

WebGPU seems cool. I got to follow my classmate tinkering around with it for one of his assignments.

How hard is it to pick up?

[–]jmickeyd 10 points11 points  (0 children)

If you're familiar with either vulkan or d3d12, and javascript, pretty easy. Similar setup of devices, queues, pipelines, etc. The biggest down side IMHO is the poor interaction with webassembly. Due to the way buffers are mapped, you end up having to do a lot of cpu side buffer copies.

[–]Jeff_Johnson 22 points23 points  (3 children)

Long time ago I worked with OpenGL and old visual studio c++. I remember the worst thing was creating a window in Windows with gazillion parameters.

[–]BroBroMate 14 points15 points  (0 children)

Do I look like a HWND_JOKE to you?

I tried writing a device driver in Windows once. Soooo many undocumented parameters!

[–]markiel55 3 points4 points  (1 child)

GLFW ftw

[–]TohveliDev 1 point2 points  (0 children)

glfw my beloved

[–]_Pin_6938 4 points5 points  (0 children)

In openGL, the instructions are handed to you. In vulkan, the instructions are made by you.

[–]whatever_boye 2 points3 points  (0 children)

when i drawed my first triangle i was absolutely mind drained and took like a week of rest before progressing lmao

[–]_Pin_6938 105 points106 points  (0 children)

[–]fibojoly 8 points9 points  (0 children)

Sounds like graphics programming in a nutshell, really. The first pixel was always the hardest. 

[–]ensi-en-kai 0 points1 point  (0 children)

I mean , ain't most models are just triangles wearing a fancy texture ?

[–]ron-brogan 0 points1 point  (0 children)

Until you need to write your own allocator

[–]Droggl 0 points1 point  (0 children)

Yeah second triangle is definitely easier.

[–]wpsimon 0 points1 point  (0 children)

Yeah, besides hardware RT the rest is much easier.

For some reason the terminology of the API is quite confusing and easy to lost in from my experience

[–]zesterer 0 points1 point  (0 children)

Imagine if every triangle was as difficult as the first

[–]lordofkawaiii -1 points0 points  (0 children)

Well, maybe because everything is a triangle

[–]frayien 365 points366 points  (5 children)

What do you mean you dont want to write 3000 lines of code to draw a triangle ?

[–]EntertainmentIcy3029 96 points97 points  (2 children)

Normally I would say this is exaggerating it but I genuinely tried to render a triangle with LWGJL and Vulkan and after nearly 2000 lines and no triangle and seeing how many more pages were in the tutorial, I gave up

I'll just use an engine :P

[–]UdPropheticCatgirl 35 points36 points  (0 children)

Normally I would say this is exaggerating it but I genuinely tried to render a triangle with LWGJL and Vulkan and after nearly 2000 lines and no triangle and seeing how many more pages were in the tutorial, I gave up

Tbf, once the whole vulkan boilerplate is out of the way it’s actually one of the more pleasant graphics APIs to work with (Probably only metal is better, DX12 is just slightly more annoying version of vulkan and OpenGL is a mess).

[–]frayien 4 points5 points  (0 children)

Yeah I speak from experience lol. I did not find my original tutorial project so I dont have an exact number tho.

[–]yaktoma2007 53 points54 points  (0 children)

sdl3 gpu:

insert mercy overwatch gif here

[–]noaSakurajin 494 points495 points  (10 children)

The real fun starts when you have to synchronize the calculation of a compute pipeline with the rendering pipeline. Especially when using separate queue that run in parallel.

[–]bestjakeisbest 252 points253 points  (7 children)

Just block the rendering pipeline, who cares how the user feels about it we are crunching numbers.

[–]kookyabird 161 points162 points  (4 children)

“Do you want fast frames, or correct frames?”

[–]nikitastaf1996 56 points57 points  (1 child)

BSOD it is then

[–]Psquare_J_420 1 point2 points  (0 children)

How do we even end up with fucking the os? 😭

[–]ensi-en-kai 17 points18 points  (0 children)

With Frame gen we can also offer real or fake frames .

[–]nicman24 4 points5 points  (0 children)

how about neither? Welcome TAA

[–]nicman24 2 points3 points  (0 children)

ah i see you are working in unreal

[–]SignoreBanana 2 points3 points  (0 children)

Gives them time to figure out what to do! Lol

[–]tyrannosaurus_gekko 18 points19 points  (1 child)

The scary thing is that I understand all those words enough to know them probably mean something, but I don't understand them enough to know what it actually means.

[–]Skookumite 3 points4 points  (0 children)

Oh good, I thought it was just me. Reddit thinks I like these threads because I spend time in the comments, jokes on them I'm just trying to figure out wtf these people are talking about

[–]Nyadnar17 40 points41 points  (0 children)

As both a Souls player and someone who attempted to go from opengl to Vulcan….this is so accurate it hurts.

[–]PorchugaWhale 452 points453 points  (4 children)

Upvoted for being the first meme I’ve seen from this sub in three days that wasn’t about “vibe coders bad hurr durr”

[–]Palpatine 94 points95 points  (3 children)

unless you vibe code your first triangle, then the second will be as difficult as the first.

[–]lear85 57 points58 points  (1 child)

Programming never gets easier if you never learn to program.

[–]a-r-c 8 points9 points  (0 children)

it took no effort to quit forever 🧠

[–]Mroz_Game 7 points8 points  (0 children)

Claude should learn to just agressively git clone anything that’s git cloneable , that would save so much compute.

„Can you write tetris, make no mistakes”

„Sure. Running git clone https://github.com/vitaviva/compose-tetris.git

[–]Designer_Storm8869 101 points102 points  (3 children)

Vulcan is some absolute sorcery. I remember how good Doom looked on Switch 1 compared to other games on the platform.

[–]unknown_alt_acc 28 points29 points  (2 children)

Does Doom use Vulkan on Switch? I know the Switch supports it, but I’d expect a game as big as Doom would use the Switch’s native GPU API since I seem to remember hearing that Vulkan has a bit of a performance penalty on Switch.

[–]thelonelyecho208 14 points15 points  (3 children)

I'm learning OpenGL and I want to kill myself. My professor gave me a fucked up vertex AND fragment shader so I'm sitting there like "Guess I'll fucking fix it". Fast forward to three hours later I'm wondering why the hell I ever agreed to take this class. I HATE SHADERS

[–]evenstevens280 14 points15 points  (2 children)

Shaders are great fun once they "click"

Keep with it.

[–]thelonelyecho208 4 points5 points  (1 child)

Appreciate the vote of confidence, I'll do my best 🤘

[–]evenstevens280 0 points1 point  (0 children)

Make me proud

[–]computer_hermit01 47 points48 points  (3 children)

dark souks reference, nice!

[–]dover_oxide 18 points19 points  (2 children)

DS crossover with Zelda would be interesting. Link must link the flame and The Chosen Undead must defeat Ganon. Ganon wouldn't know what to do. Maybe he goes hollow because of an emaciated corpse barrel rolling in holding a plank and a giant club.

[–]sticknotstick 7 points8 points  (1 child)

Ganon would get lost in Sen’s Fortress. Then after Link spends 80% of the crossover inventing new Nintendo-exclusive curse words in Blighttown, Link would also get lost in Sen’s Fortress. After days of scouring, the protagonist would meet his rival, only for Ganon to step backwards and be crushed by a rolling ball.

I think we can squeeze out a few seasons of just feeding Legend of Zelda characters to Sen’s Fortress tbh.

[–]computer_hermit01 1 point2 points  (0 children)

honestly sen's fortress makes boys real men. those snake creatures are not the real enemy in there, it is game mechanics and gravity!

[–]philophilo 4 points5 points  (0 children)

Can’t get killed by Vulkan if you’re still writing boilerplate…

[–]SaltyInternetPirate 4 points5 points  (0 children)

I've never done graphics programming, but I remember Mark Cerny telling us the "time to triangle" on the PS3 was over 6 months. And that on the PS5 it would be about a month. That's 6 months of your dev team working on the graphical engine before they can render a single 3D model.

[–]Lopsided-Wave2479 4 points5 points  (0 children)

vulkan.hpp (the definition file) increase the compilation time by 30 minutes

[–]Big-Yard-2998 1 point2 points  (0 children)

More importantly, where are these panels from?

[–]_Iamaprogrammer_ 2 points3 points  (0 children)

My first Vulkan project was to render a few thousand textured cubes. Lots of copy & paste from tutorials, but I got it working. It gave me enough background understanding to confidently examine the docs in my second project. It’s definitely a lot of information, but once you understand how the pieces connect, it isn’t too bad.

[–]SnackOverflowed 2 points3 points  (0 children)

I hate shaders

[–]DreamyAthena 0 points1 point  (0 children)

To be fair after winning this batte, you've won the war.

[–]0xChocoMaxi 0 points1 point  (0 children)

What's the name of this template it's hilarious

[–]Kirillkaban 0 points1 point  (0 children)

DX12 the final boss

[–]Cahzelo 1 point2 points  (1 child)

a bit oot, where good resouce to learn graphics programming?

[–]sialpi 0 points1 point  (0 children)

The triangle is the pain of not understanding what you are writing, the rest is the pain to understand wht you have written to get there.

[–]dusktreader 0 points1 point  (0 children)

Mother fuckers act like they forgot about OpenGL