1
0
mirror of https://github.com/elima/gpu-playground.git synced 2026-08-22 05:42:57 +00:00

Add an example program that loads a PNG or JPEG image into a GL texture

This commit is contained in:
Eduardo Lima Mitev
2018-10-29 11:24:58 +01:00
parent c8607b8797
commit e07985e898
10 changed files with 859 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
.PHONY: all clean
CFLAGS = -std=c99 -g -ggdb -O0 -Wall
LDFLAGS = -lm
PKG_CONFIG_LIBS = \
glfw3 \
glesv2 \
libpng \
libjpeg \
$(NULL)
CFLAGS += $(shell pkg-config --cflags $(PKG_CONFIG_LIBS))
LDFLAGS += $(shell pkg-config --libs $(PKG_CONFIG_LIBS))
OBJS = png.o jpeg.o image.o
all: gl-image-loader
png.o: png.c png.h
jpeg.o: jpeg.c jpeg.h
image.o: image.c image.h
gl-image-loader: main.c $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
clean:
rm -f ./*.o
rm -f gl-image-loader