#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <GL/glut.h>
Go to the source code of this file.
Macros | |
#define | M_PI 3.14159265 |
Enumerations | |
enum | { MISSING, EXTENSION, ONE_DOT_ONE } |
enum | { X, Y, Z, W } |
enum | { A, B, C, D } |
enum | { M_NONE, M_MOTION, M_LIGHT, M_TEXTURE, M_SHADOWS, M_REFLECTION, M_DINOSAUR, M_STENCIL_REFLECTION, M_STENCIL_SHADOW, M_OFFSET_SHADOW, M_POSITIONAL, M_DIRECTIONAL, M_PERFORMANCE } |
enum | displayLists { RESERVED, BODY_SIDE, BODY_EDGE, BODY_WHOLE, ARM_SIDE, ARM_EDGE, ARM_WHOLE, LEG_SIDE, LEG_EDGE, LEG_WHOLE, EYE_SIDE, EYE_EDGE, EYE_WHOLE } |
Functions | |
static void | controlLights (int value) |
static void | drawDinosaur (void) |
static void | drawFloor (void) |
void | extrudeSolidFromPolygon (GLfloat data[][2], unsigned int dataSize, GLdouble thickness, GLuint side, GLuint edge, GLuint whole) |
void | findPlane (GLfloat plane[4], GLfloat v0[3], GLfloat v1[3], GLfloat v2[3]) |
static void | idle (void) |
static void | key (unsigned char c, int x, int y) |
int | main (int argc, char **argv) |
static void | makeDinosaur (void) |
static void | makeFloorTexture (void) |
static void | motion (int x, int y) |
static void | mouse (int button, int state, int x, int y) |
static void | redraw (void) |
void | shadowMatrix (GLfloat shadowMat[4][4], GLfloat groundplane[4], GLfloat lightpos[4]) |
static void | special (int k, int x, int y) |
static int | supportsOneDotOne (void) |
static void | visible (int vis) |
Variables | |
GLfloat | angle = -150 |
GLfloat | angle2 = 30 |
static int | animation = 1 |
static GLfloat | arm [][2] |
static GLfloat | body [][2] |
static GLdouble | bodyWidth = 3.0 |
static char * | circles [] |
static int | directionalLight = 1 |
static GLfloat | eye [][2] |
static GLfloat | eyeColor [] = {1.0, 0.2, 0.2, 1.0} |
static GLfloat | floorPlane [4] |
static GLfloat | floorShadow [4][4] |
static GLfloat | floorVertices [4][3] |
static int | forceExtension = 0 |
static float | jump = 0.0 |
static GLfloat | leg [][2] |
static float | lightAngle = 0.0 |
static GLfloat | lightColor [] = {0.8, 1.0, 0.8, 1.0} |
static float | lightHeight = 20 |
int | lightMoving = 0 |
static GLfloat | lightPosition [4] |
int | lightStartX |
int | lightStartY |
static GLboolean | lightSwitch = GL_TRUE |
static int | linearFiltering = 0 |
int | moving |
static int | offsetShadow = 1 |
int | polygonOffsetVersion |
static int | renderDinosaur = 1 |
static int | renderReflection = 1 |
static int | renderShadow = 1 |
static int | reportSpeed = 0 |
static GLfloat | skinColor [] = {0.1, 1.0, 0.1, 1.0} |
int | startx |
int | starty |
static int | stencilReflection = 1 |
static int | stencilShadow = 1 |
static int | useMipmaps = 0 |
static int | useTexture = 1 |
#define M_PI 3.14159265 |
Definition at line 46 of file dinoshade.c.
anonymous enum |
Enumerator | |
---|---|
MISSING | |
EXTENSION | |
ONE_DOT_ONE |
Definition at line 68 of file dinoshade.c.
anonymous enum |
Enumerator | |
---|---|
X | |
Y | |
Z | |
W |
Definition at line 155 of file dinoshade.c.
anonymous enum |
Enumerator | |
---|---|
A | |
B | |
C | |
D |
Definition at line 158 of file dinoshade.c.
anonymous enum |
Enumerator | |
---|---|
M_NONE | |
M_MOTION | |
M_LIGHT | |
M_TEXTURE | |
M_SHADOWS | |
M_REFLECTION | |
M_DINOSAUR | |
M_STENCIL_REFLECTION | |
M_STENCIL_SHADOW | |
M_OFFSET_SHADOW | |
M_POSITIONAL | |
M_DIRECTIONAL | |
M_PERFORMANCE |
Definition at line 674 of file dinoshade.c.
enum displayLists |
Enumerator | |
---|---|
RESERVED | |
BODY_SIDE | |
BODY_EDGE | |
BODY_WHOLE | |
ARM_SIDE | |
ARM_EDGE | |
ARM_WHOLE | |
LEG_SIDE | |
LEG_EDGE | |
LEG_WHOLE | |
EYE_SIDE | |
EYE_EDGE | |
EYE_WHOLE |
Definition at line 284 of file dinoshade.c.
|
static |
Definition at line 681 of file dinoshade.c.
|
static |
Definition at line 303 of file dinoshade.c.
|
static |
Definition at line 334 of file dinoshade.c.
void extrudeSolidFromPolygon | ( | GLfloat | data[][2], |
unsigned int | dataSize, | ||
GLdouble | thickness, | ||
GLuint | side, | ||
GLuint | edge, | ||
GLuint | whole | ||
) |
Definition at line 223 of file dinoshade.c.
void findPlane | ( | GLfloat | plane[4], |
GLfloat | v0[3], | ||
GLfloat | v1[3], | ||
GLfloat | v2[3] | ||
) |
Definition at line 200 of file dinoshade.c.
|
static |
Definition at line 661 of file dinoshade.c.
|
static |
Definition at line 753 of file dinoshade.c.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 783 of file dinoshade.c.
|
static |
Definition at line 290 of file dinoshade.c.
|
static |
Definition at line 112 of file dinoshade.c.
|
static |
Definition at line 641 of file dinoshade.c.
|
static |
Definition at line 615 of file dinoshade.c.
|
static |
Definition at line 364 of file dinoshade.c.
void shadowMatrix | ( | GLfloat | shadowMat[4][4], |
GLfloat | groundplane[4], | ||
GLfloat | lightpos[4] | ||
) |
Definition at line 164 of file dinoshade.c.
|
static |
Definition at line 765 of file dinoshade.c.
|
static |
Definition at line 771 of file dinoshade.c.
|
static |
Definition at line 738 of file dinoshade.c.
GLfloat angle = -150 |
Definition at line 62 of file dinoshade.c.
GLfloat angle2 = 30 |
Definition at line 63 of file dinoshade.c.
|
static |
Definition at line 54 of file dinoshade.c.
|
static |
Definition at line 79 of file dinoshade.c.
|
static |
Definition at line 75 of file dinoshade.c.
|
static |
Definition at line 73 of file dinoshade.c.
|
static |
Definition at line 92 of file dinoshade.c.
|
static |
Definition at line 56 of file dinoshade.c.
|
static |
Definition at line 84 of file dinoshade.c.
|
static |
Definition at line 88 of file dinoshade.c.
|
static |
Definition at line 360 of file dinoshade.c.
|
static |
Definition at line 361 of file dinoshade.c.
|
static |
Definition at line 325 of file dinoshade.c.
|
static |
Definition at line 57 of file dinoshade.c.
|
static |
Definition at line 60 of file dinoshade.c.
|
static |
Definition at line 82 of file dinoshade.c.
|
static |
Definition at line 61 of file dinoshade.c.
|
static |
Definition at line 87 of file dinoshade.c.
|
static |
Definition at line 61 of file dinoshade.c.
int lightMoving = 0 |
Definition at line 66 of file dinoshade.c.
|
static |
Definition at line 86 of file dinoshade.c.
int lightStartX |
Definition at line 66 of file dinoshade.c.
int lightStartY |
Definition at line 66 of file dinoshade.c.
|
static |
Definition at line 55 of file dinoshade.c.
|
static |
Definition at line 52 of file dinoshade.c.
int moving |
Definition at line 65 of file dinoshade.c.
|
static |
Definition at line 50 of file dinoshade.c.
int polygonOffsetVersion |
Definition at line 71 of file dinoshade.c.
|
static |
Definition at line 51 of file dinoshade.c.
|
static |
Definition at line 51 of file dinoshade.c.
|
static |
Definition at line 51 of file dinoshade.c.
|
static |
Definition at line 53 of file dinoshade.c.
|
static |
Definition at line 88 of file dinoshade.c.
int startx |
Definition at line 65 of file dinoshade.c.
int starty |
Definition at line 65 of file dinoshade.c.
|
static |
Definition at line 50 of file dinoshade.c.
|
static |
Definition at line 50 of file dinoshade.c.
|
static |
Definition at line 52 of file dinoshade.c.
|
static |
Definition at line 52 of file dinoshade.c.