Skip to content

Doesn't work for a simple text rendering without a shading program #237

@yurivict

Description

@yurivict

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 with GL_INVALID_VALUE because index=-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 this index=-1 without such program.

It should be possible to render text without any shading program.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions