mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-16 06:55:58 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user