Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwintabbox/thumbnailitem.cpp
Show First 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 60 | "void main() { \n" | |||
---|---|---|---|---|---|
64 | " } \n" | 64 | " } \n" | ||
65 | " tex.rgb = tex.rgb * u_brightness; \n" | 65 | " tex.rgb = tex.rgb * u_brightness; \n" | ||
66 | " gl_FragColor = tex * u_opacity; \n" | 66 | " gl_FragColor = tex * u_opacity; \n" | ||
67 | "}"; | 67 | "}"; | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | const char* const *BrightnessSaturationShader::attributeNames() const | 70 | const char* const *BrightnessSaturationShader::attributeNames() const | ||
71 | { | 71 | { | ||
72 | static char const *const names[] = { "vertex", "texCoord", 0 }; | 72 | static char const *const names[] = { "vertex", "texCoord", nullptr }; | ||
73 | return names; | 73 | return names; | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | void BrightnessSaturationShader::updateState(const QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) | 76 | void BrightnessSaturationShader::updateState(const QSGMaterialShader::RenderState &state, QSGMaterial *newMaterial, QSGMaterial *oldMaterial) | ||
77 | { | 77 | { | ||
78 | Q_ASSERT(program()->isLinked()); | 78 | Q_ASSERT(program()->isLinked()); | ||
79 | if (state.isMatrixDirty()) | 79 | if (state.isMatrixDirty()) | ||
80 | program()->setUniformValue(m_id_matrix, state.combinedMatrix()); | 80 | program()->setUniformValue(m_id_matrix, state.combinedMatrix()); | ||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |