Changelog

All notable changes to meta-gl are documented here. Format follows Keep a Changelog.

Unreleased

Added

  • Initial extraction from easy-gl as a standalone low-level GL layer.
  • metagl::Initialize(GlGetProcAddressFn) / metagl::IsInitialized() loader API.
  • metagl::LoadCurrentContext() alias for Initialize().
  • metagl::IsFunctionAvailable(std::string_view) per-function availability check.
  • Type-safe enum class wrappers covering all ES 2.0–3.2 parameter domains:
    • BufferTarget, BufferUsage, BufferParameter, MapBufferAccessMask
    • ShaderType, ShaderStageMask, ShaderParameter, ShaderBinaryFormat
    • ProgramParameter, ProgramInterface, ProgramInterfaceParameter, ProgramResourceProperty
    • TextureTarget, TextureParameter, TextureMinFilter, TextureMagFilter, TextureFilter
    • TextureWrapMode, TextureWrap, TextureCompareMode, TextureSwizzle
    • TextureLevelParameter, TextureUnit
    • InternalFormat, CompressedInternalFormat
    • PixelFormat, PixelType, PixelStoreParam
    • BlendFactor, BlendEquation, BlendMode
    • Capability, ClearBufferBit, ClearBuffer
    • CompareFunc, StencilOp, CullFace, FrontFace
    • PrimitiveType, DataType
    • FramebufferTarget, FramebufferAttachment, FramebufferStatus
    • FramebufferAttachmentParameter, FramebufferDefaultParameter
    • RenderbufferTarget, RenderbufferParameter
    • VertexAttribParameter
    • QueryTarget, QueryParameter, QueryObjectParameter
    • SyncCondition, SyncParameter, SyncWaitResult, SyncFlushMask
    • ImageAccess, MemoryBarrierMask
    • TransformFeedbackTarget, TransformFeedbackBufferMode
    • UniformType, UniformBlockParameter, UniformParameter
    • StringName, IntegerName, GetParameter, GetPointerParameter
    • ErrorCode, HintTarget, HintMode, PrecisionType
    • DebugSource, DebugType, DebugSeverity, DebugObjectLabel
    • ContextFlagMask, GraphicsResetStatus, ResetNotificationStrategy
    • ProvokingVertex, DrawBuffer, ReadBuffer
    • ProgramBinaryFormat, ShaderBinaryFormat
    • TessGenMode, TessGenSpacing
    • … and more (89 enum classes total)
  • Bitwise operator| for all bitfield enum classes: ClearBufferBit, MapBufferAccessMask, ShaderStageMask, MemoryBarrierMask, SyncFlushMask.
  • Full set of ~400 metagl::gl* wrapper functions covering: state management, buffer objects, vertex arrays, drawing, shaders, programs, uniforms, textures, framebuffers, renderbuffers, queries, sync objects, compute, transform feedback, debug output, and separable programs.
  • ContextInfo struct with API kind, ES/WebGL version flags, vendor/renderer strings, and monotonic generation counter.
  • ContextStatus lifecycle enum: NotCreated / Current / Lost / Restored.
  • metagl::GetContextInfo(), GetContextGeneration(), GetContextStatus(), IsContextLost(), MarkContextLost(), MarkContextRestored().
  • Capabilities struct with version flags, extension list, driver strings.
  • metagl::GetCapabilities(), SupportsGLES20/30/31/32(), SupportsWebGL2(), HasExtension().
  • EnumNames.hpp — generated to_string() overloads for all 89 enum classes.
  • Debug.hpp — optional per-call GL logging system (METAGLDEBUG): per-call function name, typed enum argument names, return values, timestamps.
  • CMake target meta-gl with alias meta-gl::meta-gl, C++20 standard, static library.
  • Emscripten.hpp — WebGL-specific helpers for Emscripten builds.

Recent Commits

HashMessage
0cda8f8 Debugging is now defaultly disabled
92dab28 Add number and timestamp to CallRecord in debug log
d566fa2 Add EnumNames.hpp with to_string() for all 89 metagl enum classes
f69198a Enable METAGLDEBUG by default in Debug.hpp
d93c624 Add optional GL call debug logging (#ifdef METAGLDEBUG)

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.