From: Mikko Rasa Date: Mon, 25 Jan 2021 23:19:33 +0000 (+0200) Subject: Use glCreateTextures also for async loading X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=a9bf08d7c8d54204b76f91dab95052b737595bea Use glCreateTextures also for async loading Otherwise the texture won't be fully created when glTextureStorage2D is called. --- diff --git a/source/texture2d.cpp b/source/texture2d.cpp index dac671fd..08383526 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -270,7 +270,12 @@ bool Texture2D::AsyncLoader::process() } if(!texture.id) - glGenTextures(1, &texture.id); + { + if(ARB_direct_state_access) + glCreateTextures(texture.target, 1, &texture.id); + else + glGenTextures(1, &texture.id); + } texture.image(image, srgb_conversion, true); }