Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: glQueries  (Read 4752 times)

0 Members and 1 Guest are viewing this topic.

delahee

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
glQueries
« 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.

binary1248

  • SFML Team
  • Hero Member
  • *****
  • Posts: 1405
  • I am awesome.
    • View Profile
    • The server that really shouldn't be running
Re: glQueries
« Reply #1 on: August 30, 2019, 12:00:03 am »
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
SFGUI # SFNUL # GLS # Wyrm <- Why do I waste my time on such a useless project? Because I am awesome (first meaning).