Remove redundant Uniform(QColor) helper.
This commit is contained in:
parent
b1d5ed4ab5
commit
35236988b7
3 changed files with 2 additions and 11 deletions
|
|
@ -20,14 +20,6 @@ QVector4D Uniform(const Rect &rect) {
|
|||
return QVector4D(rect.x(), rect.y(), rect.width(), rect.height());
|
||||
}
|
||||
|
||||
QVector4D Uniform(const QColor &color) {
|
||||
return QVector4D(
|
||||
color.redF(),
|
||||
color.greenF(),
|
||||
color.blueF(),
|
||||
color.alphaF());
|
||||
}
|
||||
|
||||
QSizeF Uniform(QSize size) {
|
||||
return size;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,6 @@ private:
|
|||
|
||||
[[nodiscard]] QVector4D Uniform(const QRect &rect, float factor);
|
||||
[[nodiscard]] QVector4D Uniform(const Rect &rect);
|
||||
[[nodiscard]] QVector4D Uniform(const QColor &color);
|
||||
[[nodiscard]] QSizeF Uniform(QSize size);
|
||||
|
||||
[[nodiscard]] Rect TransformRect(
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ void FillTriangles(
|
|||
buffer->bind();
|
||||
buffer->allocate(coords.data(), coords.size() * sizeof(GLfloat));
|
||||
|
||||
program->setUniformValue("s_color", Uniform(color));
|
||||
program->setUniformValue("s_color", color);
|
||||
|
||||
GLint position = program->attributeLocation("position");
|
||||
f.glVertexAttribPointer(
|
||||
|
|
@ -71,7 +71,7 @@ void FillRectangle(
|
|||
return reinterpret_cast<const void*>(
|
||||
(skipVertices * 4 + elements) * sizeof(GLfloat));
|
||||
};
|
||||
program->setUniformValue("s_color", Uniform(color));
|
||||
program->setUniformValue("s_color", color);
|
||||
|
||||
GLint position = program->attributeLocation("position");
|
||||
f.glVertexAttribPointer(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue