Hubris Engine Dev
A Project to learn and get into Game Engine developement.
 
Loading...
Searching...
No Matches
Shader.h
Go to the documentation of this file.
1#pragma once
3#include "../../Memory.h"
4#define ENUMSHIFT(n) (0x1 << n)
5
6
7namespace Hubris::Graphics {
17
18 constexpr const char* VertexStageToString(const Hubris::Graphics::ShaderStage stage) noexcept {
19 switch (stage)
20 {
22 return "Vertex";
24 return "Fragment";
26 return "Geometry";
28 return "Tessellation Control";
30 return "Tessallation Evaluation";
32 return "Compute";
34 __fallthrough;
35 default:
36 return "Error/Unknown";
37 }
38 }
39
40 class Shader {
41 protected:
43 Shader(const ShaderStage& type) noexcept : stage(type) {};
44 public:
45 virtual void Destroy()noexcept = 0;
49 virtual bool Valid()const noexcept {
51 };
52 static Handle<Shader> Create(const std::vector<char>& data, ShaderStage type);
53 };
54
55}
#define ENUMSHIFT(n)
Definition Shader.h:4
Shader(const ShaderStage &type) noexcept
Definition Shader.h:43
virtual void Destroy() noexcept=0
ShaderStage stage
Definition Shader.h:42
virtual bool Valid() const noexcept
Override if you have an implementation specific validation method, this simply checks if the stage is...
Definition Shader.h:49
static Handle< Shader > Create(const std::vector< char > &data, ShaderStage type)
Definition Shader.cpp:7
Contains all graphics related classes and structs.
Definition Format.h:9
constexpr const char * VertexStageToString(const Hubris::Graphics::ShaderStage stage) noexcept
Definition Shader.h:18