Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
epoxy
GitHub Repository: epoxy/proj11
Path: blob/master/SLICK_HOME/src/org/newdawn/slick/opengl/GLUtils.java
1461 views
1
package org.newdawn.slick.opengl;
2
3
import org.lwjgl.opengl.GL11;
4
5
/**
6
* A collection of utilities to allow aid interaction with the GL provider
7
*
8
* @author kevin
9
*/
10
public final class GLUtils {
11
12
/**
13
* Check that we're in the right place to be doing GL operations
14
*/
15
public static void checkGLContext() {
16
try {
17
GL11.glGetError();
18
} catch (NullPointerException e) {
19
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.");
20
}
21
}
22
}
23
24