Skip to content

Commit bbbc0a0

Browse files
committed
Bug: FBO depth buffer should be optional
1 parent 09ebe82 commit bbbc0a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

demosys/opengl/fbo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def create_from_textures(color_buffers: List[Texture2D], depth_buffer: DepthText
5555
instance.depth_buffer = depth_buffer
5656

5757
instance.fbo = context.ctx().framebuffer(
58-
[b.mgl_instance for b in color_buffers],
59-
depth_buffer.mgl_instance
58+
color_attachments=[b.mgl_instance for b in color_buffers],
59+
depth_attachment=depth_buffer.mgl_instance if depth_buffer is not None else None,
6060
)
6161

6262
return instance
@@ -86,8 +86,8 @@ def create(size, components=4, depth=False, dtype='f1', layers=1):
8686
instance.depth_buffer = DepthTexture(size)
8787

8888
instance.fbo = context.ctx().framebuffer(
89-
[b.mgl_instance for b in instance.color_buffers],
90-
instance.depth_buffer.mgl_instance if instance.depth_buffer is not None else None
89+
color_attachments=[b.mgl_instance for b in instance.color_buffers],
90+
depth_attachment=instance.depth_buffer.mgl_instance if instance.depth_buffer is not None else None
9191
)
9292

9393
return instance

0 commit comments

Comments
 (0)