-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add piston's fps_counter #176
base: master
Are you sure you want to change the base?
Conversation
It looks fine, but there's not really any GUI right now, so I can't think of where you'd add it? |
For now, it just displays in the console (println), but I'm thinking something looking like this: http://rawgit.com/mrdoob/stats.js/master/examples/theming.html I noticed playform is moving from piston to glium, so I suppose the FPS display should be glium-compatible, maybe using glium-text? |
Why not just Playform doesn't use piston; it would just be migrating to glium from straight OpenGL. I haven't looked at glium-text, or any of the 2D/GUI libraries, which might also have text support. |
I didn't know about silencing the warning with an underscore, thanks! |
I remember seeing some instructions displayed before (not sure if they were removed or no longer working) so the FPS could be displayed like that for now. If the graphics wrapper is going to be glium though, it seems like glium_text is a good option, it's by the same author. I don't know why I thought playform was using piston... |
Oh good point, I'd entirely forgotten about that. I was using piston for a little while, but I was only using little things, so I moved away from it. |
I'm trying to learn Rust, figured I would start with something small...
#37
This PR includes the fps_counter crate (from Piston developers), and displays the FPS (commented out in view_thread.rs).
Let me know if this looks good, and I'll add something to display it in the viewport, otherwise please let me know how it could be done better.