Cleanup: GPUTexture: Rename some functions with more descriptive names

List of renames:
GPU_texture_generate_mipmap > GPU_texture_update_mipmap_chain
GPU_texture_orig_width > GPU_texture_original_width
GPU_texture_orig_height > GPU_texture_original_height
GPU_texture_orig_size_set > GPU_texture_original_size_set
GPU_texture_format_description > GPU_texture_format_name
GPU_texture_array > GPU_texture_is_array
GPU_texture_cube > GPU_texture_is_cube
GPU_texture_depth > GPU_texture_has_depth_format
GPU_texture_stencil > GPU_texture_has_stencil_format
GPU_texture_integer > GPU_texture_has_integer_format
This commit is contained in:
2023-02-25 01:04:35 +01:00
committed by Gitea
parent 584e514561
commit 73da5ee90d
12 changed files with 52 additions and 48 deletions

View File

@@ -162,7 +162,8 @@ void GLFrameBuffer::update_attachments()
continue;
}
GLuint gl_tex = static_cast<GLTexture *>(unwrap(attach.tex))->tex_id_;
if (attach.layer > -1 && GPU_texture_cube(attach.tex) && !GPU_texture_array(attach.tex)) {
if (attach.layer > -1 && GPU_texture_is_cube(attach.tex) &&
!GPU_texture_is_array(attach.tex)) {
/* Could be avoided if ARB_direct_state_access is required. In this case
* #glFramebufferTextureLayer would bind the correct face. */
GLenum gl_target = GL_TEXTURE_CUBE_MAP_POSITIVE_X + attach.layer;