Changeset View
Changeset View
Standalone View
Standalone View
effects/backgroundcontrast/contrast.cpp
Show First 20 Lines • Show All 477 Lines • ▼ Show 20 Line(s) | |||||
478 | { | 478 | { | ||
479 | const QRegion actualShape = shape & screen; | 479 | const QRegion actualShape = shape & screen; | ||
480 | const QRect r = actualShape.boundingRect(); | 480 | const QRect r = actualShape.boundingRect(); | ||
481 | 481 | | |||
482 | qreal scale = GLRenderTarget::virtualScreenScale(); | 482 | qreal scale = GLRenderTarget::virtualScreenScale(); | ||
483 | 483 | | |||
484 | // Upload geometry for the horizontal and vertical passes | 484 | // Upload geometry for the horizontal and vertical passes | ||
485 | GLVertexBuffer *vbo = GLVertexBuffer::streamingBuffer(); | 485 | GLVertexBuffer *vbo = GLVertexBuffer::streamingBuffer(); | ||
486 | vbo->reset(); | ||||
486 | uploadGeometry(vbo, actualShape); | 487 | uploadGeometry(vbo, actualShape); | ||
487 | vbo->bindArrays(); | 488 | vbo->bindArrays(); | ||
488 | 489 | | |||
489 | // Create a scratch texture and copy the area in the back buffer that we're | 490 | // Create a scratch texture and copy the area in the back buffer that we're | ||
490 | // going to blur into it | 491 | // going to blur into it | ||
491 | GLTexture scratch(GL_RGBA8, r.width() * scale, r.height() * scale); | 492 | GLTexture scratch(GL_RGBA8, r.width() * scale, r.height() * scale); | ||
492 | scratch.setFilter(GL_LINEAR); | 493 | scratch.setFilter(GL_LINEAR); | ||
493 | scratch.setWrapMode(GL_CLAMP_TO_EDGE); | 494 | scratch.setWrapMode(GL_CLAMP_TO_EDGE); | ||
Show All 37 Lines |