Nebula
Loading...
Searching...
No Matches
texture.h File Reference

Go to the source code of this file.

Classes

struct  CoreGraphics::TextureId
 texture type More...
 
struct  CoreGraphics::TextureDimensions
 
struct  CoreGraphics::TextureRelativeDimensions
 
struct  CoreGraphics::TextureSwizzle
 
struct  CoreGraphics::DepthStencilClear
 
struct  CoreGraphics::TextureCreateInfo
 
struct  CoreGraphics::TextureCreateInfoAdjusted
 
struct  CoreGraphics::TextureSparsePageSize
 
struct  CoreGraphics::TextureSparsePageOffset
 
struct  CoreGraphics::TextureSparsePage
 

Namespaces

namespace  CoreGraphics
 Acceleration structures are used to enable ray tracing on the GPU by dividing the scene into a BVH.
 

Enumerations

enum  CoreGraphics::TextureType {
  CoreGraphics::InvalidTextureType , CoreGraphics::Texture1D , CoreGraphics::Texture2D , CoreGraphics::Texture3D ,
  CoreGraphics::TextureCube , CoreGraphics::Texture1DArray , CoreGraphics::Texture2DArray , CoreGraphics::TextureCubeArray
}
 texture types More...
 
enum  CoreGraphics::TextureCubeFace {
  CoreGraphics::PosX = 0 , CoreGraphics::NegX , CoreGraphics::PosY , CoreGraphics::NegY ,
  CoreGraphics::PosZ , CoreGraphics::NegZ
}
 cube map face More...
 
enum  CoreGraphics::TextureUsage {
  CoreGraphics::InvalidTextureUsage = 0x0 , CoreGraphics::SampleTexture = 0x1 , CoreGraphics::RenderTexture = 0x2 , CoreGraphics::ReadWriteTexture = 0x4 ,
  CoreGraphics::TransferSourceTexture = 0x8 , CoreGraphics::TransferDestinationTexture = 0x10 , CoreGraphics::DeviceExclusive = 0x20
}
 type of texture usage More...
 
enum class  CoreGraphics::TextureChannelMapping {
  CoreGraphics::None , CoreGraphics::Red , CoreGraphics::Green , CoreGraphics::Blue ,
  CoreGraphics::Alpha , CoreGraphics::Zero , CoreGraphics::One
}
 

Functions

 CoreGraphics::_DECL_ACQUIRE_RELEASE (TextureId)
 
 CoreGraphics::__ImplementEnumBitOperators (CoreGraphics::TextureUsage)
 
const TextureId CoreGraphics::CreateTexture (const TextureCreateInfo &info)
 create new vertex buffer with intended usage, access and CPU syncing parameters, together with size of buffer
 
void CoreGraphics::DestroyTexture (const TextureId id)
 destroy vertex buffer
 
Util::StringAtom CoreGraphics::TextureGetName (const TextureId id)
 Get name of texture.
 
TextureDimensions CoreGraphics::TextureGetDimensions (const TextureId id)
 get texture dimensions
 
TextureRelativeDimensions CoreGraphics::TextureGetRelativeDimensions (const TextureId id)
 get texture relative dimensions
 
CoreGraphics::PixelFormat::Code CoreGraphics::TextureGetPixelFormat (const TextureId id)
 get texture pixel format
 
TextureType CoreGraphics::TextureGetType (const TextureId id)
 get texture type
 
SizeT CoreGraphics::TextureGetNumMips (const TextureId id)
 get number of mips
 
SizeT CoreGraphics::TextureGetNumLayers (const TextureId id)
 get number of layers
 
SizeT CoreGraphics::TextureGetNumSamples (const TextureId id)
 get sample count
 
const CoreGraphics::TextureId CoreGraphics::TextureGetAlias (const TextureId id)
 get texture alias, returns invalid id if not aliased
 
const CoreGraphics::TextureUsage CoreGraphics::TextureGetUsage (const TextureId id)
 get texture usage
 
