diff options
| author | Andre Weissflog <floooh@gmail.com> | 2021-05-11 20:14:14 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2021-05-11 20:14:14 +0200 |
| commit | 63f14c4752d7b898f0802b9288cebf18921ab36d (patch) | |
| tree | f581bcbcc951ccc491a967cb80cd40261d61c15d | |
| parent | 76eff5fd6665087f09222a2c3506fb198f194d3a (diff) | |
sokol_gfx.h: add a gl_max_vertex_uniform_vectors item to sg_limits
| -rw-r--r-- | sokol_gfx.h | 6 | ||||
| -rw-r--r-- | util/sokol_gfx_imgui.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h index 31684b8d..80a7b537 100644 --- a/sokol_gfx.h +++ b/sokol_gfx.h @@ -871,7 +871,8 @@ typedef struct sg_limits { int max_image_size_3d; // max width/height/depth of SG_IMAGETYPE_3D images int max_image_size_array; // max width/height of SG_IMAGETYPE_ARRAY images int max_image_array_layers; // max number of layers in SG_IMAGETYPE_ARRAY images - int max_vertex_attrs; // <= SG_MAX_VERTEX_ATTRIBUTES (only on some GLES2 impls) + int max_vertex_attrs; // <= SG_MAX_VERTEX_ATTRIBUTES or less (on some GLES2 impls) + int gl_max_vertex_uniform_vectors; // <= GL_MAX_VERTEX_UNIFORM_VECTORS (only on GL backends) } sg_limits; /* @@ -5517,6 +5518,9 @@ _SOKOL_PRIVATE void _sg_gl_init_limits(void) { gl_int = SG_MAX_VERTEX_ATTRIBUTES; } _sg.limits.max_vertex_attrs = gl_int; + glGetIntegerv(GL_MAX_VERTEX_UNIFORM_VECTORS, &gl_int); + _SG_GL_CHECK_ERROR(); + _sg.limits.gl_max_vertex_uniform_vectors = gl_int; #if !defined(SOKOL_GLES2) if (!_sg.gl.gles2) { glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, &gl_int); diff --git a/util/sokol_gfx_imgui.h b/util/sokol_gfx_imgui.h index 861625d3..f0c9fba0 100644 --- a/util/sokol_gfx_imgui.h +++ b/util/sokol_gfx_imgui.h @@ -3732,6 +3732,7 @@ _SOKOL_PRIVATE void _sg_imgui_draw_caps_panel(void) { igText(" max_image_size_array: %d", l.max_image_size_array); igText(" max_image_array_layers: %d", l.max_image_array_layers); igText(" max_vertex_attrs: %d", l.max_vertex_attrs); + igText(" gl_max_vertex_uniform_vectors: %d", l.gl_max_vertex_uniform_vectors); igText("\nUsable Pixelformats:"); for (int i = (int)(SG_PIXELFORMAT_NONE+1); i < (int)_SG_PIXELFORMAT_NUM; i++) { sg_pixel_format fmt = (sg_pixel_format)i; |