diff options
Diffstat (limited to 'src/classes/com/sun/javafx')
-rw-r--r-- | src/classes/com/sun/javafx/newt/GLWindow.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/classes/com/sun/javafx/newt/GLWindow.java b/src/classes/com/sun/javafx/newt/GLWindow.java index c8c707e98..23f959799 100644 --- a/src/classes/com/sun/javafx/newt/GLWindow.java +++ b/src/classes/com/sun/javafx/newt/GLWindow.java @@ -338,22 +338,24 @@ public class GLWindow extends Window implements GLAutoDrawable { return factory; } + public void setContext(GLContext newCtx) { + context = newCtx; + } + public GLContext getContext() { return context; } public GL getGL() { - GLContext ctx = getContext(); - if (ctx == null) { + if (context == null) { return null; } - return ctx.getGL(); + return context.getGL(); } public void setGL(GL gl) { - GLContext ctx = getContext(); - if (ctx != null) { - ctx.setGL(gl); + if (context != null) { + context.setGL(gl); } } |