const CoreGraphics::ImageLayout CoreGraphics::TextureGetDefaultLayout (const TextureId id)
 get default texture layout
 
uint CoreGraphics::TextureGetBindlessHandle (const TextureId id)
 get bindless texture handle
 
uint CoreGraphics::TextureGetStencilBindlessHandle (const TextureId id)
 get bindless texture handle
 
void CoreGraphics::TextureWindowResized (const TextureId id)
 If texture is bound to the window resolution, reset the internal texture without mucking with the texture id.
 
void CoreGraphics::TextureGenerateMipmaps (const CoreGraphics::CmdBufferId cmdBuf, const TextureId id)
 generate mipmaps for texture
 
TextureSparsePageSize CoreGraphics::TextureSparseGetPageSize (const CoreGraphics::TextureId id)
 get the texture page size, which is constant for the whole texture
 
IndexT CoreGraphics::TextureSparseGetPageIndex (const CoreGraphics::TextureId id, IndexT layer, IndexT mip, IndexT x, IndexT y, IndexT z)
 get the page index at a given coordinate
 
const TextureSparsePageCoreGraphics::TextureSparseGetPage (const CoreGraphics::TextureId id, IndexT layer, IndexT mip, IndexT pageIndex)
 get texture page
 
SizeT CoreGraphics::TextureSparseGetNumPages (const CoreGraphics::TextureId id, IndexT layer, IndexT mip)
 get the number of pages for a given layer and mip
 
IndexT CoreGraphics::TextureSparseGetMaxMip (const CoreGraphics::TextureId id)
 get highest sparse mip
 
void CoreGraphics::TextureSparseEvict (const CoreGraphics::TextureId id, IndexT layer, IndexT mip, IndexT pageIndex)
 evict a page
 
void CoreGraphics::TextureSparseMakeResident (const CoreGraphics::TextureId id, IndexT layer, IndexT mip, IndexT pageIndex)
 make a page resident
 
void CoreGraphics::TextureSparseEvictMip (const CoreGraphics::TextureId id, IndexT layer, IndexT mip)
 evict a whole mip
 
void CoreGraphics::TextureSparseMakeMipResident (const CoreGraphics::TextureId id, IndexT layer, IndexT mip)
 make a whole mip resident
 
void CoreGraphics::TextureSparseCommitChanges (const CoreGraphics::TextureId id)
 commit texture sparse page updates
 
bool CoreGraphics::TextureUpdate (const CoreGraphics::CmdBufferId cmd, CoreGraphics::TextureId tex, const SizeT width, SizeT height, SizeT mip, SizeT layer, const void *data, SizeT dataSize)
 Update texture from data buffer, returns true if there is enough upload heap space.
 
void CoreGraphics::TextureClearColor (const CoreGraphics::CmdBufferId cmd, const CoreGraphics::TextureId id, Math::vec4 color, const CoreGraphics::ImageLayout layout, const CoreGraphics::TextureSubresourceInfo &subres)
 clear texture with color
 
void CoreGraphics::TextureClearDepthStencil (const CoreGraphics::CmdBufferId cmd, const CoreGraphics::TextureId id, float depth, uint stencil, const CoreGraphics::ImageLayout layout, const CoreGraphics::TextureSubresourceInfo &subres)
 clear texture with depth-stencil
 
TextureCreateInfoAdjusted CoreGraphics::TextureGetAdjustedInfo (const TextureCreateInfo &info)
 helper function to setup RenderTextureInfo, already implemented
 
void CoreGraphics::TextureSetHighestLod (const CoreGraphics::TextureId id, uint lod)
 Set highest LOD on texture.
 
TextureType CoreGraphics::TextureTypeFromString (const Util::String &string)
 
TextureUsage CoreGraphics::TextureUsageFromString (const Util::String &string)
 

Variables

static const ubyte CoreGraphics::TextureAutoMips = 0xFF