Rendering now to a HyprFramebuffer

This commit is contained in:
vaxerski
2022-04-09 15:01:28 +02:00
parent eea92231fa
commit b7094200f6
3 changed files with 25 additions and 1 deletions

View File

@@ -20,7 +20,7 @@ bool CFramebuffer::alloc(int w, int h) {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
}
if (firstAlloc)
if (firstAlloc || m_Size != 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);