Package com.jme.scene.state

Examples of com.jme.scene.state.AlphaState


    this.getBatch( 0 ).updateRenderState();
  //  this.getBatch( 0 ).draw( r );
       
    if( overTextureCoord != null ) {
      TextureState ts2 = TileGame.getDisplay().getRenderer().createTextureState();
      AlphaState as = (AlphaState) this.getRenderState( RenderState.RS_ALPHA );
      if( as == null ) {
        as = TileGame.getDisplay().getRenderer().createAlphaState();
        as.setBlendEnabled( true );
        as.setSrcFunction(AlphaState.SB_SRC_ALPHA);
        as.setDstFunction(AlphaState.DB_ONE_MINUS_SRC_ALPHA);
        as.setTestEnabled(true);
        as.setTestFunction(AlphaState.TF_GREATER);
        this.getBatch( 1 ).setRenderState( as );
      }

      ts2.setTexture( overTexture );
      this.getBatch( 1 ).setRenderState( ts2 );
View Full Code Here


    // BLATANTLY stolen from SimpleGame

    // -- FPS DISPLAY
    // First setup alpha state
    /* This allows correct blending of text and what is already rendered below it */
    AlphaState as1 = display.getRenderer().createAlphaState();
    as1.setBlendEnabled(true);
    as1.setSrcFunction(AlphaState.SB_SRC_ALPHA);
    as1.setDstFunction(AlphaState.DB_ONE);
    as1.setTestEnabled(true);
    as1.setTestFunction(AlphaState.TF_GREATER);
    as1.setEnabled(true);

    // Now setup font texture
    TextureState font = display.getRenderer().createTextureState();
    /* The texture is loaded from fontLocation */
    font.setTexture(TextureManager.loadTexture(TankGameState.class
 
View Full Code Here

TOP

Related Classes of com.jme.scene.state.AlphaState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.