47 : m_pLastTexture(
TNULL )
48{
49 {
50
51 constexpr int WhiteTextureWidth = 8;
52 constexpr int WhiteTextureHeight = 8;
53 constexpr int WhiteTextureSize = WhiteTextureWidth * WhiteTextureHeight * 4;
54
57
60 m_pWhiteTexture->SetName( "white" );
61 m_pWhiteTexture->m_pNextTexture =
TNULL;
62 m_pWhiteTexture->m_pPrevTexture =
TNULL;
64 }
65
66 {
67
68 constexpr int InvalidTextureWidth = 128;
69 constexpr int InvalidTextureHeight = 128;
70 constexpr int InvalidTextureSize = InvalidTextureWidth * InvalidTextureHeight * 4;
71
73
74 for (
TUINT8* pos = srcData; pos < srcData + InvalidTextureSize; pos += 4 )
75 {
76 *( pos ) = rand() % 256;
77 *( pos + 1 ) = rand() % 256;
78 *( pos + 2 ) = rand() % 256;
79 *( pos + 3 ) = rand() % 256;
80 }
81
84 m_pInvalidTexture->SetName( "invalid" );
85 m_pInvalidTexture->m_pNextTexture =
TNULL;
86 m_pInvalidTexture->m_pPrevTexture =
TNULL;
88 }
89}
void * TMemalign(TSIZE a_uiAlignment, TSIZE a_uiSize, Toshi::TMemory::MemBlock *a_pMemBlock)
Allocates aligned memory from a specific memory block.
void TFree(void *a_pMem)
Frees previously allocated memory.
@ TEXTURE_FORMAT_R8G8B8A8_UNORM
static void MemSet(void *ptr, TINT value, TSIZE size)