content browser and textures on entity sprites
This commit is contained in:
@@ -14,7 +14,7 @@ namespace OpenEngine {
|
||||
public:
|
||||
OpenGLShader(const std::string& shader_path);
|
||||
OpenGLShader(const std::string& name, const std::string& vertex_src, const std::string& frament_src);
|
||||
virtual ~OpenGLShader() = default;
|
||||
virtual ~OpenGLShader();
|
||||
|
||||
virtual const std::string& GetName() const override { return name; };
|
||||
|
||||
@@ -44,11 +44,21 @@ namespace OpenEngine {
|
||||
private:
|
||||
std::string ReadFile(const std::string& shader_path);
|
||||
std::unordered_map<GLenum, std::string> PreProcess(const std::string& shader_source);
|
||||
void Compile(const std::unordered_map<GLenum, std::string> sources);
|
||||
|
||||
void CheckCompileErrors(unsigned int shader, const std::string& type);
|
||||
void CompileOrGetVulkanBinaries(const std::unordered_map<GLenum, std::string>& shader_sources);
|
||||
void CompileOrGetOpenGLBinaries();
|
||||
void CreateProgram();
|
||||
void Reflect(GLenum stage, const std::vector<uint32_t>& shader_data);
|
||||
//void CheckCompileErrors(unsigned int shader, const std::string& type);
|
||||
|
||||
private:
|
||||
std::string name;
|
||||
std::string file_path;
|
||||
|
||||
std::unordered_map<GLenum, std::vector<uint32_t>> vulkan_spirv;
|
||||
std::unordered_map<GLenum, std::vector<uint32_t>> opengl_spirv;
|
||||
|
||||
std::unordered_map<GLenum, std::string> m_OpenGLSourceCode;
|
||||
|
||||
u_int32_t id;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef OPENGL_UNIFORM_BUFFER_HPP
|
||||
#define OPENGL_UNIFORM_BUFFER_HPP
|
||||
|
||||
#include "open_engine/renderer/uniform_buffer.hpp"
|
||||
#include <cstdint>
|
||||
|
||||
namespace OpenEngine {
|
||||
|
||||
class OpenGLUniformBuffer : public UniformBuffer
|
||||
{
|
||||
public:
|
||||
OpenGLUniformBuffer(uint32_t size, uint32_t binding);
|
||||
virtual ~OpenGLUniformBuffer();
|
||||
|
||||
virtual void SetData(const void* data, uint32_t size,
|
||||
uint32_t offset = 0) override;
|
||||
|
||||
private:
|
||||
uint32_t id = 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // OPENGL_UNIFORM_BUFFER_HPP
|
||||
Reference in New Issue
Block a user