/**
* Checks the WebGL Errors and throws an exception if there is an error.
*/
private void checkErrors() {
GLError error = webGLWrapper.getError();
if (error != GLError.NO_ERROR) {
String message = "WebGL Error: " + error;
GWT.log(message, null);
throw new RuntimeException(message);
}