Skip to content

Commit

Permalink
Add undecorated and maximized
Browse files Browse the repository at this point in the history
  • Loading branch information
unitoftime committed Jan 2, 2024
1 parent 891962a commit 7a5a13f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion window.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ package glitch
import (
"fmt"

"github.com/unitoftime/glitch/internal/glfw"
"github.com/unitoftime/glitch/internal/gl"
"github.com/unitoftime/glitch/internal/glfw"
"github.com/unitoftime/glitch/internal/mainthread"
)


type WindowConfig struct {
Fullscreen bool
Undecorated bool
Maximized bool
Vsync bool
// Resizable bool
Samples int
Expand Down Expand Up @@ -74,6 +76,13 @@ func NewWindow(width, height int, title string, config WindowConfig) (*Window, e
if config.Fullscreen {
monitor = glfw.GetPrimaryMonitor()
}
if config.Undecorated {
glfw.WindowHint(glfw.Decorated, glfw.False)
}
if config.Maximized {
glfw.WindowHint(glfw.Maximized, glfw.True)
}

win.window, err = glfw.CreateWindow(width, height, title, monitor, nil)
if err != nil {
return err
Expand Down

0 comments on commit 7a5a13f

Please sign in to comment.