|
utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
|
The Shader class represents a shader program consisting of vertex and fragment shaders. More...
#include <headers/utility/graphic/shader.hpp>
Public Member Functions | |
| Shader (const std::string &vertString, const std::string &fragString) | |
| Constructs a Shader object by loading vertex and fragment shader bytecode from strings. | |
| ~Shader ()=default | |
| Destructor for the Shader class. | |
| const std::vector< uint32_t > & | getVertexCode () const |
| Retrieves the SPIR-V bytecode for the vertex shader. | |
| const std::vector< uint32_t > & | getFragmentCode () const |
| Retrieves the SPIR-V bytecode for the fragment shader. | |
Protected Attributes | |
| std::vector< uint32_t > | _vertSPIRV |
| SPIR-V bytecode for the vertex shader. | |
| std::vector< uint32_t > | _fragSPIRV |
| SPIR-V bytecode for the fragment shader. | |
The Shader class represents a shader program consisting of vertex and fragment shaders.
The Shader class manages the SPIR-V bytecode for both vertex and fragment shaders.
Definition at line 24 of file shader.hpp.
| utility::graphic::Shader::Shader | ( | const std::string & | vertString, |
| const std::string & | fragString | ||
| ) |
Constructs a Shader object by loading vertex and fragment shader bytecode from strings.
| vertString | The string containing the SPIR-V bytecode for the vertex shader. |
| fragString | The string containing the SPIR-V bytecode for the fragment shader |
Definition at line 28 of file shader.cpp.
| const std::vector< uint32_t > & utility::graphic::Shader::getFragmentCode | ( | ) | const |
Retrieves the SPIR-V bytecode for the fragment shader.
Definition at line 51 of file shader.cpp.
| const std::vector< uint32_t > & utility::graphic::Shader::getVertexCode | ( | ) | const |
Retrieves the SPIR-V bytecode for the vertex shader.
Definition at line 46 of file shader.cpp.
|
protected |
SPIR-V bytecode for the fragment shader.
Definition at line 68 of file shader.hpp.
|
protected |
SPIR-V bytecode for the vertex shader.
Definition at line 63 of file shader.hpp.