summaryrefslogtreecommitdiff
path: root/src/render/Framebuffer.cpp
diff options
context:
space:
mode:
authorVaxry <43317083+vaxerski@users.noreply.github.com>2024-12-07 18:51:18 +0100
committerGitHub <noreply@github.com>2024-12-07 18:51:18 +0100
commit8bbeee11734d3ba8e2cf15d19cb3c302f8bfdbf2 (patch)
tree5b6654818049a0743f62defc090e86d4327cccbb /src/render/Framebuffer.cpp
parentb1e5cc66bdb20b002c93479490c3a317552210b3 (diff)
core: Add clang-tidy (#8664)
This adds a .clang-tidy file for us. It's not a strict requirement to be compliant, but I tuned it to be alright.
Diffstat (limited to 'src/render/Framebuffer.cpp')
-rw-r--r--src/render/Framebuffer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/render/Framebuffer.cpp b/src/render/Framebuffer.cpp
index bf75d414..93f8fe7f 100644
--- a/src/render/Framebuffer.cpp
+++ b/src/render/Framebuffer.cpp
@@ -9,8 +9,8 @@ bool CFramebuffer::alloc(int w, int h, uint32_t drmFormat) {
bool firstAlloc = false;
RASSERT((w > 1 && h > 1), "cannot alloc a FB with negative / zero size! (attempted {}x{})", w, h);
- uint32_t glFormat = FormatUtils::drmFormatToGL(drmFormat);
- uint32_t glType = FormatUtils::glFormatToType(glFormat);
+ uint32_t glFormat = NFormatUtils::drmFormatToGL(drmFormat);
+ uint32_t glType = NFormatUtils::glFormatToType(glFormat);
if (!m_cTex)
m_cTex = makeShared<CTexture>();
@@ -33,7 +33,7 @@ bool CFramebuffer::alloc(int w, int h, uint32_t drmFormat) {
if (firstAlloc || m_vSize != Vector2D(w, h)) {
glBindTexture(GL_TEXTURE_2D, m_cTex->m_iTexID);
- glTexImage2D(GL_TEXTURE_2D, 0, glFormat, w, h, 0, GL_RGBA, glType, 0);
+ glTexImage2D(GL_TEXTURE_2D, 0, glFormat, w, h, 0, GL_RGBA, glType, nullptr);
glBindFramebuffer(GL_FRAMEBUFFER, m_iFb);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_cTex->m_iTexID, 0);
@@ -42,7 +42,7 @@ bool CFramebuffer::alloc(int w, int h, uint32_t drmFormat) {
#ifndef GLES2
if (m_pStencilTex) {
glBindTexture(GL_TEXTURE_2D, m_pStencilTex->m_iTexID);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, w, h, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, w, h, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, nullptr);
glBindFramebuffer(GL_FRAMEBUFFER, m_iFb);
@@ -70,7 +70,7 @@ void CFramebuffer::addStencil(SP<CTexture> tex) {
#ifndef GLES2
m_pStencilTex = tex;
glBindTexture(GL_TEXTURE_2D, m_pStencilTex->m_iTexID);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, m_vSize.x, m_vSize.y, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, 0);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH24_STENCIL8, m_vSize.x, m_vSize.y, 0, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, nullptr);
glBindFramebuffer(GL_FRAMEBUFFER, m_iFb);