本文整理了Java中com.badlogic.gdx.Graphics.setContinuousRendering()
方法的一些代码示例,展示了Graphics.setContinuousRendering()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graphics.setContinuousRendering()
方法的具体详情如下:
包路径:com.badlogic.gdx.Graphics
类名称:Graphics
方法名:setContinuousRendering
[英]Sets whether to render continuously. In case rendering is performed non-continuously, the following events will trigger a redraw:
代码示例来源:origin: libgdx/libgdx
@Override
public void create () {
// disable continuous rendering
Gdx.graphics.setContinuousRendering(false);
Gdx.app.log("DirtyRenderingTest", "created");
}
代码示例来源:origin: libgdx/libgdx
public void changed (ChangeEvent event, Actor actor) {
Gdx.graphics.setContinuousRendering(checkBox.isChecked());
}
});
代码示例来源:origin: libgdx/libgdx
public void changed (ChangeEvent event, Actor actor) {
boolean continuous = Gdx.graphics.isContinuousRendering();
Gdx.graphics.setContinuousRendering(!continuous);
}
});
代码示例来源:origin: libgdx/libgdx
@Override
public void create () {
batch = new SpriteBatch();
texture = new Texture("data/badlogic.jpg");
region = new TextureRegion(texture);
stage = new Stage(new ScreenViewport(), batch);
Gdx.input.setInputProcessor(stage);
skin = new Skin(Gdx.files.internal("data/uiskin.json"));
skin.add("default", font = new BitmapFont(Gdx.files.internal("data/arial-32.fnt"), false));
populateTable();
Gdx.graphics.setContinuousRendering(false);
Gdx.graphics.requestRendering();
}
代码示例来源:origin: crashinvaders/gdx-texture-packer-gui
@Override
public void create() {
if (params.debug) {
Gdx.app.log(TAG, "Application is running in DEBUG mode.");
}
Gdx.app.getGraphics().setContinuousRendering(false);
Gdx.input.setInputProcessor(inputMultiplexer);
initiateContext();
FileChooser.setSaveLastDirectory(true);
FileChooser.setDefaultPrefsName("file_chooser.xml");
// Uncomment to update project's LML DTD schema
// LmlUtils.saveDtdSchema(interfaceService.getParser(), Gdx.files.local("../lml.dtd"));
}
代码示例来源:origin: org.mapsforge/vtm-gdx
@Override
public void create() {
if (!Parameters.CUSTOM_COORD_SCALE) {
if (Math.min(Gdx.graphics.getDisplayMode().width, Gdx.graphics.getDisplayMode().height) > 1080)
MapRenderer.COORD_SCALE = 4.0f;
}
mMap = new MapAdapter();
mMapRenderer = new MapRenderer(mMap);
Gdx.graphics.setContinuousRendering(false);
Gdx.app.setLogLevel(Application.LOG_DEBUG);
int w = Gdx.graphics.getWidth();
int h = Gdx.graphics.getHeight();
mMap.viewport().setViewSize(w, h);
mMapRenderer.onSurfaceCreated();
mMapRenderer.onSurfaceChanged(w, h);
InputMultiplexer mux = new InputMultiplexer();
if (!Parameters.MAP_EVENT_LAYER2) {
mGestureDetector = new GestureDetector(new GestureHandlerImpl(mMap));
mux.addProcessor(mGestureDetector);
}
mux.addProcessor(new InputHandler(this));
mux.addProcessor(new MotionHandler(mMap));
Gdx.input.setInputProcessor(mux);
createLayers();
}
代码示例来源:origin: mstojcevich/Radix
private void setupOGL() {
camera = new PerspectiveCamera(90, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
camera.position.set(10f, 150f, 10f);
camera.lookAt(0, 0, 0);
camera.near = 0.1f;
camera.far = 450f;
camera.update();
hudCamera = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
guiBatch = new SpriteBatch();
guiBatch.setProjectionMatrix(hudCamera.combined);
if(android) {
setupTouchControls();
}
Gdx.input.setInputProcessor(new RadixInputHandler(this));
if(settingsManager.getVisualSettings().getNonContinuous().getValue()) {
Gdx.graphics.setContinuousRendering(false);
}
sceneTheme = new SceneTheme();
sceneTheme.init();
}
内容来源于网络,如有侵权,请联系作者删除!