X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fopengl%2Ftexture_backend.cpp;h=e8288045f4625fd5766e5b1048809717660ce204;hb=4965ad140daacd10e77b74ce9b49e98c4c4dae55;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..e8288045 100644 --- a/source/backends/opengl/texture_backend.cpp +++ b/source/backends/opengl/texture_backend.cpp @@ -22,13 +22,10 @@ int OpenGLTexture::swizzle_orders[] = OpenGLTexture *OpenGLTexture::scratch_binding = 0; -OpenGLTexture::OpenGLTexture(unsigned t, bool create): +OpenGLTexture::OpenGLTexture(unsigned t): id(0), target(t) { - if(create) - generate_id(); - static bool alignment_init = false; if(!alignment_init) { @@ -45,10 +42,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