7
這是我的設置:LibGDX - 在縮放Scene2d舞臺時如何平滑actor drawable?
stage = new Stage(1280, 800, false);
button = new Button(drawableUp, drawableDown);
stage.add(button);
這個被渲染爲以下幾點:
@Override
public void render(float delta) {
Gdx.gl.glClearColor(RED,GREEN,BLUE,ALPHA);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
stage.act(delta);
stage.draw();
}
的問題是,當在1280×800顯示在舞臺按鈕看起來像這樣:
如果舞臺重新縮放到eg 1280x736,按鈕可繪製按以下方式縮放:
是否有辦法平滑邊緣?因爲現在看起來縮放只是通過去除圖片上半部分和下半部分中的一條像素線完成的。
謝謝。你指出了我的正確方向。我已經使用: tex = new Texture(); tex.setFilter(TextureFilter.MipMapLinearLinear,TextureFilter.Linear); – schafant 2013-04-04 14:33:09