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

Author Topic: Option to disable OpenGL error checking  (Read 3341 times)

0 Members and 1 Guest are viewing this topic.

Lignum

  • Newbie
  • *
  • Posts: 20
    • View Profile
Option to disable OpenGL error checking
« on: November 14, 2015, 12:35:31 am »
Hi,

I've recently used SFML again in a long time, where I used OpenGL directly. While debugging the application with gDEBugger, I noticed that any texture related code (for which I used sf::Texture) was calling glGetError a lot. Since there is the general concept of anything glGet* being evil in OpenGL, I fear that this might impact performance. It'd be nice to be able to toggle these glGetError calls on and off, or maybe even have them enabled only when using a debug context (i.e. sf::ContextSettings::Attribute::Debug).

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Option to disable OpenGL error checking
« Reply #1 on: November 14, 2015, 08:24:27 am »
They are disabled in release builds.
Laurent Gomila - SFML developer

Lignum

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Option to disable OpenGL error checking
« Reply #2 on: November 14, 2015, 03:29:26 pm »
They are disabled in release builds.
Huh, I thought I tested in a release build... I tried again just now and they're indeed gone. I probably messed something up with my gDEBugger project. Well, thanks for pointing that out!