From 91a1754cae120129469c201023901185bc4526e7 Mon Sep 17 00:00:00 2001 From: Harvey Harrison Date: Sun, 30 Jun 2013 11:59:54 -0700 Subject: j3dcore: unconditionally resize the offscreen layer if required when setting the Viewport This ensures that the offscreen layer is appropriately sized even on the initial display, some users reported incorrect canvas size until something caused the layout to change. Signed-off-by: Harvey Harrison --- src/classes/share/javax/media/j3d/Canvas3D.java | 1 + src/classes/share/javax/media/j3d/Renderer.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src/classes') diff --git a/src/classes/share/javax/media/j3d/Canvas3D.java b/src/classes/share/javax/media/j3d/Canvas3D.java index 5bafee1..ab9f0a3 100644 --- a/src/classes/share/javax/media/j3d/Canvas3D.java +++ b/src/classes/share/javax/media/j3d/Canvas3D.java @@ -4870,6 +4870,7 @@ boolean isAntialiasingSet() { // The native method for setting the Viewport. void setViewport(Context ctx, int x, int y, int width, int height) { + Pipeline.getPipeline().resizeOffscreenLayer(this, width, height); Pipeline.getPipeline().setViewport(ctx, x, y, width, height); } diff --git a/src/classes/share/javax/media/j3d/Renderer.java b/src/classes/share/javax/media/j3d/Renderer.java index e39d6da..ed393e3 100644 --- a/src/classes/share/javax/media/j3d/Renderer.java +++ b/src/classes/share/javax/media/j3d/Renderer.java @@ -987,7 +987,6 @@ ArrayList textureIDResourceTable = new ArrayList