Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::RendererSoftware16 Class Reference

16 bit software renderer More...

Inheritance diagram for Burger::RendererSoftware16:
Collaboration diagram for Burger::RendererSoftware16:

Public Member Functions

 RendererSoftware16 (void)
 Default constructor.
 
- Public Member Functions inherited from Burger::Renderer
 Renderer (void)
 Default constructor.
 
virtual ~Renderer ()
 Default destructor.
 
virtual uint_t Init (uint_t uWidth, uint_t uHeight, uint_t uDepth, uint_t uFlags)
 Initialize a renderer.
 
virtual void Shutdown (void)
 Shut down a renderer.
 
virtual void BeginScene (void)
 Start up a renderer for a frame.
 
virtual void EndScene (void)
 Wrap up frame rendering.
 
virtual void Draw8BitPixels (int iX, int iY, uint_t uWidth, uint_t uHeight, uintptr_t uStride, const uint8_t *pPixels)
 Draw 8 bit data onto the software buffer.
 
virtual void Draw8BitPixelsMasked (int iX, int iY, uint_t uWidth, uint_t uHeight, uintptr_t uStride, const uint8_t *pPixels)
 Draw 8 bit data onto the software buffer.
 
virtual void DrawPixel (int iX, int iY, uint_t uColorIndex)
 Draw an 8 bit pixel onto the software buffer.
 
virtual void DrawRect (int iX, int iY, uint_t uWidth, uint_t uHeight, uint_t uColorIndex)
 Draw 8 bit color rectangle.
 
virtual void Clear (uint_t uColorIndex)
 Clear the entire screen to a solid color.
 
DisplayGetDisplay (void) const noexcept
 Get the pointer to the attached video display.
 
void SetDisplay (Display *pDisplay) noexcept
 Set the pointer to the attached display.
 
void * GetFrameBuffer (void) const noexcept
 Get the base pointer to the frame buffer.
 
void SetFrameBuffer (void *pFrameBuffer) noexcept
 Set the base pointer to the frame buffer.
 
uintptr_t GetStride (void) const noexcept
 Get the width in bytes of the display buffer scan line.
 
void SetStride (uintptr_t uStride) noexcept
 Set the width in bytes of the display buffer scan line.
 
uint_t GetWidth (void) const noexcept
 Get the width in pixels for the rendering context.
 
uint_t GetHeight (void) const noexcept
 Get the height in pixels for the rendering context.
 
uint_t GetDepth (void) const noexcept
 Get the depth in bits for this renderer.
 
uint_t GetFlags (void) const noexcept
 Get the state flags for the renderer.
 
const Rect_tGetClip (void) const noexcept
 Return the current clip rectangle.
 
void GetClip (Rect_t *pOutput) const
 Return the current clip rectangle.
 
void SetClip (const Rect_t *pInput)
 Set the current clip rectangle.
 
void SetClip (int iLeft, int iTop, int iRight, int iBottom)
 Set the current clip rectangle.
 
void DrawShape8Bit (int iX, int iY, RezFile *pRezFile, uint_t uRezNum)
 Draw a Shape8Bit_t image from a resource file.
 
void DrawShape8BitCentered (RezFile *pRezFile, uint_t uRezNum)
 Draw a Shape8Bit_t image from a resource file centered on the screen.
 
void DrawShape8BitMasked (int iX, int iY, RezFile *pRezFile, uint_t uRezNum)
 Draw a masked Shape8Bit_t image from a resource file.
 
void DrawShape8BitMaskedCentered (RezFile *pRezFile, uint_t uRezNum)
 Draw a masked Shape8Bit_t image from a resource file centered on the screen.
 

Additional Inherited Members

- Static Public Attributes inherited from Burger::Renderer
static const uint_t ByteSquareTable [255+256]
 Table of squares from -255 to 255.
 
static const uint8_t RGB2ToRGB3Table [4] = {0x00, 0x02, 0x05, 0x07}
 Table to convert 2 bit color to 3 bit color.
 
static const uint8_t RGB2ToRGB4Table [4] = {0x00,0x05,0x0A,0x0F}
 Table to convert 2 bit color to 4 bit color.
 
static const uint8_t RGB2ToRGB5Table [4] = {0x00,0x0A,0x15,0x1F}
 Table to convert 2 bit color to 5 bit color.
 
static const uint8_t RGB2ToRGB6Table [4] = {0x00,0x15,0x2A,0x3F}
 Table to convert 2 bit color to 6 bit color.
 
static const uint8_t RGB2ToRGB8Table [4] = {0x00,0x55,0xAA,0xFF}
 Table to convert 2 bit color to 8 bit color.
 
static const uint8_t RGB3ToRGB4Table [8] = {0x00,0x02,0x04,0x06,0x09,0x0B,0x0D,0x0F}
 Table to convert 3 bit color to 4 bit color.
 
static const uint8_t RGB3ToRGB5Table [8] = {0x00,0x04,0x09,0x0D,0x12,0x16,0x1B,0x1F}
 Table to convert 3 bit color to 5 bit color.
 
static const uint8_t RGB3ToRGB6Table [8] = {0x00,0x09,0x12,0x1B,0x24,0x2D,0x36,0x3F}
 Table to convert 3 bit color to 6 bit color.
 
static const uint8_t RGB3ToRGB8Table [8] = {0x00,0x24,0x49,0x6D,0x92,0xB6,0xDB,0xFF}
 Table to convert 3 bit color to 8 bit color.
 
static const uint8_t RGB4ToRGB5Table [16]
 Table to convert 4 bit color to 5 bit color.
 
static const uint8_t RGB4ToRGB6Table [16]
 Table to convert 4 bit color to 6 bit color.
 
static const uint8_t RGB4ToRGB8Table [16]
 Table to convert 4 bit color to 8 bit color.
 
static const uint8_t RGB5ToRGB6Table [32]
 Table to convert 5 bit color to 6 bit color.
 
static const uint8_t RGB5ToRGB8Table [32]
 Table to convert 5 bit color to 8 bit color.
 
static const uint8_t RGB6ToRGB8Table [64]
 Table to convert 6 bit color to 8 bit color.
 
- Protected Member Functions inherited from Burger::Renderer
virtual void UpdateClip (void)
 Update the clip rect to the operating system API.
 
- Protected Attributes inherited from Burger::Renderer
Rect_t m_Clip
 Bounds rectangle for clipping.
 
Displaym_pDisplay
 Attached display.
 
void * m_pFrameBuffer
 Pointer to the software frame buffer (If supported)
 
uintptr_t m_uStride
 Width in BYTES of the display buffer (For software rendering)
 
uint_t m_uWidth
 Width in pixels of the display buffer.
 
uint_t m_uHeight
 Height in pixels of the display buffer.
 
uint_t m_uDepth
 Depth in bits of the display buffer.
 
uint_t m_uFlags
 Flags for describing available features.
 

Detailed Description

16 bit software renderer


This class contains functions to draw pixels in a 16 bit R:G:B buffer. It is 100% software driven, no hardware assist is performed at all

See also
Renderer, RendererOpenGL and RendererSoftware8

Constructor & Destructor Documentation

◆ RendererSoftware16()

Burger::RendererSoftware16::RendererSoftware16 ( void )

Default constructor.


Initializes all of the shared variables