virtual void lock(const GraphicContextPtr &gc, BufferAccess access)=0
Maps buffer into system memory.
Texture Transfer class.
Definition: staging_texture.h:57
virtual void upload_data(const GraphicContextPtr &gc, const Rect &dest_rect, const void *data)=0
Uploads data to buffer.
static std::shared_ptr< StagingTexture > create(const GraphicContextPtr &gc, int width, int height, StagingDirection direction=StagingDirection::to_gpu, TextureFormat texture_format=tf_rgba8, const void *data=nullptr, BufferUsage usage=usage_stream_draw)
Constructs a GPU Transfer Buffer.