From 36a67cf1f1656cfd4509430a5a617f388893efd6 Mon Sep 17 00:00:00 2001 From: Philip Jordan Date: Mon, 27 Jan 2020 23:49:47 +1300 Subject: Minor fixes to gl2es2 example versions --- .../jdesktop/j3d/examples/appearance/AppearanceMixedGL2ES2.java | 9 +++++---- .../jdesktop/j3d/examples/collision/TickTockCollisionGL2ES2.java | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/main/java/org') diff --git a/src/main/java/org/jdesktop/j3d/examples/appearance/AppearanceMixedGL2ES2.java b/src/main/java/org/jdesktop/j3d/examples/appearance/AppearanceMixedGL2ES2.java index 90b1eb4..3f60039 100644 --- a/src/main/java/org/jdesktop/j3d/examples/appearance/AppearanceMixedGL2ES2.java +++ b/src/main/java/org/jdesktop/j3d/examples/appearance/AppearanceMixedGL2ES2.java @@ -34,6 +34,7 @@ import java.awt.GraphicsConfiguration; import org.jdesktop.j3d.examples.Resources; import org.jogamp.java3d.Alpha; import org.jogamp.java3d.AmbientLight; +import org.jogamp.java3d.Background; import org.jogamp.java3d.BoundingSphere; import org.jogamp.java3d.BranchGroup; import org.jogamp.java3d.Canvas3D; @@ -200,10 +201,10 @@ public class AppearanceMixedGL2ES2 extends javax.swing.JFrame { new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0); // Set up the background - //TextureLoader bgTexture = new TextureLoader(bgImage, this); - //Background bg = new Background(bgTexture.getImage()); - //bg.setApplicationBounds(bounds); - //objRoot.addChild(bg); + TextureLoader bgTexture = new TextureLoader(bgImage, this); + Background bg = new Background(bgTexture.getImage()); + bg.setApplicationBounds(bounds); + objRoot.addChild(bg); // Set up the global lights Color3f lColor1 = new Color3f(0.7f, 0.7f, 0.7f); diff --git a/src/main/java/org/jdesktop/j3d/examples/collision/TickTockCollisionGL2ES2.java b/src/main/java/org/jdesktop/j3d/examples/collision/TickTockCollisionGL2ES2.java index 15dd54d..5b38f26 100644 --- a/src/main/java/org/jdesktop/j3d/examples/collision/TickTockCollisionGL2ES2.java +++ b/src/main/java/org/jdesktop/j3d/examples/collision/TickTockCollisionGL2ES2.java @@ -154,7 +154,8 @@ public class TickTockCollisionGL2ES2 extends javax.swing.JFrame // Create a new ColoringAttributes object for the shape's // appearance and make it writable at runtime. - Appearance app = new SimpleShaderAppearance(); + SimpleShaderAppearance app = new SimpleShaderAppearance(); + app.setUpdatableCapabilities(); shape.setAppearance(app); RenderingAttributes ra = new RenderingAttributes(); ra.setIgnoreVertexColors(true); -- cgit v1.2.3