Hello Guest

LWJGL 2.2.1 Released

  • 29 Replies
  • 61915 Views
*

Offline Matzon

  • *****
  • 2242
LWJGL 2.2.1 Released
« on: November 15, 2009, 21:04:36 »
This is just a small bugfix release, however it includes 2.2 which never got announced (busy as hell, scrambled to build it before moving!)

2.2.1
  • FIX: Mouse Grab should now work on Windows when using Display.setParent()

2.2.0
  • Support for OpenGL 3.1 and 3.2
  • Support for the following extensions: NV_shader_buffer_load, NV_vertex_buffer_unified_memory, GREMEDY_string_marker, AMD_draw_buffers_blend, ARB_depth_clamp, ARB_draw_buffers_blend, ARB_draw_elements_base_vertex, ARB_fragment_coord_conventions, ARB_provoking_vertex, ARB_sample_shading, ARB_seamless_cube_map, ARB_shader_texture_lod, ARB_texture_cube_map_array, ARB_texture_gather, ARB_texture_multisample, ARB_texture_query_lod, ARB_vertex_array_bgra, EXT_separate_shader_objects, EXT_texture_snorm, NV_copy_image, NV_parameter_buffer_object2, NV_texture_barrier
  • Support for GLU tessellation (using JOGLs implementation - possibly missing license file - will update for next release license in repo)
  • Added support for PIXEL_STORE state tracking.
  • Changed PBO GLChecks to use LWJGL's state tracking instead of using glGetInteger.
  • Support for alpha blended icons on win32
  • Misc improvements to applet downloader to handle download errors
  • Added Mouse.isInsideWindow()
  • Support for tracking mouse outside window on drag
  • Support for negative mouse coords (if dragging outside), must set property: org.lwjgl.input.Mouse.allowNegativeMouseCoords
  • Latest jinput
  • Fix for ALC11 functions not working
  • Fixes for 64bit windows (should work better now)

https://sourceforge.net/projects/java-game-lib/files/Official%20Releases/LWJGL%202.2.1/

Remember to donate ;)
« Last Edit: February 21, 2010, 20:43:06 by Matzon »

Re: LWJGL 2.2.1 Released
« Reply #1 on: November 15, 2009, 21:37:38 »
got to try tesselation, thx a lot for this release ! ;D
One tiny notice : openal.dylib -> rename to libopenal.dylib .

EDIT : GLUtesselator is great !! Thx
« Last Edit: November 16, 2009, 00:15:07 by broumbroum »

*

Offline NateS

  • **
  • 91
    • Esoteric Software
Re: LWJGL 2.2.1 Released
« Reply #2 on: November 15, 2009, 22:47:18 »
How does tracking the mouse outside window on drag work? I have a Swing app that has a panel that renders using LWJGL. Mouse interaction has always been awkward because mouse movements aren't captured outside of the LWJGL window. I tried setting the System property, dragging, and not dragging but I didn't see a difference from the old behavior.

*

Offline kappa

  • *****
  • 1319
Re: LWJGL 2.2.1 Released
« Reply #3 on: November 15, 2009, 22:51:25 »
How does tracking the mouse outside window on drag work? I have a Swing app that has a panel that renders using LWJGL. Mouse interaction has always been awkward because mouse movements aren't captured outside of the LWJGL window. I tried setting the System property, dragging, and not dragging but I didn't see a difference from the old behavior.

Which OS are you on?

*

Offline NateS

  • **
  • 91
    • Esoteric Software
Re: LWJGL 2.2.1 Released
« Reply #4 on: November 15, 2009, 23:01:09 »
Which OS are you on?
Windows 7.

After suffering all this time I just came up with a solution! This is working:
Code: [Select]
Point mouseLocation = MouseInfo.getPointerInfo().getLocation();
SwingUtilities.convertPointFromScreen(mouseLocation, canvasContainer);
I just do the delta myself.

