Second linting pass and adding .clang_tidy file (#3128)

This commit is contained in:
Alexander Bock
2024-03-18 22:46:17 +01:00
committed by GitHub
parent 8e49847a47
commit 534f92c485
80 changed files with 291 additions and 230 deletions
+2 -2
View File
@@ -322,7 +322,7 @@ void RenderablePlane::update(const UpdateData&) {
void RenderablePlane::createPlane() {
const GLfloat sizeX = _size.value().x;
const GLfloat sizeY = _size.value().y;
const GLfloat vertexData[] = {
const std::array<GLfloat, 36> vertexData = {
// x y z w s t
-sizeX, -sizeY, 0.f, 0.f, 0.f, 0.f,
sizeX, sizeY, 0.f, 0.f, 1.f, 1.f,
@@ -334,7 +334,7 @@ void RenderablePlane::createPlane() {
glBindVertexArray(_quad);
glBindBuffer(GL_ARRAY_BUFFER, _vertexPositionBuffer);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertexData), vertexData, GL_STATIC_DRAW);
glBufferData(GL_ARRAY_BUFFER, sizeof(vertexData), vertexData.data(), GL_STATIC_DRAW);
glEnableVertexAttribArray(0);
glVertexAttribPointer(0, 4, GL_FLOAT, GL_FALSE, sizeof(GLfloat) * 6, nullptr);