armadillu / ofxFontStash

Easy (and fast) unicode string rendering addon for OpenFrameworks. FontStash is made by Andreas Krinke and Mikko Mononen
http://uri.cat/
91 stars 42 forks source link

The latest version fontStash=>>sth_create() error... #4

Open yty opened 11 years ago

yty commented 11 years ago

I do not know why.,updates to ofxFontStash wrong. . .

https://github.com/apetrone/font-stash https://github.com/apetrone/font-stash/blob/master/fontstash.c

new: ==> error f (!generate_texture(texture, stash))
goto error;

old: ==> ok stash->tt_textures = texture; glGenTextures(1, &texture->id); if (!texture->id) goto error; glBindTexture(GL_TEXTURE_2D, texture->id); glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, cachew, cacheh, 0, GL_ALPHA, GL_UNSIGNED_BYTE, empty_data); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);