#include "program.h" Engine::Program::Program(): vertexShader(), fragmentShader() {} std::size_t Engine::Program::codeSize(ShaderType type) const { switch (type) { case vertex: return vertexShader.size(); case fragment: return fragmentShader.size(); } return 0; } const uint32_t* Engine::Program::code(ShaderType type) const { switch (type) { case vertex: return reinterpret_cast(vertexShader.data()); case fragment: return reinterpret_cast(fragmentShader.data()); } return nullptr; } void Engine::Program::loadSPIRV(const std::string& path, ShaderType type) { switch (type) { case vertex: vertexShader = readFile(path); case fragment: fragmentShader = readFile(path); } }