diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index 849b528db..96c4fcb7d 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -58,7 +58,7 @@ public abstract class PGL { protected int glContext; /** true if this is the GL interface for a primary surface PGraphics */ - protected boolean primaryPGL; + public boolean primaryPGL; // ........................................................ @@ -914,7 +914,6 @@ public abstract class PGL { PGL ppgl = primaryPGL ? this : pg.getPrimaryPGL(); if (!ppgl.loadedTex2DShader || ppgl.tex2DShaderContext != ppgl.glContext) { - System.out.println("Initializing PGL texture shader"); String vertSource = PApplet.join(texVertShaderSource, "\n"); String fragSource = PApplet.join(tex2DFragShaderSource, "\n"); ppgl.tex2DVertShader = createShader(VERTEX_SHADER, vertSource); diff --git a/core/src/processing/opengl/PJOGL.java b/core/src/processing/opengl/PJOGL.java index 0d8bb626b..2d293684d 100644 --- a/core/src/processing/opengl/PJOGL.java +++ b/core/src/processing/opengl/PJOGL.java @@ -113,7 +113,7 @@ public class PJOGL extends PGL { WINDOW_TOOLKIT = AWT; EVENTS_TOOLKIT = AWT; USE_FBOLAYER_BY_DEFAULT = true; - USE_JOGL_FBOLAYER = false; + USE_JOGL_FBOLAYER = true; } else if (PApplet.platform == PConstants.LINUX) { WINDOW_TOOLKIT = AWT; EVENTS_TOOLKIT = AWT; @@ -648,6 +648,26 @@ public class PJOGL extends PGL { } + protected void getGL(GLAutoDrawable glDrawable) { + context = glDrawable.getContext(); + glContext = context.hashCode(); + glThread = Thread.currentThread(); + + gl = context.getGL(); + gl2 = gl.getGL2ES2(); + try { + gl2x = gl.getGL2(); + } catch (javax.media.opengl.GLException e) { + gl2x = null; + } + try { + gl3 = gl.getGL2GL3(); + } catch (javax.media.opengl.GLException e) { + gl3 = null; + } + } + + @Override protected boolean canDraw() { return pg.initialized && pg.parent.isDisplayable(); @@ -869,25 +889,25 @@ public class PJOGL extends PGL { //getGL(glDrawable); } - private void getGL(GLAutoDrawable glDrawable) { - drawable = glDrawable; - context = glDrawable.getContext(); - glContext = context.hashCode(); - glThread = Thread.currentThread(); - - gl = context.getGL(); - gl2 = gl.getGL2ES2(); - try { - gl2x = gl.getGL2(); - } catch (javax.media.opengl.GLException e) { - gl2x = null; - } - try { - gl3 = gl.getGL2GL3(); - } catch (javax.media.opengl.GLException e) { - gl3 = null; - } - } +// private void getGL(GLAutoDrawable glDrawable) { +// drawable = glDrawable; +// context = glDrawable.getContext(); +// glContext = context.hashCode(); +// glThread = Thread.currentThread(); +// +// gl = context.getGL(); +// gl2 = gl.getGL2ES2(); +// try { +// gl2x = gl.getGL2(); +// } catch (javax.media.opengl.GLException e) { +// gl2x = null; +// } +// try { +// gl3 = gl.getGL2GL3(); +// } catch (javax.media.opengl.GLException e) { +// gl3 = null; +// } +// } } protected void nativeMouseEvent(com.jogamp.newt.event.MouseEvent nativeEvent, diff --git a/java/libraries/glw/examples/BigWindow/BigWindow.pde b/java/libraries/glw/examples/LargeStage/LargeStage.pde similarity index 100% rename from java/libraries/glw/examples/BigWindow/BigWindow.pde rename to java/libraries/glw/examples/LargeStage/LargeStage.pde