diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-04-22 22:22:07 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-04-22 22:41:10 +0300 |
commit | f7753bf97fd38720bf1e91cd8179dd3227a7bb12 (patch) | |
tree | 786cb88943b7b6da93c72cf0fa9783a0d2c3a7e7 /source/blender/gpu/GPU_texture.h | |
parent | d17b371a83de0daf228138dc0eca0f788e024a62 (diff) |
GPU: Add GPU_texture_copy
This allow to copy entire texture in a faster way than using framebuffer
blitting.
This uses ARB_copy_image extension if available and fallback to
glCopyTexSubImage2D for older gl version.
Both method should be as fast if not faster than the framebuffer blitting.
Diffstat (limited to 'source/blender/gpu/GPU_texture.h')
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index 892452a2738..d6e5866ae28 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -239,6 +239,8 @@ void GPU_texture_bind(GPUTexture *tex, int number); void GPU_texture_unbind(GPUTexture *tex); int GPU_texture_bound_number(GPUTexture *tex); +void GPU_texture_copy(GPUTexture *dst, GPUTexture *src); + void GPU_texture_generate_mipmap(GPUTexture *tex); void GPU_texture_compare_mode(GPUTexture *tex, bool use_compare); void GPU_texture_filter_mode(GPUTexture *tex, bool use_filter); |