Draws Blendmask with warp grid and brush stroke layer.
248 _.glEnable(GL_DEPTH_TEST);
249 _.glEnable(GL_BLEND);
250 _.glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
259 _h.uniform(
"top", _mask.topWidth());
260 _h.uniform(
"right", _mask.rightWidth());
261 _h.uniform(
"bottom", _mask.bottomWidth());
262 _h.uniform(
"left", _mask.leftWidth());
263 _h.uniform(
"edge_gamma", _mask.gamma());
264 _h.texUniform(
"input_tex", _inputTexId);
265 _h.uniform(
"input_opacity", _inputOpacity);
266 _h.uniform(
"color", _color.redF(),
269 _h.uniform(
"gray_output", _grayscale);
274 _h.uniform(
"cc_gamma", QVector4D(
279 _h.uniform(
"cc_brightness", QVector4D(
280 _cC.red().brightness(),
281 _cC.green().brightness(),
282 _cC.blue().brightness(),
283 _cC.all().brightness()));
284 _h.uniform(
"cc_contrast", QVector4D(
285 _cC.red().contrast(),
286 _cC.green().contrast(),
287 _cC.blue().contrast(),
288 _cC.all().contrast()));
289 _h.uniform(
"cc_multiplier", QVector4D(
290 _cC.red().multiplier(),
291 _cC.green().multiplier(),
292 _cC.blue().multiplier(),
293 _cC.all().multiplier()));
295 QVector4D _null(0.0, 0.0, 0.0, 0.0);
296 _h.uniform(
"cc_multiplier", _null);
297 _h.uniform(
"cc_contrast", _null);
298 _h.uniform(
"cc_brightness", _null);
299 _h.uniform(
"cc_gamma", _null);
303 GLfloat(_blendMaskOpacity));
307 if (_blendMaskOpacity > 0.0) {
308 glColor4f(0.0, 0.0, 0.0, 1.0);
315 glVertex2f(-0.5, -0.5 - _b);
316 glVertex2f(0.5 - _b, -0.5);
317 glVertex2f(0.5 - _b, 0.5);
318 glVertex2f(-0.5, 0.5 + _b);
319 glVertex2f(-0.5 + _b, -0.5 - _b);
320 glVertex2f(0.5, -0.5);
321 glVertex2f(0.5, 0.5);
322 glVertex2f(-0.5 + _b, 0.5 + _b);
323 glVertex2f(-0.5 + _b, 0.5 + _b);
324 glVertex2f(0.5 - _b, 0.5 + _b);
325 glVertex2f(0.5 - _b, 0.5);
326 glVertex2f(-0.5 + _b, 0.5);
327 glVertex2f(-0.5 + _b, -0.5);
328 glVertex2f(0.5 - _b, -0.5);
329 glVertex2f(0.5 - _b, -0.5 - _b);
330 glVertex2f(-0.5 + _b, -0.5 - _b);
static void drawFlipped(float _left=-0.5, float _right=0.5, float _top=0.5, float _bottom=-0.5)
Draw rectangle from border coordinates, flipped on y axis version.
Definition: Rectangle.cpp:68
omni::proj::Tuning const & tuning() const
Definition: Tuning.cpp:45
ContextBoundPtr< QOpenGLFramebufferObject > warpGridBuffer_
Frame buffer which holds a texture with current view image.
Definition: Tuning.h:108
void withCurrentContext(ContextFunctor f)
Do OpenGL operations with current context, if it exists.
Definition: ContextSwitch.cpp:45
BlendMask & blendMask()
Returns reference to blend mask.
Definition: Tuning.cpp:96
void useShader(QOpenGLShaderProgram &_s, std::function< void(UniformHandler &)>f)
Use shader with and do uniform assignment and drawing inside functor.
Definition: Shader.cpp:59
ContextBoundPtr< QOpenGLTexture > blendTex_
Definition: Tuning.h:102
static ContextBoundPtr< QOpenGLShaderProgram > blendBrushShader_
Definition: Tuning.h:117
ColorCorrection & colorCorrection()
Color correction for projector.
Definition: Tuning.cpp:116
ContextBoundPtr< visual::WarpGrid > warpGrid_
Definition: Tuning.h:101
static ContextBoundPtr< QOpenGLShaderProgram > blendShader_
Definition: Tuning.h:116