From c99d954f5e2bffa601c599142371cfeb45630f40 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Thu, 01 Aug 2019 00:11:39 -0400
Subject: [PATCH] Hue UI.

---
 CameraPane.java |   31 ++++++++++++++++++++-----------
 1 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/CameraPane.java b/CameraPane.java
index c0913fe..5bb4b19 100644
--- a/CameraPane.java
+++ b/CameraPane.java
@@ -9316,10 +9316,9 @@
     double[] light2camera = new double[16];
     
     //int newenvy = -1;
-    boolean envyoff = true; // false;
-    String skyboxname = "";
-    String skyboxext;
-    String loadedskyboxname = "";
+    //boolean envyoff = false;
+    
+    String loadedskyboxname;
     
     cVector light0 = new cVector(0, 0, 0); // 1,3,2);
     //float[] light0 = { 0,0,0 };
@@ -11065,10 +11064,18 @@
 //
 //        newenvy = -1;
         
-        if (!skyboxname.equals(this.loadedskyboxname))
+        if (object.skyboxname != null)
         {
-            LoadSkybox(skyboxname + "/", skyboxext, false);
-            loadedskyboxname = skyboxname;
+            if (!object.skyboxname.equals(this.loadedskyboxname))
+            {
+                LoadSkybox(object.skyboxname + "/", object.skyboxext, false);
+                loadedskyboxname = object.skyboxname;
+            }
+        }
+        else
+        {
+            cubemap = null;
+            loadedskyboxname = null;
         }
         
         ratio = ((double) getWidth()) / getHeight();
@@ -15362,7 +15369,7 @@
                 OCCLUSION_CULLING ^= true;
                 System.out.println("OCCLUSION CULLING = " + OCCLUSION_CULLING);
                 break;
-            case '0': envyoff ^= true; repaint(); break;
+            //case '0': envyoff ^= true; repaint(); break;
             case '1':
             case '2':
             case '3':
@@ -15372,7 +15379,7 @@
             case '7':
             case '8':
             case '9':
-                if (envyoff)
+                if (true) // envyoff)
                 {
                     BGcolor = (key - '1')/8.f;
                 }
@@ -16084,7 +16091,7 @@
                                 gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
                             break;
                             case Object3D.hitScale: gr.setColor(Color.cyan);
-                                gr.drawLine(X, Y, 0, 0);
+                                gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2);
                             break;
                         }
 
@@ -16633,6 +16640,7 @@
 
         return cubemap;
     }
+    
     int bigsphere = -1;
 
     float BGcolor = 0.5f;
@@ -16641,7 +16649,8 @@
     
     private void DrawSkyBox(GL gl, float ratio)
     {
-        if (envyoff || cubemap == null)
+        if (//envyoff ||
+                cubemap == null)
         {
             gl.glClearColor(BGcolor, BGcolor, BGcolor, 1);
             gl.glClear(gl.GL_COLOR_BUFFER_BIT);

--
Gitblit v1.6.2