From 5c0bb70fa8786fbdbef645dbd9170badc5fa725e Mon Sep 17 00:00:00 2001 From: benfry Date: Tue, 19 Aug 2008 15:15:37 +0000 Subject: [PATCH] add getContext() method, and a tweak or two for javadoc --- opengl/src/processing/opengl/PGraphicsOpenGL.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/opengl/src/processing/opengl/PGraphicsOpenGL.java b/opengl/src/processing/opengl/PGraphicsOpenGL.java index 3118b0bad..23d5436a8 100644 --- a/opengl/src/processing/opengl/PGraphicsOpenGL.java +++ b/opengl/src/processing/opengl/PGraphicsOpenGL.java @@ -108,8 +108,8 @@ public class PGraphicsOpenGL extends PGraphics3D { * that is visible on screen in order to work properly. * @param parent the host applet */ - public PGraphicsOpenGL(int width, int height, PApplet iparent) { - super(width, height, iparent); + public PGraphicsOpenGL(int width, int height, PApplet parent) { + super(width, height, parent); // if (parent == null) { // throw new RuntimeException("PGraphicsOpenGL can only be used " + @@ -278,6 +278,15 @@ public class PGraphicsOpenGL extends PGraphics3D { } + /** + * Get the current context, for use by libraries that need to talk to it. + * @return + */ + public GLContext getContext() { + return context; + } + + /** * Make the OpenGL rendering context current for this thread. */