20 #ifndef ANTKEEPER_GL_SHADER_OBJECT_HPP
21 #define ANTKEEPER_GL_SHADER_OBJECT_HPP
26 #include <string_view>
63 void source(std::string_view source_code);
84 [[nodiscard]]
inline const std::string&
info() const noexcept
90 [[nodiscard]]
inline bool compiled() const noexcept
101 unsigned int gl_shader_id{0};
103 bool m_compiled{
false};
104 std::string info_log;
Shader object which can be compiled and linked to a shader program.
bool compile()
Compiles the shader object.
~shader_object()
Destroys a shader object.
void source(std::string_view source_code)
Replaces the source code of the shader object.
shader_stage stage() const noexcept
Returns the shader stage of this shader object.
shader_object & operator=(const shader_object &)=delete
const std::string & info() const noexcept
Returns the shader object info log, which is updated when the shader object is compiled.
bool compiled() const noexcept
Returns true if the shader object has been successfully compiled, false otherwise.
shader_object(shader_stage stage)
Creates an empty shader object for the specified shader stage.
shader_object(const shader_object &)=delete
Shader program which can be linked to shader objects and executed.
Graphics library interface.
shader_stage
Enumerates all supported shader stages.