1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-05 19:31:04 +00:00

Improve texture creation logging and checking

This commit is contained in:
sfan5 2025-08-08 13:42:36 +02:00 committed by GitHub
parent ae97435d80
commit b1cb5fcb9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 37 additions and 19 deletions

View file

@ -278,9 +278,6 @@ bool COpenGL3DriverBase::genericDriverInit(const core::dimension2d<u32> &screenS
// set fog mode
setFog(FogColor, FogType, FogStart, FogEnd, FogDensity, PixelFog, RangeFog);
// create matrix for flipping textures
TextureFlipMatrix.buildTextureTransform(0.0f, core::vector2df(0, 0), core::vector2df(0, 1.0f), core::vector2df(1.0f, -1.0f));
// We need to reset once more at the beginning of the first rendering.
// This fixes problems with intermediate changes to the material during texture load.
ResetRenderStates = true;

View file

@ -324,15 +324,13 @@ protected:
bool LockRenderStateMode;
u8 AntiAlias;
core::matrix4 TextureFlipMatrix;
using FColorConverter = void (*)(const void *source, s32 count, void *dest);
struct STextureFormatInfo
{
GLenum InternalFormat;
GLenum PixelFormat;
GLenum PixelType;
FColorConverter Converter;
GLenum InternalFormat = 0;
GLenum PixelFormat = 0;
GLenum PixelType = 0;
FColorConverter Converter = nullptr;
};
STextureFormatInfo TextureFormats[ECF_UNKNOWN] = {};