v0.4.2: more fill-rate performance improvements
This commit is contained in:
parent
078e416b1a
commit
7a707f207b
|
@ -20,6 +20,8 @@
|
|||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.scenes;
|
||||
|
||||
import android.opengl.GLES20;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
|
@ -163,10 +165,19 @@ public class GameScene extends PixelScene {
|
|||
Dungeon.level.width() * DungeonTilemap.SIZE,
|
||||
Dungeon.level.height() * DungeonTilemap.SIZE,
|
||||
Dungeon.level.waterTex() ){
|
||||
|
||||
@Override
|
||||
protected NoosaScript script() {
|
||||
return NoosaScriptNoLighting.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw() {
|
||||
//water has no alpha component, this improves performance
|
||||
GLES20.glBlendFunc( GLES20.GL_ONE, GLES20.GL_ZERO );
|
||||
super.draw();
|
||||
GLES20.glBlendFunc( GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA );
|
||||
}
|
||||
};
|
||||
terrain.add( water );
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.ui;
|
||||
|
||||
import android.opengl.GLES20;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.NoosaScript;
|
||||
|
@ -46,6 +48,14 @@ public class Archs extends Component {
|
|||
protected NoosaScript script() {
|
||||
return NoosaScriptNoLighting.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void draw() {
|
||||
//arch bg has no alpha component, this improves performance
|
||||
GLES20.glBlendFunc(GLES20.GL_ONE, GLES20.GL_ZERO);
|
||||
super.draw();
|
||||
GLES20.glBlendFunc( GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA );
|
||||
}
|
||||
};
|
||||
arcsBg.autoAdjust = true;
|
||||
arcsBg.offsetTo( 0, offsB );
|
||||
|
|
Loading…
Reference in New Issue
Block a user