all: remove unused fields, functions and add missing error handling

Credit to staticcheck.io.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-27 22:26:54 +01:00
parent 4b7387369b
commit bfb50cef5d
10 changed files with 19 additions and 53 deletions
-5
View File
@@ -272,11 +272,6 @@ const (
materialTexture
)
const (
attribPos = 0
attribUV = 1
)
func New(ctx backend.Device) (*GPU, error) {
defFBO := ctx.CurrentFramebuffer()
g := &GPU{
+3 -8
View File
@@ -107,14 +107,6 @@ const (
pathBatchSize = 10000
)
const (
attribPathCorner = 0
attribPathMaxY = 1
attribPathFrom = 2
attribPathCtrl = 3
attribPathTo = 4
)
func newPather(ctx backend.Device) *pather {
return &pather{
ctx: ctx,
@@ -217,6 +209,9 @@ func (s *fboSet) resize(ctx backend.Device, sizes []image.Point) {
}
tex, err := ctx.NewTexture(backend.TextureFormatFloat, sz.X, sz.Y, backend.FilterNearest, backend.FilterNearest,
backend.BufferBindingTexture|backend.BufferBindingFramebuffer)
if err != nil {
panic(err)
}
fbo, err := ctx.NewFramebuffer(tex, 0)
if err != nil {
panic(err)