Fixed macos build problems

This commit is contained in:
Lauchmelder23 2021-01-25 02:33:21 +01:00
parent 265a7253cc
commit 3fdeb074c1
13 changed files with 73 additions and 27 deletions

View file

@ -2,9 +2,10 @@
namespace oglu
{
Object::Object(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize) :
VAO(MakeVertexArray(vertices, verticesSize, indices, indicesSize, topology, topologySize))
Object::Object(const GLfloat* vertices, size_t verticesSize, const GLuint* indices, size_t indicesSize, const VertexAttribute* topology, size_t topologySize) //:
// VAO(MakeVertexArray(vertices, verticesSize, indices, indicesSize, topology, topologySize))
{
VAO = MakeVertexArray(vertices, verticesSize, indices, indicesSize, topology, topologySize);
}
Object::Object(const VertexArray& vao) :

View file

@ -238,12 +238,12 @@ namespace oglu
glUniform4f(location, v0.r, v0.g, v0.b, v0.a);
}
void AbstractShader::SetUniform(const GLchar* name, const Texture& v0, GLbyte index)
void AbstractShader::SetUniformTexture(const GLchar* name, const Texture& v0, GLbyte index)
{
SetUniform(glGetUniformLocation(program, name), v0, index);
SetUniformTexture(glGetUniformLocation(program, name), v0, index);
}
void AbstractShader::SetUniform(GLint location, const Texture& v0, GLbyte index)
void AbstractShader::SetUniformTexture(GLint location, const Texture& v0, GLbyte index)
{
v0->BindAs(index);
glUniform1i(location, index);