Fix OpenGL buffer data for Glyph rendering.

This commit is contained in:
Josh Holtrop 2020-12-06 15:30:15 -05:00
parent 2ab09b47bf
commit 4923eb1ab8

View File

@ -74,7 +74,7 @@ class Font
cast(GLfloat)left, cast(GLfloat)top, 0.0, t_max,
cast(GLfloat)(left + cglyph.width), cast(GLfloat)top, s_max, t_max,
];
m_buffer.set_buffer_data(GL_ARRAY_BUFFER, GL_STATIC_DRAW, data.ptr, data.length);
m_buffer.set_buffer_data(GL_ARRAY_BUFFER, GL_STATIC_DRAW, data.ptr, data.length * GLfloat.sizeof);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, 0, null);