class
TGpuTextureMappedScope
template<bool IsRenderProxy>RAII wrapper returned by Texture::Map operation.
Contains PixelData with mapped memory buffer. Automatically flushes on destruction for write operations. Move-only semantics. Templated to support both main thread and render thread variants.
Public
Constructors
TGpuTextureMappedScope<IsRenderProxy>
TGpuTextureMappedScope<IsRenderProxy>() = default
TGpuTextureMappedScope<IsRenderProxy>
TGpuTextureMappedScope<IsRenderProxy>(PixelData pixelData, SPtr<TextureType> texture, GpuTextureSubresource subresource, GpuMapOptions options)
TGpuTextureMappedScope<IsRenderProxy>
Methods
~TGpuTextureMappedScope<IsRenderProxy>
~TGpuTextureMappedScope<IsRenderProxy>()
Unmap
void Unmap()
Explicitly releases the mapping.
Safe to call multiple times. Flushes if write mapping.
GetPixelData
GetSubresource
Returns the subresource being mapped.
IsValid
bool IsValid() const
Returns true if the mapping is valid.
Operators
operator=
TGpuTextureMappedScope<IsRenderProxy> &operator=(TGpuTextureMappedScope<IsRenderProxy> &&other) noexcept
operator bool
explicit operator bool() const
Private
Fields
mPixelData
PixelData mPixelData
mTexture
SPtr<TextureType> mTexture
mSubresource
GpuTextureSubresource mSubresource
mOptions
GpuMapOptions mOptions