Changed Camera.setViewPort(float,float,float,float) to not call onViewPortChage 4 times.

thanks to Lutherion http://jmonkeyengine.org/groups/development-discussion-jme3/forum/topic/possible-bug-with-viewport-on-camera/#post-124630

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7235 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 14 years ago
parent 7d09cafa71
commit 14e4b79170
  1. 10
      engine/src/core/com/jme3/renderer/Camera.java

@ -207,7 +207,6 @@ public class Camera implements Savable, Cloneable {
protected Matrix4f projectionMatrix = new Matrix4f(); protected Matrix4f projectionMatrix = new Matrix4f();
protected Matrix4f viewProjectionMatrix = new Matrix4f(); protected Matrix4f viewProjectionMatrix = new Matrix4f();
private BoundingBox guiBounding = new BoundingBox(); private BoundingBox guiBounding = new BoundingBox();
/** The camera's name. */ /** The camera's name. */
protected String name; protected String name;
@ -913,10 +912,11 @@ public class Camera implements Savable, Cloneable {
* @param top the top boundary of the viewport (default: 1) * @param top the top boundary of the viewport (default: 1)
*/ */
public void setViewPort(float left, float right, float bottom, float top) { public void setViewPort(float left, float right, float bottom, float top) {
setViewPortLeft(left); this.viewPortLeft = left;
setViewPortRight(right); this.viewPortRight = right;
setViewPortBottom(bottom); this.viewPortBottom = bottom;
setViewPortTop(top); this.viewPortTop = top;
onViewPortChange();
} }
/** /**

Loading…
Cancel
Save