mirror of
https://github.com/Nexoniarz/Finch.git
synced 2026-11-03 08:54:25 +00:00
CMake: enable C (Homebrew LLVM's config needs it); Kate: highlighting, language server setup, install script
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
484c14fe77
commit
fd86eb885c
6 changed files with 272 additions and 1 deletions
29
examples/OpenGL.fn
Normal file
29
examples/OpenGL.fn
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
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()
|
||||
}
|
||||
Loading…
Reference in a new issue