new C++ demo: realtime.cc (real-time scene viewer using SDL)
Quaternion, Camera::rotate and Camera::move
replace all printf's with infomsg wrapper
don't allocate memory in Raytracer::render, just blindly write to provided address
don't creat Container object in Raytracer, let user do it
CCFLAGS=-g -O3 -I../src
LDFLAGS=-L.. -pthread
RGBLIB_LDFLAGS=$(LDFLAGS) -lpng
SDL_CCFLAGS=$(CCFLAGS) $(shell sdl-config --cflags)
SDL_LDFLAGS=$(LDFLAGS) $(shell sdl-config --libs)
PYRIT_OBJS=$(shell ls ../*.o | grep -v raytracermodule)
all: spheres_shadow realtime
%.o: %.c
$(CXX) -c -o $@ $*.c
%.o: %.cc
$(CXX) -c -o $@ $*.cc $(CCFLAGS)
%: %.o
(cd .. && make)
$(CXX) -o $@ $(PYRIT_OBJS) $^ $(RGBLIB_LDFLAGS)
image.o: image.c
spheres_shadow.o: spheres_shadow.cc
spheres_shadow: spheres_shadow.o image.o
realtime: realtime.cc
$(CXX) -o $@ $@.cc $(SDL_CCFLAGS) -L.. $(PYRIT_OBJS) $(SDL_LDFLAGS)
clean:
rm -f spheres_shadow realtime *.o