Skip to content

Commit

Permalink
setup_glfw GLFW.WindowHint
Browse files Browse the repository at this point in the history
  • Loading branch information
wookay committed Feb 1, 2019
1 parent 0f1cbb6 commit edbf1a0
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/Desktop/application.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ const MAX_ELEMENT_BUFFER = 128 * 1024
env = Dict{Ptr{Cvoid}, A where {A <: UIApplication}}()

function setup_glfw(; title::String, frame)
@static if Sys.isapple()
VERSION_MAJOR = 3
VERSION_MINOR = 3
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MAJOR, VERSION_MAJOR)
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MINOR, VERSION_MINOR)
GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW.OPENGL_CORE_PROFILE)
GLFW.WindowHint(GLFW.OPENGL_FORWARD_COMPAT, GL_TRUE)
else
GLFW.DefaultWindowHints()
end
VERSION_MAJOR = 3
VERSION_MINOR = 3
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MAJOR, VERSION_MAJOR)
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MINOR, VERSION_MINOR)
GLFW.WindowHint(GLFW.OPENGL_PROFILE, GLFW.OPENGL_CORE_PROFILE)
GLFW.WindowHint(GLFW.OPENGL_FORWARD_COMPAT, GL_TRUE)

win = GLFW.CreateWindow(frame.width, frame.height, title)
GLFW.MakeContextCurrent(win)
Expand Down

0 comments on commit edbf1a0

Please sign in to comment.