Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-04-02 21:28:37 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-04-02 21:28:37 +0400
commit752ad1bc375663f4bab649dd558f7334cbe03a1c (patch)
tree9f528055a06ee2d6a6e1c3cf2c6f4e02fd2dff23 /source/blender/imbuf/IMB_colormanagement.h
parentf871d9a82f06e70fb26cbe0bfbd4db18d481059c (diff)
More usage of GLSL for color managed image drawing
Uses GLSL for drawing image in Image Editor space. This requires change in image_buffer_rect_update, so original float buffer is being updated as well. This is unlikely be something bad, but will keep an eye on this change. Also no byte buffer allocation happens there, this is so because byte buffer used for display only and in case of GLSL display such allocation and partial update is just waste of time. Also switched OpenGL render from using CPU color space linearization to GLSL color space transform. Makes OpenGL rendering pretty much faster (but still slower than in 2.60). internal changes: - Added functions to setup GLSL shader for color space conversion in colormanagement.c. Currently conversion form a colorspace defined by a role to linear space is implemented. Easy to extend to other cases. - Added helper functions to glutil.c which does smarter image buffer draw (calling all needed OCIO stuff, editors now could draw image buffer with a single function call -- all the checks are done in glutil.c). - Also added helper function for buffer linearization from a given role to glutil.c. Everyone now able to linearize buffer with a single call. This function will do nothing is GLSL routines fails or not supported. And one last this: this function uses offscreen drawing, could potentially give issues on some cards, also will keep an eye on this.
Diffstat (limited to 'source/blender/imbuf/IMB_colormanagement.h')
-rw-r--r--source/blender/imbuf/IMB_colormanagement.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h
index 473bd7d0c7a..a758cfa04f0 100644
--- a/source/blender/imbuf/IMB_colormanagement.h
+++ b/source/blender/imbuf/IMB_colormanagement.h
@@ -150,11 +150,18 @@ void IMB_colormanagement_processor_free(struct ColormanageProcessor *cm_processo
/* ** OpenGL drawing routines using GLSL for color space transform ** */
-int IMB_coloemanagement_setup_glsl_draw(const struct ColorManagedViewSettings *view_settings,
+/* Configures GLSL shader for conversion from scene linear to display space */
+int IMB_colormanagement_setup_glsl_draw(const struct ColorManagedViewSettings *view_settings,
const struct ColorManagedDisplaySettings *display_settings);
-
-int IMB_coloemanagement_setup_glsl_draw_from_ctx(const struct bContext *C);
-void IMB_coloemanagement_finish_glsl_draw(void);
+/* Same as above, but color management settings are guessing from a given context */
+int IMB_colormanagement_setup_glsl_draw_from_ctx(const struct bContext *C);
+/* Finish GLSL-based display space conversion */
+void IMB_colormanagement_finish_glsl_draw(void);
+
+/* Configures GLSL shader for conversion from space defined by role to scene linear space */
+int IMB_colormanagement_setup_transform_from_role_glsl(int role);
+/* Finish GLSL-based color space conversion */
+void IMB_colormanagement_finish_glsl_transform(void);
/* Roles */
enum {