Skip to content

Commit

Permalink
fix: enable multisampling
Browse files Browse the repository at this point in the history
  • Loading branch information
ww24 committed May 29, 2021
1 parent 01bf9f3 commit e666696
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,21 @@ func main() {
glfw.WindowHint(glfw.ContextVersionMinor, 1)
glfw.WindowHint(glfw.OpenGLProfile, glfw.OpenGLCoreProfile)
glfw.WindowHint(glfw.OpenGLForwardCompatible, glfw.True)
glfw.WindowHint(glfw.Samples, 8)
window, err := glfw.CreateWindow(defaultSize, defaultSize, "image widget", nil, nil)
if err != nil {
log.Fatalln("failed to create window:", err)
}

window.MakeContextCurrent()
helper.NewWindowMoveHandler(window)
helper.NewWindowCloseHandler(window, glfw.KeyEscape)

if err := gl.Init(); err != nil {
log.Fatalln("failed to init gl:", err)
}

helper.NewWindowMoveHandler(window)
helper.NewWindowCloseHandler(window, glfw.KeyEscape)
gl.Enable(gl.MULTISAMPLE)

if err := programLoop(window); err != nil {
log.Fatalln("failed to exec program loop:", err)
Expand Down

0 comments on commit e666696

Please sign in to comment.