I am trying to create a mouse cursor but the AlphaState is not working. I am not sure where the alpha color is found but the edge of the image is all white which is what I want to use as the alpha. The image is a .png. Here is my code for the cursor.
am = new AbsoluteMouse( "Mouse", DisplaySystem.getDisplaySystem().getRenderer().getWidth(),
DisplaySystem.getDisplaySystem().getRenderer().getHeight() );
// Cursor texture
TextureState ts = DisplaySystem.getDisplaySystem().getRenderer().createTextureState();
URL cursorLoc = BlockBuildCameraController.class.getClassLoader().getResource( "Data/Cursors/cursor.png" );
Texture t = TextureManager.loadTexture( cursorLoc, Texture.MM_LINEAR, Texture.FM_LINEAR );
ts.setTexture( t );
am.setRenderState( ts );
// Alpha
AlphaState as = DisplaySystem.getDisplaySystem().getRenderer().createAlphaState();
as.setBlendEnabled( true );
as.setSrcFunction( AlphaState.SB_SRC_ALPHA );
as.setDstFunction( AlphaState.SB_ONE_MINUS_SRC_ALPHA );
as.setTestEnabled( true );
as.setTestFunction( AlphaState.TF_GREATER );
am.setRenderState( as );
// Set start location
am.setLocalTranslation( new Vector3f( DisplaySystem.getDisplaySystem().getWidth() / 2,
DisplaySystem.getDisplaySystem().getHeight() / 2, 0 ) );
gameState.getRootNode().attachChild( am );