diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-29 20:02:27 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-03-29 20:02:27 +0400 |
commit | 2dff7c01ada2a645d39c2acdc83a10e4a295b35b (patch) | |
tree | b68b29a7488b500b8beca2961685badfaf83952f /source/blender/editors/include/ED_clip.h | |
parent | 44a43afd0e858a8a3d563ff0a1a7b6b8043bd8f3 (diff) |
Implement GPU-side display transform for clip editor
Implemented using GLSL API from OpenColorIO library and
some general functions were added to it's c-api:
- OCIO_setupGLSLDraw prepares OpenGL context for GPU-based
transformation for a giver processor.
This function compiles and links shader, sets up it's
argument. After this transformation would be applied
on an image displaying as a 2D texture.
So, glaDrawPixelsTex called after OCIO_setupGLSLDraw will
do a proper color space transform.
- OCIO_finishGLSLDraw restores OpenGL context after all
color-managed display is over.
- OCIO_freeOGLState frees allocated state structure used
for cacheing some GLSL-related stuff.
There're some utility functions in IMB_colormanagent which
are basically proxies to lower level OCIO functions but
which could be used from any place in blender.
Chacheing of movie clip frame on GPU is also removed now,
and either glaDrawPixelsTex or glaDrawPixelsAuto are used
for display now. This is so no code duplication happens
now and no large textures are lurking around in GPU memory.
Known issues:
- Texture buffer and GLSL are no longer checking for
video card capabilities, possibly could lead to some
artifacts on crappy drivers/cards.
- Only float buffers are displaying using GLSL, byte
buffers will still use fallback display method.
This is to be addressed later.
- If RGB curves are used as a part of display transform,
GLSL display will also be disabled. This is also thing
to be solved later.
Additional changes:
- glaDrawPixelsTexScaled will now use RGBA16F as an
internal format of storing textures when it's used
to draw float buffer. This is needed so LUT are
applied without precision loss.
Diffstat (limited to 'source/blender/editors/include/ED_clip.h')
-rw-r--r-- | source/blender/editors/include/ED_clip.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h index 28727c913cb..541956136bd 100644 --- a/source/blender/editors/include/ED_clip.h +++ b/source/blender/editors/include/ED_clip.h @@ -39,6 +39,7 @@ struct Main; struct Mask; struct MovieClip; struct SpaceClip; +struct Scene; /* ** clip_editor.c ** */ @@ -81,12 +82,6 @@ void ED_space_clip_set_clip(struct bContext *C, struct bScreen *screen, struct S struct Mask *ED_space_clip_get_mask(struct SpaceClip *sc); void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask); -/* textures buffer */ -int ED_space_clip_texture_buffer_supported(struct SpaceClip *sc); -int ED_space_clip_load_movieclip_buffer(struct SpaceClip *sc, struct ImBuf *ibuf, const unsigned char *display_buffer); -void ED_space_clip_unload_movieclip_buffer(struct SpaceClip *sc); -void ED_space_clip_free_texture_buffer(struct SpaceClip *sc); - /* ** clip_ops.c ** */ void ED_operatormacros_clip(void); |