]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/texture2d.cpp
Refactor texture ID generation into a function
[libs/gl.git] / source / core / texture2d.cpp
index d2addda70fc4d6e35de11e2df472bf98b89d9940..0f06790c06056f419f6f50766db8a4eb975793f3 100644 (file)
@@ -290,12 +290,7 @@ bool Texture2D::AsyncLoader::process()
                }
 
                if(!texture.id)
-               {
-                       if(ARB_direct_state_access)
-                               glCreateTextures(texture.target, 1, &texture.id);
-                       else
-                               glGenTextures(1, &texture.id);
-               }
+                       texture.generate_id();
                texture.image(image, 0, true);
        }