Click or drag to resize
Ab4d.SharpEngine logo

GpuImage Class

GpuImage represents an image that is stored in the graphics card's memory.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.Core
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public class GpuImage : GpuDeviceComponent, IDisposable

The GpuImage type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyHasTransparentPixels Gets or sets (only at init time) a Boolean that indicates that the GpuImage has some transparent pixels, e. g. pixels with alpha color smaller than 1. This means that to show this GpuImage correctly some alpha-blending technique is required.
Public propertyHeight Height of the image in pixels
Public propertyImage Gets the Vulkan Image.
Public propertyImageMemory Gets the VulkanMemoryInfo that represents the memory location of the buffer
Public propertyImageView Gets the Vulkan ImageView.
Public propertyIsGpuDeviceCached Gets a Boolean that indicates that this GpuImage is cashed by the GpuDevice objects and cannot be disposed by calling Dispose method. This means the GpuImage can be shared without worrying that someone will dispose this GpuImage or that it will be disposed when the Scene is disposed. This flag is set when the GpuImage is cached by calling CacheObject(String, Object) method. By default the Source is used as the cache key. The GpuImage will be disposed when the GpuDevice will be disposed or if it is removed from the cache and then disposed.
Public propertyIsPreMultipliedAlpha Gets or sets (only at init time) a Boolean that indicates that the colors in this GpuImage are alpha-premultiplied. This means that the red, green and blue values are multiplied by the alpha value.
Public propertyIsSceneCached Gets a Boolean that indicates that this GpuImage is cashed by Scene objects and cannot be disposed by calling Dispose method. This means the GpuImage can be shared without worrying that someone will dispose this GpuImage. This flag is set when the GpuImage is cached by calling Scene.CacheObject(String, Object) method. By default the Source is used as the cache key. The GpuImage will be disposed when the Scene will be disposed or if it is removed from the cache and then disposed.
Public propertyMemorySize User memory size in bytes
Public propertySource Source can contain file name or other string that defines the source of this GpuImage.
Public propertyWidth Width of the image in pixels
Top
Methods
 NameDescription
Public methodCopyDataFromImage Copies data from image to the specified byte array.
Public methodCopyDataToImage(Byte) Copies the data from the specified byte array to this image.
Public methodCopyDataToImage(Byte, Boolean) Copies the data from the specified byte array to this image.
Public methodCopyDataToImage(Byte, ImageLayout, AccessFlags, PipelineStageFlags) Copies the data from the specified byte array to this image and set the layout of the image to the specified values.
Public methodCopyDataToImageMipMaps Copies the data from the array of byte array to the mip maps of this image.
Public methodDispose 
Protected methodDispose(Boolean) Dispose
(Overrides ComponentBaseDispose(Boolean))
Public methodGetCurrentImageLayoutAndFlags Gets the current image layout
Public methodStatic memberGetImageAspectFlags Returns the ImageAspectFlags for the specified format.
Public methodGetImageLayout Returns information about the layout of the image for the specified mip level.
Public methodGetImageRowStride Returns a row stride (number of bytes in one row of image data) of the image for the specified mip level.
Public methodGetMappedMemoryPtr Returns an IntPtr of the mapped memory. The IntPtr can be used to get the content of this image or to copy new content to that location. After using the memory call UnmapMemory method.
Public methodGetMappedMemoryPtr(Int64, Int64) Returns an IntPtr of the mapped memory with specified offset and size. The IntPtr can be used to get the content of this image or to copy new content to that location. After using the memory call UnmapMemory method.
Public methodGetMappedMemorySpan Returns a Span that can be used to get the content of this image or copy new content to that location. After using the memory call UnmapMemory method.
Public methodGetMappedMemorySpan(Void, Byte) 
Public methodResize Resizes this image
Public methodToString
(Overrides ObjectToString)
Public methodUnmapMemory Unmaps the memory that was mapped by calling GetMappedMemoryPtr.
Top
Fields
 NameDescription
Public fieldImageCreateInfo Gets the ImageCreateInfo that was used to create this GpuImage
Top
See Also