Skip to content

Commit

Permalink
fix build failure
Browse files Browse the repository at this point in the history
  • Loading branch information
soypat committed Nov 10, 2024
1 parent 49436ac commit c07329a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ All images and shapes in readme were generated using this library.

## Features

- UI for visualizing parts, rendered directly from shaders. See [UI example](./examples/ui) by running `go run ./examples/ui`
- UI for visualizing parts, rendered directly from shaders. See [UI example](./examples/ui-mandala) by running `go run ./examples/ui`

- GPU and CPU implementations for all shapes and operations. CPU implementations are actually faster for simple parts.

Expand Down
3 changes: 2 additions & 1 deletion gleval/gpu_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/soypat/glgl/math/ms2"
"github.com/soypat/glgl/math/ms3"
"github.com/soypat/gsdf/glbuild"
)

var errNoCGO = errors.New("GPU evaluation requires CGo and is not supported on TinyGo")
Expand All @@ -23,6 +24,6 @@ func (lines *DisplaceMulti2D) evaluate(pos []ms2.Vec, dist []float32, userData a
return errNoCGO
}

func computeEvaluate[T ms2.Vec | ms3.Quat](pos []T, dist []float32, invocX int) (err error) {
func computeEvaluate[T ms2.Vec | ms3.Vec](pos []T, dist []float32, invocX int, objects []glbuild.ShaderObject) (err error) {
return errNoCGO
}
8 changes: 6 additions & 2 deletions gsdfaux/gsdfaux_nocgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

package gsdfaux

import "github.com/soypat/gsdf/glbuild"
import (
"errors"

"github.com/soypat/gsdf/glbuild"
)

func ui(s glbuild.Shader3D, cfg UIConfig) error {
return errors.new("require cgo for UI rendering")
return errors.New("require cgo for UI rendering")
}

0 comments on commit c07329a

Please sign in to comment.