On line 341 of texture-atlas.c (the depth==1 case), the pixel format is
GL_ALPHA:
glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA, self->width, self->height,
0, GL_ALPHA, GL_UNSIGNED_BYTE, self->data );
According to the docs (eg:
http://www.opengl.org/sdk/docs/man/xhtml/glTexImage2D.xml ) GL_ALPHA is not a
valid format, and this should probably be GL_RED, e.g.:
glTexImage2D( GL_TEXTURE_2D, 0, GL_RED, self->width, self->height,
0, GL_RED, GL_UNSIGNED_BYTE, self->data );
The distance-field fragment shaders then need to reference color.r instead of
color.a.
Note that the original version with GL_ALPHA works fine on Win64 with nVidia
GTX 680. However it generates an INVALID_ENUM error at the glTexImage2D call
on Mac OSX 10.8.4 with Intel HD 3000 (Mid2011 MBA) when using the 3.2 core
profile, opened with GLFW 3.
Original issue reported on code.google.com by brian.fo...@gmail.com on 28 Jul 2013 at 11:50
Original issue reported on code.google.com by
brian.fo...@gmail.com
on 28 Jul 2013 at 11:50