10 #ifndef TurtleBrains_TextureManager_hpp
11 #define TurtleBrains_TextureManager_hpp
13 #include <turtle_brains/core/tb_noncopyable.hpp>
14 #include <turtle_brains/core/tb_string.hpp>
15 #include <turtle_brains/core/tb_types.hpp>
16 #include <turtle_brains/core/tb_resource_handle.hpp>
162 const TextureFormat& format,
const unsigned char* pixelData,
const bool mipmapped =
true);
295 friend class Implementation::TextureManagerCreator;
Definition: tb_noncopyable.hpp:21
Definition: tb_texture_manager.hpp:22
Definition: tb_texture_manager.hpp:106
TextureHandle CreateTextureFromFile(const String &filename, const bool mipmapped=true)
PixelSpace GetTextureWidth(const TextureHandle &textureHandle) const
TextureHandle CreateTextureEmpty(const PixelSpace &textureWidth, const PixelSpace &textureHeight, const TextureFormat &format=TextureFormat::ColorARGB8)
TextureHandle CreateTextureFromFileData(const unsigned char *fileDataInMemory, const tbCore::uint32 fileSizeInBytes, const bool mipmapped=true)
void SetTextureWrapMode(const TextureHandle &textureHandle, TextureWrapMode wrapMode)
void BindTexture(const TextureHandle &textureHandle, tbCore::uint8 textureUnit)
PixelSpace GetTextureHeight(const TextureHandle &textureHandle) const
TextureHandle CreateTextureReference(const TextureHandle &textureHandle)
void CreateGraphicsContext(void)
void DestroyGraphicsContext(void)
TextureHandle CreateTextureFromPixelData(const PixelSpace &textureWidth, const PixelSpace &textureHeight, const TextureFormat &format, const unsigned char *pixelData, const bool mipmapped=true)
tbCore::uint64 ComputeMemoryUsage(void) const
static void PreMultiplyAlpha(tbCore::byte *imageData, const PixelSpace &imageWidth, const PixelSpace &imageHeight)
void SetTextureWrapMode(const TextureHandle &textureHandle, TextureWrapMode wrapModeU, TextureWrapMode wrapModeV)
void BindTexture(const TextureHandle &textureHandle)
void CheckAndReloadTextures(void)
void DestroyTexture(const TextureHandle &textureHandle)
std::uint8_t uint8
Unsigned integer with a size of 8 bits. Supports values from 0 to 255.
Definition: tb_types.hpp:22
std::uint16_t uint16
Unsigned integer with a size of 16 bits. Supports values from 0 to 65535.
Definition: tb_types.hpp:25
std::uint8_t byte
Unsigned integer with a size of 8 bits. Supports values from 0 to 255.
Definition: tb_types.hpp:23
std::uint32_t uint32
Unsigned integer with a size of 32 bits. Supports values from 0 to 4294967295, (2^32 - 1).
Definition: tb_types.hpp:27
std::uint64_t uint64
Unsigned integer with a size of 64 bits, Supports values from 0 to (2^64 - 1).
Definition: tb_types.hpp:29
Give the GameScene and Entities something to display, Text, Sprites and AnimatedSprites help bring th...
const TextureHandle & kBlankTexture
TextureFilter
Definition: tb_texture_manager.hpp:85
@ DepthCompare
Depth compare with <=, used for ShadowMaps, may not actually be a filter as much as a state.
TextureHandle InvalidTexture(void)
TextureWrapMode
Definition: tb_texture_manager.hpp:78
@ MirroredRepeat
Mirrored repeat, ignoring the integral part of the U or V coordinate only when even.
@ Repeat
Set the texture to repeat, ignoring the integral part of the U or V coordinate.
@ ClampToEdge
ClampToEdge wrap mode will keep the U or V coordinate within 0 to 1 top stop at texture edge.
float TexelSpace
Definition: tb_texture_manager.hpp:28
TextureFormat
Definition: tb_texture_manager.hpp:59
@ ColorARGB8
32 bits per pixel, colored texture with alpha, red, green, blue channels each having 8 bits.
@ Depth16
16 bits per pixel, depth texture.
@ Depth24
24 bits per pixel, depth texture.
TextureManager & theTextureManager
tbCore::uint16 PixelSpace
Definition: tb_texture_manager.hpp:34