#pragma once

#include "foundation/result.h"

#include <cstdint>
#include <span>
#include <string_view>

namespace pp::renderer::gl {

struct OpenGlAttributeBinding {
    const char* name = "";
    std::uint32_t location = 0;
};

struct OpenGlUniformName {
    const char* name = "";
    std::uint16_t id = 0;
};

[[nodiscard]] std::span<const OpenGlAttributeBinding> panopainter_shader_attribute_bindings() noexcept;
[[nodiscard]] pp::foundation::Status validate_shader_attribute_bindings(
    std::span<const OpenGlAttributeBinding> bindings) noexcept;
[[nodiscard]] std::span<const OpenGlUniformName> panopainter_shader_uniform_names() noexcept;
[[nodiscard]] std::uint16_t shader_uniform_id(std::string_view name) noexcept;
[[nodiscard]] pp::foundation::Status validate_shader_uniform_names(
    std::span<const OpenGlUniformName> uniforms) noexcept;

}
