Merge change Ib96df854 into eclair

* changes:
  add a way to easily catch and log GL errors (compile time flag)