Menno wrote: ↑Thu Mar 18, 2021 14:49
Perhaps the examples in the ffgl repo can be of use to you. For example
https://github.com/resolume/ffgl/blob/m ... dients.cpp
stuff you need to do once during loading go into InitGL, Rendering goes into ProcessOpenGL. If you need help with how to use c++ you're probably best off to find a tutorial or book somewhere.
I looked around at those a little already, and I think the issue is that I'm just not very familiar with FFGL's code structure. I know what all of the FreeType tutorials are doing, I just don't know where I should put that. I've tried rearranging their code in many ways and putting it inside of different functions but it always gives a similar error about an "unresolved external symbol". I know that I've imported FreeType correctly, and the error only pops up whenever I try to use previously created FreeType variables. An example of the first chunk of code that would be used for FreeType looks like this:
Code: Select all
FT_Library ft;
FT_Face face;
if( FT_Init_FreeType(&ft))
{
(throw error)
}
if(FT_New_Face(ft, "FreeSans.ttf", 0, &face))
{
(throw error)
}
FT_Set_Pixel_Sizes( face, 0, 48 );
if( FT_Load_Char( face, 'X', FT_LOAD_RENDER ) )
{
(throw error)
}
FT_GlyphSlot g = face->glyph;
Wherever the variables ft or face get used, the error gets thrown (like the if statements or FT_Set_Pixel_Sizes). I've tried putting that code in all sorts of places but it always does the same thing.
This is about as far as I've managed to get with this, any help would be greatly appreciated!