]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture2d.cpp
Use glCreateTextures also for async loading
[libs/gl.git] / source / texture2d.cpp
index dac671fdfa52fcae265d088b2cb9d14f918a9a56..08383526728bb7a239b8551c910c75c6a2ff2f03 100644 (file)
@@ -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);
        }