.. | .. |
---|
1628 | 1628 | |
---|
1629 | 1629 | cColor.HSBtoRGB(display.color, display.saturation, 1, display.modelParams0); |
---|
1630 | 1630 | |
---|
1631 | | - float[] colorV = GrafreeD.colorV; |
---|
| 1631 | + float[] colorV = Grafreed.colorV; |
---|
1632 | 1632 | |
---|
1633 | 1633 | /**/ |
---|
1634 | 1634 | if (display.DrawMode() == display.DEFAULT) // && display.RENDERPROGRAM == 0) |
---|
.. | .. |
---|
2140 | 2140 | System.err.println("LIVE = " + Globals.isLIVE()); |
---|
2141 | 2141 | |
---|
2142 | 2142 | if (!Globals.isLIVE()) // save sound |
---|
2143 | | - GrafreeD.savesound = true; // wav.save(); |
---|
| 2143 | + Grafreed.savesound = true; // wav.save(); |
---|
2144 | 2144 | // else |
---|
2145 | 2145 | repaint(); // start loop // may 2013 |
---|
2146 | 2146 | } |
---|
.. | .. |
---|
8022 | 8022 | } |
---|
8023 | 8023 | } |
---|
8024 | 8024 | |
---|
8025 | | - /*boolean*/ public void BindTextures(cTexture tex, int resolution) // INTERFACE |
---|
| 8025 | + /*boolean*/ public void BindTextures(cTexture tex, int resolution) throws Exception // INTERFACE |
---|
8026 | 8026 | { |
---|
8027 | 8027 | if (// DrawMode() != 0 || /*tex == null ||*/ |
---|
8028 | 8028 | ambientOcclusion ) // || !textureon) |
---|
.. | .. |
---|
8067 | 8067 | return; // true; |
---|
8068 | 8068 | } |
---|
8069 | 8069 | |
---|
8070 | | - CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) |
---|
| 8070 | + CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) throws Exception |
---|
8071 | 8071 | { |
---|
8072 | 8072 | CacheTexture/*com.sun.opengl.util.texture.Texture*/ texture = null; |
---|
8073 | 8073 | |
---|
.. | .. |
---|
8184 | 8184 | texturedata = GetFileTexture(cachename, processbump, resolution); |
---|
8185 | 8185 | |
---|
8186 | 8186 | |
---|
8187 | | - if (texturedata != null) |
---|
| 8187 | + if (texturedata == null) |
---|
| 8188 | + throw new Exception(); |
---|
| 8189 | + |
---|
8188 | 8190 | texture = new CacheTexture(com.sun.opengl.util.texture.TextureIO.newTexture(texturedata),resolution); |
---|
8189 | 8191 | //texture = GetTexture(tex, bump); |
---|
8190 | 8192 | } |
---|
.. | .. |
---|
8306 | 8308 | return texture; |
---|
8307 | 8309 | } |
---|
8308 | 8310 | |
---|
8309 | | - com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) |
---|
| 8311 | + com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) throws Exception |
---|
8310 | 8312 | { |
---|
8311 | 8313 | CacheTexture texture = GetCacheTexture(tex, bump, resolution); |
---|
8312 | 8314 | |
---|
.. | .. |
---|
8324 | 8326 | return texture!=null?texture.texture:null; |
---|
8325 | 8327 | } |
---|
8326 | 8328 | |
---|
8327 | | - public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution) |
---|
| 8329 | + public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution) throws Exception |
---|
8328 | 8330 | { |
---|
8329 | 8331 | CacheTexture texture = GetCacheTexture(tex, bump, resolution); |
---|
8330 | 8332 | |
---|
8331 | 8333 | return texture!=null?texture.texturedata:null; |
---|
8332 | 8334 | } |
---|
8333 | 8335 | |
---|
8334 | | - boolean BindTexture(String tex, boolean bump, int resolution) |
---|
| 8336 | + boolean BindTexture(String tex, boolean bump, int resolution) throws Exception |
---|
8335 | 8337 | { |
---|
8336 | 8338 | if (/*tex == null ||*/ ambientOcclusion ) // || !textureon) |
---|
8337 | 8339 | { |
---|
.. | .. |
---|
9542 | 9544 | |
---|
9543 | 9545 | if (!BOXMODE) |
---|
9544 | 9546 | { |
---|
9545 | | - System.out.println("image: " + fullname + " (wav cursor=" + (GrafreeD.wav.cursor / 735 / 4) + ")"); |
---|
| 9547 | + System.out.println("image: " + fullname + " (wav cursor=" + (Grafreed.wav.cursor / 735 / 4) + ")"); |
---|
9546 | 9548 | } |
---|
9547 | 9549 | |
---|
9548 | 9550 | if (!BOXMODE) |
---|
.. | .. |
---|
9580 | 9582 | ABORTED = false; |
---|
9581 | 9583 | } |
---|
9582 | 9584 | else |
---|
9583 | | - GrafreeD.wav.cursor += 735 * ACSIZE; |
---|
| 9585 | + Grafreed.wav.cursor += 735 * ACSIZE; |
---|
9584 | 9586 | |
---|
9585 | 9587 | if (false) |
---|
9586 | 9588 | { |
---|
.. | .. |
---|
10243 | 10245 | |
---|
10244 | 10246 | public void display(GLAutoDrawable drawable) |
---|
10245 | 10247 | { |
---|
10246 | | - if (GrafreeD.savesound && GrafreeD.hassound) |
---|
| 10248 | + if (Grafreed.savesound && Grafreed.hassound) |
---|
10247 | 10249 | { |
---|
10248 | | - GrafreeD.wav.save(); |
---|
10249 | | - GrafreeD.savesound = false; |
---|
10250 | | - GrafreeD.hassound = false; |
---|
| 10250 | + Grafreed.wav.save(); |
---|
| 10251 | + Grafreed.savesound = false; |
---|
| 10252 | + Grafreed.hassound = false; |
---|
10251 | 10253 | } |
---|
10252 | 10254 | // if (DEBUG_SELECTION) |
---|
10253 | 10255 | // { |
---|
.. | .. |
---|
10377 | 10379 | Object3D theobject = object; |
---|
10378 | 10380 | Object3D theparent = object.parent; |
---|
10379 | 10381 | object.parent = null; |
---|
10380 | | - object = (Object3D)GrafreeD.clone(object); |
---|
| 10382 | + object = (Object3D)Grafreed.clone(object); |
---|
10381 | 10383 | object.Stripify(); |
---|
10382 | 10384 | if (theobject.selection == null || theobject.selection.Size() == 0) |
---|
10383 | 10385 | theobject.PreprocessOcclusion(this); |
---|
.. | .. |
---|
10798 | 10800 | // Bump noise |
---|
10799 | 10801 | gl.glActiveTexture(GL.GL_TEXTURE6); |
---|
10800 | 10802 | //gl.glBindTexture(GL.GL_TEXTURE_2D, bump_noise); |
---|
10801 | | - BindTexture(NOISE_TEXTURE, false, 2); |
---|
| 10803 | + |
---|
| 10804 | + try |
---|
| 10805 | + { |
---|
| 10806 | + BindTexture(NOISE_TEXTURE, false, 2); |
---|
| 10807 | + } |
---|
| 10808 | + catch (Exception e) |
---|
| 10809 | + { |
---|
| 10810 | + System.err.println("FAILED: " + NOISE_TEXTURE); |
---|
| 10811 | + } |
---|
| 10812 | + |
---|
10802 | 10813 | |
---|
10803 | 10814 | gl.glActiveTexture(GL.GL_TEXTURE0); |
---|
10804 | 10815 | gl.glEnable(GL.GL_TEXTURE_2D); |
---|
.. | .. |
---|
11283 | 11294 | e.printStackTrace(); |
---|
11284 | 11295 | } |
---|
11285 | 11296 | |
---|
11286 | | - if (GrafreeD.RENDERME > 0) |
---|
11287 | | - GrafreeD.RENDERME--; // mechante magouille |
---|
| 11297 | + if (Grafreed.RENDERME > 0) |
---|
| 11298 | + Grafreed.RENDERME--; // mechante magouille |
---|
11288 | 11299 | |
---|
11289 | 11300 | Globals.ONESTEP = false; |
---|
11290 | 11301 | } |
---|
.. | .. |
---|
11354 | 11365 | |
---|
11355 | 11366 | usedtextures.clear(); |
---|
11356 | 11367 | |
---|
11357 | | - BindTextures(DEFAULT_TEXTURES, 2); |
---|
| 11368 | + try |
---|
| 11369 | + { |
---|
| 11370 | + BindTextures(DEFAULT_TEXTURES, 2); |
---|
| 11371 | + } |
---|
| 11372 | + catch (Exception e) |
---|
| 11373 | + { |
---|
| 11374 | + System.err.println("FAILED: " + DEFAULT_TEXTURES); |
---|
| 11375 | + } |
---|
11358 | 11376 | } |
---|
11359 | 11377 | //System.out.println("--> " + stackdepth); |
---|
11360 | 11378 | // GrafreeD.traceon(); |
---|
.. | .. |
---|
11445 | 11463 | if (checker != null && DrawMode() == DEFAULT) |
---|
11446 | 11464 | { |
---|
11447 | 11465 | //BindTexture(IMMORTAL_TEXTURE); |
---|
11448 | | - BindTextures(checker.GetTextures(), checker.texres); |
---|
| 11466 | + try |
---|
| 11467 | + { |
---|
| 11468 | + BindTextures(checker.GetTextures(), checker.texres); |
---|
| 11469 | + } |
---|
| 11470 | + catch (Exception e) |
---|
| 11471 | + { |
---|
| 11472 | + System.err.println("FAILED: " + checker.GetTextures()); |
---|
| 11473 | + } |
---|
11449 | 11474 | // NEAREST |
---|
11450 | 11475 | GetGL().glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); // GL.GL_LINEAR); |
---|
11451 | 11476 | DrawChecker(gl); |
---|
.. | .. |
---|
12477 | 12502 | |
---|
12478 | 12503 | // display shadow only (bump == 0) |
---|
12479 | 12504 | "SUB temp.x, half.x, shadow.x;" + |
---|
12480 | | - "MOV temp.y, -params6.x;" + |
---|
12481 | | - "SLT temp.z, temp.y, zero.x;" + |
---|
| 12505 | + "MOV temp.y, -params5.z;" + // params6.x;" + |
---|
| 12506 | + "SLT temp.z, temp.y, -one2048th.x;" + |
---|
12482 | 12507 | "SUB temp.y, one.x, temp.z;" + |
---|
12483 | 12508 | "MUL temp.x, temp.x, temp.y;" + |
---|
12484 | 12509 | "KIL temp.x;" + |
---|
.. | .. |
---|
12809 | 12834 | //once = true; |
---|
12810 | 12835 | } |
---|
12811 | 12836 | |
---|
12812 | | - System.out.print("Program #" + mode + "; length = " + program.length()); |
---|
| 12837 | + System.out.print("Program #" + mode + "; instructions = " + program.split(";").length + "; length = " + program.length()); |
---|
12813 | 12838 | System.out.println(" - " + (mode >> 3) + " lights; " + ((mode & 2) == 2 ? "anisoUV " : "") + ((mode & 4) == 4 ? "SoftShadow " : "")); |
---|
12814 | 12839 | loadProgram(gl, GL.GL_FRAGMENT_PROGRAM_ARB, program); |
---|
12815 | 12840 | |
---|
.. | .. |
---|
12942 | 12967 | |
---|
12943 | 12968 | "ADD " + depth + ".z, " + depth + ".z, temp.x;" + |
---|
12944 | 12969 | //"SUB " + depth + ".z, " + depth + ".z, temp.x;" + // back face shadowing! |
---|
| 12970 | + |
---|
| 12971 | + // Compare fragment depth in light space with shadowmap. |
---|
12945 | 12972 | "SUB temp.x, fragment.texcoord[1].z, " + depth + ".z;" + |
---|
12946 | 12973 | "SGE temp.y, temp.x, zero.x;" + |
---|
12947 | | - "SUB " + shadow + ".y, one.x, temp.y;" + |
---|
| 12974 | + "SUB " + shadow + ".y, one.x, temp.y;" + // Specular is fully occluded |
---|
| 12975 | + |
---|
| 12976 | + // Reverse comparison |
---|
12948 | 12977 | "SUB temp.x, one.x, temp.x;" + |
---|
12949 | 12978 | "MUL " + shadow + ".x, temp.x, temp.y;" + |
---|
12950 | | - "SUB " + shadow + ".x, one.x, " + shadow + ".x;" + // specular is fully occluded |
---|
| 12979 | + "SUB " + shadow + ".x, one.x, " + shadow + ".x;" + // diffuse |
---|
12951 | 12980 | "POW " + shadow + ".x, " + shadow + ".x, params5.z;" + // fake depth |
---|
12952 | 12981 | |
---|
12953 | 12982 | "SLT " + shadow + ".z, fragment.texcoord[1].z, " + depth + ".z;" + |
---|
.. | .. |
---|
12961 | 12990 | // No shadow for backface |
---|
12962 | 12991 | "DP3 temp.x, normal, lightd;" + |
---|
12963 | 12992 | "SLT temp.x, temp.x, zero.x;" + // shadoweps |
---|
| 12993 | + "LRP " + shadow + ", temp.x, one, " + shadow + ";" + |
---|
| 12994 | + |
---|
| 12995 | + // No shadow when out of frustrum |
---|
| 12996 | + "SGE temp.x, " + depth + ".z, one.z;" + |
---|
12964 | 12997 | "LRP " + shadow + ", temp.x, one, " + shadow + ";" + |
---|
12965 | 12998 | ""; |
---|
12966 | 12999 | } |
---|
.. | .. |
---|
13519 | 13552 | public void mousePressed(MouseEvent e) |
---|
13520 | 13553 | { |
---|
13521 | 13554 | //System.out.println("mousePressed: " + e); |
---|
13522 | | - clickStart(e.getX(), e.getY(), e.getModifiersEx()); |
---|
| 13555 | + clickStart(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx()); |
---|
13523 | 13556 | } |
---|
13524 | 13557 | |
---|
13525 | 13558 | static long prevtime = 0; |
---|
.. | .. |
---|
13595 | 13628 | // mode |= META; |
---|
13596 | 13629 | //} |
---|
13597 | 13630 | |
---|
13598 | | - SetMouseMode(WHEEL | e.getModifiersEx()); |
---|
13599 | | - drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0); |
---|
| 13631 | + SetMouseMode(e.getModifiers(), WHEEL | e.getModifiersEx()); |
---|
| 13632 | + drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0, 0); |
---|
13600 | 13633 | anchorX = ax; |
---|
13601 | 13634 | anchorY = ay; |
---|
13602 | 13635 | prevX = px; |
---|
.. | .. |
---|
13656 | 13689 | // wasliveok = true; |
---|
13657 | 13690 | // waslive = false; |
---|
13658 | 13691 | |
---|
| 13692 | + // May 2019 Forget it: |
---|
| 13693 | + if (true) |
---|
| 13694 | + return; |
---|
| 13695 | + |
---|
13659 | 13696 | // source == timer |
---|
13660 | 13697 | if (mouseDown) |
---|
13661 | 13698 | { |
---|
.. | .. |
---|
13694 | 13731 | |
---|
13695 | 13732 | javax.swing.Timer timer = new javax.swing.Timer(350, this); |
---|
13696 | 13733 | |
---|
13697 | | - void clickStart(int x, int y, int modifiers) |
---|
| 13734 | + void clickStart(int x, int y, int modifiers, int modifiersex) |
---|
13698 | 13735 | { |
---|
13699 | 13736 | if (!wasliveok) |
---|
13700 | 13737 | return; |
---|
.. | .. |
---|
13711 | 13748 | // touched = true; // main DL |
---|
13712 | 13749 | if (isRenderer) |
---|
13713 | 13750 | { |
---|
13714 | | - SetMouseMode(modifiers); |
---|
| 13751 | + SetMouseMode(modifiers, modifiersex); |
---|
13715 | 13752 | } |
---|
13716 | 13753 | |
---|
13717 | 13754 | selectX = anchorX = x; |
---|
.. | .. |
---|
13724 | 13761 | clicked = true; |
---|
13725 | 13762 | hold = false; |
---|
13726 | 13763 | |
---|
13727 | | - if (((modifiers & ~1024) & ~0) == 0) // Single or multiple selection |
---|
| 13764 | + if (((modifiersex & ~1024) & ~0) == 0) // Single or multiple selection |
---|
13728 | 13765 | // june 2013 means CTRL_CLICK: if (((modifiers & ~1024) & ~128) == 0) // Single or multiple selection |
---|
13729 | 13766 | { |
---|
13730 | 13767 | // System.out.println("RESTART II " + modifiers); |
---|
.. | .. |
---|
13755 | 13792 | info.camera = renderCamera; |
---|
13756 | 13793 | info.x = x; |
---|
13757 | 13794 | info.y = y; |
---|
13758 | | - info.modifiers = modifiers; |
---|
| 13795 | + info.modifiers = modifiersex; |
---|
13759 | 13796 | editObj = object.doEditClick(info, 0); |
---|
13760 | 13797 | if (!editObj) |
---|
13761 | 13798 | { |
---|
.. | .. |
---|
13784 | 13821 | clickEnd(e.getX(), e.getY(), e.getModifiersEx()); |
---|
13785 | 13822 | } |
---|
13786 | 13823 | else |
---|
13787 | | - drag(e.getX(), e.getY(), e.getModifiersEx()); |
---|
| 13824 | + drag(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx()); |
---|
13788 | 13825 | |
---|
13789 | 13826 | //try { Thread.sleep(1); } catch (Exception ex) {} |
---|
13790 | 13827 | } |
---|
.. | .. |
---|
14021 | 14058 | { |
---|
14022 | 14059 | Globals.lighttouched = true; |
---|
14023 | 14060 | } |
---|
14024 | | - drag(X, (mouseMode != 0) ? Y : anchorY, MODIFIERS); |
---|
| 14061 | + drag(X, (mouseMode != 0) ? Y : anchorY, 0, MODIFIERS); |
---|
14025 | 14062 | } |
---|
14026 | 14063 | //else |
---|
14027 | 14064 | } |
---|
.. | .. |
---|
14121 | 14158 | int X, Y; |
---|
14122 | 14159 | boolean SX, SY; |
---|
14123 | 14160 | |
---|
14124 | | - void drag(int x, int y, int modifiers) |
---|
| 14161 | + void drag(int x, int y, int modifiers, int modifiersex) |
---|
14125 | 14162 | { |
---|
14126 | 14163 | if (IsFrozen()) |
---|
14127 | 14164 | { |
---|
.. | .. |
---|
14130 | 14167 | |
---|
14131 | 14168 | drag = true; // NEW |
---|
14132 | 14169 | |
---|
14133 | | - boolean continuous = (modifiers & COMMAND) == COMMAND; |
---|
| 14170 | + boolean continuous = (modifiersex & COMMAND) == COMMAND; |
---|
14134 | 14171 | |
---|
14135 | 14172 | X = x; |
---|
14136 | 14173 | Y = y; |
---|
14137 | 14174 | // floating state for animation |
---|
14138 | | - MODIFIERS = modifiers; |
---|
14139 | | - modifiers &= ~1024; |
---|
| 14175 | + MODIFIERS = modifiersex; |
---|
| 14176 | + modifiersex &= ~1024; |
---|
14140 | 14177 | if (false) // modifiers != 0) |
---|
14141 | 14178 | { |
---|
14142 | 14179 | //new Exception().printStackTrace(); |
---|
14143 | | - System.out.println("mouseDragged: " + modifiers); |
---|
| 14180 | + System.out.println("mouseDragged: " + modifiersex); |
---|
14144 | 14181 | System.out.println("SHIFT = " + SHIFT); |
---|
14145 | 14182 | System.out.println("CONTROL = " + COMMAND); |
---|
14146 | 14183 | System.out.println("META = " + META); |
---|
.. | .. |
---|
14160 | 14197 | info.camera = renderCamera; |
---|
14161 | 14198 | info.x = x; |
---|
14162 | 14199 | info.y = y; |
---|
14163 | | - object.editWindow.copy.doEditDrag(info); |
---|
| 14200 | + object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0); |
---|
14164 | 14201 | } else |
---|
14165 | 14202 | { |
---|
14166 | 14203 | if (x < startX) |
---|
.. | .. |
---|
14359 | 14396 | boolean control = ((modifiers & CTRL) != 0); // june 2013: for point selection |
---|
14360 | 14397 | boolean command = ((modifiers & COMMAND) != 0); // june 2013: for multiple selection |
---|
14361 | 14398 | |
---|
14362 | | - if (control || command || IsFrozen()) |
---|
| 14399 | +// No delay if (control || command || IsFrozen()) |
---|
14363 | 14400 | timeout = true; |
---|
14364 | | - else |
---|
| 14401 | +// ?? May 2019 else |
---|
14365 | 14402 | // timer.setDelay((modifiers & 128) != 0?0:350); |
---|
14366 | 14403 | mouseDown = false; |
---|
14367 | 14404 | if (!control && !command) // june 2013 |
---|
.. | .. |
---|
14471 | 14508 | System.out.println("keyReleased: " + e); |
---|
14472 | 14509 | } |
---|
14473 | 14510 | |
---|
14474 | | - void SetMouseMode(int modifiers) |
---|
| 14511 | + void SetMouseMode(int modifiers, int modifiersex) |
---|
14475 | 14512 | { |
---|
14476 | 14513 | //System.out.println("SetMouseMode = " + modifiers); |
---|
14477 | 14514 | //modifiers &= ~1024; |
---|
.. | .. |
---|
14483 | 14520 | //if (modifiers == 0) // || (modifiers == (1024 | CONTROL))) |
---|
14484 | 14521 | // return; |
---|
14485 | 14522 | //System.out.println("SetMode = " + modifiers); |
---|
14486 | | - if ((modifiers & WHEEL) == WHEEL) |
---|
| 14523 | + if ((modifiersex & WHEEL) == WHEEL) |
---|
14487 | 14524 | { |
---|
14488 | 14525 | mouseMode |= ZOOM; |
---|
14489 | 14526 | } |
---|
.. | .. |
---|
14493 | 14530 | { |
---|
14494 | 14531 | mouseMode |= VR; // BACKFORTH; |
---|
14495 | 14532 | } |
---|
14496 | | - if ((modifiers & CTRLCLICK) == CTRLCLICK) |
---|
| 14533 | + if ((modifiersex & CTRLCLICK) == CTRLCLICK) |
---|
14497 | 14534 | { |
---|
14498 | 14535 | mouseMode |= SELECT; |
---|
14499 | 14536 | } |
---|
14500 | | - if ((modifiers & COMMAND) == COMMAND) |
---|
| 14537 | + if ((modifiersex & COMMAND) == COMMAND) |
---|
14501 | 14538 | { |
---|
14502 | 14539 | mouseMode |= SELECT; |
---|
14503 | 14540 | } |
---|
14504 | | - if ((modifiers & SHIFT) == SHIFT || forcetranslate) |
---|
| 14541 | + if ((modifiersex & SHIFT) == SHIFT || forcetranslate || (modifiers & MouseEvent.BUTTON3_MASK) != 0) |
---|
14505 | 14542 | { |
---|
14506 | 14543 | mouseMode &= ~VR; |
---|
14507 | 14544 | mouseMode |= TRANSLATE; |
---|
.. | .. |
---|
14530 | 14567 | |
---|
14531 | 14568 | if (isRenderer) // |
---|
14532 | 14569 | { |
---|
14533 | | - SetMouseMode(modifiers); |
---|
| 14570 | + SetMouseMode(0, modifiers); |
---|
14534 | 14571 | } |
---|
14535 | 14572 | |
---|
14536 | 14573 | Globals.theRenderer.keyPressed(key); |
---|
.. | .. |
---|
14866 | 14903 | //RESIZETEXTURE ^= true; |
---|
14867 | 14904 | //break; |
---|
14868 | 14905 | case 'z': |
---|
14869 | | - RENDERSHADOW ^= true; |
---|
| 14906 | + Globals.RENDERSHADOW ^= true; |
---|
14870 | 14907 | Globals.lighttouched = true; |
---|
14871 | 14908 | repaint(); |
---|
14872 | 14909 | break; |
---|
.. | .. |
---|
14990 | 15027 | //mode = ROTATE; |
---|
14991 | 15028 | if ((MODIFIERS & COMMAND) == 0) // VR?? |
---|
14992 | 15029 | { |
---|
14993 | | - SetMouseMode(modifiers); |
---|
| 15030 | + SetMouseMode(0, modifiers); |
---|
14994 | 15031 | } |
---|
14995 | 15032 | } |
---|
14996 | 15033 | |
---|
.. | .. |
---|
15563 | 15600 | public boolean mouseDown(Event evt, int x, int y) |
---|
15564 | 15601 | { |
---|
15565 | 15602 | System.out.println("mouseDown: " + evt); |
---|
| 15603 | + System.exit(0); |
---|
15566 | 15604 | /* |
---|
15567 | 15605 | locked = true; |
---|
15568 | 15606 | drag = false; |
---|
.. | .. |
---|
15606 | 15644 | { |
---|
15607 | 15645 | keyPressed(0, modifiers); |
---|
15608 | 15646 | } |
---|
15609 | | - clickStart(x, y, modifiers); |
---|
| 15647 | + // clickStart(x, y, modifiers); |
---|
15610 | 15648 | return true; |
---|
15611 | 15649 | } |
---|
15612 | 15650 | |
---|
.. | .. |
---|
15724 | 15762 | { |
---|
15725 | 15763 | keyReleased(0, 0); |
---|
15726 | 15764 | } |
---|
15727 | | - drag(x, y, modifiers); |
---|
| 15765 | + drag(x, y, 0, modifiers); |
---|
15728 | 15766 | return true; |
---|
15729 | 15767 | } |
---|
15730 | 15768 | |
---|
.. | .. |
---|
16422 | 16460 | System.out.println("; fromto " + sel + " " + Trunk(previousselectedpoint.toParent[3][0]) + " " + Trunk(previousselectedpoint.toParent[3][2]) + " " + Trunk(selectedpoint.toParent[3][0]) + " " + Trunk(selectedpoint.toParent[3][2])); |
---|
16423 | 16461 | } |
---|
16424 | 16462 | |
---|
16425 | | - previousselectedpoint = (Sphere) GrafreeD.clone(selectedpoint); |
---|
| 16463 | + previousselectedpoint = (Sphere) Grafreed.clone(selectedpoint); |
---|
16426 | 16464 | } |
---|
16427 | 16465 | } |
---|
16428 | 16466 | |
---|
16429 | 16467 | if (!movingcamera && !PAINTMODE) |
---|
16430 | 16468 | object.editWindow.ScreenFitPoint(); // fev 2014 |
---|
16431 | 16469 | |
---|
16432 | | - if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
| 16470 | + if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
16433 | 16471 | { |
---|
16434 | | - Object3D paintobj = GrafreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); |
---|
| 16472 | + Object3D paintobj = Grafreed.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); |
---|
16435 | 16473 | |
---|
16436 | 16474 | Object3D group = new Object3D("inst" + paintcount++); |
---|
16437 | 16475 | |
---|
.. | .. |
---|
16587 | 16625 | gl.glDisable(gl.GL_CULL_FACE); |
---|
16588 | 16626 | } |
---|
16589 | 16627 | |
---|
16590 | | - if (!RENDERSHADOW) |
---|
| 16628 | + if (!Globals.RENDERSHADOW) |
---|
16591 | 16629 | gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); |
---|
16592 | 16630 | |
---|
16593 | 16631 | // SB gl.glPolygonOffset(2.5f, 10); |
---|
.. | .. |
---|
16597 | 16635 | //gl.glColorMask(false, false, false, false); |
---|
16598 | 16636 | |
---|
16599 | 16637 | //render_scene_from_light_view(gl, drawable, 0, 0); |
---|
16600 | | - if (RENDERSHADOW && Globals.lighttouched && !movingcamera) // && !parent.IsFreezed()) |
---|
| 16638 | + if (Globals.RENDERSHADOW && Globals.lighttouched && (!movingcamera || !Globals.FREEZEONMOVE)) // && !parent.IsFreezed()) |
---|
16601 | 16639 | { |
---|
16602 | 16640 | gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); |
---|
16603 | 16641 | |
---|