First working example

This commit is contained in:
2023-05-29 19:50:04 -07:00
parent 96dd33c6b8
commit 8da23b123a
21 changed files with 263 additions and 161 deletions

View File

@ -6,6 +6,7 @@
#pragma once
#include "display/shader/Shader.hpp"
#include "display/mesh/Mesh.hpp"
#include "display/shader/ShaderParameterBuffer.hpp"
namespace Dawn {
struct ShaderPassItem {
@ -26,6 +27,7 @@ namespace Dawn {
std::map<shaderparameter_t, glm::vec3> vec3Values;
std::map<shaderparameter_t, textureslot_t> textureValues;
std::map<shaderparameter_t, float_t> floatValues;
std::map<shaderbufferlocation_t, IShaderParameterBuffer<shaderbufferslot_t>*> parameterBuffers;
// Textures
std::map<textureslot_t, Texture*> textureSlots;

View File

@ -7,7 +7,7 @@
#include "dawnlibs.hpp"
namespace Dawn {
template<typename T, typename L>
template<typename L>
class IShaderParameterBuffer {
public:
/**
@ -15,14 +15,6 @@ namespace Dawn {
*/
virtual void init() = 0;
/**
* Basic buffer method. Buffers the entire contents of the data struct to
* this shader parameter buffer.
*
* @param data Data to buffer to the parameter.
*/
virtual void buffer(T *data) = 0;
/**
* Bind this shader buffer to the supplied location.
*