Odin » Forums » Is anybody tackeling a vulkan loader?
ParticlePeter
Peter Particle
2 posts
#14411 Is anybody tackeling a vulkan loader?
8 months, 2 weeks ago Edited by Peter Particle on March 4, 2018, 7:30 p.m. Reason: Initial post

Would like to give it a try, without reinventing the wheel, hence the question.
mmozeiko
Mārtiņš Možeiko
1826 posts / 1 project
#14415 Is anybody tackeling a vulkan loader?
8 months, 2 weeks ago Edited by Mārtiņš Možeiko on March 5, 2018, 1:17 a.m.

Is there something wrong with official ext_loader.c which is autogenerated from spec?

And isn't it as simple as Type* proc = vkGetInstanceProcAddr(instance, "proc") ? There are no differences like in OpenGL - contexts, and GetProcAddress vs wgl/glx/egl...

ParticlePeter
Peter Particle
2 posts
#14417 Is anybody tackeling a vulkan loader?
8 months, 2 weeks ago

Is there something wrong with official ext_loader.c which is autogenerated from spec?

Neither me nor google know anything about an 'official' ext_loader.c, any link?


And isn't it as simple as Type* proc = vkGetInstanceProcAddr(instance, "proc") ?

No, then you just would have the entry point to vulkan magic, but you still need to load all the other function pointer. Besides matching their signature in odin lang you also need to translate all structs/unions, among other tasks.

mmozeiko
Mārtiņš Možeiko
1826 posts / 1 project
#14419 Is anybody tackeling a vulkan loader?
8 months, 2 weeks ago

Oh, sorry this is in Odin forum. I missed this part, I though we are talking about C :)

ext_loader is here: https://github.com/KhronosGroup/Vulkan-Docs/tree/1.0/src/ext_loader