Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Mixing Swing & OpenGL?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Mixing Swing & OpenGL? (Read 2297 times)
mifritscher
byte
Posts: 1
Mixing Swing & OpenGL?
«
on:
October 31, 2011, 09:52:03 am »
Hi,
can I mix Swing and OpenGL? I don't need only one big OpenGL Area, but a few small, e.g. (ASCII-art
)
G=OpenGL
S=Swing
SSSSSSSS
GGGSGGG
GGGSGGG
SSSSSSSS
SSSSSSSS
SSSSGGGG
SSSSGGGG
SSSSSSSS
Is something like this possible?
Logged
EgonOlsen
Administrator
quad
Posts: 12298
Re: Mixing Swing & OpenGL?
«
Reply #1 on:
October 31, 2011, 01:49:04 pm »
Short answer: Yes!
Long answer: Yes, but...
You can obtain an AWT canvas with the gl content from the FrameBuffer via this method:
http://www.jpct.net/doc/com/threed/jpct/FrameBuffer.html#enableGLCanvasRenderer()
If you want multiple gl outputs, you can create multiple FrameBuffer for this. However, they are all heavyweight AWT components, i.e. the usual restrictions when mixing light- and heavyweight components apply.
In addition, some gl drivers seem to have problems with this mix...
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Mixing Swing & OpenGL?