About to have to look at shader code again.
This commit is contained in:
@ -4,8 +4,6 @@
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "display/mesh/Mesh.hpp"
|
||||
#include "display/IRenderManager.hpp"
|
||||
#include "display/Texture.hpp"
|
||||
#include "display/shader/ShaderParameterBuffer.hpp"
|
||||
|
||||
@ -33,7 +31,10 @@ namespace Dawn {
|
||||
* @param buffer Buffer to bind.
|
||||
*/
|
||||
template<typename J>
|
||||
void setParameterBuffer(shaderbufferslot_t slot, ShaderParameterBuffer<J> *buffer);
|
||||
void setParameterBuffer(
|
||||
const shaderbufferslot_t slot,
|
||||
const ShaderParameterBuffer<J> &buffer
|
||||
);
|
||||
|
||||
/**
|
||||
* Set's a specific shader parameter to a matrix.
|
||||
@ -41,7 +42,10 @@ namespace Dawn {
|
||||
* @param parameter parameter on the shader to set.
|
||||
* @param matrix Matrix to apply.
|
||||
*/
|
||||
virtual void setMatrix(T parameter, glm::mat4 matrix) = 0;
|
||||
virtual void setMatrix(
|
||||
const T parameter,
|
||||
const glm::mat4 matrix
|
||||
) = 0;
|
||||
|
||||
/**
|
||||
* Attaches a boolean to a shader.
|
||||
@ -49,7 +53,10 @@ namespace Dawn {
|
||||
* @param parameter parameter to set.
|
||||
* @param value Value to set.
|
||||
*/
|
||||
virtual void setBoolean(T parameter, bool_t value) = 0;
|
||||
virtual void setBoolean(
|
||||
const T parameter,
|
||||
const bool_t value
|
||||
) = 0;
|
||||
|
||||
/**
|
||||
* Set a color on to the shader.
|
||||
@ -57,7 +64,10 @@ namespace Dawn {
|
||||
* @param parameter parameter to set the color to.
|
||||
* @param color Color to set.
|
||||
*/
|
||||
virtual void setColor(T parameter, struct Color color) = 0;
|
||||
virtual void setColor(
|
||||
const T parameter,
|
||||
const struct Color color
|
||||
) = 0;
|
||||
|
||||
/**
|
||||
* Set a 3D vector on to the shader.
|
||||
@ -65,7 +75,10 @@ namespace Dawn {
|
||||
* @param parameter parameter to set the vector to.
|
||||
* @param vector Vector to set.
|
||||
*/
|
||||
virtual void setVector3(T parameter, glm::vec3 vector) = 0;
|
||||
virtual void setVector3(
|
||||
const T parameter,
|
||||
const glm::vec3 vector
|
||||
) = 0;
|
||||
|
||||
/**
|
||||
* Attaches a texture to the currently bound shader.
|
||||
@ -73,7 +86,10 @@ namespace Dawn {
|
||||
* @param parameter parameter to set the texture on to.
|
||||
* @param texture Texture slot to bind to the parameter.
|
||||
*/
|
||||
virtual void setTexture(T parameter, textureslot_t texture) = 0;
|
||||
virtual void setTexture(
|
||||
const T parameter,
|
||||
const textureslot_t texture
|
||||
) = 0;
|
||||
|
||||
/**
|
||||
* Sets a floating point value to the shader.
|
||||
@ -81,6 +97,16 @@ namespace Dawn {
|
||||
* @param parameter Paramater to set the float ont o.
|
||||
* @param Float to bind.
|
||||
*/
|
||||
virtual void setFloat(T parameter, float_t value) = 0;
|
||||
virtual void setFloat(
|
||||
const T parameter,
|
||||
const float_t value
|
||||
) = 0;
|
||||
|
||||
/**
|
||||
* Destroys/Cleans up the shader.
|
||||
*/
|
||||
virtual ~IShader() {
|
||||
|
||||
}
|
||||
};
|
||||
}
|
@ -20,6 +20,6 @@ namespace Dawn {
|
||||
*
|
||||
* @param location Location to bind this buffer to.
|
||||
*/
|
||||
virtual void bind(L location) = 0;
|
||||
virtual void bind(const L location) = 0;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user