According to fact that base functionality for Sokol is WebGL I found out some missing features that presented in WebGL2.
Hi, one of the reasons is that the "base API" for sokol-gfx is "WebGL/GLES2 with common extensions", and it doesn't make much sense to require WebGL2 for the base functionality until Safari supports it IMHO.
But each of the points has different reasons (I also need to do some more research on some of the points):
@floooh any plans to add more pixel formats? maybe would be cool to have kind of feature check for formats?
@amerkoleci yes, we can add more pixel formats, the current list is very conservative. Do you have a wishlist? Putting optional formats behind sg_query_feature() is also ok.
I think all pixel formats, we can take look at metal pixel formats or vulkan and just check in backend if supported, for example I would remove rgb pixel format as only supported on opengl, I can submit some PR
Or maybe bgfx pixel formats for example
I think sokol can gain compute shader support as there are WebGL 2.0 compute specs (https://www.khronos.org/registry/webgl/specs/latest/2.0-compute/), I will work for D3D11 on my game framework if you want.
We should investigate whether it makes sense to add things like compute as an optional sokol-gfx extension header (e.g. sokol_gfx_compute.h) which could be optionally included after the sokol_gfx.h implementation, such an extension header would have access to the private data structs and functions of the sokol_gfx.h implementation and could add new public API functions.
The internal shader creation functions in the 3D API backends probably need to be made a bit more flexible, but that sounds doable.
Most helpful comment
We should investigate whether it makes sense to add things like compute as an optional sokol-gfx extension header (e.g. sokol_gfx_compute.h) which could be optionally included after the sokol_gfx.h implementation, such an extension header would have access to the private data structs and functions of the sokol_gfx.h implementation and could add new public API functions.
The internal shader creation functions in the 3D API backends probably need to be made a bit more flexible, but that sounds doable.