Normand Briere
2019-08-12 8f1afe25ea8fc8801aab66331c32a50859a758c2
CameraPane.java
....@@ -8358,7 +8358,7 @@
83588358 // else
83598359 // if (!texname.startsWith("/"))
83608360 // texname = "/Users/nbriere/Textures/" + texname;
8361
- if (!FileExists(texname))
8361
+ if (!FileExists(texname) && !texname.startsWith("@"))
83628362 {
83638363 texname = fallbackTextureName;
83648364 }
....@@ -8441,6 +8441,15 @@
84418441 new Exception().printStackTrace();
84428442 } else
84438443 {
8444
+ if (texname.startsWith("@"))
8445
+ {
8446
+ // texturecache = textures.get(texname); // suspicious
8447
+ if (texturecache == null)
8448
+ texturecache = new CacheTexture(GetResourceTexture(texname.substring(1), bump),resolution);
8449
+ else
8450
+ new Exception().printStackTrace();
8451
+ } else
8452
+ {
84448453 if (textureon)
84458454 {
84468455 String cachename = texname;
....@@ -8500,6 +8509,7 @@
85008509 texturecache = new CacheTexture(texturedata,resolution);
85018510 //texture = GetTexture(tex, bump);
85028511 }
8512
+ }
85038513 }
85048514 //}
85058515 }
....@@ -8768,10 +8778,12 @@
87688778
87698779 gl.glGetIntegerv(GL.GL_MAX_TEXTURE_STACK_DEPTH, temp, 0);
87708780 MAXSTACK = temp[0];
8771
- System.out.println("GL_MAX_TEXTURE_STACK_DEPTH = " + MAXSTACK);
8781
+ if (Globals.DEBUG)
8782
+ System.out.println("GL_MAX_TEXTURE_STACK_DEPTH = " + MAXSTACK);
87728783 gl.glGetIntegerv(GL.GL_MAX_MODELVIEW_STACK_DEPTH, temp, 0);
87738784 MAXSTACK = temp[0];
8774
- System.out.println("GL_MAX_MODELVIEW_STACK_DEPTH = " + MAXSTACK);
8785
+ if (Globals.DEBUG)
8786
+ System.out.println("GL_MAX_MODELVIEW_STACK_DEPTH = " + MAXSTACK);
87758787
87768788 // Use debug pipeline
87778789 //drawable.setGL(new DebugGL(gl)); //
....@@ -8779,7 +8791,8 @@
87798791 gl = drawable.getGL(); //
87808792
87818793 GL gl3 = getGL();
8782
- System.out.println("INIT GL IS: " + gl.getClass().getName());
8794
+ if (Globals.DEBUG)
8795
+ System.out.println("INIT GL IS: " + gl.getClass().getName());
87838796
87848797
87858798 //float pos[] = { 100, 100, 100, 0 };
....@@ -10841,7 +10854,7 @@
1084110854
1084210855 if (wait)
1084310856 {
10844
- Sleep(500);
10857
+ Sleep(200); // blocks everything
1084510858
1084610859 wait = false;
1084710860 }
....@@ -14632,9 +14645,9 @@
1463214645 MODIFIERS |= COMMAND;
1463314646 /**/
1463414647 if((mod&SHIFT) == SHIFT)
14635
- manipCamera.RotatePosition(0, -speed);
14636
- else
1463714648 manipCamera.BackForth(0, -speed*delta, 0); // getWidth());
14649
+ else
14650
+ manipCamera.RotatePosition(0, -speed);
1463814651 /**/
1463914652 if ((mod & SHIFT) == SHIFT)
1464014653 {
....@@ -14653,9 +14666,9 @@
1465314666 MODIFIERS |= COMMAND;
1465414667 /**/
1465514668 if((mod&SHIFT) == SHIFT)
14656
- manipCamera.RotatePosition(0, speed);
14657
- else
1465814669 manipCamera.BackForth(0, speed*delta, 0); // getWidth());
14670
+ else
14671
+ manipCamera.RotatePosition(0, speed);
1465914672 /**/
1466014673 if ((mod & SHIFT) == SHIFT)
1466114674 {
....@@ -16657,6 +16670,7 @@
1665716670 private void DrawSkyBox(GL gl, float ratio)
1665816671 {
1665916672 if (//envyoff ||
16673
+ WIREFRAME ||
1666016674 cubemap == null)
1666116675 {
1666216676 gl.glClearColor(BGcolor, BGcolor, BGcolor, 1);