aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/render/Framebuffer.cpp6
-rw-r--r--src/render/Framebuffer.hpp22
-rw-r--r--src/render/OpenGL.cpp2
3 files changed, 13 insertions, 17 deletions
diff --git a/src/render/Framebuffer.cpp b/src/render/Framebuffer.cpp
index 32d2361b..7cd91a04 100644
--- a/src/render/Framebuffer.cpp
+++ b/src/render/Framebuffer.cpp
@@ -20,7 +20,7 @@ bool CFramebuffer::alloc(int w, int h) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
}
- if (firstAlloc || m_Size != Vector2D(w, h)) {
+ if (firstAlloc || m_vSize != Vector2D(w, h)) {
glBindTexture(GL_TEXTURE_2D, m_cTex.m_iTexID);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
@@ -48,7 +48,7 @@ bool CFramebuffer::alloc(int w, int h) {
glBindTexture(GL_TEXTURE_2D, 0);
glBindFramebuffer(GL_FRAMEBUFFER, g_pHyprOpenGL->m_iCurrentOutputFb);
- m_Size = Vector2D(w, h);
+ m_vSize = Vector2D(w, h);
return true;
}
@@ -73,7 +73,7 @@ void CFramebuffer::release() {
m_cTex.m_iTexID = 0;
m_iFb = -1;
- m_Size = Vector2D();
+ m_vSize = Vector2D();
}
CFramebuffer::~CFramebuffer() {
diff --git a/src/render/Framebuffer.hpp b/src/render/Framebuffer.hpp
index 9dacbce3..9ba3ac05 100644
--- a/src/render/Framebuffer.hpp
+++ b/src/render/Framebuffer.hpp
@@ -7,20 +7,16 @@ class CFramebuffer {
public:
~CFramebuffer();
- bool alloc(int w, int h);
- void bind();
- void release();
- void reset();
- bool isAllocated();
+ bool alloc(int w, int h);
+ void bind();
+ void release();
+ void reset();
+ bool isAllocated();
- Vector2D m_Position;
- Vector2D m_Size;
- float m_fScale = 1;
+ Vector2D m_vSize;
- CTexture m_cTex;
- GLuint m_iFb = -1;
+ CTexture m_cTex;
+ GLuint m_iFb = -1;
- CTexture* m_pStencilTex = nullptr;
-
- wl_output_transform m_tTransform; // for saving state
+ CTexture* m_pStencilTex = nullptr;
}; \ No newline at end of file
diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp
index 5a436414..81401727 100644
--- a/src/render/OpenGL.cpp
+++ b/src/render/OpenGL.cpp
@@ -124,7 +124,7 @@ void CHyprOpenGLImpl::begin(CMonitor* pMonitor, CRegion* pDamage, bool fake) {
m_iWLROutputFb = m_iCurrentOutputFb;
// ensure a framebuffer for the monitor exists
- if (m_mMonitorRenderResources.find(pMonitor) == m_mMonitorRenderResources.end() || m_RenderData.pCurrentMonData->primaryFB.m_Size != pMonitor->vecPixelSize) {
+ if (m_mMonitorRenderResources.find(pMonitor) == m_mMonitorRenderResources.end() || m_RenderData.pCurrentMonData->primaryFB.m_vSize != pMonitor->vecPixelSize) {
m_RenderData.pCurrentMonData->stencilTex.allocate();
m_RenderData.pCurrentMonData->primaryFB.m_pStencilTex = &m_RenderData.pCurrentMonData->stencilTex;