#include <cubemapfromfile.h>
Public Member Functions | |
virtual | ~CubeMapFromFile () |
CubeMapFromFile (Core &core) | |
virtual bool | init (utility::ErrorState &errorState) override |
virtual void | onDestroy () override |
Texture2D & | getSourceTexture () const |
![]() | |
RenderTextureCube (Core &core) | |
![]() | |
TextureCube (Core &core) | |
virtual | ~TextureCube () override |
bool | init (const SurfaceDescriptor &descriptor, bool generateMipMaps, const glm::vec4 &clearColor, VkImageUsageFlags requiredFlags, utility::ErrorState &errorState) |
const glm::vec2 | getSize () const |
int | getWidth () const |
int | getHeight () const |
VkImageUsageFlags | getImageUsageFlags () const |
virtual uint | getLayerCount () const override |
virtual uint | getMipLevels () const override |
virtual const ImageData & | getHandle () const override |
virtual ImageData & | getHandle () override |
![]() | |
Texture (Core &core) | |
virtual | ~Texture () |
virtual VkImageLayout | getTargetLayout () const |
VkFormat | getFormat () const |
const SurfaceDescriptor & | getDescriptor () const |
RenderService & | getRenderService () |
const RenderService & | getRenderService () const |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
std::string | mImagePath |
Property: 'ImagePath' Path to the image on disk to load. More... | |
bool | mSampleShading = false |
Property: 'SampleShading' Reduces texture aliasing when enabled, at higher computational cost. More... | |
bool | mGenerateLODs |
![]() | |
int | mWidth = 0 |
Property: 'Width' width of a cube face texture in texels. More... | |
int | mHeight = 0 |
Property: 'Height' of a cube face texture in texels. More... | |
EColorSpace | mColorSpace = EColorSpace::Linear |
Property: 'ColorSpace' texture color space. More... | |
EFormat | mColorFormat = EFormat::RGBA8 |
Property: 'ColorFormat' color texture format. More... | |
RGBAColorFloat | mClearColor = { 0.0f, 0.0f, 0.0f, 0.0f } |
Property: 'ClearColor' color selection used for clearing the texture. More... | |
![]() | |
const EUsage | mUsage = EUsage::Static |
Texture usage (cube maps are currently always static) More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
enum | EFormat { RGBA8, BGRA8, R8, RGBA16, R16, RGBA32, R32 } |
![]() | |
enum | EUsage { Static, DynamicRead, DynamicWrite } |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
![]() | |
static constexpr const uint | layerCount = 6 |
![]() | |
virtual void | clear (VkCommandBuffer commandBuffer) |
void | requestClear () |
![]() | |
bool | mGenerateLODs = false |
![]() | |
ImageData | mImageData = { TextureCube::layerCount } |
Cube Texture vulkan image buffers. More... | |
uint32 | mMipLevels = 1 |
Total number of generated mip-maps. 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... | |
Loads equirectangular image from disk, uploads it to the GPU, and schedules a rendering operation to generate a cube map from it in the nap::RenderAdvancedService
. If GenerateLODs
is enabled, GPU memory for mip-maps (LODs) are allocated and will be updated using blit operations after the cube face render passes.
This object must be pre-rendered at least once in a headless render pass in the first frame. The RenderAdvanced service queues a headless RenderService::RenderCommand
for each nap::CubeMapFromFile
in the scene after resource initialization, and will be handled when headless render commands are recorded. The code below only begins a headless recording operation only when headless commands are queued in the render service.
|
virtual |
CubeMapFromFile | ( | Core & | core | ) |
core | the core instance |
Texture2D& getSourceTexture | ( | ) | const |
|
overridevirtual |
Loads the image from disk and schedules the upload to the GPU on success.
errorState | contains the error when initialization fails |
Reimplemented from RenderTextureCube.
|
overridevirtual |
Deregisters this CubeMapFromFile
Reimplemented from Texture.
bool mGenerateLODs |
std::string mImagePath |
Property: 'ImagePath' Path to the image on disk to load.
bool mSampleShading = false |
Property: 'SampleShading' Reduces texture aliasing when enabled, at higher computational cost.