Refactor UniformBuffers and DescriptorSets
- Refactor UniformBuffers to keep track of the uniforms it contains - Refactor DescriptorSets to initialize UniformsBuffers and keep track of all its bindings - DescriptorSets can now be created from the Pipeline - Add custom DescriptorSets to Renderer
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "copium/pipeline/ShaderBinding.h"
|
||||
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
namespace Copium
|
||||
{
|
||||
class ShaderReflector
|
||||
{
|
||||
public:
|
||||
std::set<ShaderBinding> bindings;
|
||||
public:
|
||||
ShaderReflector(const std::string& vertexGlslFile, const std::string& fragmentGlslFile);
|
||||
|
||||
private:
|
||||
void ParseGlslFile(const std::string& glslFile, ShaderType type);
|
||||
void ParseLine(const std::string& str, int& index);
|
||||
void ParseWhitespace(const std::string& str, int& index);
|
||||
void ParseLayout(const std::string& str, int& index, ShaderType type);
|
||||
std::string_view ParseWord(const std::string& str, int& index);
|
||||
void ParseUniformBuffer(const std::string& str, int& index, ShaderBinding& binding);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user