First working example
This commit is contained in:
@ -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;
|
||||
|
@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user