I have a question regarding performance and the OpenGL error state.
It is usually recommended to avoid calling glGet* functions during rendering, so the GPU pipeline doesn’t get flushed unnecessarily. However, what about glGetError()? I routinely call it at the end of larger pieces of GL code, to ensure everything’s fine.
The question is, does glGetError incur a pipeline flush? Would it be advisable to call it only in debug builds? I can think of some cases where I’d like to get notified of errors in release builds, too.
So I figured, before I go over all of my GL code and benchmark, I’d ask here first, maybe someone might share her/his experience.
Thanks in advance!