Doesn't handle the mouse going up outside the app though. :( I need the mouse up if the user mouses down then drags out of the LWJGL window and mouses up. Swing does this. I'd be content with a workaround that uses Swing.
« Last Edit: November 16, 2009, 00:01:19 by NateS »

*

Offline Matzon

  • *****
  • 2242
Re: LWJGL 2.2.1 Released
« Reply #5 on: November 16, 2009, 06:58:54 »
How does tracking the mouse outside window on drag work? I have a Swing app that has a panel that renders using LWJGL. Mouse interaction has always been awkward because mouse movements aren't captured outside of the LWJGL window. I tried setting the System property, dragging, and not dragging but I didn't see a difference from the old behavior.
run java -cp bin -Djava.library.path=libs\windows -Dorg.lwjgl.input.Mouse.allowNegativeMouseCoords=true org.lwjgl.test.input.MouseTest
push space to loose mouse grab.

check the title: inside : [true|false] depending on position of cursor
if you click inside the window and then drag outside while holding the button down, then the coords continue to change outside the window and inside keeps being true until you life the button.
Tested on Windows XP

Re: LWJGL 2.2.1 Released
« Reply #6 on: November 16, 2009, 11:43:30 »
Hi, this is cool my demo now works without asking any kind of confirmation dialogue at all!
This is one step closer to flash like user experience!
http://www.hot.ee/testgame/appletloader.html

edit: at least i dont have to sign it with my own cert so it only has lwjgl confirmation.
« Last Edit: November 16, 2009, 14:01:34 by indexunknown »

*

Offline kappa

  • *****
  • 1319
Re: LWJGL 2.2.1 Released
« Reply #7 on: November 16, 2009, 13:50:33 »
now works without asking any kind of confirmation dialogue at all!

 :o that should not happen.

Just tried it and there is a confirmation dialog, you probably accepted dialog box with check box ticked (ticked by default).

*

Offline Matzon

  • *****
  • 2242
Re: LWJGL 2.2.1 Released
« Reply #8 on: November 16, 2009, 15:04:16 »
if he has approve the LWJGL cert - then all LWJGL games will run without confirmation.
Specifically, since he is not using any native code or anything that requires advanced permissions (like deliting data) then thats all fine and dandy.

*

Offline Matzon

  • *****
  • 2242
Re: LWJGL 2.2.1 Released
« Reply #9 on: November 16, 2009, 15:05:08 »
and capture mouse seems to work a treat in that test

Re: LWJGL 2.2.1 Released
« Reply #10 on: November 16, 2009, 18:14:02 »
Quote
Support for negative mouse coords (if dragging outside), must set property: org.lwjgl.input.Mouse.allowNegativeMouseCoords


