开发者

How can I print the frames per second on my window's title in glut?

I tried this:

    char window_title[20]; 
    sprintf(window_title, "%f", fps);

    glutCreateWindow(window_title);

And isn't updating (remains 0) I checked fps 开发者_如何学编程being updated via printf.

How can I update the title?


Call glutSetWindowTitle with the fps after you compute it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