From: Mikko Rasa Date: Thu, 7 Oct 2021 08:22:00 +0000 (+0300) Subject: Rename OpenGLTexture::generate_id to create X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4965ad140daacd10e77b74ce9b49e98c4c4dae55;p=libs%2Fgl.git Rename OpenGLTexture::generate_id to create --- diff --git a/source/backends/opengl/texture1d_backend.cpp b/source/backends/opengl/texture1d_backend.cpp index bd754fde..a94a5c44 100644 --- a/source/backends/opengl/texture1d_backend.cpp +++ b/source/backends/opengl/texture1d_backend.cpp @@ -20,7 +20,7 @@ void OpenGLTexture1D::allocate() unsigned levels = static_cast(this)->levels; if(!id) - generate_id(); + create(); GLenum gl_fmt = get_gl_pixelformat(storage_fmt); if(ARB_texture_storage) diff --git a/source/backends/opengl/texture2d_backend.cpp b/source/backends/opengl/texture2d_backend.cpp index 725b6038..c47600cf 100644 --- a/source/backends/opengl/texture2d_backend.cpp +++ b/source/backends/opengl/texture2d_backend.cpp @@ -42,7 +42,7 @@ void OpenGLTexture2D::allocate() unsigned levels = static_cast(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(); diff --git a/source/backends/opengl/texture2dmultisample_backend.cpp b/source/backends/opengl/texture2dmultisample_backend.cpp index 71f9e138..c9faa85e 100644 --- a/source/backends/opengl/texture2dmultisample_backend.cpp +++ b/source/backends/opengl/texture2dmultisample_backend.cpp @@ -20,7 +20,7 @@ void OpenGLTexture2DMultisample::allocate() unsigned samples = static_cast(this)->samples; if(!id) - generate_id(); + create(); GLenum gl_fmt = get_gl_pixelformat(storage_fmt); if(ARB_texture_storage_multisample) diff --git a/source/backends/opengl/texture3d_backend.cpp b/source/backends/opengl/texture3d_backend.cpp index 1197405e..d2c1088e 100644 --- a/source/backends/opengl/texture3d_backend.cpp +++ b/source/backends/opengl/texture3d_backend.cpp @@ -27,7 +27,7 @@ void OpenGLTexture3D::allocate() unsigned levels = static_cast(this)->levels; if(!id) - generate_id(); + create(); GLenum gl_fmt = get_gl_pixelformat(storage_fmt); if(ARB_texture_storage) diff --git a/source/backends/opengl/texture_backend.cpp b/source/backends/opengl/texture_backend.cpp index f3586b0b..e8288045 100644 --- a/source/backends/opengl/texture_backend.cpp +++ b/source/backends/opengl/texture_backend.cpp @@ -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 diff --git a/source/backends/opengl/texture_backend.h b/source/backends/opengl/texture_backend.h index 8b6a734e..81577820 100644 --- a/source/backends/opengl/texture_backend.h +++ b/source/backends/opengl/texture_backend.h @@ -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; diff --git a/source/backends/opengl/texturecube_backend.cpp b/source/backends/opengl/texturecube_backend.cpp index cc894589..39169612 100644 --- a/source/backends/opengl/texturecube_backend.cpp +++ b/source/backends/opengl/texturecube_backend.cpp @@ -32,7 +32,7 @@ void OpenGLTextureCube::allocate() unsigned levels = static_cast(this)->levels; if(!id) - generate_id(); + create(); GLenum gl_fmt = get_gl_pixelformat(storage_fmt); if(ARB_texture_storage)