From 1db33e8f0d3368e49ef105e0d091f1ce4fc4ae26 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 14 Mar 2026 22:59:05 +0000 Subject: Don't pass null to Texture constructor pixel data Pixel data variant now proxies to the simple version and then uploads the image data, instead of vice versa with nullptr pixels. --- gfx/models/texture.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gfx/models/texture.h') diff --git a/gfx/models/texture.h b/gfx/models/texture.h index 19a2ebe..9c67ae1 100644 --- a/gfx/models/texture.h +++ b/gfx/models/texture.h @@ -28,7 +28,8 @@ public: explicit Texture(const std::filesystem::path & fileName, TextureOptions = {}); explicit Texture(const Image & image, TextureOptions = {}); explicit Texture(GLsizei width, GLsizei height, TextureOptions = {}); - explicit Texture(GLsizei width, GLsizei height, const void * data, TextureOptions = {}); + explicit Texture(GLsizei width, GLsizei height, GLenum pixelFormat, GLenum PixelType, const void * pixels, + TextureOptions = {}); virtual void bind(GLuint unit) const; -- cgit v1.3