r/GraphicsProgramming • • Dec 23 '25 • Bravo 1

"No Graphics API" Vulkan Implementation

I was feeling very inspired by Sebastian Aaltonen's "No Graphics API" blog post, so this is my attempt at implementing the proposed API on top of Vulkan. I even whipped up a prototype shading language for better pointer syntax. Here's the source code for those curious:

https://github.com/LeonardoTemperanza/no_gfx_api

242 Upvotes

40 comments sorted by

View all comments

5

u/[deleted] Dec 25 '25

[removed] — view removed comment

1

u/No_Grapefruit1933 Dec 25 '25

Oh, nice! Looks very similar to mine. Looks like you also have an expensive lookup to convert from pointers to handles

2

u/[deleted] Dec 25 '25 edited Dec 25 '25

[removed] — view removed comment

1

u/No_Grapefruit1933 Dec 25 '25

I'm actually using a red black tree (odin has one in its stdlib so it was quick for me). I was mainly concerned about this lookup being in draw_indexed_instanced since that could be called thousands of times per frame, though with an API this flexible it's probably very easy to batch draw calls together or even have a single draw call for everything, now that i think about it.

1

u/[deleted] Dec 25 '25

[removed] — view removed comment

1

u/No_Grapefruit1933 Dec 25 '25

Odin does not support operator overloading, but yeah I suppose you could in general make the API slightly more complicated so that this doesn't happen