On 09/13/2015 10:59 PM, ac [via jogamp] wrote:
> Hey guys, after some gl profiling, we have noticed that the glGetError()
> function gets called twice inside glBufferData()... this looks strange as it
> might affect performance with continuous state queries... Maybe it does not
> have a noticeable effect, but it is often recommended not to use glGetError()
> in production code, so just wondering.
>
Look at:
'jogamp.opengl.GLBufferObjectTracker.createBufferStorage(GLBufferStateTracker,
GL, int, long, Buffer, int, int, CreateStorageDispatch)'
you see we need to clear an eventual pre-existing error,
since we need to learn about an GL error after dispatching for storage
creation. The latter has no success return code sadly,
hence the glGetError to be safe!
Since this call is expensive anyways (buffer creation)
it shall not matter that we sync the command stream.
Usually we try to avoid this ofc, since it creates a
performance hit as you mentioned.
~Sven