]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/opengl/texture_backend.cpp
Use default member initializers for simple types
[libs/gl.git] / source / backends / opengl / texture_backend.cpp
index fe4679f63d4fe0815a7b808a2f13f02d32a1d32b..88e1c2b33877cc1349b93375b8201f4de318047c 100644 (file)
@@ -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