move background to vertex buffer

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97
2025-01-10 14:54:40 +02:00
parent 0219c11a73
commit 87ec7cdd39
9 changed files with 68 additions and 46 deletions

View File

@ -11,6 +11,7 @@ class BoxGeometry : protected QOpenGLFunctions {
public:
BoxGeometry(QVector3D size, QVector3D position);
BoxGeometry(QVector3D size, QVector3D position, QPoint uv, QVector3D textureDim, QSize textureSize = { 64, 64 });
static BoxGeometry* Plane();
virtual ~BoxGeometry();
void draw(QOpenGLShaderProgram* program);
@ -24,5 +25,6 @@ class BoxGeometry : protected QOpenGLFunctions {
QVector3D m_size;
QVector3D m_position;
QMatrix4x4 m_matrix;
GLsizei m_indecesCount;
};
} // namespace opengl