[package]
name = "dear-imgui-glow"
version = "0.12.0"
edition.workspace = true
description = "Glow (OpenGL) renderer backend for dear-imgui-rs"
license.workspace = true
repository.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/dear-imgui-glow"
categories.workspace = true
keywords.workspace = true

[dependencies]
dear-imgui-rs = { path = "../../dear-imgui", version = "0.12" }
glow.workspace = true
memoffset.workspace = true
thiserror.workspace = true

[features]
# Core (default): only what's needed for robust ImGui rendering
default = [
    "bind_vertex_array_support",
    "vertex_offset_support",
]

# Extra optional GL capabilities (opt-in as a group)
extras = [
    "gl_extensions_support",
    "bind_sampler_support",
    "clip_origin_support",
    "polygon_mode_support",
    "primitive_restart_support",
]

# Individual feature switches (used by `extras` or can be enabled ad-hoc)
gl_extensions_support = []              # Optional extension queries
bind_sampler_support = []               # `glBindSampler`
clip_origin_support = []                # `GL_CLIP_ORIGIN`
polygon_mode_support = []               # `glPolygonMode`
primitive_restart_support = []          # `GL_PRIMITIVE_RESTART`
bind_vertex_array_support = []          # `glBindVertexArray` (core)
vertex_offset_support = []              # `glDrawElementsBaseVertex` (core)

# Debug-only helper (no-op if disabled)
debug_message_insert_support = []       # `gl.debug_message_insert`

# Multi-viewport (WIP: declared but off by default)
multi-viewport = ["dear-imgui-rs/multi-viewport"]

[dev-dependencies]
env_logger.workspace = true
pollster.workspace = true
winit.workspace = true
