-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sean Callahan
committed
Dec 13, 2014
0 parents
commit 4b05f2b
Showing
21 changed files
with
573,048 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#ifndef CSCIx229 | ||
#define CSCIx229 | ||
|
||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <stdarg.h> | ||
#include <string.h> | ||
#include <math.h> | ||
|
||
#ifdef USEGLEW | ||
#include <GL/glew.h> | ||
#endif | ||
#define GL_GLEXT_PROTOTYPES | ||
#ifdef __APPLE__ | ||
#include <GLUT/glut.h> | ||
#else | ||
#include <GL/glut.h> | ||
#endif | ||
|
||
#define Cos(th) cos(3.1415926/180*(th)) | ||
#define Sin(th) sin(3.1415926/180*(th)) | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
void Print(const char* format , ...); | ||
void Fatal(const char* format , ...); | ||
unsigned int LoadTexBMP(const char* file); | ||
void Project(double fov,double asp,double dim); | ||
void ErrCheck(const char* where); | ||
int LoadOBJ(const char* file); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
EXE = shift | ||
|
||
# Main target | ||
all: $(EXE) | ||
|
||
CFLG=-O3 -Wall | ||
LIBS=-lglut -lGLU -lGL -lm | ||
|
||
CLEAN=rm -f $(EXE) *.o *.a | ||
|
||
|
||
# Dependencies | ||
gears.o: gears.c | ||
shift.o: shift.c CSCIx229.h | ||
fatal.o: fatal.c CSCIx229.h | ||
loadtexbmp.o: loadtexbmp.c CSCIx229.h | ||
print.o: print.c CSCIx229.h | ||
project.o: project.c CSCIx229.h | ||
errcheck.o: errcheck.c CSCIx229.h | ||
object.o: object.c CSCIx229.h | ||
|
||
# Create archive | ||
CSCIx229.a:fatal.o loadtexbmp.o print.o project.o errcheck.o object.o | ||
ar -rcs $@ $^ | ||
|
||
# Compile rules | ||
.c.o: | ||
gcc -c $(CFLG) $< | ||
.cpp.o: | ||
g++ -c $(CFLG) $< | ||
|
||
# Link | ||
shift:shift.o CSCIx229.a | ||
gcc -O3 -o $@ $^ $(LIBS) | ||
|
||
# Clean | ||
clean: | ||
$(CLEAN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Written By: Sean Callahan | ||
|
||
In order to run. `make` and run `./shift` | ||
|
||
Special Controls: Arrow keys for movement. | ||
p: Switch between orthogonal and perspective | ||
esc: Exit program. | ||
|
||
Notes: I think the project ended up looking pretty good and most everyone I showed it too was fairly impressed. I am defintely happy with my work and plan on possibly sending a copy to New Belgium so they can see as well. |
Oops, something went wrong.