9114eaabc6
- const T* -> T const* in all headers and implementations - const T& -> T const& for copy constructor/operator= deletes - update AGENTS.md to document east const convention
32 lines
591 B
C++
32 lines
591 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include "glad/glad.h"
|
|
|
|
namespace cbt::opengl {
|
|
|
|
class shader {
|
|
GLuint m_id = 0;
|
|
|
|
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;
|
|
};
|
|
|
|
}
|