class
#include <nCine/Graphics/GL/GLShader.h>
GLShader Handles OpenGL shader objects.
Public types
- enum class Status { NotCompiled, CompilationFailed, Compiled, CompiledWithDeferredChecks }
- enum class ErrorChecking { Immediate, Deferred }
Constructors, destructors, conversion operators
- GLShader(GLenum type) explicit
- GLShader(GLenum type, StringView filename)
- ~GLShader()
Public functions
- auto glHandle() const -> GLuint
- auto status() const -> Status
- auto loadFromString(StringView string) -> bool
- Loads a shader from the given string.
- auto loadFromStringAndFile(StringView string, StringView filename) -> bool
- Loads a shader from the given string and then append the specified file.
- auto loadFromStrings(ArrayView<const StringView> strings) -> bool
- Loads a shader by concatenating the given strings in order.
- auto loadFromStringsAndFile(ArrayView<const StringView> strings, StringView filename) -> bool
- Loads a shader by concatenating the given strings in order, then appending the specified file.
- auto loadFromFile(StringView filename) -> bool
- Loads a shader from the specified file.
- auto compile(ErrorChecking errorChecking, bool logOnErrors) -> bool
- auto checkCompilation(bool logOnErrors) -> bool
- void setObjectLabel(const char* label)