On Wed, 2008-08-20 at 10:16 +0300, Michael Boccara wrote: > The problem with this workaround is that you do glGet* upon every > frame, which is flushing/finishing the GL pipeline, causing > performance issues.
I would be very surprised if that is how glGet is implemented. It would expect it to just read from some internal struct attached to the context and it wouldn't matter whether the actual hardware has caught up to that state or not. > I still don't agree with the choice of having Cogl manage a cache of > the GL state. > Any good OpenGL driver does this job internally in order to achieve > good performance against competitors. When Cogl was rewritten, there was a point where we weren't using the cache for some part of the Pango rendering and we had a definite measurable performance impact compared to the old Cogl from calling glEnable/Disable excessively. Even if the OpenGL driver internally caches the state as well, I believe there is still some expense for any GL call to lookup the current context from thread-local storage and do an indirect function call. I haven't looked at an actual GL driver though so I'm not an expert, but this is just my experience. - Neil -- To unsubscribe send a mail to [EMAIL PROTECTED]
