Example #1
0
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();
}
Example #2
0
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();
}