diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp')
5 files changed, 24 insertions, 24 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLEventListenerState.java b/src/jogl/classes/com/jogamp/opengl/GLEventListenerState.java index 1b4187668..299e51532 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLEventListenerState.java +++ b/src/jogl/classes/com/jogamp/opengl/GLEventListenerState.java @@ -408,7 +408,7 @@ public class GLEventListenerState { public static GLRunnable setViewport = new GLRunnable() { @Override public boolean run(GLAutoDrawable drawable) { - drawable.getGL().glViewport(0, 0, drawable.getWidth(), drawable.getHeight()); + drawable.getGL().glViewport(0, 0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight()); return true; } }; @@ -428,7 +428,7 @@ public class GLEventListenerState { } @Override public boolean run(GLAutoDrawable drawable) { - listener.reshape(drawable, 0, 0, drawable.getWidth(), drawable.getHeight()); + listener.reshape(drawable, 0, 0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight()); return true; } } diff --git a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java index cd5aa338d..1c6dced6a 100644 --- a/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java +++ b/src/jogl/classes/com/jogamp/opengl/swt/GLCanvas.java @@ -455,12 +455,12 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS public final void destroy(ProxySurface s) { /* nop */ } @Override - public final int getWidth(ProxySurface s) { + public final int getPixelWidth(ProxySurface s) { return clientArea.width; } @Override - public final int getHeight(ProxySurface s) { + public final int getPixelHeight(ProxySurface s) { return clientArea.height; } @@ -689,12 +689,12 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS } @Override - public int getWidth() { + public int getSurfaceWidth() { return clientArea.width; } @Override - public int getHeight() { + public int getSurfaceHeight() { return clientArea.height; } @@ -984,15 +984,15 @@ public class GLCanvas extends Canvas implements GLAutoDrawable, GLSharedContextS @Override public String toString() { final GLDrawable _drawable = drawable; - final int dw = (null!=_drawable) ? _drawable.getWidth() : -1; - final int dh = (null!=_drawable) ? _drawable.getHeight() : -1; + final int dw = (null!=_drawable) ? _drawable.getSurfaceWidth() : -1; + final int dh = (null!=_drawable) ? _drawable.getSurfaceHeight() : -1; return "SWT-GLCanvas[Realized "+isRealized()+ ",\n\t"+((null!=_drawable)?_drawable.getClass().getName():"null-drawable")+ ",\n\tFactory "+getFactory()+ ",\n\thandle "+toHexString(getHandle())+ ",\n\tDrawable size "+dw+"x"+dh+ - ",\n\tSWT size "+getWidth()+"x"+getHeight()+"]"; + ",\n\tSWT size "+getSurfaceWidth()+"x"+getSurfaceHeight()+"]"; } public static void main(final String[] args) { diff --git a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java index 25a012bb9..2b4795aaa 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/util/GLReadBufferUtil.java @@ -154,13 +154,13 @@ public class GLReadBufferUtil { public boolean readPixels(GL gl, int inX, int inY, int inWidth, int inHeight, boolean mustFlipVertically) { final GLDrawable drawable = gl.getContext().getGLReadDrawable(); final int width, height; - if( 0 >= inWidth || drawable.getWidth() < inWidth ) { - width = drawable.getWidth(); + if( 0 >= inWidth || drawable.getSurfaceWidth() < inWidth ) { + width = drawable.getSurfaceWidth(); } else { width = inWidth; } - if( 0 >= inHeight || drawable.getHeight() < inHeight ) { - height = drawable.getHeight(); + if( 0 >= inHeight || drawable.getSurfaceHeight() < inHeight ) { + height = drawable.getSurfaceHeight(); } else { height= inHeight; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java index 9490e041b..3c5d6be2d 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/util/awt/AWTGLReadBufferUtil.java @@ -87,13 +87,13 @@ public class AWTGLReadBufferUtil extends GLReadBufferUtil { public BufferedImage readPixelsToBufferedImage(GL gl, int inX, int inY, int inWidth, int inHeight, boolean awtOrientation) { final GLDrawable drawable = gl.getContext().getGLReadDrawable(); final int width, height; - if( 0 >= inWidth || drawable.getWidth() < inWidth ) { - width = drawable.getWidth(); + if( 0 >= inWidth || drawable.getSurfaceWidth() < inWidth ) { + width = drawable.getSurfaceWidth(); } else { width = inWidth; } - if( 0 >= inHeight || drawable.getHeight() < inHeight ) { - height = drawable.getHeight(); + if( 0 >= inHeight || drawable.getSurfaceHeight() < inHeight ) { + height = drawable.getSurfaceHeight(); } else { height= inHeight; } diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java b/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java index 931f59869..1ad7b9987 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java +++ b/src/jogl/classes/com/jogamp/opengl/util/awt/Overlay.java @@ -119,7 +119,7 @@ public class Overlay { */ public void drawAll() throws GLException { beginRendering(); - draw(0, 0, drawable.getWidth(), drawable.getHeight()); + draw(0, 0, drawable.getSurfaceWidth(), drawable.getSurfaceHeight()); endRendering(); } @@ -130,7 +130,7 @@ public class Overlay { @throws GLException If an OpenGL context is not current when this method is called */ public void beginRendering() throws GLException { - renderer.beginOrthoRendering(drawable.getWidth(), drawable.getHeight()); + renderer.beginOrthoRendering(drawable.getSurfaceWidth(), drawable.getSurfaceHeight()); } /** Ends the OpenGL rendering process for the overlay. This is @@ -198,13 +198,13 @@ public class Overlay { private void validateRenderer() { if (renderer == null) { - renderer = new TextureRenderer(drawable.getWidth(), - drawable.getHeight(), + renderer = new TextureRenderer(drawable.getSurfaceWidth(), + drawable.getSurfaceHeight(), true); contentsLost = true; - } else if (renderer.getWidth() != drawable.getWidth() || - renderer.getHeight() != drawable.getHeight()) { - renderer.setSize(drawable.getWidth(), drawable.getHeight()); + } else if (renderer.getWidth() != drawable.getSurfaceWidth() || + renderer.getHeight() != drawable.getSurfaceHeight()) { + renderer.setSize(drawable.getSurfaceWidth(), drawable.getSurfaceHeight()); contentsLost = true; } else { contentsLost = false; |