Skip to content

Commit 576fdf8

Browse files
better error reporting when the OpenGL implementation is not sufficient.
1 parent 89ba411 commit 576fdf8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/glg2d/G2DGLSimpleEventListener.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ protected void paintGL(GLGraphics2D g2d) {
137137

138138
@Override
139139
public void init(GLAutoDrawable drawable) {
140+
if (!drawable.getGL().isGL2()) {
141+
throw new IllegalStateException("GLG2D currently requires a GL2 implementation (OpenGL version 1.5 or greater)");
142+
}
143+
140144
reshape(drawable, 0, 0, drawable.getWidth(), drawable.getWidth());
141145
}
142146

0 commit comments

Comments
 (0)