stories/engine/program/program.h

31 lines
491 B
C++

#pragma once
#include <stdint.h>
#include <vector>
#include <string>
#include <vulkan/vulkan.h>
#include "utils.h"
namespace Engine {
class Program {
public:
enum ShaderType {
vertex,
fragment
};
Program();
void loadSPIRV(const std::string& path, ShaderType type);
std::size_t codeSize(ShaderType type) const;
const uint32_t* code(ShaderType type) const;
private:
std::vector<char> vertexShader;
std::vector<char> fragmentShader;
};
}