我使用LibGDX编写了应用程序,并在多个设备上对其进行了测试。它可以工作,但当我将应用程序加载到Play.google时,我收到了有关错误和崩溃的信息:
完整堆栈跟踪:
java.lang.IllegalStateException: frame buffer couldn't be constructed: unsupported combination of formats
at com.badlogic.gdx.graphics.glutils.FrameBuffer.build(FrameBuffer.java:183)
at com.badlogic.gdx.graphics.glutils.FrameBuffer.<init>(FrameBuffer.java:97)
at com.me.screens.DirectedGame.setScreen(DirectedGame.java:32)
at com.me.pidgame.MyGdxGame.create(MyGdxGame.java:16)
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:334)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1505)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
为什么会出现?
答案 0 :(得分:2)
如果你看一下来源:FrameBuffer。
当OpenGL上下文中gl.glCheckFramebufferStatus
的结果返回GL20.GL_FRAMEBUFFER_UNSUPPORTED
if (result == GL20.GL_FRAMEBUFFER_UNSUPPORTED)
throw new IllegalStateException("frame buffer couldn't be constructed: unsupported combination of formats");
当在该特定设备中不支持用于创建FrameBuffer的Pixmap.Format时,会发生这种情况。