mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gpu: add binding flags to Backend.NewTexture
Direct3D needs to know the texture bind usage up front, in particular whether the texture is going to be used as a render target. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-1
@@ -210,7 +210,8 @@ func (s *fboSet) resize(ctx Backend, sizes []image.Point) {
|
||||
f.tex.Release()
|
||||
}
|
||||
f.size = sz
|
||||
f.tex = ctx.NewTexture(TextureFormatFloat, sz.X, sz.Y, FilterNearest, FilterNearest)
|
||||
f.tex = ctx.NewTexture(TextureFormatFloat, sz.X, sz.Y, FilterNearest, FilterNearest,
|
||||
BufferBindingTexture|BufferBindingFramebuffer)
|
||||
f.fbo.BindTexture(f.tex)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user