.. | .. |
---|
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 | |
---|
.. | .. |
---|
8075 | 8075 | { |
---|
8076 | 8076 | String texname = tex; |
---|
8077 | 8077 | |
---|
8078 | | - String[] split = tex.split("Textures"); |
---|
8079 | | - if (split.length > 1) |
---|
8080 | | - texname = "/Users/nbriere/Textures" + split[split.length-1]; |
---|
8081 | | - else |
---|
8082 | | - if (!texname.startsWith("/")) |
---|
8083 | | - texname = "/Users/nbriere/Textures/" + texname; |
---|
| 8078 | +// String[] split = tex.split("Textures"); |
---|
| 8079 | +// if (split.length > 1) |
---|
| 8080 | +// texname = "/Users/nbriere/Textures" + split[split.length-1]; |
---|
| 8081 | +// else |
---|
| 8082 | +// if (!texname.startsWith("/")) |
---|
| 8083 | +// texname = "/Users/nbriere/Textures/" + texname; |
---|
| 8084 | + if (!new File(tex).exists()) |
---|
| 8085 | + { |
---|
| 8086 | + texname = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory() + "/Textures/" + texname; |
---|
| 8087 | + } |
---|
8084 | 8088 | |
---|
8085 | 8089 | if (CACHETEXTURE) |
---|
8086 | 8090 | texture = textures.get(texname); // TEXTURE CACHE |
---|
.. | .. |
---|
8180 | 8184 | texturedata = GetFileTexture(cachename, processbump, resolution); |
---|
8181 | 8185 | |
---|
8182 | 8186 | |
---|
8183 | | - if (texturedata != null) |
---|
| 8187 | + if (texturedata == null) |
---|
| 8188 | + throw new Exception(); |
---|
| 8189 | + |
---|
8184 | 8190 | texture = new CacheTexture(com.sun.opengl.util.texture.TextureIO.newTexture(texturedata),resolution); |
---|
8185 | 8191 | //texture = GetTexture(tex, bump); |
---|
8186 | 8192 | } |
---|
.. | .. |
---|
8302 | 8308 | return texture; |
---|
8303 | 8309 | } |
---|
8304 | 8310 | |
---|
8305 | | - 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 |
---|
8306 | 8312 | { |
---|
8307 | 8313 | CacheTexture texture = GetCacheTexture(tex, bump, resolution); |
---|
8308 | 8314 | |
---|
.. | .. |
---|
8320 | 8326 | return texture!=null?texture.texture:null; |
---|
8321 | 8327 | } |
---|
8322 | 8328 | |
---|
8323 | | - 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 |
---|
8324 | 8330 | { |
---|
8325 | 8331 | CacheTexture texture = GetCacheTexture(tex, bump, resolution); |
---|
8326 | 8332 | |
---|
8327 | 8333 | return texture!=null?texture.texturedata:null; |
---|
8328 | 8334 | } |
---|
8329 | 8335 | |
---|
8330 | | - boolean BindTexture(String tex, boolean bump, int resolution) |
---|
| 8336 | + boolean BindTexture(String tex, boolean bump, int resolution) throws Exception |
---|
8331 | 8337 | { |
---|
8332 | 8338 | if (/*tex == null ||*/ ambientOcclusion ) // || !textureon) |
---|
8333 | 8339 | { |
---|
.. | .. |
---|
9538 | 9544 | |
---|
9539 | 9545 | if (!BOXMODE) |
---|
9540 | 9546 | { |
---|
9541 | | - 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) + ")"); |
---|
9542 | 9548 | } |
---|
9543 | 9549 | |
---|
9544 | 9550 | if (!BOXMODE) |
---|
.. | .. |
---|
9576 | 9582 | ABORTED = false; |
---|
9577 | 9583 | } |
---|
9578 | 9584 | else |
---|
9579 | | - GrafreeD.wav.cursor += 735 * ACSIZE; |
---|
| 9585 | + Grafreed.wav.cursor += 735 * ACSIZE; |
---|
9580 | 9586 | |
---|
9581 | 9587 | if (false) |
---|
9582 | 9588 | { |
---|
.. | .. |
---|
10239 | 10245 | |
---|
10240 | 10246 | public void display(GLAutoDrawable drawable) |
---|
10241 | 10247 | { |
---|
10242 | | - if (GrafreeD.savesound && GrafreeD.hassound) |
---|
| 10248 | + if (Grafreed.savesound && Grafreed.hassound) |
---|
10243 | 10249 | { |
---|
10244 | | - GrafreeD.wav.save(); |
---|
10245 | | - GrafreeD.savesound = false; |
---|
10246 | | - GrafreeD.hassound = false; |
---|
| 10250 | + Grafreed.wav.save(); |
---|
| 10251 | + Grafreed.savesound = false; |
---|
| 10252 | + Grafreed.hassound = false; |
---|
10247 | 10253 | } |
---|
10248 | 10254 | // if (DEBUG_SELECTION) |
---|
10249 | 10255 | // { |
---|
.. | .. |
---|
10373 | 10379 | Object3D theobject = object; |
---|
10374 | 10380 | Object3D theparent = object.parent; |
---|
10375 | 10381 | object.parent = null; |
---|
10376 | | - object = (Object3D)GrafreeD.clone(object); |
---|
| 10382 | + object = (Object3D)Grafreed.clone(object); |
---|
10377 | 10383 | object.Stripify(); |
---|
10378 | 10384 | if (theobject.selection == null || theobject.selection.Size() == 0) |
---|
10379 | 10385 | theobject.PreprocessOcclusion(this); |
---|
.. | .. |
---|
10794 | 10800 | // Bump noise |
---|
10795 | 10801 | gl.glActiveTexture(GL.GL_TEXTURE6); |
---|
10796 | 10802 | //gl.glBindTexture(GL.GL_TEXTURE_2D, bump_noise); |
---|
10797 | | - 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 | + |
---|
10798 | 10813 | |
---|
10799 | 10814 | gl.glActiveTexture(GL.GL_TEXTURE0); |
---|
10800 | 10815 | gl.glEnable(GL.GL_TEXTURE_2D); |
---|
.. | .. |
---|
11279 | 11294 | e.printStackTrace(); |
---|
11280 | 11295 | } |
---|
11281 | 11296 | |
---|
11282 | | - if (GrafreeD.RENDERME > 0) |
---|
11283 | | - GrafreeD.RENDERME--; // mechante magouille |
---|
| 11297 | + if (Grafreed.RENDERME > 0) |
---|
| 11298 | + Grafreed.RENDERME--; // mechante magouille |
---|
11284 | 11299 | |
---|
11285 | 11300 | Globals.ONESTEP = false; |
---|
11286 | 11301 | } |
---|
.. | .. |
---|
11350 | 11365 | |
---|
11351 | 11366 | usedtextures.clear(); |
---|
11352 | 11367 | |
---|
11353 | | - 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 | + } |
---|
11354 | 11376 | } |
---|
11355 | 11377 | //System.out.println("--> " + stackdepth); |
---|
11356 | 11378 | // GrafreeD.traceon(); |
---|
.. | .. |
---|
11441 | 11463 | if (checker != null && DrawMode() == DEFAULT) |
---|
11442 | 11464 | { |
---|
11443 | 11465 | //BindTexture(IMMORTAL_TEXTURE); |
---|
11444 | | - 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 | + } |
---|
11445 | 11474 | // NEAREST |
---|
11446 | 11475 | GetGL().glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); // GL.GL_LINEAR); |
---|
11447 | 11476 | DrawChecker(gl); |
---|
.. | .. |
---|
12754 | 12783 | "MUL final.y, fragment.texcoord[0].x, c256;" + |
---|
12755 | 12784 | "FLR final.x, final.y;" + |
---|
12756 | 12785 | "SUB final.y, final.y, final.x;" + |
---|
12757 | | - //"MUL final.x, final.x, c256i;" + |
---|
| 12786 | + "MUL final.x, final.x, c256i;" + |
---|
12758 | 12787 | "MOV final.z, zero.x;" + |
---|
12759 | 12788 | "MOV final.a, one.w;":"" |
---|
12760 | 12789 | ) + |
---|
.. | .. |
---|
12762 | 12791 | "MUL final.y, fragment.texcoord[0].y, c256;" + |
---|
12763 | 12792 | "FLR final.x, final.y;" + |
---|
12764 | 12793 | "SUB final.y, final.y, final.x;" + |
---|
12765 | | - //"MUL final.x, final.x, c256i;" + |
---|
| 12794 | + "MUL final.x, final.x, c256i;" + |
---|
12766 | 12795 | "MOV final.z, zero.x;" + |
---|
12767 | 12796 | "MOV final.a, one.w;":"" |
---|
12768 | 12797 | ) + |
---|
.. | .. |
---|
13515 | 13544 | public void mousePressed(MouseEvent e) |
---|
13516 | 13545 | { |
---|
13517 | 13546 | //System.out.println("mousePressed: " + e); |
---|
13518 | | - clickStart(e.getX(), e.getY(), e.getModifiersEx()); |
---|
| 13547 | + clickStart(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx()); |
---|
13519 | 13548 | } |
---|
13520 | 13549 | |
---|
13521 | 13550 | static long prevtime = 0; |
---|
.. | .. |
---|
13591 | 13620 | // mode |= META; |
---|
13592 | 13621 | //} |
---|
13593 | 13622 | |
---|
13594 | | - SetMouseMode(WHEEL | e.getModifiersEx()); |
---|
13595 | | - drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0); |
---|
| 13623 | + SetMouseMode(e.getModifiers(), WHEEL | e.getModifiersEx()); |
---|
| 13624 | + drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0, 0); |
---|
13596 | 13625 | anchorX = ax; |
---|
13597 | 13626 | anchorY = ay; |
---|
13598 | 13627 | prevX = px; |
---|
.. | .. |
---|
13652 | 13681 | // wasliveok = true; |
---|
13653 | 13682 | // waslive = false; |
---|
13654 | 13683 | |
---|
| 13684 | + // May 2019 Forget it: |
---|
| 13685 | + if (true) |
---|
| 13686 | + return; |
---|
| 13687 | + |
---|
13655 | 13688 | // source == timer |
---|
13656 | 13689 | if (mouseDown) |
---|
13657 | 13690 | { |
---|
.. | .. |
---|
13690 | 13723 | |
---|
13691 | 13724 | javax.swing.Timer timer = new javax.swing.Timer(350, this); |
---|
13692 | 13725 | |
---|
13693 | | - void clickStart(int x, int y, int modifiers) |
---|
| 13726 | + void clickStart(int x, int y, int modifiers, int modifiersex) |
---|
13694 | 13727 | { |
---|
13695 | 13728 | if (!wasliveok) |
---|
13696 | 13729 | return; |
---|
.. | .. |
---|
13707 | 13740 | // touched = true; // main DL |
---|
13708 | 13741 | if (isRenderer) |
---|
13709 | 13742 | { |
---|
13710 | | - SetMouseMode(modifiers); |
---|
| 13743 | + SetMouseMode(modifiers, modifiersex); |
---|
13711 | 13744 | } |
---|
13712 | 13745 | |
---|
13713 | 13746 | selectX = anchorX = x; |
---|
.. | .. |
---|
13720 | 13753 | clicked = true; |
---|
13721 | 13754 | hold = false; |
---|
13722 | 13755 | |
---|
13723 | | - if (((modifiers & ~1024) & ~0) == 0) // Single or multiple selection |
---|
| 13756 | + if (((modifiersex & ~1024) & ~0) == 0) // Single or multiple selection |
---|
13724 | 13757 | // june 2013 means CTRL_CLICK: if (((modifiers & ~1024) & ~128) == 0) // Single or multiple selection |
---|
13725 | 13758 | { |
---|
13726 | 13759 | // System.out.println("RESTART II " + modifiers); |
---|
.. | .. |
---|
13751 | 13784 | info.camera = renderCamera; |
---|
13752 | 13785 | info.x = x; |
---|
13753 | 13786 | info.y = y; |
---|
13754 | | - info.modifiers = modifiers; |
---|
| 13787 | + info.modifiers = modifiersex; |
---|
13755 | 13788 | editObj = object.doEditClick(info, 0); |
---|
13756 | 13789 | if (!editObj) |
---|
13757 | 13790 | { |
---|
.. | .. |
---|
13780 | 13813 | clickEnd(e.getX(), e.getY(), e.getModifiersEx()); |
---|
13781 | 13814 | } |
---|
13782 | 13815 | else |
---|
13783 | | - drag(e.getX(), e.getY(), e.getModifiersEx()); |
---|
| 13816 | + drag(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx()); |
---|
13784 | 13817 | |
---|
13785 | 13818 | //try { Thread.sleep(1); } catch (Exception ex) {} |
---|
13786 | 13819 | } |
---|
.. | .. |
---|
14017 | 14050 | { |
---|
14018 | 14051 | Globals.lighttouched = true; |
---|
14019 | 14052 | } |
---|
14020 | | - drag(X, (mouseMode != 0) ? Y : anchorY, MODIFIERS); |
---|
| 14053 | + drag(X, (mouseMode != 0) ? Y : anchorY, 0, MODIFIERS); |
---|
14021 | 14054 | } |
---|
14022 | 14055 | //else |
---|
14023 | 14056 | } |
---|
.. | .. |
---|
14117 | 14150 | int X, Y; |
---|
14118 | 14151 | boolean SX, SY; |
---|
14119 | 14152 | |
---|
14120 | | - void drag(int x, int y, int modifiers) |
---|
| 14153 | + void drag(int x, int y, int modifiers, int modifiersex) |
---|
14121 | 14154 | { |
---|
14122 | 14155 | if (IsFrozen()) |
---|
14123 | 14156 | { |
---|
.. | .. |
---|
14126 | 14159 | |
---|
14127 | 14160 | drag = true; // NEW |
---|
14128 | 14161 | |
---|
14129 | | - boolean continuous = (modifiers & COMMAND) == COMMAND; |
---|
| 14162 | + boolean continuous = (modifiersex & COMMAND) == COMMAND; |
---|
14130 | 14163 | |
---|
14131 | 14164 | X = x; |
---|
14132 | 14165 | Y = y; |
---|
14133 | 14166 | // floating state for animation |
---|
14134 | | - MODIFIERS = modifiers; |
---|
14135 | | - modifiers &= ~1024; |
---|
| 14167 | + MODIFIERS = modifiersex; |
---|
| 14168 | + modifiersex &= ~1024; |
---|
14136 | 14169 | if (false) // modifiers != 0) |
---|
14137 | 14170 | { |
---|
14138 | 14171 | //new Exception().printStackTrace(); |
---|
14139 | | - System.out.println("mouseDragged: " + modifiers); |
---|
| 14172 | + System.out.println("mouseDragged: " + modifiersex); |
---|
14140 | 14173 | System.out.println("SHIFT = " + SHIFT); |
---|
14141 | 14174 | System.out.println("CONTROL = " + COMMAND); |
---|
14142 | 14175 | System.out.println("META = " + META); |
---|
.. | .. |
---|
14156 | 14189 | info.camera = renderCamera; |
---|
14157 | 14190 | info.x = x; |
---|
14158 | 14191 | info.y = y; |
---|
14159 | | - object.editWindow.copy.doEditDrag(info); |
---|
| 14192 | + object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0); |
---|
14160 | 14193 | } else |
---|
14161 | 14194 | { |
---|
14162 | 14195 | if (x < startX) |
---|
.. | .. |
---|
14355 | 14388 | boolean control = ((modifiers & CTRL) != 0); // june 2013: for point selection |
---|
14356 | 14389 | boolean command = ((modifiers & COMMAND) != 0); // june 2013: for multiple selection |
---|
14357 | 14390 | |
---|
14358 | | - if (control || command || IsFrozen()) |
---|
| 14391 | +// No delay if (control || command || IsFrozen()) |
---|
14359 | 14392 | timeout = true; |
---|
14360 | | - else |
---|
| 14393 | +// ?? May 2019 else |
---|
14361 | 14394 | // timer.setDelay((modifiers & 128) != 0?0:350); |
---|
14362 | 14395 | mouseDown = false; |
---|
14363 | 14396 | if (!control && !command) // june 2013 |
---|
.. | .. |
---|
14467 | 14500 | System.out.println("keyReleased: " + e); |
---|
14468 | 14501 | } |
---|
14469 | 14502 | |
---|
14470 | | - void SetMouseMode(int modifiers) |
---|
| 14503 | + void SetMouseMode(int modifiers, int modifiersex) |
---|
14471 | 14504 | { |
---|
14472 | 14505 | //System.out.println("SetMouseMode = " + modifiers); |
---|
14473 | 14506 | //modifiers &= ~1024; |
---|
.. | .. |
---|
14479 | 14512 | //if (modifiers == 0) // || (modifiers == (1024 | CONTROL))) |
---|
14480 | 14513 | // return; |
---|
14481 | 14514 | //System.out.println("SetMode = " + modifiers); |
---|
14482 | | - if ((modifiers & WHEEL) == WHEEL) |
---|
| 14515 | + if ((modifiersex & WHEEL) == WHEEL) |
---|
14483 | 14516 | { |
---|
14484 | 14517 | mouseMode |= ZOOM; |
---|
14485 | 14518 | } |
---|
14486 | 14519 | |
---|
14487 | 14520 | boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); |
---|
14488 | | - if (capsLocked || (modifiers & META) == META) |
---|
| 14521 | + if (capsLocked) // || (modifiers & META) == META) |
---|
14489 | 14522 | { |
---|
14490 | 14523 | mouseMode |= VR; // BACKFORTH; |
---|
14491 | 14524 | } |
---|
14492 | | - if ((modifiers & CTRLCLICK) == CTRLCLICK) |
---|
| 14525 | + if ((modifiersex & CTRLCLICK) == CTRLCLICK) |
---|
14493 | 14526 | { |
---|
14494 | 14527 | mouseMode |= SELECT; |
---|
14495 | 14528 | } |
---|
14496 | | - if ((modifiers & COMMAND) == COMMAND) |
---|
| 14529 | + if ((modifiersex & COMMAND) == COMMAND) |
---|
14497 | 14530 | { |
---|
14498 | 14531 | mouseMode |= SELECT; |
---|
14499 | 14532 | } |
---|
14500 | | - if ((modifiers & SHIFT) == SHIFT || forcetranslate) |
---|
| 14533 | + if ((modifiersex & SHIFT) == SHIFT || forcetranslate || (modifiers & MouseEvent.BUTTON3_MASK) != 0) |
---|
14501 | 14534 | { |
---|
14502 | 14535 | mouseMode &= ~VR; |
---|
14503 | 14536 | mouseMode |= TRANSLATE; |
---|
.. | .. |
---|
14526 | 14559 | |
---|
14527 | 14560 | if (isRenderer) // |
---|
14528 | 14561 | { |
---|
14529 | | - SetMouseMode(modifiers); |
---|
| 14562 | + SetMouseMode(0, modifiers); |
---|
14530 | 14563 | } |
---|
14531 | 14564 | |
---|
14532 | 14565 | Globals.theRenderer.keyPressed(key); |
---|
.. | .. |
---|
14862 | 14895 | //RESIZETEXTURE ^= true; |
---|
14863 | 14896 | //break; |
---|
14864 | 14897 | case 'z': |
---|
14865 | | - RENDERSHADOW ^= true; |
---|
| 14898 | + Globals.RENDERSHADOW ^= true; |
---|
14866 | 14899 | Globals.lighttouched = true; |
---|
14867 | 14900 | repaint(); |
---|
14868 | 14901 | break; |
---|
.. | .. |
---|
14986 | 15019 | //mode = ROTATE; |
---|
14987 | 15020 | if ((MODIFIERS & COMMAND) == 0) // VR?? |
---|
14988 | 15021 | { |
---|
14989 | | - SetMouseMode(modifiers); |
---|
| 15022 | + SetMouseMode(0, modifiers); |
---|
14990 | 15023 | } |
---|
14991 | 15024 | } |
---|
14992 | 15025 | |
---|
.. | .. |
---|
15122 | 15155 | { |
---|
15123 | 15156 | //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton()); |
---|
15124 | 15157 | //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0) |
---|
15125 | | - if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (mouseMode & SELECT) == 0) |
---|
| 15158 | + if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (e.getModifiers() & MouseEvent.BUTTON3_MASK) == 0 && (mouseMode & SELECT) == 0) |
---|
15126 | 15159 | { |
---|
15127 | 15160 | mouseMoved(e); |
---|
15128 | 15161 | } else |
---|
.. | .. |
---|
15559 | 15592 | public boolean mouseDown(Event evt, int x, int y) |
---|
15560 | 15593 | { |
---|
15561 | 15594 | System.out.println("mouseDown: " + evt); |
---|
| 15595 | + System.exit(0); |
---|
15562 | 15596 | /* |
---|
15563 | 15597 | locked = true; |
---|
15564 | 15598 | drag = false; |
---|
.. | .. |
---|
15602 | 15636 | { |
---|
15603 | 15637 | keyPressed(0, modifiers); |
---|
15604 | 15638 | } |
---|
15605 | | - clickStart(x, y, modifiers); |
---|
| 15639 | + // clickStart(x, y, modifiers); |
---|
15606 | 15640 | return true; |
---|
15607 | 15641 | } |
---|
15608 | 15642 | |
---|
.. | .. |
---|
15720 | 15754 | { |
---|
15721 | 15755 | keyReleased(0, 0); |
---|
15722 | 15756 | } |
---|
15723 | | - drag(x, y, modifiers); |
---|
| 15757 | + drag(x, y, 0, modifiers); |
---|
15724 | 15758 | return true; |
---|
15725 | 15759 | } |
---|
15726 | 15760 | |
---|
.. | .. |
---|
16418 | 16452 | 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])); |
---|
16419 | 16453 | } |
---|
16420 | 16454 | |
---|
16421 | | - previousselectedpoint = (Sphere) GrafreeD.clone(selectedpoint); |
---|
| 16455 | + previousselectedpoint = (Sphere) Grafreed.clone(selectedpoint); |
---|
16422 | 16456 | } |
---|
16423 | 16457 | } |
---|
16424 | 16458 | |
---|
16425 | 16459 | if (!movingcamera && !PAINTMODE) |
---|
16426 | 16460 | object.editWindow.ScreenFitPoint(); // fev 2014 |
---|
16427 | 16461 | |
---|
16428 | | - if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
| 16462 | + if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
16429 | 16463 | { |
---|
16430 | | - Object3D paintobj = GrafreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); |
---|
| 16464 | + Object3D paintobj = Grafreed.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); |
---|
16431 | 16465 | |
---|
16432 | 16466 | Object3D group = new Object3D("inst" + paintcount++); |
---|
16433 | 16467 | |
---|
.. | .. |
---|
16583 | 16617 | gl.glDisable(gl.GL_CULL_FACE); |
---|
16584 | 16618 | } |
---|
16585 | 16619 | |
---|
16586 | | - if (!RENDERSHADOW) |
---|
| 16620 | + if (!Globals.RENDERSHADOW) |
---|
16587 | 16621 | gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); |
---|
16588 | 16622 | |
---|
16589 | 16623 | // SB gl.glPolygonOffset(2.5f, 10); |
---|
.. | .. |
---|
16593 | 16627 | //gl.glColorMask(false, false, false, false); |
---|
16594 | 16628 | |
---|
16595 | 16629 | //render_scene_from_light_view(gl, drawable, 0, 0); |
---|
16596 | | - if (RENDERSHADOW && Globals.lighttouched && !movingcamera) // && !parent.IsFreezed()) |
---|
| 16630 | + if (Globals.RENDERSHADOW && Globals.lighttouched && (!movingcamera || !Globals.FREEZEONMOVE)) // && !parent.IsFreezed()) |
---|
16597 | 16631 | { |
---|
16598 | 16632 | gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); |
---|
16599 | 16633 | |
---|