ulrichard / ftgl Goto Github PK
View Code? Open in Web Editor NEWfork from http://sourceforge.net/projects/ftgl
License: Other
fork from http://sourceforge.net/projects/ftgl
License: Other
Since FTGL is creating this file, it can just tell CMake where it lives rather than shipping a file on how to find itself.
This here crashes when d[0] or d[1] is NaN which apparently can happen with some characters in some fonts. Not sure why there would be such values.
Line 321 in 16f7667
This is where the segfault happens (inside the glu library):
Line 326 in 16f7667
I have implemented a crude fix here:
vovoid@d7b50a5
while I am compiling my opengl code I am facing this error.how to remove this?
all: sample2D
sample2D: Sample_GL3_2D.cpp glad.c
g++ -o sample2D Sample_GL3_2D.cpp glad.c -lGL -lglfw -ldl -std=c++11
clean:
rm sample2D
this is my contents of Makefile
and my code for rendering the font
const char* fontfile = "Monaco.ttf";
GL3Font.font = new FTExtrudeFont(fontfile); // 3D extrude style rendering
if(GL3Font.font->Error())
{
cout << "Error: Could not load font `" << fontfile << "'" << endl;
glfwTerminate();
exit(EXIT_FAILURE);
}
// Create and compile our GLSL program from the font shaders
fontProgramID = LoadShaders( "fontrender.vert", "fontrender.frag" );
GLint fontVertexCoordAttrib, fontVertexNormalAttrib, fontVertexOffsetUniform;
fontVertexCoordAttrib = glGetAttribLocation(fontProgramID, "vertexPosition");
fontVertexNormalAttrib = glGetAttribLocation(fontProgramID, "vertexNormal");
fontVertexOffsetUniform = glGetUniformLocation(fontProgramID, "pen");
GL3Font.fontMatrixID = glGetUniformLocation(fontProgramID, "MVP");
GL3Font.fontColorID = glGetUniformLocation(fontProgramID, "fontColor");
GL3Font.font->ShaderLocations(fontVertexCoordAttrib, fontVertexNormalAttrib, fontVertexOffsetUniform);
GL3Font.font->FaceSize(1);
GL3Font.font->Depth(0);
GL3Font.font->Outset(0, 0);
GL3Font.font->CharMap(ft_encoding_unicode);
while I am working on rendering fonts using ftgl in my opengl project I am encountering errors stating
g++ -o mygame Sample_GL3_2D.cpp glad.c -lGL -lglfw -ldl -lftgl -lSOIL -I /usr/include/freetype2 -L/usr/local/lib -lfreetype
/usr/local/lib/libftgl.so: undefined reference to `__glewGenBuffers'
/usr/local/lib/libftgl.so: undefined reference to `glewInit'
/usr/local/lib/libftgl.so: undefined reference to `__glewBindVertexArray'
/usr/local/lib/libftgl.so: undefined reference to `__glewBindBuffer'
/usr/local/lib/libftgl.so: undefined reference to `__glewUniform3f'
/usr/local/lib/libftgl.so: undefined reference to `__glewVertexAttribPointer'
/usr/local/lib/libftgl.so: undefined reference to `__glewBufferData'
/usr/local/lib/libftgl.so: undefined reference to `__glewDeleteBuffers'
/usr/local/lib/libftgl.so: undefined reference to `__glewDeleteVertexArrays'
/usr/local/lib/libftgl.so: undefined reference to `__glewGenVertexArrays'
/usr/local/lib/libftgl.so: undefined reference to `__glewEnableVertexAttribArray'
these are my contents in Makefile
all:mygame
mygame: Sample_GL3_2D.cpp glad.c
g++ -o mygame Sample_GL3_2D.cpp glad.c -lGL -lglfw -ldl -lftgl -lSOIL -I /usr/include/freetype2 -L/usr/local/lib -lfreetype
clean:
rm mygame
looks like the errors is being raised by the libftgl.so library. I have installed the GLEW using the glew packages in the ubuntu. but dont understand why it isn't being referenced.
See test/FTBufferFont-Bitmap.cpp from my pull request. (I created this test program to demonstrate fixing another bug, drawing garbage in this case, but the clipping bug remains.)
(Edited after manually looking in the dylib for function names)
Hello,
It seems that the functions from the commit 92d175e are not present in the ftgl 2.1.3 library that was installed by brew install ftgl
on my mac.
What should I do to install this version? Is it possible to merge the changes of this fork back to the main repository and make a new release?
Please synchronize important refs, including branches, tags, and releases, to make it easier to navigate the codebase across different timelines.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.