diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-14 22:59:05 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-14 22:59:05 +0000 |
| commit | 1db33e8f0d3368e49ef105e0d091f1ce4fc4ae26 (patch) | |
| tree | 136a7582f65fc1e1ac4cd2174e025fef78b82fec /gfx/models/texture.h | |
| parent | Shared VAO for all 3 parts of RailVehicleClass (diff) | |
| download | ilt-1db33e8f0d3368e49ef105e0d091f1ce4fc4ae26.tar.bz2 ilt-1db33e8f0d3368e49ef105e0d091f1ce4fc4ae26.tar.xz ilt-1db33e8f0d3368e49ef105e0d091f1ce4fc4ae26.zip | |
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.
Diffstat (limited to 'gfx/models/texture.h')
| -rw-r--r-- | gfx/models/texture.h | 3 |
1 files changed, 2 insertions, 1 deletions
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; |
