OSDN Git Service

Check for GL_FRAMEBUFFER_UNSUPPORTED error from glCheckFramebufferStatus
authorThomas ten Cate <ttencate@gmail.com>
Mon, 3 Jun 2013 19:41:00 +0000 (20:41 +0100)
committerThomas ten Cate <ttencate@gmail.com>
Mon, 3 Jun 2013 19:46:12 +0000 (20:46 +0100)
commit857d63a2153d251d420a32e1ab91d8241c30caab
tree8ef730a6cf5aaa4d1b45f8609e32417a3c24df2a
parent304f04af2c55c66a653a28d38d0aa02bbbd5f1fb
Check for GL_FRAMEBUFFER_UNSUPPORTED error from glCheckFramebufferStatus

According to the OpenGL ES 2.0 spec
(http://www.khronos.org/registry/gles/specs/2.0/es_cm_spec_2.0.24.pdf),
CheckFramebufferStatus can return FRAMEBUFFER_UNSUPPORTED if e.g. the
texture isn't a color-renderable format. We should throw in that case,
not silently fail to work. Also throw for any other cases that aren't
FRAMEBUFFER_COMPLETE; according to the spec there shouldn't be any.

Also add some documentation about officially supported formats. In
particular, RGB888 and RGBA8888 do work on many devices, but aren't
listed in the spec as color-renderable formats.
gdx/src/com/badlogic/gdx/graphics/glutils/FrameBuffer.java