@@ -244,9 +244,9 @@ public AppProfiler getProfiler() {
244244 * @see #createPreView(java.lang.String, com.jme3.renderer.Camera)
245245 */
246246 public ViewPort getPreView (String viewName ) {
247- for (ViewPort preViewPort : preViewPorts ) {
248- if (preViewPort .getName ().equals (viewName )) {
249- return preViewPort ;
247+ for (int i = 0 ; i < preViewPorts . size (); i ++ ) {
248+ if (preViewPorts . get ( i ) .getName ().equals (viewName )) {
249+ return preViewPorts . get ( i ) ;
250250 }
251251 }
252252 return null ;
@@ -291,9 +291,9 @@ public boolean removePreView(ViewPort view) {
291291 * @see #createMainView(java.lang.String, com.jme3.renderer.Camera)
292292 */
293293 public ViewPort getMainView (String viewName ) {
294- for (ViewPort viewPort : viewPorts ) {
295- if (viewPort .getName ().equals (viewName )) {
296- return viewPort ;
294+ for (int i = 0 ; i < viewPorts . size (); i ++ ) {
295+ if (viewPorts . get ( i ) .getName ().equals (viewName )) {
296+ return viewPorts . get ( i ) ;
297297 }
298298 }
299299 return null ;
@@ -338,9 +338,9 @@ public boolean removeMainView(ViewPort view) {
338338 * @see #createPostView(java.lang.String, com.jme3.renderer.Camera)
339339 */
340340 public ViewPort getPostView (String viewName ) {
341- for (ViewPort postViewPort : postViewPorts ) {
342- if (postViewPort .getName ().equals (viewName )) {
343- return postViewPort ;
341+ for (int i = 0 ; i < postViewPorts . size (); i ++ ) {
342+ if (postViewPorts . get ( i ) .getName ().equals (viewName )) {
343+ return postViewPorts . get ( i ) ;
344344 }
345345 }
346346 return null ;
@@ -1329,7 +1329,8 @@ public void render(float tpf, boolean mainFrameBufferActive) {
13291329 if (prof != null ) {
13301330 prof .appStep (AppStep .RenderPreviewViewPorts );
13311331 }
1332- for (ViewPort vp : preViewPorts ) {
1332+ for (int i = 0 ; i < preViewPorts .size (); i ++) {
1333+ ViewPort vp = preViewPorts .get (i );
13331334 if (vp .getOutputFrameBuffer () != null || mainFrameBufferActive ) {
13341335 renderViewPort (vp , tpf );
13351336 }
@@ -1338,7 +1339,8 @@ public void render(float tpf, boolean mainFrameBufferActive) {
13381339 if (prof != null ) {
13391340 prof .appStep (AppStep .RenderMainViewPorts );
13401341 }
1341- for (ViewPort vp : viewPorts ) {
1342+ for (int i = 0 ; i < viewPorts .size (); i ++) {
1343+ ViewPort vp = viewPorts .get (i );
13421344 if (vp .getOutputFrameBuffer () != null || mainFrameBufferActive ) {
13431345 renderViewPort (vp , tpf );
13441346 }
@@ -1347,7 +1349,8 @@ public void render(float tpf, boolean mainFrameBufferActive) {
13471349 if (prof != null ) {
13481350 prof .appStep (AppStep .RenderPostViewPorts );
13491351 }
1350- for (ViewPort vp : postViewPorts ) {
1352+ for (int i = 0 ; i < postViewPorts .size (); i ++) {
1353+ ViewPort vp = postViewPorts .get (i );
13511354 if (vp .getOutputFrameBuffer () != null || mainFrameBufferActive ) {
13521355 renderViewPort (vp , tpf );
13531356 }
@@ -1370,7 +1373,7 @@ public void render(float tpf, boolean mainFrameBufferActive) {
13701373 * @return True if the draw buffer target id is passed to the shaders.
13711374 */
13721375 public boolean getPassDrawBufferTargetIdToShaders () {
1373- return this . forcedOverrides .contains (boundDrawBufferId );
1376+ return forcedOverrides .contains (boundDrawBufferId );
13741377 }
13751378
13761379 /**
@@ -1379,15 +1382,15 @@ public boolean getPassDrawBufferTargetIdToShaders() {
13791382 * backends. When enabled, a material parameter named "BoundDrawBuffer" of
13801383 * type Int will be added to forced material parameters.
13811384 *
1382- * @param v True to enable, false to disable (default is true)
1385+ * @param enable True to enable, false to disable (default is true)
13831386 */
1384- public void setPassDrawBufferTargetIdToShaders (boolean v ) {
1385- if (v ) {
1386- if (!this . forcedOverrides .contains (boundDrawBufferId )) {
1387- this . forcedOverrides .add (boundDrawBufferId );
1387+ public void setPassDrawBufferTargetIdToShaders (boolean enable ) {
1388+ if (enable ) {
1389+ if (!forcedOverrides .contains (boundDrawBufferId )) {
1390+ forcedOverrides .add (boundDrawBufferId );
13881391 }
13891392 } else {
1390- this . forcedOverrides .remove (boundDrawBufferId );
1393+ forcedOverrides .remove (boundDrawBufferId );
13911394 }
13921395 }
13931396
0 commit comments