diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-02-28 12:45:29 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-02-28 12:45:29 +0300 |
commit | eb043d44f26bc8c245f2a3ad42d65ab5626003e4 (patch) | |
tree | 40c355a26858d81296da08a06c2a8ec502f55297 /source/blender/gpu/intern/gpu_draw.c | |
parent | 88e1152d4acc2852bb45f0726e27f507a502fbeb (diff) | |
parent | 9cac5fa681c55edcf6e856e59e07e90e2ae25965 (diff) |
Merge branch 'master' into id-ensure-unique-memory-addressid-ensure-unique-memory-address
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 62a5de7ebe6..d674f8600c2 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -1077,7 +1077,8 @@ void GPU_create_gl_tex(uint *bind, glGenTextures(1, (GLuint *)bind); glBindTexture(textarget, *bind); - GLenum float_format = (!half_float && ima->flag & IMA_HIGH_BITDEPTH) ? GL_RGBA32F : GL_RGBA16F; + GLenum float_format = (!half_float && (ima && (ima->flag & IMA_HIGH_BITDEPTH))) ? GL_RGBA32F : + GL_RGBA16F; GLenum internal_format = (frect) ? float_format : (use_srgb) ? GL_SRGB8_ALPHA8 : GL_RGBA8; if (textarget == GL_TEXTURE_2D) { |