lib_ui/ui/gl/gl_primitives.h
Ilya Fedin 8e5d35229a Simple replacements for Qt 6
QStringRef -> QStringView
QTextCursor constructor accepts a QTextDocument only
Some headers are moved, so paths are removed
QMatrix -> QTransform
Methods returning qsizetype are wrapped to int()s to allow compiler to deduce the type
2021-10-19 17:06:25 +04:00

39 lines
948 B
C++

// This file is part of Desktop App Toolkit,
// a set of libraries for developing nice desktop applications.
//
// For license and copyright information please follow this link:
// https://github.com/desktop-app/legal/blob/master/LEGAL
//
#pragma once
#include "ui/gl/gl_math.h"
#include "ui/style/style_core.h"
#include <QOpenGLBuffer>
#include <QOpenGLShaderProgram>
class QOpenGLFunctions;
namespace Ui::GL {
void FillRectTriangleVertices(float *coords, Rect rect);
void FillTriangles(
QOpenGLFunctions &f,
gsl::span<const float> coords,
not_null<QOpenGLBuffer*> buffer,
not_null<QOpenGLShaderProgram*> program,
const QColor &color,
Fn<void()> additional = nullptr);
void FillRectangle(
QOpenGLFunctions &f,
not_null<QOpenGLShaderProgram*> program,
int skipVertices,
const QColor &color);
void FillTexturedRectangle(
QOpenGLFunctions &f,
not_null<QOpenGLShaderProgram*> program,
int skipVertices = 0);
} // namespace Ui::GL