Added documentation
This commit is contained in:
parent
0a7a835bcc
commit
da26e0391f
12 changed files with 930 additions and 79 deletions
|
@ -213,17 +213,17 @@ namespace oglu
|
|||
glUniform4ui(location, v0, v1, v2, v3);
|
||||
}
|
||||
|
||||
void AbstractShader::SetUniform(const GLchar* name, const Color* v0, bool ignoreAlpha)
|
||||
void AbstractShader::SetUniform(const GLchar* name, const Color& v0, bool ignoreAlpha)
|
||||
{
|
||||
SetUniform(glGetUniformLocation(program, name), v0, ignoreAlpha);
|
||||
}
|
||||
|
||||
void AbstractShader::SetUniform(GLint location, const Color* v0, bool ignoreAlpha)
|
||||
void AbstractShader::SetUniform(GLint location, const Color& v0, bool ignoreAlpha)
|
||||
{
|
||||
if (ignoreAlpha)
|
||||
glUniform3f(location, v0->r, v0->g, v0->b);
|
||||
glUniform3f(location, v0.r, v0.g, v0.b);
|
||||
else
|
||||
glUniform4f(location, v0->r, v0->g, v0->b, v0->a);
|
||||
glUniform4f(location, v0.r, v0.g, v0.b, v0.a);
|
||||
}
|
||||
|
||||
void AbstractShader::SetUniform1fv(const GLchar* name, GLsizei count, const GLfloat* value)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "object.hpp"
|
||||
#include "vertexArray.hpp"
|
||||
|
||||
namespace oglu
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ namespace oglu
|
|||
glDeleteBuffers(1, &EBO);
|
||||
}
|
||||
|
||||
VertexArray MakeObject(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize)
|
||||
VertexArray MakeVertexArray(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize)
|
||||
{
|
||||
AbstractVertexArray* obj = new AbstractVertexArray(vertices, verticesSize, indices, indicesSize, topology, topologySize);
|
||||
return VertexArray(obj);
|
Loading…
Add table
Add a link
Reference in a new issue