mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:20:05 +00:00
Fix GLEW clang-tidy issues
This commit is contained in:
parent
331b2d855f
commit
a6f8547455
15 changed files with 176 additions and 95 deletions
|
|
@ -101,6 +101,8 @@ void Rectangle::Initialize()
|
|||
glBufferData(
|
||||
GL_ARRAY_BUFFER, sizeof(float) * BUFFER_LENGTH, nullptr, GL_DYNAMIC_DRAW);
|
||||
|
||||
// NOLINTBEGIN(performance-no-int-to-ptr)
|
||||
|
||||
glVertexAttribPointer(0,
|
||||
3,
|
||||
GL_FLOAT,
|
||||
|
|
@ -117,6 +119,8 @@ void Rectangle::Initialize()
|
|||
reinterpret_cast<void*>(3 * sizeof(float)));
|
||||
glEnableVertexAttribArray(1);
|
||||
|
||||
// NOLINTEND(performance-no-int-to-ptr)
|
||||
|
||||
p->dirty_ = true;
|
||||
}
|
||||
|
||||
|
|
@ -134,12 +138,14 @@ void Rectangle::Render(const QMapLibre::CustomLayerRenderParameters& params)
|
|||
if (p->fillColor_.has_value())
|
||||
{
|
||||
// Draw fill
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
|
||||
glDrawArrays(GL_TRIANGLES, 24, 6);
|
||||
}
|
||||
|
||||
if (p->borderWidth_ > 0.0f)
|
||||
{
|
||||
// Draw border
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
|
||||
glDrawArrays(GL_TRIANGLES, 0, 24);
|
||||
}
|
||||
}
|
||||
|
|
@ -283,7 +289,7 @@ void Rectangle::Impl::Update()
|
|||
|
||||
glBufferData(GL_ARRAY_BUFFER,
|
||||
sizeof(float) * BUFFER_LENGTH,
|
||||
buffer,
|
||||
static_cast<const void*>(buffer),
|
||||
GL_DYNAMIC_DRAW);
|
||||
|
||||
dirty_ = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue