Files
Terrarum/lib/slick-source/org/newdawn/slick/opengl/GLUtils.java
Song Minjae 059abff814 added sources for Slick
Former-commit-id: 1647fa32ef6894bd7db44f741f07c2f4dcdf9054
Former-commit-id: 0e5810dcfbe1fd59b13e7cabe9f1e93c5542da2d
2016-12-30 23:29:12 +09:00

23 lines
634 B
Java

package org.newdawn.slick.opengl;
import org.newdawn.slick.opengl.renderer.Renderer;
/**
* A collection of utilities to allow aid interaction with the GL provider
*
* @author kevin
*/
public final class GLUtils {
/**
* Check that we're in the right place to be doing GL operations
*/
public static void checkGLContext() {
try {
Renderer.get().glGetError();
} catch (NullPointerException e) {
throw new RuntimeException("OpenGL based resources (images, fonts, sprites etc) must be loaded as part of init() or the game loop. They cannot be loaded before initialisation.");
}
}
}