utility 2026.1.9
A comprehensive C++ utilities library tailored for the development of modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
shader.hpp
1/*
2** ETIB PROJECT, 2026
3** xider
4** File description:
5** shader
6*/
7
8#pragma once
9
10#include <string>
11#include <vector>
12#include <cstdint>
13#include <cstring>
14
15namespace utility::graphic
16{
24 class Shader
25 {
26 public:
36 Shader(const std::string &vertString, const std::string &fragString);
37
41 ~Shader() = default;
42
49 const std::vector<uint32_t> &getVertexCode() const;
50
57 const std::vector<uint32_t> &getFragmentCode() const;
58
59 protected:
63 std::vector<uint32_t> _vertSPIRV;
64
68 std::vector<uint32_t> _fragSPIRV;
69 };
70} // namespace utility::graphic
The Shader class represents a shader program consisting of vertex and fragment shaders.
Definition shader.hpp:25
const std::vector< uint32_t > & getVertexCode() const
Retrieves the SPIR-V bytecode for the vertex shader.
Definition shader.cpp:46
const std::vector< uint32_t > & getFragmentCode() const
Retrieves the SPIR-V bytecode for the fragment shader.
Definition shader.cpp:51
~Shader()=default
Destructor for the Shader class.
std::vector< uint32_t > _fragSPIRV
SPIR-V bytecode for the fragment shader.
Definition shader.hpp:68
std::vector< uint32_t > _vertSPIRV
SPIR-V bytecode for the vertex shader.
Definition shader.hpp:63