X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Ftexture_backend.cpp;h=88e1c2b33877cc1349b93375b8201f4de318047c;hb=f73e671dcb36c097647cddbf5b1eaaad2ffc9299;hp=fe4679f63d4fe0815a7b808a2f13f02d32a1d32b;hpb=160e9eea29bd10034733d59507fa1bcca36be401;p=libs%2Fgl.git diff --git a/source/backends/opengl/texture_backend.cpp b/source/backends/opengl/texture_backend.cpp index fe4679f6..88e1c2b3 100644 --- a/source/backends/opengl/texture_backend.cpp +++ b/source/backends/opengl/texture_backend.cpp @@ -22,13 +22,9 @@ int OpenGLTexture::swizzle_orders[] = OpenGLTexture *OpenGLTexture::scratch_binding = 0; -OpenGLTexture::OpenGLTexture(unsigned t, bool create): - id(0), +OpenGLTexture::OpenGLTexture(unsigned t): target(t) { - if(create) - generate_id(); - static bool alignment_init = false; if(!alignment_init) { @@ -45,10 +41,10 @@ OpenGLTexture::~OpenGLTexture() glDeleteTextures(1, &id); } -void OpenGLTexture::generate_id() +void OpenGLTexture::create() { if(id) - throw invalid_operation("OpenGLTexture::generate_id"); + throw invalid_operation("OpenGLTexture::create"); if(ARB_direct_state_access) glCreateTextures(target, 1, &id); else