From 5260f008403834024a02d6a543e8eb1f3c5691a7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 26 Jan 2021 01:20:48 +0200 Subject: [PATCH] Don't try to set parameters for textures which aren't loaded yet --- source/texture.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/texture.cpp b/source/texture.cpp index 1452cfbb..68e44861 100644 --- a/source/texture.cpp +++ b/source/texture.cpp @@ -132,6 +132,12 @@ PixelFormat Texture::get_upload_format(PixelFormat fmt) const void Texture::update_parameter(int mask) const { + if(!id) + { + dirty_params |= mask; + return; + } + if(!ARB_direct_state_access && TexUnit::current().get_texture()!=this) { TexUnit *unit = TexUnit::find_unit(this); -- 2.45.2