diff options
Diffstat (limited to 'source/blender/gpu/GPU_texture.h')
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index d689fbe14b5..734d407d011 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -226,6 +226,19 @@ GPUTexture *GPU_texture_create_compressed_2d( * Create an error texture that will bind an invalid texture (pink) at draw time. */ GPUTexture *GPU_texture_create_error(int dimension, bool array); +/** + * Create an alias of the source texture data. + * If \a src is freed, the texture view will continue to be valid. + * If \a mip_start or \a mip_len is bigger than available mips they will be clamped. + * TODO(@fclem): Target conversion is not implemented yet. + */ +GPUTexture *GPU_texture_create_view(const char *name, + const GPUTexture *src, + eGPUTextureFormat format, + int mip_start, + int mip_len, + int layer_start, + int layer_len); void GPU_texture_update_mipmap(GPUTexture *tex, int miplvl, |