Difficult-Rocket/Difficult_Rocket/main.jl

35 lines
703 B
Julia
Raw Normal View History

2022-02-22 23:22:11 +08:00
#=
main:
- Julia version: 1.7.2
- Author: shenjack
- Date: 2022-02-19
=#
using GLFW
export GLFW__init__
function GLFW__init__()
# Create a window and its OpenGL context
window = GLFW.CreateWindow(640, 480, "DR-GLFW test")
# Make the window's context current
GLFW.MakeContextCurrent(window)
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MAJOR, 3)
GLFW.WindowHint(GLFW.CONTEXT_VERSION_MINOR, 3)
# Loop until the user closes the window
while !GLFW.WindowShouldClose(window)
# Render here
# Swap front and back buffers
GLFW.SwapBuffers(window)
# Poll for and process events
GLFW.PollEvents()
end
GLFW.DestroyWindow(window)
end