OpenGL: Remove remaining instances of GL_RGBA16F_ARB.
authorClément Foucault <foucault.clem@gmail.com>
Tue, 24 Apr 2018 09:10:30 +0000 (11:10 +0200)
committerClément Foucault <foucault.clem@gmail.com>
Tue, 24 Apr 2018 10:48:43 +0000 (12:48 +0200)
There is no need for it now that we use opengl 3.3. Use GL_RGBA16F instead.

intern/cycles/device/device.cpp
intern/cycles/device/device_cuda.cpp
intern/opencolorio/ocio_impl_glsl.cc
source/blender/editors/screen/glutil.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/gpu/intern/gpu_draw.c

index aa2a10a3dd905ce6e118843d2b57f01fb5214a13..906c01c619dd738d706e769bf6f54f87e9120406 100644 (file)
@@ -248,7 +248,7 @@ void Device::draw_pixels(
        if(rgba.data_type == TYPE_HALF) {
                GLhalf *data_pointer = (GLhalf*)rgba.host_pointer;
                data_pointer += 4 * y * w;
-               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, w, h, 0, GL_RGBA, GL_HALF_FLOAT, data_pointer);
+               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, w, h, 0, GL_RGBA, GL_HALF_FLOAT, data_pointer);
        }
        else {
                uint8_t *data_pointer = (uint8_t*)rgba.host_pointer;
index 54d4c731ed45bb9f3a9347149462badcc791c5e4..66c3f526ae724845132cb5797d23d903e59c48fa 100644 (file)
@@ -1893,7 +1893,7 @@ public:
                glGenTextures(1, &pmem.cuTexId);
                glBindTexture(GL_TEXTURE_2D, pmem.cuTexId);
                if(mem.data_type == TYPE_HALF)
-                       glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, pmem.w, pmem.h, 0, GL_RGBA, GL_HALF_FLOAT, NULL);
+                       glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, pmem.w, pmem.h, 0, GL_RGBA, GL_HALF_FLOAT, NULL);
                else
                        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, pmem.w, pmem.h, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
index 08f3c15eb95149ac033a391431a1a79ce6ab0aab..e20d507b470310caccc3a1557754da218f7b0243 100644 (file)
@@ -218,7 +218,7 @@ static bool ensureCurveMappingAllocated(OCIO_GLSLDrawState *state, OCIO_CurveMap
        /* clean glError buffer */
        while (glGetError() != GL_NO_ERROR) {}
 
-       glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA16F_ARB, curve_mapping_settings->lut_size,
+       glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA16F, curve_mapping_settings->lut_size,
                     0, GL_RGBA, GL_FLOAT, curve_mapping_settings->lut);
 
        state->curve_mapping_texture_allocated = true;
index cd875c73eda0d151254aa1bc73803f3154527cde..39178af9e4e9c730e1c5190e7ce357ee471f595a 100644 (file)
@@ -228,15 +228,7 @@ void immDrawPixelsTexScaled_clipping(IMMDrawPixelsTexState *state,
 
        if (type == GL_FLOAT) {
                /* need to set internal format to higher range float */
-
-               /* NOTE: this could fail on some drivers, like mesa,
-                *       but currently this code is only used by color
-                *       management stuff which already checks on whether
-                *       it's possible to use GL_RGBA16F_ARB
-                */
-
-               /* TODO viewport : remove extension */
-               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, tex_w, tex_h, 0, format, GL_FLOAT, NULL);
+               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, tex_w, tex_h, 0, format, GL_FLOAT, NULL);
        }
        else {
                /* switch to 8bit RGBA for byte buffer */
index 6f88a3481b51fdc13138da6e5c750930d2c3d5b2..804d7d97eb0fe9763c4d50b2ad194250b0f70a2a 100644 (file)
@@ -1316,7 +1316,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
 
        if (type == GL_FLOAT)
-               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, ibuf->x, ibuf->y, 0, format, type, display_buffer);
+               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F, ibuf->x, ibuf->y, 0, format, type, display_buffer);
        else
                glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, ibuf->x, ibuf->y, 0, format, type, display_buffer);
 
index 6b768d4bdd68786b21db8c738a491bb78d3edf12..8b23cf6f936da36f71069baaf0737e9c51af14b3 100644 (file)
@@ -480,7 +480,7 @@ 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_ARB, rectw, recth, 0, GL_RGBA, GL_FLOAT, frect);
+                               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);
                }
@@ -509,7 +509,7 @@ void GPU_create_gl_tex(
                                        ImBuf *mip = ibuf->mipmap[i - 1];
                                        if (use_high_bit_depth) {
                                                if (GLEW_ARB_texture_float)
-                                                       glTexImage2D(GL_TEXTURE_2D, i, GL_RGBA16F_ARB, 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_RGBA16, mip->x, mip->y, 0, GL_RGBA, GL_FLOAT, mip->rect_float);
                                        }
@@ -531,7 +531,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_ARB : GL_RGBA16) : GL_RGBA8;
+                       GLenum informat = use_high_bit_depth ? (GLEW_ARB_texture_float ? GL_RGBA16F : GL_RGBA16) : GL_RGBA8;
                        GLenum type = use_high_bit_depth ? GL_FLOAT : GL_UNSIGNED_BYTE;
 
                        if (cube_map)