Login  Register

Re: How to set the offline World Map with data to the One of the Split pane .etc

Posted by gouessej on May 29, 2018; 9:12am
URL: https://forum.jogamp.org/How-to-set-the-offline-World-Map-with-data-to-the-One-of-the-Split-pane-etc-tp4038895p4038897.html

Hey

JOGL is very low level. I advise you to create an image (JPG, PNG, ...) and to use it to make a texture in order to show the world map in your panel if this panel uses JOGL (otherwise, it's a pure AWT/Swing problem, just call Graphics.drawImage()).

Do your both panels use JOGL? Do you use a GLCanvas or a GLJPanel? There are several ways of displaying a background color in OpenGL, you can simply change the clear color (it works with a single background color but not for a gradient) or you can disable the depth test and draw a quad that occupies the whole screen (it works with a single background color, a gradient and even an image). This example should work (and isn't very difficult to port to Java/JOGL):
https://www.opengl.org/discussion_boards/showthread.php/164345-Gradient-background?p=1161267&viewfull=1#post1161267

Have you ever used Worldwind? Its Java implementation uses JOGL under the hood, maybe it would help you not to reinvent the wheel.
Julien Gouesse | Personal blog | Website