|
| | Image (Core &core) |
| |
| Bitmap & | getBitmap () |
| |
| void | update () |
| |
| void | asyncGetData () |
| |
| void | update (const void *data, int width, int height, int pitch, ESurfaceChannels channels) |
| |
| void | update (const void *data, const SurfaceDescriptor &surfaceDescriptor) |
| |
| void | asyncGetData (Bitmap &bitmap) |
| |
| void | asyncGetData (std::function< void(const void *, size_t)> copyFunction) |
| |
| | Texture2D (Core &core) |
| |
| virtual | ~Texture2D () override |
| |
| bool | init (const SurfaceDescriptor &descriptor, EUsage usage, int mipCount, const glm::vec4 &clearColor, VkImageUsageFlags requiredFlags, utility::ErrorState &errorState) |
| |
| bool | init (const SurfaceDescriptor &descriptor, EUsage usage, int mipCount, void *initialData, VkImageUsageFlags requiredFlags, utility::ErrorState &errorState) |
| |
| const glm::vec2 | getSize () const |
| |
| int | getWidth () const |
| |
| int | getHeight () const |
| |
| void | update (const void *data, int width, int height, int pitch, ESurfaceChannels channels) |
| |
| void | update (const void *data, const SurfaceDescriptor &surfaceDescriptor) |
| |
| virtual uint | getLayerCount () const override |
| |
| virtual uint | getMipLevels () const override |
| |
| virtual const ImageData & | getHandle () const override |
| |
| void | asyncGetData (Bitmap &bitmap) |
| |
| void | asyncGetData (std::function< void(const void *, size_t)> copyFunction) |
| |
| bool | init (const SurfaceDescriptor &descriptor, EUsage usage, bool mipCount, const glm::vec4 &clearColor, VkImageUsageFlags requiredFlags, utility::ErrorState &errorState)=delete |
| |
| bool | init (const SurfaceDescriptor &descriptor, EUsage usage, bool mipCount, void *initialData, VkImageUsageFlags requiredFlags, utility::ErrorState &errorState)=delete |
| |
| | Texture (Core &core) |
| |
| virtual | ~Texture () |
| |
| VkFormat | getFormat () const |
| |
| const SurfaceDescriptor & | getDescriptor () const |
| |
| RenderService & | getRenderService () |
| |
| const RenderService & | getRenderService () const |
| |
| virtual void | onDestroy () override |
| |
| | Resource () |
| |
| | Object () |
| |
| virtual | ~Object () |
| |
| virtual bool | init (utility::ErrorState &errorState) |
| |
| | Object (Object &)=delete |
| |
| Object & | operator= (const Object &)=delete |
| |
| | Object (Object &&)=delete |
| |
| Object & | operator= (Object &&)=delete |
| |
|
| enum | EUsage { Static = 0,
DynamicRead = 1,
DynamicWrite = 2,
Internal = 3
} |
| |
| static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
| |
| nap::Signal | textureDestroyed |
| | Signal that is triggered before texture is destroyed. More...
|
| |
| std::string | mID |
| | Property: 'mID' unique name of the object. Used as an identifier by the system. More...
|
| |
| using | TextureReadCallback = std::function< void(void *data, size_t sizeInBytes)> |
| |
| virtual ImageData & | getHandle () override |
| |
| bool | initInternal (const SurfaceDescriptor &descriptor, EUsage usage, int mipCount, VkImageUsageFlags requiredFlags, utility::ErrorState &errorState) |
| |
| void | upload (VkCommandBuffer commandBuffer) |
| |
| void | download (VkCommandBuffer commandBuffer) |
| |
| void | notifyDownloadReady (int frameIndex) |
| |
| void | clearDownloads () |
| |
| virtual void | clear (VkCommandBuffer commandBuffer) |
| |
| void | requestClear () |
| |
| ImageData | mImageData |
| | 2D Texture vulkan image buffers More...
|
| |
| std::vector< BufferData > | mStagingBuffers |
| | All vulkan staging buffers, 1 when static or using dynamic read, no. of frames in flight when dynamic write. More...
|
| |
| int | mCurrentStagingBufferIndex = -1 |
| | Currently used staging buffer. More...
|
| |
| size_t | mImageSizeInBytes = -1 |
| | Size in bytes of texture. More...
|
| |
| std::vector< TextureReadCallback > | mReadCallbacks |
| | Number of callbacks based on number of frames in flight. More...
|
| |
| std::vector< int > | mDownloadStagingBufferIndices |
| | Staging buffer indices associated with a frameindex. More...
|
| |
| uint32 | mMipLevels = 1 |
| | Total number of generated mip-maps. More...
|
| |
| EUsage | mUsage |
| | Intented texture usage. More...
|
| |
| RenderService & | mRenderService |
| | Reference to the render service. More...
|
| |
| SurfaceDescriptor | mDescriptor |
| | Texture description. More...
|
| |
| VkFormat | mFormat = VK_FORMAT_UNDEFINED |
| | Vulkan texture format. More...
|
| |
| VkClearColorValue | mClearColor = { 0.0f, 0.0f, 0.0f, 0.0f } |
| | Color used for clearing the texture. More...
|
| |
Represents both CPU and GPU data of a texture. The CPU data is stored internally as a bitmap and is optional. GPU textures can be read back to CPU using the asyncGetData() function. This will fill the internal bitmap with the data read-back from the GPU. To update the GPU texture, update the bitmap (using getBitmap()) and call update() afterwards. The format & size of the CPU and GPU textures are guaranteed to match afterwards.