Shader.hpp
Go to the documentation of this file.
1 #ifndef _QUORI_FACE_SHADER_HPP_
2 #define _QUORI_FACE_SHADER_HPP_
3 
4 #include <cstdint>
5 #include <memory>
6 
7 
8 
9 namespace quori_face
10 {
11  class Shader
12  {
13  public:
14  enum class Type : std::uint8_t
15  {
16  Vertex,
17  Fragment
18  };
19 
20  typedef std::shared_ptr<Shader> Ptr;
21  typedef std::shared_ptr<const Shader> ConstPtr;
22 
23  ~Shader();
24 
35  static Ptr compile(const Type type, const std::uint8_t *const buffer, const std::size_t length);
36 
46  static Ptr compile(const Type type, const std::string &str);
47 
52  std::uint32_t getHandle() const;
53 
54  private:
55  Shader(const std::uint32_t handle);
56 
57  std::uint32_t handle_;
58  };
59 }
60 
61 #endif
buffer
GLuint buffer
Definition: glcorearb.h:636
quori_face::Shader::ConstPtr
std::shared_ptr< const Shader > ConstPtr
Definition: Shader.hpp:21
quori_face::Shader::Shader
Shader(const std::uint32_t handle)
Definition: Shader.cpp:78
quori_face::Shader::getHandle
std::uint32_t getHandle() const
Definition: Shader.cpp:72
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:790
quori_face::Shader
Definition: Shader.hpp:11
quori_face::Shader::~Shader
~Shader()
Definition: Shader.cpp:24
quori_face::Shader::compile
static Ptr compile(const Type type, const std::uint8_t *const buffer, const std::size_t length)
Definition: Shader.cpp:29
quori_face
Definition: Cache.hpp:9
quori_face::Shader::Type::Vertex
@ Vertex
quori_face::Shader::handle_
std::uint32_t handle_
Definition: Shader.hpp:57
quori_face::Shader::Type
Type
Definition: Shader.hpp:14
quori_face::Shader::Type::Fragment
@ Fragment
type
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:256
length
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:771
quori_face::Shader::Ptr
std::shared_ptr< Shader > Ptr
Definition: Shader.hpp:20


quori_face
Author(s):
autogenerated on Wed Mar 2 2022 00:53:20