]> git.tdb.fi Git - libs/gl.git/commitdiff
Rename OpenGLTexture::generate_id to create
authorMikko Rasa <tdb@tdb.fi>
Thu, 7 Oct 2021 08:22:00 +0000 (11:22 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 7 Oct 2021 12:43:22 +0000 (15:43 +0300)
source/backends/opengl/texture1d_backend.cpp
source/backends/opengl/texture2d_backend.cpp
source/backends/opengl/texture2dmultisample_backend.cpp
source/backends/opengl/texture3d_backend.cpp
source/backends/opengl/texture_backend.cpp
source/backends/opengl/texture_backend.h
source/backends/opengl/texturecube_backend.cpp

index bd754fde1091eb42b67fe6787ed2713b421d0f09..a94a5c44ac9d99610d38003b632b2a1d7dfe9dd1 100644 (file)
@@ -20,7 +20,7 @@ void OpenGLTexture1D::allocate()
        unsigned levels = static_cast<const Texture1D *>(this)->levels;
 
        if(!id)
-               generate_id();
+               create();
 
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage)
index 725b603893973f1a52c47ad35d8dd8c8e69bc771..c47600cf9402f99a0a41f41df9c43f753ccbfcde 100644 (file)
@@ -42,7 +42,7 @@ void OpenGLTexture2D::allocate()
        unsigned levels = static_cast<const Texture2D *>(this)->levels;
 
        if(!id)
-               generate_id();
+               create();
 
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage)
@@ -147,7 +147,7 @@ bool OpenGLTexture2D::AsyncLoader::process()
                }
 
                if(!texture.id)
-                       texture.generate_id();
+                       texture.create();
 
                unsigned w = image.get_width();
                unsigned h = image.get_height();
index 71f9e138abddee50a7c157c0ef7e33b0dfda7a3a..c9faa85e99a6dfbee471356db3aa8e941cd40068 100644 (file)
@@ -20,7 +20,7 @@ void OpenGLTexture2DMultisample::allocate()
        unsigned samples = static_cast<const Texture2DMultisample *>(this)->samples;
 
        if(!id)
-               generate_id();
+               create();
 
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage_multisample)
index 1197405ee367ff192690437f37ccca89b677000f..d2c1088e293964b10deb45874f083063146aea88 100644 (file)
@@ -27,7 +27,7 @@ void OpenGLTexture3D::allocate()
        unsigned levels = static_cast<const Texture3D *>(this)->levels;
 
        if(!id)
-               generate_id();
+               create();
 
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage)
index f3586b0bad09a1518a0a9eb21534a3822fad4cdb..e8288045f4625fd5766e5b1048809717660ce204 100644 (file)
@@ -42,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
index 8b6a734e4eaf9850ea2d45583acc7cb951645ef7..815778203bcaba66f4e13de3f81a2b08aa8450a0 100644 (file)
@@ -22,7 +22,7 @@ protected:
        OpenGLTexture(unsigned);
        ~OpenGLTexture();
 
-       void generate_id();
+       void create();
        void require_swizzle();
        void apply_swizzle();
        void set_parameter_i(unsigned, int) const;
index cc8945896fea9bdaad6763e4eedda5af50df859c..39169612a450b46b1216cdea9f22c1450475e42e 100644 (file)
@@ -32,7 +32,7 @@ void OpenGLTextureCube::allocate()
        unsigned levels = static_cast<const TextureCube *>(this)->levels;
 
        if(!id)
-               generate_id();
+               create();
 
        GLenum gl_fmt = get_gl_pixelformat(storage_fmt);
        if(ARB_texture_storage)