85 friend struct ResourceLoader;
87 friend class ImplResourceLoader;
96 static void OnShutdown() noexcept;
97 [[nodiscard]] static
bool UseTextureDDSCache() noexcept;
98 [[nodiscard]] static
Handle<
Texture> DefaultTexture2D() noexcept;
99 [[nodiscard]] static
Handle<
Texture> DefaultTexture2DArray() noexcept;
104 void createWithData( const ImageTools::ImageData& imageData, const
PixelAlignment& pixelUnpackAlignment );
105 void createWithData( const
Byte* data,
size_t dataSize, const
vec2<
U16>& dimensions, const
PixelAlignment& pixelUnpackAlignment );
106 void createWithData( const
Byte* data,
size_t dataSize, const
vec3<
U16>& dimensions, const
PixelAlignment& pixelUnpackAlignment );
111 void setSampleCount(
U8 newSampleCount );
113 [[nodiscard]]
ImageView getView() const noexcept;
136 [[nodiscard]]
U8 numChannels() const noexcept;
139 bool postLoad() override;
142 bool loadFile( const
ResourcePath& path,
std::string_view name, ImageTools::ImageData& fileData );
143 bool checkTransparency( const
ResourcePath& path,
std::string_view name, ImageTools::ImageData& fileData );
147 void validateDescriptor();
149 virtual
void loadDataInternal( const ImageTools::ImageData& imageData, const
vec3<
U16>& offset, const
PixelAlignment& pixelUnpackAlignment ) = 0;
151 virtual
void prepareTextureData(
U16 width,
U16 height,
U16 depth,
bool emptyAllocation );
152 virtual
void submitTextureData();
155 static
bool s_useDDSCache;
159 static
Str<64> s_missingTextureFileName;
169 Texture::s_useDDSCache = state;
static void UseTextureDDSCache(const bool state) noexcept
Rough around the edges Adapter pattern abstracting the actual rendering API and access to the GPU.
The kernel is the main system that connects all of our various systems: windows, gfx,...
An API-independent representation of a texture.
const char * TextureFilterToString(TextureFilter filter) noexcept
const char * WrapModeToString(TextureWrap wrapMode) noexcept
TextureMipSampling StringToTextureMipSampling(const string &sampling)
const char * TextureMipSamplingToString(TextureMipSampling sampling) noexcept
TextureWrap StringToWrapMode(const string &wrapMode)
TextureFilter StringToTextureFilter(const string &filter)
Handle console commands that start with a forward slash.
eastl::fixed_vector< TextureLayoutChange, 6, true > TextureLayoutChanges
bool IsEmpty(const BufferLocks &locks) noexcept