From d14f405e24b8d4625e6c196a29439b88cec3dcb6 Mon Sep 17 00:00:00 2001 From: sgold Date: Sun, 16 Mar 2014 22:22:28 +0000 Subject: [PATCH] add a RenderManager method to remove a pre view by name ... in gradle-restructure git-svn-id: https://jmonkeyengine.googlecode.com/svn/branches/gradle-restructure@11098 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../java/com/jme3/renderer/RenderManager.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java b/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java index 5ff367798..5b3382ccd 100644 --- a/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java +++ b/jme3-core/src/main/java/com/jme3/renderer/RenderManager.java @@ -106,6 +106,24 @@ public class RenderManager { return null; } + /** + * Removes the pre ViewPort with the specified name. + * + * @param viewName The name of the pre ViewPort to remove + * @return True if the ViewPort was removed successfully. + * + * @see #createPreView(java.lang.String, com.jme3.renderer.Camera) + */ + public boolean removePreView(String viewName) { + for (int i = 0; i < preViewPorts.size(); i++) { + if (preViewPorts.get(i).getName().equals(viewName)) { + preViewPorts.remove(i); + return true; + } + } + return false; + } + /** * Removes the specified pre ViewPort. *