mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 08:54:25 +00:00
29 lines
608 B
Text
29 lines
608 B
Text
import "GLFW/glfw3.h"
|
|
|
|
fn main() {
|
|
if glfwInit() == 0 {
|
|
print("Błąd: Nie udało się zainicjalizować GLFW!")
|
|
return
|
|
}
|
|
|
|
win := glfwCreateWindow(800, 600, "lukas", null, null)
|
|
|
|
if win == null {
|
|
print("Błąd: Nie udało się stworzyć okna!")
|
|
glfwTerminate()
|
|
return
|
|
}
|
|
|
|
glfwMakeContextCurrent(win)
|
|
|
|
while glfwWindowShouldClose(win) == 0 {
|
|
// 1. Obsługa klawiatury/myszki
|
|
glfwPollEvents()
|
|
|
|
// 2. Podmiana bufora (wyświetlenie narysowanej klatki)
|
|
glfwSwapBuffers(win)
|
|
}
|
|
|
|
glfwDestroyWindow(win)
|
|
glfwTerminate()
|
|
}
|