![]() |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
#include <Shader.hpp>
Public Member Functions | |
Shader (const ::Shader &shader) | |
Shader (const char *vsFileName, const char *fsFileName) | |
Shader (const Shader &)=delete | |
Shader (const std::string_view vsFileName, const std::string_view fsFileName) | |
Shader (Shader &&other) | |
Shader (unsigned int id, int *locs=nullptr) | |
Shader (unsigned int id, std::span< int > locs) | |
~Shader () | |
Unload shader from GPU memory (VRAM) More... | |
Shader & | BeginMode () |
Begin custom shader drawing. More... | |
Shader & | EndMode () |
End custom shader drawing (use default shader). More... | |
unsigned int | GetId () const |
Retrieves the id value for the object. More... | |
int | GetLocation (const std::string_view uniformName) const |
Get shader uniform location. More... | |
int | GetLocationAttrib (const std::string_view attribName) const |
Get shader attribute location. More... | |
int * | GetLocs () const |
Retrieves the locs value for the object. More... | |
bool | IsReady () const |
Retrieves whether or not the shader is ready. More... | |
Shader & | operator= (const ::Shader &shader) |
Shader & | operator= (const Shader &)=delete |
Shader & | operator= (Shader &&other) noexcept |
Shader & | SetValue (int uniformLoc, const ::Matrix &mat) |
Set shader uniform value (matrix 4x4) More... | |
Shader & | SetValue (int uniformLoc, const ::Texture2D &texture) |
Set shader uniform value for texture. More... | |
template<typename T > | |
Shader & | SetValue (int uniformLoc, const T &value, int uniformType) |
Set shader uniform value. More... | |
Shader & | SetValue (int uniformLoc, const void *value, int uniformType) |
Set shader uniform value. More... | |
Shader & | SetValue (int uniformLoc, const void *value, int uniformType, int count) |
Set shader uniform value vector. More... | |
template<typename T > | |
Shader & | SetValue (int uniformLoc, std::span< T > data, int uniformType) |
Set shader uniform value vector (represented as a std::span) More... | |
Shader & | SetValue (std::string_view uniformName, const ::Matrix &mat) |
Set shader uniform value (matrix 4x4) Automatically finds the location of the uniform given its name. More... | |
Shader & | SetValue (std::string_view uniformName, const ::Texture2D &texture) |
Set shader uniform value for texture Automatically finds the location of the uniform given its name. More... | |
template<typename T > | |
Shader & | SetValue (std::string_view uniformName, const T &value, int uniformType) |
Set shader uniform value Automatically finds the location of the uniform given its name. More... | |
Shader & | SetValue (std::string_view uniformName, const void *value, int uniformType) |
Set shader uniform value Automatically finds the location of the uniform given its name. More... | |
Shader & | SetValue (std::string_view uniformName, const void *value, int uniformType, int count) |
Set shader uniform value vector Automatically finds the location of the uniform given its name. More... | |
template<typename T > | |
Shader & | SetValue (std::string_view uniformName, std::span< T > data, int uniformType) |
Set shader uniform value vector (represented as a std::span) Automatically finds the location of the uniform given its name. More... | |
void | Unload () |
Unload shader from GPU memory (VRAM) More... | |
Static Public Member Functions | |
::Shader | Load (const char *vsFileName, const char *fsFileName) |
::Shader | Load (const std::string_view vsFileName, const std::string_view fsFileName) |
Load shader from files and bind default locations. More... | |
::Shader | LoadFromMemory (const char *vsCode, const char *fsCode) |
::Shader | LoadFromMemory (const std::string_view vsCode, const std::string_view fsCode) |
Load a shader from memory. More... | |
Protected Member Functions | |
void | set (const ::Shader &shader) |
Shader type (generic)
Definition at line 16 of file Shader.hpp.
|
inline |
Definition at line 18 of file Shader.hpp.
|
inline |
Definition at line 22 of file Shader.hpp.
|
inline |
Definition at line 23 of file Shader.hpp.
|
inline |
Definition at line 25 of file Shader.hpp.
|
inline |
Definition at line 29 of file Shader.hpp.
|
inline |
Definition at line 35 of file Shader.hpp.
|
inline |
|
inline |
Begin custom shader drawing.
Definition at line 111 of file Shader.hpp.
|
inline |
End custom shader drawing (use default shader).
Definition at line 119 of file Shader.hpp.
|
inline |
Retrieves the id value for the object.
Definition at line 68 of file Shader.hpp.
|
inline |
Get shader uniform location.
Definition at line 129 of file Shader.hpp.
Referenced by SetValue().
|
inline |
Get shader attribute location.
Definition at line 138 of file Shader.hpp.
|
inline |
Retrieves the locs value for the object.
Definition at line 69 of file Shader.hpp.
|
inline |
Retrieves whether or not the shader is ready.
Definition at line 275 of file Shader.hpp.
|
inlinestatic |
Definition at line 51 of file Shader.hpp.
|
inlinestatic |
Load shader from files and bind default locations.
Definition at line 47 of file Shader.hpp.
|
inlinestatic |
Definition at line 64 of file Shader.hpp.
|
inlinestatic |
|
inline |
Definition at line 71 of file Shader.hpp.
Definition at line 78 of file Shader.hpp.
|
inlineprotected |
Definition at line 280 of file Shader.hpp.
|
inline |
Set shader uniform value (matrix 4x4)
Definition at line 235 of file Shader.hpp.
|
inline |
Set shader uniform value for texture.
Definition at line 256 of file Shader.hpp.
|
inline |
|
inline |
|
inline |
Set shader uniform value vector.
Definition at line 191 of file Shader.hpp.
|
inline |
Set shader uniform value vector (represented as a std::span)
Definition at line 213 of file Shader.hpp.
|
inline |
Set shader uniform value (matrix 4x4) Automatically finds the location of the uniform given its name.
Definition at line 246 of file Shader.hpp.
References GetLocation().
|
inline |
Set shader uniform value for texture Automatically finds the location of the uniform given its name.
Definition at line 267 of file Shader.hpp.
References GetLocation().
|
inline |
Set shader uniform value Automatically finds the location of the uniform given its name.
Definition at line 181 of file Shader.hpp.
References GetLocation().
|
inline |
Set shader uniform value Automatically finds the location of the uniform given its name.
Definition at line 158 of file Shader.hpp.
References GetLocation().
|
inline |
Set shader uniform value vector Automatically finds the location of the uniform given its name.
Definition at line 202 of file Shader.hpp.
References GetLocation().
|
inline |
Set shader uniform value vector (represented as a std::span) Automatically finds the location of the uniform given its name.
Definition at line 225 of file Shader.hpp.
References GetLocation().
|
inline |
Unload shader from GPU memory (VRAM)
Definition at line 102 of file Shader.hpp.
Referenced by ~Shader().