Code cleanup: remove unused function
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 4 Oct 2013 12:22:54 +0000 (12:22 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 4 Oct 2013 12:22:54 +0000 (12:22 +0000)
source/blender/editors/include/BIF_glutil.h
source/blender/editors/screen/glutil.c

index 352a74cf172f78bfc4ecb00efee7fba5de88384b..dd1995a5428b5c3c086d19630a6b8d62dd6dbaed 100644 (file)
@@ -221,8 +221,5 @@ void glaDrawImBuf_glsl(struct ImBuf *ibuf, float x, float y, int zoomfilter,
 /* Draw imbuf on a screen, preferably using GLSL display transform */
 void glaDrawImBuf_glsl_ctx(const struct bContext *C, struct ImBuf *ibuf, float x, float y, int zoomfilter);
 
-/* Transform buffer from role to scene linear space using GLSL OCIO conversion */
-int glaBufferTransformFromRole_glsl(float *buffer, int width, int height, int role);
-
 #endif /* __BIF_GLUTIL_H__ */
 
index 13befeceee90bbded363b93c0fb0e06e91fa4bd2..70e5aab66281a3aaff090d5d4d1c3276a4fbe576 100644 (file)
@@ -1160,57 +1160,3 @@ void glaDrawImBuf_glsl_ctx(const bContext *C, ImBuf *ibuf, float x, float y, int
 
        glaDrawImBuf_glsl(ibuf, x, y, zoomfilter, view_settings, display_settings);
 }
-
-/* Transform buffer from role to scene linear space using GLSL OCIO conversion
- *
- * See IMB_colormanagement_setup_transform_from_role_glsl description for
- * some more details
- *
- * NOTE: this only works for RGBA buffers!
- */
-int glaBufferTransformFromRole_glsl(float *buffer, int width, int height, int role)
-{
-       GPUOffScreen *ofs;
-       char err_out[256];
-       rcti display_rect;
-
-       ofs = GPU_offscreen_create(width, height, err_out);
-
-       if (!ofs)
-               return FALSE;
-
-       GPU_offscreen_bind(ofs);
-
-       if (!IMB_colormanagement_setup_transform_from_role_glsl(role, true)) {
-               GPU_offscreen_unbind(ofs);
-               GPU_offscreen_free(ofs);
-               return FALSE;
-       }
-
-       BLI_rcti_init(&display_rect, 0, width, 0, height);
-
-       glMatrixMode(GL_PROJECTION);
-       glPushMatrix();
-       glMatrixMode(GL_MODELVIEW);
-       glPushMatrix();
-
-       glaDefine2DArea(&display_rect);
-
-       glaDrawPixelsTex(0, 0, width, height, GL_RGBA, GL_FLOAT,
-                        GL_NEAREST, buffer);
-
-       glMatrixMode(GL_PROJECTION);
-       glPopMatrix();
-       glMatrixMode(GL_MODELVIEW);
-       glPopMatrix();
-
-       GPU_offscreen_read_pixels(ofs, GL_FLOAT, buffer);
-
-       IMB_colormanagement_finish_glsl_transform();
-
-       /* unbind */
-       GPU_offscreen_unbind(ofs);
-       GPU_offscreen_free(ofs);
-
-       return TRUE;
-}