#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <GL/glut.h>
Go to the source code of this file.
Defines | |
#define | BLACK 7 |
#define | BLUE 3 |
#define | CYAN 4 |
#define | EXIT_FAILURE 1 |
#define | GREEN 2 |
#define | GREY 0 |
#define | MAGENTA 5 |
#define | RED 1 |
#define | YELLOW 6 |
Functions | |
void | buildColormap (void) |
void | display (void) |
static void | drawCheck (int w, int h, int evenColor, int oddColor) |
static void | drawCube (int color) |
void | fog_select (int fog) |
void | idle (void) |
void | keyboard (unsigned char ch, int x, int y) |
int | main (int argc, char **argv) |
void | menu_select (int mode) |
static void | myShadowMatrix (float ground[4], float light[4]) |
static void | setColor (int c) |
static void | usage (void) |
void | visible (int state) |
Variables | |
static float | backPlane [4] |
static float | cube_normals [6][4] |
static float | cube_vertexes [6][4][4] |
static float | fogColor [4] |
static float | fogIndex [1] |
static float | groundPlane [4] |
static float | lightAmb [4] |
static float | lightDiff [4] |
static float | lightPos [4] |
static float | lightSpec [4] |
static float | materialColor [8][4] |
static int | moving = 1 |
static unsigned char | sgiPattern [128] |
static unsigned char | shadowPattern [128] |
static int | tick = -1 |
static int | useDB = 1 |
static int | useFog = 0 |
static int | useLighting = 1 |
static int | useLogo = 0 |
static int | useQuads = 1 |
static int | useRGB = 1 |
static char * | windowNameIndex = "shadow cube (OpenGL Index)" |
static char * | windowNameIndexDB = "shadow cube (OpenGL Index DB)" |
static char * | windowNameRGB = "shadow cube (OpenGL RGB)" |
static char * | windowNameRGBDB = "shadow cube (OpenGL RGB DB)" |
#define EXIT_FAILURE 1 |
void buildColormap | ( | void | ) |
static void drawCheck | ( | int | w, |
int | h, | ||
int | evenColor, | ||
int | oddColor | ||
) | [static] |
void fog_select | ( | int | fog | ) |
void menu_select | ( | int | mode | ) |
static void myShadowMatrix | ( | float | ground[4], |
float | light[4] | ||
) | [static] |
float backPlane[4] [static] |
float cube_normals[6][4] [static] |
float cube_vertexes[6][4][4] [static] |
float fogColor[4] [static] |
float groundPlane[4] [static] |
float lightAmb[4] [static] |
float lightDiff[4] [static] |
float lightPos[4] [static] |
float lightSpec[4] [static] |
float materialColor[8][4] [static] |
unsigned char sgiPattern[128] [static] |
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xbd, 0xff, 0x83, 0xff, 0x5a, 0xff, 0xef, 0xfe, 0xdb, 0x7f, 0xef, 0xfd, 0xdb, 0xbf, 0xef, 0xfb, 0xdb, 0xdf, 0xef, 0xf7, 0xdb, 0xef, 0xef, 0xfb, 0xdb, 0xdf, 0xef, 0xfd, 0xdb, 0xbf, 0x83, 0xce, 0xdb, 0x73, 0xff, 0xb7, 0x5a, 0xed, 0xff, 0xbb, 0xdb, 0xdd, 0xc7, 0xbd, 0xdb, 0xbd, 0xbb, 0xbe, 0xbd, 0x7d, 0xbb, 0xbf, 0x7e, 0xfd, 0xb3, 0xbe, 0xe7, 0x7d, 0xbf, 0xbd, 0xdb, 0xbd, 0xbf, 0xbb, 0xbd, 0xdd, 0xbb, 0xb7, 0x7e, 0xed, 0xc7, 0xce, 0xdb, 0x73, 0xff, 0xfd, 0xdb, 0xbf, 0xff, 0xfb, 0xdb, 0xdf, 0x87, 0xf7, 0xdb, 0xef, 0xfb, 0xf7, 0xdb, 0xef, 0xfb, 0xfb, 0xdb, 0xdf, 0xfb, 0xfd, 0xdb, 0xbf, 0xc7, 0xfe, 0xdb, 0x7f, 0xbf, 0xff, 0x5a, 0xff, 0xbf, 0xff, 0xbd, 0xff, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
unsigned char shadowPattern[128] [static] |
{ 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, 0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55 }
int useLighting = 1 [static] |
int useRGB = 1 [static] |
(c) Copyright 1993, 1994, Silicon Graphics, Inc. ALL RIGHTS RESERVED Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice appear in supporting documentation, and that the name of Silicon Graphics, Inc. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission.
THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
US Government Users Restricted Rights Use, duplication, or disclosure by the Government is subject to restrictions set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR or the DOD or NASA FAR Supplement. Unpublished-- rights reserved under the copyright laws of the United States. Contractor/manufacturer is Silicon Graphics, Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
OpenGL(TM) is a trademark of Silicon Graphics, Inc.
char* windowNameIndex = "shadow cube (OpenGL Index)" [static] |
char* windowNameIndexDB = "shadow cube (OpenGL Index DB)" [static] |
char* windowNameRGB = "shadow cube (OpenGL RGB)" [static] |
char* windowNameRGBDB = "shadow cube (OpenGL RGB DB)" [static] |