.. | .. |
---|
8358 | 8358 | // else |
---|
8359 | 8359 | // if (!texname.startsWith("/")) |
---|
8360 | 8360 | // texname = "/Users/nbriere/Textures/" + texname; |
---|
8361 | | - if (!FileExists(texname)) |
---|
| 8361 | + if (!FileExists(texname) && !texname.startsWith("@")) |
---|
8362 | 8362 | { |
---|
8363 | 8363 | texname = fallbackTextureName; |
---|
8364 | 8364 | } |
---|
.. | .. |
---|
8441 | 8441 | new Exception().printStackTrace(); |
---|
8442 | 8442 | } else |
---|
8443 | 8443 | { |
---|
| 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 | + { |
---|
8444 | 8453 | if (textureon) |
---|
8445 | 8454 | { |
---|
8446 | 8455 | String cachename = texname; |
---|
.. | .. |
---|
8500 | 8509 | texturecache = new CacheTexture(texturedata,resolution); |
---|
8501 | 8510 | //texture = GetTexture(tex, bump); |
---|
8502 | 8511 | } |
---|
| 8512 | + } |
---|
8503 | 8513 | } |
---|
8504 | 8514 | //} |
---|
8505 | 8515 | } |
---|
.. | .. |
---|
8768 | 8778 | |
---|
8769 | 8779 | gl.glGetIntegerv(GL.GL_MAX_TEXTURE_STACK_DEPTH, temp, 0); |
---|
8770 | 8780 | 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); |
---|
8772 | 8783 | gl.glGetIntegerv(GL.GL_MAX_MODELVIEW_STACK_DEPTH, temp, 0); |
---|
8773 | 8784 | 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); |
---|
8775 | 8787 | |
---|
8776 | 8788 | // Use debug pipeline |
---|
8777 | 8789 | //drawable.setGL(new DebugGL(gl)); // |
---|
.. | .. |
---|
8779 | 8791 | gl = drawable.getGL(); // |
---|
8780 | 8792 | |
---|
8781 | 8793 | 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()); |
---|
8783 | 8796 | |
---|
8784 | 8797 | |
---|
8785 | 8798 | //float pos[] = { 100, 100, 100, 0 }; |
---|
.. | .. |
---|
10841 | 10854 | |
---|
10842 | 10855 | if (wait) |
---|
10843 | 10856 | { |
---|
10844 | | - Sleep(500); |
---|
| 10857 | + Sleep(200); // blocks everything |
---|
10845 | 10858 | |
---|
10846 | 10859 | wait = false; |
---|
10847 | 10860 | } |
---|
.. | .. |
---|
14632 | 14645 | MODIFIERS |= COMMAND; |
---|
14633 | 14646 | /**/ |
---|
14634 | 14647 | if((mod&SHIFT) == SHIFT) |
---|
14635 | | - manipCamera.RotatePosition(0, -speed); |
---|
14636 | | - else |
---|
14637 | 14648 | manipCamera.BackForth(0, -speed*delta, 0); // getWidth()); |
---|
| 14649 | + else |
---|
| 14650 | + manipCamera.RotatePosition(0, -speed); |
---|
14638 | 14651 | /**/ |
---|
14639 | 14652 | if ((mod & SHIFT) == SHIFT) |
---|
14640 | 14653 | { |
---|
.. | .. |
---|
14653 | 14666 | MODIFIERS |= COMMAND; |
---|
14654 | 14667 | /**/ |
---|
14655 | 14668 | if((mod&SHIFT) == SHIFT) |
---|
14656 | | - manipCamera.RotatePosition(0, speed); |
---|
14657 | | - else |
---|
14658 | 14669 | manipCamera.BackForth(0, speed*delta, 0); // getWidth()); |
---|
| 14670 | + else |
---|
| 14671 | + manipCamera.RotatePosition(0, speed); |
---|
14659 | 14672 | /**/ |
---|
14660 | 14673 | if ((mod & SHIFT) == SHIFT) |
---|
14661 | 14674 | { |
---|
.. | .. |
---|
16657 | 16670 | private void DrawSkyBox(GL gl, float ratio) |
---|
16658 | 16671 | { |
---|
16659 | 16672 | if (//envyoff || |
---|
| 16673 | + WIREFRAME || |
---|
16660 | 16674 | cubemap == null) |
---|
16661 | 16675 | { |
---|
16662 | 16676 | gl.glClearColor(BGcolor, BGcolor, BGcolor, 1); |
---|