Initial revision
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@3 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
73501007ba
commit
95194faee2
64
.gitattributes
vendored
64
.gitattributes
vendored
@ -1 +1,65 @@
|
||||
* text=auto !eol
|
||||
freeglut/freeglut/AUTHORS svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/COPYING svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/ChangeLog svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/INSTALL svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/Makefile.am svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/NEWS svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/README svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/TODO svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/acconfig.h svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/aclocal.m4 svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/configure svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/configure.in svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/Makefile.am svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_callbacks.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_cursor.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_display.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_font.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_font_data.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_gamemode.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_geometry.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_init.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_joystick.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_main.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_menu.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_misc.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_overlay.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_state.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_structure.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_teapot.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_videoresize.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/freeglut_window.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/templates/cpp_template svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut-1.3/templates/header_template svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut.dsw svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut.kdevprj svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut.lsm svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut13.dsp svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/freeglut13.plg svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/genfonts/.deps/genfonts.P svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/genfonts/.deps/genstroke.P svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/genfonts/Makefile svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/genfonts/Makefile.am svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/genfonts/Makefile.in svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/genfonts/Roman.src svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/genfonts/Roman_M.src svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/genfonts/genfonts.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/genfonts/genstroke.c svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/include/GL/Makefile svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/include/GL/Makefile.am svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/include/GL/Makefile.in svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/include/GL/freeglut.h svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/include/GL/freeglut_internal.h svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/include/Makefile svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/include/Makefile.am svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/include/Makefile.in svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/install-sh svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/mkinstalldirs svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/stamp-h svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/stamp-h.in svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/tests/.deps/one.P svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/tests/Makefile svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/tests/Makefile.am svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/tests/Makefile.in svn_keywords=Author+Date+Id+Revision
|
||||
freeglut/freeglut/tests/one.c svn_keywords=Author+Date+Id+Revision
|
||||
|
13
freeglut/freeglut/AUTHORS
Normal file
13
freeglut/freeglut/AUTHORS
Normal file
@ -0,0 +1,13 @@
|
||||
|
||||
Pawel W. Olszta <olszta@sourceforge.net>
|
||||
the person to be blamed for freeglut
|
||||
|
||||
Andreas Umbach <marvin@dataway.ch>
|
||||
the first person to contribute to the freeglut project,
|
||||
contributed the cube and sphere geometry code
|
||||
|
||||
Steve Baker <sjbaker1@airmail.net>
|
||||
joystick code (from his great PLIB), numerous hints
|
||||
and tips on the freeglut usability
|
||||
|
||||
...and all the opengl-gamedev-l people that made me to start this project :)
|
27
freeglut/freeglut/COPYING
Normal file
27
freeglut/freeglut/COPYING
Normal file
@ -0,0 +1,27 @@
|
||||
|
||||
Freeglut Copyright
|
||||
------------------
|
||||
|
||||
Freeglut code without an explicit copyright is covered by the following
|
||||
copyright:
|
||||
|
||||
Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Except as contained in this notice, the name of Pawel W. Olszta shall not be
|
||||
used in advertising or otherwise to promote the sale, use or other dealings
|
||||
in this Software without prior written authorization from Pawel W. Olszta.
|
0
freeglut/freeglut/ChangeLog
Normal file
0
freeglut/freeglut/ChangeLog
Normal file
167
freeglut/freeglut/INSTALL
Normal file
167
freeglut/freeglut/INSTALL
Normal file
@ -0,0 +1,167 @@
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, a file
|
||||
`config.cache' that saves the results of its tests to speed up
|
||||
reconfiguring, and a file `config.log' containing compiler output
|
||||
(useful mainly for debugging `configure').
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If at some point `config.cache'
|
||||
contains results you don't want to keep, you may remove or edit it.
|
||||
|
||||
The file `configure.in' is used to create `configure' by a program
|
||||
called `autoconf'. You only need `configure.in' if you want to change
|
||||
it or regenerate `configure' using a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes a while. While running, it prints some
|
||||
messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
4. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made.
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
||||
|
7
freeglut/freeglut/Makefile.am
Normal file
7
freeglut/freeglut/Makefile.am
Normal file
@ -0,0 +1,7 @@
|
||||
## Process this file with automake to produce makefile.im
|
||||
|
||||
SUBDIRS = freeglut-1.3 include genfonts tests
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
|
||||
EXTRA_DIST = AUTHORS COPYING ChangeLog INSTALL NEWS README TODO freeglut.lsm \
|
||||
freeglut.kdevprj
|
11
freeglut/freeglut/NEWS
Normal file
11
freeglut/freeglut/NEWS
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
Jan 16th 2000:
|
||||
|
||||
First really functional release of freeglut.
|
||||
|
||||
|
||||
Jan 13th 2001:
|
||||
|
||||
Steve Baker takes over as maintainer of freeglut.
|
||||
|
||||
|
80
freeglut/freeglut/README
Normal file
80
freeglut/freeglut/README
Normal file
@ -0,0 +1,80 @@
|
||||
|
||||
BRIEF OVERVIEW
|
||||
==============
|
||||
|
||||
This is an alpha release of the freeglut package. Currently only
|
||||
the alpha version of freeglut-1.3 library is available.
|
||||
|
||||
Freeglut, the Free openGL Utility Toolkit, is meant to be a free alter-
|
||||
native to Mark Kilgard's GLUT library. It is distributed under an X-Consor-
|
||||
tium style license (see COPYING for details), to offer you a chance to use
|
||||
and/or modify the source.
|
||||
|
||||
It makes use of OpenGL, GLU, GLib and pthreads-win32 libraries. GLib is
|
||||
LGPL'ed and I hope I do not violate it's license by using it. In case this
|
||||
is true, please notify me so that I remove GLib usage from the project.
|
||||
|
||||
The library does not make use of any GLUT code and is not 100% compatible.
|
||||
Code recompilation and/or slight modifications might be required for your
|
||||
applications to work with freeglut.
|
||||
|
||||
|
||||
PORTS
|
||||
=====
|
||||
|
||||
Both X11 and Win32 ports are in an advanced alpha stage, which means that
|
||||
they provide limited functionality of GLUT API 3. There is an investigation
|
||||
en course to check if the BeOS port could be easily done using the current
|
||||
freeglut structure.
|
||||
|
||||
|
||||
INSTALLATION
|
||||
============
|
||||
|
||||
See the INSTALL file.
|
||||
|
||||
|
||||
CONTRIBUTING
|
||||
============
|
||||
|
||||
Bug and missing features patches are certainly welcome. Just as comments
|
||||
and FREEGLUT API 1 propositions are.
|
||||
|
||||
Just please to make the fixes look visually just as the rest of the code
|
||||
does (tabs converted 4 white spaces). Comments are really welcome, as I
|
||||
believe it would be nice for people fresh new to OpenGL see how the things
|
||||
are done...
|
||||
|
||||
|
||||
WEB SITE AND CONTACTING THE AUTHOR
|
||||
==================================
|
||||
|
||||
Freeglut project has moved to the SourceForge:
|
||||
http://freeglut.sourceforge.net
|
||||
|
||||
|
||||
THE HOPE
|
||||
========
|
||||
|
||||
Hope you find my work somehow useful.
|
||||
Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
|
||||
|
||||
PASSING THE BATON
|
||||
=================
|
||||
|
||||
In late December 2000, Pawel decided that he no longer
|
||||
wished to maintain freeglut because he has moved out of
|
||||
the graphics field. I volunteered to take over from him
|
||||
and have been running the project since Jan 13th 2001.
|
||||
|
||||
I'm also the author and maintainer of the PLIB library suite
|
||||
and 'freeglut' really fits in well with that work.
|
||||
|
||||
I just hope I can live up to Pawel's high standards. Pawel
|
||||
remains on the active developers list.
|
||||
|
||||
Steve Baker <sjbaker1@airmail.net>
|
||||
http://plib.sourceforge.net
|
||||
|
||||
|
3
freeglut/freeglut/TODO
Normal file
3
freeglut/freeglut/TODO
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
The up-to-date TODO list can be found under following URL:
|
||||
http://freeglut.sourceforge.net/progress.html
|
9
freeglut/freeglut/acconfig.h
Normal file
9
freeglut/freeglut/acconfig.h
Normal file
@ -0,0 +1,9 @@
|
||||
/* Define if the C compiler supports BOOL */
|
||||
#undef HAVE_BOOL
|
||||
|
||||
#undef VERSION
|
||||
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define if you need the GNU extensions to compile */
|
||||
#undef _GNU_SOURCE
|
536
freeglut/freeglut/aclocal.m4
vendored
Normal file
536
freeglut/freeglut/aclocal.m4
vendored
Normal file
@ -0,0 +1,536 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
# Do all the work for Automake. This macro actually does too much --
|
||||
# some checks are only needed if your package does certain things.
|
||||
# But this isn't really a big deal.
|
||||
|
||||
# serial 1
|
||||
|
||||
dnl Usage:
|
||||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
PACKAGE=[$1]
|
||||
AC_SUBST(PACKAGE)
|
||||
VERSION=[$2]
|
||||
AC_SUBST(VERSION)
|
||||
dnl test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
|
||||
AC_REQUIRE([AM_SANITY_CHECK])
|
||||
AC_REQUIRE([AC_ARG_PROGRAM])
|
||||
dnl FIXME This is truly gross.
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
||||
AC_DEFUN(AM_SANITY_CHECK,
|
||||
[AC_MSG_CHECKING([whether build environment is sane])
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
# Do `set' in a subshell so we don't clobber the current shell's
|
||||
# arguments. Must try -L first in case configure is actually a
|
||||
# symlink; some systems play weird games with the mod time of symlinks
|
||||
# (eg FreeBSD returns the mod time of the symlink's containing
|
||||
# directory).
|
||||
if (
|
||||
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
|
||||
if test "[$]*" = "X"; then
|
||||
# -L didn't work.
|
||||
set X `ls -t $srcdir/configure conftestfile`
|
||||
fi
|
||||
if test "[$]*" != "X $srcdir/configure conftestfile" \
|
||||
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
|
||||
|
||||
# If neither matched, then we have a broken ls. This can happen
|
||||
# if, for instance, CONFIG_SHELL is bash and it inherits a
|
||||
# broken ls alias from the environment. This has actually
|
||||
# happened. Such a system could not be considered "sane".
|
||||
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
|
||||
alias in your environment])
|
||||
fi
|
||||
|
||||
test "[$]2" = conftestfile
|
||||
)
|
||||
then
|
||||
# Ok.
|
||||
:
|
||||
else
|
||||
AC_MSG_ERROR([newly created file is older than distributed files!
|
||||
Check your system clock])
|
||||
fi
|
||||
rm -f conftest*
|
||||
AC_MSG_RESULT(yes)])
|
||||
|
||||
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
|
||||
dnl The program must properly implement --version.
|
||||
AC_DEFUN(AM_MISSING_PROG,
|
||||
[AC_MSG_CHECKING(for working $2)
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
if ($2 --version) < /dev/null > /dev/null 2>&1; then
|
||||
$1=$2
|
||||
AC_MSG_RESULT(found)
|
||||
else
|
||||
$1="$3/missing $2"
|
||||
AC_MSG_RESULT(missing)
|
||||
fi
|
||||
AC_SUBST($1)])
|
||||
|
||||
# Like AC_CONFIG_HEADER, but automatically create stamp file.
|
||||
|
||||
AC_DEFUN(AM_CONFIG_HEADER,
|
||||
[AC_PREREQ([2.12])
|
||||
AC_CONFIG_HEADER([$1])
|
||||
dnl When config.status generates a header, we must update the stamp-h file.
|
||||
dnl This file resides in the same directory as the config header
|
||||
dnl that is generated. We must strip everything past the first ":",
|
||||
dnl and everything past the last "/".
|
||||
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
|
||||
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
|
||||
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
|
||||
<<am_indx=1
|
||||
for am_file in <<$1>>; do
|
||||
case " <<$>>CONFIG_HEADERS " in
|
||||
*" <<$>>am_file "*<<)>>
|
||||
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
|
||||
;;
|
||||
esac
|
||||
am_indx=`expr "<<$>>am_indx" + 1`
|
||||
done<<>>dnl>>)
|
||||
changequote([,]))])
|
||||
|
||||
|
||||
# serial 40 AC_PROG_LIBTOOL
|
||||
AC_DEFUN(AC_PROG_LIBTOOL,
|
||||
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
|
||||
|
||||
# Save cache, so that ltconfig can load it
|
||||
AC_CACHE_SAVE
|
||||
|
||||
# Actually configure libtool. ac_aux_dir is where install-sh is found.
|
||||
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
|
||||
LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
|
||||
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
|
||||
DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
|
||||
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
|
||||
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
|
||||
|| AC_MSG_ERROR([libtool configure failed])
|
||||
|
||||
# Reload cache, that may have been modified by ltconfig
|
||||
AC_CACHE_LOAD
|
||||
|
||||
# This can be used to rebuild libtool when needed
|
||||
LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
|
||||
|
||||
# Always use our own libtool.
|
||||
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
# Redirect the config.log output again, so that the ltconfig log is not
|
||||
# clobbered by the next message.
|
||||
exec 5>>./config.log
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_LIBTOOL_SETUP,
|
||||
[AC_PREREQ(2.13)dnl
|
||||
AC_REQUIRE([AC_ENABLE_SHARED])dnl
|
||||
AC_REQUIRE([AC_ENABLE_STATIC])dnl
|
||||
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_PROG_LD])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
AC_REQUIRE([AC_PROG_LN_S])dnl
|
||||
dnl
|
||||
|
||||
case "$target" in
|
||||
NONE) lt_target="$host" ;;
|
||||
*) lt_target="$target" ;;
|
||||
esac
|
||||
|
||||
# Check for any special flags to pass to ltconfig.
|
||||
libtool_flags="--cache-file=$cache_file"
|
||||
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
|
||||
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
|
||||
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
|
||||
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
|
||||
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
|
||||
[libtool_flags="$libtool_flags --enable-dlopen"])
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[libtool_flags="$libtool_flags --enable-win32-dll"])
|
||||
AC_ARG_ENABLE(libtool-lock,
|
||||
[ --disable-libtool-lock avoid locking (might break parallel builds)])
|
||||
test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
|
||||
test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
|
||||
|
||||
# Some flags need to be propagated to the compiler or linker for good
|
||||
# libtool support.
|
||||
case "$lt_target" in
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
case "`/usr/bin/file conftest.o`" in
|
||||
*32-bit*)
|
||||
LD="${LD-ld} -32"
|
||||
;;
|
||||
*N32*)
|
||||
LD="${LD-ld} -n32"
|
||||
;;
|
||||
*64-bit*)
|
||||
LD="${LD-ld} -64"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
*-*-sco3.2v5*)
|
||||
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
|
||||
SAVE_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -belf"
|
||||
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
|
||||
[AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
|
||||
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
|
||||
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
|
||||
CFLAGS="$SAVE_CFLAGS"
|
||||
fi
|
||||
;;
|
||||
|
||||
ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
|
||||
[*-*-cygwin* | *-*-mingw*)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
])
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
|
||||
AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
|
||||
AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
|
||||
|
||||
# AC_ENABLE_SHARED - implement the --enable-shared flag
|
||||
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_SHARED, [dnl
|
||||
define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(shared,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
|
||||
AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_SHARED(no)])
|
||||
|
||||
# AC_ENABLE_STATIC - implement the --enable-static flag
|
||||
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_STATIC, [dnl
|
||||
define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(static,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_DISABLE_STATIC - set the default static flag to --disable-static
|
||||
AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_STATIC(no)])
|
||||
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
|
||||
# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
|
||||
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
|
||||
# `yes'.
|
||||
AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
|
||||
define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
|
||||
AC_ARG_ENABLE(fast-install,
|
||||
changequote(<<, >>)dnl
|
||||
<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
|
||||
changequote([, ])dnl
|
||||
[p=${PACKAGE-default}
|
||||
case "$enableval" in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
|
||||
for pkg in $enableval; do
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
|
||||
])
|
||||
|
||||
# AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
|
||||
AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_ENABLE_FAST_INSTALL(no)])
|
||||
|
||||
# AC_PROG_LD - find the path to the GNU or non-GNU linker
|
||||
AC_DEFUN(AC_PROG_LD,
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
||||
ac_prog=ld
|
||||
if test "$ac_cv_prog_gcc" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5`
|
||||
case "$ac_prog" in
|
||||
# Accept absolute paths.
|
||||
changequote(,)dnl
|
||||
[\\/]* | [A-Za-z]:[\\/]*)
|
||||
re_direlt='/[^/][^/]*/\.\./'
|
||||
changequote([,])dnl
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(ac_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
ac_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
test "$with_gnu_ld" != no && break
|
||||
else
|
||||
test "$with_gnu_ld" != yes && break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
ac_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$ac_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_PROG_LD_GNU
|
||||
])
|
||||
|
||||
AC_DEFUN(AC_PROG_LD_GNU,
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
|
||||
ac_cv_prog_gnu_ld=yes
|
||||
else
|
||||
ac_cv_prog_gnu_ld=no
|
||||
fi])
|
||||
])
|
||||
|
||||
# AC_PROG_NM - find the path to a BSD-compatible name lister
|
||||
AC_DEFUN(AC_PROG_NM,
|
||||
[AC_MSG_CHECKING([for BSD-compatible nm])
|
||||
AC_CACHE_VAL(ac_cv_path_NM,
|
||||
[if test -n "$NM"; then
|
||||
# Let the user override the test.
|
||||
ac_cv_path_NM="$NM"
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
|
||||
# Check to see if the nm accepts a BSD-compat flag.
|
||||
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
||||
# nm: unknown option "B" ignored
|
||||
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -B"
|
||||
break
|
||||
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
|
||||
ac_cv_path_NM="$ac_dir/nm -p"
|
||||
break
|
||||
else
|
||||
ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
|
||||
continue # so that we can try to find one that supports BSD flags
|
||||
fi
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
|
||||
fi])
|
||||
NM="$ac_cv_path_NM"
|
||||
AC_MSG_RESULT([$NM])
|
||||
])
|
||||
|
||||
# AC_CHECK_LIBM - check for math library
|
||||
AC_DEFUN(AC_CHECK_LIBM,
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
LIBM=
|
||||
case "$lt_target" in
|
||||
*-*-beos* | *-*-cygwin*)
|
||||
# These system don't have libm
|
||||
;;
|
||||
*-ncr-sysv4.3*)
|
||||
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
|
||||
AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
|
||||
;;
|
||||
*)
|
||||
AC_CHECK_LIB(m, main, LIBM="-lm")
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl convenience library, adds --enable-ltdl-convenience to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
case "$enable_ltdl_convenience" in
|
||||
no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
|
||||
"") enable_ltdl_convenience=yes
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
|
||||
esac
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
])
|
||||
|
||||
# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
|
||||
# the libltdl installable library, and adds --enable-ltdl-install to
|
||||
# the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
|
||||
# is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
|
||||
# to be `${top_builddir}/libltdl'. Make sure you start DIR with
|
||||
# '${top_builddir}/' (note the single quotes!) if your package is not
|
||||
# flat, and, if you're not using automake, define top_builddir as
|
||||
# appropriate in the Makefiles.
|
||||
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
|
||||
AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
|
||||
AC_CHECK_LIB(ltdl, main,
|
||||
[test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
|
||||
[if test x"$enable_ltdl_install" = xno; then
|
||||
AC_MSG_WARN([libltdl not installed, but installation disabled])
|
||||
else
|
||||
enable_ltdl_install=yes
|
||||
fi
|
||||
])
|
||||
if test x"$enable_ltdl_install" = x"yes"; then
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install"
|
||||
LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
|
||||
INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
|
||||
else
|
||||
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
|
||||
LIBLTDL="-lltdl"
|
||||
INCLTDL=
|
||||
fi
|
||||
])
|
||||
|
||||
dnl old names
|
||||
AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
|
||||
AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
|
||||
AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
|
||||
AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
|
||||
AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
|
||||
|
||||
dnl This is just to silence aclocal about the macro not being used
|
||||
ifelse([AC_DISABLE_FAST_INSTALL])dnl
|
||||
|
2375
freeglut/freeglut/configure
vendored
Executable file
2375
freeglut/freeglut/configure
vendored
Executable file
File diff suppressed because it is too large
Load Diff
29
freeglut/freeglut/configure.in
Normal file
29
freeglut/freeglut/configure.in
Normal file
@ -0,0 +1,29 @@
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
AC_INIT(Makefile.am)
|
||||
|
||||
AM_INIT_AUTOMAKE(freeglut,0.1)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_C_CONST
|
||||
AC_EXEEXT
|
||||
AC_PROG_RANLIB
|
||||
AC_LIBTOOL_DLOPEN
|
||||
AM_PROG_LIBTOOL
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_STDC_HEADERS
|
||||
AC_HAVE_HEADERS( GL/gl.h GL/glu.h GL/glx.h )
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
dnl Checks for library functions.
|
||||
|
||||
AC_CHECK_LIBM
|
||||
AC_SUBST(LIBM)
|
||||
|
||||
AC_OUTPUT(Makefile freeglut-1.3/Makefile include/Makefile include/GL/Makefile genfonts/Makefile tests/Makefile )
|
39
freeglut/freeglut/freeglut-1.3/Makefile.am
Normal file
39
freeglut/freeglut/freeglut-1.3/Makefile.am
Normal file
@ -0,0 +1,39 @@
|
||||
## Process this file with automake to produce Makefile.im
|
||||
|
||||
#
|
||||
# The library we want to build
|
||||
#
|
||||
lib_LTLIBRARIES = libfreeglut-1.3.la
|
||||
|
||||
#
|
||||
# Those source files build the freeglut library
|
||||
#
|
||||
libfreeglut_1_3_la_SOURCES = freeglut_callbacks.c \
|
||||
freeglut_cursor.c \
|
||||
freeglut_display.c \
|
||||
freeglut_font.c \
|
||||
freeglut_font_data.c \
|
||||
freeglut_gamemode.c \
|
||||
freeglut_geometry.c \
|
||||
freeglut_init.c \
|
||||
freeglut_joystick.c \
|
||||
freeglut_main.c \
|
||||
freeglut_menu.c \
|
||||
freeglut_misc.c \
|
||||
freeglut_overlay.c \
|
||||
freeglut_state.c \
|
||||
freeglut_structure.c \
|
||||
freeglut_teapot.c \
|
||||
freeglut_videoresize.c \
|
||||
freeglut_window.c
|
||||
|
||||
|
||||
#
|
||||
# Additional linker flags
|
||||
#
|
||||
libfreeglut_1_3_la_LIBADD = $(LIBM) -L/usr/X11R6/lib -lGL -lGLU -lXext -lX11 -lXxf86vm -lglib
|
||||
libfreeglut_1_3_la_LDFLAGS = -version-info 0:0:0
|
||||
|
||||
#
|
||||
# End of file
|
||||
#
|
310
freeglut/freeglut/freeglut-1.3/freeglut_callbacks.c
Normal file
310
freeglut/freeglut/freeglut-1.3/freeglut_callbacks.c
Normal file
@ -0,0 +1,310 @@
|
||||
/*
|
||||
* freeglut_callbacks.c
|
||||
*
|
||||
* The callbacks setting methods.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Fri Dec 3 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-callbacks"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* All of the callbacks setting methods can be generalized to this:
|
||||
*/
|
||||
#define SET_CALLBACK(a) if( fgStructure.Window == NULL ) return;\
|
||||
fgStructure.Window->Callbacks.a = callback;
|
||||
|
||||
/*
|
||||
* Sets the Display callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) )
|
||||
{
|
||||
SET_CALLBACK( Display );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the Reshape callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) )
|
||||
{
|
||||
SET_CALLBACK( Reshape );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the Keyboard callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) )
|
||||
{
|
||||
SET_CALLBACK( Keyboard );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the Special callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) )
|
||||
{
|
||||
SET_CALLBACK( Special );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the global idle callback
|
||||
*/
|
||||
void FGAPIENTRY glutIdleFunc( void (* callback)( void ) )
|
||||
{
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* The global idle callback pointer is stored in fgState structure
|
||||
*/
|
||||
fgState.IdleCallback = callback;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the Timer callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutTimerFunc( unsigned int timeOut, void (* callback)( int ), int timerID )
|
||||
{
|
||||
SFG_Timer* timer;
|
||||
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* Create a new freeglut timer hook structure
|
||||
*/
|
||||
timer = g_new0( SFG_Timer, 1 );
|
||||
|
||||
/*
|
||||
* Remember the callback address and timer hook's ID
|
||||
*/
|
||||
timer->Callback = callback;
|
||||
timer->ID = timerID;
|
||||
|
||||
/*
|
||||
* When will the time out happen (in terms of window's timer)
|
||||
*/
|
||||
timer->TriggerTime =
|
||||
g_timer_elapsed( fgState.Timer, NULL ) + (((double) timeOut) / 1000.0);
|
||||
|
||||
/*
|
||||
* Have the new hook attached to the current window
|
||||
*/
|
||||
fgState.Timers = g_list_append( fgState.Timers, timer );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the Visibility callback for the current window.
|
||||
*
|
||||
* I had to peer to GLUT sources to clean up the mess.
|
||||
* Can anyone please explain me what is going on here?!?
|
||||
*/
|
||||
static void fghVisibility( gint status )
|
||||
{
|
||||
freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Window != NULL );
|
||||
freeglut_return_if_fail( fgStructure.Window->Callbacks.Visibility != NULL );
|
||||
|
||||
if( status == GLUT_HIDDEN || status == GLUT_FULLY_COVERED )
|
||||
fgStructure.Window->Callbacks.Visibility( GLUT_NOT_VISIBLE );
|
||||
else
|
||||
fgStructure.Window->Callbacks.Visibility( GLUT_VISIBLE );
|
||||
}
|
||||
|
||||
void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) )
|
||||
{
|
||||
SET_CALLBACK( Visibility );
|
||||
|
||||
if( callback )
|
||||
glutWindowStatusFunc( fghVisibility );
|
||||
else
|
||||
glutWindowStatusFunc( NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the keyboard key release callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) )
|
||||
{
|
||||
SET_CALLBACK( KeyboardUp );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the special key release callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) )
|
||||
{
|
||||
SET_CALLBACK( SpecialUp );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the joystick callback and polling rate for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval )
|
||||
{
|
||||
SET_CALLBACK( Joystick );
|
||||
|
||||
freeglut_return_if_fail( fgStructure.Window != NULL );
|
||||
|
||||
/*
|
||||
* Do not forget setting the joystick poll rate
|
||||
*/
|
||||
fgStructure.Window->State.JoystickPollRate = ((double) pollInterval) / 1000.0;
|
||||
|
||||
/*
|
||||
* Make sure the joystick polling routine gets called as early as possible:
|
||||
*/
|
||||
fgStructure.Window->State.JoystickLastPoll =
|
||||
g_timer_elapsed( fgState.Timer, NULL ) - fgStructure.Window->State.JoystickPollRate;
|
||||
|
||||
if( fgStructure.Window->State.JoystickLastPoll < 0.0 )
|
||||
fgStructure.Window->State.JoystickLastPoll = 0.0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the mouse callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) )
|
||||
{
|
||||
SET_CALLBACK( Mouse );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the mouse motion callback for the current window (one or more buttons are pressed)
|
||||
*/
|
||||
void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) )
|
||||
{
|
||||
SET_CALLBACK( Motion );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the passive mouse motion callback for the current window (no mouse buttons are pressed)
|
||||
*/
|
||||
void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) )
|
||||
{
|
||||
SET_CALLBACK( Passive );
|
||||
}
|
||||
|
||||
/*
|
||||
* Window mouse entry/leave callback
|
||||
*/
|
||||
void FGAPIENTRY glutEntryFunc( void (* callback)( int ) )
|
||||
{
|
||||
SET_CALLBACK( Entry );
|
||||
}
|
||||
|
||||
/*
|
||||
* Deprecated version of glutMenuStatusFunc callback setting method
|
||||
*/
|
||||
void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) )
|
||||
{
|
||||
SET_CALLBACK( MenuState );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the global menu status callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) )
|
||||
{
|
||||
SET_CALLBACK( MenuStatus );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the overlay display callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) )
|
||||
{
|
||||
SET_CALLBACK( OverlayDisplay );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the window status callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) )
|
||||
{
|
||||
SET_CALLBACK( WindowStatus );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the spaceball motion callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) )
|
||||
{
|
||||
SET_CALLBACK( SpaceMotion );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the spaceball rotate callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) )
|
||||
{
|
||||
SET_CALLBACK( SpaceRotation );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the spaceball button callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) )
|
||||
{
|
||||
SET_CALLBACK( SpaceButton );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the button box callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) )
|
||||
{
|
||||
SET_CALLBACK( ButtonBox );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the dials box callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) )
|
||||
{
|
||||
SET_CALLBACK( Dials );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the tablet motion callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) )
|
||||
{
|
||||
SET_CALLBACK( TabletMotion );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the tablet buttons callback for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) )
|
||||
{
|
||||
SET_CALLBACK( TabletButton );
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
182
freeglut/freeglut/freeglut-1.3/freeglut_cursor.c
Normal file
182
freeglut/freeglut/freeglut-1.3/freeglut_cursor.c
Normal file
@ -0,0 +1,182 @@
|
||||
/*
|
||||
* freeglut_cursor.c
|
||||
*
|
||||
* The mouse cursor related stuff.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 16 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-cursor"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
#include <X11/cursorfont.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* TODO BEFORE THE STABLE RELEASE:
|
||||
*
|
||||
* fgDisplayCursor() -- this waits for better times
|
||||
* glutSetCursor() -- both X and Win32 mappings are incomplete
|
||||
* glutWarpPointer() -- check the Win32 version
|
||||
*
|
||||
* It would be good to use custom mouse cursor shapes, and introduce
|
||||
* an option to display them using glBitmap() and/or texture mapping,
|
||||
* apart from the windowing system version.
|
||||
*/
|
||||
|
||||
/* -- INTERNAL FUNCTIONS --------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Display the mouse cursor using OpenGL calls
|
||||
*/
|
||||
void fgDisplayCursor( void )
|
||||
{
|
||||
/*
|
||||
* Do nothing for the moment
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Set the cursor image to be used for the current window
|
||||
*/
|
||||
void FGAPIENTRY glutSetCursor( int cursorID )
|
||||
{
|
||||
/*
|
||||
* Make sure freeglut is ready and there is a current window set
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_assert_window;
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
{
|
||||
Cursor cursor;
|
||||
|
||||
/*
|
||||
* For now we'll limit ourselves to the X cursor fonts...
|
||||
*/
|
||||
# define MAP_CURSOR(a,b) case a: cursor = XCreateFontCursor( fgDisplay.Display, b ); break;
|
||||
|
||||
switch( cursorID )
|
||||
{
|
||||
MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, XC_left_ptr );
|
||||
MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW, XC_right_ptr );
|
||||
MAP_CURSOR( GLUT_CURSOR_INFO, XC_question_arrow );
|
||||
MAP_CURSOR( GLUT_CURSOR_DESTROY, XC_target );
|
||||
MAP_CURSOR( GLUT_CURSOR_HELP, XC_question_arrow );
|
||||
MAP_CURSOR( GLUT_CURSOR_CYCLE, XC_circle );
|
||||
MAP_CURSOR( GLUT_CURSOR_SPRAY, XC_spraycan );
|
||||
MAP_CURSOR( GLUT_CURSOR_WAIT, XC_watch );
|
||||
MAP_CURSOR( GLUT_CURSOR_TEXT, XC_draft_large );
|
||||
MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, XC_crosshair );
|
||||
MAP_CURSOR( GLUT_CURSOR_NONE, XC_trek );
|
||||
|
||||
default:
|
||||
MAP_CURSOR( GLUT_CURSOR_UP_DOWN, XC_arrow );
|
||||
}
|
||||
|
||||
/*
|
||||
* Define a window's cursor now
|
||||
*/
|
||||
XDefineCursor( fgDisplay.Display, fgStructure.Window->Window.Handle, cursor );
|
||||
}
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
/*
|
||||
* This is a temporary solution only...
|
||||
*/
|
||||
# define MAP_CURSOR(a,b) case a: SetCursor( LoadCursor( NULL, b ) ); break;
|
||||
|
||||
switch( cursorID )
|
||||
{
|
||||
MAP_CURSOR( GLUT_CURSOR_RIGHT_ARROW, IDC_ARROW );
|
||||
MAP_CURSOR( GLUT_CURSOR_LEFT_ARROW, IDC_ARROW );
|
||||
MAP_CURSOR( GLUT_CURSOR_INFO, IDC_HELP );
|
||||
MAP_CURSOR( GLUT_CURSOR_DESTROY, IDC_CROSS );
|
||||
MAP_CURSOR( GLUT_CURSOR_HELP, IDC_HELP );
|
||||
MAP_CURSOR( GLUT_CURSOR_CYCLE, IDC_SIZEALL );
|
||||
MAP_CURSOR( GLUT_CURSOR_SPRAY, IDC_CROSS );
|
||||
MAP_CURSOR( GLUT_CURSOR_WAIT, IDC_WAIT );
|
||||
MAP_CURSOR( GLUT_CURSOR_TEXT, IDC_UPARROW );
|
||||
MAP_CURSOR( GLUT_CURSOR_CROSSHAIR, IDC_CROSS );
|
||||
MAP_CURSOR( GLUT_CURSOR_NONE, IDC_NO );
|
||||
|
||||
default:
|
||||
MAP_CURSOR( GLUT_CURSOR_UP_DOWN, IDC_UPARROW );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Remember the currently selected cursor
|
||||
*/
|
||||
fgStructure.Window->State.Cursor = cursorID;
|
||||
}
|
||||
|
||||
/*
|
||||
* Moves the mouse pointer to given window coordinates
|
||||
*/
|
||||
void FGAPIENTRY glutWarpPointer( int x, int y )
|
||||
{
|
||||
freeglut_assert_ready; freeglut_assert_window;
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
/*
|
||||
* Move the mouse pointer to given window coordinates
|
||||
*/
|
||||
XWarpPointer(
|
||||
fgDisplay.Display,
|
||||
None,
|
||||
fgStructure.Window->Window.Handle,
|
||||
0, 0, 0, 0,
|
||||
x, y
|
||||
);
|
||||
|
||||
XFlush( fgDisplay.Display );
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
{
|
||||
POINT coords = { x, y };
|
||||
|
||||
/*
|
||||
* First of all, we need to find the new screen-relative coordinates of the mouse cursor
|
||||
*/
|
||||
ClientToScreen( fgStructure.Window->Window.Handle, &coords );
|
||||
|
||||
/*
|
||||
* Now set the new mouse cursor position...
|
||||
*/
|
||||
SetCursorPos( coords.x, coords.y );
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
121
freeglut/freeglut/freeglut-1.3/freeglut_display.c
Normal file
121
freeglut/freeglut/freeglut-1.3/freeglut_display.c
Normal file
@ -0,0 +1,121 @@
|
||||
/*
|
||||
* freeglut_display.c
|
||||
*
|
||||
* Display message posting, context buffer swapping.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Fri Dec 3 1999
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-display"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Marks the current window to have the redisplay performed when possible...
|
||||
*/
|
||||
void FGAPIENTRY glutPostRedisplay( void )
|
||||
{
|
||||
/*
|
||||
* Is there a current window set?
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_assert_window;
|
||||
|
||||
/*
|
||||
* Just mark the window as one that we need to redisplay...
|
||||
*/
|
||||
fgStructure.Window->State.Redisplay = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Swaps the buffers for the current window (if any)
|
||||
*/
|
||||
void FGAPIENTRY glutSwapBuffers( void )
|
||||
{
|
||||
/*
|
||||
* As long as we've got a current window set...
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_assert_window;
|
||||
|
||||
/*
|
||||
* Have the mouse cursor and/or the menus drawn for the current window
|
||||
*/
|
||||
fgDisplayMenu();
|
||||
fgDisplayCursor();
|
||||
|
||||
/*
|
||||
* Make sure the current context is flushed
|
||||
*/
|
||||
glFlush();
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
/*
|
||||
* Issue the glXSwapBuffers call and be done with it
|
||||
*/
|
||||
glXSwapBuffers( fgDisplay.Display, fgStructure.Window->Window.Handle );
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
/*
|
||||
* Swap the window's buffers
|
||||
*/
|
||||
SwapBuffers( fgStructure.Window->Window.Device );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Mark appropriate window to be displayed
|
||||
*/
|
||||
void FGAPIENTRY glutPostWindowRedisplay( int windowID )
|
||||
{
|
||||
SFG_Window* window;
|
||||
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* Try looking for the window
|
||||
*/
|
||||
window = fgWindowByID( windowID );
|
||||
|
||||
/*
|
||||
* If failed, return
|
||||
*/
|
||||
freeglut_return_if_fail( window != NULL );
|
||||
|
||||
/*
|
||||
* Otherwise mark the window for being redisplayed
|
||||
*/
|
||||
window->State.Redisplay = TRUE;
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
263
freeglut/freeglut/freeglut-1.3/freeglut_font.c
Normal file
263
freeglut/freeglut/freeglut-1.3/freeglut_font.c
Normal file
@ -0,0 +1,263 @@
|
||||
/*
|
||||
* freeglut_font.c
|
||||
*
|
||||
* Bitmap and stroke fonts displaying.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 16 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-font"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* TODO BEFORE THE STABLE RELEASE:
|
||||
*
|
||||
* glutStrokeCharacter() -- stroke fonts not implemented, uses a bitmap font instead
|
||||
* glutStrokeWidth() -- stroke fonts not implemented, uses a bitmap font instead
|
||||
*/
|
||||
|
||||
/* -- IMPORT DECLARATIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* These are the font faces defined in freeglut_font_data.c file:
|
||||
*/
|
||||
extern SFG_Font fgFontFixed8x13;
|
||||
extern SFG_Font fgFontFixed9x15;
|
||||
extern SFG_Font fgFontHelvetica10;
|
||||
extern SFG_Font fgFontHelvetica12;
|
||||
extern SFG_Font fgFontHelvetica18;
|
||||
extern SFG_Font fgFontTimesRoman10;
|
||||
extern SFG_Font fgFontTimesRoman24;
|
||||
|
||||
/*
|
||||
* This is for GLUT binary compatibility, as suggested by Steve Baker
|
||||
*/
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
void* glutStrokeRoman;
|
||||
void* glutStrokeMonoRoman;
|
||||
void* glutBitmap9By15;
|
||||
void* glutBitmap8By13;
|
||||
void* glutBitmapTimesRoman10;
|
||||
void* glutBitmapTimesRoman24;
|
||||
void* glutBitmapHelvetica10;
|
||||
void* glutBitmapHelvetica12;
|
||||
void* glutBitmapHelvetica18;
|
||||
#endif
|
||||
|
||||
|
||||
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Matches a font ID with a SFG_Font structure pointer.
|
||||
* This was changed to match the GLUT header style.
|
||||
*/
|
||||
static SFG_Font* fghFontByID( void* font )
|
||||
{
|
||||
/*
|
||||
* Try matching the font ID and the font data structure
|
||||
*/
|
||||
if( font == GLUT_BITMAP_8_BY_13 ) return( &fgFontFixed8x13 );
|
||||
if( font == GLUT_BITMAP_9_BY_15 ) return( &fgFontFixed9x15 );
|
||||
if( font == GLUT_BITMAP_HELVETICA_10 ) return( &fgFontHelvetica10 );
|
||||
if( font == GLUT_BITMAP_HELVETICA_12 ) return( &fgFontHelvetica12 );
|
||||
if( font == GLUT_BITMAP_HELVETICA_18 ) return( &fgFontHelvetica18 );
|
||||
if( font == GLUT_BITMAP_TIMES_ROMAN_10 ) return( &fgFontTimesRoman10 );
|
||||
if( font == GLUT_BITMAP_TIMES_ROMAN_24 ) return( &fgFontTimesRoman24 );
|
||||
|
||||
/*
|
||||
* This probably is the library user's fault
|
||||
*/
|
||||
g_error( "font 0x%08x not found", font );
|
||||
}
|
||||
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Draw a bitmap character
|
||||
*/
|
||||
void FGAPIENTRY glutBitmapCharacter( void* fontID, int character )
|
||||
{
|
||||
const guchar* face;
|
||||
|
||||
/*
|
||||
* First of all we'll need a font to use
|
||||
*/
|
||||
SFG_Font* font = fghFontByID( fontID );
|
||||
|
||||
/*
|
||||
* Make sure the character we want to output is valid
|
||||
*/
|
||||
freeglut_return_if_fail( character > 0 && character < 256 );
|
||||
|
||||
/*
|
||||
* Then find the character we want to draw
|
||||
*/
|
||||
face = font->Characters[ character - 1 ];
|
||||
|
||||
/*
|
||||
* Save the old pixel store settings
|
||||
*/
|
||||
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT );
|
||||
|
||||
/*
|
||||
* Set up the pixel unpacking ways
|
||||
*/
|
||||
glPixelStorei( GL_UNPACK_SWAP_BYTES, GL_FALSE );
|
||||
glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE );
|
||||
glPixelStorei( GL_UNPACK_ROW_LENGTH, 0 );
|
||||
glPixelStorei( GL_UNPACK_SKIP_ROWS, 0 );
|
||||
glPixelStorei( GL_UNPACK_SKIP_PIXELS, 0 );
|
||||
glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
|
||||
|
||||
/*
|
||||
* We'll use a glBitmap call to draw the font.
|
||||
*/
|
||||
glBitmap(
|
||||
face[ 0 ], font->Height, /* The bitmap's width and height */
|
||||
0, 0, /* The origin -- what the hell? */
|
||||
face[ 0 ] + 1, 0, /* The raster advance -- inc. x */
|
||||
(face + 1) /* The packed bitmap data... */
|
||||
);
|
||||
|
||||
/*
|
||||
* Restore the old pixel store settings
|
||||
*/
|
||||
glPopClientAttrib();
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the width in pixels of a font's character
|
||||
*/
|
||||
int FGAPIENTRY glutBitmapWidth( void* fontID, int character )
|
||||
{
|
||||
/*
|
||||
* First of all, grab the font we need
|
||||
*/
|
||||
SFG_Font* font = fghFontByID( fontID );
|
||||
|
||||
/*
|
||||
* Make sure the character we want to output is valid
|
||||
*/
|
||||
freeglut_return_val_if_fail( character > 0 && character < 256, 0 );
|
||||
|
||||
/*
|
||||
* Scan the font looking for the specified character
|
||||
*/
|
||||
return( *(font->Characters[ character - 1 ]) + 1 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Draw a stroke character
|
||||
*/
|
||||
void FGAPIENTRY glutStrokeCharacter( void* fontID, int character )
|
||||
{
|
||||
/*
|
||||
* Stroke fonts are not supported yet, use a bitmap font instead
|
||||
*/
|
||||
glutBitmapCharacter( GLUT_BITMAP_8_BY_13, character );
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the width in pixels of a stroke character
|
||||
*/
|
||||
int FGAPIENTRY glutStrokeWidth( void* fontID, int character )
|
||||
{
|
||||
/*
|
||||
* Stroke fonts are not supported yet, use a bitmap font instead
|
||||
*/
|
||||
return( glutBitmapWidth( GLUT_BITMAP_8_BY_13, character ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the width of a string drawn using a bitmap font
|
||||
*/
|
||||
int FGAPIENTRY glutBitmapLength( void* fontID, const char* string )
|
||||
{
|
||||
gint i, length = 0;
|
||||
|
||||
/*
|
||||
* Using glutBitmapWidth() function to calculate the result
|
||||
*/
|
||||
for( i=0; i<(gint) strlen( string ); i++ )
|
||||
length += glutBitmapWidth( fontID, string[ i ] );
|
||||
|
||||
/*
|
||||
* Return the result now
|
||||
*/
|
||||
return( length );
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the width of a string drawn using a stroke font
|
||||
*/
|
||||
int FGAPIENTRY glutStrokeLength( void* fontID, const char* string )
|
||||
{
|
||||
gint i, length = 0;
|
||||
|
||||
/*
|
||||
* Using glutStrokeWidth() function to calculate the result
|
||||
*/
|
||||
for( i=0; i<(gint) strlen( string ); i++ )
|
||||
length += glutStrokeWidth( fontID, string[ i ] );
|
||||
|
||||
/*
|
||||
* Return the result now
|
||||
*/
|
||||
return( length );
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the height of a bitmap font
|
||||
*/
|
||||
int FGAPIENTRY glutBitmapHeight( void* fontID )
|
||||
{
|
||||
/*
|
||||
* See which font are we queried about
|
||||
*/
|
||||
SFG_Font* font = fghFontByID( fontID );
|
||||
|
||||
/*
|
||||
* Return the character set's height
|
||||
*/
|
||||
return( font->Height );
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the height of a stroke font
|
||||
*/
|
||||
int FGAPIENTRY glutStrokeHeight( void* font )
|
||||
{
|
||||
/*
|
||||
* Stroke fonts are currently not implemented.
|
||||
* Using GLUT_BITMAP_8_BY_13 bitmap font instead
|
||||
*/
|
||||
return( glutBitmapHeight( GLUT_BITMAP_8_BY_13 ) );
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
747
freeglut/freeglut/freeglut-1.3/freeglut_font_data.c
Normal file
747
freeglut/freeglut/freeglut-1.3/freeglut_font_data.c
Normal file
File diff suppressed because one or more lines are too long
511
freeglut/freeglut/freeglut-1.3/freeglut_gamemode.c
Normal file
511
freeglut/freeglut/freeglut-1.3/freeglut_gamemode.c
Normal file
@ -0,0 +1,511 @@
|
||||
/*
|
||||
* freeglut_gamemode.c
|
||||
*
|
||||
* The game mode handling code.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 16 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-gamemode"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* TODO BEFORE THE STABLE RELEASE:
|
||||
*
|
||||
* glutGameModeString() -- missing
|
||||
* glutEnterGameMode() -- X11 version
|
||||
* glutLeaveGameMode() -- is that correct?
|
||||
* glutGameModeGet() -- is that correct?
|
||||
*/
|
||||
|
||||
|
||||
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Remembers the current visual settings, so that
|
||||
* we can change them and restore later...
|
||||
*/
|
||||
void fghRememberState( void )
|
||||
{
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
/*
|
||||
* This highly depends on the XFree86 extensions, not approved as X Consortium standards
|
||||
*/
|
||||
# ifdef X_XF86VidModeGetModeLine
|
||||
|
||||
/*
|
||||
* Query the current display settings:
|
||||
*/
|
||||
XF86VidModeGetModeLine(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen,
|
||||
&fgDisplay.DisplayModeClock,
|
||||
&fgDisplay.DisplayMode
|
||||
);
|
||||
|
||||
# else
|
||||
# warning fghRememberState: missing XFree86 video mode extensions, game mode will not change screen resolution when activated
|
||||
# endif
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
|
||||
DEVMODE devMode;
|
||||
|
||||
/*
|
||||
* Grab the current desktop settings...
|
||||
*/
|
||||
EnumDisplaySettings( NULL, ENUM_CURRENT_SETTINGS, &fgDisplay.DisplayMode );
|
||||
|
||||
/*
|
||||
* Make sure we will be restoring all settings needed
|
||||
*/
|
||||
fgDisplay.DisplayMode.dmFields |= DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Restores the previously remembered visual settings
|
||||
*/
|
||||
void fghRestoreState( void )
|
||||
{
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
/*
|
||||
* This highly depends on the XFree86 extensions, not approved as X Consortium standards
|
||||
*/
|
||||
# ifdef X_XF86VidModeGetAllModeLines
|
||||
|
||||
XF86VidModeModeInfo** displayModes;
|
||||
gint i, displayModesCount;
|
||||
|
||||
/*
|
||||
* Query for all the display available...
|
||||
*/
|
||||
XF86VidModeGetAllModeLines(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen,
|
||||
&displayModesCount,
|
||||
&displayModes
|
||||
);
|
||||
|
||||
/*
|
||||
* Check every of the modes looking for one that matches our demands
|
||||
*/
|
||||
for( i=0; i<displayModesCount; i++ )
|
||||
{
|
||||
if( displayModes[ i ]->hdisplay == fgDisplay.DisplayMode.hdisplay &&
|
||||
displayModes[ i ]->vdisplay == fgDisplay.DisplayMode.vdisplay &&
|
||||
displayModes[ i ]->dotclock == fgDisplay.DisplayModeClock )
|
||||
{
|
||||
/*
|
||||
* OKi, this is the display mode we have been looking for...
|
||||
*/
|
||||
XF86VidModeSwitchToMode(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen,
|
||||
displayModes[ i ]
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
# else
|
||||
# warning fghRestoreState: missing XFree86 video mode extensions, game mode will not change screen resolution when activated
|
||||
# endif
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
|
||||
/*
|
||||
* Restore the previously rememebered desktop display settings
|
||||
*/
|
||||
ChangeDisplaySettings( &fgDisplay.DisplayMode, 0 );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks the display mode settings against user's preferences
|
||||
*/
|
||||
gboolean fghCheckDisplayMode( gint width, gint height, gint depth, gint refresh )
|
||||
{
|
||||
/*
|
||||
* The desired values should be stored in fgState structure...
|
||||
*/
|
||||
return( (width == fgState.GameModeSize.X) && (height == fgState.GameModeSize.Y) &&
|
||||
(depth == fgState.GameModeDepth) && (refresh == fgState.GameModeRefresh) );
|
||||
}
|
||||
|
||||
/*
|
||||
* Changes the current display mode to match user's settings
|
||||
*/
|
||||
gboolean fghChangeDisplayMode( gboolean haveToTest )
|
||||
{
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
/*
|
||||
* This highly depends on the XFree86 extensions, not approved as X Consortium standards
|
||||
*/
|
||||
# ifdef X_XF86VidModeGetAllModeLines
|
||||
|
||||
XF86VidModeModeInfo** displayModes;
|
||||
gint i, displayModesCount;
|
||||
|
||||
/*
|
||||
* Query for all the display available...
|
||||
*/
|
||||
XF86VidModeGetAllModeLines(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen,
|
||||
&displayModesCount,
|
||||
&displayModes
|
||||
);
|
||||
|
||||
/*
|
||||
* Check every of the modes looking for one that matches our demands
|
||||
*/
|
||||
for( i=0; i<displayModesCount; i++ )
|
||||
{
|
||||
if( fghCheckDisplayMode( displayModes[ i ]->hdisplay, displayModes[ i ]->vdisplay,
|
||||
fgState.GameModeDepth, fgState.GameModeRefresh ) )
|
||||
{
|
||||
/*
|
||||
* OKi, this is the display mode we have been looking for...
|
||||
*/
|
||||
XF86VidModeSwitchToMode(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen,
|
||||
displayModes[ i ]
|
||||
);
|
||||
|
||||
/*
|
||||
* Set the viewport's origin to (0,0) (the game mode window's top-left corner)
|
||||
*/
|
||||
XF86VidModeSetViewPort(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen,
|
||||
0,
|
||||
0
|
||||
);
|
||||
|
||||
/*
|
||||
* Return successfull...
|
||||
*/
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Something must have went wrong
|
||||
*/
|
||||
return( FALSE );
|
||||
|
||||
# else
|
||||
# warning fghChangeDisplayMode: missing XFree86 video mode extensions, game mode will not change screen resolution when activated
|
||||
# endif
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
|
||||
guint displayModes = 0, mode = 0xffffffff;
|
||||
gboolean success = FALSE;
|
||||
HDC desktopDC;
|
||||
DEVMODE devMode;
|
||||
|
||||
/*
|
||||
* Enumerate the available display modes
|
||||
*/
|
||||
while( EnumDisplaySettings( NULL, displayModes, &devMode ) == TRUE )
|
||||
{
|
||||
/*
|
||||
* Does the enumerated display mode match the user's preferences?
|
||||
*/
|
||||
if( fghCheckDisplayMode( devMode.dmPelsWidth, devMode.dmPelsHeight,
|
||||
devMode.dmBitsPerPel, fgState.GameModeRefresh ) )
|
||||
{
|
||||
/*
|
||||
* OKi, we've found a matching display mode, remember it's number and break
|
||||
*/
|
||||
mode = displayModes;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Switch to the next display mode, if any
|
||||
*/
|
||||
displayModes++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Did we find a matching display mode?
|
||||
*/
|
||||
if( mode != 0xffffffff )
|
||||
{
|
||||
gint retVal = DISP_CHANGE_SUCCESSFUL;
|
||||
|
||||
/*
|
||||
* Mark the values we want to modify in the display change call
|
||||
*/
|
||||
devMode.dmFields |= DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY;
|
||||
|
||||
/*
|
||||
* Change the current display mode (possibly in test mode only)
|
||||
*/
|
||||
retVal = ChangeDisplaySettings( &devMode, haveToTest ? CDS_TEST : 0 );
|
||||
|
||||
/*
|
||||
* I don't know if it's really needed, but looks nice:
|
||||
*/
|
||||
success = (retVal == DISP_CHANGE_SUCCESSFUL) || (retVal == DISP_CHANGE_NOTUPDATED);
|
||||
|
||||
/*
|
||||
* If it was not a test, remember the current screen settings
|
||||
*/
|
||||
if( !haveToTest && success )
|
||||
{
|
||||
fgState.GameModeSize.X = devMode.dmPelsWidth;
|
||||
fgState.GameModeSize.Y = devMode.dmPelsHeight;
|
||||
fgState.GameModeDepth = devMode.dmBitsPerPel;
|
||||
fgState.GameModeRefresh = devMode.dmDisplayFrequency;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise we must have failed somewhere
|
||||
*/
|
||||
return( success );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Sets the game mode display string
|
||||
*/
|
||||
void FGAPIENTRY glutGameModeString( const gchar* string )
|
||||
{
|
||||
gint width = 640, height = 480, depth = 16, refresh = 72;
|
||||
|
||||
/*
|
||||
* This one seems a bit easier than glutInitDisplayString. The bad thing
|
||||
* about it that I was unable to find the game mode string definition, so
|
||||
* that I assumed it is: "[width]x[height]:[depth]@[refresh rate]", which
|
||||
* appears in all GLUT game mode programs I have seen to date.
|
||||
*/
|
||||
if( sscanf( string, "%ix%i:%i@%i", &width, &height, &depth, &refresh ) != 4 )
|
||||
if( sscanf( string, "%ix%i:%i", &width, &height, &depth ) != 3 )
|
||||
if( sscanf( string, "%ix%i@%i", &width, &height, &refresh ) != 3 )
|
||||
if( sscanf( string, "%ix%i", &width, &height ) != 2 )
|
||||
if( sscanf( string, ":%i@%i", &depth, &refresh ) != 2 )
|
||||
if( sscanf( string, ":%i", &depth ) != 1 )
|
||||
if( sscanf( string, "@%i", &refresh ) != 1 )
|
||||
g_warning( "unable to parse game mode string `%s'", string );
|
||||
|
||||
/*
|
||||
* Hopefully it worked, and if not, we still have the default values
|
||||
*/
|
||||
fgState.GameModeSize.X = width;
|
||||
fgState.GameModeSize.Y = height;
|
||||
fgState.GameModeDepth = depth;
|
||||
fgState.GameModeRefresh = refresh;
|
||||
}
|
||||
|
||||
/*
|
||||
* Enters the game mode
|
||||
*/
|
||||
int FGAPIENTRY glutEnterGameMode( void )
|
||||
{
|
||||
/*
|
||||
* Check if a game mode window already exists...
|
||||
*/
|
||||
if( fgStructure.GameMode != NULL )
|
||||
{
|
||||
/*
|
||||
* ...if so, delete it before proceeding...
|
||||
*/
|
||||
fgDestroyWindow( fgStructure.GameMode, TRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* ...otherwise remember the current resolution, etc.
|
||||
*/
|
||||
fghRememberState();
|
||||
}
|
||||
|
||||
/*
|
||||
* We are ready to change the current screen's resolution now
|
||||
*/
|
||||
if( fghChangeDisplayMode( FALSE ) == FALSE )
|
||||
{
|
||||
g_warning( "failed to change screen settings" );
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
/*
|
||||
* Finally, have the game mode window created
|
||||
*/
|
||||
fgStructure.GameMode = fgCreateWindow(
|
||||
NULL, "FREEGLUT", 0, 0, fgState.GameModeSize.X, fgState.GameModeSize.Y, TRUE
|
||||
);
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
/*
|
||||
* Move the mouse pointer over the game mode window
|
||||
*/
|
||||
XSetInputFocus(
|
||||
fgDisplay.Display,
|
||||
fgStructure.GameMode->Window.Handle,
|
||||
RevertToNone,
|
||||
CurrentTime
|
||||
);
|
||||
|
||||
/*
|
||||
* Confine the mouse pointer to the window's client area
|
||||
*/
|
||||
XGrabPointer(
|
||||
fgDisplay.Display,
|
||||
fgStructure.GameMode->Window.Handle,
|
||||
TRUE,
|
||||
ButtonPressMask|ButtonReleaseMask|ButtonMotionMask|PointerMotionMask,
|
||||
GrabModeAsync, GrabModeAsync,
|
||||
fgStructure.GameMode->Window.Handle,
|
||||
None,
|
||||
CurrentTime
|
||||
);
|
||||
|
||||
/*
|
||||
* Grab the keyboard, too
|
||||
*/
|
||||
XGrabKeyboard(
|
||||
fgDisplay.Display,
|
||||
fgStructure.GameMode->Window.Handle,
|
||||
FALSE,
|
||||
GrabModeAsync, GrabModeAsync,
|
||||
CurrentTime
|
||||
);
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return successfull
|
||||
*/
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
/*
|
||||
* Leaves the game mode
|
||||
*/
|
||||
void FGAPIENTRY glutLeaveGameMode( void )
|
||||
{
|
||||
freeglut_return_if_fail( fgStructure.GameMode != NULL );
|
||||
|
||||
/*
|
||||
* First of all, have the game mode window created
|
||||
*/
|
||||
fgDestroyWindow( fgStructure.GameMode, TRUE );
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
/*
|
||||
* Ungrab the mouse and keyboard
|
||||
*/
|
||||
XUngrabPointer( fgDisplay.Display, CurrentTime );
|
||||
XUngrabKeyboard( fgDisplay.Display, CurrentTime );
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Then, have the desktop visual settings restored
|
||||
*/
|
||||
fghRestoreState();
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns information concerning the freeglut game mode
|
||||
*/
|
||||
int FGAPIENTRY glutGameModeGet( GLenum eWhat )
|
||||
{
|
||||
/*
|
||||
* See why are we bothered
|
||||
*/
|
||||
switch( eWhat )
|
||||
{
|
||||
case GLUT_GAME_MODE_ACTIVE:
|
||||
/*
|
||||
* Check if the game mode is currently active
|
||||
*/
|
||||
return( fgStructure.GameMode != NULL );
|
||||
|
||||
case GLUT_GAME_MODE_POSSIBLE:
|
||||
/*
|
||||
* Check if the current game mode settings are valid
|
||||
*/
|
||||
return( fghChangeDisplayMode( TRUE ) );
|
||||
|
||||
case GLUT_GAME_MODE_WIDTH:
|
||||
/*
|
||||
* The game mode screen width
|
||||
*/
|
||||
return( fgState.GameModeSize.X );
|
||||
|
||||
case GLUT_GAME_MODE_HEIGHT:
|
||||
/*
|
||||
* The game mode screen height
|
||||
*/
|
||||
return( fgState.GameModeSize.Y );
|
||||
|
||||
case GLUT_GAME_MODE_PIXEL_DEPTH:
|
||||
/*
|
||||
* The game mode pixel depth
|
||||
*/
|
||||
return( fgState.GameModeDepth );
|
||||
|
||||
case GLUT_GAME_MODE_REFRESH_RATE:
|
||||
/*
|
||||
* The game mode refresh rate
|
||||
*/
|
||||
return( fgState.GameModeRefresh );
|
||||
|
||||
case GLUT_GAME_MODE_DISPLAY_CHANGED:
|
||||
/*
|
||||
* This is true if the game mode has been activated successfully..
|
||||
*/
|
||||
return( fgStructure.GameMode != NULL );
|
||||
}
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
||||
|
||||
|
||||
|
||||
|
540
freeglut/freeglut/freeglut-1.3/freeglut_geometry.c
Normal file
540
freeglut/freeglut/freeglut-1.3/freeglut_geometry.c
Normal file
@ -0,0 +1,540 @@
|
||||
/*
|
||||
* freeglut_geometry.c
|
||||
*
|
||||
* Freeglut geometry rendering methods.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Fri Dec 3 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-geometry"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* TODO BEFORE THE STABLE RELEASE:
|
||||
*
|
||||
* Following functions have been contributed by Andreas Umbach. I modified
|
||||
* them a bit to make them use GLib (for memory allocation).
|
||||
*
|
||||
* glutWireCube() -- could add normal vectors so that lighting works
|
||||
* glutSolidCube() -- OK
|
||||
* glutWireSphere() -- OK
|
||||
* glutSolidSphere() -- OK
|
||||
*
|
||||
* Following functions have been implemented by me:
|
||||
*
|
||||
* glutWireCone() -- looks OK
|
||||
* glutSolidCone() -- normals are missing, there are holes in the thing
|
||||
*
|
||||
* Those functions need to be implemented, as nothing has been done yet.
|
||||
* For now all of them draw a wire or solid cube, just to mark their presence.
|
||||
*
|
||||
* glutWireTorus() --
|
||||
* glutSolidTorus() --
|
||||
* glutWireDodecahedron() --
|
||||
* glutSolidDodecahedron() --
|
||||
* glutWireOctahedron() --
|
||||
* glutSolidOctahedron() --
|
||||
* glutWireTetrahedron() --
|
||||
* glutSolidTetrahedron() --
|
||||
* glutWireIcosahedron() --
|
||||
* glutSolidIcosahedron() --
|
||||
*/
|
||||
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Draws a wireframed cube. Code contributed by Andreas Umbach <marvin@dataway.ch>
|
||||
*/
|
||||
void FGAPIENTRY glutWireCube( GLdouble dSize )
|
||||
{
|
||||
float size = (float) dSize * 0.5f;
|
||||
|
||||
# define V(a,b,c) glVertex3f( a size, b size, c size );
|
||||
|
||||
/*
|
||||
* PWO: I dared to convert the code to use macros...
|
||||
*/
|
||||
glBegin( GL_LINE_LOOP ); V(-,-,+); V(+,-,+); V(+,+,+); V(-,+,+); glEnd();
|
||||
glBegin( GL_LINE_LOOP ); V(-,-,-); V(-,+,-); V(+,+,-); V(+,-,-); glEnd();
|
||||
glBegin( GL_LINES );
|
||||
V(-,-,+); V(-,-,-); V(-,+,+); V(-,+,-);
|
||||
V(+,-,+); V(+,-,-); V(+,+,+); V(+,+,-);
|
||||
glEnd();
|
||||
|
||||
# undef V
|
||||
}
|
||||
|
||||
/*
|
||||
* Draws a solid cube. Code contributed by Andreas Umbach <marvin@dataway.ch>
|
||||
*/
|
||||
void FGAPIENTRY glutSolidCube( GLdouble dSize )
|
||||
{
|
||||
float size = (float) dSize * 0.5f;
|
||||
|
||||
# define V(a,b,c) glVertex3f( a size, b size, c size );
|
||||
# define N(a,b,c) glNormal3f( a, b, c );
|
||||
|
||||
/*
|
||||
* PWO: Again, I dared to convert the code to use macros...
|
||||
*/
|
||||
glBegin( GL_QUADS );
|
||||
N( 1, 0, 0); V(+,-,+); V(+,-,-); V(+,+,-); V(+,+,+);
|
||||
N( 0, 1, 0); V(+,+,+); V(+,+,-); V(-,+,-); V(-,+,+);
|
||||
N( 0, 0, 1); V(+,+,+); V(-,+,+); V(-,-,+); V(+,-,+);
|
||||
N(-1, 0, 0); V(-,-,+); V(-,+,+); V(-,+,-); V(-,-,-);
|
||||
N( 0,-1, 0); V(-,-,+); V(-,-,-); V(+,-,-); V(+,-,+);
|
||||
N( 0, 0,-1); V(-,-,-); V(-,+,-); V(+,+,-); V(+,-,-);
|
||||
glEnd();
|
||||
|
||||
# undef V
|
||||
# undef N
|
||||
}
|
||||
|
||||
/*
|
||||
* Draws a wire sphere. Code contributed by Andreas Umbach <marvin@dataway.ch>
|
||||
*/
|
||||
void FGAPIENTRY glutWireSphere( GLdouble dRadius, GLint slices, GLint stacks )
|
||||
{
|
||||
float radius = (float) dRadius, phi, psi, dpsi, dphi;
|
||||
float* vertex;
|
||||
gint i, j;
|
||||
|
||||
/*
|
||||
* Allocate the vertices array
|
||||
*/
|
||||
vertex = g_new0( float, 3 * slices * (stacks - 1) );
|
||||
|
||||
glPushMatrix();
|
||||
glScalef( radius, radius, radius );
|
||||
|
||||
dpsi = M_PI / (stacks + 1);
|
||||
dphi = 2 * M_PI / slices;
|
||||
psi = dpsi;
|
||||
|
||||
for( j=0; j<stacks-1; j++ )
|
||||
{
|
||||
phi = 0;
|
||||
|
||||
for( i=0; i<slices; i++ )
|
||||
{
|
||||
*(vertex + 3 * j * slices + 3 * i + 0) = sin( phi ) * sin( psi );
|
||||
*(vertex + 3 * j * slices + 3 * i + 1) = cos( phi ) * sin( psi );
|
||||
*(vertex + 3 * j * slices + 3 * i + 2) = cos( psi );
|
||||
phi += dphi;
|
||||
glVertex3fv( vertex + 3 * j * slices + 3 * i );
|
||||
}
|
||||
|
||||
psi += dpsi;
|
||||
}
|
||||
|
||||
for( i=0; i<slices; i++ )
|
||||
{
|
||||
glBegin( GL_LINE_STRIP );
|
||||
glNormal3f( 0, 0, 1 );
|
||||
glVertex3f( 0, 0, 1 );
|
||||
|
||||
for( j=0; j<stacks - 1; j++ )
|
||||
{
|
||||
glNormal3fv( vertex + 3 * j * slices + 3 * i );
|
||||
glVertex3fv( vertex + 3 * j * slices + 3 * i );
|
||||
}
|
||||
|
||||
glNormal3f(0, 0, -1);
|
||||
glVertex3f(0, 0, -1);
|
||||
glEnd();
|
||||
}
|
||||
|
||||
for( j=0; j<stacks-1; j++ )
|
||||
{
|
||||
glBegin(GL_LINE_LOOP);
|
||||
|
||||
for( i=0; i<slices; i++ )
|
||||
{
|
||||
glNormal3fv( vertex + 3 * j * slices + 3 * i );
|
||||
glVertex3fv( vertex + 3 * j * slices + 3 * i );
|
||||
}
|
||||
|
||||
glEnd();
|
||||
}
|
||||
|
||||
g_free( vertex );
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
/*
|
||||
* Draws a solid sphere. Code contributed by Andreas Umbach <marvin@dataway.ch>
|
||||
*/
|
||||
void FGAPIENTRY glutSolidSphere( GLdouble dRadius, GLint slices, GLint stacks )
|
||||
{
|
||||
float radius = (float) dRadius, phi, psi, dpsi, dphi;
|
||||
float *next, *tmp, *row;
|
||||
gint i, j;
|
||||
|
||||
glPushMatrix();
|
||||
//glScalef( radius, radius, radius );
|
||||
|
||||
row = g_new0( float, slices * 3 );
|
||||
next = g_new0( float, slices * 3 );
|
||||
|
||||
dpsi = M_PI / (stacks + 1);
|
||||
dphi = 2 * M_PI / slices;
|
||||
psi = dpsi;
|
||||
phi = 0;
|
||||
|
||||
/* init first line + do polar cap */
|
||||
glBegin( GL_TRIANGLE_FAN );
|
||||
glNormal3f( 0, 0, 1 );
|
||||
glVertex3f( 0, 0, radius );
|
||||
|
||||
for( i=0; i<slices; i++ )
|
||||
{
|
||||
row[ i * 3 + 0 ] = sin( phi ) * sin( psi );
|
||||
row[ i * 3 + 1 ] = cos( phi ) * sin( psi );
|
||||
row[ i * 3 + 2 ] = cos( psi );
|
||||
|
||||
glNormal3fv( row + 3 * i );
|
||||
glVertex3f(
|
||||
radius * *(row + 3 * i + 0),
|
||||
radius * *(row + 3 * i + 1),
|
||||
radius * *(row + 3 * i + 2)
|
||||
);
|
||||
|
||||
phi += dphi;
|
||||
}
|
||||
|
||||
glNormal3fv( row );
|
||||
glVertex3f( radius * *(row + 0), radius * *(row + 1), radius * *(row + 2) );
|
||||
glEnd();
|
||||
|
||||
for( j=0; j<stacks-1; j++ )
|
||||
{
|
||||
phi = 0;
|
||||
psi += dpsi;
|
||||
|
||||
/* get coords */
|
||||
glBegin( GL_QUAD_STRIP );
|
||||
|
||||
/* glBegin(GL_LINE_LOOP); */
|
||||
for( i=0; i<slices; i++ )
|
||||
{
|
||||
next[ i * 3 + 0 ] = sin( phi ) * sin( psi );
|
||||
next[ i * 3 + 1 ] = cos( phi ) * sin( psi );
|
||||
next[ i * 3 + 2 ] = cos( psi );
|
||||
|
||||
glNormal3fv( row + i * 3 );
|
||||
glVertex3f(
|
||||
radius * *(row + 3 * i + 0),
|
||||
radius * *(row + 3 * i + 1),
|
||||
radius * *(row + 3 * i + 2)
|
||||
);
|
||||
|
||||
glNormal3fv( next + i * 3 );
|
||||
glVertex3f(
|
||||
radius * *(next + 3 * i + 0),
|
||||
radius * *(next + 3 * i + 1),
|
||||
radius * *(next + 3 * i + 2)
|
||||
);
|
||||
|
||||
phi += dphi;
|
||||
}
|
||||
|
||||
glNormal3fv( row );
|
||||
glVertex3f( radius * *(row + 0), radius * *(row + 1), radius * *(row + 2) );
|
||||
glNormal3fv( next );
|
||||
glVertex3f( radius * *(next + 0), radius * *(next + 1), radius * *(next + 2) );
|
||||
glEnd();
|
||||
|
||||
tmp = row;
|
||||
row = next;
|
||||
next = tmp;
|
||||
}
|
||||
|
||||
/* south pole */
|
||||
glBegin( GL_TRIANGLE_FAN );
|
||||
glNormal3f( 0, 0, -1 );
|
||||
glVertex3f( 0, 0, -radius );
|
||||
glNormal3fv( row );
|
||||
glVertex3f( radius * *(row + 0), radius * *(row + 1), radius * *(row + 2) );
|
||||
|
||||
for( i=slices-1; i>=0; i-- )
|
||||
{
|
||||
glNormal3fv(row + 3 * i);
|
||||
glVertex3f(
|
||||
radius * *(row + 3 * i + 0),
|
||||
radius * *(row + 3 * i + 1),
|
||||
radius * *(row + 3 * i + 2)
|
||||
);
|
||||
}
|
||||
|
||||
glEnd();
|
||||
|
||||
g_free(row);
|
||||
g_free(next);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
/*
|
||||
* Draws a wire cone
|
||||
*/
|
||||
void FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLint stacks )
|
||||
{
|
||||
float alt = (float) height / (float) (stacks + 1);
|
||||
float angle = (float) M_PI / (float) slices * 2.0f;
|
||||
float slope = (float) tan( height / base );
|
||||
float* vertices = NULL;
|
||||
gint i, j;
|
||||
|
||||
/*
|
||||
* We need 'slices' points on a circle
|
||||
*/
|
||||
vertices = g_new0( float, 2 * (slices + 1) );
|
||||
|
||||
for( i=0; i<slices+1; i++ )
|
||||
{
|
||||
vertices[ i*2 + 0 ] = cos( angle * i );
|
||||
vertices[ i*2 + 1 ] = sin( angle * i );
|
||||
}
|
||||
|
||||
/*
|
||||
* First the cone's bottom...
|
||||
*/
|
||||
for( i=0; i<slices; i++ )
|
||||
{
|
||||
float scl = height / slope;
|
||||
|
||||
glBegin( GL_LINE_LOOP );
|
||||
glNormal3f( 0, 0, -1 );
|
||||
glVertex3f( vertices[ (i+0)*2+0 ] * scl, vertices[ (i+0)*2+1 ] * scl, 0 );
|
||||
glVertex3f( vertices[ (i+1)*2+0 ] * scl, vertices[ (i+1)*2+1 ] * scl, 0 );
|
||||
glVertex3f( 0, 0, 0 );
|
||||
glEnd();
|
||||
}
|
||||
|
||||
/*
|
||||
* Then all the stacks between the bottom and the top
|
||||
*
|
||||
* ekhm jak wektor normalny z trojkata?
|
||||
*/
|
||||
for( i=0; i<stacks; i++ )
|
||||
{
|
||||
float alt_a = i * alt, alt_b = (i + 1) * alt;
|
||||
float scl_a = (height - alt_a) / slope;
|
||||
float scl_b = (height - alt_b) / slope;
|
||||
|
||||
for( j=0; j<slices; j++ )
|
||||
{
|
||||
glBegin( GL_LINE_LOOP );
|
||||
glVertex3f( vertices[(j+0)*2+0] * scl_a, vertices[(j+0)*2+1] * scl_a, alt_a );
|
||||
glVertex3f( vertices[(j+1)*2+0] * scl_a, vertices[(j+1)*2+1] * scl_a, alt_a );
|
||||
glVertex3f( vertices[(j+0)*2+0] * scl_b, vertices[(j+0)*2+1] * scl_b, alt_b );
|
||||
glEnd();
|
||||
|
||||
glBegin( GL_LINE_LOOP );
|
||||
glVertex3f( vertices[(j+0)*2+0] * scl_b, vertices[(j+0)*2+1] * scl_b, alt_b );
|
||||
glVertex3f( vertices[(j+1)*2+0] * scl_b, vertices[(j+1)*2+1] * scl_b, alt_b );
|
||||
glVertex3f( vertices[(j+1)*2+0] * scl_a, vertices[(j+1)*2+1] * scl_a, alt_a );
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Finally have the top part drawn...
|
||||
*/
|
||||
for( i=0; i<slices; i++ )
|
||||
{
|
||||
float scl = alt / slope;
|
||||
|
||||
glBegin( GL_LINE_LOOP );
|
||||
glVertex3f( vertices[ (i+0)*2+0 ] * scl, vertices[ (i+0)*2+1 ] * scl, height - alt );
|
||||
glVertex3f( vertices[ (i+1)*2+0 ] * scl, vertices[ (i+1)*2+1 ] * scl, height - alt );
|
||||
glVertex3f( 0, 0, height );
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Draws a solid cone
|
||||
*/
|
||||
void FGAPIENTRY glutSolidCone( GLdouble base, GLdouble height, GLint slices, GLint stacks )
|
||||
{
|
||||
float alt = (float) height / (float) (stacks + 1);
|
||||
float angle = (float) M_PI / (float) slices * 2.0f;
|
||||
float slope = (float) tan( height / base );
|
||||
float* vertices = NULL;
|
||||
gint i, j;
|
||||
|
||||
/*
|
||||
* We need 'slices' points on a circle
|
||||
*/
|
||||
vertices = g_new0( float, 2 * (slices + 1) );
|
||||
|
||||
for( i=0; i<slices+1; i++ )
|
||||
{
|
||||
vertices[ i*2 + 0 ] = cos( angle * i );
|
||||
vertices[ i*2 + 1 ] = sin( angle * i );
|
||||
}
|
||||
|
||||
/*
|
||||
* First the cone's bottom...
|
||||
*/
|
||||
for( i=0; i<slices; i++ )
|
||||
{
|
||||
float scl = height / slope;
|
||||
|
||||
glBegin( GL_TRIANGLES );
|
||||
glNormal3f( 0, 0, -1 );
|
||||
glVertex3f( vertices[ (i+0)*2+0 ] * scl, vertices[ (i+0)*2+1 ] * scl, 0 );
|
||||
glVertex3f( vertices[ (i+1)*2+0 ] * scl, vertices[ (i+1)*2+1 ] * scl, 0 );
|
||||
glVertex3f( 0, 0, 0 );
|
||||
glEnd();
|
||||
}
|
||||
|
||||
/*
|
||||
* Then all the stacks between the bottom and the top
|
||||
*
|
||||
* ekhm jak wektor normalny z trojkata?
|
||||
*/
|
||||
for( i=0; i<stacks; i++ )
|
||||
{
|
||||
float alt_a = i * alt, alt_b = (i + 1) * alt;
|
||||
float scl_a = (height - alt_a) / slope;
|
||||
float scl_b = (height - alt_b) / slope;
|
||||
|
||||
for( j=0; j<slices; j++ )
|
||||
{
|
||||
glBegin( GL_TRIANGLES );
|
||||
glVertex3f( vertices[(j+0)*2+0] * scl_a, vertices[(j+0)*2+1] * scl_a, alt_a );
|
||||
glVertex3f( vertices[(j+1)*2+0] * scl_a, vertices[(j+1)*2+1] * scl_a, alt_a );
|
||||
glVertex3f( vertices[(j+0)*2+0] * scl_b, vertices[(j+0)*2+1] * scl_b, alt_b );
|
||||
glEnd();
|
||||
|
||||
glBegin( GL_TRIANGLES );
|
||||
glVertex3f( vertices[(j+1)*2+0] * scl_a, vertices[(j+1)*2+1] * scl_a, alt_a );
|
||||
glVertex3f( vertices[(j+1)*2+0] * scl_b, vertices[(j+1)*2+1] * scl_b, alt_b );
|
||||
glVertex3f( vertices[(j+0)*2+0] * scl_b, vertices[(j+0)*2+1] * scl_b, alt_b );
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Finally have the top part drawn...
|
||||
*/
|
||||
for( i=0; i<slices; i++ )
|
||||
{
|
||||
float scl = alt / slope;
|
||||
|
||||
glBegin( GL_TRIANGLES );
|
||||
glVertex3f( vertices[ (i+0)*2+0 ] * scl, vertices[ (i+0)*2+1 ] * scl, height - alt );
|
||||
glVertex3f( vertices[ (i+1)*2+0 ] * scl, vertices[ (i+1)*2+1 ] * scl, height - alt );
|
||||
glVertex3f( 0, 0, height );
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutWireTorus( GLdouble dInnerRadius, GLdouble dOuterRadius, GLint nSides, GLint nRings )
|
||||
{
|
||||
glutWireSphere( dOuterRadius, 5, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutSolidTorus( GLdouble dInnerRadius, GLdouble dOuterRadius, GLint nSides, GLint nRings )
|
||||
{
|
||||
glutSolidSphere( dOuterRadius, 5, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutWireDodecahedron( void )
|
||||
{
|
||||
glutWireSphere( 1.0, 5, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutSolidDodecahedron( void )
|
||||
{
|
||||
glutSolidSphere( 1.0, 5, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutWireOctahedron( void )
|
||||
{
|
||||
glutWireSphere( 1.0, 5, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutSolidOctahedron( void )
|
||||
{
|
||||
glutSolidSphere( 1.0, 5, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutWireTetrahedron( void )
|
||||
{
|
||||
glutWireSphere( 1.0, 5, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutSolidTetrahedron( void )
|
||||
{
|
||||
glutSolidSphere( 1.0, 5, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutWireIcosahedron( void )
|
||||
{
|
||||
glutWireSphere( 1.0, 5, 5 );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutSolidIcosahedron( void )
|
||||
{
|
||||
glutSolidSphere( 1.0, 5, 5 );
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
925
freeglut/freeglut/freeglut-1.3/freeglut_init.c
Normal file
925
freeglut/freeglut/freeglut-1.3/freeglut_init.c
Normal file
@ -0,0 +1,925 @@
|
||||
/*
|
||||
* freeglut_init.c
|
||||
*
|
||||
* Various freeglut initialization functions.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 2 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-init"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* TODO BEFORE THE STABLE RELEASE:
|
||||
*
|
||||
* fgDeinitialize() -- Win32's OK, X11 needs the OS-specific deinitialization done
|
||||
* glutInitDisplayString() -- display mode string parsing
|
||||
*
|
||||
* Wouldn't it be cool to use gettext() for error messages? I just love bash saying
|
||||
* "nie znaleziono pliku" instead of "file not found" :) Is gettext easily portable?
|
||||
*/
|
||||
|
||||
/* -- GLOBAL VARIABLES ----------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* A structure pointed by g_pDisplay holds all information
|
||||
* regarding the display, screen, root window etc.
|
||||
*/
|
||||
SFG_Display fgDisplay;
|
||||
|
||||
/*
|
||||
* The settings for the current freeglut session
|
||||
*/
|
||||
SFG_State fgState;
|
||||
|
||||
|
||||
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* A call to this function should initialize all the display stuff...
|
||||
*/
|
||||
void fgInitialize( const gchar* displayName )
|
||||
{
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
/*
|
||||
* Have the display created
|
||||
*/
|
||||
fgDisplay.Display = XOpenDisplay( displayName );
|
||||
|
||||
if( fgDisplay.Display == NULL )
|
||||
{
|
||||
/*
|
||||
* Failed to open a display. That's no good.
|
||||
*/
|
||||
g_error( "failed to open display '%s'", XDisplayName( displayName ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for the OpenGL GLX extension availability:
|
||||
*/
|
||||
if( !glXQueryExtension( fgDisplay.Display, NULL, NULL ) )
|
||||
{
|
||||
/*
|
||||
* GLX extensions have not been found...
|
||||
*/
|
||||
g_error( "OpenGL GLX extension not supported by display '%s'", XDisplayName( displayName ) );
|
||||
}
|
||||
|
||||
/*
|
||||
* Grab the default screen for the display we have just opened
|
||||
*/
|
||||
fgDisplay.Screen = DefaultScreen( fgDisplay.Display );
|
||||
|
||||
/*
|
||||
* The same applying to the root window
|
||||
*/
|
||||
fgDisplay.RootWindow = RootWindow(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen
|
||||
);
|
||||
|
||||
/*
|
||||
* Grab the logical screen's geometry
|
||||
*/
|
||||
fgDisplay.ScreenWidth = DisplayWidth(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen
|
||||
);
|
||||
|
||||
fgDisplay.ScreenHeight = DisplayHeight(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen
|
||||
);
|
||||
|
||||
/*
|
||||
* Grab the physical screen's geometry
|
||||
*/
|
||||
fgDisplay.ScreenWidthMM = DisplayWidthMM(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen
|
||||
);
|
||||
|
||||
fgDisplay.ScreenHeightMM = DisplayHeightMM(
|
||||
fgDisplay.Display,
|
||||
fgDisplay.Screen
|
||||
);
|
||||
|
||||
/*
|
||||
* The display's connection number
|
||||
*/
|
||||
fgDisplay.Connection = ConnectionNumber( fgDisplay.Display );
|
||||
|
||||
/*
|
||||
* Create the window deletion atom
|
||||
*/
|
||||
fgDisplay.DeleteWindow = XInternAtom(
|
||||
fgDisplay.Display,
|
||||
"WM_DELETE_WINDOW",
|
||||
FALSE
|
||||
);
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
|
||||
WNDCLASS wc;
|
||||
ATOM atom;
|
||||
|
||||
/*
|
||||
* What we need to do is to initialize the fgDisplay global structure here...
|
||||
*/
|
||||
fgDisplay.Instance = GetModuleHandle( NULL );
|
||||
|
||||
/*
|
||||
* Check if the freeglut window class has been registered before...
|
||||
*/
|
||||
atom = GetClassInfo( fgDisplay.Instance, "FREEGLUT", &wc );
|
||||
|
||||
/*
|
||||
* ...nope, it has not, and we have to do it right now:
|
||||
*/
|
||||
if( atom == 0 )
|
||||
{
|
||||
gboolean retval;
|
||||
|
||||
/*
|
||||
* Make sure the unitialized fields are reset to zero
|
||||
*/
|
||||
ZeroMemory( &wc, sizeof(WNDCLASS) );
|
||||
|
||||
/*
|
||||
* Each of the windows should have it's own device context...
|
||||
*/
|
||||
wc.style = CS_OWNDC;
|
||||
wc.lpfnWndProc = fgWindowProc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = fgDisplay.Instance;
|
||||
wc.hIcon = LoadIcon( NULL, IDI_WINLOGO );
|
||||
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
|
||||
wc.hbrBackground = NULL;
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.lpszClassName = "FREEGLUT";
|
||||
|
||||
/*
|
||||
* Register the window class
|
||||
*/
|
||||
retval = RegisterClass( &wc );
|
||||
g_assert( retval != FALSE );
|
||||
}
|
||||
|
||||
/*
|
||||
* The screen dimensions can be obtained via GetSystemMetrics() calls
|
||||
*/
|
||||
fgDisplay.ScreenWidth = GetSystemMetrics( SM_CXSCREEN );
|
||||
fgDisplay.ScreenHeight = GetSystemMetrics( SM_CYSCREEN );
|
||||
|
||||
{
|
||||
/*
|
||||
* Checking the display's size in millimeters isn't too hard, too:
|
||||
*/
|
||||
HWND desktop = GetDesktopWindow();
|
||||
HDC context = GetDC( desktop );
|
||||
|
||||
/*
|
||||
* Grab the appropriate values now (HORZSIZE and VERTSIZE respectably):
|
||||
*/
|
||||
fgDisplay.ScreenWidthMM = GetDeviceCaps( context, HORZSIZE );
|
||||
fgDisplay.ScreenHeightMM = GetDeviceCaps( context, VERTSIZE );
|
||||
|
||||
/*
|
||||
* Whoops, forgot to release the device context :)
|
||||
*/
|
||||
ReleaseDC( desktop, context );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Have the joystick device initialized now
|
||||
*/
|
||||
fgJoystickInit( 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform the freeglut deinitialization...
|
||||
*/
|
||||
void fgDeinitialize( void )
|
||||
{
|
||||
gint i;
|
||||
|
||||
/*
|
||||
* Check if initialization has been performed before
|
||||
*/
|
||||
if( fgState.Timer == NULL )
|
||||
{
|
||||
g_warning( "fgDeinitialize(): fgState.Timer is null => no valid initialization has been performed" );
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Perform the freeglut structure deinitialization
|
||||
*/
|
||||
fgDestroyStructure();
|
||||
|
||||
/*
|
||||
* Delete all the timers and their storage list
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( fgState.Timers ); i++ )
|
||||
g_free( g_list_nth( fgState.Timers, i )->data );
|
||||
|
||||
g_list_free( fgState.Timers );
|
||||
fgState.Timers = NULL;
|
||||
|
||||
/*
|
||||
* Destroy the timer itself
|
||||
*/
|
||||
g_timer_stop( fgState.Timer );
|
||||
g_timer_destroy( fgState.Timer );
|
||||
fgState.Timer = NULL;
|
||||
|
||||
/*
|
||||
* Deinitialize the joystick device
|
||||
*/
|
||||
fgJoystickClose();
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
/*
|
||||
* Make sure all X-client data we have created will be destroyed on display closing
|
||||
*/
|
||||
XSetCloseDownMode( fgDisplay.Display, DestroyAll );
|
||||
|
||||
/*
|
||||
* Close the display connection, destroying all windows we have created so far
|
||||
*/
|
||||
XCloseDisplay( fgDisplay.Display );
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Perform initialization. This usually happens on the program startup
|
||||
* and restarting after glutMainLoop termination...
|
||||
*/
|
||||
void FGAPIENTRY glutInit( int* pargc, char** argv )
|
||||
{
|
||||
gchar* geometrySettings = NULL;
|
||||
gchar* displayName = NULL;
|
||||
gint i, j, argc = *pargc;
|
||||
|
||||
/*
|
||||
* Do not allow multiple initialization of the library
|
||||
*/
|
||||
if( fgState.Timer != NULL )
|
||||
{
|
||||
/*
|
||||
* We can't have multiple initialization performed
|
||||
*/
|
||||
g_error( "illegal glutInit() reinitialization attemp" );
|
||||
}
|
||||
|
||||
/*
|
||||
* Have the internal freeglut structure initialized now
|
||||
*/
|
||||
fgCreateStructure();
|
||||
|
||||
/*
|
||||
* Fill in the default values that have not been passed in yet.
|
||||
*/
|
||||
if( fgState.Position.Use == FALSE )
|
||||
{
|
||||
fgState.Position.X = -1;
|
||||
fgState.Position.Y = -1;
|
||||
}
|
||||
|
||||
if( fgState.Size.Use == FALSE )
|
||||
{
|
||||
fgState.Size.X = 300;
|
||||
fgState.Size.Y = 300;
|
||||
fgState.Size.Use = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some more settings to come
|
||||
*/
|
||||
fgState.ForceDirectContext = FALSE;
|
||||
fgState.TryDirectContext = TRUE;
|
||||
fgState.ForceIconic = FALSE;
|
||||
fgState.GLDebugSwitch = FALSE;
|
||||
fgState.XSyncSwitch = FALSE;
|
||||
|
||||
/*
|
||||
* Assume we want to ignore the automatic key repeat
|
||||
*/
|
||||
fgState.IgnoreKeyRepeat = TRUE;
|
||||
|
||||
/*
|
||||
* The default display mode to be used
|
||||
*/
|
||||
fgState.DisplayMode = GLUT_RGBA | GLUT_SINGLE | GLUT_DEPTH;
|
||||
|
||||
/*
|
||||
* Set the default game mode settings
|
||||
*/
|
||||
fgState.GameModeSize.X = 640;
|
||||
fgState.GameModeSize.Y = 480;
|
||||
fgState.GameModeDepth = 16;
|
||||
fgState.GameModeRefresh = 72;
|
||||
|
||||
/*
|
||||
* Remember the function's call time
|
||||
*/
|
||||
fgState.Timer = g_timer_new();
|
||||
g_timer_start( fgState.Timer );
|
||||
|
||||
/*
|
||||
* Grab the environment variable indicating the X display to use.
|
||||
* This is harmless under Win32, so let's let it stay here...
|
||||
*/
|
||||
displayName = (gchar *) strdup( (gchar *) g_getenv( "DISPLAY" ) );
|
||||
|
||||
/*
|
||||
* Have the program arguments parsed.
|
||||
*/
|
||||
for( i=1; i<argc; i++ )
|
||||
{
|
||||
/*
|
||||
* The X display name settings
|
||||
*/
|
||||
if( strcmp( argv[ i ], "-display" ) == 0 )
|
||||
{
|
||||
/*
|
||||
* Check for possible lack of the next argument
|
||||
*/
|
||||
if( ++i >= argc )
|
||||
g_error( "-display parameter must be followed by display name" );
|
||||
|
||||
/*
|
||||
* Release the previous display name (the one from app's environment)
|
||||
*/
|
||||
g_free( displayName );
|
||||
|
||||
/*
|
||||
* Make a working copy of the name for us to use
|
||||
*/
|
||||
displayName = strdup( argv[ i ] );
|
||||
|
||||
/*
|
||||
* Have both arguments removed
|
||||
*/
|
||||
argv[ i - 1 ] = NULL;
|
||||
argv[ i ] = NULL;
|
||||
(* pargc) -= 2;
|
||||
}
|
||||
|
||||
/*
|
||||
* The geometry settings
|
||||
*/
|
||||
else if( strcmp( argv[ i ], "-geometry" ) == 0 )
|
||||
{
|
||||
/*
|
||||
* Again, check if there is at least one more argument
|
||||
*/
|
||||
if( ++i >= argc )
|
||||
g_error( "-geometry parameter must be followed by window geometry settings" );
|
||||
|
||||
/*
|
||||
* Otherwise make a duplicate of the geometry settings...
|
||||
*/
|
||||
geometrySettings = strdup( argv[ i ] );
|
||||
|
||||
/*
|
||||
* Have both arguments removed
|
||||
*/
|
||||
argv[ i - 1 ] = NULL;
|
||||
argv[ i ] = NULL;
|
||||
(* pargc) -= 2;
|
||||
}
|
||||
|
||||
/*
|
||||
* The direct/indirect OpenGL contexts settings
|
||||
*/
|
||||
else if( strcmp( argv[ i ], "-direct" ) == 0)
|
||||
{
|
||||
/*
|
||||
* We try to force direct rendering...
|
||||
*/
|
||||
if( fgState.TryDirectContext == FALSE )
|
||||
g_error( "parameters ambiguity, -direct and -indirect cannot be both specified" );
|
||||
|
||||
fgState.ForceDirectContext = TRUE;
|
||||
argv[ i ] = NULL;
|
||||
(* pargc)--;
|
||||
}
|
||||
else if( strcmp( argv[ i ], "-indirect" ) == 0 )
|
||||
{
|
||||
/*
|
||||
* We try to force indirect rendering...
|
||||
*/
|
||||
if( fgState.ForceDirectContext == TRUE )
|
||||
g_error( "parameters ambiguity, -direct and -indirect cannot be both specified" );
|
||||
|
||||
fgState.TryDirectContext = FALSE;
|
||||
argv[ i ] = NULL;
|
||||
(* pargc)--;
|
||||
}
|
||||
|
||||
/*
|
||||
* The '-iconic' parameter makes all new top-level
|
||||
* windows created in iconified state...
|
||||
*/
|
||||
else if( strcmp( argv[ i ], "-iconic" ) == 0 )
|
||||
{
|
||||
fgState.ForceIconic = TRUE;
|
||||
argv[ i ] = NULL;
|
||||
(* pargc)--;
|
||||
}
|
||||
|
||||
/*
|
||||
* The '-gldebug' option activates some OpenGL state debugging features
|
||||
*/
|
||||
else if( strcmp( argv[ i ], "-gldebug" ) == 0 )
|
||||
{
|
||||
fgState.GLDebugSwitch = TRUE;
|
||||
argv[ i ] = NULL;
|
||||
(* pargc)--;
|
||||
}
|
||||
|
||||
/*
|
||||
* The '-sync' option activates X protocol synchronization (for debugging purposes)
|
||||
*/
|
||||
else if( strcmp( argv[ i ], "-sync" ) == 0 )
|
||||
{
|
||||
fgState.XSyncSwitch = TRUE;
|
||||
argv[ i ] = NULL;
|
||||
(* pargc)--;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Have the arguments list compacted now
|
||||
*/
|
||||
for( i=1; i<argc; i++ )
|
||||
{
|
||||
if( argv[ i ] == NULL )
|
||||
{
|
||||
for( j=i; j<argc; j++ )
|
||||
{
|
||||
if( argv[ j ] != NULL )
|
||||
{
|
||||
argv[ i ] = argv[ j ];
|
||||
argv[ j ] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Have the display created now. As I am too lazy to implement
|
||||
* the program arguments parsing, we will have the DISPLAY
|
||||
* environment variable used for opening the X display:
|
||||
*/
|
||||
fgInitialize( displayName );
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
/*
|
||||
* We can process the default window geometry settings safely now
|
||||
*
|
||||
* WARNING: have this rewritten to be portable. That won't be hard.
|
||||
*/
|
||||
if( geometrySettings != NULL )
|
||||
{
|
||||
gint result, x, y, w, h;
|
||||
|
||||
/*
|
||||
* Have the settings parsed now. This is easy.
|
||||
* We will use the XParseGeometry function.
|
||||
*/
|
||||
result = XParseGeometry( geometrySettings, &x, &y, (guint *) &w, (guint *) &h );
|
||||
|
||||
/*
|
||||
* Check what we have been supplied with...
|
||||
*/
|
||||
if( (result & WidthValue) && (w >= 0) )
|
||||
fgState.Size.X = w;
|
||||
|
||||
if( (result & HeightValue) && (h >= 0) )
|
||||
fgState.Size.Y = h;
|
||||
|
||||
if( result & XValue )
|
||||
if( result & XNegative )
|
||||
fgState.Position.X = fgDisplay.ScreenWidth + x - fgState.Size.X;
|
||||
else
|
||||
fgState.Position.X = x;
|
||||
|
||||
if( result & YValue )
|
||||
if( result & YNegative )
|
||||
fgState.Position.Y = fgDisplay.ScreenHeight + y - fgState.Size.Y;
|
||||
else
|
||||
fgState.Position.Y = y;
|
||||
|
||||
/*
|
||||
* Free the geometry settings string
|
||||
*/
|
||||
g_free( geometrySettings );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check for the minus one settings for both position and size...
|
||||
*/
|
||||
if( fgState.Position.X < 0 || fgState.Position.Y < 0 )
|
||||
fgState.Position.Use = FALSE;
|
||||
|
||||
if( fgState.Size.X < 0 || fgState.Size.Y < 0 )
|
||||
fgState.Size.Use = FALSE;
|
||||
|
||||
/*
|
||||
* Do not forget about releasing the display name string
|
||||
*/
|
||||
g_free( displayName );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the default initial window position for new windows
|
||||
*/
|
||||
void FGAPIENTRY glutInitWindowPosition( int x, int y )
|
||||
{
|
||||
/*
|
||||
* The settings can be disables when both coordinates are negative
|
||||
*/
|
||||
if( (x >= 0) && (y >= 0) )
|
||||
{
|
||||
/*
|
||||
* We want to specify the initial position of each of the windows
|
||||
*/
|
||||
fgState.Position.X = x;
|
||||
fgState.Position.Y = y;
|
||||
fgState.Position.Use = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* The initial position of each of the windows is specified by the wm
|
||||
*/
|
||||
fgState.Position.X = -1;
|
||||
fgState.Position.Y = -1;
|
||||
fgState.Position.Use = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the default initial window size for new windows
|
||||
*/
|
||||
void FGAPIENTRY glutInitWindowSize( int width, int height )
|
||||
{
|
||||
/*
|
||||
* The settings can be disables when both values are negative
|
||||
*/
|
||||
if( (width >= 0) && (height >= 0) )
|
||||
{
|
||||
/*
|
||||
* We want to specify the initial size of each of the windows
|
||||
*/
|
||||
fgState.Size.X = width;
|
||||
fgState.Size.Y = height;
|
||||
fgState.Size.Use = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* The initial size of each of the windows is specified by the wm
|
||||
*/
|
||||
fgState.Size.X = -1;
|
||||
fgState.Size.Y = -1;
|
||||
fgState.Size.Use = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the default display mode for all new windows
|
||||
*/
|
||||
void FGAPIENTRY glutInitDisplayMode( int displayMode )
|
||||
{
|
||||
/*
|
||||
* We will make use of this value when creating a new OpenGL context...
|
||||
*/
|
||||
fgState.DisplayMode = displayMode;
|
||||
}
|
||||
|
||||
|
||||
/* -- INIT DISPLAY STRING PARSING ------------------------------------------ */
|
||||
|
||||
/*
|
||||
* There is a discrete number of comparison operators we can encounter:
|
||||
*
|
||||
* comparison ::= "=" | "!=" | "<" | ">" | "<=" | ">=" | "~"
|
||||
*/
|
||||
#define FG_NONE 0x0000
|
||||
#define FG_EQUAL 0x0001
|
||||
#define FG_NOT_EQUAL 0x0002
|
||||
#define FG_LESS 0x0003
|
||||
#define FG_MORE 0x0004
|
||||
#define FG_LESS_OR_EQUAL 0x0005
|
||||
#define FG_MORE_OR_EQUAL 0x0006
|
||||
#define FG_CLOSEST 0x0007
|
||||
|
||||
/*
|
||||
* The caller can feed us with a number of capability tokens:
|
||||
*
|
||||
* capability ::= "alpha" | "acca" | "acc" | "blue" | "buffer" | "conformant" | "depth" | "double" |
|
||||
* "green" | "index" | "num" | "red" | "rgba" | "rgb" | "luminance" | "stencil" |
|
||||
* "single" | "stereo" | "samples" | "slow" | "win32pdf" | "xvisual" | "xstaticgray" |
|
||||
* "xgrayscale" | "xstaticcolor" | "xpseudocolor" | "xtruecolor" | "xdirectcolor"
|
||||
*/
|
||||
static gchar* g_Tokens[] =
|
||||
{
|
||||
"none", "alpha", "acca", "acc", "blue", "buffer", "conformant", "depth", "double", "green",
|
||||
"index", "num", "red", "rgba", "rgb", "luminance", "stencil", "single", "stereo", "samples",
|
||||
"slow", "win32pdf", "xvisual", "xstaticgray", "xgrayscale", "xstaticcolor", "xpseudocolor",
|
||||
"xtruecolor", "xdirectcolor", NULL
|
||||
};
|
||||
|
||||
/*
|
||||
* The structure to hold the parsed display string tokens
|
||||
*/
|
||||
typedef struct tagSFG_Capability SFG_Capability;
|
||||
struct tagSFG_Capability
|
||||
{
|
||||
gint capability; /* the capability token enumerator */
|
||||
gint comparison; /* the comparison operator used */
|
||||
gint value; /* the value we're comparing to */
|
||||
};
|
||||
|
||||
/*
|
||||
* The scanner configuration for the init display string
|
||||
*/
|
||||
static GScannerConfig fgInitDisplayStringScannerConfig =
|
||||
{
|
||||
( " \t\r\n" ) /* cset_skip_characters */,
|
||||
(
|
||||
G_CSET_a_2_z
|
||||
"_"
|
||||
G_CSET_A_2_Z
|
||||
) /* cset_identifier_first */,
|
||||
(
|
||||
G_CSET_a_2_z
|
||||
"_0123456789"
|
||||
G_CSET_A_2_Z
|
||||
G_CSET_LATINS
|
||||
G_CSET_LATINC
|
||||
"<>!=~"
|
||||
) /* cset_identifier_nth */,
|
||||
( "#\n" ) /* cpair_comment_single */,
|
||||
FALSE /* case_sensitive */,
|
||||
TRUE /* skip_comment_multi */,
|
||||
TRUE /* skip_comment_single */,
|
||||
TRUE /* scan_comment_multi */,
|
||||
TRUE /* scan_identifier */,
|
||||
FALSE /* scan_identifier_1char */,
|
||||
FALSE /* scan_identifier_NULL */,
|
||||
TRUE /* scan_symbols */,
|
||||
FALSE /* scan_binary */,
|
||||
TRUE /* scan_octal */,
|
||||
TRUE /* scan_float */,
|
||||
TRUE /* scan_hex */,
|
||||
FALSE /* scan_hex_dollar */,
|
||||
TRUE /* scan_string_sq */,
|
||||
TRUE /* scan_string_dq */,
|
||||
TRUE /* numbers_2_int */,
|
||||
FALSE /* int_2_float */,
|
||||
FALSE /* identifier_2_string */,
|
||||
TRUE /* char_2_token */,
|
||||
FALSE /* symbol_2_token */,
|
||||
FALSE /* scope_0_fallback */,
|
||||
};
|
||||
|
||||
/*
|
||||
* Sets the default display mode for all new windows using a string
|
||||
*/
|
||||
void FGAPIENTRY glutInitDisplayString( char* displayMode )
|
||||
{
|
||||
/*
|
||||
* display_string ::= (switch)
|
||||
* switch ::= capability [comparison value]
|
||||
* comparison ::= "=" | "!=" | "<" | ">" | "<=" | ">=" | "~"
|
||||
* capability ::= "alpha" | "acca" | "acc" | "blue" | "buffer" | "conformant" |
|
||||
* "depth" | "double" | "green" | "index" | "num" | "red" | "rgba" |
|
||||
* "rgb" | "luminance" | "stencil" | "single" | "stereo" |
|
||||
* "samples" | "slow" | "win32pdf" | "xvisual" | "xstaticgray" |
|
||||
* "xgrayscale" | "xstaticcolor" | "xpseudocolor" |
|
||||
* "xtruecolor" | "xdirectcolor"
|
||||
* value ::= 0..9 [value]
|
||||
*
|
||||
* The display string grammar. This should be EBNF, but I couldn't find the definitions so, to
|
||||
* clarify: (expr) means 0 or more times the expression, [expr] means 0 or 1 times expr.
|
||||
*
|
||||
* Create a new GLib lexical analyzer to process the display mode string
|
||||
*/
|
||||
GScanner* scanner = g_scanner_new( &fgInitDisplayStringScannerConfig );
|
||||
GList* caps = NULL;
|
||||
gint i;
|
||||
|
||||
/*
|
||||
* Fail if the display mode string is empty or the scanner failed to initialize
|
||||
*/
|
||||
freeglut_return_if_fail( (scanner != NULL) && (strlen( displayMode ) > 0) );
|
||||
|
||||
/*
|
||||
* Set the scanner's input name (for debugging)
|
||||
*/
|
||||
scanner->input_name = "glutInitDisplayString";
|
||||
|
||||
/*
|
||||
* Start the lexical analysis of the extensions string
|
||||
*/
|
||||
g_scanner_input_text( scanner, displayMode, strlen( displayMode ) );
|
||||
|
||||
/*
|
||||
* While there are any more tokens to be checked...
|
||||
*/
|
||||
while( !g_scanner_eof( scanner ) )
|
||||
{
|
||||
/*
|
||||
* Actually we're expecting only string tokens
|
||||
*/
|
||||
GTokenType tokenType = g_scanner_get_next_token( scanner );
|
||||
|
||||
/*
|
||||
* We are looking for identifiers
|
||||
*/
|
||||
if( tokenType == G_TOKEN_IDENTIFIER )
|
||||
{
|
||||
gchar* capability = NULL; /* the capability identifier string (always present) */
|
||||
gint capID = 0; /* the capability identifier value (from g_Tokens) */
|
||||
gint comparison = 0; /* the comparison operator value, see definitions */
|
||||
gchar* valueString = NULL; /* if the previous one is present, this is needed */
|
||||
gint value = 0; /* the integer value converted using a strtol call */
|
||||
SFG_Capability* capStruct; /* the capability description structure */
|
||||
|
||||
/*
|
||||
* OK. The general rule of thumb that we always should be getting a capability identifier
|
||||
* string (see the grammar description). If it is followed by a comparison identifier, then
|
||||
* there must follow an integer value we're comparing the capability to...
|
||||
*
|
||||
* Have the current token analyzed with that in mind...
|
||||
*/
|
||||
for( i=0; i<(gint) strlen( scanner->value.v_identifier ); i++ )
|
||||
{
|
||||
gchar c = scanner->value.v_identifier[ i ];
|
||||
|
||||
if( (c == '=') || (c == '!') || (c == '<') || (c == '>') || (c == '~') )
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Here we go with the length of the capability identifier string.
|
||||
* In the worst of cases, it is as long as the token identifier.
|
||||
*/
|
||||
capability = g_strndup( scanner->value.v_identifier, i );
|
||||
|
||||
/*
|
||||
* OK. Is there a chance for comparison and value identifiers to follow?
|
||||
* Note: checking against i+1 as this handles two cases: single character
|
||||
* comparison operator and first of value's digits, which must always be
|
||||
* there, or the two-character comparison operators.
|
||||
*/
|
||||
if( (i + 1) < (gint) strlen( scanner->value.v_identifier ) )
|
||||
{
|
||||
/*
|
||||
* Yeah, indeed, it is the i-th character to start the identifier, then.
|
||||
*/
|
||||
gchar c1 = scanner->value.v_identifier[ i + 0 ];
|
||||
gchar c2 = scanner->value.v_identifier[ i + 1 ];
|
||||
|
||||
if( (c1 == '=') ) { i += 1; comparison = FG_EQUAL; } else
|
||||
if( (c1 == '!') && (c2 == '=') ) { i += 2; comparison = FG_NOT_EQUAL; } else
|
||||
if( (c1 == '<') && (c2 == '=') ) { i += 2; comparison = FG_LESS_OR_EQUAL; } else
|
||||
if( (c1 == '>') && (c2 == '=') ) { i += 2; comparison = FG_MORE_OR_EQUAL; } else
|
||||
if( (c1 == '<') ) { i += 1; comparison = FG_LESS; } else
|
||||
if( (c1 == '>') ) { i += 1; comparison = FG_MORE; } else
|
||||
if( (c1 == '~') ) { i += 1; comparison = FG_CLOSEST; } else
|
||||
g_warning( "invalid comparison operator in token `%s'", scanner->value.v_identifier );
|
||||
}
|
||||
|
||||
/*
|
||||
* Grab the value string that must follow the comparison operator...
|
||||
*/
|
||||
if( comparison != FG_NONE && i < (gint) strlen( scanner->value.v_identifier ) )
|
||||
valueString = g_strdup( scanner->value.v_identifier + i );
|
||||
|
||||
/*
|
||||
* If there was a value string, convert it to integer...
|
||||
*/
|
||||
if( comparison != FG_NONE && strlen( valueString ) > 0 )
|
||||
value = strtol( valueString, NULL, 0 );
|
||||
|
||||
/*
|
||||
* Now we need to match the capability string and it's ID
|
||||
*/
|
||||
for( i=0; g_Tokens[ i ]!=NULL; i++ )
|
||||
{
|
||||
if( strcmp( capability, g_Tokens[ i ] ) == 0 )
|
||||
{
|
||||
/*
|
||||
* Looks like we've found the one we were looking for
|
||||
*/
|
||||
capID = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a new capability description structure
|
||||
*/
|
||||
capStruct = g_new0( SFG_Capability, 1 );
|
||||
|
||||
/*
|
||||
* Fill in the cap's values, as we have parsed it:
|
||||
*/
|
||||
capStruct->capability = capID;
|
||||
capStruct->comparison = comparison;
|
||||
capStruct->value = value;
|
||||
|
||||
/*
|
||||
* Add the new capabaility to the caps list
|
||||
*/
|
||||
caps = g_list_append( caps, capStruct );
|
||||
|
||||
/*
|
||||
* Clean up the local mess and keep rolling on
|
||||
*/
|
||||
g_free( valueString );
|
||||
g_free( capability );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Now that we have converted the string into somewhat more machine-friendly
|
||||
* form, proceed with matching the frame buffer configuration...
|
||||
*
|
||||
* The caps list could be passed to a function that would try finding the closest
|
||||
* matching pixel format, visual, frame buffer configuration or whatever. It would
|
||||
* be good to convert the glutInitDisplayMode() to use the same method.
|
||||
*/
|
||||
#if 0
|
||||
g_message( "found %i capability preferences", g_list_length( caps ) );
|
||||
|
||||
g_message( "token `%s': cap: %i, com: %i, val: %i",
|
||||
scanner->value.v_identifier,
|
||||
capStruct->capability,
|
||||
capStruct->comparison,
|
||||
capStruct->value
|
||||
);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Free the capabilities we have parsed
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( caps ); i++ )
|
||||
g_free( g_list_nth( caps, i )->data );
|
||||
|
||||
/*
|
||||
* Destroy the capabilities list itself
|
||||
*/
|
||||
g_list_free( caps );
|
||||
|
||||
/*
|
||||
* Free the lexical scanner now...
|
||||
*/
|
||||
g_scanner_destroy( scanner );
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
||||
|
||||
|
||||
|
||||
|
||||
|
603
freeglut/freeglut/freeglut-1.3/freeglut_joystick.c
Normal file
603
freeglut/freeglut/freeglut-1.3/freeglut_joystick.c
Normal file
@ -0,0 +1,603 @@
|
||||
/*
|
||||
* freeglut_joystick.c
|
||||
*
|
||||
* Joystick handling code
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Steve Baker, <sjbaker1@airmail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* PWO: this is not exactly what Steve Baker has done for PLIB, as I had to convert
|
||||
* it from C++ to C. And I've also reformatted it a bit (that's my little
|
||||
* personal deviation :]) I don't really know if it is still portable...
|
||||
* Steve: could you please add some comments to the code? :)
|
||||
*
|
||||
* FreeBSD port - courtesy of Stephen Montgomery-Smith <stephen@math.missouri.edu>
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-joystick"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* PWO: I don't like it at all. It's a mess. Could it be cleared?
|
||||
*/
|
||||
#ifdef WIN32
|
||||
# include <windows.h>
|
||||
# if defined( __CYGWIN32__ ) || defined( __CYGWIN__ )
|
||||
# define NEAR /* */
|
||||
# define FAR /* */
|
||||
# endif
|
||||
# include <mmsystem.h>
|
||||
# include <string.h>
|
||||
#else
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
# ifdef __FreeBSD__
|
||||
# include <machine/joystick.h>
|
||||
# define JS_DATA_TYPE joystick
|
||||
# define JS_RETURN (sizeof(struct JS_DATA_TYPE))
|
||||
# elif defined(__linux__)
|
||||
# include <sys/ioctl.h>
|
||||
# include <linux/joystick.h>
|
||||
# include <errno.h>
|
||||
|
||||
/*
|
||||
* Check the joystick driver version
|
||||
*/
|
||||
# ifdef JS_VERSION
|
||||
# if JS_VERSION >= 0x010000
|
||||
# define JS_NEW
|
||||
# endif
|
||||
# endif
|
||||
# else
|
||||
# ifndef JS_DATA_TYPE
|
||||
|
||||
/*
|
||||
* Not Windoze and no joystick driver...
|
||||
*
|
||||
* Well - we'll put these values in and that should
|
||||
* allow the code to at least compile. The JS open
|
||||
* routine should error out and shut off all the code
|
||||
* downstream anyway
|
||||
*/
|
||||
struct JS_DATA_TYPE
|
||||
{
|
||||
int buttons;
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
# define JS_RETURN (sizeof(struct JS_DATA_TYPE))
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
# define _JS_MAX_AXES 6
|
||||
#else
|
||||
# ifdef __FreeBSD__
|
||||
# define _JS_MAX_AXES 2
|
||||
# else
|
||||
# define _JS_MAX_AXES 6
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct tagSFG_Joystick SFG_Joystick;
|
||||
struct tagSFG_Joystick
|
||||
{
|
||||
#ifdef __FreeBSD__
|
||||
gint id;
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
JOYINFOEX js;
|
||||
UINT js_id;
|
||||
#else
|
||||
# ifdef JS_NEW
|
||||
struct js_event js;
|
||||
gint tmp_buttons;
|
||||
float tmp_axes[ _JS_MAX_AXES ];
|
||||
# else
|
||||
JS_DATA_TYPE js;
|
||||
# endif
|
||||
|
||||
gchar fname[ 128 ];
|
||||
gint fd;
|
||||
#endif
|
||||
|
||||
gboolean error;
|
||||
gint num_axes;
|
||||
gint num_buttons;
|
||||
|
||||
float dead_band[ _JS_MAX_AXES ];
|
||||
float saturate [ _JS_MAX_AXES ];
|
||||
float center [ _JS_MAX_AXES ];
|
||||
float max [ _JS_MAX_AXES ];
|
||||
float min [ _JS_MAX_AXES ];
|
||||
};
|
||||
|
||||
/*
|
||||
* The static joystick structure pointer
|
||||
*/
|
||||
static SFG_Joystick* fgJoystick = NULL;
|
||||
|
||||
/*
|
||||
* Read the raw joystick data
|
||||
*/
|
||||
static void fghJoystickRawRead ( SFG_Joystick* joy, gint* buttons, float* axes )
|
||||
{
|
||||
#ifdef WIN32
|
||||
MMRESULT status;
|
||||
#else
|
||||
gint status;
|
||||
#endif
|
||||
|
||||
gint i;
|
||||
|
||||
if( joy->error )
|
||||
{
|
||||
if( buttons )
|
||||
*buttons = 0 ;
|
||||
|
||||
if( axes )
|
||||
for( i=0; i<joy->num_axes; i++ )
|
||||
axes[ i ] = 1500.0f;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
status = joyGetPosEx( joy->js_id, &joy->js );
|
||||
|
||||
if( status != JOYERR_NOERROR )
|
||||
{
|
||||
joy->error = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
if( buttons )
|
||||
*buttons = (int) joy->js.dwButtons;
|
||||
|
||||
if( axes )
|
||||
{
|
||||
/*
|
||||
* WARNING - Fall through case clauses!!
|
||||
*/
|
||||
switch( joy->num_axes )
|
||||
{
|
||||
case 6: axes[5] = (float) joy->js.dwVpos;
|
||||
case 5: axes[4] = (float) joy->js.dwUpos;
|
||||
case 4: axes[3] = (float) joy->js.dwRpos;
|
||||
case 3: axes[2] = (float) joy->js.dwZpos;
|
||||
case 2: axes[1] = (float) joy->js.dwYpos;
|
||||
case 1: axes[0] = (float) joy->js.dwXpos;
|
||||
}
|
||||
}
|
||||
#else
|
||||
# ifdef JS_NEW
|
||||
|
||||
while( 1 )
|
||||
{
|
||||
gint status = read( joy->fd, &joy->js, sizeof(struct js_event) );
|
||||
|
||||
if( status != sizeof(struct js_event) )
|
||||
{
|
||||
if( errno == EAGAIN )
|
||||
{
|
||||
/*
|
||||
* Use the old values
|
||||
*/
|
||||
if( buttons ) *buttons = joy->tmp_buttons;
|
||||
if( axes ) memcpy( axes, joy->tmp_axes, sizeof(float) * joy->num_axes );
|
||||
return;
|
||||
}
|
||||
|
||||
g_warning( joy->fname );
|
||||
joy->error = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
switch( joy->js.type & ~JS_EVENT_INIT )
|
||||
{
|
||||
case JS_EVENT_BUTTON:
|
||||
if ( joy->js.value == 0 ) /* clear the flag */
|
||||
joy->tmp_buttons &= ~(1 << joy->js.number);
|
||||
else
|
||||
joy->tmp_buttons |= (1 << joy->js.number);
|
||||
break;
|
||||
|
||||
case JS_EVENT_AXIS:
|
||||
joy->tmp_axes[ joy->js.number ] = (float) joy->js.value;
|
||||
|
||||
if( axes )
|
||||
memcpy( axes, joy->tmp_axes, sizeof(float) * joy->num_axes );
|
||||
break;
|
||||
}
|
||||
|
||||
if( buttons )
|
||||
*buttons = joy->tmp_buttons;
|
||||
}
|
||||
# else
|
||||
|
||||
status = read( joy->fd, &joy->js, JS_RETURN );
|
||||
|
||||
if( status != JS_RETURN )
|
||||
{
|
||||
g_warning( fname );
|
||||
joy->error = TRUE;
|
||||
return;
|
||||
}
|
||||
|
||||
if( buttons )
|
||||
# ifdef __FreeBSD__
|
||||
*buttons = (joy->js.b1 ? 1 : 0) | (joy->js.b2 ? 2 : 0);
|
||||
# else
|
||||
*buttons = joy->js.buttons;
|
||||
# endif
|
||||
|
||||
if( axes )
|
||||
{
|
||||
axes[ 0 ] = (float) joy->js.x;
|
||||
axes[ 1 ] = (float) joy->js.y;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Correct the joystick axis data
|
||||
*/
|
||||
static float fghJoystickFudgeAxis( SFG_Joystick* joy, float value, gint axis )
|
||||
{
|
||||
if( value < joy->center[ axis ] )
|
||||
{
|
||||
float xx = (value - joy->center[ axis ]) / (joy->center[ axis ] - joy->min[ axis ]);
|
||||
|
||||
if( xx < -joy->saturate[ axis ] )
|
||||
return( -1.0f );
|
||||
|
||||
if( xx > -joy->dead_band [ axis ] )
|
||||
return( 0.0f );
|
||||
|
||||
xx = (xx + joy->dead_band[ axis ]) / (joy->saturate[ axis ] - joy->dead_band[ axis ]);
|
||||
|
||||
return( ( xx < -1.0f ) ? -1.0f : xx );
|
||||
}
|
||||
else
|
||||
{
|
||||
float xx = (value - joy->center [ axis ]) / (joy->max[ axis ] - joy->center[ axis ]);
|
||||
|
||||
if( xx > joy->saturate[ axis ] )
|
||||
return 1.0f ;
|
||||
|
||||
if( xx < joy->dead_band[ axis ] )
|
||||
return 0.0f ;
|
||||
|
||||
xx = (xx - joy->dead_band[ axis ]) / (joy->saturate[ axis ] - joy->dead_band[ axis ]);
|
||||
|
||||
return( ( xx > 1.0f ) ? 1.0f : xx );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Read the corrected joystick data
|
||||
*/
|
||||
static void fghJoystickRead( SFG_Joystick* joy, gint* buttons, float* axes )
|
||||
{
|
||||
float raw_axes[ _JS_MAX_AXES ];
|
||||
gint i;
|
||||
|
||||
if( joy->error )
|
||||
{
|
||||
if( buttons )
|
||||
*buttons = 0;
|
||||
|
||||
if( axes )
|
||||
for ( i=0; i<joy->num_axes ; i++ )
|
||||
axes[ i ] = 0.0f ;
|
||||
}
|
||||
|
||||
fghJoystickRawRead( joy, buttons, raw_axes );
|
||||
|
||||
if( axes )
|
||||
for( i=0 ; i<joy->num_axes ; i++ )
|
||||
axes[ i ] = fghJoystickFudgeAxis( joy, raw_axes[ i ], i );
|
||||
}
|
||||
|
||||
/*
|
||||
* Happy happy happy joy joy joy (happy new year toudi :D)
|
||||
*/
|
||||
static void fghJoystickOpen( SFG_Joystick* joy )
|
||||
{
|
||||
#ifdef WIN32
|
||||
JOYCAPS jsCaps;
|
||||
gint i;
|
||||
|
||||
joy->js.dwFlags = JOY_RETURNALL;
|
||||
joy->js.dwSize = sizeof( joy->js );
|
||||
|
||||
memset( &jsCaps, 0, sizeof(jsCaps) );
|
||||
|
||||
joy->error = (joyGetDevCaps( joy->js_id, &jsCaps, sizeof(jsCaps) ) != JOYERR_NOERROR);
|
||||
joy->num_axes = (jsCaps.wNumAxes < _JS_MAX_AXES ) ? jsCaps.wNumAxes : _JS_MAX_AXES;
|
||||
|
||||
/*
|
||||
* WARNING - Fall through case clauses!!
|
||||
*/
|
||||
switch( joy->num_axes )
|
||||
{
|
||||
case 6 : joy->min[ 5 ] = (float) jsCaps.wVmin; joy->max[ 5 ] = (float) jsCaps.wVmax;
|
||||
case 5 : joy->min[ 4 ] = (float) jsCaps.wUmin; joy->max[ 4 ] = (float) jsCaps.wUmax;
|
||||
case 4 : joy->min[ 3 ] = (float) jsCaps.wRmin; joy->max[ 3 ] = (float) jsCaps.wRmax;
|
||||
case 3 : joy->min[ 2 ] = (float) jsCaps.wZmin; joy->max[ 2 ] = (float) jsCaps.wZmax;
|
||||
case 2 : joy->min[ 1 ] = (float) jsCaps.wYmin; joy->max[ 1 ] = (float) jsCaps.wYmax;
|
||||
case 1 : joy->min[ 0 ] = (float) jsCaps.wXmin; joy->max[ 0 ] = (float) jsCaps.wXmax; break;
|
||||
|
||||
/*
|
||||
* I guess we have no axes at all
|
||||
*/
|
||||
default: joy->error = TRUE; break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Guess all the rest judging on the axes extremals
|
||||
*/
|
||||
for( i=0 ; i<joy->num_axes ; i++ )
|
||||
{
|
||||
joy->center [ i ] = (joy->max[i] + joy->min[i]) * 0.5f;
|
||||
joy->dead_band[ i ] = 0.0f;
|
||||
joy->saturate [ i ] = 1.0f;
|
||||
}
|
||||
|
||||
#else
|
||||
# ifdef __FreeBSD__
|
||||
gint buttons[ _JS_MAX_AXES ];
|
||||
float axes[ _JS_MAX_AXES ];
|
||||
gint noargs, in_no_axes;
|
||||
gchar joyfname[ 1024 ];
|
||||
FILE* joyfile;
|
||||
# endif
|
||||
|
||||
gint i, counter;
|
||||
|
||||
/*
|
||||
* Default for older Linux systems.
|
||||
*/
|
||||
joy->num_axes = 2;
|
||||
joy->num_buttons = 32;
|
||||
|
||||
# ifdef JS_NEW
|
||||
for( i=0 ; i<_JS_MAX_AXES ; i++ )
|
||||
joy->tmp_axes[ i ] = 0.0f ;
|
||||
|
||||
joy->tmp_buttons = 0 ;
|
||||
# endif
|
||||
|
||||
joy->fd = open( joy->fname, O_RDONLY );
|
||||
|
||||
joy->error = (joy->fd < 0);
|
||||
|
||||
if( joy->error )
|
||||
return;
|
||||
|
||||
# ifdef __FreeBSD__
|
||||
fghJoystickRawRead( buttons, axes );
|
||||
joy->error = axes[ 0 ] < -1000000000.0f;
|
||||
if( joy->error )
|
||||
return ;
|
||||
|
||||
sprintf( joyfname, "%s/.joy%drc", g_getenv( "HOME" ), id );
|
||||
|
||||
joyfile = fopen( joyfname, "r" );
|
||||
joy->error = (joyfile == NULL);
|
||||
if( joy->error )
|
||||
return;
|
||||
|
||||
noargs = fscanf(
|
||||
joyfile, "%d%f%f%f%f%f%f",
|
||||
&in_no_axes,
|
||||
&joy->min[ 0 ], &joy->center[ 0 ], &joy->max[ 0 ],
|
||||
&joy->min[ 1 ], &joy->center[ 1 ], &joy->max[ 1 ]
|
||||
);
|
||||
|
||||
joy->error = (noargs != 7) || (in_no_axes != _JS_MAX_AXES);
|
||||
fclose( joyfile );
|
||||
if( joy->error )
|
||||
return;
|
||||
|
||||
for( i=0 ; i<_JS_MAX_AXES ; i++ )
|
||||
{
|
||||
dead_band[ i ] = 0.0f;
|
||||
saturate [ i ] = 1.0f;
|
||||
}
|
||||
# else
|
||||
|
||||
/*
|
||||
* Set the correct number of axes for the linux driver
|
||||
*/
|
||||
# ifdef JS_NEW
|
||||
ioctl( joy->fd, JSIOCGAXES , &joy->num_axes );
|
||||
ioctl( joy->fd, JSIOCGBUTTONS, &joy->num_buttons );
|
||||
fcntl( joy->fd, F_SETFL, O_NONBLOCK );
|
||||
|
||||
# endif
|
||||
|
||||
/*
|
||||
* The Linux driver seems to return 512 for all axes
|
||||
* when no stick is present - but there is a chance
|
||||
* that could happen by accident - so it's gotta happen
|
||||
* on both axes for at least 100 attempts.
|
||||
*
|
||||
* PWO: shouldn't be that done somehow wiser on the kernel level?
|
||||
*/
|
||||
# ifndef JS_NEW
|
||||
counter = 0 ;
|
||||
|
||||
do
|
||||
{
|
||||
fghJoystickRawRead( joy, NULL, center );
|
||||
counter++;
|
||||
} while( !joy->error && counter < 100 && center[ 0 ] == 512.0f && center[ 1 ] == 512.0f );
|
||||
|
||||
if( counter >= 100 )
|
||||
joy->error = TRUE;
|
||||
# endif
|
||||
|
||||
for( i=0 ; i<_JS_MAX_AXES ; i++ )
|
||||
{
|
||||
# ifdef JS_NEW
|
||||
joy->max [ i ] = 32767.0f;
|
||||
joy->center[ i ] = 0.0f;
|
||||
joy->min [ i ] = -32767.0f;
|
||||
# else
|
||||
joy->max[ i ] = center[ i ] * 2.0f;
|
||||
joy->min[ i ] = 0.0f;
|
||||
# endif
|
||||
joy->dead_band[ i ] = 0.0f ;
|
||||
joy->saturate [ i ] = 1.0f ;
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void fgJoystickInit( gint ident )
|
||||
{
|
||||
/*
|
||||
* Make sure we don't get reinitialized
|
||||
*/
|
||||
if( fgJoystick != NULL )
|
||||
g_error( "illegal attemp to initialize joystick device" );
|
||||
|
||||
/*
|
||||
* Have the global joystick structure created
|
||||
*/
|
||||
fgJoystick = g_new0( SFG_Joystick, 1 );
|
||||
|
||||
#ifdef WIN32
|
||||
switch( ident )
|
||||
{
|
||||
case 0: fgJoystick->js_id = JOYSTICKID1; fghJoystickOpen( fgJoystick ); break;
|
||||
case 1: fgJoystick->js_id = JOYSTICKID2; fghJoystickOpen( fgJoystick ); break;
|
||||
default: fgJoystick->num_axes = 0; fgJoystick->error = TRUE; break;
|
||||
}
|
||||
#else
|
||||
|
||||
# ifdef __FreeBSD__
|
||||
fgJoystick->id = ident;
|
||||
sprintf( fgJoystick->fname, "/dev/joy%d", ident );
|
||||
# else
|
||||
sprintf( fgJoystick->fname, "/dev/js%d", ident );
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Let's try opening the joystick device now:
|
||||
*/
|
||||
fghJoystickOpen( fgJoystick );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void fgJoystickClose( void )
|
||||
{
|
||||
if( fgJoystick == NULL )
|
||||
g_error( "illegal attempt to deinitialize joystick device" );
|
||||
|
||||
#ifndef WIN32
|
||||
if( fgJoystick->error != TRUE )
|
||||
close( fgJoystick->fd );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Polls the joystick and executes the joystick callback hooked to the
|
||||
* window specified in the function's parameter:
|
||||
*/
|
||||
void fgJoystickPollWindow( SFG_Window* window )
|
||||
{
|
||||
float axes[ _JS_MAX_AXES ];
|
||||
gint buttons;
|
||||
|
||||
/*
|
||||
* Make sure the joystick device is initialized, the window seems valid
|
||||
* and that there is a joystick callback hooked to it:
|
||||
*/
|
||||
freeglut_return_if_fail( fgJoystick == NULL || window == NULL );
|
||||
freeglut_return_if_fail( window->Callbacks.Joystick == NULL );
|
||||
|
||||
/*
|
||||
* Poll the joystick now:
|
||||
*/
|
||||
fghJoystickRead( fgJoystick, &buttons, axes );
|
||||
|
||||
/*
|
||||
* Execute the freeglut joystick callback now
|
||||
*/
|
||||
window->Callbacks.Joystick(
|
||||
buttons,
|
||||
(gint) (axes[ 0 ] * 1000.0f),
|
||||
(gint) (axes[ 1 ] * 1000.0f),
|
||||
(gint) (axes[ 2 ] * 1000.0f)
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* PWO: These jsJoystick class methods have not been implemented.
|
||||
* We might consider adding such functions to freeglut-2.0.
|
||||
*/
|
||||
#if 0
|
||||
int getNumAxes () { return num_axes ; }
|
||||
int notWorking () { return error ; }
|
||||
|
||||
float getDeadBand ( int axis ) { return dead_band [ axis ] ; }
|
||||
void setDeadBand ( int axis, float db ) { dead_band [ axis ] = db ; }
|
||||
|
||||
float getSaturation ( int axis ) { return saturate [ axis ] ; }
|
||||
void setSaturation ( int axis, float st ) { saturate [ axis ] = st ; }
|
||||
|
||||
void setMinRange ( float *axes ) { memcpy ( min , axes, num_axes * sizeof(float) ) ; }
|
||||
void setMaxRange ( float *axes ) { memcpy ( max , axes, num_axes * sizeof(float) ) ; }
|
||||
void setCenter ( float *axes ) { memcpy ( center, axes, num_axes * sizeof(float) ) ; }
|
||||
|
||||
void getMinRange ( float *axes ) { memcpy ( axes, min , num_axes * sizeof(float) ) ; }
|
||||
void getMaxRange ( float *axes ) { memcpy ( axes, max , num_axes * sizeof(float) ) ; }
|
||||
void getCenter ( float *axes ) { memcpy ( axes, center, num_axes * sizeof(float) ) ; }
|
||||
#endif
|
||||
|
||||
/*** END OF FILE ***/
|
||||
|
||||
|
||||
|
||||
|
1294
freeglut/freeglut/freeglut-1.3/freeglut_main.c
Normal file
1294
freeglut/freeglut/freeglut-1.3/freeglut_main.c
Normal file
File diff suppressed because it is too large
Load Diff
808
freeglut/freeglut/freeglut-1.3/freeglut_menu.c
Normal file
808
freeglut/freeglut/freeglut-1.3/freeglut_menu.c
Normal file
@ -0,0 +1,808 @@
|
||||
/*
|
||||
* freeglut_menu.c
|
||||
*
|
||||
* Pull-down menu creation and handling.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 16 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-menu"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* TODO BEFORE THE STABLE RELEASE:
|
||||
*
|
||||
* It would be cool if the submenu entries were somehow marked, for example with a dings
|
||||
* on the right menu border or something like that. Think about the possibility of doing
|
||||
* the menu on layers *or* using the native window system instead of OpenGL.
|
||||
*/
|
||||
|
||||
/* -- DEFINITIONS ---------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* We'll be using freeglut fonts to draw the menu
|
||||
*/
|
||||
#define FREEGLUT_MENU_FONT GLUT_BITMAP_8_BY_13
|
||||
#define FREEGLUT_MENU_HEIGHT 15
|
||||
|
||||
|
||||
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Private static function to check for the current menu/sub menu activity state
|
||||
*/
|
||||
static gboolean fghCheckMenuStatus( SFG_Menu* menu )
|
||||
{
|
||||
SFG_Window* window = fgStructure.Window;
|
||||
gint i, x, y;
|
||||
|
||||
/*
|
||||
* First of all check any of the active sub menus...
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( menu->Entries ); i++ )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = (SFG_MenuEntry *) g_list_nth( menu->Entries, i )->data;
|
||||
|
||||
/*
|
||||
* Is that an active sub menu by any case?
|
||||
*/
|
||||
if( menuEntry->SubMenu != NULL && menuEntry->IsActive == TRUE )
|
||||
{
|
||||
/*
|
||||
* OKi, have the sub-menu checked, too. If it returns TRUE, it will mean
|
||||
* that it caught the mouse cursor and we do not need to regenerate
|
||||
* the activity list, and so our parents do...
|
||||
*/
|
||||
if( fghCheckMenuStatus( menuEntry->SubMenu ) == TRUE )
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* That much about our sub menus, let's get to checking the current menu:
|
||||
*/
|
||||
x = window->State.MouseX - menu->X;
|
||||
y = window->State.MouseY - menu->Y;
|
||||
|
||||
/*
|
||||
* Mark all menu entries inactive...
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( menu->Entries ); i++ )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = (SFG_MenuEntry *) g_list_nth( menu->Entries, i )->data;
|
||||
|
||||
menuEntry->IsActive = FALSE;
|
||||
}
|
||||
|
||||
menu->IsActive = FALSE;
|
||||
|
||||
/*
|
||||
* Check if the mouse cursor is contained within the current menu box
|
||||
*/
|
||||
if( x >= 0 && x < menu->Width && y >= 0 && y < menu->Height )
|
||||
{
|
||||
/*
|
||||
* Calculation of the highlighted menu item is easy enough now:
|
||||
*/
|
||||
gint menuID = y / FREEGLUT_MENU_HEIGHT;
|
||||
|
||||
/*
|
||||
* The mouse cursor is somewhere over our box, check it out.
|
||||
*/
|
||||
SFG_MenuEntry* menuEntry = (SFG_MenuEntry *) g_list_nth( menu->Entries, menuID )->data;
|
||||
g_assert( menuEntry != NULL );
|
||||
|
||||
/*
|
||||
* Mark the menu as active...
|
||||
*/
|
||||
menuEntry->IsActive = TRUE;
|
||||
menuEntry->Ordinal = menuID;
|
||||
|
||||
/*
|
||||
* Don't forget about marking the current menu as active, too:
|
||||
*/
|
||||
menu->IsActive = TRUE;
|
||||
|
||||
/*
|
||||
* OKi, we have marked that entry as active, but it would be also
|
||||
* nice to have it's contents updated, in case it's a sub menu.
|
||||
* Also, ignore the return value of the check function:
|
||||
*/
|
||||
if( menuEntry->SubMenu != NULL )
|
||||
{
|
||||
gint x = window->State.MouseX;
|
||||
gint y = window->State.MouseY;
|
||||
|
||||
/*
|
||||
* Set up the initial menu position now...
|
||||
*/
|
||||
|
||||
if( x > 15 ) menuEntry->SubMenu->X = x - 15; else menuEntry->SubMenu->X = 15;
|
||||
if( y > 15 ) menuEntry->SubMenu->Y = y - 15; else menuEntry->SubMenu->Y = 15;
|
||||
|
||||
if( x > (glutGet( GLUT_WINDOW_WIDTH ) - menuEntry->SubMenu->Width - 15) )
|
||||
menuEntry->SubMenu->X = glutGet( GLUT_WINDOW_WIDTH ) - menuEntry->SubMenu->Width - 15;
|
||||
if( y > (glutGet( GLUT_WINDOW_HEIGHT ) - menuEntry->SubMenu->Height - 15) )
|
||||
menuEntry->SubMenu->Y = glutGet( GLUT_WINDOW_HEIGHT ) - menuEntry->SubMenu->Height - 15;
|
||||
|
||||
/*
|
||||
* ...then check the submenu's state:
|
||||
*/
|
||||
fghCheckMenuStatus( menuEntry->SubMenu );
|
||||
}
|
||||
|
||||
/*
|
||||
* Report back that we have caught the menu cursor
|
||||
*/
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
/*
|
||||
* Looks like the menu cursor is somewhere else...
|
||||
*/
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays a menu box and all of it's submenus (if they are active)
|
||||
*/
|
||||
static void fghDisplayMenuBox( SFG_Menu* menu )
|
||||
{
|
||||
SFG_Window* window = fgStructure.Window;
|
||||
gint i, j, x, y;
|
||||
|
||||
/*
|
||||
* Have the menu box drawn first. The +- values are
|
||||
* here just to make it more nice-looking...
|
||||
*/
|
||||
glColor4f( 0.0, 0.0, 0.0, 1.0 );
|
||||
glBegin( GL_QUADS );
|
||||
glVertex2f( menu->X - 8 , menu->Y - 1 );
|
||||
glVertex2f( menu->X + 8 + menu->Width, menu->Y - 1 );
|
||||
glVertex2f( menu->X + 8 + menu->Width, menu->Y + 4 + menu->Height );
|
||||
glVertex2f( menu->X - 8 , menu->Y + 4 + menu->Height );
|
||||
glEnd();
|
||||
|
||||
glColor4f( 0.3, 0.4, 0.5, 1.0 );
|
||||
glBegin( GL_QUADS );
|
||||
glVertex2f( menu->X - 6 , menu->Y + 1 );
|
||||
glVertex2f( menu->X + 6 + menu->Width, menu->Y + 1 );
|
||||
glVertex2f( menu->X + 6 + menu->Width, menu->Y + 2 + menu->Height );
|
||||
glVertex2f( menu->X - 6 , menu->Y + 2 + menu->Height );
|
||||
glEnd();
|
||||
|
||||
/*
|
||||
* Check if any of the submenus is currently active...
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( menu->Entries ); i++ )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = (SFG_MenuEntry *) g_list_nth( menu->Entries, i )->data;
|
||||
|
||||
/*
|
||||
* Has the menu been marked as active, maybe?
|
||||
*/
|
||||
if( menuEntry->IsActive == TRUE )
|
||||
{
|
||||
/*
|
||||
* That's truly right, and we need to have it highlighted.
|
||||
* There is an assumption that mouse cursor didn't move
|
||||
* since the last check of menu activity state:
|
||||
*/
|
||||
gint menuID = menuEntry->Ordinal;
|
||||
|
||||
/*
|
||||
* So have the highlight drawn...
|
||||
*/
|
||||
glColor4f( 0.2, 0.3, 0.4, 1.0 );
|
||||
glBegin( GL_QUADS );
|
||||
glVertex2f( menu->X - 6 , menu->Y + (menuID + 0)*FREEGLUT_MENU_HEIGHT + 1 );
|
||||
glVertex2f( menu->X + 6 + menu->Width, menu->Y + (menuID + 0)*FREEGLUT_MENU_HEIGHT + 1 );
|
||||
glVertex2f( menu->X + 6 + menu->Width, menu->Y + (menuID + 1)*FREEGLUT_MENU_HEIGHT + 2 );
|
||||
glVertex2f( menu->X - 6 , menu->Y + (menuID + 1)*FREEGLUT_MENU_HEIGHT + 2 );
|
||||
glEnd();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Print the menu entries now...
|
||||
*/
|
||||
glColor4f( 1, 1, 1, 1 );
|
||||
|
||||
for( i=0; i<(gint) g_list_length( menu->Entries ); i++ )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = (SFG_MenuEntry *) g_list_nth( menu->Entries, i )->data;
|
||||
|
||||
/*
|
||||
* Move the raster into position...
|
||||
*/
|
||||
glRasterPos2i(
|
||||
menu->X,
|
||||
menu->Y + (i + 1)*FREEGLUT_MENU_HEIGHT
|
||||
);
|
||||
|
||||
/*
|
||||
* Have the label drawn, character after character:
|
||||
*/
|
||||
for( j=0; j<menuEntry->Text->len; j++ )
|
||||
glutBitmapCharacter( FREEGLUT_MENU_FONT, (gint) menuEntry->Text->str[ j ] );
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we are ready to check if any of our children needs to be redrawn:
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( menu->Entries ); i++ )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = (SFG_MenuEntry *) g_list_nth( menu->Entries, i )->data;
|
||||
|
||||
/*
|
||||
* Is that an active sub menu by any case?
|
||||
*/
|
||||
if( menuEntry->SubMenu != NULL && menuEntry->IsActive == TRUE )
|
||||
{
|
||||
/*
|
||||
* Yeah, indeed. Have it redrawn now:
|
||||
*/
|
||||
fghDisplayMenuBox( menuEntry->SubMenu );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays the currently active menu for the current window
|
||||
*/
|
||||
void fgDisplayMenu( void )
|
||||
{
|
||||
SFG_Window* window = fgStructure.Window;
|
||||
SFG_Menu* menu = NULL;
|
||||
gint i;
|
||||
|
||||
/*
|
||||
* Make sure there is a current window available
|
||||
*/
|
||||
freeglut_assert_window;
|
||||
|
||||
/*
|
||||
* Check if there is an active menu attached to this window...
|
||||
*/
|
||||
for( i=0; i<FREEGLUT_MAX_MENUS; i++ )
|
||||
{
|
||||
if( window->Menu[ i ] != NULL && window->MenuActive[ i ] == TRUE )
|
||||
menu = window->Menu[ i ];
|
||||
};
|
||||
|
||||
/*
|
||||
* Did we find an active window?
|
||||
*/
|
||||
freeglut_return_if_fail( menu != NULL );
|
||||
|
||||
/*
|
||||
* Prepare the OpenGL state to do the rendering first:
|
||||
*/
|
||||
glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_TEXTURE_BIT | GL_LIGHTING_BIT | GL_POLYGON_BIT );
|
||||
|
||||
glDisable( GL_DEPTH_TEST );
|
||||
glDisable( GL_TEXTURE_2D );
|
||||
glDisable( GL_LIGHTING );
|
||||
glDisable( GL_CULL_FACE );
|
||||
|
||||
/*
|
||||
* We'll use an orthogonal projection matrix to draw the menu:
|
||||
*/
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
glOrtho(
|
||||
0, glutGet( GLUT_WINDOW_WIDTH ),
|
||||
glutGet( GLUT_WINDOW_HEIGHT ), 0,
|
||||
-1, 1
|
||||
);
|
||||
|
||||
/*
|
||||
* Model-view matix gets reset to identity:
|
||||
*/
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
||||
/*
|
||||
* First of all, have the exact menu status check:
|
||||
*/
|
||||
fghCheckMenuStatus( menu );
|
||||
|
||||
/*
|
||||
* The status has been updated and we're ready to have the menu drawn now:
|
||||
*/
|
||||
fghDisplayMenuBox( menu );
|
||||
|
||||
/*
|
||||
* Restore the old OpenGL settings now
|
||||
*/
|
||||
glPopAttrib();
|
||||
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glPopMatrix();
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
/*
|
||||
* Activates a menu pointed by the function argument
|
||||
*/
|
||||
void fgActivateMenu( gint button )
|
||||
{
|
||||
SFG_Window* window = fgStructure.Window;
|
||||
SFG_Menu* menu = NULL;
|
||||
gint x, y;
|
||||
|
||||
freeglut_assert_window;
|
||||
|
||||
/*
|
||||
* Mark the menu as active, so that it gets displayed:
|
||||
*/
|
||||
window->MenuActive[ button ] = TRUE;
|
||||
|
||||
/*
|
||||
* We'll be referencing this menu a lot, so remember it's address:
|
||||
*/
|
||||
menu = window->Menu[ button ];
|
||||
|
||||
/*
|
||||
* Grab the mouse cursor position respective to the current window
|
||||
*/
|
||||
x = window->State.MouseX;
|
||||
y = window->State.MouseY;
|
||||
|
||||
/*
|
||||
* Set up the initial menu position now:
|
||||
*/
|
||||
if( x > 10 ) menu->X = x - 10; else menu->X = 5;
|
||||
if( y > 10 ) menu->Y = y - 10; else menu->Y = 5;
|
||||
|
||||
if( x > (glutGet( GLUT_WINDOW_WIDTH ) - menu->Width ) )
|
||||
menu->X = glutGet( GLUT_WINDOW_WIDTH ) - menu->Width;
|
||||
if( y > (glutGet( GLUT_WINDOW_HEIGHT ) - menu->Height) )
|
||||
menu->Y = glutGet( GLUT_WINDOW_HEIGHT ) - menu->Height;
|
||||
}
|
||||
|
||||
/*
|
||||
* Private static function to check for menu entry selection on menu deactivation
|
||||
*/
|
||||
static void fghCheckMenuSelect( SFG_Menu* menu )
|
||||
{
|
||||
gint i;
|
||||
|
||||
/*
|
||||
* First of all check any of the active sub menus...
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( menu->Entries ); i++ )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = (SFG_MenuEntry *) g_list_nth( menu->Entries, i )->data;
|
||||
|
||||
/*
|
||||
* Is this menu entry active?
|
||||
*/
|
||||
if( menuEntry->IsActive == TRUE )
|
||||
{
|
||||
/*
|
||||
* If this is not a sub menu, execute the menu callback and return...
|
||||
*/
|
||||
if( menuEntry->SubMenu == NULL )
|
||||
{
|
||||
/*
|
||||
* ...certainly given that there is one...
|
||||
*/
|
||||
if( menu->Callback != NULL )
|
||||
menu->Callback( menuEntry->ID );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise recurse into the submenu.
|
||||
*/
|
||||
fghCheckMenuSelect( menuEntry->SubMenu );
|
||||
|
||||
/*
|
||||
* There is little sense in dwelling the search on
|
||||
*/
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Deactivates a menu pointed by the function argument.
|
||||
*/
|
||||
void fgDeactivateMenu( gint button )
|
||||
{
|
||||
SFG_Window* window = fgStructure.Window;
|
||||
SFG_Menu* menu = NULL;
|
||||
gint i, x, y;
|
||||
|
||||
/*
|
||||
* Make sure there is a current window available...
|
||||
*/
|
||||
freeglut_assert_window;
|
||||
|
||||
/*
|
||||
* Check if there is an active menu attached to this window...
|
||||
*/
|
||||
for( i=0; i<FREEGLUT_MAX_MENUS; i++ )
|
||||
{
|
||||
if( window->Menu[ i ] != NULL && window->MenuActive[ i ] == TRUE )
|
||||
menu = window->Menu[ i ];
|
||||
};
|
||||
|
||||
/*
|
||||
* Did we find an active window?
|
||||
*/
|
||||
freeglut_return_if_fail( menu != NULL );
|
||||
|
||||
/*
|
||||
* Check if there was any menu entry active. This would
|
||||
* mean the user has selected a menu entry...
|
||||
*/
|
||||
fghCheckMenuSelect( menu );
|
||||
|
||||
/*
|
||||
* Forget about having that menu active anymore, now:
|
||||
*/
|
||||
fgStructure.Window->MenuActive[ button ] = FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Recalculates current menu's box size
|
||||
*/
|
||||
void fghCalculateMenuBoxSize( void )
|
||||
{
|
||||
gint i, width;
|
||||
|
||||
/*
|
||||
* Make sure there is a current menu set
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
|
||||
|
||||
/*
|
||||
* The menu's box size depends on the menu entries:
|
||||
*/
|
||||
for( i=0, width=0; i<(gint) g_list_length( fgStructure.Menu->Entries ); i++ )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = (SFG_MenuEntry *) g_list_nth( fgStructure.Menu->Entries, i )->data;
|
||||
|
||||
/*
|
||||
* Update the menu entry's width value
|
||||
*/
|
||||
menuEntry->Width = glutBitmapLength( FREEGLUT_MENU_FONT, menuEntry->Text->str );
|
||||
|
||||
/*
|
||||
* Check if it's the biggest we've found
|
||||
*/
|
||||
if( menuEntry->Width > width )
|
||||
width = menuEntry->Width;
|
||||
}
|
||||
|
||||
/*
|
||||
* Store the menu's box size now:
|
||||
*/
|
||||
fgStructure.Menu->Height = i * FREEGLUT_MENU_HEIGHT;
|
||||
fgStructure.Menu->Width = width;
|
||||
}
|
||||
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Creates a new menu object, adding it to the freeglut structure
|
||||
*/
|
||||
int FGAPIENTRY glutCreateMenu( void (* callback)( int ) )
|
||||
{
|
||||
/*
|
||||
* The menu object creation code resides in freeglut_structure.c
|
||||
*/
|
||||
return( fgCreateMenu( callback )->ID );
|
||||
}
|
||||
|
||||
/*
|
||||
* Destroys a menu object, removing all references to it
|
||||
*/
|
||||
void FGAPIENTRY glutDestroyMenu( int menuID )
|
||||
{
|
||||
SFG_Menu* menu = fgMenuByID( menuID );
|
||||
|
||||
freeglut_assert_ready; freeglut_return_if_fail( menu != NULL );
|
||||
|
||||
/*
|
||||
* The menu object destruction code resides in freeglut_structure.c
|
||||
*/
|
||||
fgDestroyMenu( menu );
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns the ID number of the currently active menu
|
||||
*/
|
||||
int FGAPIENTRY glutGetMenu( void )
|
||||
{
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* Is there a current menu set?
|
||||
*/
|
||||
if( fgStructure.Menu != NULL )
|
||||
{
|
||||
/*
|
||||
* Yes, there is indeed...
|
||||
*/
|
||||
return( fgStructure.Menu->ID );
|
||||
}
|
||||
|
||||
/*
|
||||
* No, there is no current menu at all
|
||||
*/
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Sets the current menu given it's menu ID
|
||||
*/
|
||||
void FGAPIENTRY glutSetMenu( int menuID )
|
||||
{
|
||||
SFG_Menu* menu = fgMenuByID( menuID );
|
||||
|
||||
freeglut_assert_ready; freeglut_return_if_fail( menu != NULL );
|
||||
|
||||
/*
|
||||
* The current menu pointer is stored in fgStructure.Menu
|
||||
*/
|
||||
fgStructure.Menu = menu;
|
||||
}
|
||||
|
||||
/*
|
||||
* Adds a menu entry to the bottom of the current menu
|
||||
*/
|
||||
void FGAPIENTRY glutAddMenuEntry( const char* label, int value )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = g_new0( SFG_MenuEntry, 1 );
|
||||
|
||||
/*
|
||||
* Make sure there is a current menu set
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
|
||||
|
||||
/*
|
||||
* Fill in the appropriate values...
|
||||
*/
|
||||
menuEntry->Text = g_string_new( label );
|
||||
menuEntry->ID = value;
|
||||
|
||||
/*
|
||||
* Have the new menu entry attached to the current menu
|
||||
*/
|
||||
fgStructure.Menu->Entries = g_list_append( fgStructure.Menu->Entries, menuEntry );
|
||||
|
||||
/*
|
||||
* Update the menu's dimensions now
|
||||
*/
|
||||
fghCalculateMenuBoxSize();
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a sub menu to the bottom of the current menu
|
||||
*/
|
||||
void FGAPIENTRY glutAddSubMenu( const char* label, int subMenuID )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = g_new0( SFG_MenuEntry, 1 );
|
||||
SFG_Menu* subMenu = fgMenuByID( subMenuID );
|
||||
|
||||
/*
|
||||
* Make sure there is a current menu and the sub menu
|
||||
* we want to attach actually exists...
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
|
||||
freeglut_return_if_fail( subMenu != NULL );
|
||||
|
||||
/*
|
||||
* Fill in the appropriate values
|
||||
*/
|
||||
menuEntry->Text = g_string_new( label );
|
||||
menuEntry->SubMenu = subMenu;
|
||||
menuEntry->ID = -1;
|
||||
|
||||
/*
|
||||
* Have the new menu entry attached to the current menu
|
||||
*/
|
||||
fgStructure.Menu->Entries = g_list_append( fgStructure.Menu->Entries, menuEntry );
|
||||
|
||||
/*
|
||||
* Update the menu's dimensions now
|
||||
*/
|
||||
fghCalculateMenuBoxSize();
|
||||
}
|
||||
|
||||
/*
|
||||
* Changes the specified menu item in the current menu into a menu entry
|
||||
*/
|
||||
void FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry = NULL;
|
||||
|
||||
/*
|
||||
* Make sure there is a current menu set...
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
|
||||
|
||||
/*
|
||||
* Make sure the item counter seems valid
|
||||
*/
|
||||
freeglut_return_if_fail( (item > 0) && (item <= (gint) g_list_length( fgStructure.Menu->Entries ) ) );
|
||||
|
||||
/*
|
||||
* Get n-th menu entry in the current menu, starting from one:
|
||||
*/
|
||||
menuEntry = (SFG_MenuEntry *) g_list_nth( fgStructure.Menu->Entries, item - 1 )->data;
|
||||
|
||||
/*
|
||||
* We want it to become a normal menu entry, so:
|
||||
*/
|
||||
if( menuEntry->Text != NULL )
|
||||
g_string_free( menuEntry->Text, TRUE );
|
||||
|
||||
menuEntry->Text = g_string_new( label );
|
||||
menuEntry->ID = value;
|
||||
menuEntry->SubMenu = NULL;
|
||||
|
||||
/*
|
||||
* Update the menu's dimensions now
|
||||
*/
|
||||
fghCalculateMenuBoxSize();
|
||||
}
|
||||
|
||||
/*
|
||||
* Changes the specified menu item in the current menu into a sub-menu trigger.
|
||||
*/
|
||||
void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int subMenuID )
|
||||
{
|
||||
SFG_Menu* subMenu = fgMenuByID( subMenuID );
|
||||
SFG_MenuEntry* menuEntry = NULL;
|
||||
|
||||
/*
|
||||
* Make sure there is a current menu set and the sub menu exists...
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
|
||||
freeglut_return_if_fail( subMenu != NULL );
|
||||
|
||||
/*
|
||||
* Make sure the item counter seems valid
|
||||
*/
|
||||
freeglut_return_if_fail( (item > 0) && (item <= (gint) g_list_length( fgStructure.Menu->Entries ) ) );
|
||||
|
||||
/*
|
||||
* Get n-th menu entry in the current menu, starting from one:
|
||||
*/
|
||||
menuEntry = (SFG_MenuEntry *) g_list_nth( fgStructure.Menu->Entries, item - 1 )->data;
|
||||
|
||||
/*
|
||||
* We want it to become a sub menu entry, so:
|
||||
*/
|
||||
if( menuEntry->Text != NULL )
|
||||
g_string_free( menuEntry->Text, TRUE );
|
||||
|
||||
menuEntry->Text = g_string_new( label );
|
||||
menuEntry->SubMenu = subMenu;
|
||||
menuEntry->ID = -1;
|
||||
|
||||
/*
|
||||
* Update the menu's dimensions now
|
||||
*/
|
||||
fghCalculateMenuBoxSize();
|
||||
}
|
||||
|
||||
/*
|
||||
* Removes the specified menu item from the current menu
|
||||
*/
|
||||
void FGAPIENTRY glutRemoveMenuItem( int item )
|
||||
{
|
||||
SFG_MenuEntry* menuEntry;
|
||||
|
||||
/*
|
||||
* Make sure there is a current menu set
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_return_if_fail( fgStructure.Menu != NULL );
|
||||
|
||||
/*
|
||||
* Make sure the item counter seems valid
|
||||
*/
|
||||
freeglut_return_if_fail( (item > 0) && (item <= (gint) g_list_length( fgStructure.Menu->Entries ) ) );
|
||||
|
||||
/*
|
||||
* Removing a menu entry is quite simple...
|
||||
*/
|
||||
menuEntry = (SFG_MenuEntry *) g_list_nth( fgStructure.Menu->Entries, item - 1 )->data;
|
||||
|
||||
fgStructure.Menu->Entries = g_list_remove(
|
||||
fgStructure.Menu->Entries,
|
||||
menuEntry
|
||||
);
|
||||
|
||||
/*
|
||||
* Free the entry label string, too
|
||||
*/
|
||||
g_string_free( menuEntry->Text, TRUE );
|
||||
|
||||
/*
|
||||
* Update the menu's dimensions now
|
||||
*/
|
||||
fghCalculateMenuBoxSize();
|
||||
}
|
||||
|
||||
/*
|
||||
* Attaches a menu to the current window
|
||||
*/
|
||||
void FGAPIENTRY glutAttachMenu( int button )
|
||||
{
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* There must be a current window and a current menu set:
|
||||
*/
|
||||
freeglut_return_if_fail( fgStructure.Window != NULL || fgStructure.Menu != NULL );
|
||||
|
||||
/*
|
||||
* Make sure the button value is valid (0, 1 or 2, see freeglut.h)
|
||||
*/
|
||||
freeglut_return_if_fail( button == GLUT_LEFT_BUTTON || button == GLUT_MIDDLE_BUTTON || button == GLUT_RIGHT_BUTTON );
|
||||
|
||||
/*
|
||||
* It is safe now to attach the menu
|
||||
*/
|
||||
fgStructure.Window->Menu[ button ] = fgStructure.Menu;
|
||||
}
|
||||
|
||||
/*
|
||||
* Detaches a menu from the current window
|
||||
*/
|
||||
void FGAPIENTRY glutDetachMenu( int button )
|
||||
{
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* There must be a current window set:
|
||||
*/
|
||||
freeglut_return_if_fail( fgStructure.Window != NULL );
|
||||
|
||||
/*
|
||||
* Make sure the button value is valid (0, 1 or 2, see freeglut.h)
|
||||
*/
|
||||
freeglut_return_if_fail( button != 0 && button != 1 && button != 2 );
|
||||
|
||||
/*
|
||||
* It is safe now to detach the menu
|
||||
*/
|
||||
fgStructure.Window->Menu[ button ] = NULL;
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
265
freeglut/freeglut/freeglut-1.3/freeglut_misc.c
Normal file
265
freeglut/freeglut/freeglut-1.3/freeglut_misc.c
Normal file
@ -0,0 +1,265 @@
|
||||
/*
|
||||
* freeglut_misc.c
|
||||
*
|
||||
* Functions that didn't fit anywhere else...
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 9 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-misc"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* TODO BEFORE THE STABLE RELEASE:
|
||||
*
|
||||
* glutSetColor() --
|
||||
* glutGetColor() --
|
||||
* glutCopyColormap() --
|
||||
* glutSetKeyRepeat() -- this is evil and should be removed from API
|
||||
*/
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* This functions checks if an OpenGL extension is supported or not
|
||||
*/
|
||||
int FGAPIENTRY glutExtensionSupported( const char* extension )
|
||||
{
|
||||
/*
|
||||
* Grab the current context's OpenGL extensions
|
||||
* and create a new GLib lexical analyzer...
|
||||
*/
|
||||
gchar *glExtensions = (gchar *) glGetString( GL_EXTENSIONS );
|
||||
GScanner* scanner = g_scanner_new( NULL );
|
||||
gint i;
|
||||
|
||||
/*
|
||||
* Make sure there is a current window, and thus -- a current context available
|
||||
*/
|
||||
freeglut_assert_ready; freeglut_return_val_if_fail( fgStructure.Window != NULL, 0 );
|
||||
|
||||
/*
|
||||
* Fail if there is no extension, extensions or scanner available
|
||||
*/
|
||||
freeglut_return_val_if_fail( (scanner != NULL) && (strlen( extension ) > 0)
|
||||
&& (strlen( glExtensions ) > 0), 0 );
|
||||
|
||||
/*
|
||||
* Check if the extension itself looks valid
|
||||
*/
|
||||
for( i=0; i<(gint) strlen( extension ); i++ )
|
||||
if( extension[ i ] == ' ' )
|
||||
return( 0 );
|
||||
|
||||
/*
|
||||
* Set the scanner's input name (for debugging)
|
||||
*/
|
||||
scanner->input_name = "glutExtensionSupported()";
|
||||
|
||||
/*
|
||||
* Start the lexical analysis of the extensions string
|
||||
*/
|
||||
g_scanner_input_text( scanner, glExtensions, strlen( glExtensions ) );
|
||||
|
||||
/*
|
||||
* While there are any more tokens to be checked...
|
||||
*/
|
||||
while( !g_scanner_eof( scanner ) )
|
||||
{
|
||||
/*
|
||||
* Actually we're expecting only string tokens
|
||||
*/
|
||||
GTokenType tokenType = g_scanner_get_next_token( scanner );
|
||||
|
||||
/*
|
||||
* We are looking for identifiers
|
||||
*/
|
||||
if( tokenType == G_TOKEN_IDENTIFIER )
|
||||
{
|
||||
/*
|
||||
* Compare the token and the extension string
|
||||
*/
|
||||
if( strcmp( scanner->value.v_identifier, extension ) == 0 )
|
||||
{
|
||||
/*
|
||||
* OKi, we have found the extension string we've been looking for
|
||||
*/
|
||||
g_scanner_destroy( scanner );
|
||||
return( 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Well, looks like we have failed to find the extension string
|
||||
*/
|
||||
g_scanner_destroy( scanner );
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* This function reports all the errors that happened till now
|
||||
*/
|
||||
void FGAPIENTRY glutReportErrors( void )
|
||||
{
|
||||
GLenum error = glGetError();
|
||||
|
||||
/*
|
||||
* Keep reporting errors as long as there are any...
|
||||
*/
|
||||
while( error != GL_NO_ERROR )
|
||||
{
|
||||
/*
|
||||
* Print the current error
|
||||
*/
|
||||
# undef G_LOG_DOMAIN
|
||||
# define G_LOG_DOMAIN ((gchar *) 0)
|
||||
|
||||
g_warning( "GL error: %s", gluErrorString( error ) );
|
||||
|
||||
# undef G_LOG_DOMAIN
|
||||
# define G_LOG_DOMAIN "freeglut_misc.c"
|
||||
|
||||
/*
|
||||
* Grab the next error value
|
||||
*/
|
||||
error = glGetError();
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* Turns the ignore key auto repeat feature on and off
|
||||
*/
|
||||
void FGAPIENTRY glutIgnoreKeyRepeat( int ignore )
|
||||
{
|
||||
/*
|
||||
* This is simple and not demanging...
|
||||
*/
|
||||
fgState.IgnoreKeyRepeat = ignore ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Hints the window system whether to generate key auto repeat, or not. This is evil.
|
||||
*/
|
||||
void FGAPIENTRY glutSetKeyRepeat( int repeatMode )
|
||||
{
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* This is really evil, but let's have this done.
|
||||
*/
|
||||
switch( repeatMode )
|
||||
{
|
||||
case GLUT_KEY_REPEAT_OFF: XAutoRepeatOff( fgDisplay.Display ); break;
|
||||
case GLUT_KEY_REPEAT_ON: XAutoRepeatOn( fgDisplay.Display ); break;
|
||||
case GLUT_KEY_REPEAT_DEFAULT:
|
||||
{
|
||||
XKeyboardState keyboardState;
|
||||
|
||||
/*
|
||||
* Query the current keyboard state
|
||||
*/
|
||||
XGetKeyboardControl( fgDisplay.Display, &keyboardState );
|
||||
|
||||
/*
|
||||
* Set the auto key repeat basing on the global settings
|
||||
*/
|
||||
glutSetKeyRepeat(
|
||||
keyboardState.global_auto_repeat == AutoRepeatModeOn ?
|
||||
GLUT_KEY_REPEAT_ON : GLUT_KEY_REPEAT_OFF
|
||||
);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
/*
|
||||
* Whoops, this was not expected at all
|
||||
*/
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Forces the joystick callback to be executed
|
||||
*/
|
||||
void FGAPIENTRY glutForceJoystickFunc( void )
|
||||
{
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* Is there a current window selected?
|
||||
*/
|
||||
freeglut_return_if_fail( fgStructure.Window != NULL );
|
||||
|
||||
/*
|
||||
* Check if there is a joystick callback hooked to the current window
|
||||
*/
|
||||
freeglut_return_if_fail( fgStructure.Window->Callbacks.Joystick != NULL );
|
||||
|
||||
/*
|
||||
* Poll the joystick now, using the current window's joystick callback
|
||||
*/
|
||||
fgJoystickPollWindow( fgStructure.Window );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutSetColor( int nColor, GLfloat red, GLfloat green, GLfloat blue )
|
||||
{
|
||||
/*
|
||||
*
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
GLfloat FGAPIENTRY glutGetColor( int color, int component )
|
||||
{
|
||||
/*
|
||||
*
|
||||
*/
|
||||
return( 0.0f );
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
void FGAPIENTRY glutCopyColormap( int window )
|
||||
{
|
||||
/*
|
||||
*
|
||||
*/
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
51
freeglut/freeglut/freeglut-1.3/freeglut_overlay.c
Normal file
51
freeglut/freeglut/freeglut-1.3/freeglut_overlay.c
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* freeglut_overlay.c
|
||||
*
|
||||
* Overlay management functions (as defined by GLUT API)
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 16 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-overlay"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* NOTE: functions declared in this file probably will not be implemented.
|
||||
*/
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
void FGAPIENTRY glutEstablishOverlay( void ) { /* Not implemented */ }
|
||||
void FGAPIENTRY glutRemoveOverlay( void ) { /* Not implemented */ }
|
||||
void FGAPIENTRY glutUseLayer( GLenum layer ) { /* Not implemented */ }
|
||||
void FGAPIENTRY glutPostOverlayRedisplay( void ) { /* Not implemented */ }
|
||||
void FGAPIENTRY glutPostWindowOverlayRedisplay( int ID ) { /* Not implemented */ }
|
||||
void FGAPIENTRY glutShowOverlay( void ) { /* Not implemented */ }
|
||||
void FGAPIENTRY glutHideOverlay( void ) { /* Not implemented */ }
|
||||
|
||||
/*** END OF FILE ***/
|
618
freeglut/freeglut/freeglut-1.3/freeglut_state.c
Normal file
618
freeglut/freeglut/freeglut-1.3/freeglut_state.c
Normal file
@ -0,0 +1,618 @@
|
||||
/*
|
||||
* freeglut_state.c
|
||||
*
|
||||
* Freeglut state query methods.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 16 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-state"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* TODO BEFORE THE STABLE RELEASE:
|
||||
*
|
||||
* glutGet() -- X11 tests passed, but check if all enums handled (what about Win32?)
|
||||
* glutDeviceGet() -- X11 tests passed, but check if all enums handled (what about Win32?)
|
||||
* glutGetModifiers() -- OK, but could also remove the limitation
|
||||
* glutLayerGet() -- what about GLUT_NORMAL_DAMAGED?
|
||||
*
|
||||
* The fail-on-call policy will help adding the most needed things imho.
|
||||
*/
|
||||
|
||||
/* -- LOCAL DEFINITIONS ---------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Those are definitions introduced to make the glutGet() more easy,
|
||||
* however they might introduce errors if someone ports GLX to Win32 :)
|
||||
*
|
||||
* Btw. this is not that a bad idea (wrapping WGL around GLX)...
|
||||
*/
|
||||
#if TARGET_HOST_WIN32
|
||||
# define GLX_RGBA 0x01
|
||||
# define GLX_DOUBLEBUFFER 0x02
|
||||
# define GLX_BUFFER_SIZE 0x03
|
||||
# define GLX_STENCIL_SIZE 0x04
|
||||
# define GLX_DEPTH_SIZE 0x05
|
||||
# define GLX_RED_SIZE 0x06
|
||||
# define GLX_GREEN_SIZE 0x07
|
||||
# define GLX_BLUE_SIZE 0x08
|
||||
# define GLX_ALPHA_SIZE 0x09
|
||||
# define GLX_ACCUM_RED_SIZE 0x0A
|
||||
# define GLX_ACCUM_GREEN_SIZE 0x0B
|
||||
# define GLX_ACCUM_BLUE_SIZE 0x0C
|
||||
# define GLX_ACCUM_ALPHA_SIZE 0x0D
|
||||
# define GLX_STEREO 0x0E
|
||||
#endif
|
||||
|
||||
|
||||
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Queries the GL context about some attributes
|
||||
*/
|
||||
static gint fghGetConfig( gint attribute )
|
||||
{
|
||||
gint returnValue;
|
||||
|
||||
/*
|
||||
* Return nothing if there is no current window set
|
||||
*/
|
||||
if( fgStructure.Window == NULL )
|
||||
return( 0 );
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
/*
|
||||
* glXGetConfig should work fine
|
||||
*/
|
||||
glXGetConfig( fgDisplay.Display, fgStructure.Window->Window.VisualInfo, attribute, &returnValue );
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
/*
|
||||
* This is going to be a bit harder than the X11 version...
|
||||
*/
|
||||
# pragma message( "freeglut_state.c::fghGetConfig() says hello world my name is not implemented!" )
|
||||
switch( attribute )
|
||||
{
|
||||
case GLX_RGBA:
|
||||
case GLX_DOUBLEBUFFER:
|
||||
case GLX_BUFFER_SIZE:
|
||||
case GLX_RED_SIZE:
|
||||
case GLX_GREEN_SIZE:
|
||||
case GLX_BLUE_SIZE:
|
||||
case GLX_DEPTH_SIZE:
|
||||
return( 1 );
|
||||
|
||||
case GLX_STENCIL_SIZE:
|
||||
case GLX_ALPHA_SIZE:
|
||||
case GLX_ACCUM_RED_SIZE:
|
||||
case GLX_ACCUM_GREEN_SIZE:
|
||||
case GLX_ACCUM_BLUE_SIZE:
|
||||
case GLX_ACCUM_ALPHA_SIZE:
|
||||
case GLX_STEREO:
|
||||
default:
|
||||
/*
|
||||
* Well, this looks like not implemented to me :)
|
||||
*/
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Have the query results returned
|
||||
*/
|
||||
return( returnValue );
|
||||
}
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* General settings query method
|
||||
*/
|
||||
int FGAPIENTRY glutGet( GLenum eWhat )
|
||||
{
|
||||
gint returnValue;
|
||||
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* Check what is the caller querying for. In chronological code add order.
|
||||
*/
|
||||
switch( eWhat )
|
||||
{
|
||||
case GLUT_ELAPSED_TIME:
|
||||
/*
|
||||
* This is easy and nicely portable, as we are using GLib...
|
||||
*/
|
||||
return( (int) (g_timer_elapsed( fgState.Timer, NULL ) * 1000.0) );
|
||||
|
||||
/*
|
||||
* Following values are stored in fgState and fgDisplay global structures
|
||||
*/
|
||||
case GLUT_SCREEN_WIDTH: return( fgDisplay.ScreenWidth );
|
||||
case GLUT_SCREEN_HEIGHT: return( fgDisplay.ScreenHeight );
|
||||
case GLUT_SCREEN_WIDTH_MM: return( fgDisplay.ScreenWidthMM );
|
||||
case GLUT_SCREEN_HEIGHT_MM: return( fgDisplay.ScreenHeightMM );
|
||||
case GLUT_INIT_WINDOW_X: return( fgState.Position.X );
|
||||
case GLUT_INIT_WINDOW_Y: return( fgState.Position.Y );
|
||||
case GLUT_INIT_WINDOW_WIDTH: return( fgState.Size.X );
|
||||
case GLUT_INIT_WINDOW_HEIGHT: return( fgState.Size.Y );
|
||||
case GLUT_INIT_DISPLAY_MODE: return( fgState.DisplayMode );
|
||||
|
||||
/*
|
||||
* The window/context specific queries are handled mostly by fghGetConfig().
|
||||
*/
|
||||
case GLUT_WINDOW_NUM_SAMPLES:
|
||||
/*
|
||||
* Multisampling. Return what I know about multisampling.
|
||||
*/
|
||||
return( 0 );
|
||||
|
||||
/*
|
||||
* The rest of GLX queries is general enough to use a macro to check them
|
||||
*/
|
||||
# define GLX_QUERY(a,b) case a: return( fghGetConfig( b ) );
|
||||
|
||||
GLX_QUERY( GLUT_WINDOW_RGBA, GLX_RGBA );
|
||||
GLX_QUERY( GLUT_WINDOW_DOUBLEBUFFER, GLX_DOUBLEBUFFER );
|
||||
GLX_QUERY( GLUT_WINDOW_BUFFER_SIZE, GLX_BUFFER_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_STENCIL_SIZE, GLX_STENCIL_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_DEPTH_SIZE, GLX_DEPTH_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_RED_SIZE, GLX_RED_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_GREEN_SIZE, GLX_GREEN_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_BLUE_SIZE, GLX_BLUE_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_ALPHA_SIZE, GLX_ALPHA_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_ACCUM_RED_SIZE, GLX_ACCUM_RED_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_ACCUM_GREEN_SIZE, GLX_ACCUM_GREEN_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_ACCUM_BLUE_SIZE, GLX_ACCUM_BLUE_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_ACCUM_ALPHA_SIZE, GLX_ACCUM_ALPHA_SIZE );
|
||||
GLX_QUERY( GLUT_WINDOW_STEREO, GLX_STEREO );
|
||||
|
||||
# undef GLX_QUERY
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
/*
|
||||
* Colormap size is handled in a bit different way than all the rest
|
||||
*/
|
||||
case GLUT_WINDOW_COLORMAP_SIZE:
|
||||
/*
|
||||
* Check for the visual type
|
||||
*/
|
||||
if( (fghGetConfig( GLX_RGBA )) || (fgStructure.Window == NULL) )
|
||||
{
|
||||
/*
|
||||
* We've got a RGBA visual, so there is no colormap at all.
|
||||
* The other possibility is that we have no current window set.
|
||||
*/
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise return the number of entries in the colormap
|
||||
*/
|
||||
return( fgStructure.Window->Window.VisualInfo->visual->map_entries );
|
||||
|
||||
/*
|
||||
* Those calls are somewhat similiar, as they use XGetWindowAttributes() function
|
||||
*/
|
||||
case GLUT_WINDOW_X:
|
||||
case GLUT_WINDOW_Y:
|
||||
{
|
||||
XWindowAttributes winAttributes;
|
||||
Window another, window;
|
||||
gint x, y;
|
||||
|
||||
/*
|
||||
* Return zero if there is no current window set
|
||||
*/
|
||||
if( fgStructure.Window == NULL )
|
||||
return( 0 );
|
||||
|
||||
/*
|
||||
* So, grab the current window's position
|
||||
*/
|
||||
window = fgStructure.Window->Window.Handle;
|
||||
|
||||
/*
|
||||
* Grab the current window's attributes now
|
||||
*/
|
||||
XGetWindowAttributes(
|
||||
fgDisplay.Display,
|
||||
window,
|
||||
&winAttributes
|
||||
);
|
||||
|
||||
/*
|
||||
* Correct the results for the parental relation and border size
|
||||
*/
|
||||
XTranslateCoordinates(
|
||||
fgDisplay.Display,
|
||||
window,
|
||||
winAttributes.root,
|
||||
-winAttributes.border_width,
|
||||
-winAttributes.border_width,
|
||||
&x, &y,
|
||||
&another
|
||||
);
|
||||
|
||||
/*
|
||||
* See if we have to return the X or Y coordinate
|
||||
*/
|
||||
return( eWhat == GLUT_WINDOW_X ? x : y );
|
||||
}
|
||||
|
||||
case GLUT_WINDOW_WIDTH:
|
||||
case GLUT_WINDOW_HEIGHT:
|
||||
{
|
||||
XWindowAttributes winAttributes;
|
||||
|
||||
/*
|
||||
* Return zero if there is no current window set
|
||||
*/
|
||||
if( fgStructure.Window == NULL )
|
||||
return( 0 );
|
||||
|
||||
/*
|
||||
* Checking for window's size is much easier:
|
||||
*/
|
||||
XGetWindowAttributes(
|
||||
fgDisplay.Display,
|
||||
fgStructure.Window->Window.Handle,
|
||||
&winAttributes
|
||||
);
|
||||
|
||||
/*
|
||||
* See if to return the window's width or height
|
||||
*/
|
||||
return( eWhat == GLUT_WINDOW_WIDTH ? winAttributes.width : winAttributes.height );
|
||||
}
|
||||
|
||||
/*
|
||||
* I do not know yet if there will be a fgChooseVisual() function for Win32
|
||||
*/
|
||||
case GLUT_DISPLAY_MODE_POSSIBLE:
|
||||
/*
|
||||
* Check if the current display mode is possible
|
||||
*/
|
||||
return( fgChooseVisual() == NULL ? 0 : 1 );
|
||||
|
||||
/*
|
||||
* This is system-dependant
|
||||
*/
|
||||
case GLUT_WINDOW_FORMAT_ID:
|
||||
/*
|
||||
* Return the visual ID, if there is a current window naturally:
|
||||
*/
|
||||
if( fgStructure.Window == NULL )
|
||||
return( 0 );
|
||||
|
||||
return( fgStructure.Window->Window.VisualInfo->visualid );
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
|
||||
case GLUT_WINDOW_X:
|
||||
case GLUT_WINDOW_Y:
|
||||
case GLUT_WINDOW_WIDTH:
|
||||
case GLUT_WINDOW_HEIGHT:
|
||||
{
|
||||
RECT winRect;
|
||||
|
||||
/*
|
||||
* Check if there is a window to be queried for dimensions:
|
||||
*/
|
||||
freeglut_return_val_if_fail( fgStructure.Window != NULL, 0 );
|
||||
|
||||
/*
|
||||
* We need to call GetWindowRect() first...
|
||||
*/
|
||||
GetWindowRect( fgStructure.Window->Window.Handle, &winRect );
|
||||
|
||||
/*
|
||||
* ...then we've got to correct the results we've just received...
|
||||
*/
|
||||
winRect.left += GetSystemMetrics( SM_CXSIZEFRAME ) - 1;
|
||||
winRect.right -= GetSystemMetrics( SM_CXSIZEFRAME ) - 1;
|
||||
winRect.top += GetSystemMetrics( SM_CYSIZEFRAME ) - 1 + GetSystemMetrics( SM_CYCAPTION );
|
||||
winRect.bottom -= GetSystemMetrics( SM_CYSIZEFRAME ) + 1;
|
||||
|
||||
/*
|
||||
* ...and finally return the caller the desired value:
|
||||
*/
|
||||
switch( eWhat )
|
||||
{
|
||||
case GLUT_WINDOW_X: return( winRect.left );
|
||||
case GLUT_WINDOW_Y: return( winRect.top );
|
||||
case GLUT_WINDOW_WIDTH: return( winRect.right - winRect.left );
|
||||
case GLUT_WINDOW_HEIGHT: return( winRect.bottom - winRect.top );
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GLUT_DISPLAY_MODE_POSSIBLE:
|
||||
/*
|
||||
* Check if the current display mode is possible
|
||||
*/
|
||||
return( fgSetupPixelFormat( fgStructure.Window, TRUE ) );
|
||||
|
||||
case GLUT_WINDOW_FORMAT_ID:
|
||||
/*
|
||||
* Return the pixel format of the current window
|
||||
*/
|
||||
if( fgStructure.Window != NULL )
|
||||
return( GetPixelFormat( fgStructure.Window->Window.Device ) );
|
||||
|
||||
/*
|
||||
* If the current window does not exist, fail:
|
||||
*/
|
||||
return( 0 );
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The window structure queries
|
||||
*/
|
||||
case GLUT_WINDOW_PARENT:
|
||||
/*
|
||||
* Return the ID number of current window's parent, if any
|
||||
*/
|
||||
if( fgStructure.Window == NULL ) return( 0 );
|
||||
if( fgStructure.Window->Parent == NULL ) return( 0 );
|
||||
|
||||
return( fgStructure.Window->Parent->ID );
|
||||
|
||||
case GLUT_WINDOW_NUM_CHILDREN:
|
||||
/*
|
||||
* Return the number of children attached to the current window
|
||||
*/
|
||||
if( fgStructure.Window == NULL )
|
||||
return( 0 );
|
||||
|
||||
return( g_list_length( fgStructure.Window->Children ) );
|
||||
|
||||
case GLUT_WINDOW_CURSOR:
|
||||
/*
|
||||
* Return the currently selected window cursor
|
||||
*/
|
||||
if( fgStructure.Window == NULL )
|
||||
return( 0 );
|
||||
|
||||
return( fgStructure.Window->State.Cursor );
|
||||
|
||||
case GLUT_MENU_NUM_ITEMS:
|
||||
/*
|
||||
* Return the number of menu entries in the current menu
|
||||
*/
|
||||
if( fgStructure.Menu == NULL )
|
||||
return( 0 );
|
||||
|
||||
return( g_list_length( fgStructure.Menu->Entries ) );
|
||||
|
||||
default:
|
||||
/*
|
||||
* Just have it reported, so that we can see what needs to be implemented
|
||||
*/
|
||||
g_warning( "glutGet(): missing enum handle %i\n", eWhat );
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* If nothing happens, then we are in deep trouble...
|
||||
*/
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns various device information.
|
||||
*/
|
||||
int FGAPIENTRY glutDeviceGet( GLenum eWhat )
|
||||
{
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* See why are we bothered...
|
||||
*
|
||||
* WARNING: we are mostly lying in this function.
|
||||
*/
|
||||
switch( eWhat )
|
||||
{
|
||||
case GLUT_HAS_KEYBOARD:
|
||||
/*
|
||||
* We always have a keyboard present on PC machines...
|
||||
*/
|
||||
return( TRUE );
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
|
||||
case GLUT_HAS_MOUSE:
|
||||
/*
|
||||
* Hey, my Atari 65XE hasn't had a mouse!
|
||||
*/
|
||||
return( TRUE );
|
||||
|
||||
case GLUT_NUM_MOUSE_BUTTONS:
|
||||
/*
|
||||
* Return the number of mouse buttons available. This is a big guess.
|
||||
*/
|
||||
return( 3 );
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
|
||||
case GLUT_HAS_MOUSE:
|
||||
/*
|
||||
* The Windows can be booted without a mouse.
|
||||
* It would be nice to have this reported.
|
||||
*/
|
||||
return( GetSystemMetrics( SM_MOUSEPRESENT ) );
|
||||
|
||||
case GLUT_NUM_MOUSE_BUTTONS:
|
||||
/*
|
||||
* We are much more fortunate under Win32 about this...
|
||||
*/
|
||||
return( GetSystemMetrics( SM_CMOUSEBUTTONS ) );
|
||||
|
||||
#endif
|
||||
|
||||
case GLUT_JOYSTICK_POLL_RATE:
|
||||
case GLUT_HAS_JOYSTICK:
|
||||
case GLUT_JOYSTICK_BUTTONS:
|
||||
case GLUT_JOYSTICK_AXES:
|
||||
/*
|
||||
* WARNING: THIS IS A BIG LIE!
|
||||
*/
|
||||
return( 0 );
|
||||
|
||||
case GLUT_HAS_SPACEBALL:
|
||||
case GLUT_HAS_DIAL_AND_BUTTON_BOX:
|
||||
case GLUT_HAS_TABLET:
|
||||
/*
|
||||
* Sounds cool. And unuseful.
|
||||
*/
|
||||
return( FALSE );
|
||||
|
||||
case GLUT_NUM_SPACEBALL_BUTTONS:
|
||||
case GLUT_NUM_BUTTON_BOX_BUTTONS:
|
||||
case GLUT_NUM_DIALS:
|
||||
case GLUT_NUM_TABLET_BUTTONS:
|
||||
/*
|
||||
* Zero is not the answer. Zero is the question. Continuum is the answer.
|
||||
*/
|
||||
return( 0 );
|
||||
|
||||
case GLUT_DEVICE_IGNORE_KEY_REPEAT:
|
||||
/*
|
||||
* Return what we think about the key auto repeat settings
|
||||
*/
|
||||
return( fgState.IgnoreKeyRepeat );
|
||||
|
||||
case GLUT_DEVICE_KEY_REPEAT:
|
||||
/*
|
||||
* WARNING: THIS IS A BIG LIE!
|
||||
*/
|
||||
return( GLUT_KEY_REPEAT_DEFAULT );
|
||||
|
||||
default:
|
||||
/*
|
||||
* Complain.
|
||||
*/
|
||||
g_warning( "glutDeviceGet(): missing enum handle %i\n", eWhat );
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* And now -- the failure.
|
||||
*/
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
/*
|
||||
* This should return the current state of ALT, SHIFT and CTRL keys.
|
||||
*/
|
||||
int FGAPIENTRY glutGetModifiers( void )
|
||||
{
|
||||
/*
|
||||
* Fail if there is no current window or called outside an input callback
|
||||
*/
|
||||
if( fgStructure.Window == NULL )
|
||||
return( 0 );
|
||||
|
||||
if( fgStructure.Window->State.Modifiers == 0xffffffff )
|
||||
{
|
||||
g_warning( "glutGetModifiers() called outside an input callback" );
|
||||
return( 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the current modifiers state otherwise
|
||||
*/
|
||||
return( fgStructure.Window->State.Modifiers );
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the state of the GLUT API overlay subsystem. A misery ;-)
|
||||
*/
|
||||
int FGAPIENTRY glutLayerGet( GLenum eWhat )
|
||||
{
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* This is easy as layers are not implemented ;-)
|
||||
*/
|
||||
switch( eWhat )
|
||||
{
|
||||
case GLUT_OVERLAY_POSSIBLE:
|
||||
/*
|
||||
* Nope, overlays are not possible.
|
||||
*/
|
||||
return( FALSE );
|
||||
|
||||
case GLUT_LAYER_IN_USE:
|
||||
/*
|
||||
* The normal plane is always in use
|
||||
*/
|
||||
return( GLUT_NORMAL );
|
||||
|
||||
case GLUT_HAS_OVERLAY:
|
||||
/*
|
||||
* No window is allowed to have an overlay
|
||||
*/
|
||||
return( FALSE );
|
||||
|
||||
case GLUT_TRANSPARENT_INDEX:
|
||||
/*
|
||||
* Return just anything, which is always defined as zero
|
||||
*/
|
||||
return( 0 );
|
||||
|
||||
case GLUT_NORMAL_DAMAGED:
|
||||
/*
|
||||
* Actually I do not know. Maybe.
|
||||
*/
|
||||
return( FALSE );
|
||||
|
||||
case GLUT_OVERLAY_DAMAGED:
|
||||
/*
|
||||
* Return minus one to mark that no layer is in use
|
||||
*/
|
||||
return( -1 );
|
||||
|
||||
default:
|
||||
/*
|
||||
* Complain to the user about the obvious bug
|
||||
*/
|
||||
g_warning( "glutLayerGet(): missing enum handle %i\n", eWhat );
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* And fail. That's good. Programs do love failing.
|
||||
*/
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
643
freeglut/freeglut/freeglut-1.3/freeglut_structure.c
Normal file
643
freeglut/freeglut/freeglut-1.3/freeglut_structure.c
Normal file
@ -0,0 +1,643 @@
|
||||
/*
|
||||
* freeglut_structure.c
|
||||
*
|
||||
* Windows and menus need tree structure
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Sat Dec 18 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-structure"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
|
||||
/* -- GLOBAL EXPORTS ------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* The SFG_Structure container holds information about windows and menus
|
||||
* created between glutInit() and glutMainLoop() return.
|
||||
*/
|
||||
SFG_Structure fgStructure;
|
||||
|
||||
|
||||
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* This private function creates, opens and adds to the hierarchy
|
||||
* a freeglut window complete with OpenGL context and stuff...
|
||||
*
|
||||
* If parent is set to NULL, the window created will be a topmost one.
|
||||
*/
|
||||
SFG_Window* fgCreateWindow( SFG_Window* parent, const gchar* title, gint x, gint y, gint w, gint h, gboolean gameMode )
|
||||
{
|
||||
/*
|
||||
* Have the window object created
|
||||
*/
|
||||
SFG_Window* window = g_new0( SFG_Window, 1 );
|
||||
gint fakeArgc = 0;
|
||||
|
||||
/*
|
||||
* If the freeglut internals haven't been initialized yet,
|
||||
* do it now. Hack's idea courtesy of Chris Purnell...
|
||||
*/
|
||||
if( fgState.Timer == NULL )
|
||||
glutInit( &fakeArgc, NULL );
|
||||
|
||||
/*
|
||||
* Initialize the object properties
|
||||
*/
|
||||
window->ID = ++fgStructure.WindowID;
|
||||
|
||||
/*
|
||||
* Does this window have a parent?
|
||||
*/
|
||||
if( parent != NULL )
|
||||
{
|
||||
/*
|
||||
* That's quite right, attach this windows as a child window
|
||||
*/
|
||||
parent->Children = g_list_append( parent->Children, window );
|
||||
window->Parent = parent;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Otherwise add the newly created window to the topmost windows list
|
||||
*/
|
||||
fgStructure.Windows = g_list_append( fgStructure.Windows, window );
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the default mouse cursor and reset the modifiers value
|
||||
*/
|
||||
window->State.Cursor = GLUT_CURSOR_INHERIT;
|
||||
window->State.Modifiers = 0xffffffff;
|
||||
|
||||
/*
|
||||
* Open the window now. The fgOpenWindow() function is system
|
||||
* dependant, and resides in freeglut_window.c. Uses fgState.
|
||||
*/
|
||||
fgOpenWindow( window, title, x, y, w, h, gameMode );
|
||||
|
||||
/*
|
||||
* Return a pointer to the newly created window
|
||||
*/
|
||||
return( window );
|
||||
}
|
||||
|
||||
/*
|
||||
* This private function creates a menu and adds it to the menus list
|
||||
*/
|
||||
SFG_Menu* fgCreateMenu( FGCBmenu menuCallback )
|
||||
{
|
||||
/*
|
||||
* Have the menu object created
|
||||
*/
|
||||
SFG_Menu* menu = g_new0( SFG_Menu, 1 );
|
||||
gint fakeArgc = 0;
|
||||
|
||||
/*
|
||||
* If the freeglut internals haven't been initialized yet,
|
||||
* do it now. Hack's idea courtesy of Chris Purnell...
|
||||
*/
|
||||
if( fgState.Timer == NULL )
|
||||
glutInit( &fakeArgc, NULL );
|
||||
|
||||
/*
|
||||
* Initialize the object properties:
|
||||
*/
|
||||
menu->ID = ++fgStructure.MenuID;
|
||||
menu->Callback = menuCallback;
|
||||
|
||||
/*
|
||||
* Add it to the menu structure hierarchy
|
||||
*/
|
||||
fgStructure.Menus = g_list_append( fgStructure.Menus, menu );
|
||||
|
||||
/*
|
||||
* Newly created menus implicitly become current ones
|
||||
*/
|
||||
fgStructure.Menu = menu;
|
||||
|
||||
/*
|
||||
* Return the result to the caller
|
||||
*/
|
||||
return( menu );
|
||||
}
|
||||
|
||||
/*
|
||||
* This function destroys a window and all of it's subwindows. Actually,
|
||||
* another function, defined in freeglut_window.c is called, but this is
|
||||
* a whole different story...
|
||||
*/
|
||||
void fgDestroyWindow( SFG_Window* window, gboolean needToClose )
|
||||
{
|
||||
int i;
|
||||
|
||||
g_assert( window != NULL );
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* Does this window have any subwindows?
|
||||
*/
|
||||
if( window->Children != NULL )
|
||||
{
|
||||
/*
|
||||
* OKi, while there are any subwindows left...
|
||||
*/
|
||||
while( g_list_first( window->Children ) != NULL )
|
||||
{
|
||||
SFG_Window* subWindow = g_list_first( window->Children )->data;
|
||||
|
||||
/*
|
||||
* Destroy the first window in the list (possibly destroying
|
||||
* it's subwindows too. This is not very effective, but works
|
||||
*/
|
||||
fgDestroyWindow( subWindow, TRUE );
|
||||
|
||||
/*
|
||||
* Remove the just destroyed node from the subwindows list
|
||||
*/
|
||||
window->Children = g_list_remove( window->Children, subWindow );
|
||||
}
|
||||
|
||||
/*
|
||||
* Have the list freed now (probably it already is, but you can
|
||||
* never be sure with no GLib documentation on your hdd...)
|
||||
*/
|
||||
g_list_free( window->Children );
|
||||
window->Children = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we should remove the reference to this window from it's parent
|
||||
*/
|
||||
if( window->Parent != NULL )
|
||||
window->Parent->Children = g_list_remove( window->Parent->Children, window );
|
||||
|
||||
/*
|
||||
* OK, this window seems disconnected from the structure enough
|
||||
* in order to be closed without any bigger risks...
|
||||
*/
|
||||
if( needToClose == TRUE )
|
||||
fgCloseWindow( window );
|
||||
|
||||
/*
|
||||
* Try removing the window from the parents list in fgStructure.
|
||||
* This might fail as the window is not guaranteed to be there:
|
||||
*/
|
||||
fgStructure.Windows = g_list_remove( fgStructure.Windows, window );
|
||||
|
||||
/*
|
||||
* Check if the window is the current one...
|
||||
*/
|
||||
if( fgStructure.Window == window )
|
||||
fgStructure.Window = NULL;
|
||||
|
||||
/*
|
||||
* Finally, we can delete the window's object. It hopefully does
|
||||
* have everything inside it freed and we do not have to care...
|
||||
*/
|
||||
g_free( window );
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a helper static function that removes a menu (given it's pointer)
|
||||
* from any windows that can be accessed from a given parent...
|
||||
*/
|
||||
static void fghRemoveMenuFromWindow( SFG_Window* window, SFG_Menu* menu )
|
||||
{
|
||||
gint i;
|
||||
|
||||
/*
|
||||
* Check if the menu is attached to the current window,
|
||||
* if so, have it detached (by overwriting with a NULL):
|
||||
*/
|
||||
for( i=0; i<3; i++ )
|
||||
if( window->Menu[ i ] == menu )
|
||||
window->Menu[ i ] = NULL;
|
||||
|
||||
/*
|
||||
* Call this function for all of the window's children recursively:
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( window->Children ); i++ )
|
||||
fghRemoveMenuFromWindow(
|
||||
(SFG_Window *) g_list_nth( window->Children, i )->data,
|
||||
menu
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a static helper function that removes menu references
|
||||
* from another menu, given two pointers to them...
|
||||
*/
|
||||
static void fghRemoveMenuFromMenu( SFG_Menu* from, SFG_Menu* menu )
|
||||
{
|
||||
gboolean found = FALSE;
|
||||
|
||||
/*
|
||||
* Do not allow removing a menu from itself...
|
||||
*/
|
||||
if( from == menu )
|
||||
return;
|
||||
|
||||
/*
|
||||
* Look up for the first entry that matches the given
|
||||
* menu and have it removed, then search again and again:
|
||||
*/
|
||||
do
|
||||
{
|
||||
/*
|
||||
* Try searching for the incriminated menu entry
|
||||
*/
|
||||
GList* where = g_list_find( from->Entries, menu );
|
||||
|
||||
/*
|
||||
* Make sure we still have a list to be searched
|
||||
*/
|
||||
if( where != NULL )
|
||||
{
|
||||
/*
|
||||
* Did we actually find the menu entry we want to remove?
|
||||
*/
|
||||
found = ((SFG_Menu *) where->data == menu);
|
||||
|
||||
/*
|
||||
* Need to check that, as the search might have failed
|
||||
*/
|
||||
if( found )
|
||||
from->Entries = g_list_remove( from->Entries, menu );
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* It would be nice if we had a stop rule ;-)
|
||||
*/
|
||||
found = FALSE;
|
||||
}
|
||||
} while( found == TRUE );
|
||||
}
|
||||
|
||||
/*
|
||||
* This function destroys a menu specified by the parameter. All menus
|
||||
* and windows are updated to make sure no ill pointers hang around.
|
||||
*/
|
||||
void fgDestroyMenu( SFG_Menu* menu )
|
||||
{
|
||||
gint i;
|
||||
|
||||
g_assert( menu != NULL );
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* First of all, have all references to this menu removed from all windows:
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( fgStructure.Windows ); i++ )
|
||||
fghRemoveMenuFromWindow(
|
||||
(SFG_Window *) g_list_nth( fgStructure.Windows, i )->data,
|
||||
menu
|
||||
);
|
||||
|
||||
/*
|
||||
* Now proceed with removing menu entries that lead to this menu
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( fgStructure.Menus ); i++ )
|
||||
fghRemoveMenuFromMenu(
|
||||
(SFG_Menu *) g_list_nth( fgStructure.Menus, i )->data,
|
||||
menu
|
||||
);
|
||||
|
||||
/*
|
||||
* Now we are pretty sure the menu is not used anywhere
|
||||
* and that we can remove all of it's entries
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( menu->Entries ); i++ )
|
||||
{
|
||||
SFG_MenuEntry* entry = (SFG_MenuEntry *) g_list_nth( menu->Entries, i )->data;
|
||||
|
||||
/*
|
||||
* There might be a string allocated, have it freed:
|
||||
*/
|
||||
g_string_free( entry->Text, TRUE );
|
||||
|
||||
/*
|
||||
* Deallocate the entry itself:
|
||||
*/
|
||||
g_free( entry );
|
||||
}
|
||||
|
||||
/*
|
||||
* Deallocate the entries list
|
||||
*/
|
||||
g_list_free( menu->Entries );
|
||||
menu->Entries = NULL;
|
||||
|
||||
/*
|
||||
* Remove the menu from the menus list
|
||||
*/
|
||||
fgStructure.Menus = g_list_remove( fgStructure.Menus, menu );
|
||||
|
||||
/*
|
||||
* If that menu was the current one...
|
||||
*/
|
||||
if( fgStructure.Menu == menu )
|
||||
fgStructure.Menu = NULL;
|
||||
|
||||
/*
|
||||
* Have the menu structure freed
|
||||
*/
|
||||
g_free( menu );
|
||||
}
|
||||
|
||||
/*
|
||||
* This function should be called on glutInit(). It will prepare the internal
|
||||
* structure of freeglut to be used in the application. The structure will be
|
||||
* destroyed using fgDestroyStructure() on glutMainLoop() return. In that
|
||||
* case further use of freeglut should be preceeded with a glutInit() call.
|
||||
*/
|
||||
void fgCreateStructure( void )
|
||||
{
|
||||
/*
|
||||
* We will be needing two lists: the first containing windows, and the second
|
||||
* containing the user-defined menus. However we do not need allocating anything,
|
||||
* as it is done automagically by GLib when appending new entries to both of them.
|
||||
* Also, no current window/menu is set, as none has been created yet.
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is automatically called on glutMainLoop() return. It should deallocate
|
||||
* and destroy all remnants of previous glutInit()-enforced structure initialization...
|
||||
*/
|
||||
void fgDestroyStructure( void )
|
||||
{
|
||||
/*
|
||||
* Just make sure we are not called in vain...
|
||||
*/
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* Make sure all windows and menus have been deallocated
|
||||
*/
|
||||
while( fgStructure.Windows != NULL )
|
||||
fgDestroyWindow( (SFG_Window *) g_list_first( fgStructure.Windows )->data, TRUE );
|
||||
|
||||
while( fgStructure.Menus != NULL )
|
||||
fgDestroyMenu( (SFG_Menu *) g_list_first( fgStructure.Menus )->data );
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to enumerate through all registered top-level windows
|
||||
*/
|
||||
void fgEnumWindows( GFunc enumCallback, SFG_Enumerator* enumerator )
|
||||
{
|
||||
gint i;
|
||||
|
||||
g_assert( (enumCallback != NULL) && (enumerator != NULL) );
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* Check every of the top-level windows
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( fgStructure.Windows ); i++ )
|
||||
{
|
||||
/*
|
||||
* Execute the callback...
|
||||
*/
|
||||
enumCallback( (gpointer) g_list_nth( fgStructure.Windows, i )->data, (gpointer) enumerator );
|
||||
|
||||
/*
|
||||
* If it has been marked as 'found', stop searching
|
||||
*/
|
||||
if( enumerator->found == TRUE )
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to enumerate through all a window's subwindows (single level descent)
|
||||
*/
|
||||
void fgEnumSubWindows( SFG_Window* window, GFunc enumCallback, SFG_Enumerator* enumerator )
|
||||
{
|
||||
gint i;
|
||||
|
||||
g_assert( (enumCallback != NULL) && (enumerator != NULL) );
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* Check every of the window's children:
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( window->Children ); i++ )
|
||||
{
|
||||
/*
|
||||
* Execute the callback...
|
||||
*/
|
||||
enumCallback( (gpointer) g_list_nth( window->Children, i )->data, (gpointer) enumerator );
|
||||
|
||||
/*
|
||||
* If it has been marked as 'found', stop searching
|
||||
*/
|
||||
if( enumerator->found == TRUE )
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* A static helper function to look for a window given it's handle
|
||||
*/
|
||||
static void fghcbWindowByHandle( gpointer window, gpointer enumerator )
|
||||
{
|
||||
/*
|
||||
* Make sure we do not overwrite our precious results...
|
||||
*/
|
||||
freeglut_return_if_fail( ((SFG_Enumerator *) enumerator)->found == FALSE );
|
||||
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
#define WBHANDLE (Window)
|
||||
#elif TARGET_HOST_WIN32
|
||||
#define WBHANDLE (HWND)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Check the window's handle. Hope this works. Looks ugly. That's for sure.
|
||||
*/
|
||||
if( ((SFG_Window *) window)->Window.Handle == (WBHANDLE ((SFG_Enumerator *) enumerator)->data) )
|
||||
{
|
||||
((SFG_Enumerator *) enumerator)->found = TRUE;
|
||||
((SFG_Enumerator *) enumerator)->data = (gpointer) window;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise, check this window's children
|
||||
*/
|
||||
fgEnumSubWindows( (SFG_Window *) window, fghcbWindowByHandle, enumerator );
|
||||
|
||||
#undef WBHANDLE
|
||||
}
|
||||
|
||||
/*
|
||||
* fgWindowByHandle returns a (SFG_Window *) value pointing to the
|
||||
* first window in the queue matching the specified window handle.
|
||||
* The function is defined in freeglut_structure.c file.
|
||||
*/
|
||||
SFG_Window* fgWindowByHandle
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
( Window hWindow )
|
||||
#elif TARGET_HOST_WIN32
|
||||
( HWND hWindow )
|
||||
#endif
|
||||
{
|
||||
SFG_Enumerator enumerator;
|
||||
|
||||
/*
|
||||
* This is easy and makes use of the windows enumeration defined above
|
||||
*/
|
||||
enumerator.found = FALSE;
|
||||
enumerator.data = (gpointer) hWindow;
|
||||
|
||||
/*
|
||||
* Start the enumeration now:
|
||||
*/
|
||||
fgEnumWindows( fghcbWindowByHandle, &enumerator );
|
||||
|
||||
/*
|
||||
* Check if the window has been found or not:
|
||||
*/
|
||||
if( enumerator.found == TRUE )
|
||||
return( (SFG_Window *) enumerator.data );
|
||||
|
||||
/*
|
||||
* Otherwise return NULL to mark the failure
|
||||
*/
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
* A static helper function to look for a window given it's ID
|
||||
*/
|
||||
static void fghcbWindowByID( gpointer window, gpointer enumerator )
|
||||
{
|
||||
/*
|
||||
* Make sure we do not overwrite our precious results...
|
||||
*/
|
||||
g_return_if_fail( ((SFG_Enumerator *) enumerator)->found == FALSE );
|
||||
|
||||
/*
|
||||
* Check the window's handle. Hope this works. Looks ugly. That's for sure.
|
||||
*/
|
||||
if( ((SFG_Window *) window)->ID == (gint) (((SFG_Enumerator *) enumerator)->data) )
|
||||
{
|
||||
((SFG_Enumerator *) enumerator)->found = TRUE;
|
||||
((SFG_Enumerator *) enumerator)->data = (gpointer) window;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Otherwise, check this window's children
|
||||
*/
|
||||
fgEnumSubWindows( (SFG_Window *) window, fghcbWindowByID, enumerator );
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is similiar to the previous one, except it is
|
||||
* looking for a specified (sub)window identifier. The function
|
||||
* is defined in freeglut_structure.c file.
|
||||
*/
|
||||
SFG_Window* fgWindowByID( gint windowID )
|
||||
{
|
||||
SFG_Enumerator enumerator;
|
||||
|
||||
/*
|
||||
* Uses a method very similiar for fgWindowByHandle...
|
||||
*/
|
||||
enumerator.found = FALSE;
|
||||
enumerator.data = (gpointer) windowID;
|
||||
|
||||
/*
|
||||
* Start the enumeration now:
|
||||
*/
|
||||
fgEnumWindows( fghcbWindowByID, &enumerator );
|
||||
|
||||
/*
|
||||
* Check if the window has been found or not:
|
||||
*/
|
||||
if( enumerator.found == TRUE )
|
||||
return( (SFG_Window *) enumerator.data );
|
||||
|
||||
/*
|
||||
* Otherwise return NULL to mark the failure
|
||||
*/
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
/*
|
||||
* Looks up a menu given it's ID. This is easier that fgWindowByXXX
|
||||
* as all menus are placed in a single doubly linked list...
|
||||
*/
|
||||
SFG_Menu* fgMenuByID( gint menuID )
|
||||
{
|
||||
SFG_Menu *menu = NULL;
|
||||
gint i;
|
||||
|
||||
freeglut_assert_ready;
|
||||
|
||||
/*
|
||||
* It's enough to check all entries in fgStructure.Menus...
|
||||
*/
|
||||
for( i=0; i<(gint) g_list_length( fgStructure.Menus ); i++ )
|
||||
{
|
||||
/*
|
||||
* Grab the n-th element of the menu objects list...
|
||||
*/
|
||||
menu = (SFG_Menu *) g_list_nth( fgStructure.Menus, i )->data;
|
||||
|
||||
/*
|
||||
* Does the ID number match?
|
||||
*/
|
||||
if( menu->ID == menuID )
|
||||
return( menu );
|
||||
}
|
||||
|
||||
/*
|
||||
* We have not found the requested menu ID
|
||||
*/
|
||||
return( NULL );
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
248
freeglut/freeglut/freeglut-1.3/freeglut_teapot.c
Normal file
248
freeglut/freeglut/freeglut-1.3/freeglut_teapot.c
Normal file
@ -0,0 +1,248 @@
|
||||
/*
|
||||
* freeglut_teapot.c
|
||||
*
|
||||
* Teapot(tm) rendering code.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Fri Dec 24 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Original teapot code copyright follows:
|
||||
*/
|
||||
|
||||
/*
|
||||
* (c) Copyright 1993, 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.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-teapot"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
|
||||
/* -- PRIVATE FUNCTIONS ---------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Rim, body, lid, and bottom data must be reflected in x and y;
|
||||
* handle and spout data across the y axis only.
|
||||
*/
|
||||
static int patchdata[][16] =
|
||||
{
|
||||
{ 102, 103, 104, 105, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, /* rim */
|
||||
{ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, /* body */
|
||||
{ 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 },
|
||||
{ 96, 96, 96, 96, 97, 98, 99, 100, 101, 101, 101, 101, 0, 1, 2, 3 }, /* lid */
|
||||
{ 0, 1, 2, 3, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117 },
|
||||
{ 118, 118, 118, 118, 124, 122, 119, 121, 123, 126, 125, 120, 40, 39, 38, 37 }, /* bottom */
|
||||
{ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56 }, /* handle */
|
||||
{ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 28, 65, 66, 67 },
|
||||
{ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83 }, /* spout */
|
||||
{ 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95 }
|
||||
};
|
||||
|
||||
static float cpdata[][3] =
|
||||
{
|
||||
{0.2, 0, 2.7}, {0.2, -0.112, 2.7}, {0.112, -0.2, 2.7}, {0,
|
||||
-0.2, 2.7}, {1.3375, 0, 2.53125}, {1.3375, -0.749, 2.53125},
|
||||
{0.749, -1.3375, 2.53125}, {0, -1.3375, 2.53125}, {1.4375,
|
||||
0, 2.53125}, {1.4375, -0.805, 2.53125}, {0.805, -1.4375,
|
||||
2.53125}, {0, -1.4375, 2.53125}, {1.5, 0, 2.4}, {1.5, -0.84,
|
||||
2.4}, {0.84, -1.5, 2.4}, {0, -1.5, 2.4}, {1.75, 0, 1.875},
|
||||
{1.75, -0.98, 1.875}, {0.98, -1.75, 1.875}, {0, -1.75,
|
||||
1.875}, {2, 0, 1.35}, {2, -1.12, 1.35}, {1.12, -2, 1.35},
|
||||
{0, -2, 1.35}, {2, 0, 0.9}, {2, -1.12, 0.9}, {1.12, -2,
|
||||
0.9}, {0, -2, 0.9}, {-2, 0, 0.9}, {2, 0, 0.45}, {2, -1.12,
|
||||
0.45}, {1.12, -2, 0.45}, {0, -2, 0.45}, {1.5, 0, 0.225},
|
||||
{1.5, -0.84, 0.225}, {0.84, -1.5, 0.225}, {0, -1.5, 0.225},
|
||||
{1.5, 0, 0.15}, {1.5, -0.84, 0.15}, {0.84, -1.5, 0.15}, {0,
|
||||
-1.5, 0.15}, {-1.6, 0, 2.025}, {-1.6, -0.3, 2.025}, {-1.5,
|
||||
-0.3, 2.25}, {-1.5, 0, 2.25}, {-2.3, 0, 2.025}, {-2.3, -0.3,
|
||||
2.025}, {-2.5, -0.3, 2.25}, {-2.5, 0, 2.25}, {-2.7, 0,
|
||||
2.025}, {-2.7, -0.3, 2.025}, {-3, -0.3, 2.25}, {-3, 0,
|
||||
2.25}, {-2.7, 0, 1.8}, {-2.7, -0.3, 1.8}, {-3, -0.3, 1.8},
|
||||
{-3, 0, 1.8}, {-2.7, 0, 1.575}, {-2.7, -0.3, 1.575}, {-3,
|
||||
-0.3, 1.35}, {-3, 0, 1.35}, {-2.5, 0, 1.125}, {-2.5, -0.3,
|
||||
1.125}, {-2.65, -0.3, 0.9375}, {-2.65, 0, 0.9375}, {-2,
|
||||
-0.3, 0.9}, {-1.9, -0.3, 0.6}, {-1.9, 0, 0.6}, {1.7, 0,
|
||||
1.425}, {1.7, -0.66, 1.425}, {1.7, -0.66, 0.6}, {1.7, 0,
|
||||
0.6}, {2.6, 0, 1.425}, {2.6, -0.66, 1.425}, {3.1, -0.66,
|
||||
0.825}, {3.1, 0, 0.825}, {2.3, 0, 2.1}, {2.3, -0.25, 2.1},
|
||||
{2.4, -0.25, 2.025}, {2.4, 0, 2.025}, {2.7, 0, 2.4}, {2.7,
|
||||
-0.25, 2.4}, {3.3, -0.25, 2.4}, {3.3, 0, 2.4}, {2.8, 0,
|
||||
2.475}, {2.8, -0.25, 2.475}, {3.525, -0.25, 2.49375},
|
||||
{3.525, 0, 2.49375}, {2.9, 0, 2.475}, {2.9, -0.15, 2.475},
|
||||
{3.45, -0.15, 2.5125}, {3.45, 0, 2.5125}, {2.8, 0, 2.4},
|
||||
{2.8, -0.15, 2.4}, {3.2, -0.15, 2.4}, {3.2, 0, 2.4}, {0, 0,
|
||||
3.15}, {0.8, 0, 3.15}, {0.8, -0.45, 3.15}, {0.45, -0.8,
|
||||
3.15}, {0, -0.8, 3.15}, {0, 0, 2.85}, {1.4, 0, 2.4}, {1.4,
|
||||
-0.784, 2.4}, {0.784, -1.4, 2.4}, {0, -1.4, 2.4}, {0.4, 0,
|
||||
2.55}, {0.4, -0.224, 2.55}, {0.224, -0.4, 2.55}, {0, -0.4,
|
||||
2.55}, {1.3, 0, 2.55}, {1.3, -0.728, 2.55}, {0.728, -1.3,
|
||||
2.55}, {0, -1.3, 2.55}, {1.3, 0, 2.4}, {1.3, -0.728, 2.4},
|
||||
{0.728, -1.3, 2.4}, {0, -1.3, 2.4}, {0, 0, 0}, {1.425,
|
||||
-0.798, 0}, {1.5, 0, 0.075}, {1.425, 0, 0}, {0.798, -1.425,
|
||||
0}, {0, -1.5, 0.075}, {0, -1.425, 0}, {1.5, -0.84, 0.075},
|
||||
{0.84, -1.5, 0.075}
|
||||
};
|
||||
|
||||
static float tex[2][2][2] =
|
||||
{
|
||||
{ {0, 0}, {1, 0} },
|
||||
{ {0, 1}, {1, 1} }
|
||||
};
|
||||
|
||||
static void teapot( GLint grid, GLdouble scale, GLenum type )
|
||||
{
|
||||
float p[4][4][3], q[4][4][3], r[4][4][3], s[4][4][3];
|
||||
long i, j, k, l;
|
||||
|
||||
glPushAttrib( GL_ENABLE_BIT | GL_EVAL_BIT );
|
||||
glEnable( GL_AUTO_NORMAL );
|
||||
glEnable( GL_NORMALIZE );
|
||||
glEnable( GL_MAP2_VERTEX_3 );
|
||||
glEnable( GL_MAP2_TEXTURE_COORD_2 );
|
||||
|
||||
glPushMatrix();
|
||||
glRotatef(270.0, 1.0, 0.0, 0.0);
|
||||
glScalef(0.5 * scale, 0.5 * scale, 0.5 * scale);
|
||||
glTranslatef(0.0, 0.0, -1.5);
|
||||
|
||||
for (i = 0; i < 10; i++) {
|
||||
for (j = 0; j < 4; j++) {
|
||||
for (k = 0; k < 4; k++) {
|
||||
for (l = 0; l < 3; l++) {
|
||||
p[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
|
||||
q[j][k][l] = cpdata[patchdata[i][j * 4 + (3 - k)]][l];
|
||||
if (l == 1)
|
||||
q[j][k][l] *= -1.0;
|
||||
if (i < 6) {
|
||||
r[j][k][l] =
|
||||
cpdata[patchdata[i][j * 4 + (3 - k)]][l];
|
||||
if (l == 0)
|
||||
r[j][k][l] *= -1.0;
|
||||
s[j][k][l] = cpdata[patchdata[i][j * 4 + k]][l];
|
||||
if (l == 0)
|
||||
s[j][k][l] *= -1.0;
|
||||
if (l == 1)
|
||||
s[j][k][l] *= -1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glMap2f(GL_MAP2_TEXTURE_COORD_2, 0, 1, 2, 2, 0, 1, 4, 2,
|
||||
&tex[0][0][0]);
|
||||
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
|
||||
&p[0][0][0]);
|
||||
glMapGrid2f(grid, 0.0, 1.0, grid, 0.0, 1.0);
|
||||
glEvalMesh2(type, 0, grid, 0, grid);
|
||||
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
|
||||
&q[0][0][0]);
|
||||
glEvalMesh2(type, 0, grid, 0, grid);
|
||||
if (i < 6) {
|
||||
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
|
||||
&r[0][0][0]);
|
||||
glEvalMesh2(type, 0, grid, 0, grid);
|
||||
glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4, 0, 1, 12, 4,
|
||||
&s[0][0][0]);
|
||||
glEvalMesh2(type, 0, grid, 0, grid);
|
||||
}
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
glPopAttrib();
|
||||
}
|
||||
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Renders a beautiful wired teapot...
|
||||
*/
|
||||
void FGAPIENTRY glutWireTeapot( GLdouble size )
|
||||
{
|
||||
/*
|
||||
* We will use the general teapot rendering code
|
||||
*/
|
||||
teapot( 10, size, GL_LINE );
|
||||
}
|
||||
|
||||
/*
|
||||
* Renders a beautiful filled teapot...
|
||||
*/
|
||||
void FGAPIENTRY glutSolidTeapot( GLdouble size )
|
||||
{
|
||||
/*
|
||||
* We will use the general teapot rendering code
|
||||
*/
|
||||
teapot( 7, size, GL_FILL );
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
||||
|
||||
|
||||
|
||||
|
||||
|
56
freeglut/freeglut/freeglut-1.3/freeglut_videoresize.c
Normal file
56
freeglut/freeglut/freeglut-1.3/freeglut_videoresize.c
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* freeglut_videoresize.c
|
||||
*
|
||||
* Video resize functions (as defined by GLUT API)
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 16 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#define G_LOG_DOMAIN "freeglut-videoresize"
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
#include "../include/GL/freeglut_internal.h"
|
||||
|
||||
/*
|
||||
* NOTE: functions declared in this file probably will not be implemented.
|
||||
*/
|
||||
|
||||
/* -- INTERFACE FUNCTIONS -------------------------------------------------- */
|
||||
|
||||
int FGAPIENTRY glutVideoResizeGet( GLenum eWhat ) { return( 0x00 ); }
|
||||
void FGAPIENTRY glutSetupVideoResizing( void ) { /* Not implemented */ }
|
||||
void FGAPIENTRY glutStopVideoResizing( void ) { /* Not implemented */ }
|
||||
void FGAPIENTRY glutVideoResize( int x, int y, int w, int h ) { /* Not implemented */ }
|
||||
void FGAPIENTRY glutVideoPan( int x, int y, int w, int h ) { /* Not implemented */ }
|
||||
|
||||
/*** END OF FILE ***/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1099
freeglut/freeglut/freeglut-1.3/freeglut_window.c
Normal file
1099
freeglut/freeglut/freeglut-1.3/freeglut_window.c
Normal file
File diff suppressed because it is too large
Load Diff
17
freeglut/freeglut/freeglut-1.3/templates/cpp_template
Normal file
17
freeglut/freeglut/freeglut-1.3/templates/cpp_template
Normal file
@ -0,0 +1,17 @@
|
||||
INVALID TEMPLATE, MOVED TO XFREE86-STYLE LICENSE
|
||||
|
||||
/*
|
||||
* |FILENAME|
|
||||
*
|
||||
* Here comes the file's contents description.
|
||||
*
|
||||
* Copyright (c) |YEAR| by |AUTHOR|
|
||||
* Written by |AUTHOR|, <|EMAIL|>
|
||||
* Creation date: |DATE|
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
17
freeglut/freeglut/freeglut-1.3/templates/header_template
Normal file
17
freeglut/freeglut/freeglut-1.3/templates/header_template
Normal file
@ -0,0 +1,17 @@
|
||||
INVALID TEMPLATE, MOVED TO XFREE86-STYLE LICENSE
|
||||
|
||||
/*
|
||||
* |FILENAME|
|
||||
*
|
||||
* Here comes the file's contents description.
|
||||
*
|
||||
* Copyright (c) |YEAR| by |AUTHOR|
|
||||
* Written by |AUTHOR|, <|EMAIL|>
|
||||
* Creation date: |DATE|
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*/
|
||||
|
29
freeglut/freeglut/freeglut.dsw
Executable file
29
freeglut/freeglut/freeglut.dsw
Executable file
@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 5.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "freeglut13"=.\freeglut13.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
176
freeglut/freeglut/freeglut.kdevprj
Normal file
176
freeglut/freeglut/freeglut.kdevprj
Normal file
@ -0,0 +1,176 @@
|
||||
# KDE Config File
|
||||
[include/freeglut.h]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=HEADER
|
||||
[include/Makefile.am]
|
||||
files=include/GL/freeglut.h,include/GL/freeglut_internal.h,
|
||||
sub_dirs=
|
||||
type=normal
|
||||
[Workspace_1]
|
||||
openfiles=Nienazwany.h,Nienazwany.cpp,/home/olszta/freeglut/include/GL/freeglut_internal.h,/home/olszta/freeglut/freeglut-1.3/freeglut_callbacks.c,/home/olszta/freeglut/freeglut-1.3/freeglut_gamemode.c,/home/olszta/freeglut/freeglut-1.3/freeglut_init.c,/home/olszta/freeglut/freeglut-1.3/freeglut_main.c,/home/olszta/freeglut/freeglut-1.3/freeglut_window.c,/home/olszta/freeglut/freeglut-1.3/freeglut_misc.c,/home/olszta/freeglut/include/GL/freeglut.h,/home/olszta/freeglut/freeglut-1.3/freeglut_cursor.c,/home/olszta/freeglut/freeglut-1.3/freeglut_geometry.c,/home/olszta/freeglut/freeglut-1.3/freeglut_font_data.c,/home/olszta/freeglut/freeglut-1.3/freeglut_videoresize.c,/home/olszta/freeglut/freeglut-1.3/freeglut_teapot.c,/home/olszta/freeglut/freeglut-1.3/freeglut_structure.c,/home/olszta/freeglut/freeglut-1.3/freeglut_state.c,
|
||||
show_outputview=true
|
||||
show_treeview=true
|
||||
header_file=/home/olszta/freeglut/include/GL/freeglut.h
|
||||
cpp_file=/home/olszta/freeglut/freeglut-1.3/freeglut_state.c
|
||||
browser_file=file:/usr/doc/kde/HTML/default/kdevelop/welcome/index.html
|
||||
[COPYING]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
||||
[freeglut-1.3/freeglut_videoresize.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[freeglut-1.3/docs/Makefile.am]
|
||||
type=normal
|
||||
sub_dirs=
|
||||
[Config for BinMakefileAm]
|
||||
ldflags=
|
||||
bin_program=freeglut
|
||||
cxxflags=-O0 -g3 -Wall
|
||||
[po/Makefile.am]
|
||||
type=po
|
||||
sub_dirs=
|
||||
[freeglut-1.3/Makefile.am]
|
||||
files=freeglut-1.3/freeglut_callbacks.c,freeglut-1.3/freeglut_cursor.c,freeglut-1.3/freeglut_display.c,freeglut-1.3/freeglut_font.c,freeglut-1.3/freeglut_font_data.c,freeglut-1.3/freeglut_gamemode.c,freeglut-1.3/freeglut_geometry.c,freeglut-1.3/freeglut_init.c,freeglut-1.3/freeglut_joystick.c,freeglut-1.3/freeglut_main.c,freeglut-1.3/freeglut_menu.c,freeglut-1.3/freeglut_misc.c,freeglut-1.3/freeglut_overlay.c,freeglut-1.3/freeglut_state.c,freeglut-1.3/freeglut_structure.c,freeglut-1.3/freeglut_teapot.c,freeglut-1.3/freeglut_videoresize.c,freeglut-1.3/freeglut_window.c,
|
||||
type=prog_main
|
||||
sub_dirs=
|
||||
[freeglut.kdevprj]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
||||
[README]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
||||
[freeglut-1.3/freeglut_gamemode.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[freeglut-1.3/freeglut_menu.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[LFV Groups]
|
||||
GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS,
|
||||
Others=*,
|
||||
groups=Headers,Sources,GNU,Others,
|
||||
Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l,
|
||||
Headers=*.h,*.hxx,*.hpp,*.H,
|
||||
[freeglut-1.3/docs/en/Makefile.am]
|
||||
type=normal
|
||||
sub_dirs=
|
||||
[freeglut-1.3/freeglut_font.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[freeglut-1.3/freeglut_window.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[freeglut-1.3/freeglut_main.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[freeglut-1.3/freeglut_state.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[freeglut-1.3/freeglut_callbacks.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[include/GL/freeglut_internal.h]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=HEADER
|
||||
[freeglut-1.3/freeglut_structure.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[ChangeLog]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
||||
[freeglut-1.3/freeglut_geometry.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[General]
|
||||
makefiles=Makefile.am,freeglut-1.3/Makefile.am,freeglut-1.3/docs/Makefile.am,freeglut-1.3/docs/en/Makefile.am,po/Makefile.am,include/Makefile.am,
|
||||
version_control=None
|
||||
project_type=normal_empty
|
||||
author=Pawel W. Olszta
|
||||
sub_dir=freeglut-1.3/
|
||||
lfv_open_groups=Headers,Sources,
|
||||
workspace=1
|
||||
project_name=freeglut
|
||||
version=0.1
|
||||
email=olszta@sourceforge.net
|
||||
kdevprj_version=1.0beta2
|
||||
[INSTALL]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
||||
[TODO]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
||||
[freeglut-1.3/freeglut_init.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[freeglut-1.3/freeglut_display.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[freeglut-1.3/freeglut_overlay.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[freeglut.lsm]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
||||
[freeglut-1.3/freeglut_misc.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[Makefile.am]
|
||||
files=freeglut.kdevprj,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,freeglut.lsm,
|
||||
type=normal
|
||||
sub_dirs=freeglut-1.3,include,
|
||||
[freeglut-1.3/freeglut_cursor.c]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=SOURCE
|
||||
[AUTHORS]
|
||||
install_location=
|
||||
dist=true
|
||||
install=false
|
||||
type=DATA
|
14
freeglut/freeglut/freeglut.lsm
Normal file
14
freeglut/freeglut/freeglut.lsm
Normal file
@ -0,0 +1,14 @@
|
||||
Begin3
|
||||
Title: freeglut-1.3
|
||||
Version: 0.1 alpha
|
||||
Entered-date:
|
||||
Description: The free OpenGL utility toolkit, alternative to the GLUT library
|
||||
Keywords:
|
||||
Author: Pawel W. Olszta <olszta@users.sourceforge.net>
|
||||
Maintained-by: Pawel W. Olszta <olszta@users.sourceforge.net>
|
||||
Primary-site: http://freeglut.sourceforge.net
|
||||
Home-page: http://freeglut.sourceforge.net
|
||||
Original-site:
|
||||
Platforms: Linux and other Unices
|
||||
Copying-policy: X-Consortium style license
|
||||
End
|
178
freeglut/freeglut/freeglut13.dsp
Executable file
178
freeglut/freeglut/freeglut13.dsp
Executable file
@ -0,0 +1,178 @@
|
||||
# Microsoft Developer Studio Project File - Name="freeglut13" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=freeglut13 - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "freeglut13.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "freeglut13.mak" CFG="freeglut13 - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "freeglut13 - Win32 Release" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "freeglut13 - Win32 Debug" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "freeglut13 - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x415 /d "NDEBUG"
|
||||
# ADD RSC /l 0x415 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "freeglut13 - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x415 /d "_DEBUG"
|
||||
# ADD RSC /l 0x415 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "freeglut13 - Win32 Release"
|
||||
# Name "freeglut13 - Win32 Debug"
|
||||
# Begin Group "Sources"
|
||||
|
||||
# PROP Default_Filter "*.c"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_callbacks.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_cursor.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_display.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_font.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_font_data.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_gamemode.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_geometry.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_init.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_joystick.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_main.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_menu.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_misc.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_overlay.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_state.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_structure.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_teapot.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_videoresize.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\freeglut-1.3\freeglut_window.c"
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Headers"
|
||||
|
||||
# PROP Default_Filter "*.h"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\include\Gl\freeglut.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\include\Gl\freeglut_internal.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
49
freeglut/freeglut/freeglut13.plg
Executable file
49
freeglut/freeglut/freeglut13.plg
Executable file
@ -0,0 +1,49 @@
|
||||
--------------------Configuration: freeglut13 - Win32 Debug--------------------
|
||||
Begining build with project "c:\project\freeglut\freeglut13.dsp", at root.
|
||||
Active configuration is Win32 (x86) Dynamic-Link Library (based on Win32 (x86) Dynamic-Link Library)
|
||||
|
||||
Project's tools are:
|
||||
"32-bit C/C++ Compiler for 80x86" with flags "/nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp"Debug/freeglut13.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /c "
|
||||
"OLE Type Library Maker" with flags "/nologo /D "_DEBUG" /mktyplib203 /o NUL /win32 "
|
||||
"Win32 Resource Compiler" with flags "/l 0x415 /d "_DEBUG" "
|
||||
"Browser Database Maker" with flags "/nologo /o"Debug/freeglut13.bsc" "
|
||||
"COFF Linker for 80x86" with flags "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"Debug/freeglut13.pdb" /debug /machine:I386 /out:"Debug/freeglut13.dll" /implib:"Debug/freeglut13.lib" /pdbtype:sept "
|
||||
"Custom Build" with flags ""
|
||||
"<Component 0xa>" with flags ""
|
||||
|
||||
Creating temp file "C:\WINDOWS\TEMP\RSP170.TMP" with contents </nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp"Debug/freeglut13.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /c
|
||||
"C:\Project\freeglut\freeglut-1.3\freeglut_display.c"
|
||||
"C:\Project\freeglut\freeglut-1.3\freeglut_font.c"
|
||||
"C:\Project\freeglut\freeglut-1.3\freeglut_main.c"
|
||||
>
|
||||
Creating command line "cl.exe @C:\WINDOWS\TEMP\RSP170.TMP"
|
||||
Creating temp file "C:\WINDOWS\TEMP\RSP0171.TMP" with contents <kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /incremental:yes /pdb:"Debug/freeglut13.pdb" /debug /machine:I386 /out:"Debug/freeglut13.dll" /implib:"Debug/freeglut13.lib" /pdbtype:sept
|
||||
.\Debug\freeglut_window.obj
|
||||
.\Debug\freeglut_cursor.obj
|
||||
.\Debug\freeglut_display.obj
|
||||
.\Debug\freeglut_font.obj
|
||||
.\Debug\freeglut_font_data.obj
|
||||
.\Debug\freeglut_gamemode.obj
|
||||
.\Debug\freeglut_geometry.obj
|
||||
.\Debug\freeglut_init.obj
|
||||
.\Debug\freeglut_joystick.obj
|
||||
.\Debug\freeglut_main.obj
|
||||
.\Debug\freeglut_menu.obj
|
||||
.\Debug\freeglut_misc.obj
|
||||
.\Debug\freeglut_overlay.obj
|
||||
.\Debug\freeglut_state.obj
|
||||
.\Debug\freeglut_structure.obj
|
||||
.\Debug\freeglut_teapot.obj
|
||||
.\Debug\freeglut_videoresize.obj
|
||||
.\Debug\freeglut_callbacks.obj>
|
||||
Creating command line "link.exe @C:\WINDOWS\TEMP\RSP0171.TMP"
|
||||
Compiling...
|
||||
freeglut_display.c
|
||||
freeglut_font.c
|
||||
C:\Project\freeglut\freeglut-1.3\freeglut_font.c(133) : fatal error C1189: #error : glPushClientAttrib declaration missing
|
||||
freeglut_main.c
|
||||
Error executing cl.exe.
|
||||
|
||||
|
||||
|
||||
freeglut13.dll - 1 error(s), 0 warning(s)
|
64
freeglut/freeglut/genfonts/.deps/genfonts.P
Normal file
64
freeglut/freeglut/genfonts/.deps/genfonts.P
Normal file
@ -0,0 +1,64 @@
|
||||
genfonts.o: genfonts.c ../config.h /usr/include/X11/Xlib.h \
|
||||
/usr/include/sys/types.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/bits/types.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h \
|
||||
/usr/include/time.h /usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/X11/X.h /usr/include/X11/Xfuncproto.h \
|
||||
/usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h \
|
||||
/usr/include/glib.h /usr/include/glibconfig.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/bits/posix1_lim.h \
|
||||
/usr/include/bits/local_lim.h /usr/include/linux/limits.h \
|
||||
/usr/include/bits/posix2_lim.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/float.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h \
|
||||
/usr/include/string.h /usr/include/bits/string.h \
|
||||
/usr/include/bits/string2.h /usr/include/stdlib.h \
|
||||
/usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/bits/stdio.h
|
||||
genfonts.c :
|
||||
../config.h :
|
||||
/usr/include/X11/Xlib.h :
|
||||
/usr/include/sys/types.h :
|
||||
/usr/include/features.h :
|
||||
/usr/include/sys/cdefs.h :
|
||||
/usr/include/gnu/stubs.h :
|
||||
/usr/include/bits/types.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h :
|
||||
/usr/include/time.h :
|
||||
/usr/include/endian.h :
|
||||
/usr/include/bits/endian.h :
|
||||
/usr/include/sys/select.h :
|
||||
/usr/include/bits/select.h :
|
||||
/usr/include/bits/sigset.h :
|
||||
/usr/include/sys/sysmacros.h :
|
||||
/usr/include/X11/X.h :
|
||||
/usr/include/X11/Xfuncproto.h :
|
||||
/usr/include/X11/Xosdefs.h :
|
||||
/usr/include/X11/Xutil.h :
|
||||
/usr/include/glib.h :
|
||||
/usr/include/glibconfig.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/syslimits.h :
|
||||
/usr/include/limits.h :
|
||||
/usr/include/bits/posix1_lim.h :
|
||||
/usr/include/bits/local_lim.h :
|
||||
/usr/include/linux/limits.h :
|
||||
/usr/include/bits/posix2_lim.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/float.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h :
|
||||
/usr/include/string.h :
|
||||
/usr/include/bits/string.h :
|
||||
/usr/include/bits/string2.h :
|
||||
/usr/include/stdlib.h :
|
||||
/usr/include/alloca.h :
|
||||
/usr/include/stdio.h :
|
||||
/usr/include/libio.h :
|
||||
/usr/include/_G_config.h :
|
||||
/usr/include/bits/stdio_lim.h :
|
||||
/usr/include/bits/stdio.h :
|
57
freeglut/freeglut/genfonts/.deps/genstroke.P
Normal file
57
freeglut/freeglut/genfonts/.deps/genstroke.P
Normal file
@ -0,0 +1,57 @@
|
||||
genstroke.o: genstroke.c ../config.h /usr/include/glib.h \
|
||||
/usr/include/glibconfig.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/syslimits.h \
|
||||
/usr/include/limits.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/include/bits/posix1_lim.h /usr/include/bits/local_lim.h \
|
||||
/usr/include/linux/limits.h /usr/include/bits/posix2_lim.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/float.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h \
|
||||
/usr/include/string.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h \
|
||||
/usr/include/bits/string.h /usr/include/bits/string2.h \
|
||||
/usr/include/endian.h /usr/include/bits/endian.h \
|
||||
/usr/include/bits/types.h /usr/include/stdlib.h \
|
||||
/usr/include/sys/types.h /usr/include/time.h \
|
||||
/usr/include/sys/select.h /usr/include/bits/select.h \
|
||||
/usr/include/bits/sigset.h /usr/include/sys/sysmacros.h \
|
||||
/usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/bits/stdio.h
|
||||
genstroke.c :
|
||||
../config.h :
|
||||
/usr/include/glib.h :
|
||||
/usr/include/glibconfig.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/limits.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/syslimits.h :
|
||||
/usr/include/limits.h :
|
||||
/usr/include/features.h :
|
||||
/usr/include/sys/cdefs.h :
|
||||
/usr/include/gnu/stubs.h :
|
||||
/usr/include/bits/posix1_lim.h :
|
||||
/usr/include/bits/local_lim.h :
|
||||
/usr/include/linux/limits.h :
|
||||
/usr/include/bits/posix2_lim.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/float.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h :
|
||||
/usr/include/string.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h :
|
||||
/usr/include/bits/string.h :
|
||||
/usr/include/bits/string2.h :
|
||||
/usr/include/endian.h :
|
||||
/usr/include/bits/endian.h :
|
||||
/usr/include/bits/types.h :
|
||||
/usr/include/stdlib.h :
|
||||
/usr/include/sys/types.h :
|
||||
/usr/include/time.h :
|
||||
/usr/include/sys/select.h :
|
||||
/usr/include/bits/select.h :
|
||||
/usr/include/bits/sigset.h :
|
||||
/usr/include/sys/sysmacros.h :
|
||||
/usr/include/alloca.h :
|
||||
/usr/include/stdio.h :
|
||||
/usr/include/libio.h :
|
||||
/usr/include/_G_config.h :
|
||||
/usr/include/bits/stdio_lim.h :
|
||||
/usr/include/bits/stdio.h :
|
352
freeglut/freeglut/genfonts/Makefile
Normal file
352
freeglut/freeglut/genfonts/Makefile
Normal file
@ -0,0 +1,352 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ..
|
||||
prefix = /usr/local
|
||||
exec_prefix = ${prefix}
|
||||
|
||||
bindir = ${exec_prefix}/bin
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
datadir = ${prefix}/share
|
||||
sysconfdir = ${prefix}/etc
|
||||
sharedstatedir = ${prefix}/com
|
||||
localstatedir = ${prefix}/var
|
||||
libdir = ${exec_prefix}/lib
|
||||
infodir = ${prefix}/info
|
||||
mandir = ${prefix}/man
|
||||
includedir = ${prefix}/include
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/freeglut
|
||||
pkglibdir = $(libdir)/freeglut
|
||||
pkgincludedir = $(includedir)/freeglut
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = aclocal
|
||||
AUTOCONF = autoconf
|
||||
AUTOMAKE = automake
|
||||
AUTOHEADER = autoheader
|
||||
|
||||
INSTALL = /usr/bin/ginstall -c
|
||||
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
||||
transform = s,x,x,
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = i686-suse-linux
|
||||
host_triplet = i686-suse-linux-gnu
|
||||
AS = @AS@
|
||||
CC = gcc
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT =
|
||||
LIBM = -lm
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LIBTOOL_DEPS = ./ltconfig ./ltmain.sh
|
||||
LN_S = ln -s
|
||||
MAKEINFO = makeinfo
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = freeglut
|
||||
RANLIB = ranlib
|
||||
VERSION = 0.1
|
||||
|
||||
bin_PROGRAMS = genfonts genstroke
|
||||
genfonts_SOURCES = genfonts.c
|
||||
genstroke_SOURCES = genstroke.c
|
||||
genfonts_LDADD = -L/usr/X11R6/lib -lglib -lX11 -lXext
|
||||
genstroke_LDADD = -lglib
|
||||
EXTRA_DIST = genfonts.c genstroke.c
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
bin_PROGRAMS = genfonts$(EXEEXT) genstroke$(EXEEXT)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
|
||||
CPPFLAGS =
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
genfonts_OBJECTS = genfonts.o
|
||||
genfonts_DEPENDENCIES =
|
||||
genfonts_LDFLAGS =
|
||||
genstroke_OBJECTS = genstroke.o
|
||||
genstroke_DEPENDENCIES =
|
||||
genstroke_LDFLAGS =
|
||||
CFLAGS = -g -O2
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/genfonts.P .deps/genstroke.P
|
||||
SOURCES = $(genfonts_SOURCES) $(genstroke_SOURCES)
|
||||
OBJECTS = $(genfonts_OBJECTS) $(genstroke_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu genfonts/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
done
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
genfonts$(EXEEXT): $(genfonts_OBJECTS) $(genfonts_DEPENDENCIES)
|
||||
@rm -f genfonts$(EXEEXT)
|
||||
$(LINK) $(genfonts_LDFLAGS) $(genfonts_OBJECTS) $(genfonts_LDADD) $(LIBS)
|
||||
|
||||
genstroke$(EXEEXT): $(genstroke_OBJECTS) $(genstroke_DEPENDENCIES)
|
||||
@rm -f genstroke$(EXEEXT)
|
||||
$(LINK) $(genstroke_LDFLAGS) $(genstroke_OBJECTS) $(genstroke_LDADD) $(LIBS)
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = genfonts
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu genfonts/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-binPROGRAMS
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
|
||||
distclean-tags distclean-depend distclean-generic \
|
||||
clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
|
||||
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
|
||||
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
8
freeglut/freeglut/genfonts/Makefile.am
Normal file
8
freeglut/freeglut/genfonts/Makefile.am
Normal file
@ -0,0 +1,8 @@
|
||||
## Process this file with automake to produce Makefile.im
|
||||
|
||||
bin_PROGRAMS = genfonts genstroke
|
||||
genfonts_SOURCES = genfonts.c
|
||||
genstroke_SOURCES = genstroke.c
|
||||
genfonts_LDADD = -L/usr/X11R6/lib -lglib -lX11 -lXext
|
||||
genstroke_LDADD = -lglib
|
||||
EXTRA_DIST = genfonts.c genstroke.c
|
352
freeglut/freeglut/genfonts/Makefile.in
Normal file
352
freeglut/freeglut/genfonts/Makefile.in
Normal file
@ -0,0 +1,352 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT = @EXEEXT@
|
||||
LIBM = @LIBM@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
|
||||
bin_PROGRAMS = genfonts genstroke
|
||||
genfonts_SOURCES = genfonts.c
|
||||
genstroke_SOURCES = genstroke.c
|
||||
genfonts_LDADD = -L/usr/X11R6/lib -lglib -lX11 -lXext
|
||||
genstroke_LDADD = -lglib
|
||||
EXTRA_DIST = genfonts.c genstroke.c
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
bin_PROGRAMS = genfonts$(EXEEXT) genstroke$(EXEEXT)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
genfonts_OBJECTS = genfonts.o
|
||||
genfonts_DEPENDENCIES =
|
||||
genfonts_LDFLAGS =
|
||||
genstroke_OBJECTS = genstroke.o
|
||||
genstroke_DEPENDENCIES =
|
||||
genstroke_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/genfonts.P .deps/genstroke.P
|
||||
SOURCES = $(genfonts_SOURCES) $(genstroke_SOURCES)
|
||||
OBJECTS = $(genfonts_OBJECTS) $(genstroke_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu genfonts/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
done
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
genfonts$(EXEEXT): $(genfonts_OBJECTS) $(genfonts_DEPENDENCIES)
|
||||
@rm -f genfonts$(EXEEXT)
|
||||
$(LINK) $(genfonts_LDFLAGS) $(genfonts_OBJECTS) $(genfonts_LDADD) $(LIBS)
|
||||
|
||||
genstroke$(EXEEXT): $(genstroke_OBJECTS) $(genstroke_DEPENDENCIES)
|
||||
@rm -f genstroke$(EXEEXT)
|
||||
$(LINK) $(genstroke_LDFLAGS) $(genstroke_OBJECTS) $(genstroke_LDADD) $(LIBS)
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = genfonts
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu genfonts/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-binPROGRAMS
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
|
||||
distclean-tags distclean-depend distclean-generic \
|
||||
clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
|
||||
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
|
||||
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
603
freeglut/freeglut/genfonts/Roman.src
Normal file
603
freeglut/freeglut/genfonts/Roman.src
Normal file
@ -0,0 +1,603 @@
|
||||
##
|
||||
# $XConsortium: Roman.src,v 5.3 94/04/17 20:10:05 rws Exp $
|
||||
##
|
||||
## Copyright (c) 1989,1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
|
||||
##
|
||||
## All Rights Reserved
|
||||
##
|
||||
## Permission to use, copy, modify, and distribute this software and its
|
||||
## documentation for any purpose and without fee is hereby granted,
|
||||
## provided that the above copyright notice appear in all copies and that
|
||||
## both that copyright notice and this permission notice appear in
|
||||
## supporting documentation, and that the names of Sun Microsystems
|
||||
## and the X Consortium not be used in advertising or publicity
|
||||
## pertaining to distribution of the software without specific, written
|
||||
## prior permission.
|
||||
##
|
||||
## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
## EVENT SHALL SUN MICROSYSTEMS OR THE X CONSORTIUM BE LIABLE FOR ANY SPECIAL,
|
||||
## INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
## FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
## NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
## WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
# Roman Simplex font.
|
||||
|
||||
FONTNAME Roman
|
||||
TOP 119.0476
|
||||
BOTTOM -33.3333
|
||||
NUM_CH 128
|
||||
PROPERTIES 3
|
||||
|
||||
(CHARSET_REGISTRY ISO8859)
|
||||
(CHARSET_ENCODING "1")
|
||||
(SPACING P)
|
||||
|
||||
INDEX 32 STROKE 0 CENTER 52.3810 RIGHT 104.7619
|
||||
INDEX 33 STROKE 2 CENTER 4.7619 RIGHT 9.5238
|
||||
OPEN 2 (4.7619 100.0000) (4.7619 33.3333)
|
||||
OPEN 5 (4.7619 9.5238) (0.0000 4.7619) (4.7619 0.0000)
|
||||
(9.5238 4.7619) (4.7619 9.5238)
|
||||
INDEX 34 STROKE 2 CENTER 19.0476 RIGHT 38.0952
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 66.6667)
|
||||
OPEN 2 (38.0952 100.0000) (38.0952 66.6667)
|
||||
INDEX 35 STROKE 4 CENTER 33.3333 RIGHT 71.4286
|
||||
OPEN 2 (38.0952 119.0476) (4.7619 -33.3333)
|
||||
OPEN 2 (66.6667 119.0476) (33.3333 -33.3333)
|
||||
OPEN 2 (4.7619 57.1429) (71.4286 57.1429)
|
||||
OPEN 2 (0.0000 28.5714) (66.6667 28.5714)
|
||||
INDEX 36 STROKE 3 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (23.8095 119.0476) (23.8095 -19.0476)
|
||||
OPEN 2 (42.8571 119.0476) (42.8571 -19.0476)
|
||||
OPEN 20 (66.6667 85.7143) (57.1429 95.2381) (42.8571 100.0000)
|
||||
(23.8095 100.0000) (9.5238 95.2381) (0.0000 85.7143) (0.0000 76.1905)
|
||||
(4.7619 66.6667) (9.5238 61.9048) (19.0476 57.1429) (47.6190 47.6190)
|
||||
(57.1429 42.8571) (61.9048 38.0952) (66.6667 28.5714) (66.6667 14.2857)
|
||||
(57.1429 4.7619) (42.8571 0.0000) (23.8095 0.0000) (9.5238 4.7619)
|
||||
(0.0000 14.2857)
|
||||
INDEX 37 STROKE 3 CENTER 42.8571 RIGHT 85.7143
|
||||
OPEN 2 (85.7143 100.0000) (0.0000 0.0000)
|
||||
OPEN 16 (23.8095 100.0000) (33.3333 90.4762) (33.3333 80.9524)
|
||||
(28.5714 71.4286) (19.0476 66.6667) (9.5238 66.6667) (0.0000 76.1905)
|
||||
(0.0000 85.7143) (4.7619 95.2381) (14.2857 100.0000) (23.8095 100.0000)
|
||||
(33.3333 95.2381) (47.6190 90.4762) (61.9048 90.4762) (76.1905 95.2381)
|
||||
(85.7143 100.0000)
|
||||
OPEN 11 (66.6667 33.3333) (57.1429 28.5714) (52.3810 19.0476)
|
||||
(52.3810 9.5238) (61.9048 0.0000) (71.4286 0.0000) (80.9524 4.7619)
|
||||
(85.7143 14.2857) (85.7143 23.8095) (76.1905 33.3333) (66.6667 33.3333)
|
||||
INDEX 38 STROKE 1 CENTER 47.6190 RIGHT 95.2381
|
||||
OPEN 34 (95.2381 57.1429) (95.2381 61.9048) (90.4762 66.6667)
|
||||
(85.7143 66.6667) (80.9524 61.9048) (76.1905 52.3810) (66.6667 28.5714)
|
||||
(57.1429 14.2857) (47.6190 4.7619) (38.0952 0.0000) (19.0476 0.0000)
|
||||
(9.5238 4.7619) (4.7619 9.5238) (0.0000 19.0476) (0.0000 28.5714)
|
||||
(4.7619 38.0952) (9.5238 42.8571) (42.8571 61.9048) (47.6190 66.6667)
|
||||
(52.3810 76.1905) (52.3810 85.7143) (47.6190 95.2381) (38.0952 100.0000)
|
||||
(28.5714 95.2381) (23.8095 85.7143) (23.8095 76.1905) (28.5714 61.9048)
|
||||
(38.0952 47.6190) (61.9048 14.2857) (71.4286 4.7619) (80.9524 0.0000)
|
||||
(90.4762 0.0000) (95.2381 4.7619) (95.2381 9.5238)
|
||||
INDEX 39 STROKE 1 CENTER 0.0000 RIGHT 0.0000
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 66.6667)
|
||||
INDEX 40 STROKE 1 CENTER 14.2857 RIGHT 33.3333
|
||||
OPEN 10 (33.3333 119.0476) (23.8095 109.5238) (14.2857 95.2381)
|
||||
(4.7619 76.1905) (0.0000 52.3810) (0.0000 33.3333) (4.7619 9.5238)
|
||||
(14.2857 -9.5238) (23.8095 -23.8095) (33.3333 -33.3333)
|
||||
INDEX 41 STROKE 1 CENTER 19.0476 RIGHT 33.3333
|
||||
OPEN 10 (0.0000 119.0476) (9.5238 109.5238) (19.0476 95.2381)
|
||||
(28.5714 76.1905) (33.3333 52.3810) (33.3333 33.3333) (28.5714 9.5238)
|
||||
(19.0476 -9.5238) (9.5238 -23.8095) (0.0000 -33.3333)
|
||||
INDEX 42 STROKE 3 CENTER 23.8095 RIGHT 47.6190
|
||||
OPEN 2 (23.8095 71.4286) (23.8095 14.2857)
|
||||
OPEN 2 (0.0000 57.1429) (47.6190 28.5714)
|
||||
OPEN 2 (47.6190 57.1429) (0.0000 28.5714)
|
||||
INDEX 43 STROKE 2 CENTER 42.8571 RIGHT 85.7143
|
||||
OPEN 2 (42.8571 85.7143) (42.8571 0.0000)
|
||||
OPEN 2 (0.0000 42.8571) (85.7143 42.8571)
|
||||
INDEX 44 STROKE 1 CENTER 4.7619 RIGHT 9.5238
|
||||
OPEN 8 (9.5238 4.7619) (4.7619 0.0000) (0.0000 4.7619)
|
||||
(4.7619 9.5238) (9.5238 4.7619) (9.5238 -4.7619) (4.7619 -14.2857)
|
||||
(0.0000 -19.0476)
|
||||
INDEX 45 STROKE 1 CENTER 42.8571 RIGHT 85.7143
|
||||
OPEN 2 (0.0000 42.8571) (85.7143 42.8571)
|
||||
INDEX 46 STROKE 1 CENTER 4.7619 RIGHT 9.5238
|
||||
OPEN 5 (4.7619 9.5238) (0.0000 4.7619) (4.7619 0.0000)
|
||||
(9.5238 4.7619) (4.7619 9.5238)
|
||||
INDEX 47 STROKE 1 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 -14.2857) (66.6667 100.0000)
|
||||
INDEX 48 STROKE 1 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 17 (28.5714 100.0000) (14.2857 95.2381) (4.7619 80.9524)
|
||||
(0.0000 57.1429) (0.0000 42.8571) (4.7619 19.0476) (14.2857 4.7619)
|
||||
(28.5714 0.0000) (38.0952 0.0000) (52.3810 4.7619) (61.9048 19.0476)
|
||||
(66.6667 42.8571) (66.6667 57.1429) (61.9048 80.9524) (52.3810 95.2381)
|
||||
(38.0952 100.0000) (28.5714 100.0000)
|
||||
INDEX 49 STROKE 1 CENTER 19.0476 RIGHT 23.8095
|
||||
OPEN 4 (0.0000 80.9524) (9.5238 85.7143) (23.8095 100.0000)
|
||||
(23.8095 0.0000)
|
||||
INDEX 50 STROKE 1 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 14 (4.7619 76.1905) (4.7619 80.9524) (9.5238 90.4762)
|
||||
(14.2857 95.2381) (23.8095 100.0000) (42.8571 100.0000) (52.3810 95.2381)
|
||||
(57.1429 90.4762) (61.9048 80.9524) (61.9048 71.4286) (57.1429 61.9048)
|
||||
(47.6190 47.6190) (0.0000 0.0000) (66.6667 0.0000)
|
||||
INDEX 51 STROKE 1 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 15 (9.5238 100.0000) (61.9048 100.0000) (33.3333 61.9048)
|
||||
(47.6190 61.9048) (57.1429 57.1429) (61.9048 52.3810) (66.6667 38.0952)
|
||||
(66.6667 28.5714) (61.9048 14.2857) (52.3810 4.7619) (38.0952 0.0000)
|
||||
(23.8095 0.0000) (9.5238 4.7619) (4.7619 9.5238) (0.0000 19.0476)
|
||||
INDEX 52 STROKE 2 CENTER 33.3333 RIGHT 71.4286
|
||||
OPEN 3 (47.6190 100.0000) (0.0000 33.3333) (71.4286 33.3333)
|
||||
OPEN 2 (47.6190 100.0000) (47.6190 0.0000)
|
||||
INDEX 53 STROKE 1 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 17 (57.1429 100.0000) (9.5238 100.0000) (4.7619 57.1429)
|
||||
(9.5238 61.9048) (23.8095 66.6667) (38.0952 66.6667) (52.3810 61.9048)
|
||||
(61.9048 52.3810) (66.6667 38.0952) (66.6667 28.5714) (61.9048 14.2857)
|
||||
(52.3810 4.7619) (38.0952 0.0000) (23.8095 0.0000) (9.5238 4.7619)
|
||||
(4.7619 9.5238) (0.0000 19.0476)
|
||||
INDEX 54 STROKE 1 CENTER 28.5714 RIGHT 61.9048
|
||||
OPEN 23 (57.1429 85.7143) (52.3810 95.2381) (38.0952 100.0000)
|
||||
(28.5714 100.0000) (14.2857 95.2381) (4.7619 80.9524) (0.0000 57.1429)
|
||||
(0.0000 33.3333) (4.7619 14.2857) (14.2857 4.7619) (28.5714 0.0000)
|
||||
(33.3333 0.0000) (47.6190 4.7619) (57.1429 14.2857) (61.9048 28.5714)
|
||||
(61.9048 33.3333) (57.1429 47.6190) (47.6190 57.1429) (33.3333 61.9048)
|
||||
(28.5714 61.9048) (14.2857 57.1429) (4.7619 47.6190) (0.0000 33.3333)
|
||||
INDEX 55 STROKE 2 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (66.6667 100.0000) (19.0476 0.0000)
|
||||
OPEN 2 (0.0000 100.0000) (66.6667 100.0000)
|
||||
INDEX 56 STROKE 1 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 29 (23.8095 100.0000) (9.5238 95.2381) (4.7619 85.7143)
|
||||
(4.7619 76.1905) (9.5238 66.6667) (19.0476 61.9048) (38.0952 57.1429)
|
||||
(52.3810 52.3810) (61.9048 42.8571) (66.6667 33.3333) (66.6667 19.0476)
|
||||
(61.9048 9.5238) (57.1429 4.7619) (42.8571 0.0000) (23.8095 0.0000)
|
||||
(9.5238 4.7619) (4.7619 9.5238) (0.0000 19.0476) (0.0000 33.3333)
|
||||
(4.7619 42.8571) (14.2857 52.3810) (28.5714 57.1429) (47.6190 61.9048)
|
||||
(57.1429 66.6667) (61.9048 76.1905) (61.9048 85.7143) (57.1429 95.2381)
|
||||
(42.8571 100.0000) (23.8095 100.0000)
|
||||
INDEX 57 STROKE 1 CENTER 33.3333 RIGHT 61.9048
|
||||
OPEN 23 (61.9048 66.6667) (57.1429 52.3810) (47.6190 42.8571)
|
||||
(33.3333 38.0952) (28.5714 38.0952) (14.2857 42.8571) (4.7619 52.3810)
|
||||
(0.0000 66.6667) (0.0000 71.4286) (4.7619 85.7143) (14.2857 95.2381)
|
||||
(28.5714 100.0000) (33.3333 100.0000) (47.6190 95.2381) (57.1429 85.7143)
|
||||
(61.9048 66.6667) (61.9048 42.8571) (57.1429 19.0476) (47.6190 4.7619)
|
||||
(33.3333 0.0000) (23.8095 0.0000) (9.5238 4.7619) (4.7619 14.2857)
|
||||
INDEX 58 STROKE 2 CENTER 4.7619 RIGHT 9.5238
|
||||
OPEN 5 (4.7619 66.6667) (0.0000 61.9048) (4.7619 57.1429)
|
||||
(9.5238 61.9048) (4.7619 66.6667)
|
||||
OPEN 5 (4.7619 9.5238) (0.0000 4.7619) (4.7619 0.0000)
|
||||
(9.5238 4.7619) (4.7619 9.5238)
|
||||
INDEX 59 STROKE 2 CENTER 4.7619 RIGHT 9.5238
|
||||
OPEN 5 (4.7619 66.6667) (0.0000 61.9048) (4.7619 57.1429)
|
||||
(9.5238 61.9048) (4.7619 66.6667)
|
||||
OPEN 8 (9.5238 4.7619) (4.7619 0.0000) (0.0000 4.7619)
|
||||
(4.7619 9.5238) (9.5238 4.7619) (9.5238 -4.7619) (4.7619 -14.2857)
|
||||
(0.0000 -19.0476)
|
||||
INDEX 60 STROKE 1 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 3 (76.1905 85.7143) (0.0000 42.8571) (76.1905 0.0000)
|
||||
INDEX 61 STROKE 2 CENTER 42.8571 RIGHT 85.7143
|
||||
OPEN 2 (0.0000 57.1429) (85.7143 57.1429)
|
||||
OPEN 2 (0.0000 28.5714) (85.7143 28.5714)
|
||||
INDEX 62 STROKE 1 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 3 (0.0000 85.7143) (76.1905 42.8571) (0.0000 0.0000)
|
||||
INDEX 63 STROKE 2 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 14 (0.0000 76.1905) (0.0000 80.9524) (4.7619 90.4762)
|
||||
(9.5238 95.2381) (19.0476 100.0000) (38.0952 100.0000) (47.6190 95.2381)
|
||||
(52.3810 90.4762) (57.1429 80.9524) (57.1429 71.4286) (52.3810 61.9048)
|
||||
(47.6190 57.1429) (28.5714 47.6190) (28.5714 33.3333)
|
||||
OPEN 5 (28.5714 9.5238) (23.8095 4.7619) (28.5714 0.0000)
|
||||
(33.3333 4.7619) (28.5714 9.5238)
|
||||
INDEX 64 STROKE 2 CENTER 28.5714 RIGHT 61.9048
|
||||
OPEN 8 (42.8571 52.3810) (33.3333 57.1429) (23.8095 57.1429)
|
||||
(19.0476 47.6190) (19.0476 42.8571) (23.8095 33.3333) (33.3333 33.3333)
|
||||
(42.8571 38.0952)
|
||||
OPEN 19 (42.8571 57.1429) (42.8571 38.0952) (47.6190 33.3333)
|
||||
(57.1429 33.3333) (61.9048 42.8571) (61.9048 47.6190) (57.1429 61.9048)
|
||||
(47.6190 71.4286) (33.3333 76.1905) (28.5714 76.1905) (14.2857 71.4286)
|
||||
(4.7619 61.9048) (0.0000 47.6190) (0.0000 42.8571) (4.7619 28.5714)
|
||||
(14.2857 19.0476) (28.5714 14.2857) (33.3333 14.2857) (47.6190 19.0476)
|
||||
INDEX 65 STROKE 3 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 2 (38.0952 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (38.0952 100.0000) (76.1905 0.0000)
|
||||
OPEN 2 (14.2857 33.3333) (61.9048 33.3333)
|
||||
INDEX 66 STROKE 3 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 9 (0.0000 100.0000) (42.8571 100.0000) (57.1429 95.2381)
|
||||
(61.9048 90.4762) (66.6667 80.9524) (66.6667 71.4286) (61.9048 61.9048)
|
||||
(57.1429 57.1429) (42.8571 52.3810)
|
||||
OPEN 10 (0.0000 52.3810) (42.8571 52.3810) (57.1429 47.6190)
|
||||
(61.9048 42.8571) (66.6667 33.3333) (66.6667 19.0476) (61.9048 9.5238)
|
||||
(57.1429 4.7619) (42.8571 0.0000) (0.0000 0.0000)
|
||||
INDEX 67 STROKE 1 CENTER 33.3333 RIGHT 71.4286
|
||||
OPEN 18 (71.4286 76.1905) (66.6667 85.7143) (57.1429 95.2381)
|
||||
(47.6190 100.0000) (28.5714 100.0000) (19.0476 95.2381) (9.5238 85.7143)
|
||||
(4.7619 76.1905) (0.0000 61.9048) (0.0000 38.0952) (4.7619 23.8095)
|
||||
(9.5238 14.2857) (19.0476 4.7619) (28.5714 0.0000) (47.6190 0.0000)
|
||||
(57.1429 4.7619) (66.6667 14.2857) (71.4286 23.8095)
|
||||
INDEX 68 STROKE 2 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 12 (0.0000 100.0000) (33.3333 100.0000) (47.6190 95.2381)
|
||||
(57.1429 85.7143) (61.9048 76.1905) (66.6667 61.9048) (66.6667 38.0952)
|
||||
(61.9048 23.8095) (57.1429 14.2857) (47.6190 4.7619) (33.3333 0.0000)
|
||||
(0.0000 0.0000)
|
||||
INDEX 69 STROKE 4 CENTER 28.5714 RIGHT 61.9048
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (0.0000 100.0000) (61.9048 100.0000)
|
||||
OPEN 2 (0.0000 52.3810) (38.0952 52.3810)
|
||||
OPEN 2 (0.0000 0.0000) (61.9048 0.0000)
|
||||
INDEX 70 STROKE 3 CENTER 28.5714 RIGHT 61.9048
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (0.0000 100.0000) (61.9048 100.0000)
|
||||
OPEN 2 (0.0000 52.3810) (38.0952 52.3810)
|
||||
INDEX 71 STROKE 2 CENTER 33.3333 RIGHT 71.4286
|
||||
OPEN 19 (71.4286 76.1905) (66.6667 85.7143) (57.1429 95.2381)
|
||||
(47.6190 100.0000) (28.5714 100.0000) (19.0476 95.2381) (9.5238 85.7143)
|
||||
(4.7619 76.1905) (0.0000 61.9048) (0.0000 38.0952) (4.7619 23.8095)
|
||||
(9.5238 14.2857) (19.0476 4.7619) (28.5714 0.0000) (47.6190 0.0000)
|
||||
(57.1429 4.7619) (66.6667 14.2857) (71.4286 23.8095) (71.4286 38.0952)
|
||||
OPEN 2 (47.6190 38.0952) (71.4286 38.0952)
|
||||
INDEX 72 STROKE 3 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (66.6667 100.0000) (66.6667 0.0000)
|
||||
OPEN 2 (0.0000 52.3810) (66.6667 52.3810)
|
||||
INDEX 73 STROKE 1 CENTER 0.0000 RIGHT 0.0000
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
INDEX 74 STROKE 1 CENTER 28.5714 RIGHT 47.6190
|
||||
OPEN 10 (47.6190 100.0000) (47.6190 23.8095) (42.8571 9.5238)
|
||||
(38.0952 4.7619) (28.5714 0.0000) (19.0476 0.0000) (9.5238 4.7619)
|
||||
(4.7619 9.5238) (0.0000 23.8095) (0.0000 33.3333)
|
||||
INDEX 75 STROKE 3 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (66.6667 100.0000) (0.0000 33.3333)
|
||||
OPEN 2 (23.8095 57.1429) (66.6667 0.0000)
|
||||
INDEX 76 STROKE 2 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (0.0000 0.0000) (57.1429 0.0000)
|
||||
INDEX 77 STROKE 4 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (0.0000 100.0000) (38.0952 0.0000)
|
||||
OPEN 2 (76.1905 100.0000) (38.0952 0.0000)
|
||||
OPEN 2 (76.1905 100.0000) (76.1905 0.0000)
|
||||
INDEX 78 STROKE 3 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (0.0000 100.0000) (66.6667 0.0000)
|
||||
OPEN 2 (66.6667 100.0000) (66.6667 0.0000)
|
||||
INDEX 79 STROKE 1 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 21 (28.5714 100.0000) (19.0476 95.2381) (9.5238 85.7143)
|
||||
(4.7619 76.1905) (0.0000 61.9048) (0.0000 38.0952) (4.7619 23.8095)
|
||||
(9.5238 14.2857) (19.0476 4.7619) (28.5714 0.0000) (47.6190 0.0000)
|
||||
(57.1429 4.7619) (66.6667 14.2857) (71.4286 23.8095) (76.1905 38.0952)
|
||||
(76.1905 61.9048) (71.4286 76.1905) (66.6667 85.7143) (57.1429 95.2381)
|
||||
(47.6190 100.0000) (28.5714 100.0000)
|
||||
INDEX 80 STROKE 2 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 10 (0.0000 100.0000) (42.8571 100.0000) (57.1429 95.2381)
|
||||
(61.9048 90.4762) (66.6667 80.9524) (66.6667 66.6667) (61.9048 57.1429)
|
||||
(57.1429 52.3810) (42.8571 47.6190) (0.0000 47.6190)
|
||||
INDEX 81 STROKE 2 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 21 (28.5714 100.0000) (19.0476 95.2381) (9.5238 85.7143)
|
||||
(4.7619 76.1905) (0.0000 61.9048) (0.0000 38.0952) (4.7619 23.8095)
|
||||
(9.5238 14.2857) (19.0476 4.7619) (28.5714 0.0000) (47.6190 0.0000)
|
||||
(57.1429 4.7619) (66.6667 14.2857) (71.4286 23.8095) (76.1905 38.0952)
|
||||
(76.1905 61.9048) (71.4286 76.1905) (66.6667 85.7143) (57.1429 95.2381)
|
||||
(47.6190 100.0000) (28.5714 100.0000)
|
||||
OPEN 2 (42.8571 19.0476) (71.4286 -9.5238)
|
||||
INDEX 82 STROKE 3 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 10 (0.0000 100.0000) (42.8571 100.0000) (57.1429 95.2381)
|
||||
(61.9048 90.4762) (66.6667 80.9524) (66.6667 71.4286) (61.9048 61.9048)
|
||||
(57.1429 57.1429) (42.8571 52.3810) (0.0000 52.3810)
|
||||
OPEN 2 (33.3333 52.3810) (66.6667 0.0000)
|
||||
INDEX 83 STROKE 1 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 20 (66.6667 85.7143) (57.1429 95.2381) (42.8571 100.0000)
|
||||
(23.8095 100.0000) (9.5238 95.2381) (0.0000 85.7143) (0.0000 76.1905)
|
||||
(4.7619 66.6667) (9.5238 61.9048) (19.0476 57.1429) (47.6190 47.6190)
|
||||
(57.1429 42.8571) (61.9048 38.0952) (66.6667 28.5714) (66.6667 14.2857)
|
||||
(57.1429 4.7619) (42.8571 0.0000) (23.8095 0.0000) (9.5238 4.7619)
|
||||
(0.0000 14.2857)
|
||||
INDEX 84 STROKE 2 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (33.3333 100.0000) (33.3333 0.0000)
|
||||
OPEN 2 (0.0000 100.0000) (66.6667 100.0000)
|
||||
INDEX 85 STROKE 1 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 10 (0.0000 100.0000) (0.0000 28.5714) (4.7619 14.2857)
|
||||
(14.2857 4.7619) (28.5714 0.0000) (38.0952 0.0000) (52.3810 4.7619)
|
||||
(61.9048 14.2857) (66.6667 28.5714) (66.6667 100.0000)
|
||||
INDEX 86 STROKE 2 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 2 (0.0000 100.0000) (38.0952 0.0000)
|
||||
OPEN 2 (76.1905 100.0000) (38.0952 0.0000)
|
||||
INDEX 87 STROKE 4 CENTER 47.6190 RIGHT 95.2381
|
||||
OPEN 2 (0.0000 100.0000) (23.8095 0.0000)
|
||||
OPEN 2 (47.6190 100.0000) (23.8095 0.0000)
|
||||
OPEN 2 (47.6190 100.0000) (71.4286 0.0000)
|
||||
OPEN 2 (95.2381 100.0000) (71.4286 0.0000)
|
||||
INDEX 88 STROKE 2 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 100.0000) (66.6667 0.0000)
|
||||
OPEN 2 (66.6667 100.0000) (0.0000 0.0000)
|
||||
INDEX 89 STROKE 2 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 3 (0.0000 100.0000) (38.0952 52.3810) (38.0952 0.0000)
|
||||
OPEN 2 (76.1905 100.0000) (38.0952 52.3810)
|
||||
INDEX 90 STROKE 3 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (66.6667 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (0.0000 100.0000) (66.6667 100.0000)
|
||||
OPEN 2 (0.0000 0.0000) (66.6667 0.0000)
|
||||
INDEX 91 STROKE 4 CENTER 14.2857 RIGHT 33.3333
|
||||
OPEN 2 (0.0000 119.0476) (0.0000 -33.3333)
|
||||
OPEN 2 (4.7619 119.0476) (4.7619 -33.3333)
|
||||
OPEN 2 (0.0000 119.0476) (33.3333 119.0476)
|
||||
OPEN 2 (0.0000 -33.3333) (33.3333 -33.3333)
|
||||
INDEX 92 STROKE 1 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (0.0000 100.0000) (66.6667 -14.2857)
|
||||
INDEX 93 STROKE 4 CENTER 19.0476 RIGHT 33.3333
|
||||
OPEN 2 (28.5714 119.0476) (28.5714 -33.3333)
|
||||
OPEN 2 (33.3333 119.0476) (33.3333 -33.3333)
|
||||
OPEN 2 (0.0000 119.0476) (33.3333 119.0476)
|
||||
OPEN 2 (0.0000 -33.3333) (33.3333 -33.3333)
|
||||
INDEX 94 STROKE 2 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 2 (38.0952 109.5238) (0.0000 42.8571)
|
||||
OPEN 2 (38.0952 109.5238) (76.1905 42.8571)
|
||||
INDEX 95 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 5 (0.0000 -33.3333) (104.7619 -33.3333) (104.7619 -28.5714)
|
||||
(0.0000 -28.5714) (0.0000 -33.3333)
|
||||
INDEX 96 STROKE 2 CENTER 14.2857 RIGHT 28.5714
|
||||
OPEN 2 (4.7619 100.0000) (28.5714 71.4286)
|
||||
OPEN 3 (4.7619 100.0000) (0.0000 95.2381) (28.5714 71.4286)
|
||||
INDEX 97 STROKE 2 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 2 (57.1429 66.6667) (57.1429 0.0000)
|
||||
OPEN 14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
|
||||
(23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
|
||||
(0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
|
||||
(38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
|
||||
INDEX 98 STROKE 2 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 14 (0.0000 52.3810) (9.5238 61.9048) (19.0476 66.6667)
|
||||
(33.3333 66.6667) (42.8571 61.9048) (52.3810 52.3810) (57.1429 38.0952)
|
||||
(57.1429 28.5714) (52.3810 14.2857) (42.8571 4.7619) (33.3333 0.0000)
|
||||
(19.0476 0.0000) (9.5238 4.7619) (0.0000 14.2857)
|
||||
INDEX 99 STROKE 1 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
|
||||
(23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
|
||||
(0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
|
||||
(38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
|
||||
INDEX 100 STROKE 2 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 2 (57.1429 100.0000) (57.1429 0.0000)
|
||||
OPEN 14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
|
||||
(23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
|
||||
(0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
|
||||
(38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
|
||||
INDEX 101 STROKE 1 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 17 (0.0000 38.0952) (57.1429 38.0952) (57.1429 47.6190)
|
||||
(52.3810 57.1429) (47.6190 61.9048) (38.0952 66.6667) (23.8095 66.6667)
|
||||
(14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952) (0.0000 28.5714)
|
||||
(4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000) (38.0952 0.0000)
|
||||
(47.6190 4.7619) (57.1429 14.2857)
|
||||
INDEX 102 STROKE 2 CENTER 14.2857 RIGHT 38.0952
|
||||
OPEN 5 (38.0952 100.0000) (28.5714 100.0000) (19.0476 95.2381)
|
||||
(14.2857 80.9524) (14.2857 0.0000)
|
||||
OPEN 2 (0.0000 66.6667) (33.3333 66.6667)
|
||||
INDEX 103 STROKE 2 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 7 (57.1429 66.6667) (57.1429 -9.5238) (52.3810 -23.8095)
|
||||
(47.6190 -28.5714) (38.0952 -33.3333) (23.8095 -33.3333) (14.2857 -28.5714)
|
||||
OPEN 14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
|
||||
(23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
|
||||
(0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
|
||||
(38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
|
||||
INDEX 104 STROKE 2 CENTER 23.8095 RIGHT 52.3810
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 7 (0.0000 47.6190) (14.2857 61.9048) (23.8095 66.6667)
|
||||
(38.0952 66.6667) (47.6190 61.9048) (52.3810 47.6190) (52.3810 0.0000)
|
||||
INDEX 105 STROKE 2 CENTER 4.7619 RIGHT 9.5238
|
||||
OPEN 5 (0.0000 100.0000) (4.7619 95.2381) (9.5238 100.0000)
|
||||
(4.7619 104.7619) (0.0000 100.0000)
|
||||
OPEN 2 (4.7619 66.6667) (4.7619 0.0000)
|
||||
INDEX 106 STROKE 2 CENTER 19.0476 RIGHT 28.5714
|
||||
OPEN 5 (19.0476 100.0000) (23.8095 95.2381) (28.5714 100.0000)
|
||||
(23.8095 104.7619) (19.0476 100.0000)
|
||||
OPEN 5 (23.8095 66.6667) (23.8095 -14.2857) (19.0476 -28.5714)
|
||||
(9.5238 -33.3333) (0.0000 -33.3333)
|
||||
INDEX 107 STROKE 3 CENTER 23.8095 RIGHT 52.3810
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
OPEN 2 (47.6190 66.6667) (0.0000 19.0476)
|
||||
OPEN 2 (19.0476 38.0952) (52.3810 0.0000)
|
||||
INDEX 108 STROKE 1 CENTER 0.0000 RIGHT 0.0000
|
||||
OPEN 2 (0.0000 100.0000) (0.0000 0.0000)
|
||||
INDEX 109 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (0.0000 66.6667) (0.0000 0.0000)
|
||||
OPEN 7 (0.0000 47.6190) (14.2857 61.9048) (23.8095 66.6667)
|
||||
(38.0952 66.6667) (47.6190 61.9048) (52.3810 47.6190) (52.3810 0.0000)
|
||||
OPEN 7 (52.3810 47.6190) (66.6667 61.9048) (76.1905 66.6667)
|
||||
(90.4762 66.6667) (100.0000 61.9048) (104.7619 47.6190) (104.7619 0.0000)
|
||||
INDEX 110 STROKE 2 CENTER 23.8095 RIGHT 52.3810
|
||||
OPEN 2 (0.0000 66.6667) (0.0000 0.0000)
|
||||
OPEN 7 (0.0000 47.6190) (14.2857 61.9048) (23.8095 66.6667)
|
||||
(38.0952 66.6667) (47.6190 61.9048) (52.3810 47.6190) (52.3810 0.0000)
|
||||
INDEX 111 STROKE 1 CENTER 28.5714 RIGHT 61.9048
|
||||
OPEN 17 (23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810)
|
||||
(0.0000 38.0952) (0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619)
|
||||
(23.8095 0.0000) (38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
|
||||
(61.9048 28.5714) (61.9048 38.0952) (57.1429 52.3810) (47.6190 61.9048)
|
||||
(38.0952 66.6667) (23.8095 66.6667)
|
||||
INDEX 112 STROKE 2 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 2 (0.0000 66.6667) (0.0000 -33.3333)
|
||||
OPEN 14 (0.0000 52.3810) (9.5238 61.9048) (19.0476 66.6667)
|
||||
(33.3333 66.6667) (42.8571 61.9048) (52.3810 52.3810) (57.1429 38.0952)
|
||||
(57.1429 28.5714) (52.3810 14.2857) (42.8571 4.7619) (33.3333 0.0000)
|
||||
(19.0476 0.0000) (9.5238 4.7619) (0.0000 14.2857)
|
||||
INDEX 113 STROKE 2 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 2 (57.1429 66.6667) (57.1429 -33.3333)
|
||||
OPEN 14 (57.1429 52.3810) (47.6190 61.9048) (38.0952 66.6667)
|
||||
(23.8095 66.6667) (14.2857 61.9048) (4.7619 52.3810) (0.0000 38.0952)
|
||||
(0.0000 28.5714) (4.7619 14.2857) (14.2857 4.7619) (23.8095 0.0000)
|
||||
(38.0952 0.0000) (47.6190 4.7619) (57.1429 14.2857)
|
||||
INDEX 114 STROKE 2 CENTER 14.2857 RIGHT 38.0952
|
||||
OPEN 2 (0.0000 66.6667) (0.0000 0.0000)
|
||||
OPEN 5 (0.0000 38.0952) (4.7619 52.3810) (14.2857 61.9048)
|
||||
(23.8095 66.6667) (38.0952 66.6667)
|
||||
INDEX 115 STROKE 1 CENTER 23.8095 RIGHT 52.3810
|
||||
OPEN 17 (52.3810 52.3810) (47.6190 61.9048) (33.3333 66.6667)
|
||||
(19.0476 66.6667) (4.7619 61.9048) (0.0000 52.3810) (4.7619 42.8571)
|
||||
(14.2857 38.0952) (38.0952 33.3333) (47.6190 28.5714) (52.3810 19.0476)
|
||||
(52.3810 14.2857) (47.6190 4.7619) (33.3333 0.0000) (19.0476 0.0000)
|
||||
(4.7619 4.7619) (0.0000 14.2857)
|
||||
INDEX 116 STROKE 2 CENTER 14.2857 RIGHT 38.0952
|
||||
OPEN 5 (14.2857 100.0000) (14.2857 19.0476) (19.0476 4.7619)
|
||||
(28.5714 0.0000) (38.0952 0.0000)
|
||||
OPEN 2 (0.0000 66.6667) (33.3333 66.6667)
|
||||
INDEX 117 STROKE 2 CENTER 23.8095 RIGHT 52.3810
|
||||
OPEN 7 (0.0000 66.6667) (0.0000 19.0476) (4.7619 4.7619)
|
||||
(14.2857 0.0000) (28.5714 0.0000) (38.0952 4.7619) (52.3810 19.0476)
|
||||
OPEN 2 (52.3810 66.6667) (52.3810 0.0000)
|
||||
INDEX 118 STROKE 2 CENTER 28.5714 RIGHT 57.1429
|
||||
OPEN 2 (0.0000 66.6667) (28.5714 0.0000)
|
||||
OPEN 2 (57.1429 66.6667) (28.5714 0.0000)
|
||||
INDEX 119 STROKE 4 CENTER 38.0952 RIGHT 76.1905
|
||||
OPEN 2 (0.0000 66.6667) (19.0476 0.0000)
|
||||
OPEN 2 (38.0952 66.6667) (19.0476 0.0000)
|
||||
OPEN 2 (38.0952 66.6667) (57.1429 0.0000)
|
||||
OPEN 2 (76.1905 66.6667) (57.1429 0.0000)
|
||||
INDEX 120 STROKE 2 CENTER 23.8095 RIGHT 52.3810
|
||||
OPEN 2 (0.0000 66.6667) (52.3810 0.0000)
|
||||
OPEN 2 (52.3810 66.6667) (0.0000 0.0000)
|
||||
INDEX 121 STROKE 2 CENTER 33.3333 RIGHT 61.9048
|
||||
OPEN 2 (4.7619 66.6667) (33.3333 0.0000)
|
||||
OPEN 6 (61.9048 66.6667) (33.3333 0.0000) (23.8095 -19.0476)
|
||||
(14.2857 -28.5714) (4.7619 -33.3333) (0.0000 -33.3333)
|
||||
INDEX 122 STROKE 3 CENTER 23.8095 RIGHT 52.3810
|
||||
OPEN 2 (52.3810 66.6667) (0.0000 0.0000)
|
||||
OPEN 2 (0.0000 66.6667) (52.3810 66.6667)
|
||||
OPEN 2 (0.0000 0.0000) (52.3810 0.0000)
|
||||
INDEX 123 STROKE 3 CENTER 14.2857 RIGHT 23.8095
|
||||
OPEN 10 (23.8095 119.0476) (14.2857 114.2857) (9.5238 109.5238)
|
||||
(4.7619 100.0000) (4.7619 90.4762) (9.5238 80.9524) (14.2857 76.1905)
|
||||
(19.0476 66.6667) (19.0476 57.1429) (9.5238 47.6190)
|
||||
OPEN 17 (14.2857 114.2857) (9.5238 104.7619) (9.5238 95.2381)
|
||||
(14.2857 85.7143) (19.0476 80.9524) (23.8095 71.4286) (23.8095 61.9048)
|
||||
(19.0476 52.3810) (0.0000 42.8571) (19.0476 33.3333) (23.8095 23.8095)
|
||||
(23.8095 14.2857) (19.0476 4.7619) (14.2857 0.0000) (9.5238 -9.5238)
|
||||
(9.5238 -19.0476) (14.2857 -28.5714)
|
||||
OPEN 10 (9.5238 38.0952) (19.0476 28.5714) (19.0476 19.0476)
|
||||
(14.2857 9.5238) (9.5238 4.7619) (4.7619 -4.7619) (4.7619 -14.2857)
|
||||
(9.5238 -23.8095) (14.2857 -28.5714) (23.8095 -33.3333)
|
||||
INDEX 124 STROKE 1 CENTER 0.0000 RIGHT 0.0000
|
||||
OPEN 2 (0.0000 119.0476) (0.0000 -33.3333)
|
||||
INDEX 125 STROKE 3 CENTER 9.5238 RIGHT 23.8095
|
||||
OPEN 10 (0.0000 119.0476) (9.5238 114.2857) (14.2857 109.5238)
|
||||
(19.0476 100.0000) (19.0476 90.4762) (14.2857 80.9524) (9.5238 76.1905)
|
||||
(4.7619 66.6667) (4.7619 57.1429) (14.2857 47.6190)
|
||||
OPEN 17 (9.5238 114.2857) (14.2857 104.7619) (14.2857 95.2381)
|
||||
(9.5238 85.7143) (4.7619 80.9524) (0.0000 71.4286) (0.0000 61.9048)
|
||||
(4.7619 52.3810) (23.8095 42.8571) (4.7619 33.3333) (0.0000 23.8095)
|
||||
(0.0000 14.2857) (4.7619 4.7619) (9.5238 0.0000) (14.2857 -9.5238)
|
||||
(14.2857 -19.0476) (9.5238 -28.5714)
|
||||
OPEN 10 (14.2857 38.0952) (4.7619 28.5714) (4.7619 19.0476)
|
||||
(9.5238 9.5238) (14.2857 4.7619) (19.0476 -4.7619) (19.0476 -14.2857)
|
||||
(14.2857 -23.8095) (9.5238 -28.5714) (0.0000 -33.3333)
|
||||
INDEX 126 STROKE 2 CENTER 42.8571 RIGHT 85.7143
|
||||
OPEN 11 (0.0000 28.5714) (0.0000 38.0952) (4.7619 52.3810)
|
||||
(14.2857 57.1429) (23.8095 57.1429) (33.3333 52.3810) (52.3810 38.0952)
|
||||
(61.9048 33.3333) (71.4286 33.3333) (80.9524 38.0952) (85.7143 47.6190)
|
||||
OPEN 11 (0.0000 38.0952) (4.7619 47.6190) (14.2857 52.3810)
|
||||
(23.8095 52.3810) (33.3333 47.6190) (52.3810 33.3333) (61.9048 28.5714)
|
||||
(71.4286 28.5714) (80.9524 33.3333) (85.7143 47.6190) (85.7143 57.1429)
|
||||
INDEX 127 STROKE 2 CENTER 33.3333 RIGHT 66.6667
|
||||
OPEN 2 (52.3810 100.0000) (14.2857 -33.3333)
|
||||
OPEN 17 (28.5714 66.6667) (14.2857 61.9048) (4.7619 52.3810)
|
||||
(0.0000 38.0952) (0.0000 23.8095) (4.7619 14.2857) (14.2857 4.7619)
|
||||
(28.5714 0.0000) (38.0952 0.0000) (52.3810 4.7619) (61.9048 14.2857)
|
||||
(66.6667 28.5714) (66.6667 42.8571) (61.9048 52.3810) (52.3810 61.9048)
|
||||
(38.0952 66.6667) (28.5714 66.6667)
|
||||
|
||||
|
||||
|
||||
#/* NCGA GRAFNET:SANS-SERIF NORMAL*/
|
||||
|
||||
BEARING 32 L_SPACE 0.0 WIDTH 20.0 R_SPACE 0.0
|
||||
BEARING 33 L_SPACE 8.62 WIDTH 13.64 R_SPACE 8.48
|
||||
BEARING 34 L_SPACE 4.02 WIDTH 32.86 R_SPACE 9.32
|
||||
BEARING 35 L_SPACE 3.2 WIDTH 68.94 R_SPACE 4.86
|
||||
BEARING 36 L_SPACE 4.82 WIDTH 67.44 R_SPACE 4.72
|
||||
BEARING 37 L_SPACE 6.36 WIDTH 112.38 R_SPACE 4.5
|
||||
BEARING 38 L_SPACE 5.98 WIDTH 82.02 R_SPACE 0.54
|
||||
BEARING 39 L_SPACE 4.44 WIDTH 13.36 R_SPACE 9.18
|
||||
BEARING 40 L_SPACE 7.58 WIDTH 24.72 R_SPACE 6.26
|
||||
BEARING 41 L_SPACE 5.28 WIDTH 24.34 R_SPACE 8.92
|
||||
BEARING 42 L_SPACE 6.96 WIDTH 42.06 R_SPACE 4.86
|
||||
BEARING 43 L_SPACE 5.98 WIDTH 96.36 R_SPACE 5.56
|
||||
BEARING 44 L_SPACE 8.76 WIDTH 14.2 R_SPACE 7.78
|
||||
BEARING 45 L_SPACE 7.38 WIDTH 38.84 R_SPACE 7.66
|
||||
BEARING 46 L_SPACE 8.34 WIDTH 13.78 R_SPACE 8.62
|
||||
BEARING 47 L_SPACE 7.24 WIDTH 38.44 R_SPACE 8.2
|
||||
BEARING 48 L_SPACE 4.98 WIDTH 66.58 R_SPACE 5.42
|
||||
BEARING 49 L_SPACE 11.82 WIDTH 34.26 R_SPACE 30.9
|
||||
BEARING 50 L_SPACE 5.42 WIDTH 66.0 R_SPACE 5.56
|
||||
BEARING 51 L_SPACE 5.0 WIDTH 66.62 R_SPACE 5.38
|
||||
BEARING 52 L_SPACE 3.88 WIDTH 68.24 R_SPACE 4.86
|
||||
BEARING 53 L_SPACE 4.86 WIDTH 65.96 R_SPACE 6.16
|
||||
BEARING 54 L_SPACE 5.58 WIDTH 65.08 R_SPACE 6.32
|
||||
BEARING 55 L_SPACE 5.56 WIDTH 66.42 R_SPACE 5.0
|
||||
BEARING 56 L_SPACE 5.6 WIDTH 65.98 R_SPACE 5.4
|
||||
BEARING 57 L_SPACE 6.6 WIDTH 64.82 R_SPACE 5.56
|
||||
BEARING 58 L_SPACE 9.32 WIDTH 14.06 R_SPACE 7.38
|
||||
BEARING 59 L_SPACE 8.2 WIDTH 13.96 R_SPACE 8.58
|
||||
BEARING 60 L_SPACE 3.06 WIDTH 102.5 R_SPACE 2.36
|
||||
BEARING 61 L_SPACE 5.7 WIDTH 96.36 R_SPACE 5.84
|
||||
BEARING 62 L_SPACE 2.78 WIDTH 102.5 R_SPACE 2.64
|
||||
BEARING 63 L_SPACE 8.42 WIDTH 60.22 R_SPACE 8.34
|
||||
BEARING 64 L_SPACE 6.36 WIDTH 126.24 R_SPACE 6.1
|
||||
BEARING 65 L_SPACE 2.5 WIDTH 88.16 R_SPACE 1.8
|
||||
BEARING 66 L_SPACE 11.42 WIDTH 75.5 R_SPACE 5.54
|
||||
BEARING 67 L_SPACE 6.66 WIDTH 87.06 R_SPACE 6.4
|
||||
BEARING 68 L_SPACE 11.96 WIDTH 81.48 R_SPACE 6.66
|
||||
BEARING 69 L_SPACE 11.42 WIDTH 72.28 R_SPACE 4.86
|
||||
BEARING 70 L_SPACE 11.42 WIDTH 67.96 R_SPACE 5.42
|
||||
BEARING 71 L_SPACE 7.06 WIDTH 89.56 R_SPACE 11.28
|
||||
BEARING 72 L_SPACE 11.42 WIDTH 77.7 R_SPACE 11.0
|
||||
BEARING 73 L_SPACE 10.86 WIDTH 13.36 R_SPACE 10.44
|
||||
BEARING 74 L_SPACE 2.5 WIDTH 56.96 R_SPACE 9.88
|
||||
BEARING 75 L_SPACE 11.28 WIDTH 79.8 R_SPACE 1.38
|
||||
BEARING 76 L_SPACE 11.68 WIDTH 62.8 R_SPACE 2.5
|
||||
BEARING 77 L_SPACE 10.86 WIDTH 94.56 R_SPACE 10.16
|
||||
BEARING 78 L_SPACE 11.14 WIDTH 77.98 R_SPACE 11.0
|
||||
BEARING 79 L_SPACE 6.24 WIDTH 95.28 R_SPACE 6.4
|
||||
BEARING 80 L_SPACE 12.1 WIDTH 73.44 R_SPACE 6.9
|
||||
BEARING 81 L_SPACE 5.3 WIDTH 96.0 R_SPACE 6.6
|
||||
BEARING 82 L_SPACE 11.68 WIDTH 80.64 R_SPACE 4.02
|
||||
BEARING 83 L_SPACE 8.0 WIDTH 78.28 R_SPACE 6.16
|
||||
BEARING 84 L_SPACE 2.36 WIDTH 79.52 R_SPACE 2.92
|
||||
BEARING 85 L_SPACE 11.54 WIDTH 77.28 R_SPACE 11.28
|
||||
BEARING 86 L_SPACE 2.36 WIDTH 87.04 R_SPACE 3.06
|
||||
BEARING 87 L_SPACE 2.22 WIDTH 125.76 R_SPACE 3.06
|
||||
BEARING 88 L_SPACE 2.5 WIDTH 86.76 R_SPACE 3.2
|
||||
BEARING 89 L_SPACE 1.52 WIDTH 88.98 R_SPACE 1.94
|
||||
BEARING 90 L_SPACE 2.5 WIDTH 77.7 R_SPACE 4.58
|
||||
BEARING 91 L_SPACE 7.78 WIDTH 25.76 R_SPACE 5.0
|
||||
BEARING 92 L_SPACE 5.84 WIDTH 73.24 R_SPACE 5.7
|
||||
BEARING 93 L_SPACE 4.44 WIDTH 25.48 R_SPACE 8.62
|
||||
BEARING 94 L_SPACE 5.98 WIDTH 55.28 R_SPACE 8.06
|
||||
BEARING 95 L_SPACE -1.1 WIDTH 70.04 R_SPACE 0.4
|
||||
BEARING 96 L_SPACE 28.26 WIDTH 25.9 R_SPACE 26.74
|
||||
BEARING 97 L_SPACE 6.68 WIDTH 67.54 R_SPACE 2.78
|
||||
BEARING 98 L_SPACE 8.76 WIDTH 63.66 R_SPACE 4.56
|
||||
BEARING 99 L_SPACE 5.52 WIDTH 61.46 R_SPACE 6.26
|
||||
BEARING 100 L_SPACE 4.64 WIDTH 63.88 R_SPACE 8.48
|
||||
BEARING 101 L_SPACE 5.72 WIDTH 65.62 R_SPACE 5.66
|
||||
BEARING 102 L_SPACE 0.68 WIDTH 34.12 R_SPACE -0.12
|
||||
BEARING 103 L_SPACE 5.36 WIDTH 63.16 R_SPACE 8.48
|
||||
BEARING 104 L_SPACE 9.6 WIDTH 58.34 R_SPACE 9.04
|
||||
BEARING 105 L_SPACE 10.02 WIDTH 11.42 R_SPACE 9.32
|
||||
BEARING 106 L_SPACE -1.66 WIDTH 23.1 R_SPACE 9.32
|
||||
BEARING 107 L_SPACE 9.6 WIDTH 59.18 R_SPACE 0.54
|
||||
BEARING 108 L_SPACE 10.02 WIDTH 11.42 R_SPACE 9.32
|
||||
BEARING 109 L_SPACE 9.6 WIDTH 96.36 R_SPACE 9.6
|
||||
BEARING 110 L_SPACE 9.18 WIDTH 58.48 R_SPACE 9.32
|
||||
BEARING 111 L_SPACE 4.98 WIDTH 67.14 R_SPACE 4.86
|
||||
BEARING 112 L_SPACE 9.46 WIDTH 63.34 R_SPACE 4.2
|
||||
BEARING 113 L_SPACE 4.84 WIDTH 63.38 R_SPACE 8.76
|
||||
BEARING 114 L_SPACE 9.46 WIDTH 34.8 R_SPACE 1.94
|
||||
BEARING 115 L_SPACE 4.7 WIDTH 59.4 R_SPACE 5.24
|
||||
BEARING 116 L_SPACE 0.54 WIDTH 33.42 R_SPACE 0.68
|
||||
BEARING 117 L_SPACE 9.46 WIDTH 58.2 R_SPACE 9.32
|
||||
BEARING 118 L_SPACE 1.8 WIDTH 65.86 R_SPACE 1.66
|
||||
BEARING 119 L_SPACE 2.5 WIDTH 95.82 R_SPACE 1.8
|
||||
BEARING 120 L_SPACE 1.66 WIDTH 65.32 R_SPACE 2.36
|
||||
BEARING 121 L_SPACE 1.8 WIDTH 65.18 R_SPACE 2.36
|
||||
BEARING 122 L_SPACE 4.44 WIDTH 59.88 R_SPACE 5.0
|
||||
BEARING 123 L_SPACE 7.38 WIDTH 36.06 R_SPACE 10.44
|
||||
BEARING 124 L_SPACE 11.54 WIDTH 6.96 R_SPACE 12.24
|
||||
BEARING 125 L_SPACE 9.18 WIDTH 36.2 R_SPACE 8.48
|
||||
BEARING 126 L_SPACE 2.92 WIDTH 102.36 R_SPACE 2.64
|
||||
|
503
freeglut/freeglut/genfonts/Roman_M.src
Normal file
503
freeglut/freeglut/genfonts/Roman_M.src
Normal file
@ -0,0 +1,503 @@
|
||||
##
|
||||
# $XConsortium: Roman_M.src,v 5.3 94/04/17 20:10:06 rws Exp $
|
||||
##
|
||||
## Copyright (c) 1989,1990, 1991 by Sun Microsystems, Inc. and the X Consortium.
|
||||
##
|
||||
## All Rights Reserved
|
||||
##
|
||||
## Permission to use, copy, modify, and distribute this software and its
|
||||
## documentation for any purpose and without fee is hereby granted,
|
||||
## provided that the above copyright notice appear in all copies and that
|
||||
## both that copyright notice and this permission notice appear in
|
||||
## supporting documentation, and that the names of Sun Microsystems
|
||||
## and the X Consortium not be used in advertising or publicity
|
||||
## pertaining to distribution of the software without specific, written
|
||||
## prior permission.
|
||||
##
|
||||
## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
## EVENT SHALL SUN MICROSYSTEMS OR THE X CONSORTIUM BE LIABLE FOR ANY SPECIAL,
|
||||
## INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
|
||||
## FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
## NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
|
||||
## WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
# Mono-spaced version of Roman Simplex font.
|
||||
|
||||
FONTNAME Roman
|
||||
TOP 119.0476
|
||||
BOTTOM -33.3333
|
||||
NUM_CH 128
|
||||
PROPERTIES 3
|
||||
|
||||
(CHARSET_REGISTRY ISO8859)
|
||||
(CHARSET_ENCODING "1")
|
||||
(SPACING M)
|
||||
|
||||
INDEX 32 STROKE 0 CENTER 52.3810 RIGHT 104.7619
|
||||
INDEX 33 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3810 100.0000) (52.3810 33.3333)
|
||||
OPEN 5 (52.3810 9.5238) (47.6191 4.7619) (52.3810 0.0000)
|
||||
(57.1429 4.7619) (52.3810 9.5238)
|
||||
INDEX 34 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (33.3334 100.0000) (33.3334 66.6667)
|
||||
OPEN 2 (71.4286 100.0000) (71.4286 66.6667)
|
||||
INDEX 35 STROKE 4 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (54.7619 119.0476) (21.4286 -33.3333)
|
||||
OPEN 2 (83.3334 119.0476) (50.0000 -33.3333)
|
||||
OPEN 2 (21.4286 57.1429) (88.0952 57.1429)
|
||||
OPEN 2 (16.6667 28.5714) (83.3334 28.5714)
|
||||
INDEX 36 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (42.8571 119.0476) (42.8571 -19.0476)
|
||||
OPEN 2 (61.9047 119.0476) (61.9047 -19.0476)
|
||||
OPEN 20 (85.7143 85.7143) (76.1905 95.2381) (61.9047 100.0000)
|
||||
(42.8571 100.0000) (28.5714 95.2381) (19.0476 85.7143) (19.0476 76.1905)
|
||||
(23.8095 66.6667) (28.5714 61.9048) (38.0952 57.1429) (66.6666 47.6190)
|
||||
(76.1905 42.8571) (80.9524 38.0952) (85.7143 28.5714) (85.7143 14.2857)
|
||||
(76.1905 4.7619) (61.9047 0.0000) (42.8571 0.0000) (28.5714 4.7619)
|
||||
(19.0476 14.2857)
|
||||
INDEX 37 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (95.2381 100.0000) (9.5238 0.0000)
|
||||
OPEN 16 (33.3333 100.0000) (42.8571 90.4762) (42.8571 80.9524)
|
||||
(38.0952 71.4286) (28.5714 66.6667) (19.0476 66.6667) (9.5238 76.1905)
|
||||
(9.5238 85.7143) (14.2857 95.2381) (23.8095 100.0000) (33.3333 100.0000)
|
||||
(42.8571 95.2381) (57.1428 90.4762) (71.4286 90.4762) (85.7143 95.2381)
|
||||
(95.2381 100.0000)
|
||||
OPEN 11 (76.1905 33.3333) (66.6667 28.5714) (61.9048 19.0476)
|
||||
(61.9048 9.5238) (71.4286 0.0000) (80.9524 0.0000) (90.4762 4.7619)
|
||||
(95.2381 14.2857) (95.2381 23.8095) (85.7143 33.3333) (76.1905 33.3333)
|
||||
INDEX 38 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 34 (100.0000 57.1429) (100.0000 61.9048) (95.2381 66.6667)
|
||||
(90.4762 66.6667) (85.7143 61.9048) (80.9524 52.3810) (71.4286 28.5714)
|
||||
(61.9048 14.2857) (52.3809 4.7619) (42.8571 0.0000) (23.8095 0.0000)
|
||||
(14.2857 4.7619) (9.5238 9.5238) (4.7619 19.0476) (4.7619 28.5714)
|
||||
(9.5238 38.0952) (14.2857 42.8571) (47.6190 61.9048) (52.3809 66.6667)
|
||||
(57.1429 76.1905) (57.1429 85.7143) (52.3809 95.2381) (42.8571 100.0000)
|
||||
(33.3333 95.2381) (28.5714 85.7143) (28.5714 76.1905) (33.3333 61.9048)
|
||||
(42.8571 47.6190) (66.6667 14.2857) (76.1905 4.7619) (85.7143 0.0000)
|
||||
(95.2381 0.0000) (100.0000 4.7619) (100.0000 9.5238)
|
||||
INDEX 39 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3810 100.0000) (52.3810 66.6667)
|
||||
INDEX 40 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 10 (69.0476 119.0476) (59.5238 109.5238) (50.0000 95.2381)
|
||||
(40.4762 76.1905) (35.7143 52.3810) (35.7143 33.3333) (40.4762 9.5238)
|
||||
(50.0000 -9.5238) (59.5238 -23.8095) (69.0476 -33.3333)
|
||||
INDEX 41 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 10 (35.7143 119.0476) (45.2381 109.5238) (54.7619 95.2381)
|
||||
(64.2857 76.1905) (69.0476 52.3810) (69.0476 33.3333) (64.2857 9.5238)
|
||||
(54.7619 -9.5238) (45.2381 -23.8095) (35.7143 -33.3333)
|
||||
INDEX 42 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3810 71.4286) (52.3810 14.2857)
|
||||
OPEN 2 (28.5715 57.1429) (76.1905 28.5714)
|
||||
OPEN 2 (76.1905 57.1429) (28.5715 28.5714)
|
||||
INDEX 43 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3809 85.7143) (52.3809 0.0000)
|
||||
OPEN 2 (9.5238 42.8571) (95.2381 42.8571)
|
||||
INDEX 44 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 8 (57.1429 4.7619) (52.3810 0.0000) (47.6191 4.7619)
|
||||
(52.3810 9.5238) (57.1429 4.7619) (57.1429 -4.7619) (52.3810 -14.2857)
|
||||
(47.6191 -19.0476)
|
||||
INDEX 45 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (9.5238 42.8571) (95.2381 42.8571)
|
||||
INDEX 46 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 5 (52.3810 9.5238) (47.6191 4.7619) (52.3810 0.0000)
|
||||
(57.1429 4.7619) (52.3810 9.5238)
|
||||
INDEX 47 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 -14.2857) (85.7143 100.0000)
|
||||
INDEX 48 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 17 (47.6190 100.0000) (33.3333 95.2381) (23.8095 80.9524)
|
||||
(19.0476 57.1429) (19.0476 42.8571) (23.8095 19.0476) (33.3333 4.7619)
|
||||
(47.6190 0.0000) (57.1428 0.0000) (71.4286 4.7619) (80.9524 19.0476)
|
||||
(85.7143 42.8571) (85.7143 57.1429) (80.9524 80.9524) (71.4286 95.2381)
|
||||
(57.1428 100.0000) (47.6190 100.0000)
|
||||
INDEX 49 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 4 (40.4762 80.9524) (50.0000 85.7143) (64.2857 100.0000)
|
||||
(64.2857 0.0000)
|
||||
INDEX 50 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 14 (23.8095 76.1905) (23.8095 80.9524) (28.5714 90.4762)
|
||||
(33.3333 95.2381) (42.8571 100.0000) (61.9047 100.0000) (71.4286 95.2381)
|
||||
(76.1905 90.4762) (80.9524 80.9524) (80.9524 71.4286) (76.1905 61.9048)
|
||||
(66.6666 47.6190) (19.0476 0.0000) (85.7143 0.0000)
|
||||
INDEX 51 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 15 (28.5714 100.0000) (80.9524 100.0000) (52.3809 61.9048)
|
||||
(66.6666 61.9048) (76.1905 57.1429) (80.9524 52.3810) (85.7143 38.0952)
|
||||
(85.7143 28.5714) (80.9524 14.2857) (71.4286 4.7619) (57.1428 0.0000)
|
||||
(42.8571 0.0000) (28.5714 4.7619) (23.8095 9.5238) (19.0476 19.0476)
|
||||
INDEX 52 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 3 (64.2857 100.0000) (16.6667 33.3333) (88.0952 33.3333)
|
||||
OPEN 2 (64.2857 100.0000) (64.2857 0.0000)
|
||||
INDEX 53 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 17 (76.1905 100.0000) (28.5714 100.0000) (23.8095 57.1429)
|
||||
(28.5714 61.9048) (42.8571 66.6667) (57.1428 66.6667) (71.4286 61.9048)
|
||||
(80.9524 52.3810) (85.7143 38.0952) (85.7143 28.5714) (80.9524 14.2857)
|
||||
(71.4286 4.7619) (57.1428 0.0000) (42.8571 0.0000) (28.5714 4.7619)
|
||||
(23.8095 9.5238) (19.0476 19.0476)
|
||||
INDEX 54 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 23 (78.5714 85.7143) (73.8096 95.2381) (59.5238 100.0000)
|
||||
(50.0000 100.0000) (35.7143 95.2381) (26.1905 80.9524) (21.4286 57.1429)
|
||||
(21.4286 33.3333) (26.1905 14.2857) (35.7143 4.7619) (50.0000 0.0000)
|
||||
(54.7619 0.0000) (69.0476 4.7619) (78.5714 14.2857) (83.3334 28.5714)
|
||||
(83.3334 33.3333) (78.5714 47.6190) (69.0476 57.1429) (54.7619 61.9048)
|
||||
(50.0000 61.9048) (35.7143 57.1429) (26.1905 47.6190) (21.4286 33.3333)
|
||||
INDEX 55 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (85.7143 100.0000) (38.0952 0.0000)
|
||||
OPEN 2 (19.0476 100.0000) (85.7143 100.0000)
|
||||
INDEX 56 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 29 (42.8571 100.0000) (28.5714 95.2381) (23.8095 85.7143)
|
||||
(23.8095 76.1905) (28.5714 66.6667) (38.0952 61.9048) (57.1428 57.1429)
|
||||
(71.4286 52.3810) (80.9524 42.8571) (85.7143 33.3333) (85.7143 19.0476)
|
||||
(80.9524 9.5238) (76.1905 4.7619) (61.9047 0.0000) (42.8571 0.0000)
|
||||
(28.5714 4.7619) (23.8095 9.5238) (19.0476 19.0476) (19.0476 33.3333)
|
||||
(23.8095 42.8571) (33.3333 52.3810) (47.6190 57.1429) (66.6666 61.9048)
|
||||
(76.1905 66.6667) (80.9524 76.1905) (80.9524 85.7143) (76.1905 95.2381)
|
||||
(61.9047 100.0000) (42.8571 100.0000)
|
||||
INDEX 57 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 23 (83.3334 66.6667) (78.5714 52.3810) (69.0476 42.8571)
|
||||
(54.7619 38.0952) (50.0000 38.0952) (35.7143 42.8571) (26.1905 52.3810)
|
||||
(21.4286 66.6667) (21.4286 71.4286) (26.1905 85.7143) (35.7143 95.2381)
|
||||
(50.0000 100.0000) (54.7619 100.0000) (69.0476 95.2381) (78.5714 85.7143)
|
||||
(83.3334 66.6667) (83.3334 42.8571) (78.5714 19.0476) (69.0476 4.7619)
|
||||
(54.7619 0.0000) (45.2381 0.0000) (30.9524 4.7619) (26.1905 14.2857)
|
||||
INDEX 58 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 5 (52.3810 66.6667) (47.6191 61.9048) (52.3810 57.1429)
|
||||
(57.1429 61.9048) (52.3810 66.6667)
|
||||
OPEN 5 (52.3810 9.5238) (47.6191 4.7619) (52.3810 0.0000)
|
||||
(57.1429 4.7619) (52.3810 9.5238)
|
||||
INDEX 59 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 5 (52.3810 66.6667) (47.6191 61.9048) (52.3810 57.1429)
|
||||
(57.1429 61.9048) (52.3810 66.6667)
|
||||
OPEN 8 (57.1429 4.7619) (52.3810 0.0000) (47.6191 4.7619)
|
||||
(52.3810 9.5238) (57.1429 4.7619) (57.1429 -4.7619) (52.3810 -14.2857)
|
||||
(47.6191 -19.0476)
|
||||
INDEX 60 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 3 (90.4762 85.7143) (14.2857 42.8571) (90.4762 0.0000)
|
||||
INDEX 61 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (9.5238 57.1429) (95.2381 57.1429)
|
||||
OPEN 2 (9.5238 28.5714) (95.2381 28.5714)
|
||||
INDEX 62 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 3 (14.2857 85.7143) (90.4762 42.8571) (14.2857 0.0000)
|
||||
INDEX 63 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 14 (23.8095 76.1905) (23.8095 80.9524) (28.5714 90.4762)
|
||||
(33.3333 95.2381) (42.8571 100.0000) (61.9047 100.0000) (71.4285 95.2381)
|
||||
(76.1905 90.4762) (80.9524 80.9524) (80.9524 71.4286) (76.1905 61.9048)
|
||||
(71.4285 57.1429) (52.3809 47.6190) (52.3809 33.3333)
|
||||
OPEN 5 (52.3809 9.5238) (47.6190 4.7619) (52.3809 0.0000)
|
||||
(57.1428 4.7619) (52.3809 9.5238)
|
||||
INDEX 64 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 8 (64.2857 52.3810) (54.7619 57.1429) (45.2381 57.1429)
|
||||
(40.4762 47.6190) (40.4762 42.8571) (45.2381 33.3333) (54.7619 33.3333)
|
||||
(64.2857 38.0952)
|
||||
OPEN 19 (64.2857 57.1429) (64.2857 38.0952) (69.0476 33.3333)
|
||||
(78.5714 33.3333) (83.3334 42.8571) (83.3334 47.6190) (78.5714 61.9048)
|
||||
(69.0476 71.4286) (54.7619 76.1905) (50.0000 76.1905) (35.7143 71.4286)
|
||||
(26.1905 61.9048) (21.4286 47.6190) (21.4286 42.8571) (26.1905 28.5714)
|
||||
(35.7143 19.0476) (50.0000 14.2857) (54.7619 14.2857) (69.0476 19.0476)
|
||||
INDEX 65 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3809 100.0000) (14.2857 0.0000)
|
||||
OPEN 2 (52.3809 100.0000) (90.4762 0.0000)
|
||||
OPEN 2 (28.5714 33.3333) (76.1905 33.3333)
|
||||
INDEX 66 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 100.0000) (19.0476 0.0000)
|
||||
OPEN 9 (19.0476 100.0000) (61.9047 100.0000) (76.1905 95.2381)
|
||||
(80.9524 90.4762) (85.7143 80.9524) (85.7143 71.4286) (80.9524 61.9048)
|
||||
(76.1905 57.1429) (61.9047 52.3810)
|
||||
OPEN 10 (19.0476 52.3810) (61.9047 52.3810) (76.1905 47.6190)
|
||||
(80.9524 42.8571) (85.7143 33.3333) (85.7143 19.0476) (80.9524 9.5238)
|
||||
(76.1905 4.7619) (61.9047 0.0000) (19.0476 0.0000)
|
||||
INDEX 67 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 18 (88.0952 76.1905) (83.3334 85.7143) (73.8096 95.2381)
|
||||
(64.2857 100.0000) (45.2381 100.0000) (35.7143 95.2381) (26.1905 85.7143)
|
||||
(21.4286 76.1905) (16.6667 61.9048) (16.6667 38.0952) (21.4286 23.8095)
|
||||
(26.1905 14.2857) (35.7143 4.7619) (45.2381 0.0000) (64.2857 0.0000)
|
||||
(73.8096 4.7619) (83.3334 14.2857) (88.0952 23.8095)
|
||||
INDEX 68 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 100.0000) (19.0476 0.0000)
|
||||
OPEN 12 (19.0476 100.0000) (52.3809 100.0000) (66.6666 95.2381)
|
||||
(76.1905 85.7143) (80.9524 76.1905) (85.7143 61.9048) (85.7143 38.0952)
|
||||
(80.9524 23.8095) (76.1905 14.2857) (66.6666 4.7619) (52.3809 0.0000)
|
||||
(19.0476 0.0000)
|
||||
INDEX 69 STROKE 4 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (21.4286 100.0000) (21.4286 0.0000)
|
||||
OPEN 2 (21.4286 100.0000) (83.3334 100.0000)
|
||||
OPEN 2 (21.4286 52.3810) (59.5238 52.3810)
|
||||
OPEN 2 (21.4286 0.0000) (83.3334 0.0000)
|
||||
INDEX 70 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (21.4286 100.0000) (21.4286 0.0000)
|
||||
OPEN 2 (21.4286 100.0000) (83.3334 100.0000)
|
||||
OPEN 2 (21.4286 52.3810) (59.5238 52.3810)
|
||||
INDEX 71 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 19 (88.0952 76.1905) (83.3334 85.7143) (73.8096 95.2381)
|
||||
(64.2857 100.0000) (45.2381 100.0000) (35.7143 95.2381) (26.1905 85.7143)
|
||||
(21.4286 76.1905) (16.6667 61.9048) (16.6667 38.0952) (21.4286 23.8095)
|
||||
(26.1905 14.2857) (35.7143 4.7619) (45.2381 0.0000) (64.2857 0.0000)
|
||||
(73.8096 4.7619) (83.3334 14.2857) (88.0952 23.8095) (88.0952 38.0952)
|
||||
OPEN 2 (64.2857 38.0952) (88.0952 38.0952)
|
||||
INDEX 72 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 100.0000) (19.0476 0.0000)
|
||||
OPEN 2 (85.7143 100.0000) (85.7143 0.0000)
|
||||
OPEN 2 (19.0476 52.3810) (85.7143 52.3810)
|
||||
INDEX 73 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3810 100.0000) (52.3810 0.0000)
|
||||
INDEX 74 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 10 (76.1905 100.0000) (76.1905 23.8095) (71.4286 9.5238)
|
||||
(66.6667 4.7619) (57.1429 0.0000) (47.6191 0.0000) (38.0953 4.7619)
|
||||
(33.3334 9.5238) (28.5715 23.8095) (28.5715 33.3333)
|
||||
INDEX 75 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 100.0000) (19.0476 0.0000)
|
||||
OPEN 2 (85.7143 100.0000) (19.0476 33.3333)
|
||||
OPEN 2 (42.8571 57.1429) (85.7143 0.0000)
|
||||
INDEX 76 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (23.8095 100.0000) (23.8095 0.0000)
|
||||
OPEN 2 (23.8095 0.0000) (80.9524 0.0000)
|
||||
INDEX 77 STROKE 4 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (14.2857 100.0000) (14.2857 0.0000)
|
||||
OPEN 2 (14.2857 100.0000) (52.3809 0.0000)
|
||||
OPEN 2 (90.4762 100.0000) (52.3809 0.0000)
|
||||
OPEN 2 (90.4762 100.0000) (90.4762 0.0000)
|
||||
INDEX 78 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 100.0000) (19.0476 0.0000)
|
||||
OPEN 2 (19.0476 100.0000) (85.7143 0.0000)
|
||||
OPEN 2 (85.7143 100.0000) (85.7143 0.0000)
|
||||
INDEX 79 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 21 (42.8571 100.0000) (33.3333 95.2381) (23.8095 85.7143)
|
||||
(19.0476 76.1905) (14.2857 61.9048) (14.2857 38.0952) (19.0476 23.8095)
|
||||
(23.8095 14.2857) (33.3333 4.7619) (42.8571 0.0000) (61.9047 0.0000)
|
||||
(71.4286 4.7619) (80.9524 14.2857) (85.7143 23.8095) (90.4762 38.0952)
|
||||
(90.4762 61.9048) (85.7143 76.1905) (80.9524 85.7143) (71.4286 95.2381)
|
||||
(61.9047 100.0000) (42.8571 100.0000)
|
||||
INDEX 80 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 100.0000) (19.0476 0.0000)
|
||||
OPEN 10 (19.0476 100.0000) (61.9047 100.0000) (76.1905 95.2381)
|
||||
(80.9524 90.4762) (85.7143 80.9524) (85.7143 66.6667) (80.9524 57.1429)
|
||||
(76.1905 52.3810) (61.9047 47.6190) (19.0476 47.6190)
|
||||
INDEX 81 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 21 (42.8571 100.0000) (33.3333 95.2381) (23.8095 85.7143)
|
||||
(19.0476 76.1905) (14.2857 61.9048) (14.2857 38.0952) (19.0476 23.8095)
|
||||
(23.8095 14.2857) (33.3333 4.7619) (42.8571 0.0000) (61.9047 0.0000)
|
||||
(71.4286 4.7619) (80.9524 14.2857) (85.7143 23.8095) (90.4762 38.0952)
|
||||
(90.4762 61.9048) (85.7143 76.1905) (80.9524 85.7143) (71.4286 95.2381)
|
||||
(61.9047 100.0000) (42.8571 100.0000)
|
||||
OPEN 2 (57.1428 19.0476) (85.7143 -9.5238)
|
||||
INDEX 82 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 100.0000) (19.0476 0.0000)
|
||||
OPEN 10 (19.0476 100.0000) (61.9047 100.0000) (76.1905 95.2381)
|
||||
(80.9524 90.4762) (85.7143 80.9524) (85.7143 71.4286) (80.9524 61.9048)
|
||||
(76.1905 57.1429) (61.9047 52.3810) (19.0476 52.3810)
|
||||
OPEN 2 (52.3809 52.3810) (85.7143 0.0000)
|
||||
INDEX 83 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 20 (85.7143 85.7143) (76.1905 95.2381) (61.9047 100.0000)
|
||||
(42.8571 100.0000) (28.5714 95.2381) (19.0476 85.7143) (19.0476 76.1905)
|
||||
(23.8095 66.6667) (28.5714 61.9048) (38.0952 57.1429) (66.6666 47.6190)
|
||||
(76.1905 42.8571) (80.9524 38.0952) (85.7143 28.5714) (85.7143 14.2857)
|
||||
(76.1905 4.7619) (61.9047 0.0000) (42.8571 0.0000) (28.5714 4.7619)
|
||||
(19.0476 14.2857)
|
||||
INDEX 84 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3809 100.0000) (52.3809 0.0000)
|
||||
OPEN 2 (19.0476 100.0000) (85.7143 100.0000)
|
||||
INDEX 85 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 10 (19.0476 100.0000) (19.0476 28.5714) (23.8095 14.2857)
|
||||
(33.3333 4.7619) (47.6190 0.0000) (57.1428 0.0000) (71.4286 4.7619)
|
||||
(80.9524 14.2857) (85.7143 28.5714) (85.7143 100.0000)
|
||||
INDEX 86 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (14.2857 100.0000) (52.3809 0.0000)
|
||||
OPEN 2 (90.4762 100.0000) (52.3809 0.0000)
|
||||
INDEX 87 STROKE 4 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (4.7619 100.0000) (28.5714 0.0000)
|
||||
OPEN 2 (52.3809 100.0000) (28.5714 0.0000)
|
||||
OPEN 2 (52.3809 100.0000) (76.1905 0.0000)
|
||||
OPEN 2 (100.0000 100.0000) (76.1905 0.0000)
|
||||
INDEX 88 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 100.0000) (85.7143 0.0000)
|
||||
OPEN 2 (85.7143 100.0000) (19.0476 0.0000)
|
||||
INDEX 89 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 3 (14.2857 100.0000) (52.3809 52.3810) (52.3809 0.0000)
|
||||
OPEN 2 (90.4762 100.0000) (52.3809 52.3810)
|
||||
INDEX 90 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (85.7143 100.0000) (19.0476 0.0000)
|
||||
OPEN 2 (19.0476 100.0000) (85.7143 100.0000)
|
||||
OPEN 2 (19.0476 0.0000) (85.7143 0.0000)
|
||||
INDEX 91 STROKE 4 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (35.7143 119.0476) (35.7143 -33.3333)
|
||||
OPEN 2 (40.4762 119.0476) (40.4762 -33.3333)
|
||||
OPEN 2 (35.7143 119.0476) (69.0476 119.0476)
|
||||
OPEN 2 (35.7143 -33.3333) (69.0476 -33.3333)
|
||||
INDEX 92 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (19.0476 100.0000) (85.7143 -14.2857)
|
||||
INDEX 93 STROKE 4 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (64.2857 119.0476) (64.2857 -33.3333)
|
||||
OPEN 2 (69.0476 119.0476) (69.0476 -33.3333)
|
||||
OPEN 2 (35.7143 119.0476) (69.0476 119.0476)
|
||||
OPEN 2 (35.7143 -33.3333) (69.0476 -33.3333)
|
||||
INDEX 94 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3809 109.5238) (14.2857 42.8571)
|
||||
OPEN 2 (52.3809 109.5238) (90.4762 42.8571)
|
||||
INDEX 95 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 5 (0.0000 -33.3333) (104.7619 -33.3333) (104.7619 -28.5714)
|
||||
(0.0000 -28.5714) (0.0000 -33.3333)
|
||||
INDEX 96 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (42.8572 100.0000) (66.6667 71.4286)
|
||||
OPEN 3 (42.8572 100.0000) (38.0953 95.2381) (66.6667 71.4286)
|
||||
INDEX 97 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (80.9524 66.6667) (80.9524 0.0000)
|
||||
OPEN 14 (80.9524 52.3810) (71.4285 61.9048) (61.9047 66.6667)
|
||||
(47.6190 66.6667) (38.0952 61.9048) (28.5714 52.3810) (23.8095 38.0952)
|
||||
(23.8095 28.5714) (28.5714 14.2857) (38.0952 4.7619) (47.6190 0.0000)
|
||||
(61.9047 0.0000) (71.4285 4.7619) (80.9524 14.2857)
|
||||
INDEX 98 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (23.8095 100.0000) (23.8095 0.0000)
|
||||
OPEN 14 (23.8095 52.3810) (33.3333 61.9048) (42.8571 66.6667)
|
||||
(57.1428 66.6667) (66.6666 61.9048) (76.1905 52.3810) (80.9524 38.0952)
|
||||
(80.9524 28.5714) (76.1905 14.2857) (66.6666 4.7619) (57.1428 0.0000)
|
||||
(42.8571 0.0000) (33.3333 4.7619) (23.8095 14.2857)
|
||||
INDEX 99 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 14 (80.9524 52.3810) (71.4285 61.9048) (61.9047 66.6667)
|
||||
(47.6190 66.6667) (38.0952 61.9048) (28.5714 52.3810) (23.8095 38.0952)
|
||||
(23.8095 28.5714) (28.5714 14.2857) (38.0952 4.7619) (47.6190 0.0000)
|
||||
(61.9047 0.0000) (71.4285 4.7619) (80.9524 14.2857)
|
||||
INDEX 100 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (80.9524 100.0000) (80.9524 0.0000)
|
||||
OPEN 14 (80.9524 52.3810) (71.4285 61.9048) (61.9047 66.6667)
|
||||
(47.6190 66.6667) (38.0952 61.9048) (28.5714 52.3810) (23.8095 38.0952)
|
||||
(23.8095 28.5714) (28.5714 14.2857) (38.0952 4.7619) (47.6190 0.0000)
|
||||
(61.9047 0.0000) (71.4285 4.7619) (80.9524 14.2857)
|
||||
INDEX 101 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 17 (23.8095 38.0952) (80.9524 38.0952) (80.9524 47.6190)
|
||||
(76.1905 57.1429) (71.4285 61.9048) (61.9047 66.6667) (47.6190 66.6667)
|
||||
(38.0952 61.9048) (28.5714 52.3810) (23.8095 38.0952) (23.8095 28.5714)
|
||||
(28.5714 14.2857) (38.0952 4.7619) (47.6190 0.0000) (61.9047 0.0000)
|
||||
(71.4285 4.7619) (80.9524 14.2857)
|
||||
INDEX 102 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 5 (71.4286 100.0000) (61.9048 100.0000) (52.3810 95.2381)
|
||||
(47.6191 80.9524) (47.6191 0.0000)
|
||||
OPEN 2 (33.3334 66.6667) (66.6667 66.6667)
|
||||
INDEX 103 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 7 (80.9524 66.6667) (80.9524 -9.5238) (76.1905 -23.8095)
|
||||
(71.4285 -28.5714) (61.9047 -33.3333) (47.6190 -33.3333) (38.0952 -28.5714)
|
||||
OPEN 14 (80.9524 52.3810) (71.4285 61.9048) (61.9047 66.6667)
|
||||
(47.6190 66.6667) (38.0952 61.9048) (28.5714 52.3810) (23.8095 38.0952)
|
||||
(23.8095 28.5714) (28.5714 14.2857) (38.0952 4.7619) (47.6190 0.0000)
|
||||
(61.9047 0.0000) (71.4285 4.7619) (80.9524 14.2857)
|
||||
INDEX 104 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (26.1905 100.0000) (26.1905 0.0000)
|
||||
OPEN 7 (26.1905 47.6190) (40.4762 61.9048) (50.0000 66.6667)
|
||||
(64.2857 66.6667) (73.8095 61.9048) (78.5715 47.6190) (78.5715 0.0000)
|
||||
INDEX 105 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 5 (47.6191 100.0000) (52.3810 95.2381) (57.1429 100.0000)
|
||||
(52.3810 104.7619) (47.6191 100.0000)
|
||||
OPEN 2 (52.3810 66.6667) (52.3810 0.0000)
|
||||
INDEX 106 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 5 (57.1429 100.0000) (61.9048 95.2381) (66.6667 100.0000)
|
||||
(61.9048 104.7619) (57.1429 100.0000)
|
||||
OPEN 5 (61.9048 66.6667) (61.9048 -14.2857) (57.1429 -28.5714)
|
||||
(47.6191 -33.3333) (38.0953 -33.3333)
|
||||
INDEX 107 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (26.1905 100.0000) (26.1905 0.0000)
|
||||
OPEN 2 (73.8095 66.6667) (26.1905 19.0476)
|
||||
OPEN 2 (45.2381 38.0952) (78.5715 0.0000)
|
||||
INDEX 108 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3810 100.0000) (52.3810 0.0000)
|
||||
INDEX 109 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (0.0000 66.6667) (0.0000 0.0000)
|
||||
OPEN 7 (0.0000 47.6190) (14.2857 61.9048) (23.8095 66.6667)
|
||||
(38.0952 66.6667) (47.6190 61.9048) (52.3810 47.6190) (52.3810 0.0000)
|
||||
OPEN 7 (52.3810 47.6190) (66.6667 61.9048) (76.1905 66.6667)
|
||||
(90.4762 66.6667) (100.0000 61.9048) (104.7619 47.6190) (104.7619 0.0000)
|
||||
INDEX 110 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (26.1905 66.6667) (26.1905 0.0000)
|
||||
OPEN 7 (26.1905 47.6190) (40.4762 61.9048) (50.0000 66.6667)
|
||||
(64.2857 66.6667) (73.8095 61.9048) (78.5715 47.6190) (78.5715 0.0000)
|
||||
INDEX 111 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 17 (45.2381 66.6667) (35.7143 61.9048) (26.1905 52.3810)
|
||||
(21.4286 38.0952) (21.4286 28.5714) (26.1905 14.2857) (35.7143 4.7619)
|
||||
(45.2381 0.0000) (59.5238 0.0000) (69.0476 4.7619) (78.5714 14.2857)
|
||||
(83.3334 28.5714) (83.3334 38.0952) (78.5714 52.3810) (69.0476 61.9048)
|
||||
(59.5238 66.6667) (45.2381 66.6667)
|
||||
INDEX 112 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (23.8095 66.6667) (23.8095 -33.3333)
|
||||
OPEN 14 (23.8095 52.3810) (33.3333 61.9048) (42.8571 66.6667)
|
||||
(57.1428 66.6667) (66.6666 61.9048) (76.1905 52.3810) (80.9524 38.0952)
|
||||
(80.9524 28.5714) (76.1905 14.2857) (66.6666 4.7619) (57.1428 0.0000)
|
||||
(42.8571 0.0000) (33.3333 4.7619) (23.8095 14.2857)
|
||||
INDEX 113 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (80.9524 66.6667) (80.9524 -33.3333)
|
||||
OPEN 14 (80.9524 52.3810) (71.4285 61.9048) (61.9047 66.6667)
|
||||
(47.6190 66.6667) (38.0952 61.9048) (28.5714 52.3810) (23.8095 38.0952)
|
||||
(23.8095 28.5714) (28.5714 14.2857) (38.0952 4.7619) (47.6190 0.0000)
|
||||
(61.9047 0.0000) (71.4285 4.7619) (80.9524 14.2857)
|
||||
INDEX 114 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (33.3334 66.6667) (33.3334 0.0000)
|
||||
OPEN 5 (33.3334 38.0952) (38.0953 52.3810) (47.6191 61.9048)
|
||||
(57.1429 66.6667) (71.4286 66.6667)
|
||||
INDEX 115 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 17 (78.5715 52.3810) (73.8095 61.9048) (59.5238 66.6667)
|
||||
(45.2381 66.6667) (30.9524 61.9048) (26.1905 52.3810) (30.9524 42.8571)
|
||||
(40.4762 38.0952) (64.2857 33.3333) (73.8095 28.5714) (78.5715 19.0476)
|
||||
(78.5715 14.2857) (73.8095 4.7619) (59.5238 0.0000) (45.2381 0.0000)
|
||||
(30.9524 4.7619) (26.1905 14.2857)
|
||||
INDEX 116 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 5 (47.6191 100.0000) (47.6191 19.0476) (52.3810 4.7619)
|
||||
(61.9048 0.0000) (71.4286 0.0000)
|
||||
OPEN 2 (33.3334 66.6667) (66.6667 66.6667)
|
||||
INDEX 117 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 7 (26.1905 66.6667) (26.1905 19.0476) (30.9524 4.7619)
|
||||
(40.4762 0.0000) (54.7619 0.0000) (64.2857 4.7619) (78.5715 19.0476)
|
||||
OPEN 2 (78.5715 66.6667) (78.5715 0.0000)
|
||||
INDEX 118 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (23.8095 66.6667) (52.3809 0.0000)
|
||||
OPEN 2 (80.9524 66.6667) (52.3809 0.0000)
|
||||
INDEX 119 STROKE 4 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (14.2857 66.6667) (33.3333 0.0000)
|
||||
OPEN 2 (52.3809 66.6667) (33.3333 0.0000)
|
||||
OPEN 2 (52.3809 66.6667) (71.4286 0.0000)
|
||||
OPEN 2 (90.4762 66.6667) (71.4286 0.0000)
|
||||
INDEX 120 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (26.1905 66.6667) (78.5715 0.0000)
|
||||
OPEN 2 (78.5715 66.6667) (26.1905 0.0000)
|
||||
INDEX 121 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (26.1905 66.6667) (54.7619 0.0000)
|
||||
OPEN 6 (83.3334 66.6667) (54.7619 0.0000) (45.2381 -19.0476)
|
||||
(35.7143 -28.5714) (26.1905 -33.3333) (21.4286 -33.3333)
|
||||
INDEX 122 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (78.5715 66.6667) (26.1905 0.0000)
|
||||
OPEN 2 (26.1905 66.6667) (78.5715 66.6667)
|
||||
OPEN 2 (26.1905 0.0000) (78.5715 0.0000)
|
||||
INDEX 123 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 10 (64.2857 119.0476) (54.7619 114.2857) (50.0000 109.5238)
|
||||
(45.2381 100.0000) (45.2381 90.4762) (50.0000 80.9524) (54.7619 76.1905)
|
||||
(59.5238 66.6667) (59.5238 57.1429) (50.0000 47.6190)
|
||||
OPEN 17 (54.7619 114.2857) (50.0000 104.7619) (50.0000 95.2381)
|
||||
(54.7619 85.7143) (59.5238 80.9524) (64.2857 71.4286) (64.2857 61.9048)
|
||||
(59.5238 52.3810) (40.4762 42.8571) (59.5238 33.3333) (64.2857 23.8095)
|
||||
(64.2857 14.2857) (59.5238 4.7619) (54.7619 0.0000) (50.0000 -9.5238)
|
||||
(50.0000 -19.0476) (54.7619 -28.5714)
|
||||
OPEN 10 (50.0000 38.0952) (59.5238 28.5714) (59.5238 19.0476)
|
||||
(54.7619 9.5238) (50.0000 4.7619) (45.2381 -4.7619) (45.2381 -14.2857)
|
||||
(50.0000 -23.8095) (54.7619 -28.5714) (64.2857 -33.3333)
|
||||
INDEX 124 STROKE 1 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (52.3810 119.0476) (52.3810 -33.3333)
|
||||
INDEX 125 STROKE 3 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 10 (40.4762 119.0476) (50.0000 114.2857) (54.7619 109.5238)
|
||||
(59.5238 100.0000) (59.5238 90.4762) (54.7619 80.9524) (50.0000 76.1905)
|
||||
(45.2381 66.6667) (45.2381 57.1429) (54.7619 47.6190)
|
||||
OPEN 17 (50.0000 114.2857) (54.7619 104.7619) (54.7619 95.2381)
|
||||
(50.0000 85.7143) (45.2381 80.9524) (40.4762 71.4286) (40.4762 61.9048)
|
||||
(45.2381 52.3810) (64.2857 42.8571) (45.2381 33.3333) (40.4762 23.8095)
|
||||
(40.4762 14.2857) (45.2381 4.7619) (50.0000 0.0000) (54.7619 -9.5238)
|
||||
(54.7619 -19.0476) (50.0000 -28.5714)
|
||||
OPEN 10 (54.7619 38.0952) (45.2381 28.5714) (45.2381 19.0476)
|
||||
(50.0000 9.5238) (54.7619 4.7619) (59.5238 -4.7619) (59.5238 -14.2857)
|
||||
(54.7619 -23.8095) (50.0000 -28.5714) (40.4762 -33.3333)
|
||||
INDEX 126 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 11 (9.5238 28.5714) (9.5238 38.0952) (14.2857 52.3810)
|
||||
(23.8095 57.1429) (33.3333 57.1429) (42.8571 52.3810) (61.9048 38.0952)
|
||||
(71.4286 33.3333) (80.9524 33.3333) (90.4762 38.0952) (95.2381 47.6190)
|
||||
OPEN 11 (9.5238 38.0952) (14.2857 47.6190) (23.8095 52.3810)
|
||||
(33.3333 52.3810) (42.8571 47.6190) (61.9048 33.3333) (71.4286 28.5714)
|
||||
(80.9524 28.5714) (90.4762 33.3333) (95.2381 47.6190) (95.2381 57.1429)
|
||||
INDEX 127 STROKE 2 CENTER 52.3810 RIGHT 104.7619
|
||||
OPEN 2 (71.4286 100.0000) (33.3333 -33.3333)
|
||||
OPEN 17 (47.6190 66.6667) (33.3333 61.9048) (23.8095 52.3810)
|
||||
(19.0476 38.0952) (19.0476 23.8095) (23.8095 14.2857) (33.3333 4.7619)
|
||||
(47.6190 0.0000) (57.1428 0.0000) (71.4286 4.7619) (80.9524 14.2857)
|
||||
(85.7143 28.5714) (85.7143 42.8571) (80.9524 52.3810) (71.4286 61.9048)
|
||||
(57.1428 66.6667) (47.6190 66.6667)
|
473
freeglut/freeglut/genfonts/genfonts.c
Normal file
473
freeglut/freeglut/genfonts/genfonts.c
Normal file
@ -0,0 +1,473 @@
|
||||
/*
|
||||
* main.c
|
||||
*
|
||||
* A simple utility to generate the bitmap fonts to be used in freeglut.
|
||||
*
|
||||
* Copyright (c) 1999-2000 by Pawel W. Olszta
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: nie gru 26 21:52:36 CET 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software")
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Sotware.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <glib.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* Define the log domain
|
||||
*/
|
||||
#undef G_LOG_DOMAIN
|
||||
#define G_LOG_DOMAIN "genfonts"
|
||||
|
||||
/*
|
||||
* The alphabet we want to export.
|
||||
*/
|
||||
gchar* g_Alphabet = " abcdefghijklmnopqrstuwvxyzABCDEFGHIJKLMNOPQRSTUWVXYZ0123456789`~!@#$%^&*()-_=+[{}];:,.<>/?\\\"";
|
||||
gint g_AlphabetLength = 0;
|
||||
|
||||
/*
|
||||
* All undefined characters will get replaced by this one:
|
||||
*/
|
||||
gchar g_NoChar = '*';
|
||||
|
||||
/*
|
||||
* The stream we want to redirect our output to
|
||||
*/
|
||||
FILE* g_Output = NULL;
|
||||
|
||||
/*
|
||||
* The display we're getting the fonts from
|
||||
*/
|
||||
Display* g_Display;
|
||||
|
||||
/*
|
||||
* This function outputs the font file prologue
|
||||
*/
|
||||
void OutputPrologue( gchar* fileName )
|
||||
{
|
||||
/*
|
||||
* Output the copyright and permission notices:
|
||||
*/
|
||||
fprintf( g_Output, "/*\n * %s\n *\n * This file has been automatically generated by the genfonts utility.\n *\n", fileName );
|
||||
fprintf( g_Output, " * Copyright (c) 1999-2000 by Pawel W. Olszta\n * Written by Pawel W. Olszta, <olszta@sourceforge.net>\n * \n" );
|
||||
fprintf( g_Output, " * Permission is hereby granted, free of charge, to any person obtaining a\n" );
|
||||
fprintf( g_Output, " * copy of this software and associated documentation files (the \"Software\"),\n" );
|
||||
fprintf( g_Output, " * to deal in the Software without restriction, including without limitation\n" );
|
||||
fprintf( g_Output, " * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n" );
|
||||
fprintf( g_Output, " * and/or sell copies of the Software, and to permit persons to whom the\n" );
|
||||
fprintf( g_Output, " * Software is furnished to do so, subject to the following conditions:\n *\n" );
|
||||
fprintf( g_Output, " * The above copyright notice and this permission notice shall be included\n" );
|
||||
fprintf( g_Output, " * in all copies or substantial portions of the Sotware.\n *\n" );
|
||||
fprintf( g_Output, " * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n" );
|
||||
fprintf( g_Output, " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" );
|
||||
fprintf( g_Output, " * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n" );
|
||||
fprintf( g_Output, " * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n" );
|
||||
fprintf( g_Output, " * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n" );
|
||||
fprintf( g_Output, " * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n" );
|
||||
|
||||
/*
|
||||
* The obvious include headers
|
||||
*/
|
||||
fprintf( g_Output, "\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"../include/GL/freeglut.h\"\n#include \"../include/GL/freeglut_internal.h\"\n" );
|
||||
}
|
||||
|
||||
/*
|
||||
* This function outputs a font set
|
||||
*/
|
||||
void OutputFont( gchar* freeglutFontName, gchar* fontName )
|
||||
{
|
||||
gint character, lineWidth, maxWidth = 0, maxHeight = 0;
|
||||
XFontStruct* fontStruct = NULL;
|
||||
XGCValues contextValues;
|
||||
XImage* image = NULL;
|
||||
guchar* lineBuffer;
|
||||
Pixmap buffer;
|
||||
GC context;
|
||||
|
||||
/*
|
||||
* Check if there is a font that meets our requirements
|
||||
*/
|
||||
fontStruct = XLoadQueryFont( g_Display, fontName );
|
||||
|
||||
if( fontStruct == NULL )
|
||||
{
|
||||
/*
|
||||
* Whoops, the font was not found
|
||||
*/
|
||||
g_error( "couldn't get font `%s' using local display", fontName );
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the maximum size of the font characters
|
||||
*/
|
||||
maxWidth = fontStruct->max_bounds.rbearing - fontStruct->min_bounds.lbearing;
|
||||
maxHeight = fontStruct->max_bounds.ascent + fontStruct->max_bounds.descent;
|
||||
|
||||
/*
|
||||
* Allocate the line buffer for storing the font bitmap lines
|
||||
*/
|
||||
lineBuffer = g_new0( guchar, maxWidth );
|
||||
|
||||
/*
|
||||
* Create a pixmap buffer where we'll be rendering our fonts to.
|
||||
*/
|
||||
buffer = XCreatePixmap(
|
||||
g_Display,
|
||||
RootWindow( g_Display, DefaultScreen( g_Display ) ),
|
||||
maxWidth,
|
||||
maxHeight,
|
||||
1
|
||||
);
|
||||
|
||||
/*
|
||||
* We'll need a graphics context to handle the font writes and buffer clears
|
||||
*/
|
||||
context = XCreateGC(
|
||||
g_Display,
|
||||
buffer,
|
||||
0,
|
||||
&contextValues
|
||||
);
|
||||
|
||||
/*
|
||||
* Have the font assigned to the graphics context
|
||||
*/
|
||||
XSetFont( g_Display, context, fontStruct->fid );
|
||||
|
||||
/*
|
||||
* For every character we want to have outputted...
|
||||
*/
|
||||
for( character=0; character<g_AlphabetLength; character++ )
|
||||
{
|
||||
gint x, y, start_x, stop_x;
|
||||
|
||||
/*
|
||||
* Clear the context black (0 is black in our case)...
|
||||
*/
|
||||
XSetForeground( g_Display, context, 0x00 );
|
||||
XFillRectangle( g_Display, buffer, context, 0, 0, maxWidth, maxHeight );
|
||||
|
||||
/*
|
||||
* Be kind and draw the characters white (which is 1 for us)
|
||||
*/
|
||||
XSetForeground( g_Display, context, 0xff );
|
||||
|
||||
/*
|
||||
* Draw the n-th character of the alphabet
|
||||
*/
|
||||
XDrawString(
|
||||
g_Display,
|
||||
buffer,
|
||||
context,
|
||||
-fontStruct->min_bounds.lbearing,
|
||||
fontStruct->max_bounds.ascent,
|
||||
(g_Alphabet + character),
|
||||
1
|
||||
);
|
||||
|
||||
/*
|
||||
* We need some a way to access the font we've just drawn:
|
||||
*/
|
||||
image = XGetImage(
|
||||
g_Display,
|
||||
buffer,
|
||||
0, 0,
|
||||
maxWidth, maxHeight,
|
||||
1, XYPixmap
|
||||
);
|
||||
|
||||
/*
|
||||
* Find the first non-empty column:
|
||||
*/
|
||||
start_x = -1; stop_x = -1;
|
||||
|
||||
for( x=0; x<maxWidth; x++ )
|
||||
for( y=0; y<maxHeight; y++ )
|
||||
if( (XGetPixel( image, x, y ) == 1) && (start_x == -1) )
|
||||
start_x = x;
|
||||
|
||||
/*
|
||||
* Find the last empty column
|
||||
*/
|
||||
for( x=maxWidth-1; x>=0; x-- )
|
||||
for( y=0; y<maxHeight; y++ )
|
||||
if( (XGetPixel( image, x, y) == 1) && (stop_x == -1) )
|
||||
stop_x = x + 1;
|
||||
|
||||
/*
|
||||
* If the size is too little, enhance it a bit
|
||||
*/
|
||||
if( stop_x - start_x < 1 )
|
||||
{
|
||||
start_x = 0; stop_x = maxWidth - 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Output the character we have just grabbed
|
||||
*/
|
||||
fprintf( g_Output, "static const guchar %s_Character_%03i[] = {%3i",
|
||||
freeglutFontName, (gint) g_Alphabet[ character ], stop_x-start_x
|
||||
);
|
||||
|
||||
for( y=maxHeight-1; y>=0; y-- )
|
||||
{
|
||||
/*
|
||||
* Prepare the line buffer for being used again
|
||||
*/
|
||||
memset( lineBuffer, 0, maxWidth );
|
||||
|
||||
/*
|
||||
* Grab the rasterized character face into the line buffer
|
||||
*/
|
||||
for( x=start_x, lineWidth=0; x<stop_x; x++, lineWidth++ )
|
||||
if( XGetPixel( image, x, y ) )
|
||||
lineBuffer[ lineWidth / 8 ] |= 1 << (7 - (lineWidth % 8));
|
||||
|
||||
/*
|
||||
* Feel free to output the final line bitmap now
|
||||
*/
|
||||
for( x=0; x<(stop_x - start_x + 7) / 8; x++ )
|
||||
fprintf( g_Output, ",%3i", lineBuffer[ x ] );
|
||||
}
|
||||
|
||||
fprintf( g_Output, "};\n" );
|
||||
|
||||
/*
|
||||
* Free the image, and get to the next character...
|
||||
*/
|
||||
XDestroyImage( image );
|
||||
}
|
||||
|
||||
/*
|
||||
* Now we are ready to output the final data concerning the font charset
|
||||
*/
|
||||
fprintf( g_Output, "\n/* The font characters mapping: */\n" );
|
||||
fprintf( g_Output, "static const guchar* %s_Character_Map[] = {", freeglutFontName );
|
||||
|
||||
/*
|
||||
* I have decided to change the characters mapping a bit...
|
||||
*/
|
||||
for( character=1; character<256; character++ )
|
||||
{
|
||||
gchar ourCharacter[ 2 ] = { 0, 0 };
|
||||
|
||||
/*
|
||||
* Do we have the character defined or not?
|
||||
*/
|
||||
ourCharacter[ 0 ] = (gchar) character;
|
||||
|
||||
if( strstr( g_Alphabet, ourCharacter ) == NULL )
|
||||
{
|
||||
/*
|
||||
* Nope, output the g_NoChar character instead:
|
||||
*/
|
||||
fprintf( g_Output, "%s_Character_%03i,", freeglutFontName, (gint) g_NoChar );
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Otherwise we're welcome to output the character:
|
||||
*/
|
||||
fprintf( g_Output, "%s_Character_%03i,", freeglutFontName, (gint) ourCharacter[ 0 ] );
|
||||
}
|
||||
}
|
||||
|
||||
fprintf( g_Output, "NULL};\n\n" );
|
||||
|
||||
/*
|
||||
* And finally have the font structure written to the output stream
|
||||
*/
|
||||
fprintf( g_Output, "/* The font structure: */\n" );
|
||||
fprintf( g_Output, "const SFG_Font fgFont%s = { \"%s\", %i, %i, %s_Character_Map };\n\n",
|
||||
freeglutFontName, fontName, g_AlphabetLength, maxHeight, freeglutFontName
|
||||
);
|
||||
|
||||
/*
|
||||
* Done, clean up behind...
|
||||
*/
|
||||
XFreeGC( g_Display, context );
|
||||
XFreePixmap( g_Display, buffer );
|
||||
g_free( lineBuffer );
|
||||
}
|
||||
|
||||
/*
|
||||
* This function outputs the font file epilogue
|
||||
*/
|
||||
void OutputEpilogue( void )
|
||||
{
|
||||
fprintf( g_Output, "/*** END OF FILE ***/\n" );
|
||||
}
|
||||
|
||||
/*
|
||||
* The main function processes the command line arguments
|
||||
* and outputs all the fonts we need to have rasterized.
|
||||
*/
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
gchar ourCharacter[ 2 ] = { 0, 0 };
|
||||
gchar* outputFileName = NULL;
|
||||
gchar* displayName = NULL;
|
||||
gint i = 1;
|
||||
|
||||
/*
|
||||
* The fonts that are going to be rasterized and added to the output file:
|
||||
*/
|
||||
gint fontsQuantity = 7;
|
||||
gchar* fontsList[] = {
|
||||
"Fixed8x13", "-misc-fixed-medium-r-normal--13-120-75-75-C-80-iso8859-1",
|
||||
"Fixed9x15", "-misc-fixed-medium-r-normal--15-140-75-75-C-90-iso8859-1",
|
||||
"Helvetica10", "-adobe-helvetica-medium-r-normal--10-100-75-75-p-56-iso8859-1",
|
||||
"Helvetica12", "-adobe-helvetica-medium-r-normal--12-120-75-75-p-67-iso8859-1",
|
||||
"Helvetica18", "-adobe-helvetica-medium-r-normal--18-180-75-75-p-98-iso8859-1",
|
||||
"TimesRoman10", "-adobe-times-medium-r-normal--10-100-75-75-p-54-iso8859-1",
|
||||
"TimesRoman24", "-adobe-times-medium-r-normal--24-240-75-75-p-124-iso8859-1"
|
||||
};
|
||||
|
||||
/*
|
||||
* Initialize the alphabet's length
|
||||
*/
|
||||
g_AlphabetLength = strlen( g_Alphabet );
|
||||
|
||||
/*
|
||||
* Make sure that the no-character character is in the alphabet
|
||||
*/
|
||||
ourCharacter[ 0 ] = g_NoChar;
|
||||
|
||||
if( strstr( g_Alphabet, ourCharacter ) == NULL )
|
||||
g_error( "the g_NoChar `%c' character not found in the alphabet `%s'", g_NoChar, g_Alphabet );
|
||||
|
||||
/*
|
||||
* Grab the display name to be used
|
||||
*/
|
||||
displayName = g_strdup( (gchar *) g_getenv( "DISPLAY" ) );
|
||||
|
||||
/*
|
||||
* Define the default output file name
|
||||
*/
|
||||
outputFileName = g_strdup( "freeglut_font_data.c" );
|
||||
|
||||
/*
|
||||
* Process the command line arguments now. Command line arguments expected:
|
||||
*
|
||||
* -display <DISPLAYNAME> -- the display to connect to
|
||||
* -file <FILENAME> -- the destination file name
|
||||
*/
|
||||
while( i < argc )
|
||||
{
|
||||
/*
|
||||
* See what the current token is
|
||||
*/
|
||||
if( g_strcasecmp( argv[ i ], "-display" ) == 0 )
|
||||
{
|
||||
g_assert( (i + 1) < argc );
|
||||
g_free( displayName );
|
||||
|
||||
/*
|
||||
* The next token is expected to contain the X display name to use
|
||||
*/
|
||||
displayName = g_strdup( (gchar *) argv[ ++i ] );
|
||||
}
|
||||
else if( g_strcasecmp( argv[ i ], "-file" ) == 0 )
|
||||
{
|
||||
g_assert( (i + 1) < argc );
|
||||
g_free( outputFileName );
|
||||
|
||||
/*
|
||||
* The next token is expected to contain the destination file name
|
||||
*/
|
||||
outputFileName = g_strdup( (gchar *) argv[ ++i ] );
|
||||
}
|
||||
|
||||
/*
|
||||
* Get to the next argument
|
||||
*/
|
||||
i++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Connect to the X display
|
||||
*/
|
||||
g_Display = XOpenDisplay( displayName );
|
||||
g_assert( g_Display != NULL );
|
||||
|
||||
/*
|
||||
* Have the destination file opened
|
||||
*/
|
||||
g_Output = fopen( outputFileName, "wt" );
|
||||
g_assert( g_Output != NULL );
|
||||
|
||||
/*
|
||||
* Output the file header first
|
||||
*/
|
||||
OutputPrologue( outputFileName );
|
||||
|
||||
/*
|
||||
* In the file header, have the list of the fonts written:
|
||||
*/
|
||||
fprintf( g_Output, "\n/*\n * Following fonts are defined in this file:\n * \n" );
|
||||
|
||||
for( i=0; i<fontsQuantity; i++ )
|
||||
fprintf( g_Output, " * %i. fgFont%s <%s>\n",
|
||||
i + 1, fontsList[ i*2 + 0 ], fontsList[ i*2 + 1 ]
|
||||
);
|
||||
|
||||
fprintf( g_Output, " */\n\n" );
|
||||
|
||||
/*
|
||||
* Output all of the fonts we want to output
|
||||
*/
|
||||
for( i=0; i<fontsQuantity; i++ )
|
||||
OutputFont( fontsList[ i*2 + 0 ], fontsList[ i*2 + 1 ] );
|
||||
|
||||
/*
|
||||
* Finally, have the file epilogue outputted
|
||||
*/
|
||||
OutputEpilogue();
|
||||
|
||||
/*
|
||||
* Close the output stream
|
||||
*/
|
||||
fclose( g_Output );
|
||||
|
||||
/*
|
||||
* Close the X display
|
||||
*/
|
||||
XCloseDisplay( g_Display );
|
||||
|
||||
/*
|
||||
* Clean up all the rest of the mess
|
||||
*/
|
||||
g_free( outputFileName );
|
||||
g_free( displayName );
|
||||
|
||||
/*
|
||||
* Return successful!
|
||||
*/
|
||||
return( EXIT_SUCCESS );
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
206
freeglut/freeglut/genfonts/genstroke.c
Normal file
206
freeglut/freeglut/genfonts/genstroke.c
Normal file
@ -0,0 +1,206 @@
|
||||
/*
|
||||
* main.c
|
||||
*
|
||||
* A simple utility to generate the stroke fonts to be used in freeglut.
|
||||
*
|
||||
* Copyright (c) 1999-2000 by Pawel W. Olszta
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: czw sty 06 19:42:30 CET 2000
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software")
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Sotware.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* Define the log domain
|
||||
*/
|
||||
#undef G_LOG_DOMAIN
|
||||
#define G_LOG_DOMAIN "genstroke"
|
||||
|
||||
/*
|
||||
* The alphabet we want to export.
|
||||
*/
|
||||
gchar* g_Alphabet = " abcdefghijklmnopqrstuwvxyzABCDEFGHIJKLMNOPQRSTUWVXYZ0123456789`~!@#$%^&*()-_=+[{}];:,.<>/?\\\"";
|
||||
gint g_AlphabetLength = 0;
|
||||
|
||||
/*
|
||||
* All undefined characters will get replaced by this one:
|
||||
*/
|
||||
gchar g_NoChar = '*';
|
||||
|
||||
/*
|
||||
* The stream we want to redirect our output to
|
||||
*/
|
||||
FILE* g_Output = NULL;
|
||||
|
||||
/*
|
||||
* This function outputs the font file prologue
|
||||
*/
|
||||
void OutputPrologue( gchar* fileName )
|
||||
{
|
||||
/*
|
||||
* Output the copyright and permission notices:
|
||||
*/
|
||||
fprintf( g_Output, "/*\n * %s\n *\n * This file has been automatically generated by the genfonts utility.\n *\n", fileName );
|
||||
fprintf( g_Output, " * Copyright (c) 1999-2000 by Pawel W. Olszta\n * Written by Pawel W. Olszta, <olszta@sourceforge.net>\n * \n" );
|
||||
fprintf( g_Output, " * Permission is hereby granted, free of charge, to any person obtaining a\n" );
|
||||
fprintf( g_Output, " * copy of this software and associated documentation files (the \"Software\"),\n" );
|
||||
fprintf( g_Output, " * to deal in the Software without restriction, including without limitation\n" );
|
||||
fprintf( g_Output, " * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n" );
|
||||
fprintf( g_Output, " * and/or sell copies of the Software, and to permit persons to whom the\n" );
|
||||
fprintf( g_Output, " * Software is furnished to do so, subject to the following conditions:\n *\n" );
|
||||
fprintf( g_Output, " * The above copyright notice and this permission notice shall be included\n" );
|
||||
fprintf( g_Output, " * in all copies or substantial portions of the Sotware.\n *\n" );
|
||||
fprintf( g_Output, " * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n" );
|
||||
fprintf( g_Output, " * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n" );
|
||||
fprintf( g_Output, " * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n" );
|
||||
fprintf( g_Output, " * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n" );
|
||||
fprintf( g_Output, " * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n" );
|
||||
fprintf( g_Output, " * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n" );
|
||||
|
||||
/*
|
||||
* The obvious include headers
|
||||
*/
|
||||
fprintf( g_Output, "\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \"../include/GL/freeglut.h\"\n#include \"../include/GL/freeglut_internal.h\"\n" );
|
||||
}
|
||||
|
||||
/*
|
||||
* This function outputs a font set
|
||||
*/
|
||||
void OutputFont( gchar* freeglutFontName, gchar* fontName )
|
||||
{
|
||||
/*
|
||||
* This is an easy one. I just have to write a parser for the SRC files
|
||||
* and dump their contents to the output file. Expect this to be done
|
||||
* this weekend. The output data should be organized just like the bitmap
|
||||
* fonts data, as it shown to be good.
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
* This function outputs the font file epilogue
|
||||
*/
|
||||
void OutputEpilogue( void )
|
||||
{
|
||||
fprintf( g_Output, "/*** END OF FILE ***/\n" );
|
||||
}
|
||||
|
||||
/*
|
||||
* The main function processes the command line arguments
|
||||
* and outputs all the fonts we need to have rasterized.
|
||||
*/
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
gchar ourCharacter[ 2 ] = { 0, 0 };
|
||||
gchar* outputFileName = NULL;
|
||||
gint i = 1;
|
||||
|
||||
/*
|
||||
* Initialize the alphabet's length
|
||||
*/
|
||||
g_AlphabetLength = strlen( g_Alphabet );
|
||||
|
||||
/*
|
||||
* Make sure that the no-character character is in the alphabet
|
||||
*/
|
||||
ourCharacter[ 0 ] = g_NoChar;
|
||||
|
||||
if( strstr( g_Alphabet, ourCharacter ) == NULL )
|
||||
g_error( "the g_NoChar `%c' character not found in the alphabet `%s'", g_NoChar, g_Alphabet );
|
||||
|
||||
/*
|
||||
* Define the default output file name
|
||||
*/
|
||||
outputFileName = g_strdup( "freeglut_font_stroke.c" );
|
||||
|
||||
/*
|
||||
* Process the command line arguments now. Command line arguments expected:
|
||||
*
|
||||
* -file <FILENAME> -- the destination file name
|
||||
*/
|
||||
while( i < argc )
|
||||
{
|
||||
/*
|
||||
* See what the current token is
|
||||
*/
|
||||
if( g_strcasecmp( argv[ i ], "-file" ) == 0 )
|
||||
{
|
||||
g_assert( (i + 1) < argc );
|
||||
g_free( outputFileName );
|
||||
|
||||
/*
|
||||
* The next token is expected to contain the destination file name
|
||||
*/
|
||||
outputFileName = g_strdup( (gchar *) argv[ ++i ] );
|
||||
}
|
||||
|
||||
/*
|
||||
* Get to the next argument
|
||||
*/
|
||||
i++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Have the destination file opened
|
||||
*/
|
||||
g_Output = fopen( outputFileName, "wt" );
|
||||
g_assert( g_Output != NULL );
|
||||
|
||||
/*
|
||||
* Output the file header first
|
||||
*/
|
||||
OutputPrologue( outputFileName );
|
||||
|
||||
/*
|
||||
* Output all of the fonts we want to output
|
||||
*/
|
||||
OutputFont( "Roman", "Roman.src" );
|
||||
OutputFont( "RomanMono", "Roman_M.src" );
|
||||
|
||||
/*
|
||||
* Finally, have the file epilogue outputted
|
||||
*/
|
||||
OutputEpilogue();
|
||||
|
||||
/*
|
||||
* Close the output stream
|
||||
*/
|
||||
fclose( g_Output );
|
||||
|
||||
/*
|
||||
* Clean up all the rest of the mess
|
||||
*/
|
||||
g_free( outputFileName );
|
||||
|
||||
/*
|
||||
* Return successful!
|
||||
*/
|
||||
return( EXIT_SUCCESS );
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
233
freeglut/freeglut/include/GL/Makefile
Normal file
233
freeglut/freeglut/include/GL/Makefile
Normal file
@ -0,0 +1,233 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ../..
|
||||
prefix = /usr/local
|
||||
exec_prefix = ${prefix}
|
||||
|
||||
bindir = ${exec_prefix}/bin
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
datadir = ${prefix}/share
|
||||
sysconfdir = ${prefix}/etc
|
||||
sharedstatedir = ${prefix}/com
|
||||
localstatedir = ${prefix}/var
|
||||
libdir = ${exec_prefix}/lib
|
||||
infodir = ${prefix}/info
|
||||
mandir = ${prefix}/man
|
||||
includedir = ${prefix}/include
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/freeglut
|
||||
pkglibdir = $(libdir)/freeglut
|
||||
pkgincludedir = $(includedir)/freeglut
|
||||
|
||||
top_builddir = ../..
|
||||
|
||||
ACLOCAL = aclocal
|
||||
AUTOCONF = autoconf
|
||||
AUTOMAKE = automake
|
||||
AUTOHEADER = autoheader
|
||||
|
||||
INSTALL = /usr/bin/ginstall -c
|
||||
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
||||
transform = s,x,x,
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = i686-suse-linux
|
||||
host_triplet = i686-suse-linux-gnu
|
||||
AS = @AS@
|
||||
CC = gcc
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT =
|
||||
LIBM = -lm
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LIBTOOL_DEPS = ./ltconfig ./ltmain.sh
|
||||
LN_S = ln -s
|
||||
MAKEINFO = makeinfo
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = freeglut
|
||||
RANLIB = ranlib
|
||||
VERSION = 0.1
|
||||
|
||||
GLincludedir = $(includedir)/GL
|
||||
|
||||
EXTRA_DIST = freeglut.h freeglut_internal.h
|
||||
GLinclude_HEADERS = freeglut.h
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
HEADERS = $(GLinclude_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu include/GL/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
install-GLincludeHEADERS: $(GLinclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(GLincludedir)
|
||||
@list='$(GLinclude_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
|
||||
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(GLincludedir)/$$p"; \
|
||||
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(GLincludedir)/$$p; \
|
||||
done
|
||||
|
||||
uninstall-GLincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(GLinclude_HEADERS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(GLincludedir)/$$p; \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = include/GL
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu include/GL/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-GLincludeHEADERS
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-GLincludeHEADERS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(GLincludedir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-tags clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-tags distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: uninstall-GLincludeHEADERS install-GLincludeHEADERS tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir info-am info dvi-am dvi check check-am installcheck-am \
|
||||
installcheck install-exec-am install-exec install-data-am install-data \
|
||||
install-am install uninstall-am uninstall all-redirect all-am all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
7
freeglut/freeglut/include/GL/Makefile.am
Normal file
7
freeglut/freeglut/include/GL/Makefile.am
Normal file
@ -0,0 +1,7 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
GLincludedir = $(includedir)/GL
|
||||
|
||||
EXTRA_DIST = freeglut.h freeglut_internal.h
|
||||
GLinclude_HEADERS = freeglut.h
|
||||
|
233
freeglut/freeglut/include/GL/Makefile.in
Normal file
233
freeglut/freeglut/include/GL/Makefile.in
Normal file
@ -0,0 +1,233 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ../..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT = @EXEEXT@
|
||||
LIBM = @LIBM@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
|
||||
GLincludedir = $(includedir)/GL
|
||||
|
||||
EXTRA_DIST = freeglut.h freeglut_internal.h
|
||||
GLinclude_HEADERS = freeglut.h
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
HEADERS = $(GLinclude_HEADERS)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu include/GL/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
install-GLincludeHEADERS: $(GLinclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(GLincludedir)
|
||||
@list='$(GLinclude_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
|
||||
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(GLincludedir)/$$p"; \
|
||||
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(GLincludedir)/$$p; \
|
||||
done
|
||||
|
||||
uninstall-GLincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(GLinclude_HEADERS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(GLincludedir)/$$p; \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = include/GL
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu include/GL/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am: install-GLincludeHEADERS
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-GLincludeHEADERS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(GLincludedir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-tags clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-tags distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: uninstall-GLincludeHEADERS install-GLincludeHEADERS tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir info-am info dvi-am dvi check check-am installcheck-am \
|
||||
installcheck install-exec-am install-exec install-data-am install-data \
|
||||
install-am install uninstall-am uninstall all-redirect all-am all \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
526
freeglut/freeglut/include/GL/freeglut.h
Normal file
526
freeglut/freeglut/include/GL/freeglut.h
Normal file
@ -0,0 +1,526 @@
|
||||
/*
|
||||
* freeglut.h
|
||||
*
|
||||
* The freeglut library include file
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 2 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef FREEGLUT_H
|
||||
#define FREEGLUT_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Under windows, we've got some issues to solve
|
||||
*/
|
||||
#if defined(WIN32)
|
||||
# if defined(FREEGLUT_LIBRARY_BUILD)
|
||||
# define FGAPI __declspec(dllexport)
|
||||
# else
|
||||
# define FGAPI __declspec(dllimport)
|
||||
# endif
|
||||
# define FGAPIENTRY __stdcall
|
||||
#else
|
||||
# define FGAPI
|
||||
# define FGAPIENTRY
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The freeglut and GLUT API versions
|
||||
*/
|
||||
#define FREEGLUT 1
|
||||
#define GLUT_API_VERSION 4
|
||||
|
||||
/*
|
||||
* Always include OpenGL and GLU headers
|
||||
*/
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- the special key codes:
|
||||
*/
|
||||
#define GLUT_KEY_F1 0x0001
|
||||
#define GLUT_KEY_F2 0x0002
|
||||
#define GLUT_KEY_F3 0x0003
|
||||
#define GLUT_KEY_F4 0x0004
|
||||
#define GLUT_KEY_F5 0x0005
|
||||
#define GLUT_KEY_F6 0x0006
|
||||
#define GLUT_KEY_F7 0x0007
|
||||
#define GLUT_KEY_F8 0x0008
|
||||
#define GLUT_KEY_F9 0x0009
|
||||
#define GLUT_KEY_F10 0x000A
|
||||
#define GLUT_KEY_F11 0x000B
|
||||
#define GLUT_KEY_F12 0x000C
|
||||
#define GLUT_KEY_LEFT 0x0064
|
||||
#define GLUT_KEY_UP 0x0065
|
||||
#define GLUT_KEY_RIGHT 0x0066
|
||||
#define GLUT_KEY_DOWN 0x0067
|
||||
#define GLUT_KEY_PAGE_UP 0x0068
|
||||
#define GLUT_KEY_PAGE_DOWN 0x0069
|
||||
#define GLUT_KEY_HOME 0x006A
|
||||
#define GLUT_KEY_END 0x006B
|
||||
#define GLUT_KEY_INSERT 0x006C
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- mouse state definitions
|
||||
*/
|
||||
#define GLUT_LEFT_BUTTON 0x0000
|
||||
#define GLUT_MIDDLE_BUTTON 0x0001
|
||||
#define GLUT_RIGHT_BUTTON 0x0002
|
||||
#define GLUT_DOWN 0x0000
|
||||
#define GLUT_UP 0x0001
|
||||
#define GLUT_LEFT 0x0000
|
||||
#define GLUT_ENTERED 0x0001
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- the display mode definitions
|
||||
*/
|
||||
#define GLUT_RGB 0x0000
|
||||
#define GLUT_RGBA 0x0000
|
||||
#define GLUT_INDEX 0x0001
|
||||
#define GLUT_SINGLE 0x0000
|
||||
#define GLUT_DOUBLE 0x0002
|
||||
#define GLUT_ACCUM 0x0004
|
||||
#define GLUT_ALPHA 0x0008
|
||||
#define GLUT_DEPTH 0x0010
|
||||
#define GLUT_STENCIL 0x0020
|
||||
#define GLUT_MULTISAMPLE 0x0080
|
||||
#define GLUT_STEREO 0x0100
|
||||
#define GLUT_LUMINANCE 0x0200
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- windows and menu related definitions
|
||||
*/
|
||||
#define GLUT_MENU_NOT_IN_USE 0x0000
|
||||
#define GLUT_MENU_IN_USE 0x0001
|
||||
#define GLUT_NOT_VISIBLE 0x0000
|
||||
#define GLUT_VISIBLE 0x0001
|
||||
#define GLUT_HIDDEN 0x0000
|
||||
#define GLUT_FULLY_RETAINED 0x0001
|
||||
#define GLUT_PARTIALLY_RETAINED 0x0002
|
||||
#define GLUT_FULLY_COVERED 0x0003
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- fonts definitions
|
||||
*
|
||||
* Steve Baker suggested to make it binary compatible with GLUT:
|
||||
*/
|
||||
#if defined(WIN32)
|
||||
# define GLUT_STROKE_ROMAN ((void *)0x0000)
|
||||
# define GLUT_STROKE_MONO_ROMAN ((void *)0x0001)
|
||||
# define GLUT_BITMAP_9_BY_15 ((void *)0x0002)
|
||||
# define GLUT_BITMAP_8_BY_13 ((void *)0x0003)
|
||||
# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *)0x0004)
|
||||
# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *)0x0005)
|
||||
# define GLUT_BITMAP_HELVETICA_10 ((void *)0x0006)
|
||||
# define GLUT_BITMAP_HELVETICA_12 ((void *)0x0007)
|
||||
# define GLUT_BITMAP_HELVETICA_18 ((void *)0x0008)
|
||||
#else
|
||||
/*
|
||||
* I don't really know if it's a good idea... But here it goes:
|
||||
*/
|
||||
extern void* glutStrokeRoman;
|
||||
extern void* glutStrokeMonoRoman;
|
||||
extern void* glutBitmap9By15;
|
||||
extern void* glutBitmap8By13;
|
||||
extern void* glutBitmapTimesRoman10;
|
||||
extern void* glutBitmapTimesRoman24;
|
||||
extern void* glutBitmapHelvetica10;
|
||||
extern void* glutBitmapHelvetica12;
|
||||
extern void* glutBitmapHelvetica18;
|
||||
|
||||
/*
|
||||
* Those pointers will be used by following definitions:
|
||||
*/
|
||||
# define GLUT_STROKE_ROMAN ((void *) &glutStrokeRoman)
|
||||
# define GLUT_STROKE_MONO_ROMAN ((void *) &glutStrokeMonoRoman)
|
||||
# define GLUT_BITMAP_9_BY_15 ((void *) &glutBitmap9By15)
|
||||
# define GLUT_BITMAP_8_BY_13 ((void *) &glutBitmap8By13)
|
||||
# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *) &glutBitmapTimesRoman10)
|
||||
# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *) &glutBitmapTimesRoman24)
|
||||
# define GLUT_BITMAP_HELVETICA_10 ((void *) &glutBitmapHelvetica10)
|
||||
# define GLUT_BITMAP_HELVETICA_12 ((void *) &glutBitmapHelvetica12)
|
||||
# define GLUT_BITMAP_HELVETICA_18 ((void *) &glutBitmapHelvetica18)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- the glutGet parameters
|
||||
*/
|
||||
#define GLUT_WINDOW_X 0x0064
|
||||
#define GLUT_WINDOW_Y 0x0065
|
||||
#define GLUT_WINDOW_WIDTH 0x0066
|
||||
#define GLUT_WINDOW_HEIGHT 0x0067
|
||||
#define GLUT_WINDOW_BUFFER_SIZE 0x0068
|
||||
#define GLUT_WINDOW_STENCIL_SIZE 0x0069
|
||||
#define GLUT_WINDOW_DEPTH_SIZE 0x006A
|
||||
#define GLUT_WINDOW_RED_SIZE 0x006B
|
||||
#define GLUT_WINDOW_GREEN_SIZE 0x006C
|
||||
#define GLUT_WINDOW_BLUE_SIZE 0x006D
|
||||
#define GLUT_WINDOW_ALPHA_SIZE 0x006E
|
||||
#define GLUT_WINDOW_ACCUM_RED_SIZE 0x006F
|
||||
#define GLUT_WINDOW_ACCUM_GREEN_SIZE 0x0070
|
||||
#define GLUT_WINDOW_ACCUM_BLUE_SIZE 0x0071
|
||||
#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 0x0072
|
||||
#define GLUT_WINDOW_DOUBLEBUFFER 0x0073
|
||||
#define GLUT_WINDOW_RGBA 0x0074
|
||||
#define GLUT_WINDOW_PARENT 0x0075
|
||||
#define GLUT_WINDOW_NUM_CHILDREN 0x0076
|
||||
#define GLUT_WINDOW_COLORMAP_SIZE 0x0077
|
||||
#define GLUT_WINDOW_NUM_SAMPLES 0x0078
|
||||
#define GLUT_WINDOW_STEREO 0x0079
|
||||
#define GLUT_WINDOW_CURSOR 0x007A
|
||||
|
||||
#define GLUT_SCREEN_WIDTH 0x00C8
|
||||
#define GLUT_SCREEN_HEIGHT 0x00C9
|
||||
#define GLUT_SCREEN_WIDTH_MM 0x00CA
|
||||
#define GLUT_SCREEN_HEIGHT_MM 0x00CB
|
||||
#define GLUT_MENU_NUM_ITEMS 0x012C
|
||||
#define GLUT_DISPLAY_MODE_POSSIBLE 0x0190
|
||||
#define GLUT_INIT_WINDOW_X 0x01F4
|
||||
#define GLUT_INIT_WINDOW_Y 0x01F5
|
||||
#define GLUT_INIT_WINDOW_WIDTH 0x01F6
|
||||
#define GLUT_INIT_WINDOW_HEIGHT 0x01F7
|
||||
#define GLUT_INIT_DISPLAY_MODE 0x01F8
|
||||
#define GLUT_ELAPSED_TIME 0x02BC
|
||||
#define GLUT_WINDOW_FORMAT_ID 0x007B
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- the glutDeviceGet parameters
|
||||
*/
|
||||
#define GLUT_HAS_KEYBOARD 0x0258
|
||||
#define GLUT_HAS_MOUSE 0x0259
|
||||
#define GLUT_HAS_SPACEBALL 0x025A
|
||||
#define GLUT_HAS_DIAL_AND_BUTTON_BOX 0x025B
|
||||
#define GLUT_HAS_TABLET 0x025C
|
||||
#define GLUT_NUM_MOUSE_BUTTONS 0x025D
|
||||
#define GLUT_NUM_SPACEBALL_BUTTONS 0x025E
|
||||
#define GLUT_NUM_BUTTON_BOX_BUTTONS 0x025F
|
||||
#define GLUT_NUM_DIALS 0x0260
|
||||
#define GLUT_NUM_TABLET_BUTTONS 0x0261
|
||||
#define GLUT_DEVICE_IGNORE_KEY_REPEAT 0x0262
|
||||
#define GLUT_DEVICE_KEY_REPEAT 0x0263
|
||||
#define GLUT_HAS_JOYSTICK 0x0264
|
||||
#define GLUT_OWNS_JOYSTICK 0x0265
|
||||
#define GLUT_JOYSTICK_BUTTONS 0x0266
|
||||
#define GLUT_JOYSTICK_AXES 0x0267
|
||||
#define GLUT_JOYSTICK_POLL_RATE 0x0268
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- the glutLayerGet parameters
|
||||
*/
|
||||
#define GLUT_OVERLAY_POSSIBLE 0x0320
|
||||
#define GLUT_LAYER_IN_USE 0x0321
|
||||
#define GLUT_HAS_OVERLAY 0x0322
|
||||
#define GLUT_TRANSPARENT_INDEX 0x0323
|
||||
#define GLUT_NORMAL_DAMAGED 0x0324
|
||||
#define GLUT_OVERLAY_DAMAGED 0x0325
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- the glutVideoResizeGet parameters
|
||||
*/
|
||||
#define GLUT_VIDEO_RESIZE_POSSIBLE 0x0384
|
||||
#define GLUT_VIDEO_RESIZE_IN_USE 0x0385
|
||||
#define GLUT_VIDEO_RESIZE_X_DELTA 0x0386
|
||||
#define GLUT_VIDEO_RESIZE_Y_DELTA 0x0387
|
||||
#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 0x0388
|
||||
#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 0x0389
|
||||
#define GLUT_VIDEO_RESIZE_X 0x038A
|
||||
#define GLUT_VIDEO_RESIZE_Y 0x038B
|
||||
#define GLUT_VIDEO_RESIZE_WIDTH 0x038C
|
||||
#define GLUT_VIDEO_RESIZE_HEIGHT 0x038D
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- the glutUseLayer parameters
|
||||
*/
|
||||
#define GLUT_NORMAL 0x0000
|
||||
#define GLUT_OVERLAY 0x0001
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- the glutGetModifiers parameters
|
||||
*/
|
||||
#define GLUT_ACTIVE_SHIFT 0x0001
|
||||
#define GLUT_ACTIVE_CTRL 0x0004
|
||||
#define GLUT_ACTIVE_ALT 0x0008
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- the glutSetCursor parameters
|
||||
*/
|
||||
#define GLUT_CURSOR_RIGHT_ARROW 0x0000
|
||||
#define GLUT_CURSOR_LEFT_ARROW 0x0001
|
||||
#define GLUT_CURSOR_INFO 0x0002
|
||||
#define GLUT_CURSOR_DESTROY 0x0003
|
||||
#define GLUT_CURSOR_HELP 0x0004
|
||||
#define GLUT_CURSOR_CYCLE 0x0005
|
||||
#define GLUT_CURSOR_SPRAY 0x0006
|
||||
#define GLUT_CURSOR_WAIT 0x0007
|
||||
#define GLUT_CURSOR_TEXT 0x0008
|
||||
#define GLUT_CURSOR_CROSSHAIR 0x0009
|
||||
#define GLUT_CURSOR_UP_DOWN 0x000A
|
||||
#define GLUT_CURSOR_LEFT_RIGHT 0x000B
|
||||
#define GLUT_CURSOR_TOP_SIDE 0x000C
|
||||
#define GLUT_CURSOR_BOTTOM_SIDE 0x000D
|
||||
#define GLUT_CURSOR_LEFT_SIDE 0x000E
|
||||
#define GLUT_CURSOR_RIGHT_SIDE 0x000F
|
||||
#define GLUT_CURSOR_TOP_LEFT_CORNER 0x0010
|
||||
#define GLUT_CURSOR_TOP_RIGHT_CORNER 0x0011
|
||||
#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 0x0012
|
||||
#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 0x0013
|
||||
#define GLUT_CURSOR_INHERIT 0x0064
|
||||
#define GLUT_CURSOR_NONE 0x0065
|
||||
#define GLUT_CURSOR_FULL_CROSSHAIR 0x0066
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- RGB color component specification definitions
|
||||
*/
|
||||
#define GLUT_RED 0x0000
|
||||
#define GLUT_GREEN 0x0001
|
||||
#define GLUT_BLUE 0x0002
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- additional keyboard and joystick definitions
|
||||
*/
|
||||
#define GLUT_KEY_REPEAT_OFF 0x0000
|
||||
#define GLUT_KEY_REPEAT_ON 0x0001
|
||||
#define GLUT_KEY_REPEAT_DEFAULT 0x0002
|
||||
|
||||
#define GLUT_JOYSTICK_BUTTON_A 0x0001
|
||||
#define GLUT_JOYSTICK_BUTTON_B 0x0002
|
||||
#define GLUT_JOYSTICK_BUTTON_C 0x0004
|
||||
#define GLUT_JOYSTICK_BUTTON_D 0x0008
|
||||
|
||||
/*
|
||||
* GLUT API macro definitions -- game mode definitions
|
||||
*/
|
||||
#define GLUT_GAME_MODE_ACTIVE 0x0000
|
||||
#define GLUT_GAME_MODE_POSSIBLE 0x0001
|
||||
#define GLUT_GAME_MODE_WIDTH 0x0002
|
||||
#define GLUT_GAME_MODE_HEIGHT 0x0003
|
||||
#define GLUT_GAME_MODE_PIXEL_DEPTH 0x0004
|
||||
#define GLUT_GAME_MODE_REFRESH_RATE 0x0005
|
||||
#define GLUT_GAME_MODE_DISPLAY_CHANGED 0x0006
|
||||
|
||||
/*
|
||||
* Initialization functions, see fglut_init.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutInit( int* pargc, char** argv );
|
||||
FGAPI void FGAPIENTRY glutInitWindowPosition( int x, int y );
|
||||
FGAPI void FGAPIENTRY glutInitWindowSize( int width, int height );
|
||||
FGAPI void FGAPIENTRY glutInitDisplayMode( int displayMode );
|
||||
FGAPI void FGAPIENTRY glutInitDisplayString( char* displayMode );
|
||||
|
||||
/*
|
||||
* Process loop function, see freeglut_main.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutMainLoop( void );
|
||||
|
||||
/*
|
||||
* Window management functions, see freeglut_window.c
|
||||
*/
|
||||
FGAPI int FGAPIENTRY glutCreateWindow( const char* title );
|
||||
FGAPI int FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height );
|
||||
FGAPI void FGAPIENTRY glutDestroyWindow( int window );
|
||||
FGAPI void FGAPIENTRY glutSetWindow( int window );
|
||||
FGAPI int FGAPIENTRY glutGetWindow( void );
|
||||
FGAPI void FGAPIENTRY glutSetWindowTitle( char* title );
|
||||
FGAPI void FGAPIENTRY glutSetIconTitle( char* title );
|
||||
FGAPI void FGAPIENTRY glutReshapeWindow( int width, int height );
|
||||
FGAPI void FGAPIENTRY glutPositionWindow( int x, int y );
|
||||
FGAPI void FGAPIENTRY glutShowWindow( void );
|
||||
FGAPI void FGAPIENTRY glutHideWindow( void );
|
||||
FGAPI void FGAPIENTRY glutIconifyWindow( void );
|
||||
FGAPI void FGAPIENTRY glutPushWindow( void );
|
||||
FGAPI void FGAPIENTRY glutPopWindow( void );
|
||||
FGAPI void FGAPIENTRY glutFullScreen( void );
|
||||
|
||||
/*
|
||||
* Display-connected functions, see freeglut_display.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutPostWindowRedisplay( int window );
|
||||
FGAPI void FGAPIENTRY glutPostRedisplay( void );
|
||||
FGAPI void FGAPIENTRY glutSwapBuffers( void );
|
||||
|
||||
/*
|
||||
* Mouse cursor functions, see freeglut_cursor.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutWarpPointer( int x, int y );
|
||||
FGAPI void FGAPIENTRY glutSetCursor( int cursor );
|
||||
|
||||
/*
|
||||
* Overlay stuff, see freeglut_overlay.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutEstablishOverlay( void );
|
||||
FGAPI void FGAPIENTRY glutRemoveOverlay( void );
|
||||
FGAPI void FGAPIENTRY glutUseLayer( GLenum layer );
|
||||
FGAPI void FGAPIENTRY glutPostOverlayRedisplay( void );
|
||||
FGAPI void FGAPIENTRY glutPostWindowOverlayRedisplay( int window );
|
||||
FGAPI void FGAPIENTRY glutShowOverlay( void );
|
||||
FGAPI void FGAPIENTRY glutHideOverlay( void );
|
||||
|
||||
/*
|
||||
* Menu stuff, see freeglut_menu.c
|
||||
*/
|
||||
FGAPI int FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) );
|
||||
FGAPI void FGAPIENTRY glutDestroyMenu( int menu );
|
||||
FGAPI int FGAPIENTRY glutGetMenu( void );
|
||||
FGAPI void FGAPIENTRY glutSetMenu( int menu );
|
||||
FGAPI void FGAPIENTRY glutAddMenuEntry( const char* label, int value );
|
||||
FGAPI void FGAPIENTRY glutAddSubMenu( const char* label, int subMenu );
|
||||
FGAPI void FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value );
|
||||
FGAPI void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int value );
|
||||
FGAPI void FGAPIENTRY glutRemoveMenuItem( int item );
|
||||
FGAPI void FGAPIENTRY glutAttachMenu( int button );
|
||||
FGAPI void FGAPIENTRY glutDetachMenu( int button );
|
||||
|
||||
/*
|
||||
* Global callback functions, see freeglut_callbacks.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value );
|
||||
FGAPI void FGAPIENTRY glutIdleFunc( void (* callback)( void ) );
|
||||
|
||||
/*
|
||||
* Window-specific callback functions, see freeglut_callbacks.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) );
|
||||
FGAPI void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) );
|
||||
FGAPI void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) );
|
||||
FGAPI void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) );
|
||||
FGAPI void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) );
|
||||
FGAPI void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) );
|
||||
FGAPI void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) );
|
||||
FGAPI void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) );
|
||||
FGAPI void FGAPIENTRY glutEntryFunc( void (* callback)( int ) );
|
||||
|
||||
FGAPI void FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) );
|
||||
FGAPI void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) );
|
||||
FGAPI void FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval );
|
||||
FGAPI void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) );
|
||||
FGAPI void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) );
|
||||
FGAPI void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) );
|
||||
FGAPI void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) );
|
||||
|
||||
FGAPI void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) );
|
||||
FGAPI void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) );
|
||||
FGAPI void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) );
|
||||
FGAPI void FGAPIENTRY glutBottonBoxFunc( void (* callback)( int, int ) );
|
||||
FGAPI void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) );
|
||||
FGAPI void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) );
|
||||
FGAPI void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) );
|
||||
|
||||
/*
|
||||
* State retrieval functions, see freeglut_state.c
|
||||
*/
|
||||
FGAPI int FGAPIENTRY glutGet( GLenum query );
|
||||
FGAPI int FGAPIENTRY glutDeviceGet( GLenum query );
|
||||
FGAPI int FGAPIENTRY glutGetModifiers( void );
|
||||
FGAPI int FGAPIENTRY glutLayerGet( GLenum query );
|
||||
|
||||
/*
|
||||
* Font stuff, see freeglut_font.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutBitmapCharacter( void* font, int character );
|
||||
FGAPI int FGAPIENTRY glutBitmapWidth( void* font, int character );
|
||||
FGAPI void FGAPIENTRY glutStrokeCharacter( void* font, int character );
|
||||
FGAPI int FGAPIENTRY glutStrokeWidth( void* font, int character );
|
||||
FGAPI int FGAPIENTRY glutBitmapLength( void* font, const char* string );
|
||||
FGAPI int FGAPIENTRY glutStrokeLength( void* font, const char* string );
|
||||
FGAPI int FGAPIENTRY glutBitmapHeight( void* font );
|
||||
FGAPI int FGAPIENTRY glutStrokeHeight( void* font );
|
||||
|
||||
/*
|
||||
* Geometry functions, see freeglut_geometry.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutWireCube( GLdouble size );
|
||||
FGAPI void FGAPIENTRY glutSolidCube( GLdouble size );
|
||||
FGAPI void FGAPIENTRY glutWireSphere( GLdouble radius, GLint slices, GLint stacks );
|
||||
FGAPI void FGAPIENTRY glutSolidSphere( GLdouble radius, GLint slices, GLint stacks );
|
||||
FGAPI void FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );
|
||||
FGAPI void FGAPIENTRY glutSolidCone( GLdouble base, GLdouble height, GLint slices, GLint stacks );
|
||||
|
||||
FGAPI void FGAPIENTRY glutWireTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );
|
||||
FGAPI void FGAPIENTRY glutSolidTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings );
|
||||
FGAPI void FGAPIENTRY glutWireDodecahedron( void );
|
||||
FGAPI void FGAPIENTRY glutSolidDodecahedron( void );
|
||||
FGAPI void FGAPIENTRY glutWireOctahedron( void );
|
||||
FGAPI void FGAPIENTRY glutSolidOctahedron( void );
|
||||
FGAPI void FGAPIENTRY glutWireTetrahedron( void );
|
||||
FGAPI void FGAPIENTRY glutSolidTetrahedron( void );
|
||||
FGAPI void FGAPIENTRY glutWireIcosahedron( void );
|
||||
FGAPI void FGAPIENTRY glutSolidIcosahedron( void );
|
||||
|
||||
/*
|
||||
* Teapot rendering functions, found in freeglut_teapot.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutWireTeapot( GLdouble size );
|
||||
FGAPI void FGAPIENTRY glutSolidTeapot( GLdouble size );
|
||||
|
||||
/*
|
||||
* Game mode functions, see freeglut_gamemode.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutGameModeString( const char* string );
|
||||
FGAPI int FGAPIENTRY glutEnterGameMode( void );
|
||||
FGAPI void FGAPIENTRY glutLeaveGameMode( void );
|
||||
FGAPI int FGAPIENTRY glutGameModeGet( GLenum query );
|
||||
|
||||
/*
|
||||
* Video resize functions, see freeglut_videoresize.c
|
||||
*/
|
||||
FGAPI int FGAPIENTRY glutVideoResizeGet( GLenum query );
|
||||
FGAPI void FGAPIENTRY glutSetupVideoResizing( void );
|
||||
FGAPI void FGAPIENTRY glutStopVideoResizing( void );
|
||||
FGAPI void FGAPIENTRY glutVideoResize( int x, int y, int width, int height );
|
||||
FGAPI void FGAPIENTRY glutVideoPan( int x, int y, int width, int height );
|
||||
|
||||
/*
|
||||
* Colormap functions, see freeglut_misc.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue );
|
||||
FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component );
|
||||
FGAPI void FGAPIENTRY glutCopyColormap( int window );
|
||||
|
||||
/*
|
||||
* Misc keyboard and joystick functions, see freeglut_misc.c
|
||||
*/
|
||||
FGAPI void FGAPIENTRY glutIgnoreKeyRepeat( int ignore );
|
||||
FGAPI void FGAPIENTRY glutSetKeyRepeat( int repeatMode );
|
||||
FGAPI void FGAPIENTRY glutForceJoystickFunc( void );
|
||||
|
||||
/*
|
||||
* Misc functions, see freeglut_misc.c
|
||||
*/
|
||||
FGAPI int FGAPIENTRY glutExtensionSupported( const char* extension );
|
||||
FGAPI void FGAPIENTRY glutReportErrors( void );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* FREEGLUT_H */
|
||||
|
||||
/*** END OF FILE ***/
|
||||
|
||||
|
||||
|
||||
|
562
freeglut/freeglut/include/GL/freeglut_internal.h
Normal file
562
freeglut/freeglut/include/GL/freeglut_internal.h
Normal file
@ -0,0 +1,562 @@
|
||||
/*
|
||||
* freeglut_internal.h
|
||||
*
|
||||
* The freeglut library private include file.
|
||||
*
|
||||
* Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: Thu Dec 2 1999
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef FREEGLUT_INTERNAL_H
|
||||
#define FREEGLUT_INTERNAL_H
|
||||
|
||||
/*
|
||||
* Freeglut is meant to be available under all Unix/X11 and Win32 platforms.
|
||||
*/
|
||||
#if !defined(_WIN32)
|
||||
# define TARGET_HOST_UNIX_X11 1
|
||||
# define TARGET_HOST_WIN32 0
|
||||
#else
|
||||
# define TARGET_HOST_UNIX_X11 0
|
||||
# define TARGET_HOST_WIN32 1
|
||||
#endif
|
||||
|
||||
#define FREEGLUT_MAX_MENUS 3
|
||||
#define FREEGLUT_DEBUG 1
|
||||
|
||||
#if FREEGLUT_DEBUG
|
||||
#undef G_DISABLE_ASSERT
|
||||
#undef G_DISABLE_CHECKS
|
||||
#else
|
||||
#define G_DISABLE_ASSERT
|
||||
#define G_DISABLE_CHECKS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Somehow all Win32 include headers depend on this one:
|
||||
*/
|
||||
#if TARGET_HOST_WIN32
|
||||
#include <windows.h>
|
||||
#include <windowsx.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Those files should be available on every platform. GLib can be
|
||||
* downloaded from ftp.gtk.org. Ports are available for most Unix
|
||||
* systems and Win32 (for both native and posix-emulation modes).
|
||||
*/
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <glib.h>
|
||||
|
||||
/*
|
||||
* The system-dependant include files should go here:
|
||||
*/
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
#include <GL/glx.h>
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <X11/keysym.h>
|
||||
|
||||
/*
|
||||
* This will generate errors, but I don't have any idea how to fix it (will autoconf help?)
|
||||
*/
|
||||
#include <X11/extensions/xf86vmode.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Microsoft VisualC++ 5.0's <math.h> does not define the PI
|
||||
*/
|
||||
#ifndef M_PI
|
||||
# define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
|
||||
/* -- GLOBAL TYPE DEFINITIONS ---------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Freeglut callbacks type definitions
|
||||
*/
|
||||
typedef void (* FGCBdisplay )( void );
|
||||
typedef void (* FGCBreshape )( int, int );
|
||||
typedef void (* FGCBvisibility )( int );
|
||||
typedef void (* FGCBkeyboard )( unsigned char, int, int );
|
||||
typedef void (* FGCBspecial )( int, int, int );
|
||||
typedef void (* FGCBmouse )( int, int, int, int );
|
||||
typedef void (* FGCBmotion )( int, int );
|
||||
typedef void (* FGCBpassive )( int, int );
|
||||
typedef void (* FGCBentry )( int );
|
||||
typedef void (* FGCBwindowStatus )( int );
|
||||
typedef void (* FGCBmenuState )( int );
|
||||
typedef void (* FGCBmenuStatus )( int, int, int );
|
||||
typedef void (* FGCBselect )( int, int, int );
|
||||
typedef void (* FGCBjoystick )( unsigned int, int, int, int );
|
||||
typedef void (* FGCBkeyboardUp )( unsigned char, int, int );
|
||||
typedef void (* FGCBspecialUp )( int, int, int );
|
||||
typedef void (* FGCBoverlayDisplay)( void );
|
||||
typedef void (* FGCBspaceMotion )( int, int, int );
|
||||
typedef void (* FGCBspaceRotate )( int, int, int );
|
||||
typedef void (* FGCBspaceButton )( int, int );
|
||||
typedef void (* FGCBdials )( int, int );
|
||||
typedef void (* FGCBbuttonBox )( int, int );
|
||||
typedef void (* FGCBtabletMotion )( int, int );
|
||||
typedef void (* FGCBtabletButton )( int, int, int, int );
|
||||
|
||||
/*
|
||||
* The global callbacks type definitions
|
||||
*/
|
||||
typedef void (* FGCBidle )( void );
|
||||
typedef void (* FGCBtimer )( int );
|
||||
|
||||
/*
|
||||
* The callback used when creating/using menus
|
||||
*/
|
||||
typedef void (* FGCBmenu )( int );
|
||||
|
||||
/*
|
||||
* A helper structure holding two ints and a boolean
|
||||
*/
|
||||
typedef struct tagSFG_XYUse SFG_XYUse;
|
||||
struct tagSFG_XYUse
|
||||
{
|
||||
gint X, Y; /* The two integers... */
|
||||
gboolean Use; /* ...and a single boolean. */
|
||||
};
|
||||
|
||||
/*
|
||||
* This structure holds different freeglut settings
|
||||
*/
|
||||
typedef struct tagSFG_State SFG_State;
|
||||
struct tagSFG_State
|
||||
{
|
||||
SFG_XYUse Position; /* The default windows' position */
|
||||
SFG_XYUse Size; /* The default windows' size */
|
||||
guint DisplayMode; /* The display mode for new windows */
|
||||
|
||||
gboolean ForceDirectContext; /* Should we force direct contexts? */
|
||||
gboolean TryDirectContext; /* What about giving a try to? */
|
||||
|
||||
gboolean ForceIconic; /* All new top windows are iconified */
|
||||
|
||||
gboolean GLDebugSwitch; /* OpenGL state debugging switch */
|
||||
gboolean XSyncSwitch; /* X11 sync protocol switch */
|
||||
|
||||
gboolean IgnoreKeyRepeat; /* Whether to ignore key repeat... */
|
||||
|
||||
GTimer* Timer; /* This timer is started on glutInit */
|
||||
GList* Timers; /* The freeglut timer hooks */
|
||||
|
||||
FGCBidle IdleCallback; /* The global idle callback */
|
||||
|
||||
SFG_XYUse GameModeSize; /* The game mode screen's dimensions */
|
||||
gint GameModeDepth; /* The pixel depth for game mode */
|
||||
gint GameModeRefresh; /* The refresh rate for game mode */
|
||||
};
|
||||
|
||||
/*
|
||||
* The structure used by display initialization in freeglut_init.c
|
||||
*/
|
||||
typedef struct tagSFG_Display SFG_Display;
|
||||
struct tagSFG_Display
|
||||
{
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
Display* Display; /* The display we are being run in. */
|
||||
gint Screen; /* The screen we are about to use. */
|
||||
Window RootWindow; /* The screen's root window. */
|
||||
gint Connection; /* The display's connection number */
|
||||
Atom DeleteWindow; /* The window deletion atom */
|
||||
|
||||
#ifdef X_XF86VidModeGetModeLine
|
||||
XF86VidModeModeLine DisplayMode; /* Current screen's display settings */
|
||||
gint DisplayModeClock; /* The display mode's refresh rate */
|
||||
#endif
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
HINSTANCE Instance; /* The application's instance */
|
||||
DEVMODE DisplayMode; /* Desktop's display settings */
|
||||
|
||||
#endif
|
||||
|
||||
gint ScreenWidth; /* The screen's width in pixels */
|
||||
gint ScreenHeight; /* The screen's height in pixels */
|
||||
gint ScreenWidthMM; /* The screen's width in milimeters */
|
||||
gint ScreenHeightMM; /* The screen's height in milimeters */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* The user can create any number of timer hooks
|
||||
*/
|
||||
typedef struct tagSFG_Timer SFG_Timer;
|
||||
struct tagSFG_Timer
|
||||
{
|
||||
gint32 ID; /* The timer ID integer */
|
||||
FGCBtimer Callback; /* The timer callback */
|
||||
double TriggerTime; /* The timer trigger time */
|
||||
};
|
||||
|
||||
/*
|
||||
* A window and it's OpenGL context. The contents of this structure
|
||||
* are highly dependant on the target operating system we aim at...
|
||||
*/
|
||||
typedef struct tagSFG_Context SFG_Context;
|
||||
struct tagSFG_Context
|
||||
{
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
Window Handle; /* The window's handle */
|
||||
GLXContext Context; /* The OpenGL context */
|
||||
XVisualInfo* VisualInfo; /* The window's visual information */
|
||||
|
||||
#elif TARGET_HOST_WIN32
|
||||
HWND Handle; /* The window's handle */
|
||||
HDC Device; /* The window's device context */
|
||||
HGLRC Context; /* The window's WGL context */
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* Window's state description. This structure should be kept portable.
|
||||
*/
|
||||
typedef struct tagSFG_WindowState SFG_WindowState;
|
||||
struct tagSFG_WindowState
|
||||
{
|
||||
gint Width; /* Window's width in pixels */
|
||||
gint Height; /* The same about the height */
|
||||
|
||||
gboolean Redisplay; /* Do we have to redisplay? */
|
||||
gboolean Visible; /* Is the window visible now */
|
||||
|
||||
gint Cursor; /* The currently selected cursor */
|
||||
guint32 Modifiers; /* The current ALT/SHIFT/CTRL state */
|
||||
|
||||
double JoystickPollRate; /* The joystick polling rate */
|
||||
double JoystickLastPoll; /* When the last poll has happened */
|
||||
|
||||
gint MouseX, MouseY; /* The most recent mouse position */
|
||||
|
||||
gboolean IsGameMode; /* Is this the game mode window? */
|
||||
|
||||
#if TARGET_HOST_WIN32
|
||||
gboolean NeedToResize; /* Do we need to explicitly resize? */
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
* The window callbacks the user can supply us with. Should be kept portable.
|
||||
*/
|
||||
typedef struct tagSFG_WindowCallbacks SFG_WindowCallbacks;
|
||||
struct tagSFG_WindowCallbacks
|
||||
{
|
||||
/*
|
||||
* Following callbacks are fully supported right now
|
||||
* and are ready to be tested for GLUT conformance:
|
||||
*/
|
||||
FGCBdisplay Display;
|
||||
FGCBreshape Reshape;
|
||||
FGCBkeyboard Keyboard;
|
||||
FGCBspecial Special;
|
||||
FGCBmouse Mouse;
|
||||
FGCBmotion Motion;
|
||||
FGCBpassive Passive;
|
||||
FGCBentry Entry;
|
||||
FGCBvisibility Visibility;
|
||||
FGCBwindowStatus WindowStatus;
|
||||
|
||||
/*
|
||||
* Those callbacks are required for the initial version
|
||||
*/
|
||||
FGCBmenuState MenuState;
|
||||
FGCBmenuStatus MenuStatus;
|
||||
FGCBselect Select;
|
||||
FGCBjoystick Joystick;
|
||||
FGCBkeyboardUp KeyboardUp;
|
||||
FGCBspecialUp SpecialUp;
|
||||
|
||||
/*
|
||||
* Those callbacks are being ignored for the moment
|
||||
*/
|
||||
FGCBoverlayDisplay OverlayDisplay;
|
||||
FGCBspaceMotion SpaceMotion;
|
||||
FGCBspaceRotate SpaceRotation;
|
||||
FGCBspaceButton SpaceButton;
|
||||
FGCBdials Dials;
|
||||
FGCBbuttonBox ButtonBox;
|
||||
FGCBtabletMotion TabletMotion;
|
||||
FGCBtabletButton TabletButton;
|
||||
};
|
||||
|
||||
/*
|
||||
* This structure describes a menu
|
||||
*/
|
||||
typedef struct tagSFG_Menu SFG_Menu;
|
||||
struct tagSFG_Menu
|
||||
{
|
||||
gint ID; /* The global menu ID */
|
||||
GList* Entries; /* The menu entries list */
|
||||
FGCBmenu Callback; /* The menu callback */
|
||||
gboolean IsActive; /* Is the menu selected? */
|
||||
gint Width; /* Menu box width in pixels */
|
||||
gint Height; /* Menu box height in pixels */
|
||||
gint X, Y; /* Menu box raster position */
|
||||
};
|
||||
|
||||
/*
|
||||
* This is a menu entry
|
||||
*/
|
||||
typedef struct tagSFG_MenuEntry SFG_MenuEntry;
|
||||
struct tagSFG_MenuEntry
|
||||
{
|
||||
gint ID; /* The menu entry ID (local) */
|
||||
gint Ordinal; /* The menu's ordinal number */
|
||||
GString* Text; /* The text to be displayed */
|
||||
SFG_Menu* SubMenu; /* Optional sub-menu tree */
|
||||
gboolean IsActive; /* Is the entry highlighted? */
|
||||
gint Width; /* Label's width in pixels */
|
||||
};
|
||||
|
||||
/*
|
||||
* A window, making part of FreeGLUT windows hierarchy. Should be kept portable.
|
||||
*/
|
||||
typedef struct tagSFG_Window SFG_Window;
|
||||
struct tagSFG_Window
|
||||
{
|
||||
gint ID; /* Window's ID number */
|
||||
|
||||
SFG_Context Window; /* Window and OpenGL context */
|
||||
SFG_WindowState State; /* The window state */
|
||||
SFG_WindowCallbacks Callbacks; /* The window callbacks */
|
||||
|
||||
SFG_Menu* Menu[ FREEGLUT_MAX_MENUS ]; /* Menus appended to window */
|
||||
gboolean MenuActive[ FREEGLUT_MAX_MENUS ]; /* The menus activity flags */
|
||||
|
||||
SFG_Window* Parent; /* The parent to this window */
|
||||
GList* Children; /* The subwindows d.l. list */
|
||||
};
|
||||
|
||||
/*
|
||||
* This holds information about all the windows, menus etc.
|
||||
*/
|
||||
typedef struct tagSFG_Structure SFG_Structure;
|
||||
struct tagSFG_Structure
|
||||
{
|
||||
GList* Windows; /* The global windows list */
|
||||
GList* Menus; /* The global menus list */
|
||||
|
||||
SFG_Window* Window; /* The currently active win. */
|
||||
SFG_Menu* Menu; /* Same, but menu... */
|
||||
|
||||
SFG_Window* GameMode; /* The game mode window */
|
||||
|
||||
gint WindowID; /* The new current window ID */
|
||||
gint MenuID; /* The new current menu ID */
|
||||
};
|
||||
|
||||
/*
|
||||
* This structure is used for the enumeration purposes.
|
||||
* You can easily extend it's functionalities by declaring
|
||||
* a structure containing enumerator's contents and custom
|
||||
* data, then casting it's pointer to (SFG_Enumerator *).
|
||||
*/
|
||||
typedef struct tagSFG_Enumerator SFG_Enumerator;
|
||||
struct tagSFG_Enumerator
|
||||
{
|
||||
gboolean found; /* Used to terminate search */
|
||||
gpointer data; /* Custom data pointer */
|
||||
};
|
||||
|
||||
/*
|
||||
* The bitmap font structure
|
||||
*/
|
||||
typedef struct tagSFG_Font SFG_Font;
|
||||
struct tagSFG_Font
|
||||
{
|
||||
gchar* Name; /* The source font name */
|
||||
gint Quantity; /* Number of chars in font */
|
||||
gint Height; /* Height of the characters */
|
||||
const guchar** Characters; /* The characters mapping */
|
||||
};
|
||||
|
||||
|
||||
/* -- GLOBAL VARIABLES EXPORTS --------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Freeglut display related stuff (initialized once per session)
|
||||
*/
|
||||
extern SFG_Display fgDisplay;
|
||||
|
||||
/*
|
||||
* Freeglut internal structure
|
||||
*/
|
||||
extern SFG_Structure fgStructure;
|
||||
|
||||
/*
|
||||
* The current freeglut settings
|
||||
*/
|
||||
extern SFG_State fgState;
|
||||
|
||||
|
||||
/* -- PRIVATE FUNCTION DECLARATIONS ---------------------------------------- */
|
||||
|
||||
/*
|
||||
* A call to this function makes us sure that the Display and Structure
|
||||
* subsystems have been properly initialized and are ready to be used
|
||||
*/
|
||||
#define freeglut_assert_ready g_assert( fgState.Timer != NULL );
|
||||
|
||||
/*
|
||||
* Following definitions are somewhat similiar to GLib's,
|
||||
* but do not generate any log messages:
|
||||
*/
|
||||
#define freeglut_return_if_fail( expr ) if( !(expr) ) return;
|
||||
#define freeglut_return_val_if_fail( expr, val ) if( !(expr) ) return( val );
|
||||
|
||||
/*
|
||||
* A call to those macros assures us that there is a current
|
||||
* window and menu set, respectively:
|
||||
*/
|
||||
#define freeglut_assert_window g_assert( fgStructure.Window != NULL );
|
||||
#define freeglut_assert_menu g_assert( fgStructure.Menu != NULL );
|
||||
|
||||
/*
|
||||
* The initialize and deinitialize functions get called on glutInit()
|
||||
* and glutMainLoop() end respectively. They should create/clean up
|
||||
* everything inside of the freeglut
|
||||
*/
|
||||
void fgInitialize( const gchar* displayName );
|
||||
void fgDeinitialize( void );
|
||||
|
||||
/*
|
||||
* Those two functions are used to create/destroy the freeglut internal
|
||||
* structures. This actually happens when calling glutInit() and when
|
||||
* quitting the glutMainLoop() (which actually happens, when all windows
|
||||
* have been closed).
|
||||
*/
|
||||
void fgCreateStructure( void );
|
||||
void fgDestroyStructure( void );
|
||||
|
||||
/*
|
||||
* A helper function to check if a display mode is possible to use
|
||||
*/
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
XVisualInfo* fgChooseVisual( void );
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The window procedure for Win32 events handling
|
||||
*/
|
||||
#if TARGET_HOST_WIN32
|
||||
LRESULT CALLBACK fgWindowProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
|
||||
gboolean fgSetupPixelFormat( SFG_Window* window, gboolean checkOnly );
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Window creation, opening, closing and destruction.
|
||||
* Defined in freeglut_structure.c, freeglut_window.c.
|
||||
*/
|
||||
SFG_Window* fgCreateWindow( SFG_Window* parent, const gchar* title, gint x, gint y, gint w, gint h, gboolean gameMode );
|
||||
void fgOpenWindow( SFG_Window* window, const gchar* title, gint x, gint y, gint w, gint h, gboolean gameMode );
|
||||
void fgCloseWindow( SFG_Window* window );
|
||||
void fgDestroyWindow( SFG_Window* window, gboolean needToClose );
|
||||
|
||||
/*
|
||||
* Menu creation and destruction. Defined in freeglut_structure.c
|
||||
*/
|
||||
SFG_Menu* fgCreateMenu( FGCBmenu menuCallback );
|
||||
void fgDestroyMenu( SFG_Menu* menu );
|
||||
|
||||
/*
|
||||
* Joystick device management functions, defined in freeglut_joystick.c
|
||||
*/
|
||||
void fgJoystickInit( gint ident );
|
||||
void fgJoystickClose( void );
|
||||
void fgJoystickPollWindow( SFG_Window* window );
|
||||
|
||||
/*
|
||||
* Helper function to enumerate through all registered windows
|
||||
* and one to enumerate all of a window's subwindows...
|
||||
*
|
||||
* The GFunc callback for those functions will be defined as:
|
||||
*
|
||||
* void enumCallback( gpointer window, gpointer enumerator );
|
||||
*
|
||||
* where window is the enumerated (sub)window pointer (SFG_Window *),
|
||||
* and userData is the a custom user-supplied pointer. Functions
|
||||
* are defined and exported from freeglut_structure.c file.
|
||||
*/
|
||||
void fgEnumWindows( GFunc enumCallback, SFG_Enumerator* enumerator );
|
||||
void fgEnumSubWindows( SFG_Window* window, GFunc enumCallback, SFG_Enumerator* enumerator );
|
||||
|
||||
/*
|
||||
* fgWindowByHandle returns a (SFG_Window *) value pointing to the
|
||||
* first window in the queue matching the specified window handle.
|
||||
* The function is defined in freeglut_structure.c file.
|
||||
*/
|
||||
#if TARGET_HOST_UNIX_X11
|
||||
SFG_Window* fgWindowByHandle( Window hWindow );
|
||||
#elif TARGET_HOST_WIN32
|
||||
|
||||
SFG_Window* fgWindowByHandle( HWND hWindow );
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This function is similiar to the previous one, except it is
|
||||
* looking for a specified (sub)window identifier. The function
|
||||
* is defined in freeglut_structure.c file.
|
||||
*/
|
||||
SFG_Window* fgWindowByID( gint windowID );
|
||||
|
||||
/*
|
||||
* Looks up a menu given it's ID. This is easier that fgWindowByXXX
|
||||
* as all menus are placed in a single doubly linked list...
|
||||
*/
|
||||
SFG_Menu* fgMenuByID( gint menuID );
|
||||
|
||||
/*
|
||||
* The menu activation and deactivation the code. This is the meat
|
||||
* of the menu user interface handling code...
|
||||
*/
|
||||
void fgActivateMenu( gint button );
|
||||
void fgDeactivateMenu( gint button );
|
||||
|
||||
/*
|
||||
* This function gets called just before the buffers swap, so that
|
||||
* freeglut can display the pull-down menus via OpenGL. The function
|
||||
* is defined in freeglut_menu.c file.
|
||||
*/
|
||||
void fgDisplayMenu( void );
|
||||
|
||||
/*
|
||||
* Display the mouse cursor using OpenGL calls. The function
|
||||
* is defined in freeglut_cursor.c file.
|
||||
*/
|
||||
void fgDisplayCursor( void );
|
||||
|
||||
#endif /* FREEGLUT_INTERNAL_H */
|
||||
|
||||
/*** END OF FILE ***/
|
||||
|
||||
|
||||
|
||||
|
288
freeglut/freeglut/include/Makefile
Normal file
288
freeglut/freeglut/include/Makefile
Normal file
@ -0,0 +1,288 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ..
|
||||
prefix = /usr/local
|
||||
exec_prefix = ${prefix}
|
||||
|
||||
bindir = ${exec_prefix}/bin
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
datadir = ${prefix}/share
|
||||
sysconfdir = ${prefix}/etc
|
||||
sharedstatedir = ${prefix}/com
|
||||
localstatedir = ${prefix}/var
|
||||
libdir = ${exec_prefix}/lib
|
||||
infodir = ${prefix}/info
|
||||
mandir = ${prefix}/man
|
||||
includedir = ${prefix}/include
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/freeglut
|
||||
pkglibdir = $(libdir)/freeglut
|
||||
pkgincludedir = $(includedir)/freeglut
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = aclocal
|
||||
AUTOCONF = autoconf
|
||||
AUTOMAKE = automake
|
||||
AUTOHEADER = autoheader
|
||||
|
||||
INSTALL = /usr/bin/ginstall -c
|
||||
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
||||
transform = s,x,x,
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = i686-suse-linux
|
||||
host_triplet = i686-suse-linux-gnu
|
||||
AS = @AS@
|
||||
CC = gcc
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT =
|
||||
LIBM = -lm
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LIBTOOL_DEPS = ./ltconfig ./ltmain.sh
|
||||
LN_S = ln -s
|
||||
MAKEINFO = makeinfo
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = freeglut
|
||||
RANLIB = ranlib
|
||||
VERSION = 0.1
|
||||
|
||||
SUBDIRS = GL
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
|
||||
|
||||
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive \
|
||||
check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
rev="$$subdir $$rev"; \
|
||||
test "$$subdir" = "." && dot_seen=yes; \
|
||||
done; \
|
||||
test "$$dot_seen" = "no" && rev=". $$rev"; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = include
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu include/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
for subdir in $(SUBDIRS); do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
chmod 777 $(distdir)/$$subdir; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
dvi: dvi-recursive
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
installcheck-am:
|
||||
installcheck: installcheck-recursive
|
||||
install-exec-am:
|
||||
install-exec: install-exec-recursive
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-recursive
|
||||
uninstall-am:
|
||||
uninstall: uninstall-recursive
|
||||
all-am: Makefile
|
||||
all-redirect: all-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-tags clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-tags distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-recursive
|
||||
|
||||
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
|
||||
.PHONY: install-data-recursive uninstall-data-recursive \
|
||||
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
|
||||
uninstalldirs-recursive all-recursive check-recursive \
|
||||
installcheck-recursive info-recursive dvi-recursive \
|
||||
mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
3
freeglut/freeglut/include/Makefile.am
Normal file
3
freeglut/freeglut/include/Makefile.am
Normal file
@ -0,0 +1,3 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = GL
|
288
freeglut/freeglut/include/Makefile.in
Normal file
288
freeglut/freeglut/include/Makefile.in
Normal file
@ -0,0 +1,288 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT = @EXEEXT@
|
||||
LIBM = @LIBM@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
|
||||
SUBDIRS = GL
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# To change the values of `make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in `config.status', edit `config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||
# (2) otherwise, pass the desired values on the `make' command line.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
all-recursive install-data-recursive install-exec-recursive \
|
||||
installdirs-recursive install-recursive uninstall-recursive \
|
||||
check-recursive installcheck-recursive info-recursive dvi-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
@set fnord $(MAKEFLAGS); amf=$$2; \
|
||||
dot_seen=no; \
|
||||
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
rev="$$subdir $$rev"; \
|
||||
test "$$subdir" = "." && dot_seen=yes; \
|
||||
done; \
|
||||
test "$$dot_seen" = "no" && rev=". $$rev"; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
for subdir in $$rev; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
|
||||
done && test -z "$$fail"
|
||||
tags-recursive:
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||
done
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = include
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu include/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
for subdir in $(SUBDIRS); do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d $(distdir)/$$subdir \
|
||||
|| mkdir $(distdir)/$$subdir \
|
||||
|| exit 1; \
|
||||
chmod 777 $(distdir)/$$subdir; \
|
||||
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
info-am:
|
||||
info: info-recursive
|
||||
dvi-am:
|
||||
dvi: dvi-recursive
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
installcheck-am:
|
||||
installcheck: installcheck-recursive
|
||||
install-exec-am:
|
||||
install-exec: install-exec-recursive
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-recursive
|
||||
uninstall-am:
|
||||
uninstall: uninstall-recursive
|
||||
all-am: Makefile
|
||||
all-redirect: all-recursive
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-tags clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-tags distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-recursive
|
||||
|
||||
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
|
||||
.PHONY: install-data-recursive uninstall-data-recursive \
|
||||
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
|
||||
uninstalldirs-recursive all-recursive check-recursive \
|
||||
installcheck-recursive info-recursive dvi-recursive \
|
||||
mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs-am \
|
||||
installdirs mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
250
freeglut/freeglut/install-sh
Executable file
250
freeglut/freeglut/install-sh
Executable file
@ -0,0 +1,250 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# install - install a program, script, or datafile
|
||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
||||
#
|
||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
||||
# documentation for any purpose is hereby granted without fee, provided that
|
||||
# the above copyright notice appear in all copies and that both that
|
||||
# copyright notice and this permission notice appear in supporting
|
||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
||||
# publicity pertaining to distribution of the software without specific,
|
||||
# written prior permission. M.I.T. makes no representations about the
|
||||
# suitability of this software for any purpose. It is provided "as is"
|
||||
# without express or implied warranty.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. It can only install one file at a time, a restriction
|
||||
# shared with many OS's install programs.
|
||||
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit="${DOITPROG-}"
|
||||
|
||||
|
||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
||||
|
||||
mvprog="${MVPROG-mv}"
|
||||
cpprog="${CPPROG-cp}"
|
||||
chmodprog="${CHMODPROG-chmod}"
|
||||
chownprog="${CHOWNPROG-chown}"
|
||||
chgrpprog="${CHGRPPROG-chgrp}"
|
||||
stripprog="${STRIPPROG-strip}"
|
||||
rmprog="${RMPROG-rm}"
|
||||
mkdirprog="${MKDIRPROG-mkdir}"
|
||||
|
||||
transformbasename=""
|
||||
transform_arg=""
|
||||
instcmd="$mvprog"
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=""
|
||||
chgrpcmd=""
|
||||
stripcmd=""
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=""
|
||||
dst=""
|
||||
dir_arg=""
|
||||
|
||||
while [ x"$1" != x ]; do
|
||||
case $1 in
|
||||
-c) instcmd="$cpprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd="$stripprog"
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
||||
shift
|
||||
continue;;
|
||||
|
||||
*) if [ x"$src" = x ]
|
||||
then
|
||||
src=$1
|
||||
else
|
||||
# this colon is to work around a 386BSD /bin/sh bug
|
||||
:
|
||||
dst=$1
|
||||
fi
|
||||
shift
|
||||
continue;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ x"$src" = x ]
|
||||
then
|
||||
echo "install: no input file specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]; then
|
||||
dst=$src
|
||||
src=""
|
||||
|
||||
if [ -d $dst ]; then
|
||||
instcmd=:
|
||||
else
|
||||
instcmd=mkdir
|
||||
fi
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
|
||||
if [ -f $src -o -d $src ]
|
||||
then
|
||||
true
|
||||
else
|
||||
echo "install: $src does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ x"$dst" = x ]
|
||||
then
|
||||
echo "install: no destination specified"
|
||||
exit 1
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# If destination is a directory, append the input filename; if your system
|
||||
# does not like double slashes in filenames, you may need to add some logic
|
||||
|
||||
if [ -d $dst ]
|
||||
then
|
||||
dst="$dst"/`basename $src`
|
||||
else
|
||||
true
|
||||
fi
|
||||
fi
|
||||
|
||||
## this sed command emulates the dirname command
|
||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if [ ! -d "$dstdir" ]; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-${defaultIFS}}"
|
||||
|
||||
oIFS="${IFS}"
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
IFS="${oIFS}"
|
||||
|
||||
pathcomp=''
|
||||
|
||||
while [ $# -ne 0 ] ; do
|
||||
pathcomp="${pathcomp}${1}"
|
||||
shift
|
||||
|
||||
if [ ! -d "${pathcomp}" ] ;
|
||||
then
|
||||
$mkdirprog "${pathcomp}"
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
pathcomp="${pathcomp}/"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ x"$dir_arg" != x ]
|
||||
then
|
||||
$doit $instcmd $dst &&
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
||||
else
|
||||
|
||||
# If we're going to rename the final executable, determine the name now.
|
||||
|
||||
if [ x"$transformarg" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
dstfile=`basename $dst $transformbasename |
|
||||
sed $transformarg`$transformbasename
|
||||
fi
|
||||
|
||||
# don't allow the sed command to completely eliminate the filename
|
||||
|
||||
if [ x"$dstfile" = x ]
|
||||
then
|
||||
dstfile=`basename $dst`
|
||||
else
|
||||
true
|
||||
fi
|
||||
|
||||
# Make a temp file name in the proper directory.
|
||||
|
||||
dsttmp=$dstdir/#inst.$$#
|
||||
|
||||
# Move or copy the file name to the temp name
|
||||
|
||||
$doit $instcmd $src $dsttmp &&
|
||||
|
||||
trap "rm -f ${dsttmp}" 0 &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits
|
||||
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
||||
|
||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
|
||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
||||
|
||||
fi &&
|
||||
|
||||
|
||||
exit 0
|
40
freeglut/freeglut/mkinstalldirs
Executable file
40
freeglut/freeglut/mkinstalldirs
Executable file
@ -0,0 +1,40 @@
|
||||
#! /bin/sh
|
||||
# mkinstalldirs --- make directory hierarchy
|
||||
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
|
||||
# Created: 1993-05-16
|
||||
# Public domain
|
||||
|
||||
# $Id$
|
||||
|
||||
errstatus=0
|
||||
|
||||
for file
|
||||
do
|
||||
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
|
||||
shift
|
||||
|
||||
pathcomp=
|
||||
for d
|
||||
do
|
||||
pathcomp="$pathcomp$d"
|
||||
case "$pathcomp" in
|
||||
-* ) pathcomp=./$pathcomp ;;
|
||||
esac
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
echo "mkdir $pathcomp" 1>&2
|
||||
|
||||
mkdir "$pathcomp" || lasterr=$?
|
||||
|
||||
if test ! -d "$pathcomp"; then
|
||||
errstatus=$lasterr
|
||||
fi
|
||||
fi
|
||||
|
||||
pathcomp="$pathcomp/"
|
||||
done
|
||||
done
|
||||
|
||||
exit $errstatus
|
||||
|
||||
# mkinstalldirs ends here
|
1
freeglut/freeglut/stamp-h
Normal file
1
freeglut/freeglut/stamp-h
Normal file
@ -0,0 +1 @@
|
||||
timestamp
|
1
freeglut/freeglut/stamp-h.in
Normal file
1
freeglut/freeglut/stamp-h.in
Normal file
@ -0,0 +1 @@
|
||||
timestamp
|
40
freeglut/freeglut/tests/.deps/one.P
Normal file
40
freeglut/freeglut/tests/.deps/one.P
Normal file
@ -0,0 +1,40 @@
|
||||
one.o: one.c ../config.h /usr/include/stdio.h /usr/include/features.h \
|
||||
/usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h \
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h \
|
||||
/usr/include/bits/types.h /usr/include/libio.h \
|
||||
/usr/include/_G_config.h /usr/include/bits/stdio_lim.h \
|
||||
/usr/include/bits/stdio.h /usr/include/stdlib.h \
|
||||
/usr/include/sys/types.h /usr/include/time.h /usr/include/endian.h \
|
||||
/usr/include/bits/endian.h /usr/include/sys/select.h \
|
||||
/usr/include/bits/select.h /usr/include/bits/sigset.h \
|
||||
/usr/include/sys/sysmacros.h /usr/include/alloca.h \
|
||||
../include/GL/freeglut.h /usr/include/GL/gl.h /usr/include/GL/glext.h \
|
||||
/usr/include/GL/glu.h
|
||||
one.c :
|
||||
../config.h :
|
||||
/usr/include/stdio.h :
|
||||
/usr/include/features.h :
|
||||
/usr/include/sys/cdefs.h :
|
||||
/usr/include/gnu/stubs.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stddef.h :
|
||||
/usr/lib/gcc-lib/i486-suse-linux/2.95.2/include/stdarg.h :
|
||||
/usr/include/bits/types.h :
|
||||
/usr/include/libio.h :
|
||||
/usr/include/_G_config.h :
|
||||
/usr/include/bits/stdio_lim.h :
|
||||
/usr/include/bits/stdio.h :
|
||||
/usr/include/stdlib.h :
|
||||
/usr/include/sys/types.h :
|
||||
/usr/include/time.h :
|
||||
/usr/include/endian.h :
|
||||
/usr/include/bits/endian.h :
|
||||
/usr/include/sys/select.h :
|
||||
/usr/include/bits/select.h :
|
||||
/usr/include/bits/sigset.h :
|
||||
/usr/include/sys/sysmacros.h :
|
||||
/usr/include/alloca.h :
|
||||
../include/GL/freeglut.h :
|
||||
/usr/include/GL/gl.h :
|
||||
/usr/include/GL/glext.h :
|
||||
/usr/include/GL/glu.h :
|
342
freeglut/freeglut/tests/Makefile
Normal file
342
freeglut/freeglut/tests/Makefile
Normal file
@ -0,0 +1,342 @@
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
srcdir = .
|
||||
top_srcdir = ..
|
||||
prefix = /usr/local
|
||||
exec_prefix = ${prefix}
|
||||
|
||||
bindir = ${exec_prefix}/bin
|
||||
sbindir = ${exec_prefix}/sbin
|
||||
libexecdir = ${exec_prefix}/libexec
|
||||
datadir = ${prefix}/share
|
||||
sysconfdir = ${prefix}/etc
|
||||
sharedstatedir = ${prefix}/com
|
||||
localstatedir = ${prefix}/var
|
||||
libdir = ${exec_prefix}/lib
|
||||
infodir = ${prefix}/info
|
||||
mandir = ${prefix}/man
|
||||
includedir = ${prefix}/include
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/freeglut
|
||||
pkglibdir = $(libdir)/freeglut
|
||||
pkgincludedir = $(includedir)/freeglut
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = aclocal
|
||||
AUTOCONF = autoconf
|
||||
AUTOMAKE = automake
|
||||
AUTOHEADER = autoheader
|
||||
|
||||
INSTALL = /usr/bin/ginstall -c
|
||||
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = ${INSTALL} -m 644
|
||||
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
|
||||
transform = s,x,x,
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = i686-suse-linux
|
||||
host_triplet = i686-suse-linux-gnu
|
||||
AS = @AS@
|
||||
CC = gcc
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT =
|
||||
LIBM = -lm
|
||||
LIBTOOL = $(SHELL) $(top_builddir)/libtool
|
||||
LIBTOOL_DEPS = ./ltconfig ./ltmain.sh
|
||||
LN_S = ln -s
|
||||
MAKEINFO = makeinfo
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = freeglut
|
||||
RANLIB = ranlib
|
||||
VERSION = 0.1
|
||||
|
||||
bin_PROGRAMS = one
|
||||
one_SOURCES = one.c
|
||||
one_LDFLAGS = -export-dynamic -dlpreopen ../freeglut-1.3/libfreeglut-1.3.la
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
bin_PROGRAMS = one$(EXEEXT)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
|
||||
CPPFLAGS =
|
||||
LDFLAGS =
|
||||
LIBS =
|
||||
one_OBJECTS = one.o
|
||||
one_LDADD = $(LDADD)
|
||||
one_DEPENDENCIES =
|
||||
CFLAGS = -g -O2
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/one.P
|
||||
SOURCES = $(one_SOURCES)
|
||||
OBJECTS = $(one_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
done
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
one$(EXEEXT): $(one_OBJECTS) $(one_DEPENDENCIES)
|
||||
@rm -f one$(EXEEXT)
|
||||
$(LINK) $(one_LDFLAGS) $(one_OBJECTS) $(one_LDADD) $(LIBS)
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = tests
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu tests/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-binPROGRAMS
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
|
||||
distclean-tags distclean-depend distclean-generic \
|
||||
clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
|
||||
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
|
||||
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
6
freeglut/freeglut/tests/Makefile.am
Normal file
6
freeglut/freeglut/tests/Makefile.am
Normal file
@ -0,0 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.im
|
||||
|
||||
bin_PROGRAMS = one
|
||||
one_SOURCES = one.c
|
||||
one_LDFLAGS = -export-dynamic -dlpreopen ../freeglut-1.3/libfreeglut-1.3.la
|
||||
|
342
freeglut/freeglut/tests/Makefile.in
Normal file
342
freeglut/freeglut/tests/Makefile.in
Normal file
@ -0,0 +1,342 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
|
||||
bindir = @bindir@
|
||||
sbindir = @sbindir@
|
||||
libexecdir = @libexecdir@
|
||||
datadir = @datadir@
|
||||
sysconfdir = @sysconfdir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
localstatedir = @localstatedir@
|
||||
libdir = @libdir@
|
||||
infodir = @infodir@
|
||||
mandir = @mandir@
|
||||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DESTDIR =
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
top_builddir = ..
|
||||
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT = @EXEEXT@
|
||||
LIBM = @LIBM@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LN_S = @LN_S@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
VERSION = @VERSION@
|
||||
|
||||
bin_PROGRAMS = one
|
||||
one_SOURCES = one.c
|
||||
one_LDFLAGS = -export-dynamic -dlpreopen ../freeglut-1.3/libfreeglut-1.3.la
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
bin_PROGRAMS = one$(EXEEXT)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
|
||||
|
||||
DEFS = @DEFS@ -I. -I$(srcdir) -I..
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
one_OBJECTS = one.o
|
||||
one_LDADD = $(LDADD)
|
||||
one_DEPENDENCIES =
|
||||
CFLAGS = @CFLAGS@
|
||||
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
DEP_FILES = .deps/one.P
|
||||
SOURCES = $(one_SOURCES)
|
||||
OBJECTS = $(one_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
||||
cd $(top_builddir) \
|
||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||
|
||||
|
||||
mostlyclean-binPROGRAMS:
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
|
||||
distclean-binPROGRAMS:
|
||||
|
||||
maintainer-clean-binPROGRAMS:
|
||||
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
|
||||
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
|
||||
done
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
.S.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
|
||||
clean-compile:
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
maintainer-clean-compile:
|
||||
|
||||
.s.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
.S.lo:
|
||||
$(LIBTOOL) --mode=compile $(COMPILE) -c $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
one$(EXEEXT): $(one_OBJECTS) $(one_DEPENDENCIES)
|
||||
@rm -f one$(EXEEXT)
|
||||
$(LINK) $(one_LDFLAGS) $(one_OBJECTS) $(one_LDADD) $(LIBS)
|
||||
|
||||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|
||||
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
|
||||
|
||||
mostlyclean-tags:
|
||||
|
||||
clean-tags:
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID
|
||||
|
||||
maintainer-clean-tags:
|
||||
|
||||
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||
|
||||
subdir = tests
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
here=`cd $(top_builddir) && pwd`; \
|
||||
top_distdir=`cd $(top_distdir) && pwd`; \
|
||||
distdir=`cd $(distdir) && pwd`; \
|
||||
cd $(top_srcdir) \
|
||||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu tests/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
||||
-include $(DEP_FILES)
|
||||
|
||||
mostlyclean-depend:
|
||||
|
||||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am: install-binPROGRAMS
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data-am:
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-libtool mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-compile clean-libtool clean-tags \
|
||||
clean-depend clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-binPROGRAMS distclean-compile distclean-libtool \
|
||||
distclean-tags distclean-depend distclean-generic \
|
||||
clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-binPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-libtool \
|
||||
maintainer-clean-tags maintainer-clean-depend \
|
||||
maintainer-clean-generic distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
|
||||
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile mostlyclean-libtool distclean-libtool \
|
||||
clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir \
|
||||
mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
327
freeglut/freeglut/tests/one.c
Normal file
327
freeglut/freeglut/tests/one.c
Normal file
@ -0,0 +1,327 @@
|
||||
/*
|
||||
* one.c
|
||||
*
|
||||
* Hey! This was the original file where freeglut development started. Just
|
||||
* note what I have written here at the time. And see the creation date :)
|
||||
*
|
||||
* : This is a wrapper. I still have to figure out
|
||||
* : how to build shared libraries under *nix :)
|
||||
*
|
||||
* Copyright (c) 1999 by Pawel W. Olszta
|
||||
* Written by Pawel W. Olszta, <olszta@sourceforge.net>
|
||||
* Creation date: czw gru 2 11:58:41 CET 1999
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "../include/GL/freeglut.h"
|
||||
|
||||
int g_LeaveGameMode = 0;
|
||||
int g_InGameMode = 1;
|
||||
|
||||
/*
|
||||
* Call this function to have some text drawn at given coordinates
|
||||
*/
|
||||
void PrintText( int nX, int nY, char* pszText )
|
||||
{
|
||||
int lines;
|
||||
char *p;
|
||||
|
||||
/*
|
||||
* Prepare the OpenGL state
|
||||
*/
|
||||
glDisable( GL_DEPTH_TEST );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
||||
/*
|
||||
* Have an orthogonal projection matrix set
|
||||
*/
|
||||
glOrtho( 0, glutGet( GLUT_WINDOW_WIDTH ),
|
||||
0, glutGet( GLUT_WINDOW_HEIGHT ),
|
||||
-1, +1
|
||||
);
|
||||
|
||||
/*
|
||||
* Now the matrix mode
|
||||
*/
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
|
||||
/*
|
||||
* Now the main text
|
||||
*/
|
||||
glColor3ub( 0, 0, 0 );
|
||||
glRasterPos2i( nX, nY );
|
||||
|
||||
for( p=pszText, lines=0; *p; p++ )
|
||||
{
|
||||
if( *p == '\n' )
|
||||
{
|
||||
lines++;
|
||||
glRasterPos2i( nX, nY-(lines*18) );
|
||||
}
|
||||
|
||||
glutBitmapCharacter( GLUT_BITMAP_HELVETICA_18, *p );
|
||||
}
|
||||
|
||||
/*
|
||||
* Revert to the old matrix modes
|
||||
*/
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glPopMatrix();
|
||||
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glPopMatrix();
|
||||
|
||||
/*
|
||||
* Restore the old OpenGL states
|
||||
*/
|
||||
glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||
glEnable( GL_DEPTH_TEST );
|
||||
}
|
||||
|
||||
/*
|
||||
* This is the display routine for our sample FreeGLUT windows
|
||||
*/
|
||||
static float g_fTime = 0.0f;
|
||||
|
||||
void SampleDisplay( void )
|
||||
{
|
||||
/*
|
||||
* Clear the screen
|
||||
*/
|
||||
glClearColor( 0, 0.5, 1, 1 );
|
||||
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
|
||||
|
||||
/*
|
||||
* Have the cube rotated
|
||||
*/
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glPushMatrix();
|
||||
|
||||
glRotatef( g_fTime, 0, 0, 1 );
|
||||
glRotatef( g_fTime, 0, 1, 0 );
|
||||
glRotatef( g_fTime, 1, 0, 0 );
|
||||
|
||||
/*
|
||||
* And then drawn...
|
||||
*/
|
||||
glColor3f( 1, 1, 0 );
|
||||
//glutWireCube( 20.0 );
|
||||
glutWireTeapot( 20.0 );
|
||||
//glutWireSpher( 15.0, 15, 15 );
|
||||
//glColor3f( 0, 1, 0 );
|
||||
//glutWireCube( 30.0 );
|
||||
//glutSolidCone( 10, 20, 10, 2 );
|
||||
|
||||
/*
|
||||
* Don't forget about the model-view matrix
|
||||
*/
|
||||
glPopMatrix();
|
||||
|
||||
/*
|
||||
* Draw a silly text
|
||||
*/
|
||||
if( g_InGameMode == 0 )
|
||||
PrintText( 20, 20, "Hello there cruel world!" );
|
||||
else
|
||||
PrintText( 20, 20, "Press ESC to leave the game mode!" );
|
||||
|
||||
/*
|
||||
* And swap this context's buffers
|
||||
*/
|
||||
glutSwapBuffers();
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a sample idle function
|
||||
*/
|
||||
void SampleIdle( void )
|
||||
{
|
||||
g_fTime += 0.5f;
|
||||
|
||||
if( g_LeaveGameMode == 1 )
|
||||
{
|
||||
glutLeaveGameMode();
|
||||
g_LeaveGameMode = 0;
|
||||
g_InGameMode = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* The reshape function
|
||||
*/
|
||||
void SampleReshape( int nWidth, int nHeight )
|
||||
{
|
||||
GLfloat fAspect = (GLfloat) nHeight / (GLfloat) nWidth;
|
||||
GLfloat fPos[ 4 ] = { 0.0f, 0.0f, 10.0f, 0.0f };
|
||||
GLfloat fCol[ 4 ] = { 0.5f, 1.0f, 0.0f, 1.0f };
|
||||
|
||||
/*
|
||||
* Update the viewport first
|
||||
*/
|
||||
glViewport( 0, 0, nWidth, nHeight );
|
||||
|
||||
/*
|
||||
* Then the projection matrix
|
||||
*/
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
glFrustum( -1.0, 1.0, -fAspect, fAspect, 1.0, 80.0 );
|
||||
|
||||
/*
|
||||
* Move back the camera a bit
|
||||
*/
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
glTranslatef( 0.0, 0.0, -40.0f );
|
||||
|
||||
/*
|
||||
* Enable some features...
|
||||
*/
|
||||
glEnable( GL_CULL_FACE );
|
||||
glEnable( GL_DEPTH_TEST );
|
||||
glEnable( GL_NORMALIZE );
|
||||
|
||||
/*
|
||||
* Set up some lighting
|
||||
*/
|
||||
glLightfv( GL_LIGHT0, GL_POSITION, fPos );
|
||||
glEnable( GL_LIGHTING );
|
||||
glEnable( GL_LIGHT0 );
|
||||
|
||||
/*
|
||||
* Set up a sample material
|
||||
*/
|
||||
glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, fCol );
|
||||
}
|
||||
|
||||
/*
|
||||
* A sample keyboard callback
|
||||
*/
|
||||
void SampleKeyboard( unsigned char cChar, int nMouseX, int nMouseY )
|
||||
{
|
||||
printf( "SampleKeyboard(): keypress '%c' at (%i,%i)\n", cChar, nMouseX, nMouseY );
|
||||
}
|
||||
|
||||
/*
|
||||
* A sample keyboard callback (for game mode window)
|
||||
*/
|
||||
void SampleGameModeKeyboard( unsigned char cChar, int nMouseX, int nMouseY )
|
||||
{
|
||||
if( cChar == 27 )
|
||||
g_LeaveGameMode = 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* A sample special callback
|
||||
*/
|
||||
void SampleSpecial( int nSpecial, int nMouseX, int nMouseY )
|
||||
{
|
||||
printf( "SampleSpecial(): special keypress %i at (%i,%i)\n", nSpecial, nMouseX, nMouseY );
|
||||
}
|
||||
|
||||
/*
|
||||
* A sample menu callback
|
||||
*/
|
||||
void SampleMenu( int menuID )
|
||||
{
|
||||
/*
|
||||
* Just print something funny
|
||||
*/
|
||||
printf( "SampleMenu() callback executed, menuID is %i\n", menuID );
|
||||
}
|
||||
|
||||
/*
|
||||
* The sample's entry point
|
||||
*/
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
int menuID, subMenuA, subMenuB;
|
||||
|
||||
glutInit( &argc, argv );
|
||||
|
||||
glutInitDisplayString( "stencil~2 rgb double depth>=16 samples" );
|
||||
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
|
||||
glutInitWindowPosition( 100, 100 );
|
||||
|
||||
subMenuA = glutCreateMenu( SampleMenu );
|
||||
glutAddMenuEntry( "Sub menu A1 (01)", 1 );
|
||||
glutAddMenuEntry( "Sub menu A2 (02)", 2 );
|
||||
glutAddMenuEntry( "Sub menu A3 (03)", 3 );
|
||||
|
||||
subMenuB = glutCreateMenu( SampleMenu );
|
||||
glutAddMenuEntry( "Sub menu B1 (04)", 4 );
|
||||
glutAddMenuEntry( "Sub menu B2 (05)", 5 );
|
||||
glutAddMenuEntry( "Sub menu B3 (06)", 6 );
|
||||
glutAddSubMenu( "Going to sub menu A", subMenuA );
|
||||
|
||||
menuID = glutCreateMenu( SampleMenu );
|
||||
glutAddMenuEntry( "Entry one", 1 );
|
||||
glutAddMenuEntry( "Entry two", 2 );
|
||||
glutAddMenuEntry( "Entry three", 3 );
|
||||
glutAddMenuEntry( "Entry four", 4 );
|
||||
glutAddMenuEntry( "Entry five", 5 );
|
||||
glutAddSubMenu( "Enter sub menu A", subMenuA );
|
||||
glutAddSubMenu( "Enter sub menu B", subMenuB );
|
||||
|
||||
glutCreateWindow( "Hello world!" );
|
||||
glutDisplayFunc( SampleDisplay );
|
||||
glutReshapeFunc( SampleReshape );
|
||||
glutKeyboardFunc( SampleKeyboard );
|
||||
glutSpecialFunc( SampleSpecial );
|
||||
glutIdleFunc( SampleIdle );
|
||||
glutAttachMenu( GLUT_LEFT_BUTTON );
|
||||
|
||||
glutInitWindowPosition( 200, 200 );
|
||||
glutCreateWindow( "I am not Jan B." );
|
||||
glutDisplayFunc( SampleDisplay );
|
||||
glutReshapeFunc( SampleReshape );
|
||||
glutKeyboardFunc( SampleKeyboard );
|
||||
glutSpecialFunc( SampleSpecial );
|
||||
glutIdleFunc( SampleIdle );
|
||||
glutAttachMenu( GLUT_LEFT_BUTTON );
|
||||
|
||||
printf( "Testing game mode string parsing, don't panic!\n" );
|
||||
glutGameModeString( "320x240:32@100" );
|
||||
glutGameModeString( "640x480:16@72" );
|
||||
glutGameModeString( "1024x768" );
|
||||
glutGameModeString( ":32@120" );
|
||||
glutGameModeString( "Toudi glupcze, Danwin bedzie moj!" );
|
||||
glutGameModeString( "640x480:16@72" );
|
||||
|
||||
glutEnterGameMode();
|
||||
glutDisplayFunc( SampleDisplay );
|
||||
glutReshapeFunc( SampleReshape );
|
||||
glutKeyboardFunc( SampleGameModeKeyboard );
|
||||
glutIdleFunc( SampleIdle );
|
||||
glutAttachMenu( GLUT_LEFT_BUTTON );
|
||||
|
||||
printf( "current window is %ix%i+%i+%i",
|
||||
glutGet( GLUT_WINDOW_X ), glutGet( GLUT_WINDOW_Y ),
|
||||
glutGet( GLUT_WINDOW_WIDTH ), glutGet( GLUT_WINDOW_HEIGHT )
|
||||
);
|
||||
|
||||
/*
|
||||
* Enter the main FreeGLUT processing loop
|
||||
*/
|
||||
glutMainLoop();
|
||||
|
||||
printf( "glutMainLoop() termination works fine!\n" );
|
||||
|
||||
/*
|
||||
* This is never reached in FreeGLUT. Is that good?
|
||||
*/
|
||||
return( EXIT_SUCCESS );
|
||||
}
|
||||
|
||||
/*** END OF FILE ***/
|
Reference in New Issue
Block a user