From: Mikko Rasa Date: Mon, 25 Jan 2021 23:20:48 +0000 (+0200) Subject: Don't try to set parameters for textures which aren't loaded yet X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5260f008403834024a02d6a543e8eb1f3c5691a7;p=libs%2Fgl.git Don't try to set parameters for textures which aren't loaded yet --- 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);