Closed jdah closed 1 year ago
Yep, good catch, there's basically a validation layer check missing.
But please don't bother with a PR because there's a better solution on the way with the next "big" update which I'm currently working on, this will split off samplers as their own objects, and while at it, I'll do some more 'harmonization' with WebGPU (basically, the sg_filter
enum will only have two options 'nearest' and 'linear', and there will be a separate .mipmap_filter
in the new sg_sampler_desc
struct.
(PS: I'll keep this ticket open until the 'separate sampler objects' update goes live. It will be a little while though, because I'm currently not sure if this will be a separate update before WebGPU support, or if WebGPU support will be part of the update.
Linking the associated PR: https://github.com/floooh/sokol/pull/842
(not ready yet though)
Ok, closing this ticket because that PR is now merged.
tiny bug: in
_sg_gl_create_image
uses_sg_gl_filter
to convert sokol filter enums -> GL enums, butglTexParameteri(GL_TEXTURE_MAG_FILTER, ...)
only acceptsGL_NEAREST
andGL_LINEAR
as parameters, so_sg_gl_filter
returns invalid enums for mipmap-ing filters (see https://registry.khronos.org/OpenGL-Refpages/gl4/html/glTexParameter.xhtml)produces
GL_INVALID_ENUM
for me.I'll get a PR up when I verify a fix, should I just split
_sg_gl_filter
into_sg_gl_min_filter
and_sg_gl_mag_filter
?