Changelog
All notable changes to meta-gl are documented here. Format follows Keep a Changelog.
v0.2.0 — 2026-06-27
Breaking changes
ContextListener::on_context_lost()renamed toOnContextLost().ContextListener::on_context_restored()renamed toOnContextRestored().ContextInfono longer containsvendor,renderer,gles20–gles32,webgl/webgl1/webgl2fields. UseGetCapabilities()for feature detection.ContextInfonow holds onlyapi,major,minor,generation,status.
Added
- Typed handle types replacing raw
GLuint/GLintparameters:ShaderId,ProgramId,TextureId,BufferId,FramebufferId,RenderbufferId,SamplerId,VertexArrayId,QueryId,TransformFeedbackId,ProgramPipelineId,UniformLocation,AttribLocation,ImageUnit. EnumNames.hpp—to_string()overloads for all 89 enum classes and handle types.Debug.hpp/src/Debug.cpp— optional GL call logging controlled byMETAGLDEBUG.Context.hpp/Capabilities.hpp— context lifecycle state and feature-detection structs.ContextEvents.hpp—ContextListenerinterface withAddContextListener/RemoveContextListener/NotifyContextLost/NotifyContextRestored.Emscripten.hpp—InstallEmscriptenContextLossCallbacks()for WebGL context loss/restore.SamplerParameterenum forglSamplerParameter*/glGetSamplerParameter*.SampleMaskValuebitfield enum forglSampleMaski.ColorAttachmentenum (Color0–Color31) withto_framebuffer_attachment,to_draw_buffer,to_read_bufferconversion helpers.GlHandleconcept (requires.valueof typeGLuint).GlEnumconcept (enum class withGLenumunderlying type).GlBitfieldconcept with genericoperator|,operator&,operator~for all bitfield enums.SpanCompatibleconcept constrainingstd::span<const T>buffer upload templates.std::spanoverloads for allglGen*/glDelete*function families.std::span<const T>template overloads forglBufferDataandglBufferSubData.std::string_viewconvenience overload forglShaderSource(single source string).- Template dispatch helpers:
glGetUniform<T>,glGetnUniform<T>,glTexParameter<T>,glSamplerParameter<T>,glClearBuffer<T>,glGetVertexAttrib<T>. glIs*functions now returnboolinstead ofGLboolean.AllFunctionsLoaded()public API inLoader.hpp.IsFunctionAvailable(std::string_view)public API inLoader.hpp.Debug.hppandEnumNames.hppincluded by umbrellametagl.hpp(opt-out viaMETAGL_NO_DEBUG/METAGL_NO_ENUM_NAMES).Emscripten.hppincluded by umbrellametagl.hppwhen__EMSCRIPTEN__is defined.
Changed
- C++ baseline raised from C++20 to C++23.
- CMake:
target_compile_features(PUBLIC cxx_std_23)propagates standard to consumers. - CMake: added
-Wall -Wextra -Wpedantic(GCC/Clang) and/W4(MSVC) warning flags. - CMake:
find_package(meta-gl CONFIG)support viaCMakePackageConfigHelpers. - CMake:
BUILD_TESTINGoption (defaultOFF) withenable_testing()guard. - CMake:
BUILD_SHARED_LIBSoption (defaultOFF). - CMake:
SANITIZEoption enabling ASan + UBSan for GCC/Clang. g_function_availabilitymap is now cleared at the start of eachInitialize()call.BlendModeenum removed (duplicatedBlendEquation).TextureFilterrenamed toBlitFilter(used only byglBlitFramebuffer).TextureWrapremoved (duplicate ofTextureWrapMode).ContextInfogles/webgl flags and string fields moved toCapabilities.
Fixed
- README.md examples corrected from
metagl::GlClearetc. tometagl::glClear(lowercase).
v0.1.0 — initial
Added
- Initial extraction from easy-gl as a standalone low-level GL layer.
metagl::Initialize(GlGetProcAddressFn)/metagl::IsInitialized()loader API.- Type-safe
enum classwrappers:BufferTarget,BufferUsage,ShaderType,TextureTarget,TextureParameter,PixelFormat,PixelType,PrimitiveType,DataType,Capability,CompareFunc,CullFace,FrontFace,BlendFactor,StringName,ClearBufferBit. - Bitwise
operator|forClearBufferBitmask composition. - Full set of
metagl::gl*wrapper functions covering buffers, shaders, programs, textures, vertex arrays, draw calls, and render state. - CMake target
meta-glwith aliasmeta-gl::meta-gl, C++20 standard, static library.
Design Decisions Log
This section documents key architectural decisions made during the project.
2026-06 — METAGLDEBUG disabled by default
The debug logging macro is off by default (#define METAGLDEBUG is
commented out in Debug.hpp). It must be explicitly enabled by the user or via a compiler flag.
This ensures that debug builds without intentional logging are not penalized in performance.
2026-06 — EnumNames.hpp generated separately
EnumNames.hpp is a generated file containing to_string() overloads
for all 89 enum classes. It is included only from Debug.hpp (when METAGLDEBUG
is active), not from the main headers. This keeps compile times low for non-debug builds.
2026-06 — No C++ modules
The project deliberately avoids C++ modules to maintain compatibility with a wider range of compilers and build systems, including older GCC and Clang versions commonly found on embedded Linux and Android NDK toolchains.
2026-06 — No RAII in meta-gl
meta-gl is a thin wrapper layer. RAII resource management belongs in easy-gl. Mixing RAII into meta-gl would blur the layer boundary and make it impossible for easy-gl to implement its own ownership model without conflicts.