void VBO::DrawIndices(VBO& vertexBuffer, VBO& indexBuffer, const GLenum mode, const GLsizei count) { vertexBuffer.EnableVertexAttribInterleavedWithBind(); indexBuffer.Bind(); indexBuffer.DrawIndices(mode, count); indexBuffer.Unbind(); vertexBuffer.DisableVertexAttribInterleavedWithBind(); }
void UBOShaderInterface::SetUpBuffer(VBO &buffer) { assert(!buffer.Created()); buffer.Create(); buffer.Bind(GL_UNIFORM_BUFFER); glBufferData(GL_UNIFORM_BUFFER, m_blockSize, NULL, GL_STREAM_DRAW); // Allocate VBO using this size buffer.Unbind(); }