Main function
int main()
{
init();
while (!glfwWindowShouldClose(window))
{
glClear(GL_COLOR_BUFFER_BIT);
currentTime = glfwGetTime(); ++frames;
if (currentTime - lastTime >= 1.0) { fps = frames; frames = 0; lastTime += 1.0; }
glPushAttrib(GL_TEXTURE_BIT);
glColor3f(1.0f,1.0f,1.0f);
for (int j = 0; j < 16; ++j)
for (int i = 0; i < 12; ++i)
font->Render(std::to_string(fps).c_str(), -1, FTPoint(i*60, height - j*30 - font->LineHeight(), 0));
glPopAttrib();
glfwSwapBuffers(window);
glfwPollEvents();
}
glfwDestroyWindow(window);
glfwTerminate();
}
Create font
FTFont *font;
font = new FTTextureFont("fonts/Linux Biolinum/LinBiolinum_R.otf");
font->FaceSize(20);
The problem
As you can see in the screenshots, with an increase in the number of inscriptions fps drop occurs at times!