You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@rougier You need to add a "simple" testcase that would paint text in 2D in as simple as possible way, without any bells and whistles like shader programs.
There should be a function similar to Qt's QGLWidget::renderText() that accepts a font, a string, and paints text with triangles. This would be the simplest use case of painting text with OpenGL.
Ok, I see. This needs to be written and it should not be too difficult provided there is a default font available. Would you be interested in writing such example?
I tried to draw a simple 2D OpenGL text and this line https://github.com/rougier/freetype-gl/blob/master/vertex-buffer.c#L396 (
glDisableVertexAttribArray( attribute->index );
) fails withGL_INVALID_VALUE
becauseindex=-1
.This attribute index is hardcoded to be bound to the shader program in https://github.com/rougier/freetype-gl/blob/master/text-buffer.c#L29 (
vertex_buffer_new("vertex:3f,tex_coord:2f,color:4f,ashift:1f,agamma:1f" )
) but this leaves thisindex=-1
without such program.It should be possible to render text without any shading program.
The text was updated successfully, but these errors were encountered: