Skip to content

Commit 2f2521d

Browse files
committed
use glgl in ui example for glfw init
1 parent 3ade399 commit 2f2521d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

gsdfaux/ui.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@ func ui(s glbuild.Shader3D, cfg UIConfig) error {
1919
bb := s.Bounds()
2020
diag := bb.Diagonal()
2121
// Initialize GLFW
22-
window, term, err := startGLFW(cfg.Width, cfg.Height)
22+
window, term, err := glgl.InitWithCurrentWindow33(glgl.WindowConfig{
23+
Title: "gsdf 3D Shape Visualizer",
24+
NotResizable: true,
25+
Version: [2]int{3, 2},
26+
OpenGLProfile: glfw.OpenGLCompatProfile,
27+
ForwardCompat: true,
28+
Width: cfg.Width,
29+
Height: cfg.Height,
30+
})
2331
if err != nil {
24-
log.Fatal(err)
32+
return err
2533
}
2634
defer term()
2735
var sdfDecl bytes.Buffer

0 commit comments

Comments
 (0)