gpu: remove Backend.Resize and fully specify format in Backend.NewTexture

Re-create textures instead to better match direct3d.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-20 22:11:07 +01:00
parent 4e3bfd5b1b
commit a4ee72ed28
4 changed files with 18 additions and 14 deletions
+1 -1
View File
@@ -378,7 +378,7 @@ func (r *renderer) texHandle(t *texture) Texture {
if t.tex != nil {
return t.tex
}
t.tex = r.ctx.NewTexture(FilterLinear, FilterLinear)
t.tex = r.ctx.NewTexture(TextureFormatSRGB, t.src.Bounds().Dx(), t.src.Bounds().Dy(), FilterLinear, FilterLinear)
t.tex.Upload(t.src)
return t.tex
}