hyporo-cpp/source/hpr/gpu/shader.hpp

54 lines
669 B
C++
Raw Normal View History

2022-09-24 16:07:46 +05:00
#pragma once
#include "context.hpp"
#include <string>
namespace hpr::gpu
{
class Shader : public Context
{
2022-10-05 21:10:51 +05:00
friend class Device;
2022-09-24 16:07:46 +05:00
public:
enum class ShaderType
{
Vertex,
Geometry,
Fragment,
ShaderTypeCount
};
2022-10-05 21:10:51 +05:00
protected:
std::string p_filename;
std::string p_label;
ShaderType p_type;
public:
2022-09-24 16:07:46 +05:00
// Constructors
Shader();
2022-11-18 21:50:49 +05:00
explicit
2022-09-24 16:07:46 +05:00
Shader(DeviceAPI api);
2022-11-18 21:50:49 +05:00
~Shader() override;
2022-09-24 16:07:46 +05:00
// Member functions
2022-11-18 21:50:49 +05:00
[[nodiscard]]
std::string filename() const;
2022-09-24 16:07:46 +05:00
2022-11-18 21:50:49 +05:00
[[nodiscard]]
std::string label() const;
2022-09-24 16:07:46 +05:00
2022-11-18 21:50:49 +05:00
[[nodiscard]]
ShaderType type() const;
2022-09-24 16:07:46 +05:00
};
} // end namespace hpr::gpu