2 Mbytes
|
800 by 600 by 16
|
640 by 480 by 16
|
640 by 480 by 16
|
4 Mbytes
|
800 by 600 by 16
|
800 by 600 by 16
|
800 by 600 by 16
|
The frame buffer is logically organized as 1024 scanlines of 16 or 32-bit values, regardless of the amount of memory installed on the board, and is shown in Figure Getting Started.2. Scanline length, or stride, is independent of screen resolution and dependent on the graphics hardware. The stride is returned in the GrLfbInfo_t structure, as described in Chapter Chapter 11. . The data format within the frame buffer is programmable and is also described in detail in Chapter Chapter 11. .
Figure Getting Started.2 Logical layout of the linear frame buffer.
The frame buffer is logically organized as 1024 scanlines of 16 or 32-bit values, regardless of the amount of memory installed on the board and the screen resolution. The drawable area is a rectangular subset of the frame buffer; its location depends on the location of the y origin. The remainder of the board’s memory (shaded area) is used as an auxiliary buffer that can be utilized as an alpha/depth buffer or as a third display buffer (triple buffering). This logical layout is independent of the user-specified origin location.
6Masking Writes to the Frame Buffer
Writes to the frame buffer and depth buffer can be selectively disabled and enabled. The Glide functions grColorMask() and grDepthMask() control buffer masking: FXTRUE values allow writes to the associated buffer, FXFALSE values disable writes to the associated buffer. Writes to the color and alpha buffers are controlled by grColorMask() whereas writes to the depth buffer are controlled by grDepthMask() (described in Chapter Chapter 7. ). Note that disabling writes to the alpha planes is the same as disabling writes to the depth planes since they both share the same memory.
void grColorMask( FxBool rgb, FxBool alpha )
void grDepthMask( FxBool enable )
grColorMask() specifies whether the color and/or alpha buffers can or cannot be written to during rendering operations. If rgb is FXFALSE, for example, no change is made to the color buffer regardless of the drawing operation attempted. The alpha parameter is ignored if depth buffering is enabled since the alpha and depth buffers share memory.
Share with your friends: |