mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
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:
+1
-1
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user