add raylib and test window

This commit is contained in:
2025-11-08 10:01:49 +01:00
parent 724d1c9876
commit 12ea087cae
6 changed files with 1761 additions and 6 deletions

View File

@@ -4,10 +4,20 @@ Work in progress.
Goals are: parsing an IGC file containing flight data, giving analytics about the flight, and if I really have time to kill, making some kind of (3D??) view of the flight.. Goals are: parsing an IGC file containing flight data, giving analytics about the flight, and if I really have time to kill, making some kind of (3D??) view of the flight..
TODO: # Dependencies
- header parsing
- data point doubly linked list These are mainly for Raylib (the 3D library):
- Raylib 3d 3rd person flight line visualization????
```
sudo apt install libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev libwayland-dev libxkbcommon-dev
```
# Compilation & Usage
```
make
./a.out <file>
```
# License # License

1
igc.c
View File

@@ -9,6 +9,7 @@
* @license GNU GPL v3 * @license GNU GPL v3
*/ */
#define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>

1728
include/raylib.h Normal file

File diff suppressed because it is too large Load Diff

BIN
lib/libraylib.a Normal file

Binary file not shown.

16
main.c
View File

@@ -9,6 +9,8 @@
* @license GNU GPL v3 * @license GNU GPL v3
*/ */
#include "raylib.h"
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@@ -41,5 +43,19 @@ int main(int argc, char* argv[])
print_datapoint_list(head); print_datapoint_list(head);
// Raylib test window
SetTraceLogLevel(4);
const int screenWidth = 800;
const int screenHeight = 600;
InitWindow(screenWidth, screenHeight, "Raylib basic window");
SetTargetFPS(60);
while (!WindowShouldClose()) {
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("It works!", 20, 20, 20, BLACK);
EndDrawing();
}
CloseWindow();
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }

View File

@@ -1,5 +1,5 @@
all: all:
gcc -g -Wall -Wextra linkage.c igc.c main.c gcc -Wall -g linkage.c igc.c main.c -I./include -L./lib -lraylib -lGL -lEGL -lGLESv2 -lm -lpthread -ldl -lrt -lX11
clean: clean:
rm a.out rm a.out