
Like the default FrameBuffer on the screen, the FrameBuffer object created by the application is also composed of a set of Color Buffer, Depth Buffer, and stencel Buffer (optional.

Through the FrameBuffer object created by this application, the OpenGL application can redirect the Image Display output to this non-Screen Display in FrameBuffer object, similar to the Offscreen technology commonly used in 2D drawing. With Opengl ES extension support, applications can also create Frame Buffer objects in memory (not used for Screen Display ). If the mobile phone has a GPU, the default Frame Buffer is also the 3D display area. Each element in the array represents a pixel color.įor a 3D image, in addition to a two-dimensional array (Color Buffer) that represents the Color, a two-dimensional array (Depth Buffer) or an array (stencel Buffer) are also required ), therefore, the Frame Buffer in OpenGL is a set of the preceding Color Buffer, Depth Buffer, and stencel Buffer.

You can also create an Offscreen memory space, in this case, Frame Buffer can be a two-dimensional array. By default, it is the display space of the screen. You can "ping pong" between the two in each pass, so that the destination from pass n becomes the source in pass n + 1, and the source from pass n becomes the destination in pass n + 1.For the concept of Frame Buffer object, see the previous Android OpenGL ES development tutorial (23): FrameBuffer.Ĭompared with 2D images, if Frame Buffer is mapped to a two-dimensional graphic environment, it is a 2D memory array space. Note that even if you need more than two passes, you typically still only need two textures. So for multipass rendering of the kind you have in mind, you need two textures, where one is used as source and the other one as the destination. it can be used if you want to implement your own mipmap generation). But that's a somewhat esoteric case (e.g. There are some exceptions where the results are defined, particularly if the same mipmap levels are not used for both the render target and for texturing. When a feedback loop exists, undefined behavior results.

From section 4.4.4 of the ES 2.0 spec:Ī feedback loop may exist when a texture object is used as both the source and destination of a GL operation. This is what the spec calls a "rendering feedback loop", which produces undefined results. No, under most circumstances, you can't use the same texture as a render target and for texturing at the same time.
