mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 19:28:49 -04:00
parent
bcf5ecf3c8
commit
4d25e9820b
@ -1387,7 +1387,9 @@ pub const FrameBuffer = struct {
|
|||||||
c.glDeleteTextures(1, &self.texture);
|
c.glDeleteTextures(1, &self.texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn updateSize(self: *FrameBuffer, width: u31, height: u31, internalFormat: c_int) void {
|
pub fn updateSize(self: *FrameBuffer, _width: u31, _height: u31, internalFormat: c_int) void {
|
||||||
|
const width = @max(_width, 1);
|
||||||
|
const height = @max(_height, 1);
|
||||||
c.glBindFramebuffer(c.GL_FRAMEBUFFER, self.frameBuffer);
|
c.glBindFramebuffer(c.GL_FRAMEBUFFER, self.frameBuffer);
|
||||||
if(self.hasDepthTexture) {
|
if(self.hasDepthTexture) {
|
||||||
c.glBindTexture(c.GL_TEXTURE_2D, self.depthTexture);
|
c.glBindTexture(c.GL_TEXTURE_2D, self.depthTexture);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user