Awww, but if I do that in an applet I need to resign all of the files :(

*

Offline Matzon

  • *****
  • 2242
Re: LWJGL 2.2.1 Released
« Reply #11 on: November 16, 2009, 19:48:17 »
Quote
Support for negative mouse coords (if dragging outside), must set property: org.lwjgl.input.Mouse.allowNegativeMouseCoords


Awww, but if I do that in an applet I need to resign all of the files :(
yeah we discussed that - but if we fixed that with a public method we might as well add the other properties, and there wasn't time for that for this release.

*

emzic

Re: LWJGL 2.2.1 Released
« Reply #12 on: November 18, 2009, 10:51:47 »
hi, sorry if this doesnt fit in this thread. but is it now possible to use a classic awt MouseMotionListener to get the mouseevents?

at the moment when i try it with 2.2.1 and add a mousemotionlistener to my AWTGLCanvas i dont get any events. but maybe im doing something wrong?

Re: LWJGL 2.2.1 Released
« Reply #13 on: November 18, 2009, 14:01:48 »
I'm using a mouse input adapter. To get all drag working, check that you must register a MouseListener and a MouseMotionListener (which are implemented by a mouseInputAdapter class). e.g. I make a rectangular selection and i can drag my picture shown in the AWTGLCanvas like that :
Code: [Select]
currentCropper = new MouseInputAdapter() {
            long hash = System.nanoTime();
            public int hashCode() {
                return (int) hash;
            }
            public boolean equals(Object o) {
                return o == null ? false : o.hashCode() == hashCode();
            }

            Point drag = null;
            @Override
            public void mouseMoved(MouseEvent e) {
                super.mouseMoved(e);
                if (JXAenvUtils.env.OS_MAC.isEnv() ? e.isMetaDown() : e.isControlDown()) {
                    e.getComponent().setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                } else {
                    e.getComponent().setCursor(Cursor.getDefaultCursor());
                }
            }

            @Override
            public void mousePressed(MouseEvent e) {
                super.mousePressed(e);
                String current = photoKey;
                if (JXAenvUtils.env.OS_MAC.isEnv() ? !e.isMetaDown() : !e.isControlDown()) {
                    imageCollectionInfo.get(current).put(INFO_CROPRECT, new Rectangle());
                    e.getComponent().setCursor(Cursor.getDefaultCursor());
                } else {
                    e.getComponent().setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                }
                drag = e.getPoint();
                drag.setLocation(
                        Math.min(cphotoBounds.getMaxX(), Math.max(cphotoBounds.getMinX(), drag.x)),
                        Math.min(cphotoBounds.getMaxY(), Math.max(cphotoBounds.getMinY(), drag.y)));
                drag.x -= cphotoBounds.x;
                drag.y -= cphotoBounds.y;
            }
            @Override
            public void mouseDragged(MouseEvent e) {
                super.mouseDragged(e);
                boolean cropping = JXAenvUtils.env.OS_MAC.isEnv() ? !e.isMetaDown() : !e.isControlDown();
                String current = photoKey;
                Rectangle r = imageCollectionInfo.get(current).containsKey(INFO_CROPRECT) ? (Rectangle) imageCollectionInfo.get(current).get(INFO_CROPRECT) : null;
                Point edrag = e.getPoint();
                if (cropping) {
                    edrag.setLocation(
                            Math.min(cphotoBounds.getMaxX(), Math.max(cphotoBounds.getMinX(), edrag.x)),
                            Math.min(cphotoBounds.getMaxY(), Math.max(cphotoBounds.getMinY(), edrag.y)));
                }
               edrag.x -= cphotoBounds.x;
                edrag.y -= cphotoBounds.y;
                if (cropping) {
                    if (r instanceof Rectangle) {
                        r.setFrameFromDiagonal(drag, edrag);
                    }
                } else {
                    moveDrag.setLocation(moveDrag.x + (edrag.x - drag.x), moveDrag.y + (edrag.y - drag.y));
                }
            }
            @Override
            public void mouseReleased(MouseEvent e) {
                super.mouseReleased(e);
                e.getComponent().setCursor(Cursor.getDefaultCursor());
            }

           @Override
            public void mouseClicked(MouseEvent e) {
                super.mouseClicked(e);
                imageCollectionInfo.get(photoKey).remove(INFO_CROPRECT);
            }
        };
        canvas.addMouseListener(currentCropper);
        canvas.addMouseMotionListener(currentCrop);
this is a sample of code from IMCBrowser which you can download a demo version at my project page below (or compile the sources with imcbrowser-2.1, jigaxtended-4.1.1 and jxakernel-1.0.8 available in the next hour...). :)
« Last Edit: November 18, 2009, 14:09:39 by broumbroum »

*

emzic

Re: LWJGL 2.2.1 Released
« Reply #14 on: November 18, 2009, 20:46:03 »
thanks!

i am doing actually pretty much the same thing, but i dont get any events.
as for the display part, here is how i do that:
Code: [Select]
Display.setParent( awtglcanvas );
Display.create() ;