\r
/** Creates a new FrameBuffer having the given dimensions and potentially a depth buffer attached.\r
* \r
- * @param format the format of the color buffer\r
+ * @param format the format of the color buffer; according to the OpenGL ES 2.0 spec, only\r
+ * RGB565, RGBA4444 and RGB5_A1 are color-renderable\r
* @param width the width of the framebuffer in pixels\r
* @param height the height of the framebuffer in pixels\r
* @param hasDepth whether to attach a depth buffer\r
- * @throws GdxRuntimeException in case the FraeBuffer could not be created */\r
+ * @throws GdxRuntimeException in case the FrameBuffer could not be created */\r
public FrameBuffer (Pixmap.Format format, int width, int height, boolean hasDepth) {\r
this.width = width;\r
this.height = height;\r
throw new IllegalStateException("frame buffer couldn't be constructed: incomplete dimensions");\r
if (result == GL20.GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT)\r
throw new IllegalStateException("frame buffer couldn't be constructed: missing attachment");\r
+ if (result == GL20.GL_FRAMEBUFFER_UNSUPPORTED)\r
+ throw new IllegalStateException("frame buffer couldn't be constructed: unsupported combination of formats");\r
+ throw new IllegalStateException(String.format("frame buffer couldn't be constructed: unknown error 0x%04x", result));\r
}\r
}\r
\r