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

View File

@@ -227,7 +227,7 @@ void RenderableDebugPlane::createPlane() {
// ============================
const GLfloat size = _size;
const GLfloat vertexData[] = {
const std::array<GLfloat, 36> vertexData = {
// x y z w s t
-size, -size, 0.f, 0.f, 0.f, 0.f,
size, size, 0.f, 0.f, 1.f, 1.f,
@@ -239,7 +239,7 @@ void RenderableDebugPlane::createPlane() {
glBindVertexArray(_quad); // bind array
glBindBuffer(GL_ARRAY_BUFFER, _vertexPositionBuffer); // bind buffer
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);
glEnableVertexAttribArray(1);