Closed DarkShinz closed 6 years ago
Do the demo files work as expected ?
@rougir Thanks for the answer. Yes they are working. I thought the possibility that a linkage error may be wrong with FreeType lib, though If that were true the texture_font struct would fail at initialization..
It's hard to tell where is the error in your implementation. One option would be to start with a working demo and to repplace some parts with your C++ port to check when it breaks.
@rougier Ill do that, Ill start replacing GLEW for GLAD for benchmark demo. Lets see ^^
The demo's ran as expected with GLAD. Just had to switch for GLEW includes in files and project.. and Ive noticed a mistake by my side. I was printing the glyphs values as float and obviously the results were 0.00. So that was not the problem at all. Sorry about that. It mostly an OpenGL error by my lacking of expertise in the matter producing a black screen. @rougier Thank you for the attention and sorry for the bothering! Happy new year ! :)
Hello guys, Its my first time with this library, Ive been trying to implement it in my C++ app to use. As Im starting, ive using functions from demo projects to learn, though during some tests Ive tracked an error back to the glyphs loading moment when it adds the text with the "add_text(...)" function. Its not returning a null glyph but an empty one. Ive read that it may happen if the atlas size is not big enough, though Ive checked that also. Im using same configurations from benchmark.c (VeraMono.ttf, font size: 12 and atlas size: 512x512x1). Also Ive tried loading the font file with texture_font_new_from_file and texture_font_new_from_memory and both, binding the texture before loadin glyphs: same error. Also I don't know how to debugg into the library to track where the line error is. What could cause it to fail loading? Help please :) -----Code---- These functions are being compilated with MSVS 2015 My app uses GLAD as OpenGL API: Ive edited opengl.h to load with it
This is how the variables are created:
This is the function I've copied and adapted from benchmark.c