1 /* atlantis --- Shows moving 3D sea animals */
3 /* Copyright (c) E. Lassauge, 1998. */
6 * Permission to use, copy, modify, and distribute this software and its
7 * documentation for any purpose and without fee is hereby granted,
8 * provided that the above copyright notice appear in all copies and that
9 * both that copyright notice and this permission notice appear in
10 * supporting documentation.
12 * This file is provided AS IS with no warranties of any kind. The author
13 * shall have no liability with respect to the infringement of copyrights,
14 * trade secrets or any patents by this file or any part thereof. In no
15 * event will the author be liable for any lost revenue or profits or
16 * other special, indirect and consequential damages.
18 * The original code for this mode was written by Mark J. Kilgard
19 * as a demo for openGL programming.
21 * Porting it to xlock was possible by comparing the original Mesa's morph3d
22 * demo with it's ported version to xlock, so thanks for Marcelo F. Vianna
23 * (look at morph3d.c) for his indirect help.
25 * Thanks goes also to Brian Paul for making it possible and inexpensive
26 * to use OpenGL at home.
28 * My e-mail address is lassauge@users.sourceforge.net
30 * Eric Lassauge (May-13-1998)
35 * (c) Copyright 1993, 1994, Silicon Graphics, Inc.
37 * Permission to use, copy, modify, and distribute this software for
38 * any purpose and without fee is hereby granted, provided that the above
39 * copyright notice appear in all copies and that both the copyright notice
40 * and this permission notice appear in supporting documentation, and that
41 * the name of Silicon Graphics, Inc. not be used in advertising
42 * or publicity pertaining to distribution of the software without specific,
43 * written prior permission.
45 * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
46 * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
47 * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
48 * FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
49 * GRAPHICS, INC. BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
50 * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
51 * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
52 * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
53 * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC. HAS BEEN
54 * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
55 * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
56 * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
58 * US Government Users Restricted Rights
59 * Use, duplication, or disclosure by the Government is subject to
60 * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
61 * (c)(1)(ii) of the Rights in Technical Data and Computer Software
62 * clause at DFARS 252.227-7013 and/or in similar or successor
63 * clauses in the FAR or the DOD or NASA FAR Supplement.
64 * Unpublished-- rights reserved under the copyright laws of the
65 * United States. Contractor/manufacturer is Silicon Graphics,
66 * Inc., 2011 N. Shoreline Blvd., Mountain View, CA 94039-7311.
68 * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
73 #endif /* HAVE_CONFIG_H */
77 # include "screenhackI.h"
88 #endif /* HAVE_JWZGLES */
95 #define SHARKSPEED 100
96 #define SHARKSIZE 6000
98 typedef struct _fishRec {
99 float x, y, z, phi, theta, psi, v;
109 GLXContext *glx_context;
111 float sharkspeed, whalespeed;
120 XImage *texture; /* water distortion overlay bits */
123 extern void FishTransform(fishRec *);
124 extern void WhalePilot(fishRec *, float, Bool);
125 extern void SharkPilot(fishRec *, float);
126 extern void SharkMiss(atlantisstruct *, int);
127 extern void DrawWhale(fishRec *, int);
128 extern void DrawShark(fishRec *, int);
129 extern void DrawDolphin(fishRec *, int);