ADVANCED TOPIC: Injecting native 3D-API textures
Oldes opened this issue · 3 comments
Oldes commented
floooh commented
The backend-specific sokol-samples each have one example for injecting buffers and textures:
- GL: https://github.com/floooh/sokol-samples/blob/master/glfw/inject-glfw.c
- Metal: https://github.com/floooh/sokol-samples/blob/master/metal/inject-metal.mm
- D3D11: https://github.com/floooh/sokol-samples/blob/master/d3d11/inject-d3d11.c
There isn't a similar sample under the sapp-directory because it would be quite the #ifdef/#endif mess :)
Oldes commented
Thanks, I will check it. For sapp, do you plan to use Basis for native textures?
floooh commented
I will probably create a utility header which would provide some glue code between Basis Universal and sokol_gfx.h, similar to this adhoc helper code:
https://github.com/floooh/sokol-samples/blob/master/libs/basisu/basisu_sokol.cpp