libtransistor
A userland library for the Nintendo Switch
|
Display surface data structures and functions. More...
Go to the source code of this file.
Data Structures | |
struct | surface_t |
A surface that can be drawn to. More... | |
Enumerations | |
enum | surface_state_t { SURFACE_STATE_INVALID, SURFACE_STATE_DEQUEUED, SURFACE_STATE_QUEUED } |
Keeps track of the internal state of a surface_t. | |
Functions | |
result_t | surface_create (surface_t *surface, uint64_t layer_id, igbp_t igbp) |
Create a new Surface. More... | |
result_t | surface_dequeue_buffer (surface_t *surface, uint32_t **image) |
Acquire a buffer for rendering. More... | |
result_t | surface_get_buffer_event (surface_t *surface, revent_h *out) |
Gets a copy of the buffer event. | |
result_t | surface_wait_buffer (surface_t *surface) |
Wait for any asynchronous operations on the current buffer to complete. More... | |
result_t | surface_queue_buffer (surface_t *surface) |
Submit the current buffer to be displayed. More... | |
void | surface_destroy (surface_t *surface) |
Display surface data structures and functions.
Create a new Surface.
surface | Structure to initialize |
layer_id | ID of the existing layer |
igbp | IGraphicBufferProducer to use for submitting buffers |
Acquire a buffer for rendering.
surface | Surface to dequeue buffer from |
image | Returns a pointer to the swizzled pixel data buffer to render to. |
Using gfx_slow_swizzling_blit is recommended. Call surface_queue_buffer when you're done rendering to submit it to be displayed.
Submit the current buffer to be displayed.
surface | Surface to submit buffer for |