diff options
author | Renanse <[email protected]> | 2012-11-19 10:33:00 -0600 |
---|---|---|
committer | Renanse <[email protected]> | 2012-11-19 10:33:00 -0600 |
commit | 284dc0a951b5ba9f742c6de4f1582c3829f0035e (patch) | |
tree | ceb823e2569f9b251b1463954b948f9ccd29c9ce | |
parent | c817547edf886eb7d22fd3e8297b46430f124cf5 (diff) |
Make renderer choice more explicit about the type of renderer used.
-rw-r--r-- | trunk/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleBase.java | 4 | ||||
-rw-r--r-- | trunk/ardor3d-examples/src/main/java/com/ardor3d/example/PropertiesDialog.java | 15 |
2 files changed, 13 insertions, 6 deletions
diff --git a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleBase.java b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleBase.java index 508f89a..fcc431f 100644 --- a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleBase.java +++ b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/ExampleBase.java @@ -358,14 +358,14 @@ public abstract class ExampleBase implements Runnable, Updater, Scene { example._settings = settings; // get our framework - if ("LWJGL".equalsIgnoreCase(prefs.getRenderer())) { + if (prefs.getRenderer().startsWith("LWJGL")) { final LwjglCanvasRenderer canvasRenderer = new LwjglCanvasRenderer(example); example._canvas = new LwjglCanvas(settings, canvasRenderer); example._physicalLayer = new PhysicalLayer(new LwjglKeyboardWrapper(), new LwjglMouseWrapper(), new LwjglControllerWrapper(), (LwjglCanvas) example._canvas); example._mouseManager = new LwjglMouseManager(); TextureRendererFactory.INSTANCE.setProvider(new LwjglTextureRendererProvider()); - } else if ("JOGL".equalsIgnoreCase(prefs.getRenderer())) { + } else if (prefs.getRenderer().startsWith("JOGL")) { final JoglCanvasRenderer canvasRenderer = new JoglCanvasRenderer(example); example._canvas = new JoglCanvas(canvasRenderer, settings); final JoglCanvas canvas = (JoglCanvas) example._canvas; diff --git a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/PropertiesDialog.java b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/PropertiesDialog.java index 12dc6b0..6d4a7ed 100644 --- a/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/PropertiesDialog.java +++ b/trunk/ardor3d-examples/src/main/java/com/ardor3d/example/PropertiesDialog.java @@ -429,8 +429,15 @@ public final class PropertiesDialog extends JDialog { * @return the list of renderers. */ private JComboBox setUpRendererChooser() { - final JComboBox nameBox = new JComboBox(new String[] { "LWJGL", "JOGL" }); - nameBox.setSelectedItem(source.getRenderer()); + final JComboBox nameBox = new JComboBox(new String[] { "LWJGL 2.8.4", "JOGL 2.0rc11" }); + final String old = source.getRenderer(); + if (old != null) { + if (old.startsWith("LWJGL")) { + nameBox.setSelectedIndex(0); + } else if (old.startsWith("JOGL")) { + nameBox.setSelectedIndex(1); + } + } return nameBox; } @@ -624,9 +631,9 @@ public final class PropertiesDialog extends JDialog { } public void run() { - if ("LWJGL".equals(renderer)) { + if (renderer.startsWith("LWJGL")) { // TODO: can we implement this? - } else if ("JOGL".equals(renderer)) { + } else if (renderer.startsWith("JOGL")) { // TODO: can we implement this? } ready = true; |