diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-04 23:56:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:49:14 +0300 |
commit | bac4606937514405641659d91a30bf3e6832cdf7 (patch) | |
tree | 740db8bff5e694c2e9f943f928e08030925d0fcf /source/blender/editors/interface/interface_icons.c | |
parent | 7d4adbdfaba4f23b2adbf96f97ce18806aca31c8 (diff) |
Cleanup: GPUTexture: Remove use of GPU_texture_create_nD
Use creation + update function instead.
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 70061427c33..8801d2956bb 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -866,30 +866,15 @@ void UI_icons_reload_internal_textures(void) icongltex.invw = 1.0f / b32buf->x; icongltex.invh = 1.0f / b32buf->y; - icongltex.tex[0] = GPU_texture_create_nD(b32buf->x, - b32buf->y, - 0, - 2, - b32buf->rect, - GPU_RGBA8, - GPU_DATA_UNSIGNED_BYTE, - 0, - false, - NULL); + icongltex.tex[0] = GPU_texture_create_2d(b32buf->x, b32buf->y, GPU_RGBA8, NULL, NULL); + GPU_texture_add_mipmap(icongltex.tex[0], GPU_DATA_UNSIGNED_BYTE, 0, b32buf->rect); GPU_texture_add_mipmap(icongltex.tex[0], GPU_DATA_UNSIGNED_BYTE, 1, b16buf->rect); } if (need_icons_with_border && icongltex.tex[1] == NULL) { - icongltex.tex[1] = GPU_texture_create_nD(b32buf_border->x, - b32buf_border->y, - 0, - 2, - b32buf_border->rect, - GPU_RGBA8, - GPU_DATA_UNSIGNED_BYTE, - 0, - false, - NULL); + icongltex.tex[1] = GPU_texture_create_2d( + b32buf_border->x, b32buf_border->y, GPU_RGBA8, NULL, NULL); + GPU_texture_add_mipmap(icongltex.tex[1], GPU_DATA_UNSIGNED_BYTE, 0, b32buf_border->rect); GPU_texture_add_mipmap(icongltex.tex[1], GPU_DATA_UNSIGNED_BYTE, 1, b16buf_border->rect); } } |