Epok Engine

PSYQO SDK

psyqo::GPU::uploadToVRAM

Method · 2 overloads

Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.

Method

Uploads a buffer to the VRAM as a blocking call.

Belongs to
psyqo::GPU
Header
gpu.hh
Overloads
2

Declaration 1 of 2

Declaration
void uploadToVRAM(const uint16_t *data, Rect region)

Uploads a buffer to the VRAM as a blocking call.

ParameterTypeMeaning
dataconst uint16_t *The pixels to upload. Must be a contiguous array of 16-bpp pixels, with the number of pixels being equal to the area specified by the `region` parameter.
regionRectThe region in VRAM to upload the pixels to.

Returns: Nothing (void).

Example sketch

C++ example
#include "psyqo/gpu.hh"

// Assume these named values have been initialized with valid data:
// const uint16_t * data
// Rect region

psyqo::GPU& object = /* obtain a valid instance */;

object.uploadToVRAM(data, region);

Trade-offs and warnings

Consult the linked header for this operation’s ownership, lifetime and failure behavior.

Declared in https://github.com/epokengine/nugget/blob/4a01183295182b8e7702c908e1efaaa8f4538ffd/psyqo/gpu.hh:187

Declaration 2 of 2

Declaration
void uploadToVRAM(const uint16_t *data, Rect region, eastl::function<void()> &&callback, DMA::DmaCallback dmaCallback = DMA::FROM_MAIN_LOOP)

Uploads a buffer to the VRAM as a non-blocking call.

ParameterTypeMeaning
dataconst uint16_t *The pixels to upload. Must be a contiguous array of 16-bpp pixels, with the number of pixels being equal to the area specified by the `region` parameter.
regionRectThe region in VRAM to upload the pixels to.
callbackeastl::function<void ()> &&The callback to call upon completion.
dmaCallbackDMA::DmaCallback`DMA::FROM_MAIN_LOOP` or `DMA::FROM_ISR`.

Returns: Nothing (void).

Example sketch

C++ example
#include "psyqo/gpu.hh"

// Assume these named values have been initialized with valid data:
// const uint16_t * data
// Rect region
// eastl::function<void ()> && callback
// DMA::DmaCallback dmaCallback

psyqo::GPU& object = /* obtain a valid instance */;

object.uploadToVRAM(data, region, callback, dmaCallback);

Trade-offs and warnings

Consult the linked header for this operation’s ownership, lifetime and failure behavior.

Declared in https://github.com/epokengine/nugget/blob/4a01183295182b8e7702c908e1efaaa8f4538ffd/psyqo/gpu.hh:212

Related members