Added stack trace on opengl errors + minor changes