LWJGL
May 22, 2013, 16:22:00
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
LWJGL is now using GitHub
Home
Help
Search
Login
Register
LWJGL
>
Programming
>
Lightweight Java Library Game Development
>
Mouse and Keyboard input for AWTGLCanvas
Pages: [
1
]
« previous
next »
Print
Author
Topic: Mouse and Keyboard input for AWTGLCanvas (Read 1084 times)
CodeBunny
Nerdus Imperius
Posts: 561
Mouse and Keyboard input for AWTGLCanvas
«
on:
March 29, 2011, 09:51:45 »
How should I handle Mouse and Keyboard input when I've got an AWTGLCanvas running inside of a JFrame along with other components?
I get this error:
Code:
Mouse must be created before you can read events
at org.lwjgl.input.Mouse.next(Mouse.java:423)
Logged
kappa
Administrator
Nerdus Imperius
Posts: 1112
Re: Mouse and Keyboard input for AWTGLCanvas
«
Reply #1 on:
March 29, 2011, 10:09:28 »
don't think you can use LWJGL Mouse and Keyboard classes when using an AWTGLCanvas as they require lwjgl's native window to function (and in this case it doesn't exist). Instead you will have to use AWT's input classes.
If however you use want to embed with AWT and still use LWJGL Mouse and Keyboard classes you will have to use the Display.setParent(Canvas) method.
Logged
CodeBunny
Nerdus Imperius
Posts: 561
Re: Mouse and Keyboard input for AWTGLCanvas
«
Reply #2 on:
March 29, 2011, 10:18:56 »
Ah, I see. Yeah, I can't use Display.setParent(); I've got multiple AWTGLCanvases at once.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Programming
-----------------------------
=> Lightweight Java Library Game Development
=> LWJGL Documentation
=> Bug Reports / RFE
=> OpenGL
=> OpenAL
=> General Java Game Development
-----------------------------
Archive
-----------------------------
=> Resolved Bugs/RFE
=> DirectX
=> DevIL
=> FMOD
Loading...