Start on the rasteriser implementation
This commit is contained in:
parent
8fc3a2577a
commit
fc79cb1906
9
compile
9
compile
@ -11,9 +11,18 @@ RAYTRACER_SRC="src/window/*.c \
|
|||||||
src/math/*.c \
|
src/math/*.c \
|
||||||
"
|
"
|
||||||
|
|
||||||
|
RASTERISER_SRC="src/window/*.c \
|
||||||
|
src/vector/*.c \
|
||||||
|
src/scene/*.c \
|
||||||
|
src/rasteriser/*.c \
|
||||||
|
src/math/*.c \
|
||||||
|
"
|
||||||
|
|
||||||
BUILD=build_dir
|
BUILD=build_dir
|
||||||
RAYTRACER_OUT="$BUILD/raytracer"
|
RAYTRACER_OUT="$BUILD/raytracer"
|
||||||
|
RASTERISER_OUT="$BUILD/rasteriser"
|
||||||
|
|
||||||
mkdir -p $BUILD
|
mkdir -p $BUILD
|
||||||
|
|
||||||
(set -x ; $CC $CFLAGS $LIBS $RAYTRACER_SRC -o $RAYTRACER_OUT)
|
(set -x ; $CC $CFLAGS $LIBS $RAYTRACER_SRC -o $RAYTRACER_OUT)
|
||||||
|
(set -x ; $CC $CFLAGS $LIBS $RASTERISER_SRC -o $RASTERISER_OUT)
|
||||||
|
10
run
10
run
@ -3,8 +3,8 @@
|
|||||||
USAGE="Usage: run (raytracer | rasteriser)"
|
USAGE="Usage: run (raytracer | rasteriser)"
|
||||||
|
|
||||||
if [[ $# == 0 ]]; then
|
if [[ $# == 0 ]]; then
|
||||||
echo $USAGE
|
echo $USAGE
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
@ -13,8 +13,12 @@ while [[ $# -gt 0 ]]; do
|
|||||||
RENDERER="raytracer"
|
RENDERER="raytracer"
|
||||||
shift # past argument
|
shift # past argument
|
||||||
;;
|
;;
|
||||||
|
rasteriser)
|
||||||
|
RENDERER="rasteriser"
|
||||||
|
shift # past argument
|
||||||
|
;;
|
||||||
-*|--*|*)
|
-*|--*|*)
|
||||||
echo $USAGE
|
echo $USAGE
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
7
src/rasteriser/main.c
Normal file
7
src/rasteriser/main.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(void) {
|
||||||
|
printf("RASTERISER\n");
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user