X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture2d.cpp;h=2ea713eb3a539c9705e13f90b2775ff9b643fdfd;hb=bdced13c0814d1a860573a0ac19964da2ac4d5e1;hp=e237e504176ace2bfd56ddf74597907aee397abb;hpb=4d7f66ea28c788e12f700216b9c53af9e71b8390;p=libs%2Fgl.git diff --git a/source/texture2d.cpp b/source/texture2d.cpp index e237e504..2ea713eb 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -207,10 +207,7 @@ Texture2D::AsyncLoader::AsyncLoader(Texture2D &t, IO::Seekable &i): pixel_buffer(PIXEL_UNPACK_BUFFER), mapped_address(0), phase(0) -{ - if(!texture.id) - glGenTextures(1, &texture.id); -} +{ } bool Texture2D::AsyncLoader::needs_sync() const { @@ -245,6 +242,8 @@ bool Texture2D::AsyncLoader::process() return false; } + if(!texture.id) + glGenTextures(1, &texture.id); texture.image(image, false, true); }