Rename main.c to sdl2-sdlrenderer.c and implement sdl2-opengl3 example

This commit is contained in:
2024-09-10 00:23:10 +01:00
parent 0658fcf39d
commit eef16a695e
5 changed files with 167 additions and 4 deletions

View File

@@ -3,7 +3,10 @@
CC=clang
CFLAGS="-g -Wall $(pkg-config --cflags sdl2) -Wl,-rpath,\$ORIGIN/lib -Ivendor"
LIBS="$(pkg-config --libs sdl2) -Llib -lcimgui"
SRC=src/*.c
OUT=main
SDL2_SDLRENDERER=src/sdl2-sdlrenderer.c
SDLRENDERER_OUT=sdl2-sdlrenderer
SDL2_OPENGL3=src/sdl2-opengl3.c
OPENGL3_OUT=sdl2-opengl3
(set -x ; $CC $CFLAGS $LIBS $SRC -o $OUT)
(set -x ; $CC $CFLAGS $LIBS $SDL2_SDLRENDERER -o $SDLRENDERER_OUT)
(set -x ; $CC $CFLAGS $LIBS -lGL -ldl $SDL2_OPENGL3 -o $OPENGL3_OUT)