AWTGLCanvas deprecated? Multiple displays?

Started by Maykin53, May 10, 2011, 01:19:51

Previous topic - Next topic

Maykin53

Hello, I've been looking for multi-display support for LWJGL and came across discussions about the AWTGLCanvas class, which is apparently deprecated, but also the only way to enable multi-display support for embedding inside a swing/awt container. Those posts were quite old so I'm wondering is AWTGLCanvas still the only way to make this possible and what are the disadvantages of using AWTGLCanvas over Display.setParent()?

Many thanks.

pjohnsen

I've been using AWTGLCanvas just fine for my applet based project.

The main advantage of this for me was that I could just use AWT for mouse/keyboard input as this model fits good with my app. (which isn't a game) and I then don't need to include the jinput stuff when downloading the applet.

I haven't used any multiple displays though.

CodeBunny

From what I know, the only advantage of using AWTGLCanvas is that you can have multiple LWJGL views in the same app. It's supposed to be slightly slower, and you're always recommended to use Display.setParent() if you only need a single view, since it's easier and faster. Still, it is fast enough and allows for more options with a GUI.

Maykin53

Thanks for the responses, it's good to know it's only slightly slower. I guess my next question is why is it deprecated if it works and is the only way to achieve having multiple independent canvases in a Swing/AWT application (ie, applet)? Is there something wrong with it that we do not know about? =)

CodeBunny

I do not believe it is. I'm looking at the LWJGL API right now (http://lwjgl.org/javadoc/) and I don't see any indication of it being marked as obsolete.

I do remember seeing a post on this forum where some people were saying AWTGLCanvas should be deprecated, but someone pointed out that it was the only way to get multiple displays, and they backed off.

Maykin53