Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] rendering to multiple panels

Started by dbrayford Mar 30, 2009 at 2:22 PM 0 replies 550+ views
Original Post
dbrayford
dbrayford
I've written some code that draws an OpenGL object to a jsplitpane which works really well. However, if I try and draw the object to the different panels, all the data is drawn to the same panel. It would appear the the data is associated to the same environment or canvas/panel. I've written a function on the C side and the jobject panel is the same for all instances. I assume that the jobject is the canvas, panel, drawing surface, which would explain why all the data is being drawn to the same Java panel. If it is possible I would like to pass the correct panel as a jobject through the JNI interface. Thanks David
CaptainJester
CaptainJester
Why are you writing your own JNI layer? JOGL provides OpenGL access with multiple contexts.
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.