SFML community forums
General => Feature requests => Topic started by: delahee on August 29, 2019, 11:04:52 pm
-
Hey,
Gamedev here. I would like to teach my students to time their draw queries gpu wise, I think the lib could benefit a lot from having proper integration of glQueries with GL_TIME_ELAPSED. I believe for a maintainer it should be a couple hour challenge but as a noob user, I don't really know...
Whatcha think?
Thanks.
-
I don't think this is within the scope of SFML.
- Using this properly requires an understanding of the asynchronous nature of the OpenGL pipeline
- Constantly querying GPU counters will cause a GPU-to-CPU sync anyway leading to a significant decrease in performance, hence previous point
- This requires an extension that is only supported in OpenGL 3+
- If you really needed such functionality, writing a wrapper yourself with the help of sf::Content::isExtensionAvailable and sf::Context::getFunction shouldn't be more than 30 lines of code
- A lof of programming literature out there (especially beginner books like "Programming: Principles and Practice Using C++") provide their own blackbox libraries to help students focus on first learning the concepts at hand rather than their concrete implementations, this would be no different