@ -67,10 +67,8 @@ import java.util.logging.Logger;
public class RenderManager {
public class RenderManager {
private static final Logger logger = Logger . getLogger ( RenderManager . class . getName ( ) ) ;
private static final Logger logger = Logger . getLogger ( RenderManager . class . getName ( ) ) ;
private Renderer renderer ;
private Renderer renderer ;
private UniformBindingManager uniformBindingManager = new UniformBindingManager ( ) ;
private UniformBindingManager uniformBindingManager = new UniformBindingManager ( ) ;
private ArrayList < ViewPort > preViewPorts = new ArrayList < ViewPort > ( ) ;
private ArrayList < ViewPort > preViewPorts = new ArrayList < ViewPort > ( ) ;
private ArrayList < ViewPort > viewPorts = new ArrayList < ViewPort > ( ) ;
private ArrayList < ViewPort > viewPorts = new ArrayList < ViewPort > ( ) ;
private ArrayList < ViewPort > postViewPorts = new ArrayList < ViewPort > ( ) ;
private ArrayList < ViewPort > postViewPorts = new ArrayList < ViewPort > ( ) ;
@ -81,7 +79,6 @@ public class RenderManager {
private boolean shader ;
private boolean shader ;
private int viewX , viewY , viewWidth , viewHeight ;
private int viewX , viewY , viewWidth , viewHeight ;
private Matrix4f orthoMatrix = new Matrix4f ( ) ;
private Matrix4f orthoMatrix = new Matrix4f ( ) ;
private String tmpTech ;
private String tmpTech ;
private boolean handleTranlucentBucket = true ;
private boolean handleTranlucentBucket = true ;
@ -502,9 +499,19 @@ public class RenderManager {
if ( g . getMaterial ( ) . getMaterialDef ( ) . getTechniqueDef ( forcedTechnique ) ! = null ) {
if ( g . getMaterial ( ) . getMaterialDef ( ) . getTechniqueDef ( forcedTechnique ) ! = null ) {
tmpTech = g . getMaterial ( ) . getActiveTechnique ( ) ! = null ? g . getMaterial ( ) . getActiveTechnique ( ) . getDef ( ) . getName ( ) : "Default" ;
tmpTech = g . getMaterial ( ) . getActiveTechnique ( ) ! = null ? g . getMaterial ( ) . getActiveTechnique ( ) . getDef ( ) . getName ( ) : "Default" ;
g . getMaterial ( ) . selectTechnique ( forcedTechnique , this ) ;
g . getMaterial ( ) . selectTechnique ( forcedTechnique , this ) ;
//saving forcedRenderState for future calls
RenderState tmpRs = forcedRenderState ;
if ( g . getMaterial ( ) . getActiveTechnique ( ) . getDef ( ) . getForcedRenderState ( ) ! = null ) {
//forcing forced technique renderState
forcedRenderState = g . getMaterial ( ) . getActiveTechnique ( ) . getDef ( ) . getForcedRenderState ( ) ;
}
// use geometry's material
// use geometry's material
g . getMaterial ( ) . render ( g , this ) ;
g . getMaterial ( ) . render ( g , this ) ;
g . getMaterial ( ) . selectTechnique ( tmpTech , this ) ;
g . getMaterial ( ) . selectTechnique ( tmpTech , this ) ;
//restoring forcedRenderState
forcedRenderState = tmpRs ;
//Reverted this part from revision 6197
//Reverted this part from revision 6197
//If forcedTechnique does not exists, and frocedMaterial is not set, the geom MUST NOT be rendered
//If forcedTechnique does not exists, and frocedMaterial is not set, the geom MUST NOT be rendered
} else if ( forcedMaterial ! = null ) {
} else if ( forcedMaterial ! = null ) {