diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index 9a57832c6..a87d248fe 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -33,7 +33,6 @@ import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.nio.ShortBuffer; import java.util.Arrays; -import java.util.Optional; import java.util.regex.Pattern; import processing.core.PApplet; @@ -3115,17 +3114,7 @@ public abstract class PGL { public abstract void getIntegerv(int value, IntBuffer data); public abstract void getFloatv(int value, FloatBuffer data); public abstract boolean isEnabled(int value); - - /** - * Get a configuration or status string from the underlying renderer. - * - * @param name The name or ID of the attribute to request. - * @return The requested value as a string. - * @throws GraphicsNotInitializedException Thrown if an attribute is requested that is not - * available until graphics initialization before that initialization compeltes. For example, - * if requesting a GL string before GL context is available. - */ - public abstract String getString(int name) throws GraphicsNotInitializedException; + public abstract String getString(int name); /////////////////////////////////////////////////////////// @@ -3416,25 +3405,4 @@ public abstract class PGL { public abstract void renderbufferStorageMultisample(int target, int samples, int format, int width, int height); public abstract void readBuffer(int buf); public abstract void drawBuffer(int buf); - - /////////////////////////////////////////////////////////// - - // Exceptions - - /** - * Exception for when attempting an operation requiring the graphics renderer, context, etc - * to have been initialized before that initialization. - */ - public class GraphicsNotInitializedException extends RuntimeException { - - /** - * Create a new exception indicating that an action could not be fulfilled because the rendering - * context or equivalent is not ready. - * - * @param msg Further details about the issue. - */ - public GraphicsNotInitializedException(String msg) { - super(msg); - } - } } diff --git a/core/src/processing/opengl/PJOGL.java b/core/src/processing/opengl/PJOGL.java index ec465542a..debe59665 100644 --- a/core/src/processing/opengl/PJOGL.java +++ b/core/src/processing/opengl/PJOGL.java @@ -1120,9 +1120,6 @@ public class PJOGL extends PGL { @Override public String getString(int name) { - if (gl == null) { - throw new PGL.GraphicsNotInitializedException("Context not initalized."); - } return gl.glGetString(name); }