WWJava Dev FAQ

From World Wind Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 20:49, 25 March 2008 (edit)
207.114.147.142 (Talk)
(How do I set the position of the globe directly?)
← Previous diff
Revision as of 16:19, 24 October 2011 (edit) (undo)
192.91.171.42 (Talk)
(Where do I report bugs or request new features? - Updated broken issue tracker link)
Next diff →
Line 64: Line 64:
===Where do I report bugs or request new features?=== ===Where do I report bugs or request new features?===
-You can ask questions on the [http://forum.worldwindcentral.com/forumdisplay.php?f=37 World Wind Java forums], or report specific issues using the [http://issues.worldwind.arc.nasa.gov/browse/WWJ NASA issue tracker].+You can ask questions on the [http://forum.worldwindcentral.com/forumdisplay.php?f=37 World Wind Java forums], or report specific issues using the [http://issues.worldwind.arc.nasa.gov/jira/browse/WWJ NASA issue tracker].
[[Category:WWJ Dev Documentation]] [[Category:WWJ Dev Documentation]]

Revision as of 16:19, 24 October 2011

Contents

General questions

See WWJava FAQ

Problems

Help! All I get is the compass, and a black globe with an atmosphere layer

This is usually the first sign of a graphics card issue. First try updating your video drivers. Under Linux if you see the message that DXTn compressed textures are not supported is spammed to the console, you can try downloading (many distributions also offer a package for it) the driconf utility and enabling "Force S3 texture compression"

How do I set the position of the globe directly?

View handling is on the current list of things being improved for the next version. It is currently something of a black art that may or may not work reliably, and may occasionally cause seemingly unexplainable input behaviour.

Just know that you're not alone with the weird behaviour.

The easiest method that works reliably is to use View.applyStateIterator. Several factory methods are available, such as FlyToOrbitViewStateIterator.createPanToIterator(...). Trying to directly modify the View state isn't reliable.

See also:

I can resize the window bigger, but never make it smaller

The jogl GLCanvas class seems to set it's minimum size to the new size every time it is resized. This doesn't matter for the default demo, because it uses a border layout which ignores component's minimum sizes!

However, if you add the WorldWindowGLCanvas to a component that uses a different layout, you will need to workaround that. One way is to extend the GLAutoDrawable class and add a reshape method that looks something like the following (make sure to set the AVKey.WORLD_WINDOW_CLASS_NAME property so that your new class is used instead of the default):

@Override
    public void reshape(GLAutoDrawable glAutoDrawable, int x, int y, int w, int h) {
        // Workaround jogl resizing bug, it sets the minimum size to the new size every time the canvas is resized
        // which prevents it from ever shrinking
        ((Component) glAutoDrawable).setMinimumSize(new Dimension(0, 0));
    }


See also:

(These links refer to an alternate workaround involving adding your GLCanvas to a JPanel, and setting that JPanel's preferred size to (0,0). I haven't tried this to compare it to the workaround listed above).

How do I force the screen to redraw from my code?

You have two options:

  1. The WorldWindow class offers a couple of redraw methods, you can keep a copy of it (perhaps passed in a constructor method) and call them as needed.
  2. The slightly preferable way from Layers is to fire a property change event such as:
    this.firePropertyChange(AVKey.LAYER, null, this);

The globe window draws over my application's menus and popups

The jogl lightweight component (WorldWindowGLJPanel) is not reliable at the moment, so the recommended component is WorldWindowGLCanvas which is unfortunately heavyweight (not drawn by swing). You can workaround many issues by calling JPopupMenu.setDefaultLightWeightPopupEnabled(false) early in your application, however there are some kinds of interactions between lightweight and heavyweights that aren't possible (such as drawing a transparent swing component on top of the globe).

WWJ Java future

What is the status of the SDK? Is it a pre-alpha, an alpha, a beta or a release... or something else? Is it safe to start coding an application around it?

The WWJ release as of May 11, 2007 is an early-access release. The code and the API will continue to evolve, although the architecture will remain the same. When a stable release is established, the APIs will follow the convention of backwards compatibility among "dot" releases. No date for a stable release has been established yet. The components of WWJ are designed to be replaceable. The architecture is largely defined by pure interfaces. To replace a component, just implement the relevant interface(s).

Is there a roadmap that describes all of the features expected for the final version?

There is no feature roadmap written down.

Where do I report bugs or request new features?

You can ask questions on the World Wind Java forums, or report specific issues using the NASA issue tracker.

Personal tools