]> 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 f3586b0bad09a1518a0a9eb21534a3822fad4cdb..88e1c2b33877cc1349b93375b8201f4de318047c 100644 (file)
@@ -23,7 +23,6 @@ int OpenGLTexture::swizzle_orders[] =
 OpenGLTexture *OpenGLTexture::scratch_binding = 0;
 
 OpenGLTexture::OpenGLTexture(unsigned t):
-       id(0),
        target(t)
 {
        static bool alignment_init = false;
@@ -42,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