libGDX 日志记录问题
libGDX logging problems
我无法使用以下方法在 LogCat 和 libGDX 中打印任何消息:
Gdx.app.log(tag, message);
在我的 onCreate 方法中,我设置了:
Gdx.app.setLogLevel(Application.LOG_INFO); //debug or error, same story
渲染方法:
public void render() {
if (loading && assets.update())
doneLoading();
Gdx.app.log("application", "loaded"); //not showed
camController.update();
Gdx.gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
Gdx.gl.glClearColor(0, 0, 0.2f, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
modelBatch.begin(cam);
modelBatch.render(instances, environment);
modelBatch.end();
}
doneLoading() 方法:
private void doneLoading() {
I_model = assets.get("data/male_teen.g3db", Model.class);
I_instance = new ModelInstance(I_model);
instances.add(I_instance);
loading = false;
}
建议?
我删除了 Eclipse 自动创建的过滤器。清理项目并重新安装在设备上。现在可以了。
我无法使用以下方法在 LogCat 和 libGDX 中打印任何消息:
Gdx.app.log(tag, message);
在我的 onCreate 方法中,我设置了:
Gdx.app.setLogLevel(Application.LOG_INFO); //debug or error, same story
渲染方法:
public void render() {
if (loading && assets.update())
doneLoading();
Gdx.app.log("application", "loaded"); //not showed
camController.update();
Gdx.gl.glViewport(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
Gdx.gl.glClearColor(0, 0, 0.2f, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT);
modelBatch.begin(cam);
modelBatch.render(instances, environment);
modelBatch.end();
}
doneLoading() 方法:
private void doneLoading() {
I_model = assets.get("data/male_teen.g3db", Model.class);
I_instance = new ModelInstance(I_model);
instances.add(I_instance);
loading = false;
}
建议?
我删除了 Eclipse 自动创建的过滤器。清理项目并重新安装在设备上。现在可以了。