jfcameron / gdk-graphics

3D Rendering using OpenGLES 2.0/WebGL1.0. Platforms: Linux, Windows, Mac, x86 64bit, arm64, wasm
MIT License
1 stars 1 forks source link

context: get_capabilities #44

Open jfcameron opened 3 years ago

jfcameron commented 3 years ago

return information like max texture size, max samples, etc.

jfcameron commented 3 years ago

needed for libraries that depend on implementation specific extensions (depth textures, etc) or specific limits (texture sizes, texture units)

jfcameron commented 3 years ago

bumping. important for libraries that extend the features of gdk::graphics, like gdk_text_renderer and the tilerenderer i just started.

jfcameron commented 3 years ago

capabilities struct, getter is const, is constructed at context construction time. name of capabilites shouldnt be exceedingly opengl specific. for example, to check if the depth attachment extension is available, it should be "bool depth_textures_supported" or something like that. "size_t max_texture_uniforms" instead of "max texture units" etc.