ApertureOS
Functions | Variables
Graphics Library

Functions

void graphics_Initialize (void)
 Initialize the graphics library. More...
 
void graphics_SwapBuffer (void)
 Copy the backbuffer contents to the display buffer. More...
 
void graphics_Clear (void)
 Clear the backbuffer. More...
 
void graphics_SetPixel (uint32_t x, uint32_t y, uint32_t val)
 Set the value of a pixel. More...
 
void graphics_WriteUInt32 (uint32_t val, int base, int xOff, int yOff)
 Write a uint32_t to the screen. More...
 
void graphics_WriteUInt64 (uint64_t val, int base, int xOff, int yOff)
 Write a uint64_t to the screen. More...
 
void graphics_WriteStr (const char *str, int xOff, int yOff)
 Write a string to the screen. More...
 
void graphics_WriteFloat (float val, uint32_t decimalCount, int xOff, int yOff)
 Write a float to the screen. More...
 
void graphics_DrawBuffer (void *buffer, uint32_t x, uint32_t y, uint32_t width, uint32_t height)
 Draw a buffer to the screen. More...
 

Variables

unsigned char letters [95][13]
 A bitmap font. More...
 

Detailed Description

Function Documentation

void graphics_Clear ( void  )

Clear the backbuffer.

void graphics_DrawBuffer ( void *  buffer,
uint32_t  x,
uint32_t  y,
uint32_t  width,
uint32_t  height 
)

Draw a buffer to the screen.

Parameters
bufferThe RGBA source from which to draw
xThe X coordinate for the top left corner of the output
yThe Y coordinate for the top left corner of the output
widthThe width of the image to show
heightThe height of the image to show
void graphics_Initialize ( void  )

Initialize the graphics library.

Note: Requires virtual memory management and FPU

void graphics_SetPixel ( uint32_t  x,
uint32_t  y,
uint32_t  val 
)

Set the value of a pixel.

Parameters
xThe X pixel position
yThe Y pixel position
valThe BGRA pixel value
See also
graphics_DrawBuffer()
void graphics_SwapBuffer ( void  )

Copy the backbuffer contents to the display buffer.

void graphics_WriteFloat ( float  val,
uint32_t  decimalCount,
int  xOff,
int  yOff 
)

Write a float to the screen.

Parameters
valThe value to write
decimalCountThe number of decimal places to include
xOffThe X coordinate for the top left corner of the output
yOffThe Y coordinate for the top left corner of the output
See also
graphics_writeFloat(), graphics_WriteUInt32(), graphics_WriteUInt64()
void graphics_WriteStr ( const char *  str,
int  xOff,
int  yOff 
)

Write a string to the screen.

Parameters
strThe string to write
xOffThe X coordinate for the top left corner of the output
yOffThe Y coordinate for the top left corner of the output
See also
graphics_writeFloat(), graphics_WriteUInt32(), graphics_WriteUInt64()
void graphics_WriteUInt32 ( uint32_t  val,
int  base,
int  xOff,
int  yOff 
)

Write a uint32_t to the screen.

Parameters
valThe value to write
baseThe base in which the value should be printed
xOffThe X coordinate for the top left corner of the output
yOffThe Y coordinate for the top left corner of the output
See also
graphics_WriteUInt64(), graphics_WriteFloat(), graphics_WriteStr()
void graphics_WriteUInt64 ( uint64_t  val,
int  base,
int  xOff,
int  yOff 
)

Write a uint64_t to the screen.

Parameters
valThe value to write
baseThe base in which the value should be printed
xOffThe X coordinate for the top left corner of the output
yOffThe Y coordinate for the top left corner of the output
See also
graphics_WriteUInt32(), graphics_WriteFloat(), graphics_WriteStr()

Variable Documentation

unsigned char letters[95][13]

A bitmap font.