1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-04-21 11:57:44 +00:00
novus/renderer/include/shadermanager.h
Joshua Goins 1aa7c8c6ee Start moving shader stuff into it's own dedicated class
This is generally abstract from the game renderer, and can be useful
elsewhere. It's also really big!
2024-05-10 16:14:33 -04:00

27 lines
No EOL
618 B
C++

// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <string_view>
#include <vector>
#include <glslang/Public/ShaderLang.h>
#include <spirv.hpp>
#include <vulkan/vulkan.h>
struct physis_Shader;
class Device;
class ShaderManager
{
public:
explicit ShaderManager(Device &device);
VkShaderModule convertShaderModule(const physis_Shader &shader, spv::ExecutionModel executionModel);
private:
std::vector<uint32_t> compileGLSL(const std::string_view sourceString, const EShLanguage sourceLanguage);
Device &m_device;
};