diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-09-20 00:59:00 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-09-20 00:59:25 +0300 |
commit | 5ada6e754011beee80bf299510d169113fd8101f (patch) | |
tree | 0d421992114d46976d6c7523a9446758c11cf706 /source/blender/gpu/intern/gpu_draw.c | |
parent | e620380cc293047421f20c74e637980d7d12a6e3 (diff) |
GPUTexture: Fix HDRI being clamped on OSX
Seems like GLEW_ARB_texture_float is not defined in core profile on OSX
even if float textures are part of the 3.3 core spec.
So removing uneeded backup cases.
Diffstat (limited to 'source/blender/gpu/intern/gpu_draw.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_draw.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c index 7b64161ddd2..3680a45d83f 100644 --- a/source/blender/gpu/intern/gpu_draw.c +++ b/source/blender/gpu/intern/gpu_draw.c @@ -473,13 +473,11 @@ void GPU_create_gl_tex( if (textarget == GL_TEXTURE_2D) { if (use_high_bit_depth) { - if (GLEW_ARB_texture_float) - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, rectw, recth, 0, GL_RGBA, GL_FLOAT, frect); - else - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16, rectw, recth, 0, GL_RGBA, GL_FLOAT, frect); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, rectw, recth, 0, GL_RGBA, GL_FLOAT, frect); } - else + else { glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, rectw, recth, 0, GL_RGBA, GL_UNSIGNED_BYTE, rect); + } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gpu_get_mipmap_filter(1)); @@ -502,10 +500,7 @@ void GPU_create_gl_tex( for (i = 1; i < ibuf->miptot; i++) { ImBuf *mip = ibuf->mipmap[i - 1]; if (use_high_bit_depth) { - if (GLEW_ARB_texture_float) - glTexImage2D(GL_TEXTURE_2D, i, GL_RGBA16F, mip->x, mip->y, 0, GL_RGBA, GL_FLOAT, mip->rect_float); - else - glTexImage2D(GL_TEXTURE_2D, i, GL_RGBA16, mip->x, mip->y, 0, GL_RGBA, GL_FLOAT, mip->rect_float); + glTexImage2D(GL_TEXTURE_2D, i, GL_RGBA16F, mip->x, mip->y, 0, GL_RGBA, GL_FLOAT, mip->rect_float); } else { glTexImage2D(GL_TEXTURE_2D, i, GL_RGBA8, mip->x, mip->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, mip->rect); @@ -525,7 +520,7 @@ void GPU_create_gl_tex( if (h == w && is_power_of_2_i(h) && !is_over_resolution_limit(textarget, h, w)) { void **cube_map = gpu_gen_cube_map(rect, frect, rectw, recth, use_high_bit_depth); - GLenum informat = use_high_bit_depth ? (GLEW_ARB_texture_float ? GL_RGBA16F : GL_RGBA16) : GL_RGBA8; + GLenum informat = use_high_bit_depth ? GL_RGBA16F : GL_RGBA8; GLenum type = use_high_bit_depth ? GL_FLOAT : GL_UNSIGNED_BYTE; if (cube_map) |