Closed morganholly closed 1 month ago
For D3D11/DXGI you can look at this minimal window system glue setup:
https://github.com/floooh/sokol-samples/blob/master/d3d11/d3d11entry.c
Basically start after the CreateWindowExW() call.
Here's the similar code for Metal+MTKView:
https://github.com/floooh/sokol-samples/blob/master/metal/osxentry.m
I don't have a similar simple example for GL, since those use GLFW:
https://github.com/floooh/sokol-samples/blob/master/glfw/glfw_glue.c
That part is otherwise taken care of by the the sokol_app.h header, and may be a bit more robust:
mac and windows is higher priority than linux so if i can't get linux support soon that wouldn't be the worst thing. thank you very much for this
is there any way to render to an existing window handle? i would like to use sokol in an audio plugin library (and i know of another considering the same), and the normal way to do things is rendering to a window created by the software hosting the plugin. it would be very nice to have an easy way to get sokol going on an existing window handle. if there isn't a nice abstracted way to do this, do you have any suggestions on where in the (i presume sokol-gfx) code to look for each platform so i can set it up myself?