template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
class Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >
Implementation of primitive operations on a memory area used as framebuffer.
The implementation as template class allows the compiler to heavily optimize the bit operations depending on the video mode.
- Template Parameters
-
COLORDEPTH | color depth of video mode |
OFFSET_RED | Bit position of red color mask in video mode |
OFFSET_GREEN | Bit position of green color mask in video mode |
OFFSET_BLUE | Bit position of blue color mask in video mode |
BITS_RED | Size of red color mask in video mode |
BITS_GREEN | Size of green color mask in video mode |
BITS_BLUE | Size of blue color mask in video mode |
template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
void Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::init |
( |
const unsigned |
width, |
|
|
const unsigned |
height, |
|
|
const unsigned |
pitch |
|
) |
| |
|
inlineprotected |
Initialize screen dimensions.
- Parameters
-
width | visible width of graphics screen |
height | visible height of graphics screen |
pitch | width of graphics screen (including invisible part, has to be at least width ) |
template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
void Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::buffer |
( |
void * |
lfb | ) |
|
|
inlineprotected |
Set the video memory address.
- Parameters
-
lfb | pointer to the linear framebuffer (lfb) |