1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Graphics.DrawLine, DrawBatch fixes

This commit is contained in:
Brian Fiete 2023-07-26 09:39:14 -07:00
parent a269a19ed8
commit 40f3baf127
4 changed files with 66 additions and 14 deletions

View file

@ -120,6 +120,20 @@ Texture* RenderDevice::LoadTexture(const StringImpl& fileName, int flags)
imageData->mBits[0] = 0xFFFFFFFF;
handled = true;
}
else if (fileName.StartsWith("!square"))
{
int squareSize = atoi(fileName.c_str() + 7);
imageData = new ImageData();
imageData->CreateNew(squareSize + 2, squareSize + 2, true);
for (int y = 0; y < squareSize; y++)
{
for (int x = 0; x < squareSize; x++)
{
imageData->mBits[(y + 1) * (squareSize + 2) + x + 1] = 0xFFFFFFFF;
}
}
handled = true;
}
else if (ext == ".tga")
imageData = new TGAData();
else if (ext == ".png")