Shaders can now handle objects
This commit is contained in:
parent
107e207a83
commit
7d3213166b
3 changed files with 44 additions and 2 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <color.hpp>
|
||||
#include <texture.hpp>
|
||||
#include <transformable.hpp>
|
||||
|
||||
namespace oglu
|
||||
{
|
||||
|
@ -247,6 +248,16 @@ namespace oglu
|
|||
glUniform1i(location, index);
|
||||
}
|
||||
|
||||
void AbstractShader::SetUniform(const GLchar* name, Transformable& v0, GLboolean transpose)
|
||||
{
|
||||
SetUniform(glGetUniformLocation(program, name), v0);
|
||||
}
|
||||
|
||||
void AbstractShader::SetUniform(GLint location, Transformable& v0, GLboolean transpose)
|
||||
{
|
||||
glUniformMatrix4fv(location, 1, transpose, v0.GetMatrix());
|
||||
}
|
||||
|
||||
void AbstractShader::SetUniform1fv(const GLchar* name, GLsizei count, const GLfloat* value)
|
||||
{
|
||||
glUniform1fv(glGetUniformLocation(program, name), count, value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue