libdragon
Loading...
Searching...
No Matches
Macros | Functions
display.c File Reference

Display Subsystem. More...

Macros

#define NUM_BUFFERS   32
 Maximum number of video backbuffers.
 
#define FPS_WINDOW   32
 Number of past frames used to evaluate FPS.
 

Functions

void display_init (resolution_t res, bitdepth_t bit, uint32_t num_buffers, gamma_t gamma, filter_options_t filters)
 Initialize the display to a particular resolution and bit depth.
 
void display_close ()
 Close the display.
 
surface_tdisplay_try_get (void)
 Try getting a display surface.
 
surface_tdisplay_get (void)
 Get a display buffer for rendering.
 
void display_show (surface_t *surf)
 Display a buffer on the screen.
 
void display_show_force (display_context_t disp)
 Force-display a previously locked buffer.
 
uint32_t display_get_width (void)
 Get the currently configured width of the display in pixels.
 
uint32_t display_get_height (void)
 Get the currently configured height of the display in pixels.
 
uint32_t display_get_bitdepth (void)
 Get the currently configured bitdepth of the display (in bytes per pixels)
 
uint32_t display_get_num_buffers (void)
 Get the currently configured number of buffers.
 
float display_get_fps (void)
 Get the current number of frames per second being rendered.
 

Detailed Description

Display Subsystem.

Function Documentation

◆ display_show_force()

void display_show_force ( display_context_t  disp)

Force-display a previously locked buffer.

Display a valid display context to the screen right away, without waiting for vblank interrupt. This function works also with interrupts disabled.

NOTE: this is currently not part of the public API as we use it only internally.

Parameters
[in]dispA display context retrieved using display_get