diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:33:56 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:49:14 +0300 |
commit | ab95cdaba970a30127d804bd1e66ad25ab021ec1 (patch) | |
tree | d0da883e11f81253cb7b3e5a75288ca69598e437 /source/blender/draw/engines/workbench/workbench_render.c | |
parent | bac4606937514405641659d91a30bf3e6832cdf7 (diff) |
GPUTexture: Change texture creation API
This is to modernize the API:
- Add meaningful name to all textures (except DRW textures).
- Remove unused err_out argument: only used for offscreen python.
- Add mipmap count to creation functions for future changes.
- Clarify the data usage in creation functions.
This is a cleanup commit, there is no functional change.
# Conflicts:
# source/blender/gpu/GPU_texture.h
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_render.c')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_render.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_render.c b/source/blender/draw/engines/workbench/workbench_render.c index 77e16327a43..8760f2651ee 100644 --- a/source/blender/draw/engines/workbench/workbench_render.c +++ b/source/blender/draw/engines/workbench/workbench_render.c @@ -79,8 +79,8 @@ static bool workbench_render_framebuffers_init(void) * the other views will reuse these buffers */ if (dtxl->color == NULL) { BLI_assert(dtxl->depth == NULL); - dtxl->color = GPU_texture_create_2d(size[0], size[1], GPU_RGBA16F, NULL, NULL); - dtxl->depth = GPU_texture_create_2d(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL); + dtxl->color = GPU_texture_create_2d("txl.color", UNPACK2(size), 1, GPU_RGBA16F, NULL); + dtxl->depth = GPU_texture_create_2d("txl.depth", UNPACK2(size), 1, GPU_DEPTH24_STENCIL8, NULL); } if (!(dtxl->depth && dtxl->color)) { |