gpu: add depthBits parameter to NewFramebuffer

Along with ReadPixels in the next change, a Framebuffer with depth is enough to
implement screenshot functionality on top of any Backend.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-22 07:53:49 +01:00
parent 10484d26f3
commit 6fd545a4d8
4 changed files with 37 additions and 6 deletions
+1 -1
View File
@@ -213,7 +213,7 @@ func (s *fboSet) resize(ctx Backend, sizes []image.Point) {
}
tex, err := ctx.NewTexture(TextureFormatFloat, sz.X, sz.Y, FilterNearest, FilterNearest,
BufferBindingTexture|BufferBindingFramebuffer)
fbo, err := ctx.NewFramebuffer(tex)
fbo, err := ctx.NewFramebuffer(tex, 0)
if err != nil {
panic(err)
}