fresh build with swt support (win32 only)

Started by Matzon, May 14, 2004, 18:30:01

Previous topic - Next topic

Matzon

Here ya go, fresh "official" builds, though not an official release!
Both zip files include swt support, but the -swt archive includes needed swt binaries. (win32 only)
http://matzon.dk/brian/lwjgl/builds/lwjgl-2004-05-14.zip
http://matzon.dk/brian/lwjgl/builds/lwjgl-2004-05-14-swt.zip

To run an ordinary test:
java -cp lwjgl.jar;lwjgl_test.jar;lwjgl_util.jar org.lwjgl.test.input.MouseTest

To run SWTTest or SWTTest2:
java -cp lwjgl.jar;lwjgl_test.jar;lwjgl_util.jar;swt.jar org.lwjgl.test.SWTTest

EvilOne

If you got a shiny new hammer, every problem looks like a nail!

rgrzywinski

It appears that no one has tried using LWJGL + SWT with the LWJGL Keyboard or Mouse.

LWJGL's Keyboard.create() and Mouse.create() both call Window.isCreated() and throw (since Window's context is not set).

To prevent the nasties between Window and SWTCanvas and all of that, I'd recommend setting Winddow's context from SWTCanvas.  Making Window's constructor and context member default (package local) protected then SWTCanvas can:

   Window.canvas = new Window();

in its constructor.

Let me know if I'm off my rocker.

rgrzywinski

"hwnd" (on the win32 side) will have to automagically be set too as Keyboard and Mouse's native innards need it.

Ahhh, implicit contracts.  Gotta love 'em!

fbi

Sorry but the fact that nobody used LWJGL mouse and keyboard with SWT is probably because SWT uses keyboard and mouse in its own way  :)
When I designed the Canvas I put as a precondition (and I clearly stated that) that, in that situation, one HAS to use SWT events (that is the reason why you complain about the problem) and LWJGL is used for the GL/AL stuff.
Why do you want to use a SWT Canvas without SWT events?  :?:

infomaster

When can we expect a SWT binding for LWJGL with Linux/GTK?

rgrzywinski

The type comment on SWT canvas reads:

/**
* @author Fbi
*
*/

Where does it say in there that SWT events are only to be used?  Let's check the constructor:



Maybe you used white characters?   :D

As for why I would want to use a Direct X style mouse should be pretty obvious:  a "full range" mouse.  If I'm creating a design tool ala MAX then I need to allow the users the ability to continue to move the mouse in a partiular direction outside of the window's bounds.  Hell, even if I'm making a windowed game I want the ability to grab the mouse so the user doesn't accidentially click on other windows (how many times have we all done that in a Shockwave plugin?).

You and Cas must be related since you're both always asking "why would I want to do that".  Cas sez "why do you want windowed OGL".  You ask "why, now that you have windowed OGL, would you want all of the other stuff".  Ever so tedious.

Well, it looks like I'm back to where I was before and I'm going to have to do this myself.

fbi

Dear rgrzywinski, I don't use white characters to comment anything but I used to discuss with Cas and the other folks around before coding (that's incredible...but there's still people who acts this way)  :wink:
Anyway nobody asked for what you currently need, so I was wondering about your reasons not because I thought you were wrong or something like that.
And no, I ain'related with Cas but you should calm a bit.
P.S.=That's not so bad adding something to LWJGL, all in al there was no support for SWT before I implemented it: I needed it and I did it.
All that simple  :wink:

cfmdobbie

Are any Win32 builds "fresher" than this one available?  Mid May seems so long ago... :wink:
ellomynameis Charlie Dobbie.

fbi

Well...I suppose that you should use CVS for that.
Anyway I currently have desperately no time...especially for porting the binding to Linux  :(
I needed a bit of help because I'm not a very good X progammer but nobody appeared...