1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-11-28 11:45:29 +01:00

Refactor parts of CGUITTFont

This commit is contained in:
sfan5
2025-11-22 22:20:55 +01:00
parent 7570e9520d
commit 77ce40cf44
7 changed files with 215 additions and 323 deletions

View File

@@ -270,6 +270,8 @@ u32 CNullDriver::getTextureCount() const
ITexture *CNullDriver::addTexture(const core::dimension2d<u32> &size, const io::path &name, ECOLOR_FORMAT format)
{
IImage *image = new CImage(format, size);
// the image data will be uploaded, so zero it
memset(image->getData(), 0, image->getImageDataSizeInBytes());
ITexture *t = addTexture(name, image);
image->drop();
return t;