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:
+1
-1
@@ -378,7 +378,7 @@ func (r *renderer) texHandle(t *texture) Texture {
|
||||
if t.tex != nil {
|
||||
return t.tex
|
||||
}
|
||||
t.tex = r.ctx.NewTexture(TextureFormatSRGB, t.src.Bounds().Dx(), t.src.Bounds().Dy(), FilterLinear, FilterLinear)
|
||||
t.tex = r.ctx.NewTexture(TextureFormatSRGB, t.src.Bounds().Dx(), t.src.Bounds().Dy(), FilterLinear, FilterLinear, BufferBindingTexture)
|
||||
t.tex.Upload(t.src)
|
||||
return t.tex
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user