Add build script and raylib starter main.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
13d0df1c00
commit
262dded71f
2 changed files with 28 additions and 0 deletions
10
build.sh
Executable file
10
build.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/home/alarm/.nix-profile/bin/zsh
|
||||
|
||||
set -ex
|
||||
|
||||
gcc -o clay-starter main.c \
|
||||
-Wall -std=c99 -D_DEFAULT_SOURCE -Wno-missing-braces -Wunused-result -O2 \
|
||||
-I. -Iraylib-5.5/src -Iraylib-5.5/src/external -I/usr/local/include \
|
||||
-L. -Lraylib-5.5/src -Lraylib-5.5/src -L/usr/local/lib \
|
||||
-lraylib -lGL -lm -lpthread -ldl -lrt -lX11 -latomic \
|
||||
-D_DEFAULT_SOURCE -DPLATFORM_DESKTOP -DPLATFORM_DESKTOP_GLFW
|
||||
18
main.c
Normal file
18
main.c
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#include "raylib.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
InitWindow(600, 400, "raylib [core] example - basic window");
|
||||
|
||||
while (!WindowShouldClose())
|
||||
{
|
||||
BeginDrawing();
|
||||
ClearBackground(RAYWHITE);
|
||||
DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
|
||||
EndDrawing();
|
||||
}
|
||||
|
||||
CloseWindow();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue