Clay Engine: Fix instance attrib.

This commit is contained in:
Clément Foucault 2017-02-09 18:33:12 +01:00
parent 08c1afb088
commit 1976fd7af1
1 changed files with 1 additions and 1 deletions

View File

@ -314,9 +314,9 @@ void Batch_draw_stupid_instanced(Batch* batch, unsigned int instance_vbo, int in
glVertexAttribPointer(loc + atr_ofs, (size > 4) ? 4 : size, GL_FLOAT, GL_FALSE,
sizeof(float) * attrib_stride, (GLvoid*)(sizeof(float) * ptr_ofs));
glVertexAttribDivisor(loc + atr_ofs, 1);
size -= 4;
atr_ofs++;
ptr_ofs += (size > 4) ? 4 : size;
size -= 4;
}
}
glBindBuffer(GL_ARRAY_BUFFER, 0);