Font::render(): bind buffer before setting vertex attribute pointer
This commit is contained in:
parent
98a27bd20b
commit
89849c561a
@ -23,8 +23,8 @@ namespace jes
|
|||||||
{
|
{
|
||||||
glBindTexture(GL_TEXTURE_2D, m_texture_id);
|
glBindTexture(GL_TEXTURE_2D, m_texture_id);
|
||||||
glEnableVertexAttribArray(0);
|
glEnableVertexAttribArray(0);
|
||||||
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0);
|
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, m_vbo_id);
|
glBindBuffer(GL_ARRAY_BUFFER, m_vbo_id);
|
||||||
|
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, 0);
|
||||||
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
|
||||||
}
|
}
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user