hyporo-cpp/source/hyporo/gpu/shader_program.hpp

36 lines
486 B
C++
Raw Normal View History

2022-09-24 16:07:46 +05:00
#pragma once
#include "context.hpp"
#include "shader.hpp"
#include <array>
namespace hpr::gpu
{
2022-10-03 18:51:34 +05:00
class ShaderProgram : public Context
2022-09-24 16:07:46 +05:00
{
2022-10-05 21:10:51 +05:00
friend class Device;
2022-09-24 16:07:46 +05:00
protected:
std::array<Shader*, (size_t)Shader::ShaderType::ShaderTypeCount> p_slots;
bool p_isLinked;
public:
// Constructors
ShaderProgram();
ShaderProgram(DeviceAPI api);
virtual ~ShaderProgram();
// Member functions
const Shader* getShader(Shader::ShaderType type) const;
};
}