10 #ifndef _TurtleBraines_TextureManager_hpp
11 #define _TurtleBraines_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>
138 TextureHandle
CreateTextureFromPixelData(
const unsigned char* pixelDataARGB,
const PixelSpace& textureWidth,
const PixelSpace& textureHeight);
150 TextureHandle
CreateTextureEmpty(
const PixelSpace& textureWidth,
const PixelSpace& textureHeight,
180 void BindTexture(
const TextureHandle& textureHandle);
253 friend class tbImplementation::TextureManagerCreator;
PixelSpace GetTextureWidth(const TextureHandle &textureHandle) const
TextureHandle CreateTextureReference(const TextureHandle &textureHandle)
Definition: tb_texture_manager.hpp:91
ClampToEdge wrap mode will keep the U or V coordinate within 0 to 1 top stop at texture edge...
Definition: tb_texture_manager.hpp:74
void DestroyGraphicsContext(void)
Give the GameScene and Entities something to display, Text, Sprites and AnimatedSprites help bring th...
TextureHandle CreateTextureFromFile(const tbCore::tbString &filename)
TextureFormat
Definition: tb_texture_manager.hpp:60
32 bits per pixel, colored texture with alpha, red, green, blue channels each having 8 bits...
TurtleBrains::Core::ResourceHandle< tbImplementation::TextureHandleSaver > TextureHandle
Definition: tb_texture_manager.hpp:42
uint16_t uint16
Unsigned integer with a size of 16 bits. Supports values from 0 to 65535.
Definition: tb_types.hpp:26
void BindTexture(const TextureHandle &textureHandle)
void CreateGraphicsContext(void)
Definition: tb_noncopyable.hpp:22
static void PreMultiplyAlpha(tbCore::byte *imageData, const PixelSpace &imageWidth, const PixelSpace &imageHeight)
16 bits per pixel, depth texture.
Here is some information about the primary namespace.
Definition: tb_application_dialog.hpp:21
TextureManager & theTextureManager
TextureHandle InvalidTexture(void)
TextureHandle CreateTextureFromPixelData(const unsigned char *pixelDataARGB, const PixelSpace &textureWidth, const PixelSpace &textureHeight)
uint64_t uint64
Unsigned integer with a size of 64 bits, Supports values from 0 to (2^64 - 1).
Definition: tb_types.hpp:30
TextureHandle CreateTextureFromFileData(const unsigned char *fileDataInMemory, const size_t &fileSizeInBytes)
void DestroyTexture(const TextureHandle &textureHandle)
uint8 byte
Unsigned integer with 8 bits (1 byte). Supports 256 values from 0 to 255.
Definition: tb_types.hpp:24
TextureHandle CreateTextureEmpty(const PixelSpace &textureWidth, const PixelSpace &textureHeight, const TextureFormat &format=TextureFormat::ColorARGB8)
uint8_t uint8
Unsigned integer with a size of 8 bits. Supports values from 0 to 255.
Definition: tb_types.hpp:23
tbCore::uint16 PixelSpace
Definition: tb_texture_manager.hpp:36
PixelSpace GetTextureHeight(const TextureHandle &textureHandle) const
Mirrored repeat, ignoring the integral part of the U or V coordinate only when even.
Definition: tb_texture_manager.hpp:73
24 bits per pixel, depth texture.
TextureWrapMode
Definition: tb_texture_manager.hpp:70
Definition: tb_texture_manager.hpp:20
void SetTextureWrapMode(const TextureHandle &textureHandle, TextureWrapMode wrapMode)
const TextureHandle & kBlankTexture
float TexelSpace
Definition: tb_texture_manager.hpp:30
Set the texture to repeat, ignoring the integral part of the U or V coordinate.
Definition: tb_texture_manager.hpp:72
std::string tbString
Definition: tb_string.hpp:335
Definition: tb_application_dialog.hpp:19
tbCore::uint64 ComputeMemoryUsage(void) const