ogl: Fixed performance issues.