Files
cuber/cbt/opengl/shader.hpp
T
portersky b6adb7c23a style: move public members first in class declarations
- Reorder all class headers to put public interface before private members
- Document convention in AGENTS.md
2026-05-05 22:30:56 +02:00

33 lines
600 B
C++

#pragma once
#include <string>
#include "glad/glad.h"
namespace cbt::opengl {
class shader {
public:
shader();
~shader();
shader(shader const&) = delete;
shader& operator=(shader const&) = delete;
shader(shader&& other) noexcept;
shader& operator=(shader&& other) noexcept;
auto compile_vertex(char const* source) -> bool;
auto compile_fragment(char const* source) -> bool;
auto link() -> bool;
auto use() const -> void;
auto unuse() const -> void;
auto id() const -> GLuint;
auto valid() const -> bool;
private:
GLuint m_id = 0;
};
}