Changeset View
Changeset View
Standalone View
Standalone View
source/blender/imbuf/intern/util_gpu.c
| Show First 20 Lines • Show All 213 Lines • ▼ Show 20 Lines | void IMB_update_gpu_texture_sub(GPUTexture *tex, | ||||
| if (freebuf) { | if (freebuf) { | ||||
| MEM_freeN(data); | MEM_freeN(data); | ||||
| } | } | ||||
| } | } | ||||
| GPUTexture *IMB_create_gpu_texture(const char *name, | GPUTexture *IMB_create_gpu_texture(const char *name, | ||||
| ImBuf *ibuf, | ImBuf *ibuf, | ||||
| bool use_high_bitdepth, | bool use_high_bitdepth, | ||||
| bool use_premult) | bool use_premult, | ||||
| bool limit_gl_texture_size) | |||||
| { | { | ||||
| GPUTexture *tex = NULL; | GPUTexture *tex = NULL; | ||||
| int size[2] = {GPU_texture_size_with_limit(ibuf->x), GPU_texture_size_with_limit(ibuf->y)}; | int size[2] = {GPU_texture_size_with_limit(ibuf->x, limit_gl_texture_size), | ||||
| GPU_texture_size_with_limit(ibuf->y, limit_gl_texture_size)}; | |||||
| bool do_rescale = (ibuf->x != size[0]) || (ibuf->y != size[1]); | bool do_rescale = (ibuf->x != size[0]) || (ibuf->y != size[1]); | ||||
| #ifdef WITH_DDS | #ifdef WITH_DDS | ||||
| if (ibuf->ftype == IMB_FTYPE_DDS) { | if (ibuf->ftype == IMB_FTYPE_DDS) { | ||||
| eGPUTextureFormat compressed_format; | eGPUTextureFormat compressed_format; | ||||
| if (!IMB_gpu_get_compressed_format(ibuf, &compressed_format)) { | if (!IMB_gpu_get_compressed_format(ibuf, &compressed_format)) { | ||||
| fprintf(stderr, "Unable to find a suitable DXT compression,"); | fprintf(stderr, "Unable to find a suitable DXT compression,"); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines | |||||