Graphics Programs Reference
In-Depth Information
the core concepts of the OpenGL ES 2.0 API, and we create basic examples to see
ES 2.0 in action.
Framebuffer
When rendering graphics using ES 2.0, what we finally see in the EGL window (that
is, the rendering surface) is colored pixels. There has to be a piece of memory that
stores this data (color per pixel), so it can be displayed on the EGL window. Frame-
buffer is that large piece of memory used to represent 3D graphics as a 2D array of
pixel data, more specifically, the kind of framebuffer we are talking about is a col-
or buffer. Display devices read the color buffer to determine the intensity values for
RGB color components for each pixel on the screen (that is, a portion of screen dis-
playing the EGL window). Please note that the color buffer can also store an addi-
tional alpha component along with the RGB color components for each pixel on the
EGL window.
In the section “EGL on Android”, I mentioned that the GLSurfaceView class
automates the selection of surface configuration for rendering surface. Let's elabor-
ate a bit on that.
The default surface configuration that the GLSurfaceView class selects is
RGB_565 . This means that the memory allocated for each element (corresponding to
a pixel on the EGL window) in the color buffer is 16 bits, where 5 bits are allocated
for each red and blue color components, and 6 bits for the green color component
(because the human visual system is more sensitive to green). We will stick to this
default configuration (please note that the newer Android devices have this default
configuration as RGB_888 ).
Note A pixel (originally short for “picture element”) is a minute,
uniquely identifiable illuminated region on the display screen. It is
not the smallest element on the display screen. The display device
has the responsibility to determine what should be the smallest
addressable screen element; however, these elements are way too
small to be noticed individually, which is why they are combined in
groups to form pixels.
Search WWH ::




Custom Search