Merge branch 'main' into block_materials

This commit is contained in:
MihailRis 2024-03-09 02:21:55 +03:00
commit 015b1c2ed7

View File

@ -59,6 +59,13 @@ void Framebuffer::resize(uint width, uint height) {
if (this->width == width && this->height == height) {
return;
}
this->width = width;
this->height = height;
glBindRenderbuffer(GL_RENDERBUFFER, depth);
glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, width, height);
glBindFramebuffer(GL_FRAMEBUFFER, 0);
texture->bind();
glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, nullptr);
texture->unbind();