6#ifndef __LIBDRAGON_DISPLAY_H
7#define __LIBDRAGON_DISPLAY_H
63#define const static const
143#define ANTIALIAS_OFF FILTERS_DISABLED
148#define ANTIALIAS_RESAMPLE FILTERS_RESAMPLE
153#define ANTIALIAS_RESAMPLE_FETCH_NEEDED FILTERS_RESAMPLE_ANTIALIAS
158#define ANTIALIAS_RESAMPLE_FETCH_ALWAYS FILTERS_RESAMPLE_ANTIALIAS_DEDITHER
274__attribute__((deprecated(
"use display_get or display_try_get instead")))
275static inline surface_t* display_lock(
void) {
int32_t width
Screen width (must be between 2 and 800)
Definition display.h:55
bool interlaced
True if interlaced mode enabled.
Definition display.h:59
int32_t height
Screen height (must be between 1 and 720)
Definition display.h:57
const resolution_t RESOLUTION_256x240
256x240 mode
Definition display.h:66
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.
Definition display.c:91
void display_close()
Close the display.
Definition display.c:259
const resolution_t RESOLUTION_640x480
640x480 mode, interlaced
Definition display.h:76
const resolution_t RESOLUTION_640x240
640x240 mode, high-res progressive
Definition display.h:72
gamma_t
Valid gamma correction settings.
Definition display.h:90
uint32_t display_get_num_buffers(void)
Get the currently configured number of buffers.
Definition display.c:411
filter_options_t
Valid display filter options.
Definition display.h:111
void display_show(surface_t *surf)
Display a buffer on the screen.
Definition display.c:340
uint32_t display_get_width(void)
Get the currently configured width of the display in pixels.
Definition display.c:396
float display_get_fps(void)
Get the current number of frames per second being rendered.
Definition display.c:416
const resolution_t RESOLUTION_512x240
512x240 mode, high-res progressive
Definition display.h:70
const resolution_t RESOLUTION_320x240
320x240 mode
Definition display.h:68
surface_t * display_try_get(void)
Try getting a display surface.
Definition display.c:295
surface_t * display_context_t
Display context (DEPRECATED: Use surface_t instead)
Definition display.h:167
bitdepth_t
Valid bit depths.
Definition display.h:81
const resolution_t RESOLUTION_512x480
512x480 mode, interlaced
Definition display.h:74
uint32_t display_get_bitdepth(void)
Get the currently configured bitdepth of the display (in bytes per pixels)
Definition display.c:406
surface_t * display_get(void)
Get a display buffer for rendering.
Definition display.c:326
uint32_t display_get_height(void)
Get the currently configured height of the display in pixels.
Definition display.c:401
@ GAMMA_CORRECT_DITHER
Corrected gamma with hardware dithered output.
Definition display.h:97
@ GAMMA_CORRECT
Corrected gamma, should be used on a 32-bit framebuffer only when assets have been produced in linear...
Definition display.h:95
@ GAMMA_NONE
Uncorrected gamma, should be used by default and with assets built by libdragon tools.
Definition display.h:92
@ FILTERS_RESAMPLE_ANTIALIAS_DEDITHER
Resize the output image with a bilinear filter (see FILTERS_RESAMPLE). Add a video interface anti-ali...
Definition display.h:129
@ FILTERS_RESAMPLE_ANTIALIAS
Resize the output image with a bilinear filter (see FILTERS_RESAMPLE). Add a video interface anti-ali...
Definition display.h:125
@ FILTERS_DEDITHER
Reconstruct a 32-bit output from dithered 16-bit framebuffer.
Definition display.h:120
@ FILTERS_RESAMPLE
Resize the output image with a bilinear filter. In general, VI is in charge of resizing the framebuff...
Definition display.h:118
@ FILTERS_DISABLED
All display filters are disabled.
Definition display.h:113
@ DEPTH_32_BPP
32 bits per pixel (8-8-8-8)
Definition display.h:85
@ DEPTH_16_BPP
16 bits per pixel (5-5-5-1)
Definition display.h:83
Video resolution structure.
Definition display.h:53
A surface buffer for graphics.
Definition surface.h:138