0
\$\begingroup\$

So I am running into an issue where I cannot load my game onto the nexus 7 because of the error stated previously. I read online that this is because the device can't use the Format class or something like that but I find this funny because I ran the game on the device with the framebuffer earlier without any problems. The game runs perfectly fine on the nexus 5.

EDIT

Code breaks here in the initialization process.

buffer = new FrameBuffer(Format.RGBA8888, (int) gameWidth, (int) gameHeight, false);

Here is a part of the stacktrace

java.lang.IllegalStateException: frame buffer couldn't be contructed: incomplete attachment.
at com.badlogic.gdx.graphics.glutils.Framebuffer.build(FrameBuffer.java:171)

Here is the Framebuffer:171 code

if (result == GL20.GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT)
throw new IllegalStateException("frame buffer couldn't be constructed: incomplete attachment");
\$\endgroup\$
  • \$\begingroup\$ A minimal example demonstrating the problem might make this answerable. \$\endgroup\$ – Anko Jun 23 '14 at 22:01
  • 3
    \$\begingroup\$ Are you sure gameWidth and gameHeight are correct for your device? \$\endgroup\$ – Panda Pajama Jun 24 '14 at 3:13
  • 1
    \$\begingroup\$ Oh sir, you may be right. I was thinking it would need the whole game world size and not the screen devices size but I may be wrong. I will reply again when I get the result. \$\endgroup\$ – G3tinmybelly Jun 24 '14 at 3:16
  • 1
    \$\begingroup\$ Yep, I am an idiot you have fixed my problem. Could you explain why it was breaking the code though? Just curious. \$\endgroup\$ – G3tinmybelly Jun 24 '14 at 3:34
  • 2
    \$\begingroup\$ The program was crashing because FrameBuffer expected the dimensions of the screen, and you passed it some dimensions that were not those of the screen. \$\endgroup\$ – Panda Pajama Jun 24 '14 at 5:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.