mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 15:01:49 +00:00
Merge branch 'main' into block_materials
This commit is contained in:
commit
015b1c2ed7
1 changed files with 7 additions and 0 deletions
|
|
@ -59,6 +59,13 @@ void Framebuffer::resize(uint width, uint height) {
|
||||||
if (this->width == width && this->height == height) {
|
if (this->width == width && this->height == height) {
|
||||||
return;
|
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();
|
texture->bind();
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, nullptr);
|
glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, 0, format, GL_UNSIGNED_BYTE, nullptr);
|
||||||
texture->unbind();
|
texture->unbind();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue