Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have GLFW window, and I've defined a specific height and width for it. Here's my GLFW window :
GLFWwindow *window = glfwCreateWindow( WIDTH, HEIGHT, "Exercise 3" , nullptr, nullptr );

And I want to call FPS in my window title. Side by side with my own title, like "My Title.." | FPS.
I came across FPS counter function, here :
double calcFPS(double theTimeInterval = 1.0, string theWindowTitle = "NONE"){...


What I have tried:

I can't seem to call the function from my main loop where I create my GLFW window as well. When I call the function and replace the function input parameter (2nd parameter) using my own GLFW window, I get error "No matching function for call to..". Any suggestion ?
Posted
Comments
RedDk 2-Nov-18 13:51pm    
That link to the nubb of a code block where there's useage samples which runs it is purely C primordia. This (idea) above looks to be a dedicated Windows overlay leveraging such OGL functionality. Maybe this CP article will get you started making that transition ... from the merest to the robust.

https://www.codeproject.com/Articles/15419/GLFW-A-Simple-OpenGL-Framework-Library

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900