[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60546] trunk/blender/source/blender/ editors: Code cleanup: remove unused function
Sergey Sharybin
sergey.vfx at gmail.com
Fri Oct 4 14:22:54 CEST 2013
Revision: 60546
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60546
Author: nazgul
Date: 2013-10-04 12:22:54 +0000 (Fri, 04 Oct 2013)
Log Message:
-----------
Code cleanup: remove unused function
Modified Paths:
--------------
trunk/blender/source/blender/editors/include/BIF_glutil.h
trunk/blender/source/blender/editors/screen/glutil.c
Modified: trunk/blender/source/blender/editors/include/BIF_glutil.h
===================================================================
--- trunk/blender/source/blender/editors/include/BIF_glutil.h 2013-10-04 12:11:10 UTC (rev 60545)
+++ trunk/blender/source/blender/editors/include/BIF_glutil.h 2013-10-04 12:22:54 UTC (rev 60546)
@@ -221,8 +221,5 @@
/* 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__ */
Modified: trunk/blender/source/blender/editors/screen/glutil.c
===================================================================
--- trunk/blender/source/blender/editors/screen/glutil.c 2013-10-04 12:11:10 UTC (rev 60545)
+++ trunk/blender/source/blender/editors/screen/glutil.c 2013-10-04 12:22:54 UTC (rev 60546)
@@ -1160,57 +1160,3 @@
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;
-}
More information about the Bf-blender-cvs
mailing list