diff -Nru electricsheep-2.7~b12+svn20091224/16_electricsheep electricsheep-3.0.2-git20180325/16_electricsheep --- electricsheep-2.7~b12+svn20091224/16_electricsheep 2008-07-17 21:51:37.000000000 +0000 +++ electricsheep-3.0.2-git20180325/16_electricsheep 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -/apps/gnome-screensaver/cycle_delay 100000 -/apps/gnome-screensaver/mode single -/apps/gnome-screensaver/themes [screensavers-electricsheep] diff -Nru electricsheep-2.7~b12+svn20091224/aclocal.m4 electricsheep-3.0.2-git20180325/aclocal.m4 --- electricsheep-2.7~b12+svn20091224/aclocal.m4 2009-07-02 02:52:27.000000000 +0000 +++ electricsheep-3.0.2-git20180325/aclocal.m4 1970-01-01 00:00:00.000000000 +0000 @@ -1,1037 +0,0 @@ -# generated automatically by aclocal 1.10.2 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This file 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. - -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, -[m4_warning([this file was generated for autoconf 2.63. -You have another version of autoconf. It may work, but is not guaranteed to. -If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) - -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# -# Copyright © 2004 Scott James Remnant . -# -# 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. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) -AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi - -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# -# Similar to PKG_CHECK_MODULES, make sure that the first instance of -# this or PKG_CHECK_MODULES is called, or make sure to call -# PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_ifval([$2], [$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$PKG_CONFIG"; then - if test -n "$$1"; then - pkg_cv_[]$1="$$1" - else - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], - [pkg_failed=yes]) - fi -else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -if test $pkg_failed = yes; then - _PKG_SHORT_ERRORS_SUPPORTED - if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - ifelse([$4], , [AC_MSG_ERROR(dnl -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT -])], - [AC_MSG_RESULT([no]) - $4]) -elif test $pkg_failed = untried; then - ifelse([$4], , [AC_MSG_FAILURE(dnl -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])], - [$4]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - ifelse([$3], , :, [$3]) -fi[]dnl -])# PKG_CHECK_MODULES - -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10.2], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10.2])dnl -m4_ifndef([AC_AUTOCONF_VERSION], - [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 8 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 9 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be -# written in clear, in which case automake, when reading aclocal.m4, -# will think it sees a *use*, and therefore will trigger all it's -# C support machinery. Also note that it means that autoscan, seeing -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". -# We try a few techniques and use that to set a single cache variable. -# -# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) - -AC_CACHE_CHECK([dependency style of $depcc], - [am_cv_$1_dependencies_compiler_type], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES -AC_DEFUN([AM_SET_DEPDIR], -[AC_REQUIRE([AM_SET_LEADING_DOT])dnl -AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi -AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file 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. - -#serial 5 - -# _AM_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# AM_OUTPUT_DEPENDENCY_COMMANDS -# ----------------------------- -# This macro should only be invoked once -- use via AC_REQUIRE. -# -# This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 13 - -# 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. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.60])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 3 - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 5 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([missing])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file 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. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# 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 conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $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]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 Free Software Foundation, Inc. -# -# This file 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. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file 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. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff -Nru electricsheep-2.7~b12+svn20091224/autogen.sh electricsheep-3.0.2-git20180325/autogen.sh --- electricsheep-2.7~b12+svn20091224/autogen.sh 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/autogen.sh 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,1580 @@ +#!/bin/sh +# a u t o g e n . s h +# +# Copyright (c) 2005-2009 United States Government as represented by +# the U.S. Army Research Laboratory. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# +# 3. The name of the author may not be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE +# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +### +# +# Script for automatically preparing the sources for compilation by +# performing the myrid of necessary steps. The script attempts to +# detect proper version support, and outputs warnings about particular +# systems that have autotool peculiarities. +# +# Basically, if everything is set up and installed correctly, the +# script will validate that minimum versions of the GNU Build System +# tools are installed, account for several common configuration +# issues, and then simply run autoreconf for you. +# +# If autoreconf fails, which can happen for many valid configurations, +# this script proceeds to run manual preparation steps effectively +# providing a POSIX shell script (mostly complete) reimplementation of +# autoreconf. +# +# The AUTORECONF, AUTOCONF, AUTOMAKE, LIBTOOLIZE, ACLOCAL, AUTOHEADER +# environment variables and corresponding _OPTIONS variables (e.g. +# AUTORECONF_OPTIONS) may be used to override the default automatic +# detection behaviors. Similarly the _VERSION variables will override +# the minimum required version numbers. +# +# Examples: +# +# To obtain help on usage: +# ./autogen.sh --help +# +# To obtain verbose output: +# ./autogen.sh --verbose +# +# To skip autoreconf and prepare manually: +# AUTORECONF=false ./autogen.sh +# +# To verbosely try running with an older (unsupported) autoconf: +# AUTOCONF_VERSION=2.50 ./autogen.sh --verbose +# +# Author: +# Christopher Sean Morrison +# +# Patches: +# Sebastian Pipping +# +###################################################################### + +# set to minimum acceptible version of autoconf +if [ "x$AUTOCONF_VERSION" = "x" ] ; then + AUTOCONF_VERSION=2.52 +fi +# set to minimum acceptible version of automake +if [ "x$AUTOMAKE_VERSION" = "x" ] ; then + AUTOMAKE_VERSION=1.6.0 +fi +# set to minimum acceptible version of libtool +if [ "x$LIBTOOL_VERSION" = "x" ] ; then + LIBTOOL_VERSION=1.4.2 +fi + + +################## +# ident function # +################## +ident ( ) { + # extract copyright from header + __copyright="`grep Copyright $AUTOGEN_SH | head -${HEAD_N}1 | awk '{print $4}'`" + if [ "x$__copyright" = "x" ] ; then + __copyright="`date +%Y`" + fi + + # extract version from CVS Id string + __id="$Id: autogen.sh,v 1.8 2009/08/06 04:44:39 gfinch Exp $" + __version="`echo $__id | sed 's/.*\([0-9][0-9][0-9][0-9]\)[-\/]\([0-9][0-9]\)[-\/]\([0-9][0-9]\).*/\1\2\3/'`" + if [ "x$__version" = "x" ] ; then + __version="" + fi + + echo "autogen.sh build preparation script by Christopher Sean Morrison" + echo " + config.guess download patch by Sebastian Pipping (2008-12-03)" + echo "revised 3-clause BSD-style license, copyright (c) $__copyright" + echo "script version $__version, ISO/IEC 9945 POSIX shell script" +} + + +################## +# USAGE FUNCTION # +################## +usage ( ) { + echo "Usage: $AUTOGEN_SH [-h|--help] [-v|--verbose] [-q|--quiet] [-d|--download] [--version]" + echo " --help Help on $NAME_OF_AUTOGEN usage" + echo " --verbose Verbose progress output" + echo " --quiet Quiet suppressed progress output" + echo " --download Download the latest config.guess from gnulib" + echo " --version Only perform GNU Build System version checks" + echo + echo "Description: This script will validate that minimum versions of the" + echo "GNU Build System tools are installed and then run autoreconf for you." + echo "Should autoreconf fail, manual preparation steps will be run" + echo "potentially accounting for several common preparation issues. The" + + echo "AUTORECONF, AUTOCONF, AUTOMAKE, LIBTOOLIZE, ACLOCAL, AUTOHEADER," + echo "PROJECT, & CONFIGURE environment variables and corresponding _OPTIONS" + echo "variables (e.g. AUTORECONF_OPTIONS) may be used to override the" + echo "default automatic detection behavior." + echo + + ident + + return 0 +} + + +########################## +# VERSION_ERROR FUNCTION # +########################## +version_error ( ) { + if [ "x$1" = "x" ] ; then + echo "INTERNAL ERROR: version_error was not provided a version" + exit 1 + fi + if [ "x$2" = "x" ] ; then + echo "INTERNAL ERROR: version_error was not provided an application name" + exit 1 + fi + $ECHO + $ECHO "ERROR: To prepare the ${PROJECT} build system from scratch," + $ECHO " at least version $1 of $2 must be installed." + $ECHO + $ECHO "$NAME_OF_AUTOGEN does not need to be run on the same machine that will" + $ECHO "run configure or make. Either the GNU Autotools will need to be installed" + $ECHO "or upgraded on this system, or $NAME_OF_AUTOGEN must be run on the source" + $ECHO "code on another system and then transferred to here. -- Cheers!" + $ECHO +} + +########################## +# VERSION_CHECK FUNCTION # +########################## +version_check ( ) { + if [ "x$1" = "x" ] ; then + echo "INTERNAL ERROR: version_check was not provided a minimum version" + exit 1 + fi + _min="$1" + if [ "x$2" = "x" ] ; then + echo "INTERNAL ERROR: version check was not provided a comparison version" + exit 1 + fi + _cur="$2" + + # needed to handle versions like 1.10 and 1.4-p6 + _min="`echo ${_min}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`" + _cur="`echo ${_cur}. | sed 's/[^0-9]/./g' | sed 's/\.\././g'`" + + _min_major="`echo $_min | cut -d. -f1`" + _min_minor="`echo $_min | cut -d. -f2`" + _min_patch="`echo $_min | cut -d. -f3`" + + _cur_major="`echo $_cur | cut -d. -f1`" + _cur_minor="`echo $_cur | cut -d. -f2`" + _cur_patch="`echo $_cur | cut -d. -f3`" + + if [ "x$_min_major" = "x" ] ; then + _min_major=0 + fi + if [ "x$_min_minor" = "x" ] ; then + _min_minor=0 + fi + if [ "x$_min_patch" = "x" ] ; then + _min_patch=0 + fi + if [ "x$_cur_minor" = "x" ] ; then + _cur_major=0 + fi + if [ "x$_cur_minor" = "x" ] ; then + _cur_minor=0 + fi + if [ "x$_cur_patch" = "x" ] ; then + _cur_patch=0 + fi + + $VERBOSE_ECHO "Checking if ${_cur_major}.${_cur_minor}.${_cur_patch} is greater than ${_min_major}.${_min_minor}.${_min_patch}" + + if [ $_min_major -lt $_cur_major ] ; then + return 0 + elif [ $_min_major -eq $_cur_major ] ; then + if [ $_min_minor -lt $_cur_minor ] ; then + return 0 + elif [ $_min_minor -eq $_cur_minor ] ; then + if [ $_min_patch -lt $_cur_patch ] ; then + return 0 + elif [ $_min_patch -eq $_cur_patch ] ; then + return 0 + fi + fi + fi + return 1 +} + + +###################################### +# LOCATE_CONFIGURE_TEMPLATE FUNCTION # +###################################### +locate_configure_template ( ) { + _pwd="`pwd`" + if test -f "./configure.ac" ; then + echo "./configure.ac" + elif test -f "./configure.in" ; then + echo "./configure.in" + elif test -f "$_pwd/configure.ac" ; then + echo "$_pwd/configure.ac" + elif test -f "$_pwd/configure.in" ; then + echo "$_pwd/configure.in" + elif test -f "$PATH_TO_AUTOGEN/configure.ac" ; then + echo "$PATH_TO_AUTOGEN/configure.ac" + elif test -f "$PATH_TO_AUTOGEN/configure.in" ; then + echo "$PATH_TO_AUTOGEN/configure.in" + fi +} + + +################## +# argument check # +################## +ARGS="$*" +PATH_TO_AUTOGEN="`dirname $0`" +NAME_OF_AUTOGEN="`basename $0`" +AUTOGEN_SH="$PATH_TO_AUTOGEN/$NAME_OF_AUTOGEN" + +LIBTOOL_M4="${PATH_TO_AUTOGEN}/misc/libtool.m4" + +if [ "x$HELP" = "x" ] ; then + HELP=no +fi +if [ "x$QUIET" = "x" ] ; then + QUIET=no +fi +if [ "x$VERBOSE" = "x" ] ; then + VERBOSE=no +fi +if [ "x$VERSION_ONLY" = "x" ] ; then + VERSION_ONLY=no +fi +if [ "x$DOWNLOAD" = "x" ] ; then + DOWNLOAD=no +fi +if [ "x$AUTORECONF_OPTIONS" = "x" ] ; then + AUTORECONF_OPTIONS="-i -f" +fi +if [ "x$AUTOCONF_OPTIONS" = "x" ] ; then + AUTOCONF_OPTIONS="-f" +fi +if [ "x$AUTOMAKE_OPTIONS" = "x" ] ; then + AUTOMAKE_OPTIONS="-a -c -f" +fi +ALT_AUTOMAKE_OPTIONS="-a -c" +if [ "x$LIBTOOLIZE_OPTIONS" = "x" ] ; then + LIBTOOLIZE_OPTIONS="--automake -c -f" +fi +ALT_LIBTOOLIZE_OPTIONS="--automake --copy --force" +if [ "x$ACLOCAL_OPTIONS" = "x" ] ; then + ACLOCAL_OPTIONS="" +fi +if [ "x$AUTOHEADER_OPTIONS" = "x" ] ; then + AUTOHEADER_OPTIONS="" +fi +if [ "x$CONFIG_GUESS_URL" = "x" ] ; then + CONFIG_GUESS_URL="http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/config.guess;hb=HEAD" +fi +for arg in $ARGS ; do + case "x$arg" in + x--help) HELP=yes ;; + x-[hH]) HELP=yes ;; + x--quiet) QUIET=yes ;; + x-[qQ]) QUIET=yes ;; + x--verbose) VERBOSE=yes ;; + x-[dD]) DOWNLOAD=yes ;; + x--download) DOWNLOAD=yes ;; + x-[vV]) VERBOSE=yes ;; + x--version) VERSION_ONLY=yes ;; + *) + echo "Unknown option: $arg" + echo + usage + exit 1 + ;; + esac +done + + +##################### +# environment check # +##################### + +# sanity check before recursions potentially begin +if [ ! -f "$AUTOGEN_SH" ] ; then + echo "INTERNAL ERROR: $AUTOGEN_SH does not exist" + if [ ! "x$0" = "x$AUTOGEN_SH" ] ; then + echo "INTERNAL ERROR: dirname/basename inconsistency: $0 != $AUTOGEN_SH" + fi + exit 1 +fi + +# force locale setting to C so things like date output as expected +LC_ALL=C + +# commands that this script expects +for __cmd in echo head tail pwd ; do + echo "test" | $__cmd > /dev/null 2>&1 + if [ $? != 0 ] ; then + echo "INTERNAL ERROR: '${__cmd}' command is required" + exit 2 + fi +done +echo "test" | grep "test" > /dev/null 2>&1 +if test ! x$? = x0 ; then + echo "INTERNAL ERROR: grep command is required" + exit 1 +fi +echo "test" | sed "s/test/test/" > /dev/null 2>&1 +if test ! x$? = x0 ; then + echo "INTERNAL ERROR: sed command is required" + exit 1 +fi + + +# determine the behavior of echo +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +# determine the behavior of head +case "x`echo 'head' | head -n 1 2>&1`" in + *xhead*) HEAD_N="n " ;; + *) HEAD_N="" ;; +esac + +# determine the behavior of tail +case "x`echo 'tail' | tail -n 1 2>&1`" in + *xtail*) TAIL_N="n " ;; + *) TAIL_N="" ;; +esac + +VERBOSE_ECHO=: +ECHO=: +if [ "x$QUIET" = "xyes" ] ; then + if [ "x$VERBOSE" = "xyes" ] ; then + echo "Verbose output quelled by quiet option. Further output disabled." + fi +else + ECHO=echo + if [ "x$VERBOSE" = "xyes" ] ; then + echo "Verbose output enabled" + VERBOSE_ECHO=echo + fi +fi + + +# allow a recursive run to disable further recursions +if [ "x$RUN_RECURSIVE" = "x" ] ; then + RUN_RECURSIVE=yes +fi + + +################################################ +# check for help arg and bypass version checks # +################################################ +if [ "x`echo $ARGS | sed 's/.*[hH][eE][lL][pP].*/help/'`" = "xhelp" ] ; then + HELP=yes +fi +if [ "x$HELP" = "xyes" ] ; then + usage + $ECHO "---" + $ECHO "Help was requested. No preparation or configuration will be performed." + exit 0 +fi + + +####################### +# set up signal traps # +####################### +untrap_abnormal ( ) { + for sig in 1 2 13 15; do + trap - $sig + done +} + +# do this cleanup whenever we exit. +trap ' + # start from the root + if test -d "$START_PATH" ; then + cd "$START_PATH" + fi + + # restore/delete backup files + if test "x$PFC_INIT" = "x1" ; then + recursive_restore + fi +' 0 + +# trap SIGHUP (1), SIGINT (2), SIGPIPE (13), SIGTERM (15) +for sig in 1 2 13 15; do + trap ' + $ECHO "" + $ECHO "Aborting $NAME_OF_AUTOGEN: caught signal '$sig'" + + # start from the root + if test -d "$START_PATH" ; then + cd "$START_PATH" + fi + + # clean up on abnormal exit + $VERBOSE_ECHO "rm -rf autom4te.cache" + rm -rf autom4te.cache + + if test -f "acinclude.m4.$$.backup" ; then + $VERBOSE_ECHO "cat acinclude.m4.$$.backup > acinclude.m4" + chmod u+w acinclude.m4 + cat acinclude.m4.$$.backup > acinclude.m4 + + $VERBOSE_ECHO "rm -f acinclude.m4.$$.backup" + rm -f acinclude.m4.$$.backup + fi + + { (exit 1); exit 1; } +' $sig +done + + +############################# +# look for a configure file # +############################# +if [ "x$CONFIGURE" = "x" ] ; then + CONFIGURE="`locate_configure_template`" + if [ ! "x$CONFIGURE" = "x" ] ; then + $VERBOSE_ECHO "Found a configure template: $CONFIGURE" + fi +else + $ECHO "Using CONFIGURE environment variable override: $CONFIGURE" +fi +if [ "x$CONFIGURE" = "x" ] ; then + if [ "x$VERSION_ONLY" = "xyes" ] ; then + CONFIGURE=/dev/null + else + $ECHO + $ECHO "A configure.ac or configure.in file could not be located implying" + $ECHO "that the GNU Build System is at least not used in this directory. In" + $ECHO "any case, there is nothing to do here without one of those files." + $ECHO + $ECHO "ERROR: No configure.in or configure.ac file found in `pwd`" + exit 1 + fi +fi + +#################### +# get project name # +#################### +if [ "x$PROJECT" = "x" ] ; then + PROJECT="`grep AC_INIT $CONFIGURE | grep -v '.*#.*AC_INIT' | tail -${TAIL_N}1 | sed 's/^[ ]*AC_INIT(\([^,)]*\).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + if [ "x$PROJECT" = "xAC_INIT" ] ; then + # projects might be using the older/deprecated arg-less AC_INIT .. look for AM_INIT_AUTOMAKE instead + PROJECT="`grep AM_INIT_AUTOMAKE $CONFIGURE | grep -v '.*#.*AM_INIT_AUTOMAKE' | tail -${TAIL_N}1 | sed 's/^[ ]*AM_INIT_AUTOMAKE(\([^,)]*\).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + fi + if [ "x$PROJECT" = "xAM_INIT_AUTOMAKE" ] ; then + PROJECT="project" + fi + if [ "x$PROJECT" = "x" ] ; then + PROJECT="project" + fi +else + $ECHO "Using PROJECT environment variable override: $PROJECT" +fi +$ECHO "Preparing the $PROJECT build system...please wait" +$ECHO + + +######################## +# check for autoreconf # +######################## +HAVE_AUTORECONF=no +if [ "x$AUTORECONF" = "x" ] ; then + for AUTORECONF in autoreconf ; do + $VERBOSE_ECHO "Checking autoreconf version: $AUTORECONF --version" + $AUTORECONF --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + HAVE_AUTORECONF=yes + break + fi + done +else + HAVE_AUTORECONF=yes + $ECHO "Using AUTORECONF environment variable override: $AUTORECONF" +fi + + +########################## +# autoconf version check # +########################## +_acfound=no +if [ "x$AUTOCONF" = "x" ] ; then + for AUTOCONF in autoconf ; do + $VERBOSE_ECHO "Checking autoconf version: $AUTOCONF --version" + $AUTOCONF --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + _acfound=yes + break + fi + done +else + _acfound=yes + $ECHO "Using AUTOCONF environment variable override: $AUTOCONF" +fi + +_report_error=no +if [ ! "x$_acfound" = "xyes" ] ; then + $ECHO "ERROR: Unable to locate GNU Autoconf." + _report_error=yes +else + _version="`$AUTOCONF --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`" + if [ "x$_version" = "x" ] ; then + _version="0.0.0" + fi + $ECHO "Found GNU Autoconf version $_version" + version_check "$AUTOCONF_VERSION" "$_version" + if [ $? -ne 0 ] ; then + _report_error=yes + fi +fi +if [ "x$_report_error" = "xyes" ] ; then + version_error "$AUTOCONF_VERSION" "GNU Autoconf" + exit 1 +fi + + +########################## +# automake version check # +########################## +_amfound=no +if [ "x$AUTOMAKE" = "x" ] ; then + for AUTOMAKE in automake ; do + $VERBOSE_ECHO "Checking automake version: $AUTOMAKE --version" + $AUTOMAKE --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + _amfound=yes + break + fi + done +else + _amfound=yes + $ECHO "Using AUTOMAKE environment variable override: $AUTOMAKE" +fi + + +_report_error=no +if [ ! "x$_amfound" = "xyes" ] ; then + $ECHO + $ECHO "ERROR: Unable to locate GNU Automake." + _report_error=yes +else + _version="`$AUTOMAKE --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`" + if [ "x$_version" = "x" ] ; then + _version="0.0.0" + fi + $ECHO "Found GNU Automake version $_version" + version_check "$AUTOMAKE_VERSION" "$_version" + if [ $? -ne 0 ] ; then + _report_error=yes + fi +fi +if [ "x$_report_error" = "xyes" ] ; then + version_error "$AUTOMAKE_VERSION" "GNU Automake" + exit 1 +fi + + +######################## +# check for libtoolize # +######################## +HAVE_LIBTOOLIZE=yes +HAVE_ALT_LIBTOOLIZE=no +_ltfound=no +if [ "x$LIBTOOLIZE" = "x" ] ; then + LIBTOOLIZE=libtoolize + $VERBOSE_ECHO "Checking libtoolize version: $LIBTOOLIZE --version" + $LIBTOOLIZE --version > /dev/null 2>&1 + if [ ! $? = 0 ] ; then + HAVE_LIBTOOLIZE=no + $ECHO + if [ "x$HAVE_AUTORECONF" = "xno" ] ; then + $ECHO "Warning: libtoolize does not appear to be available." + else + $ECHO "Warning: libtoolize does not appear to be available. This means that" + $ECHO "the automatic build preparation via autoreconf will probably not work." + $ECHO "Preparing the build by running each step individually, however, should" + $ECHO "work and will be done automatically for you if autoreconf fails." + fi + + # look for some alternates + for tool in glibtoolize libtoolize15 libtoolize14 libtoolize13 ; do + $VERBOSE_ECHO "Checking libtoolize alternate: $tool --version" + _glibtoolize="`$tool --version > /dev/null 2>&1`" + if [ $? = 0 ] ; then + $VERBOSE_ECHO "Found $tool --version" + _glti="`which $tool`" + if [ "x$_glti" = "x" ] ; then + $VERBOSE_ECHO "Cannot find $tool with which" + continue; + fi + if test ! -f "$_glti" ; then + $VERBOSE_ECHO "Cannot use $tool, $_glti is not a file" + continue; + fi + _gltidir="`dirname $_glti`" + if [ "x$_gltidir" = "x" ] ; then + $VERBOSE_ECHO "Cannot find $tool path with dirname of $_glti" + continue; + fi + if test ! -d "$_gltidir" ; then + $VERBOSE_ECHO "Cannot use $tool, $_gltidir is not a directory" + continue; + fi + HAVE_ALT_LIBTOOLIZE=yes + LIBTOOLIZE="$tool" + $ECHO + $ECHO "Fortunately, $tool was found which means that your system may simply" + $ECHO "have a non-standard or incomplete GNU Autotools install. If you have" + $ECHO "sufficient system access, it may be possible to quell this warning by" + $ECHO "running:" + $ECHO + sudo -V > /dev/null 2>&1 + if [ $? = 0 ] ; then + $ECHO " sudo ln -s $_glti $_gltidir/libtoolize" + $ECHO + else + $ECHO " ln -s $_glti $_gltidir/libtoolize" + $ECHO + $ECHO "Run that as root or with proper permissions to the $_gltidir directory" + $ECHO + fi + _ltfound=yes + break + fi + done + else + _ltfound=yes + fi +else + _ltfound=yes + $ECHO "Using LIBTOOLIZE environment variable override: $LIBTOOLIZE" +fi + + +############################ +# libtoolize version check # +############################ +_report_error=no +if [ ! "x$_ltfound" = "xyes" ] ; then + $ECHO + $ECHO "ERROR: Unable to locate GNU Libtool." + _report_error=yes +else + _version="`$LIBTOOLIZE --version | head -${HEAD_N}1 | sed 's/[^0-9]*\([0-9\.][0-9\.]*\)/\1/'`" + if [ "x$_version" = "x" ] ; then + _version="0.0.0" + fi + $ECHO "Found GNU Libtool version $_version" + version_check "$LIBTOOL_VERSION" "$_version" + if [ $? -ne 0 ] ; then + _report_error=yes + fi +fi +if [ "x$_report_error" = "xyes" ] ; then + version_error "$LIBTOOL_VERSION" "GNU Libtool" + exit 1 +fi + + +##################### +# check for aclocal # +##################### +if [ "x$ACLOCAL" = "x" ] ; then + for ACLOCAL in aclocal ; do + $VERBOSE_ECHO "Checking aclocal version: $ACLOCAL --version" + $ACLOCAL --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + break + fi + done +else + $ECHO "Using ACLOCAL environment variable override: $ACLOCAL" +fi + +export ACLOCAL="$ACLOCAL -I mk/autoconf" + + +######################## +# check for autoheader # +######################## +if [ "x$AUTOHEADER" = "x" ] ; then + for AUTOHEADER in autoheader ; do + $VERBOSE_ECHO "Checking autoheader version: $AUTOHEADER --version" + $AUTOHEADER --version > /dev/null 2>&1 + if [ $? = 0 ] ; then + break + fi + done +else + $ECHO "Using AUTOHEADER environment variable override: $AUTOHEADER" +fi + + +######################### +# check if version only # +######################### +$VERBOSE_ECHO "Checking whether to only output version information" +if [ "x$VERSION_ONLY" = "xyes" ] ; then + $ECHO + ident + $ECHO "---" + $ECHO "Version requested. No preparation or configuration will be performed." + exit 0 +fi + + +################################# +# PROTECT_FROM_CLOBBER FUNCTION # +################################# +protect_from_clobber ( ) { + PFC_INIT=1 + + # protect COPYING & INSTALL from overwrite by automake. the + # automake force option will (inappropriately) ignore the existing + # contents of a COPYING and/or INSTALL files (depending on the + # version) instead of just forcing *missing* files like it does + # for AUTHORS, NEWS, and README. this is broken but extremely + # prevalent behavior, so we protect against it by keeping a backup + # of the file that can later be restored. + + for file in COPYING INSTALL ; do + if test -f ${file} ; then + if test -f ${file}.$$.protect_from_automake.backup ; then + $VERBOSE_ECHO "Already backed up ${file} in `pwd`" + else + $VERBOSE_ECHO "Backing up ${file} in `pwd`" + $VERBOSE_ECHO "cp -p ${file} ${file}.$$.protect_from_automake.backup" + cp -p ${file} ${file}.$$.protect_from_automake.backup + fi + fi + done +} + + +############################## +# RECURSIVE_PROTECT FUNCTION # +############################## +recursive_protect ( ) { + + # for projects using recursive configure, run the build + # preparation steps for the subdirectories. this function assumes + # START_PATH was set to pwd before recursion begins so that + # relative paths work. + + # git 'r done, protect COPYING and INSTALL from being clobbered + protect_from_clobber + + if test -d autom4te.cache ; then + $VERBOSE_ECHO "Found an autom4te.cache directory, deleting it" + $VERBOSE_ECHO "rm -rf autom4te.cache" + rm -rf autom4te.cache + fi + + # find configure template + _configure="`locate_configure_template`" + if [ "x$_configure" = "x" ] ; then + return + fi + # $VERBOSE_ECHO "Looking for configure template found `pwd`/$_configure" + + # look for subdirs + # $VERBOSE_ECHO "Looking for subdirs in `pwd`" + _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $_configure | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ ]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + CHECK_DIRS="" + for dir in $_det_config_subdirs ; do + if test -d "`pwd`/$dir" ; then + CHECK_DIRS="$CHECK_DIRS \"`pwd`/$dir\"" + fi + done + + # process subdirs + if [ ! "x$CHECK_DIRS" = "x" ] ; then + $VERBOSE_ECHO "Recursively scanning the following directories:" + $VERBOSE_ECHO " $CHECK_DIRS" + for dir in $CHECK_DIRS ; do + $VERBOSE_ECHO "Protecting files from automake in $dir" + cd "$START_PATH" + eval "cd $dir" + + # recursively git 'r done + recursive_protect + done + fi +} # end of recursive_protect + + +############################# +# RESTORE_CLOBBERED FUNCION # +############################# +restore_clobbered ( ) { + + # The automake (and autoreconf by extension) -f/--force-missing + # option may overwrite COPYING and INSTALL even if they do exist. + # Here we restore the files if necessary. + + spacer=no + + for file in COPYING INSTALL ; do + if test -f ${file}.$$.protect_from_automake.backup ; then + if test -f ${file} ; then + # compare entire content, restore if needed + if test "x`cat ${file}`" != "x`cat ${file}.$$.protect_from_automake.backup`" ; then + if test "x$spacer" = "xno" ; then + $VERBOSE_ECHO + spacer=yes + fi + # restore the backup + $VERBOSE_ECHO "Restoring ${file} from backup (automake -f likely clobbered it)" + $VERBOSE_ECHO "rm -f ${file}" + rm -f ${file} + $VERBOSE_ECHO "mv ${file}.$$.protect_from_automake.backup ${file}" + mv ${file}.$$.protect_from_automake.backup ${file} + fi # check contents + elif test -f ${file}.$$.protect_from_automake.backup ; then + $VERBOSE_ECHO "mv ${file}.$$.protect_from_automake.backup ${file}" + mv ${file}.$$.protect_from_automake.backup ${file} + fi # -f ${file} + + # just in case + $VERBOSE_ECHO "rm -f ${file}.$$.protect_from_automake.backup" + rm -f ${file}.$$.protect_from_automake.backup + fi # -f ${file}.$$.protect_from_automake.backup + done + + CONFIGURE="`locate_configure_template`" + if [ "x$CONFIGURE" = "x" ] ; then + return + fi + + _aux_dir="`grep AC_CONFIG_AUX_DIR $CONFIGURE | grep -v '.*#.*AC_CONFIG_AUX_DIR' | tail -${TAIL_N}1 | sed 's/^[ ]*AC_CONFIG_AUX_DIR(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + if test ! -d "$_aux_dir" ; then + _aux_dir=. + fi + + for file in config.guess config.sub ltmain.sh ; do + if test -f "${_aux_dir}/${file}" ; then + $VERBOSE_ECHO "rm -f \"${_aux_dir}/${file}.backup\"" + rm -f "${_aux_dir}/${file}.backup" + fi + done +} # end of restore_clobbered + + +############################## +# RECURSIVE_RESTORE FUNCTION # +############################## +recursive_restore ( ) { + + # restore COPYING and INSTALL from backup if they were clobbered + # for each directory recursively. + + # git 'r undone + restore_clobbered + + # find configure template + _configure="`locate_configure_template`" + if [ "x$_configure" = "x" ] ; then + return + fi + + # look for subdirs + _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $_configure | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ ]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + CHECK_DIRS="" + for dir in $_det_config_subdirs ; do + if test -d "`pwd`/$dir" ; then + CHECK_DIRS="$CHECK_DIRS \"`pwd`/$dir\"" + fi + done + + # process subdirs + if [ ! "x$CHECK_DIRS" = "x" ] ; then + $VERBOSE_ECHO "Recursively scanning the following directories:" + $VERBOSE_ECHO " $CHECK_DIRS" + for dir in $CHECK_DIRS ; do + $VERBOSE_ECHO "Checking files for automake damage in $dir" + cd "$START_PATH" + eval "cd $dir" + + # recursively git 'r undone + recursive_restore + done + fi +} # end of recursive_restore + + +####################### +# INITIALIZE FUNCTION # +####################### +initialize ( ) { + + # this routine performs a variety of directory-specific + # initializations. some are sanity checks, some are preventive, + # and some are necessary setup detection. + # + # this function sets: + # CONFIGURE + # SEARCH_DIRS + # CONFIG_SUBDIRS + + ################################## + # check for a configure template # + ################################## + CONFIGURE="`locate_configure_template`" + if [ "x$CONFIGURE" = "x" ] ; then + $ECHO + $ECHO "A configure.ac or configure.in file could not be located implying" + $ECHO "that the GNU Build System is at least not used in this directory. In" + $ECHO "any case, there is nothing to do here without one of those files." + $ECHO + $ECHO "ERROR: No configure.in or configure.ac file found in `pwd`" + exit 1 + fi + + ##################### + # detect an aux dir # + ##################### + _aux_dir="`grep AC_CONFIG_AUX_DIR $CONFIGURE | grep -v '.*#.*AC_CONFIG_AUX_DIR' | tail -${TAIL_N}1 | sed 's/^[ ]*AC_CONFIG_AUX_DIR(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + if test ! -d "$_aux_dir" ; then + _aux_dir=. + else + $VERBOSE_ECHO "Detected auxillary directory: $_aux_dir" + fi + + ################################ + # detect a recursive configure # + ################################ + CONFIG_SUBDIRS="" + _det_config_subdirs="`grep AC_CONFIG_SUBDIRS $CONFIGURE | grep -v '.*#.*AC_CONFIG_SUBDIRS' | sed 's/^[ ]*AC_CONFIG_SUBDIRS(\(.*\)).*/\1/' | sed 's/.*\[\(.*\)\].*/\1/'`" + for dir in $_det_config_subdirs ; do + if test -d "`pwd`/$dir" ; then + $VERBOSE_ECHO "Detected recursive configure directory: `pwd`/$dir" + CONFIG_SUBDIRS="$CONFIG_SUBDIRS `pwd`/$dir" + fi + done + + ########################################################### + # make sure certain required files exist for GNU projects # + ########################################################### + _marker_found="" + _marker_found_message_intro='Detected non-GNU marker "' + _marker_found_message_mid='" in ' + for marker in foreign cygnus ; do + _marker_found_message=${_marker_found_message_intro}${marker}${_marker_found_message_mid} + _marker_found="`grep 'AM_INIT_AUTOMAKE.*'${marker} $CONFIGURE`" + if [ ! "x$_marker_found" = "x" ] ; then + $VERBOSE_ECHO "${_marker_found_message}`basename \"$CONFIGURE\"`" + break + fi + if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then + _marker_found="`grep 'AUTOMAKE_OPTIONS.*'${marker} Makefile.am`" + if [ ! "x$_marker_found" = "x" ] ; then + $VERBOSE_ECHO "${_marker_found_message}Makefile.am" + break + fi + fi + done + if [ "x${_marker_found}" = "x" ] ; then + _suggest_foreign=no + for file in AUTHORS COPYING ChangeLog INSTALL NEWS README ; do + if [ ! -f $file ] ; then + $VERBOSE_ECHO "Touching ${file} since it does not exist" + _suggest_foreign=yes + touch $file + fi + done + + if [ "x${_suggest_foreign}" = "xyes" ] ; then + $ECHO + $ECHO "Warning: Several files expected of projects that conform to the GNU" + $ECHO "coding standards were not found. The files were automatically added" + $ECHO "for you since you do not have a 'foreign' declaration specified." + $ECHO + $ECHO "Considered adding 'foreign' to AM_INIT_AUTOMAKE in `basename \"$CONFIGURE\"`" + if test -f "`dirname \"$CONFIGURE\"/Makefile.am`" ; then + $ECHO "or to AUTOMAKE_OPTIONS in your top-level Makefile.am file." + fi + $ECHO + fi + fi + + ################################################## + # make sure certain generated files do not exist # + ################################################## + for file in config.guess config.sub ltmain.sh ; do + if test -f "${_aux_dir}/${file}" ; then + $VERBOSE_ECHO "mv -f \"${_aux_dir}/${file}\" \"${_aux_dir}/${file}.backup\"" + mv -f "${_aux_dir}/${file}" "${_aux_dir}/${file}.backup" + fi + done + + ############################ + # search alternate m4 dirs # + ############################ + SEARCH_DIRS="" + for dir in m4 ; do + if [ -d $dir ] ; then + $VERBOSE_ECHO "Found extra aclocal search directory: $dir" + SEARCH_DIRS="$SEARCH_DIRS -I $dir" + fi + done + + ###################################### + # remove any previous build products # + ###################################### + if test -d autom4te.cache ; then + $VERBOSE_ECHO "Found an autom4te.cache directory, deleting it" + $VERBOSE_ECHO "rm -rf autom4te.cache" + rm -rf autom4te.cache + fi +# tcl/tk (and probably others) have a customized aclocal.m4, so can't delete it +# if test -f aclocal.m4 ; then +# $VERBOSE_ECHO "Found an aclocal.m4 file, deleting it" +# $VERBOSE_ECHO "rm -f aclocal.m4" +# rm -f aclocal.m4 +# fi + +} # end of initialize() + + +############## +# initialize # +############## + +# stash path +START_PATH="`pwd`" + +# Before running autoreconf or manual steps, some prep detection work +# is necessary or useful. Only needs to occur once per directory, but +# does need to traverse the entire subconfigure hierarchy to protect +# files from being clobbered even by autoreconf. +recursive_protect + +# start from where we started +cd "$START_PATH" + +# get ready to process +initialize + + +######################################### +# DOWNLOAD_GNULIB_CONFIG_GUESS FUNCTION # +######################################### + +# TODO - should make sure wget/curl exist and/or work before trying to +# use them. + +download_gnulib_config_guess () { + # abuse gitweb to download gnulib's latest config.guess via HTTP + config_guess_temp="config.guess.$$.download" + ret=1 + for __cmd in wget curl fetch ; do + $VERBOSE_ECHO "Checking for command ${__cmd}" + ${__cmd} --version > /dev/null 2>&1 + ret=$? + if [ ! $ret = 0 ] ; then + continue + fi + + __cmd_version=`${__cmd} --version | head -n 1 | sed -e 's/^[^0-9]\+//' -e 's/ .*//'` + $VERBOSE_ECHO "Found ${__cmd} ${__cmd_version}" + + opts="" + case ${__cmd} in + wget) + opts="-O" + ;; + curl) + opts="-o" + ;; + fetch) + opts="-t 5 -f" + ;; + esac + + $VERBOSE_ECHO "Running $__cmd \"${CONFIG_GUESS_URL}\" $opts \"${config_guess_temp}\"" + eval "$__cmd \"${CONFIG_GUESS_URL}\" $opts \"${config_guess_temp}\"" > /dev/null 2>&1 + if [ $? = 0 ] ; then + mv -f "${config_guess_temp}" ${_aux_dir}/config.guess + ret=0 + break + fi + done + + if [ ! $ret = 0 ] ; then + $ECHO "Warning: config.guess download failed from: $CONFIG_GUESS_URL" + rm -f "${config_guess_temp}" + fi +} + + +############################## +# LIBTOOLIZE_NEEDED FUNCTION # +############################## +libtoolize_needed () { + ret=1 # means no, don't need libtoolize + for feature in AC_PROG_LIBTOOL AM_PROG_LIBTOOL LT_INIT ; do + $VERBOSE_ECHO "Searching for $feature in $CONFIGURE" + found="`grep \"^$feature.*\" $CONFIGURE`" + if [ ! "x$found" = "x" ] ; then + ret=0 # means yes, need to run libtoolize + break + fi + done + return ${ret} +} + + + +############################################ +# prepare build via autoreconf or manually # +############################################ +reconfigure_manually=no +if [ "x$HAVE_AUTORECONF" = "xyes" ] ; then + $ECHO + $ECHO $ECHO_N "Automatically preparing build ... $ECHO_C" + + $VERBOSE_ECHO "$AUTORECONF -v $SEARCH_DIRS $AUTORECONF_OPTIONS" + autoreconf_output="`$AUTORECONF -v $SEARCH_DIRS $AUTORECONF_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$autoreconf_output" + + if [ ! $ret = 0 ] ; then + if [ "x$HAVE_ALT_LIBTOOLIZE" = "xyes" ] ; then + if [ ! "x`echo \"$autoreconf_output\" | grep libtoolize | grep \"No such file or directory\"`" = "x" ] ; then + $ECHO + $ECHO "Warning: autoreconf failed but due to what is usually a common libtool" + $ECHO "misconfiguration issue. This problem is encountered on systems that" + $ECHO "have installed libtoolize under a different name without providing a" + $ECHO "symbolic link or without setting the LIBTOOLIZE environment variable." + $ECHO + $ECHO "Restarting the preparation steps with LIBTOOLIZE set to $LIBTOOLIZE" + + export LIBTOOLIZE + RUN_RECURSIVE=no + export RUN_RECURSIVE + untrap_abnormal + + $VERBOSE_ECHO sh $AUTOGEN_SH "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" + sh "$AUTOGEN_SH" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" + exit $? + fi + fi + + $ECHO "Warning: $AUTORECONF failed" + + if test -f ltmain.sh ; then + $ECHO "libtoolize being run by autoreconf is not creating ltmain.sh in the auxillary directory like it should" + fi + + $ECHO "Attempting to run the preparation steps individually" + reconfigure_manually=yes + else + if [ "x$DOWNLOAD" = "xyes" ] ; then + if libtoolize_needed ; then + download_gnulib_config_guess + fi + fi + fi +else + reconfigure_manually=yes +fi + + +############################ +# LIBTOOL_FAILURE FUNCTION # +############################ +libtool_failure ( ) { + + # libtool is rather error-prone in comparison to the other + # autotools and this routine attempts to compensate for some + # common failures. the output after a libtoolize failure is + # parsed for an error related to AC_PROG_LIBTOOL and if found, we + # attempt to inject a project-provided libtool.m4 file. + + _autoconf_output="$1" + + if [ "x$RUN_RECURSIVE" = "xno" ] ; then + # we already tried the libtool.m4, don't try again + return 1 + fi + + if test -f "$LIBTOOL_M4" ; then + found_libtool="`$ECHO $_autoconf_output | grep AC_PROG_LIBTOOL`" + if test ! "x$found_libtool" = "x" ; then + if test -f acinclude.m4 ; then + rm -f acinclude.m4.$$.backup + $VERBOSE_ECHO "cat acinclude.m4 > acinclude.m4.$$.backup" + cat acinclude.m4 > acinclude.m4.$$.backup + fi + $VERBOSE_ECHO "cat \"$LIBTOOL_M4\" >> acinclude.m4" + chmod u+w acinclude.m4 + cat "$LIBTOOL_M4" >> acinclude.m4 + + # don't keep doing this + RUN_RECURSIVE=no + export RUN_RECURSIVE + untrap_abnormal + + $ECHO + $ECHO "Restarting the preparation steps with libtool macros in acinclude.m4" + $VERBOSE_ECHO sh $AUTOGEN_SH "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" + sh "$AUTOGEN_SH" "$1" "$2" "$3" "$4" "$5" "$6" "$7" "$8" "$9" + exit $? + fi + fi +} + + +########################### +# MANUAL_AUTOGEN FUNCTION # +########################### +manual_autogen ( ) { + + ################################################## + # Manual preparation steps taken are as follows: # + # aclocal [-I m4] # + # libtoolize --automake -c -f # + # aclocal [-I m4] # + # autoconf -f # + # autoheader # + # automake -a -c -f # + ################################################## + + ########### + # aclocal # + ########### + $VERBOSE_ECHO "$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS" + aclocal_output="`$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$aclocal_output" + if [ ! $ret = 0 ] ; then $ECHO "ERROR: $ACLOCAL failed" && exit 2 ; fi + + ############## + # libtoolize # + ############## + if libtoolize_needed ; then + if [ "x$HAVE_LIBTOOLIZE" = "xyes" ] ; then + $VERBOSE_ECHO "$LIBTOOLIZE $LIBTOOLIZE_OPTIONS" + libtoolize_output="`$LIBTOOLIZE $LIBTOOLIZE_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$libtoolize_output" + + if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi + else + if [ "x$HAVE_ALT_LIBTOOLIZE" = "xyes" ] ; then + $VERBOSE_ECHO "$LIBTOOLIZE $ALT_LIBTOOLIZE_OPTIONS" + libtoolize_output="`$LIBTOOLIZE $ALT_LIBTOOLIZE_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$libtoolize_output" + + if [ ! $ret = 0 ] ; then $ECHO "ERROR: $LIBTOOLIZE failed" && exit 2 ; fi + fi + fi + + ########### + # aclocal # + ########### + # re-run again as instructed by libtoolize + $VERBOSE_ECHO "$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS" + aclocal_output="`$ACLOCAL $SEARCH_DIRS $ACLOCAL_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$aclocal_output" + + # libtoolize might put ltmain.sh in the wrong place + if test -f ltmain.sh ; then + if test ! -f "${_aux_dir}/ltmain.sh" ; then + $ECHO + $ECHO "Warning: $LIBTOOLIZE is creating ltmain.sh in the wrong directory" + $ECHO + $ECHO "Fortunately, the problem can be worked around by simply copying the" + $ECHO "file to the appropriate location (${_aux_dir}/). This has been done for you." + $ECHO + $VERBOSE_ECHO "cp -p ltmain.sh \"${_aux_dir}/ltmain.sh\"" + cp -p ltmain.sh "${_aux_dir}/ltmain.sh" + $ECHO $ECHO_N "Continuing build preparation ... $ECHO_C" + fi + fi # ltmain.sh + + if [ "x$DOWNLOAD" = "xyes" ] ; then + download_gnulib_config_guess + fi + fi # libtoolize_needed + + ############ + # autoconf # + ############ + $VERBOSE_ECHO + $VERBOSE_ECHO "$AUTOCONF $AUTOCONF_OPTIONS" + autoconf_output="`$AUTOCONF $AUTOCONF_OPTIONS 2>&1`" + ret=$? + $VERBOSE_ECHO "$autoconf_output" + + if [ ! $ret = 0 ] ; then + # retry without the -f and check for usage of macros that are too new + ac2_59_macros="AC_C_RESTRICT AC_INCLUDES_DEFAULT AC_LANG_ASSERT AC_LANG_WERROR AS_SET_CATFILE" + ac2_55_macros="AC_COMPILER_IFELSE AC_FUNC_MBRTOWC AC_HEADER_STDBOOL AC_LANG_CONFTEST AC_LANG_SOURCE AC_LANG_PROGRAM AC_LANG_CALL AC_LANG_FUNC_TRY_LINK AC_MSG_FAILURE AC_PREPROC_IFELSE" + ac2_54_macros="AC_C_BACKSLASH_A AC_CONFIG_LIBOBJ_DIR AC_GNU_SOURCE AC_PROG_EGREP AC_PROG_FGREP AC_REPLACE_FNMATCH AC_FUNC_FNMATCH_GNU AC_FUNC_REALLOC AC_TYPE_MBSTATE_T" + + macros_to_search="" + ac_major="`echo ${AUTOCONF_VERSION}. | cut -d. -f1 | sed 's/[^0-9]//g'`" + ac_minor="`echo ${AUTOCONF_VERSION}. | cut -d. -f2 | sed 's/[^0-9]//g'`" + + if [ $ac_major -lt 2 ] ; then + macros_to_search="$ac2_59_macros $ac2_55_macros $ac2_54_macros" + else + if [ $ac_minor -lt 54 ] ; then + macros_to_search="$ac2_59_macros $ac2_55_macros $ac2_54_macros" + elif [ $ac_minor -lt 55 ] ; then + macros_to_search="$ac2_59_macros $ac2_55_macros" + elif [ $ac_minor -lt 59 ] ; then + macros_to_search="$ac2_59_macros" + fi + fi + + configure_ac_macros=__none__ + for feature in $macros_to_search ; do + $VERBOSE_ECHO "Searching for $feature in $CONFIGURE" + found="`grep \"^$feature.*\" $CONFIGURE`" + if [ ! "x$found" = "x" ] ; then + if [ "x$configure_ac_macros" = "x__none__" ] ; then + configure_ac_macros="$feature" + else + configure_ac_macros="$feature $configure_ac_macros" + fi + fi + done + if [ ! "x$configure_ac_macros" = "x__none__" ] ; then + $ECHO + $ECHO "Warning: Unsupported macros were found in $CONFIGURE" + $ECHO + $ECHO "The `basename \"$CONFIGURE\"` file was scanned in order to determine if any" + $ECHO "unsupported macros are used that exceed the minimum version" + $ECHO "settings specified within this file. As such, the following macros" + $ECHO "should be removed from configure.ac or the version numbers in this" + $ECHO "file should be increased:" + $ECHO + $ECHO "$configure_ac_macros" + $ECHO + $ECHO $ECHO_N "Ignorantly continuing build preparation ... $ECHO_C" + fi + + ################### + # autoconf, retry # + ################### + $VERBOSE_ECHO + $VERBOSE_ECHO "$AUTOCONF" + autoconf_output="`$AUTOCONF 2>&1`" + ret=$? + $VERBOSE_ECHO "$autoconf_output" + + if [ ! $ret = 0 ] ; then + # test if libtool is busted + libtool_failure "$autoconf_output" + + # let the user know what went wrong + cat < + +6) Start C::B, open ElectricSheep.workspace, build 'Client'-project using 'Debug Win32' target. \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/Build_guides/Windows_VisualStudio.txt electricsheep-3.0.2-git20180325/Build_guides/Windows_VisualStudio.txt --- electricsheep-2.7~b12+svn20091224/Build_guides/Windows_VisualStudio.txt 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Build_guides/Windows_VisualStudio.txt 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,64 @@ +Install Git. +Download project: git clone https://github.com/scottdraves/electricsheep.git +Copy folder electricsheep to c:\esmsvc + +Install Microsoft DirectX SDK (June 2010) +Install MSVC 2015 Express + +Download wxWidgets-3.0.3 source. Unpack to c:\wxwidgets + +Modify .vcproj files to use /MT and /MTd instead of default /MD and /MDd (open C:\wxWidgets\build\msw\wx_vc12.sln, select all projects and modify) + +use C:\wxWidgets\build\msw\wx_vc12.sln to build unicode release and unicode debug targets. + +Copy wxzlib.lib and wxzlibd.lib from C:\wxWidgets\lib\vc_lib to c:\wxwidgets\src\zlib to build libcurl later. + +Download boost 1.64.0 +open vcvars from start menu (visual studio 2015 command prompt) +cd c:\boost_1_64_0 +Run bootstrap.bat to build bjam +Run bjam full build - requires ~5GB of space: +bjam --build-type=complete stage + +Download libcurl curl-7.52.1.zip from https://curl.haxx.se/download/ and unpack it to folder c:\esmsvc\curl + +Edit file c:\esmsvc\curl\lib\makefile.vc14: +ZLIBLIBS = zlib.lib +replace with: +ZLIBLIBS = wxzlib.lib +ZLIBLIBSD = wxzlibd.lib + +Modify target debug-ssl-zlib to use ZLIBLIBSD + +Download openssl-1.0.2k source. Unpack to c:\esmsvc\openssl-1.0.2k +Download nasm-2.13. Unpack nasm.exe to c:\esmsvc\openssl-1.0.2k +Install Perl + +Use visual studio 2015 command prompt and go to folder c:\esmsvc\openssl-1.0.2k: +perl Configure VC-WIN32 --prefix=C:\esmsvc\openssl-1.0.2k + +ms\do_nasm +nmake -f ms\nt.mak + +Use visual studio 2015 command prompt and go to folder c:\esmsvc\curl\lib then type: + +set ZLIB_PATH=c:\wxwidgets\src\zlib +set OPENSSL_PATH=c:\esmsvc\openssl-1.0.2k +nmake -f makefile.vc14 CFG=release-ssl-zlib RTLIBCFG=static +nmake -f makefile.vc14 CFG=debug-ssl-zlib RTLIBCFG=static + +Build lua's lib using C:\esmsvc\lua5.1\mak.vs2005\lua5.1.sln (only static lib!) + +Open tinyxml using C:\esmsvc\tinyXml\tinyxml.sln +For debug version exchange output name: ( general->Target Name: $(ProjectName)->$(ProjectName)d ) +Build tinyxml release and debug targets + +Download Dev and Shared FFmpeg's binaries for Windows from https://ffmpeg.zeranoe.com/builds/ +Create folder c:\esmsvc\ffmpeg\ffmpeg-static +Unpack Dev and copy include and lib folders to c:\esmsvc\ffmpeg\ffmpeg-static +Unpack Shared and copy dll to C:\esmsvc\MSVC\Debug and C:\esmsvc\RuntimeMSVC + +Now you can build C:\esmsvc\MSVC\electricsheep.sln (main program) and/or C:\esmsvc\MSVC\SettingsGUI\SettingsGUI.sln (settings gui) + +Install NSIS from http://nsis.sourceforge.net + plugin AccessControl +Using installer from C:\esmsvc\InstallerMSVC will build installer package, after you copy appropriate files from DirectX SDK redist folder Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/Client/app.ico and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/Client/app.ico differ diff -Nru electricsheep-2.7~b12+svn20091224/Client/client.cbp electricsheep-3.0.2-git20180325/Client/client.cbp --- electricsheep-2.7~b12+svn20091224/Client/client.cbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/client.cbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,311 @@ + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/Client/client.h electricsheep-3.0.2-git20180325/Client/client.h --- electricsheep-2.7~b12+svn20091224/Client/client.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/client.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,1105 @@ +#ifndef CLIENT_H_INCLUDED +#define CLIENT_H_INCLUDED + +#include +#include +#include +#include "base.h" +#include "Exception.h" +#include "Log.h" +#include "Player.h" +#include "storage.h" +#include "Networking.h" +#include "Settings.h" +#include "clientversion.h" + +#include "ContentDownloader.h" +#include "SheepGenerator.h" +#include "Shepherd.h" +#include "Voting.h" +#include "Timer.h" +#include "TextureFlat.h" +#include "Hud.h" +#include "Splash.h" +#include "StatsConsole.h" +#include "ServerMessage.h" +#include "Matrix.h" +#include "CrossFade.h" +#include "StartupScreen.h" +#if defined(WIN32) && defined(_MSC_VER) +#include "../msvc/msvc_fix.h" +#include "../msvc/cpu_usage_win32.h" +#else +#if defined(LINUX_GNU) +#include +#include "cpu_usage_linux.h" +#else +#include "cpu_usage_mac.h" +#endif +#endif +/* + CElectricSheep(). + Prime mover for the client, used from main.cpp... +*/ +class CElectricSheep +{ + protected: + ESCpuUsage m_CpuUsage; + fp8 m_LastCPUCheckTime; + int m_CpuUsageTotal; + int m_CpuUsageES; + int m_HighCpuUsageCounter; + int m_CpuUsageThreshold; + bool m_MultipleInstancesMode; + bool m_bConfigMode; + bool m_SeamlessPlayback; + Base::CTimer m_Timer; + Base::CTimer m_F1F4Timer; + + Hud::spCHudManager m_HudManager; + Hud::spCStartupScreen m_StartupScreen; + + fp8 m_PNGDelayTimer; + + // The base framerate(from config). + fp8 m_PlayerFps; + + // Potentially adjusted framerate(from <- and -> keys) + fp8 m_CurrentFps; + + fp8 m_OriginalFps; + + // Voting object. + CVote *m_pVoter; + + // Default root directory, ie application data. + std::string m_AppData; + + // Default application working directory. + std::string m_WorkingDir; + + + // Splash images. + Hud::spCSplash m_spSplashPos; + Hud::spCSplash m_spSplashNeg; + + // Splash PNG + Hud::spCSplashImage m_spSplashPNG; + Base::CTimer m_SplashPNGDelayTimer; + int m_nSplashes; + std::string m_SplashFilename; + + Hud::spCCrossFade m_spCrossFade; + + std::deque m_ConnectionErrors; + + uint32 m_curPlayingID; + uint32 m_curPlayingGen; + uint64 m_lastPlayedSeconds; + +#ifdef DO_THREAD_UPDATE + boost::barrier* m_pUpdateBarrier; + + boost::thread_group *m_pUpdateThreads; + + boost::mutex m_BarrierMutex; +#endif + + + // Init tuplestorage. + bool InitStorage(bool _bReadOnly = false) + { + g_Log->Info( "InitStorage()" ); +#ifndef LINUX_GNU + if (g_Settings()->Init( m_AppData, m_WorkingDir, _bReadOnly ) == false) +#else + char appdata[PATH_MAX]; + snprintf( appdata, PATH_MAX, "%s/.electricsheep/", getenv("HOME") ); + if (g_Settings()->Init( appdata, SHAREDIR ) == false) +#endif + return false; + + // Trigger this to exist in the settings. +#ifndef LINUX_GNU + g_Settings()->Set( "settings.app.InstallDir", m_WorkingDir ); +#else + g_Settings()->Set( "settings.app.InstallDir", SHAREDIR ); +#endif + return true; + } + + // Attach log. + void AttachLog() + { + TupleStorage::IStorageInterface::CreateFullDirectory( m_AppData + "Logs/" ); + if (g_Settings()->Get( "settings.app.log", false )) + g_Log->Attach( m_AppData + "Logs/" ); + g_Log->Info( "AttachLog()" ); + + g_Log->Info( "******************* %s (Built %s / %s)...\n", CLIENT_VERSION_PRETTY, __DATE__,__TIME__ ); + } + + public: + CElectricSheep() + { + m_CpuUsageTotal = -1; + m_CpuUsageES = -1; + m_CpuUsageThreshold = 50; + m_HighCpuUsageCounter = 0; + m_bConfigMode = false; + m_MultipleInstancesMode = false; + printf( "CElectricSheep()\n" ); + + m_pVoter = NULL; +#ifndef LINUX_GNU + m_AppData = "./.ElectricSheep/"; + m_WorkingDir = "./"; +#else + m_AppData = std::string(getenv("HOME"))+"/.electricsheep/"; + m_WorkingDir = SHAREDIR; +#endif +#ifdef DO_THREAD_UPDATE + m_pUpdateBarrier = NULL; + m_pUpdateThreads = NULL; +#endif + } + + virtual ~CElectricSheep() + { + } + + // + virtual bool Startup() + { + m_CpuUsageThreshold = g_Settings()->Get( "settings.player.cpuusagethreshold", 50 ); + + if (m_MultipleInstancesMode == false) + { + g_NetworkManager->Startup(); + + // Set proxy info. + if( g_Settings()->Get( "settings.content.use_proxy", false ) ) + { + g_Log->Info( "Using proxy server..." ); + g_NetworkManager->Proxy( g_Settings()->Get( "settings.content.proxy", std::string("") ), + g_Settings()->Get( "settings.content.proxy_username", std::string("") ), + g_Settings()->Get( "settings.content.proxy_password", std::string("") ) ); + } + + //if some user has a legacy clear-text password, lets convert it to md5 one. (should we remove the old one ???) + if (g_Settings()->Get( "settings.content.password_md5", std::string("") ) == "") { + g_Settings()->Set( "settings.content.password_md5", ContentDownloader::Shepherd::computeMD5( g_Settings()->Get( "settings.content.password", std::string("") ) ) ); + //g_Settings()->Set( "settings.content.password", "" ); + } + + g_NetworkManager->Login( g_Settings()->Get( "settings.generator.nickname", std::string("") ), g_Settings()->Get( "settings.content.password_md5", std::string("") ) ); + + m_pVoter = new CVote(); + } + + g_Player().SetMultiDisplayMode( (CPlayer::MultiDisplayMode)g_Settings()->Get( "settings.player.MultiDisplayMode", 0 ) ); + + // Init the display and create decoder. + if( !g_Player().Startup() ) + return false; + +#ifdef DO_THREAD_UPDATE + CreateUpdateThreads(); +#endif + + m_curPlayingID = 0; + m_curPlayingGen = 0; + m_lastPlayedSeconds = 0; + + // Set framerate. + m_PlayerFps = g_Settings()->Get( "settings.player.player_fps", 20. ); + if ( m_PlayerFps < 0.1 ) + m_PlayerFps = 1.; + m_OriginalFps = m_PlayerFps; + m_CurrentFps = m_PlayerFps; + + g_Player().Framerate( m_CurrentFps ); + + + // Get hud font size. + std::string hudFontName = g_Settings()->Get( "settings.player.hudFontName", std::string("Trebuchet MS") ); + uint32 hudFontSize = static_cast(g_Settings()->Get( "settings.player.hudFontSize", 24 )); + + m_PNGDelayTimer = g_Settings()->Get( "settings.player.pngdelaytimer", 600); + + m_HudManager = new Hud::CHudManager; + + m_HudManager->Add( "helpmessage", new Hud::CStatsConsole( Base::Math::CRect( 1, 1 ), hudFontName, hudFontSize ) ); + + Hud::spCStatsConsole spHelpMessage = (Hud::spCStatsConsole)m_HudManager->Get( "helpmessage" ); + spHelpMessage->Add( new Hud::CStringStat( "message", "Electric Sheep\n\nYou are now part of a cyborg mind composed of thousands of\ncomputers and people communicating with a genetic algorithm.\n\nKeyboard Commands\nUp-arrow: vote for this sheep\nDown-arrow: vote against this sheep and delete it\nLeft-arrow: go back to play previous sheep\nRight-arrow: go forward through history\n" +#ifdef MAC + "Cmd" +#else + "Control" +#endif + "-F: go full screen (if in window)\nF1: help (this page)\nF2: download status and error log\nF3: render status\nF4: playback status\n\nby Scott Draves and open source programmers all over the world\nElectricSheep.org", "" ) ); + + std::string ver = GetVersion(); + + if (!ver.empty()) + { + spHelpMessage->Add( new Hud::CStringStat( "version", "\nVersion: ", ver ) ); + } + + m_SeamlessPlayback = g_Settings()->Get( "settings.player.SeamlessPlayback", false ); + + // Add some display stats. + m_HudManager->Add( "displaystats", new Hud::CStatsConsole( Base::Math::CRect( 1, 1 ), hudFontName, hudFontSize ) ); + Hud::spCStatsConsole spStats = (Hud::spCStatsConsole)m_HudManager->Get( "displaystats" ); + spStats->Add( new Hud::CStringStat( "decodefps", "Decoding video at ", "? fps" ) ); + + + int32 displayMode = g_Settings()->Get( "settings.player.DisplayMode", 0 ); + if( displayMode == 2 ) + spStats->Add( new Hud::CAverageCounter( "displayfps", + g_Player().Renderer()->Description() + + " piecewise cubic display at ", " fps", 1.0 ) ); + else if( displayMode == 1 ) + spStats->Add( new Hud::CAverageCounter( "displayfps", + g_Player().Renderer()->Description() + + " piecewise linear display at ", " fps", 1.0 ) ); + else + spStats->Add( new Hud::CAverageCounter( "displayfps", + g_Player().Renderer()->Description() + + " display at ", " fps", 1.0 ) ); + + spStats->Add( new Hud::CStringStat( "currentid", "Currently playing sheep: ", "n/a" ) ); + spStats->Add( new Hud::CStringStat( "uptime", "\nClient uptime: ", "...." ) ); + + // Add some server stats. + m_HudManager->Add( "serverstats", new Hud::CStatsConsole( Base::Math::CRect( 1, 1 ), hudFontName, hudFontSize ) ); + spStats = (Hud::spCStatsConsole)m_HudManager->Get( "serverstats" ); + spStats->Add( new Hud::CStringStat( "loginstatus", "", "Not logged in" ) ); + spStats->Add( new Hud::CStringStat( "all", "Local flock: ", "unknown..." ) ); + spStats->Add( new Hud::CStringStat( "server", "Server is ", "not known yet" ) ); + spStats->Add( new Hud::CStringStat( "transfers", "", "" ) ); + spStats->Add( new Hud::CStringStat( "deleted", "", "" ) ); + spStats->Add( new Hud::CStringStat( "bsurvivors", "", "" ) ); + if (m_MultipleInstancesMode == true) + spStats->Add( new Hud::CTimeCountDownStat( "svstat", "", "Downloading disabled, read-only mode" ) ); + else + if (g_Settings()->Get( "settings.content.download_mode", true ) == false) + spStats->Add( new Hud::CTimeCountDownStat( "svstat", "", "Downloading disabled" ) ); + else + spStats->Add( new Hud::CTimeCountDownStat( "svstat", "", "Preparing downloader..." ) ); + spStats->Add( new Hud::CStringStat( std::string("zconnerror"), "", "" ) ); + + // Add some display stats. + m_HudManager->Add( "renderstats", new Hud::CStatsConsole( Base::Math::CRect( 1, 1 ), hudFontName, hudFontSize ) ); + spStats = (Hud::spCStatsConsole)m_HudManager->Get( "renderstats" ); + spStats->Add( new Hud::CTimeCountDownStat( "countdown", "", "Rendering disabled" ) ); + spStats->Add( new Hud::CIntCounter( "rendering", "Currently rendering ", " frames" ) ); + spStats->Add( new Hud::CIntCounter( "totalframes", "", " frames rendered" ) ); + + bool hasBattery = (GetACLineStatus() != -1); + + if (hasBattery) + spStats->Add( new Hud::CStringStat( "zbattery", "\nPower source: ", "Unknown" ) ); + + spStats->Add( new Hud::CStringStat( "zzacpu", "CPU usage: ", "Unknown" ) ); + +#ifndef LINUX_GNU + std::string defaultDir = std::string(".\\"); +#else + std::string defaultDir = std::string(""); +#endif + // Vote splash. + m_spSplashPos = new Hud::CSplash( 0.2f, g_Settings()->Get( "settings.app.InstallDir", defaultDir ) + "electricsheep-smile.png" ); + m_spSplashNeg = new Hud::CSplash( 0.2f, g_Settings()->Get( "settings.app.InstallDir", defaultDir ) + "electricsheep-frown.png" ); + + // PNG splash + m_SplashFilename = g_Settings()->Get( "settings.player.attrpngfilename", g_Settings()->Get( "settings.app.InstallDir", defaultDir ) + "electricsheep-attr.png" ); + + bool splashFound = false; + + const char *percent; + + if ( m_SplashFilename.empty() == false ) + { + if (( percent = strchr(m_SplashFilename.c_str(), '%') )) + { + if (percent[1] == 'd') + { + FILE *test; + while (1) + { + char fNameFormatted[FILENAME_MAX]; + snprintf(fNameFormatted, FILENAME_MAX, m_SplashFilename.c_str(), m_nSplashes); + if ((test = fopen(fNameFormatted, "r"))) + { + splashFound = true; + fclose(test); + m_nSplashes++; + } + else + { + break; + } + } + } + } + else + { + FILE *test = fopen( m_SplashFilename.c_str(), "r" ); + + if ( test != NULL ) + { + splashFound = true; + fclose( test ); + } + } + } + + + if ( !splashFound ) + { + m_SplashFilename = g_Settings()->Get( "settings.app.InstallDir", defaultDir ) + "electricsheep-attr.png"; + g_Settings()->Set( "settings.player.attrpngfilename", m_SplashFilename ); + } + + + // if multiple splashes are found then they are loaded when the timer goes off, not here + if ( m_SplashFilename.empty() == false && g_Settings()->Get( "settings.app.attributionpng", true ) == true ) + m_spSplashPNG = new Hud::CSplashImage( 0.2f, m_SplashFilename.c_str(), + fp4( g_Settings()->Get( "settings.app.pngfadein", 10 ) ), + fp4( g_Settings()->Get( "settings.app.pnghold", 10 ) ), + fp4( g_Settings()->Get( "settings.app.pngfadeout", 10 ) ) + ); + + + m_spCrossFade = new Hud::CCrossFade( g_Player().Display()->Width(), g_Player().Display()->Height(), true ); + + // Start downloader. + g_Log->Info( "Starting downloader..." ); + + g_ContentDownloader().Startup( false, m_MultipleInstancesMode ); + + //call static method to fill sheep counts + ContentDownloader::Shepherd::GetFlockSizeMBsRecount(0); + ContentDownloader::Shepherd::GetFlockSizeMBsRecount(1); + // For testing... + //ContentDownloader::Shepherd::addMessageText( "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua", 50, 18 ); + + // And we're off. + m_SplashPNGDelayTimer.Reset(); + m_Timer.Reset(); + g_Player().Start(); + m_F1F4Timer.Reset(); + m_LastCPUCheckTime = m_Timer.Time(); + return true; + } + + // + virtual void Shutdown() + { + printf( "CElectricSheep::Shutdown()\n" ); + +#ifdef DO_THREAD_UPDATE + DestroyUpdateThreads(); +#endif + + m_spSplashPos = NULL; + m_spSplashNeg = NULL; + m_spSplashPNG = NULL; + m_nSplashes = 0; + m_SplashFilename = std::string(); + m_spCrossFade = NULL; + m_StartupScreen = NULL; + m_HudManager = NULL; + + if( !m_bConfigMode ) + { + g_ContentDownloader().Shutdown(); + + // This stuff was never started in config mode. + if (m_MultipleInstancesMode == false) + { + SAFE_DELETE( m_pVoter ); + + g_NetworkManager->Shutdown(); + } + g_Player().Shutdown(); + g_Settings()->Shutdown(); + } + } + + bool Run() + { + while( true ) + { + //g_Player().Renderer()->BeginFrame(); + + if( !Update() ) + { + g_Player().Renderer()->EndFrame(); + return false; + } + } + + return true; + } + + std::string FormatTimeDiff(uint64 timediff, bool showseconds) + { + std::stringstream ss; + + // Prettify uptime. + uint32 seconds = ( timediff % 60 ); + uint32 minutes = (timediff / 60) % 60; + uint32 hours = (timediff / 3600) % 24; + uint32 days = uint32((timediff / (60*60*24))); + const char *space = ""; + if (days > 0) + { + ss << days << " day" << ((days != 1) ? "s" : "") << ","; + space = " "; + } + + if (!showseconds) + { + if (days > 0) + { + if (hours > 0) + ss << space << hours << " hour" << ((hours != 1) ? "s" : ""); + else if (minutes > 0) + ss << space << minutes << " minute" << ((minutes != 1) ? "s" : ""); + else if (seconds > 0) + ss << space << seconds << " second" << ((seconds != 1) ? "s" : ""); + } + else + { + ss << space; + + if (hours > 0) + ss << space << std::setfill('0') << std::setw(2) << hours << "h"; + + ss << std::setfill('0') << std::setw(2) << minutes << "m" << std::setfill('0') << std::setw(2) << seconds << "s"; + } + } + else + { + ss << space; + + if (hours > 0) + ss << space << std::setfill('0') << std::setw(2) << hours << "h"; + + ss << std::setfill('0') << std::setw(2) << minutes << "m" << std::setfill('0') << std::setw(2) << seconds << "s"; + } + + return ss.str(); + } + +#ifdef DO_THREAD_UPDATE + // + virtual void CreateUpdateThreads() + { + int displayCnt = g_Player().GetDisplayCount(); + + m_pUpdateBarrier = new boost::barrier( displayCnt + 1 ); + + m_pUpdateThreads = new boost::thread_group; + + for (int i = 0; i < displayCnt; i++) + { + boost::thread* th = new boost::thread(&CElectricSheep::UpdateFrameThread, this, i); +#ifdef WIN32 + SetThreadPriority( (HANDLE)th->native_handle(), THREAD_PRIORITY_HIGHEST ); + SetThreadPriorityBoost( (HANDLE)th->native_handle(), FALSE ); +#else + struct sched_param sp; + sp.sched_priority = sched_get_priority_max(SCHED_RR); //HIGH_PRIORITY_CLASS - THREAD_PRIORITY_NORMAL + pthread_setschedparam( (pthread_t)th->native_handle(), SCHED_RR, &sp ); +#endif + m_pUpdateThreads->add_thread(th); + } + } + + // + virtual void DestroyUpdateThreads() + { + if ( m_pUpdateThreads != NULL ) + { + m_pUpdateThreads->interrupt_all(); + m_pUpdateThreads->join_all(); + + SAFE_DELETE(m_pUpdateThreads); + } + + SAFE_DELETE(m_pUpdateBarrier); + } +#endif + + // + virtual bool Update() + { + g_Player().BeginFrameUpdate(); + +#ifdef DO_THREAD_UPDATE + { + boost::mutex::scoped_lock lock( m_BarrierMutex ); + + m_pUpdateBarrier->wait(); + + m_pUpdateBarrier->wait(); + } +#else + uint32 displayCnt = g_Player().GetDisplayCount(); + + bool ret = true; + for (uint32 i = 0; i < displayCnt; i++) + { + ret &= DoRealFrameUpdate(i); + if ( !ret ) + break; + } +#endif + + g_Player().EndFrameUpdate(); + + return ret; + } + +#ifdef DO_THREAD_UPDATE + virtual void UpdateFrameThread(int32 displayUnit) + { + try { + while (true) + { + m_pUpdateBarrier->wait(); + + DoRealFrameUpdate(displayUnit); + + m_pUpdateBarrier->wait(); + } + } + catch(boost::thread_interrupted const&) + { + } + } +#endif + + virtual bool DoRealFrameUpdate(uint32 displayUnit) + { + if ( g_Player().BeginDisplayFrame( displayUnit ) ) + { + + //g_Player().Renderer()->BeginFrame(); + + if( g_Player().Closed() ) + { + g_Log->Info( "Player closed..." ); + g_Player().Renderer()->EndFrame(); + return false; + } + + bool drawNoSheepIntro = false; + bool drawn = g_Player().Update(displayUnit, drawNoSheepIntro); + + if ( (drawNoSheepIntro && displayUnit == 0) || (drawn && displayUnit == 0) ) + { + if (drawNoSheepIntro) + { + if (m_StartupScreen.IsNull()) + m_StartupScreen = new Hud::CStartupScreen(Base::Math::CRect(0,0,1.,1.), "Trebuchet MS", 24); + m_StartupScreen->Render(0., g_Player().Renderer()); + } + // Process any server messages. + std::string msg; + fp8 duration; + + if ( !m_spSplashPNG.IsNull() ) + { + if ( m_SplashPNGDelayTimer.Time() > m_PNGDelayTimer) + { + + + // update m_spSplashPNG here, so every time it is shown, it is randomized among our shuffle group. + + if (m_nSplashes > 0) + { + char fNameFormatted[FILENAME_MAX]; + snprintf( fNameFormatted, FILENAME_MAX, m_SplashFilename.c_str(), rand() % m_nSplashes ); + if ( m_SplashFilename.empty() == false && g_Settings()->Get( "settings.app.attributionpng", true ) == true ) + m_spSplashPNG = new Hud::CSplashImage( 0.2f, fNameFormatted, + fp4( g_Settings()->Get( "settings.app.pngfadein", 10 ) ), + fp4( g_Settings()->Get( "settings.app.pnghold", 10 ) ), + fp4( g_Settings()->Get( "settings.app.pngfadeout", 10 ) ) + ); + } + + + + m_HudManager->Add( "splash_png", m_spSplashPNG, + fp4( g_Settings()->Get( "settings.app.pngfadein", 10 ) + + g_Settings()->Get( "settings.app.pnghold", 10 ) + + g_Settings()->Get( "settings.app.pngfadeout", 10 ) ) + ); + m_SplashPNGDelayTimer.Reset(); + } + } + + if( ContentDownloader::Shepherd::PopMessage( msg, duration )) + { + bool addtohud = true; + time_t lt = time(NULL); + + if (( msg == "error connecting to server" ) || + ( msg == "server request failed, using free one" )) + { + std::string temptime = ctime(<); + msg = temptime.substr(0, temptime.length() - strlen("\n")) + " " + msg; + g_Log->Error(msg.c_str()); + if (m_ConnectionErrors.size() > 20) + m_ConnectionErrors.pop_front(); + m_ConnectionErrors.push_back(msg); + if (g_Settings()->Get( "settings.player.quiet_mode", true ) == true) + addtohud = false; + } + + if (addtohud == true) + { + m_HudManager->Add( "servermessage", new Hud::CServerMessage( msg, Base::Math::CRect( 1, 1 ), 24 ), duration ); + m_HudManager->HideAll(); + } + } + if (m_F1F4Timer.Time() > 20*60) + { + m_F1F4Timer.Reset(); + m_HudManager->Hide( "helpmessage" ); + m_HudManager->Hide( "serverstats" ); + m_HudManager->Hide( "renderstats" ); + m_HudManager->Hide( "displaystats" ); + } + + + std::string batteryStatus = "Unknown"; + bool blockRendering = false; + if (m_Timer.Time() > m_LastCPUCheckTime + 3.) + { + m_LastCPUCheckTime = m_Timer.Time(); + if (m_CpuUsage.GetCpuUsage(m_CpuUsageTotal, m_CpuUsageES)) + if (m_CpuUsageTotal != -1 && m_CpuUsageES != -1 && m_CpuUsageTotal > m_CpuUsageES) + { + if ((m_CpuUsageTotal - m_CpuUsageES) > m_CpuUsageThreshold) + { + ++m_HighCpuUsageCounter; + if (m_HighCpuUsageCounter > 10) + { + m_HighCpuUsageCounter = 5; + blockRendering = true; + } + } else + { + if (m_HighCpuUsageCounter > 0) + --m_HighCpuUsageCounter; + } + } + } + if (m_HighCpuUsageCounter > 0 && ContentDownloader::Shepherd::RenderingAllowed() == false) + blockRendering = true; + + switch( GetACLineStatus() ) + { + case 1: + { + batteryStatus = "Power adapter"; + /*m_PlayerFps = m_OriginalFps; + m_CurrentFps = m_PlayerFps; + g_Player().Framerate( m_CurrentFps );*/ + break; + } + case 0: + { + batteryStatus = "Battery"; + /*m_PlayerFps = m_OriginalFps/2; // half speed on battery power + m_CurrentFps = m_PlayerFps; + g_Player().Framerate( m_CurrentFps );*/ + blockRendering = true; + break; + } + case 255: + { + batteryStatus = "Unknown1"; + break; + } + default: + { + batteryStatus = "Unknown2"; + break; + } + } + + if (blockRendering) + ContentDownloader::Shepherd::SetRenderingAllowed(false); + else + ContentDownloader::Shepherd::SetRenderingAllowed(true); + + // Update some stats. + Hud::spCStatsConsole spStats = (Hud::spCStatsConsole)m_HudManager->Get( "displaystats" ); + std::stringstream decodefpsstr; + decodefpsstr.precision(2); + decodefpsstr << std::fixed << m_CurrentFps << " fps"; + ((Hud::CStringStat *)spStats->Get( "decodefps" ))->SetSample( decodefpsstr.str() ); + ((Hud::CIntCounter *)spStats->Get( "displayfps" ))->AddSample( 1 ); + + uint32 playingID = g_Player().GetCurrentPlayingSheepID(); + uint32 playingGen = g_Player().GetCurrentPlayingSheepGeneration(); + uint16 playCnt = g_PlayCounter().PlayCount( playingGen, playingID ) - 1; + + char strCurID[256]; + if (m_curPlayingID != playingID || m_curPlayingGen != playingGen) + { + if (playCnt > 0) + { + time_t lastatime = g_Player().GetCurrentPlayingatime(); + time_t currenttime = time(NULL); + m_lastPlayedSeconds = (uint64)floor(difftime(currenttime, lastatime)); + } + else + m_lastPlayedSeconds = 0; + + m_curPlayingID = playingID; + m_curPlayingGen = playingGen; + } + + char playCntStr[128]; + + if (playCnt > 0) + sprintf(playCntStr, "Played: %hu time%s %s\nLast time: %s ago", + playCnt, + (playCnt == 1) ? "" : "s", + ( g_PlayCounter().ReadOnlyPlayCounts() ) ? " (not updated, read-only instance)" : "", + FormatTimeDiff(m_lastPlayedSeconds, false).c_str() + ); + else + strcpy(playCntStr, "Playing for the first time"); + + snprintf( strCurID, 256, "#%d.%05d (%s)\n%s\n", + g_Player().GetCurrentPlayingGeneration(), + playingID, + g_Player().IsCurrentPlayingEdge() ? "edge" : "loop", + playCntStr + ); + if (playingID != 0) + ((Hud::CStringStat *)spStats->Get( "currentid" ))->SetSample( strCurID ); + + // Prettify uptime. + uint64 uptime = (uint64)m_Timer.Time(); + + char strHP[128]; + snprintf( strHP, 127, "%s", FormatTimeDiff(uptime, true).c_str() ); + ((Hud::CStringStat *)spStats->Get( "uptime" ))->SetSample( strHP ); + + // Serverstats. + spStats = (Hud::spCStatsConsole)m_HudManager->Get( "serverstats" ); + + std::stringstream tmpstr; + uint64 flockcount = 0; + uint64 flockmbs = 0; + uint64 flockcountfree = ContentDownloader::Shepherd::getClientFlockCount(0); + uint64 flockcountgold = ContentDownloader::Shepherd::getClientFlockCount(1); + uint64 flockmbsfree = ContentDownloader::Shepherd::getClientFlockMBs(0); + uint64 flockmbsgold = ContentDownloader::Shepherd::getClientFlockMBs(1); + switch ( g_Player().UsedSheepType() ) + { + case 0: // only gold, if any + { + flockcount = flockcountgold; + flockmbs = flockmbsgold; + if (g_Player().HasGoldSheep() == false) + { + flockcount += flockcountfree; + flockmbs += flockmbsfree; + } + } + break; + case 1: // free sheep only + flockcount = flockcountfree; + flockmbs = flockmbsfree; + break; + case 2: // all sheep + flockcount = flockcountfree + flockcountgold; + flockmbs = flockmbsfree + flockmbsgold; + break; + }; + tmpstr << flockcount << ((g_Player().UsedSheepType() == 0 && g_Player().HasGoldSheep() == true) ? " gold sheep, " : " sheep, ") << flockmbs << "MB"; + ((Hud::CStringStat *)spStats->Get( "all" ))->SetSample(tmpstr.str()); + + const char *servername = ContentDownloader::Shepherd::serverName( false ); + if ( servername != NULL && servername[0] ) + { + ((Hud::CStringStat *)spStats->Get( "server" ))->SetSample( servername ); + ((Hud::CStringStat *)spStats->Get( "server" ))->Visible( true ); + } + else + ((Hud::CStringStat *)spStats->Get( "server" ))->Visible( false ); + + + Hud::CStringStat *pTmp = (Hud::CStringStat *)spStats->Get( "transfers" ); + if( pTmp ) + { + std::string serverStatus = g_NetworkManager->Status(); + if( serverStatus == "" ) + pTmp->Visible( false ); + else + { + pTmp->SetSample( serverStatus ); + pTmp->Visible( true ); + } + } + + pTmp = (Hud::CStringStat *)spStats->Get( "loginstatus" ); + if( pTmp ) + { + bool visible = true; + + const char *role = ContentDownloader::Shepherd::role(); + std::string loginstatus; + if (role != NULL) + loginstatus = role; + else + visible = false; + + if( loginstatus.empty() || loginstatus == "none" ) + { + pTmp->SetSample( "Not logged in" ); + } + else + { + std::stringstream loginstatusstr; + loginstatusstr << "Logged in as " << ContentDownloader::SheepGenerator::nickName() << " (" << loginstatus << ")"; + pTmp->SetSample( loginstatusstr.str() ); + } + + pTmp->Visible( visible ); + } + + pTmp = (Hud::CStringStat *)spStats->Get( "bsurvivors" ); + if( pTmp ) + { + std::stringstream survivors; + + survivors << "Survivors: median cut=" << g_PlayCounter().GetMedianCutSurvivors(); + + if (m_SeamlessPlayback) + survivors << ", dead end eliminator=" << g_PlayCounter().GetDeadEndCutSurvivors(); + + pTmp->SetSample( survivors.str() ); + pTmp->Visible( true ); + } + + pTmp = (Hud::CStringStat *)spStats->Get( "deleted" ); + if( pTmp ) + { + std::string deleted; + if (ContentDownloader::Shepherd::PopOverflowMessage( deleted ) && (deleted != "")) + { + pTmp->SetSample( deleted ); + pTmp->Visible( true ); + } else + pTmp->Visible( false ); + } + + pTmp = (Hud::CStringStat *)spStats->Get( "zconnerror" ); + if( pTmp ) + { + if (m_ConnectionErrors.size() > 0) + { + std::string allConnectionErrors; + for (size_t ii = 0; ii < m_ConnectionErrors.size(); ++ii) + allConnectionErrors += m_ConnectionErrors.at(ii) + "\n"; + if (allConnectionErrors.size() > 0) + allConnectionErrors.erase(allConnectionErrors.size() - 1); + pTmp->SetSample( allConnectionErrors ); + pTmp->Visible( true ); + } else + pTmp->Visible( false ); + } + + Hud::CTimeCountDownStat *pTcd = (Hud::CTimeCountDownStat *)spStats->Get( "svstat" ); + if( pTcd ) + { + bool isnew = false; + + std::string dlState = ContentDownloader::Shepherd::downloadState( isnew ); + + if ( isnew ) + { + pTcd->SetSample( dlState ); + pTcd->Visible( true ); + } + } + + // Renderer stats. + spStats = (Hud::spCStatsConsole)m_HudManager->Get( "renderstats" ); + ((Hud::CIntCounter *)spStats->Get( "rendering" ))->SetSample( ContentDownloader::Shepherd::FramesRendering() ); + ((Hud::CIntCounter *)spStats->Get( "totalframes" ))->SetSample( ContentDownloader::Shepherd::TotalFramesRendered() ); + + Hud::CStringStat *batteryStat = ((Hud::CStringStat *)spStats->Get( "zbattery" )); + + if (batteryStat != NULL) + batteryStat->SetSample( batteryStatus ); + + if (m_CpuUsageTotal != -1 && m_CpuUsageES != -1) + { + std::stringstream temp; + + temp << " ES " << m_CpuUsageES << "%, total " << m_CpuUsageTotal << "% "; + + if ( ContentDownloader::Shepherd::RenderingAllowed() ) + temp << "(new rendering allowed)"; + else + temp << "(new rendering blocked)"; + + ((Hud::CStringStat *)spStats->Get( "zzacpu" ))->SetSample( temp.str() ); + } + + pTcd = (Hud::CTimeCountDownStat *)spStats->Get( "countdown" ); + if( pTcd ) + { + bool isnew = false; + + std::string renderState = ContentDownloader::Shepherd::renderState( isnew ); + + if ( isnew ) + { + pTcd->SetSample( renderState ); + pTcd->Visible( true ); + } + } + + // Finally render hud. + m_HudManager->Render( g_Player().Renderer() ); + + // Update display events. + g_Player().Display()->Update(); + } + + g_Player().EndDisplayFrame( displayUnit, drawn ); + } + + return true; + + } + + virtual bool HandleOneEvent( DisplayOutput::spCEvent &_event ) + { + static const fp4 voteDelaySeconds = 1; + + if( _event->Type() == DisplayOutput::CEvent::Event_KEY ) + { + DisplayOutput::spCKeyEvent spKey = static_cast( _event ); + switch( spKey->m_Code ) + { + // Vote for sheep. + case DisplayOutput::CKeyEvent::KEY_UP: + if( m_pVoter != NULL && m_pVoter->Vote( g_Player().GetCurrentPlayingID(), true, voteDelaySeconds ) ) + m_HudManager->Add( "splash_pos", m_spSplashPos, voteDelaySeconds*0.9f ); + break; + case DisplayOutput::CKeyEvent::KEY_DOWN: + if( m_pVoter != NULL && m_pVoter->Vote( g_Player().GetCurrentPlayingID(), false, voteDelaySeconds ) ) + { + if (g_Settings()->Get( "settings.content.negvotedeletes", true )) + { + //g_Player().Stop(); + m_spCrossFade->Reset(); + m_HudManager->Add( "fade", m_spCrossFade, 1.5 ); + } + + m_HudManager->Add( "splash_pos", m_spSplashNeg, voteDelaySeconds*0.9f ); + } + break; + + // Repeat current sheep + case DisplayOutput::CKeyEvent::KEY_LEFT: + g_Player().ReturnToPrevious(); + break; + + // Force Next Sheep + case DisplayOutput::CKeyEvent::KEY_RIGHT: + g_Player().SkipToNext(); + break; + + // Repeat sheep + case DisplayOutput::CKeyEvent::KEY_F8: + g_Player().RepeatSheep(); + break; + + // OSD info. + + // OSD info. + case DisplayOutput::CKeyEvent::KEY_F1: + m_F1F4Timer.Reset(); + m_HudManager->Toggle( "helpmessage" ); + break; + case DisplayOutput::CKeyEvent::KEY_F2: + m_F1F4Timer.Reset(); + m_HudManager->Toggle( "serverstats" ); + break; + case DisplayOutput::CKeyEvent::KEY_F3: + m_F1F4Timer.Reset(); + m_HudManager->Toggle( "renderstats" ); + break; + case DisplayOutput::CKeyEvent::KEY_F4: + m_F1F4Timer.Reset(); + m_HudManager->Toggle( "displaystats" ); + break; + + // All other keys needs to be ignored, they are handled somewhere else... + default: + { + g_Log->Info( "Key event, ignoring" ); + return false; + } + } + return true; + } + return false; + } + + virtual bool HandleEvents() + { + DisplayOutput::spCDisplayOutput spDisplay = g_Player().Display(); + + // Handle events. + DisplayOutput::spCEvent spEvent; + while( spDisplay->GetEvent( spEvent ) ) + { + if ( HandleOneEvent( spEvent ) == false ) + return false; + } + + return true; + } + + virtual std::string GetVersion() + { + return ""; + } + + virtual int GetACLineStatus() + { + return -1; + } + + void SetUpdateAvailable(const std::string& verinfo) + { + std::string message("New Electric Sheep "); + + message += verinfo; + message += " is available."; +#ifdef MAC + message += " Relaunch ES application or preference pane to update."; +#endif + + ContentDownloader::Shepherd::QueueMessage( message, 30.0 ); + } +}; + +#endif // CLIENT_H_INCLUDED diff -Nru electricsheep-2.7~b12+svn20091224/Client/client_linux.h electricsheep-3.0.2-git20180325/Client/client_linux.h --- electricsheep-2.7~b12+svn20091224/Client/client_linux.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/client_linux.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,222 @@ +#ifndef CLIENT_LINUX_H_INCLUDED +#define CLIENT_LINUX_H_INCLUDED + +#ifdef WIN32 +#error This file is not supposed to be used for this platform... +#endif + +#include +#include "base.h" +#include "MathBase.h" +#include "Exception.h" +#include "Log.h" +#include "Player.h" +#include "SimplePlaylist.h" +#include "lua_playlist.h" +#include "Timer.h" +#include "storage.h" +#include "Settings.h" + +/* + CElectricSheep_Linux(). + Linux specific client code. +*/ +class CElectricSheep_Linux : public CElectricSheep +{ + /* std::vector m_glContextList;*/ + + public: + CElectricSheep_Linux() : CElectricSheep() + { + printf( "CElectricSheep_Linux()\n" ); + } + + // + virtual bool Startup() + { + using namespace DisplayOutput; + + printf( "Startup()\n" ); + + m_AppData = std::string(getenv("HOME"))+"/.electricsheep/"; + m_WorkingDir = SHAREDIR; + + InitStorage(); + AttachLog(); + + std::string tmp = "Working dir: " + m_WorkingDir; + g_Log->Info( tmp.c_str() ); + + // Run gui. + + g_Player().AddDisplay(g_Settings()->Get( "settings.player.screen", 0 )); + + //if( true ) + { + g_Log->Info( "Running config..." ); + //g_Settings()->Storage()->ConfigUI( m_WorkingDir + "Scripts/config.lua" ); + } + + if( CElectricSheep::Startup() == false ) + return false; + + // Start downloader. This should be moved to client.h! + //g_Log->Info( "Starting downloader..." ); + //g_ContentDownloader().Startup( false /*m_ScrMode == ePreview*/ ); // Removed for 2.7b11... + + return true; + } + + virtual bool HandleEvents() + { + DisplayOutput::spCDisplayOutput spDisplay = g_Player().Display(); + + // Handle events. + DisplayOutput::spCEvent spEvent; + while( spDisplay->GetEvent( spEvent ) ) + { + if ( HandleOneEvent( spEvent ) == false ) + { + if (CElectricSheep::HandleOneEvent( spEvent ) == false) + return false; + } + } + + return true; + } + + + // + bool Update() + { + using namespace DisplayOutput; + + g_Player().Framerate( m_CurrentFps ); + + if( !CElectricSheep::Update() ) + return false; + + DisplayOutput::spCDisplayOutput spDisplay = g_Player().Display(); + + // Update display events. + spDisplay->Update(); + + static const fp4 voteDelaySeconds = 1; + + + + // Handle events. + spCEvent spEvent; + while( spDisplay->GetEvent( spEvent ) ) + { + // Key events. + if( spEvent->Type() == CEvent::Event_KEY ) + { + spCKeyEvent spKey = static_cast( spEvent ); + + switch( spKey->m_Code ) + { + // Vote for sheep. + + + case DisplayOutput::CKeyEvent::KEY_UP: + if( m_pVoter != NULL && m_pVoter->Vote( g_Player().GetCurrentPlayingID(), true, voteDelaySeconds ) ) + m_HudManager->Add( "splash_pos", m_spSplashPos, voteDelaySeconds*0.9f ); + break; + case DisplayOutput::CKeyEvent::KEY_DOWN: + if( m_pVoter != NULL && m_pVoter->Vote( g_Player().GetCurrentPlayingID(), false, voteDelaySeconds ) ) + { + if (g_Settings()->Get( "settings.content.negvotedeletes", true )) + { + //g_Player().Stop(); + m_spCrossFade->Reset(); + m_HudManager->Add( "fade", m_spCrossFade, 1.5 ); + } + + m_HudManager->Add( "splash_pos", m_spSplashNeg, voteDelaySeconds*0.9f ); + } + break; + + // Repeat current sheep + case DisplayOutput::CKeyEvent::KEY_LEFT: + g_Player().ReturnToPrevious(); + break; + + // Force Next Sheep + case DisplayOutput::CKeyEvent::KEY_RIGHT: + g_Player().SkipToNext(); + break; + + // Repeat sheep + case DisplayOutput::CKeyEvent::KEY_F8: + g_Player().RepeatSheep(); + break; + + + // OSD info. + case DisplayOutput::CKeyEvent::KEY_F1: + m_F1F4Timer.Reset(); + m_HudManager->Toggle( "helpmessage" ); + break; + case DisplayOutput::CKeyEvent::KEY_F2: + m_F1F4Timer.Reset(); + m_HudManager->Toggle( "serverstats" ); + break; + case DisplayOutput::CKeyEvent::KEY_F3: + m_F1F4Timer.Reset(); + m_HudManager->Toggle( "renderstats" ); + break; + case DisplayOutput::CKeyEvent::KEY_F4: + m_F1F4Timer.Reset(); + m_HudManager->Toggle( "displaystats" ); + break; + + case CKeyEvent::KEY_Esc: spDisplay->Close(); break; + + // All other keys close... + // NO !!! + default: + // spDisplay->Close(); + break; + } + } + } + + return true; + return HandleEvents(); + + } + + + // + virtual void Shutdown() + { + try + { + printf( "CElectricSheep_Linux::Shutdown()\n" ); + CElectricSheep::Shutdown(); + } + catch( Base::CException &_e ) + { + _e.ReportCatch(); + } + } + + /* gf: try + void AddGLContext( uint32 _glContext ) + { + if ( g_Player().Display() == NULL ) + { + m_glContextList.push_back( _glContext ); + } + else + { + g_Player().AddDisplay( _glContext ); + } + } */ + + + +}; + +#endif // CLIENT_H_INCLUDED diff -Nru electricsheep-2.7~b12+svn20091224/Client/client_mac.h electricsheep-3.0.2-git20180325/Client/client_mac.h --- electricsheep-2.7~b12+svn20091224/Client/client_mac.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/client_mac.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,289 @@ +#ifndef CLIENT_MAC_H_INCLUDED +#define CLIENT_MAC_H_INCLUDED + +#ifndef MAC +#error This file is not supposed to be used for this platform... +#endif + +#include +#include +#include "base.h" +#include "MathBase.h" +#include "Exception.h" +#include "Log.h" +#include "Player.h" +#include "SimplePlaylist.h" +#include "lua_playlist.h" +#include "Timer.h" +#include "storage.h" +#include "Settings.h" +#include "Splash.h" + +#include "dlfcn.h" +#include "libgen.h" + +#include +#include +#include + +#include "../MacBuild/ESScreensaver.h" + +#include "proximus.h" + +/* + CElectricSheep_Mac(). + Mac specific client code. +*/ +class CElectricSheep_Mac : public CElectricSheep +{ + std::vector m_glContextList; + bool m_bIsPreview; + UInt8 m_proxyHost[256]; + UInt8 m_proxyUser[32]; + UInt8 m_proxyPass[32]; + Boolean m_proxyEnabled; + std::string m_verStr; + int m_lckFile; + + public: + CElectricSheep_Mac() : CElectricSheep() + { + printf( "CElectricSheep_Mac()\n" ); + + m_bIsPreview = false; + + *m_proxyHost = 0; + *m_proxyUser = 0; + *m_proxyPass = 0; + + m_lckFile = -1; + + FSRef foundRef; + + UInt8 path[1024]; + + OSErr err = FSFindFolder(kUserDomain, kApplicationSupportFolderType, false, &foundRef); + + if (err == noErr) + { + CFURLRef appSupportURL = CFURLCreateFromFSRef(kCFAllocatorDefault, &foundRef); + if (appSupportURL != NULL) + { + if (CFURLGetFileSystemRepresentation ( appSupportURL, true, path, sizeof(path) - 1)) + { + m_AppData = (char *)path; + + m_AppData += "/ElectricSheep/"; + } + + CFRelease(appSupportURL); + } + } + + CFBundleRef bundle = CopyDLBundle_ex(); + + if (bundle != NULL) + { + CFURLRef resourcesURL = CFBundleCopyResourcesDirectoryURL(bundle); + + if (resourcesURL != NULL) + { + if (CFURLGetFileSystemRepresentation ( resourcesURL, true, path, sizeof(path) - 1)) + { + m_WorkingDir = (char *)path; + + m_WorkingDir += "/"; + } + + CFRelease(resourcesURL); + } + + CFStringRef cfver = (CFStringRef)CFBundleGetValueForInfoDictionaryKey( bundle, CFSTR("CFBundleVersion") ); + + char verstr[64]; + + verstr[0] = '\0'; + + CFStringGetCString(cfver, verstr, sizeof(verstr) - 1, kCFStringEncodingASCII); + + m_verStr.assign(verstr); + + CFRelease(bundle); + } + + GetClientProxy(); + } + + virtual ~CElectricSheep_Mac() + { + } + + CFStringRef GetBundleVersion() + { + CFBundleRef bundle = CopyDLBundle_ex(); + + if (bundle == NULL) + return NULL; + + CFStringRef verStr = (CFStringRef)CFBundleGetValueForInfoDictionaryKey( bundle, CFSTR("CFBundleVersion") ); + + CFRelease(bundle); + + return (CFStringRef)verStr; + } + + void GetClientProxy(void) + { + m_proxyEnabled = get_proxy_for_server105( (const UInt8*)CLIENT_SERVER, m_proxyHost, sizeof(m_proxyHost) - 1, m_proxyUser, sizeof(m_proxyUser) - 1, m_proxyPass, sizeof(m_proxyPass) - 1 ); + } + + void AddGLContext( CGLContextObj _glContext ) + { + if ( g_Player().Display() == NULL ) + { + m_glContextList.push_back( _glContext ); + } + else + { +#ifdef DO_THREAD_UPDATE + boost::mutex::scoped_lock lock( m_BarrierMutex ); + + DestroyUpdateThreads(); +#endif + + g_Player().AddDisplay( _glContext ); + +#ifdef DO_THREAD_UPDATE + CreateUpdateThreads(); +#endif + } + } + + void SetIsPreview( bool _isPreview ) + { + m_bIsPreview = _isPreview; + } + + void SetUpConfig( void ) + { + InitStorage(); + } + + // + virtual bool Startup() + { + using namespace DisplayOutput; + + printf( "Startup()\n" ); + + InitStorage(); + + AttachLog(); + + //if m_proxyHost is set, the proxy resolver found one. If not, we should not override preferences. + if (*m_proxyHost) + { + g_Settings()->Set( "settings.content.use_proxy", (bool)( m_proxyEnabled != 0 ) ); + + g_Settings()->Set( "settings.content.proxy", std::string( (char*)m_proxyHost ) ); + + //for now the resolver doesn't support user/password combination, so we should not touch it so user can set it in prefs. + //g_Settings()->Set( "settings.content.proxy_username", std::string( (char*)m_proxyUser ) ); + //g_Settings()->Set( "settings.content.proxy_password", std::string( (char*)m_proxyPass ) ); + } + + std::string tmp = "Working dir: " + m_WorkingDir; + g_Log->Info( tmp.c_str() ); + + std::vector::const_iterator it = m_glContextList.begin(); + + for ( ; it != m_glContextList.end(); it++ ) + { + g_Player().AddDisplay(*it); + } + + m_glContextList.clear(); + + //check the exclusive file lock to see if we are running alone... + std::string lockfile = m_AppData + ".instance-lock"; + + m_lckFile = open( lockfile.c_str(), O_WRONLY + O_EXLOCK + O_NONBLOCK + O_CREAT, S_IWUSR + S_IWGRP + S_IWOTH ); + + m_MultipleInstancesMode = ( m_lckFile < 0 ); + + return CElectricSheep::Startup(); + } + + virtual void Shutdown() + { + CElectricSheep::Shutdown(); + + if (m_lckFile >= 0) + { + close(m_lckFile); + m_lckFile = -1; + } + } + + + // + bool Update() + { + using namespace DisplayOutput; + + g_Player().Framerate( m_CurrentFps ); + + if( !CElectricSheep::Update() ) + return false; + + // Update display events. + g_Player().Display()->Update(); + + HandleEvents(); + + return true; + } + + virtual std::string GetVersion() + { + return m_verStr; + } + + virtual int GetACLineStatus() + { + CFTypeRef blob = IOPSCopyPowerSourcesInfo(); + CFArrayRef sources = IOPSCopyPowerSourcesList(blob); + + CFDictionaryRef pSource = NULL; + + CFIndex srcCnt = CFArrayGetCount(sources); + + if ( srcCnt == 0 ) + { + CFRelease(blob); + CFRelease(sources); + return -1; // Could not retrieve battery information. System may not have a battery. + } + + bool charging = false; + + for (CFIndex i = 0; i < srcCnt; i++) + { + pSource = IOPSGetPowerSourceDescription(blob, CFArrayGetValueAtIndex(sources, i)); + CFStringRef cfStateStr = (CFStringRef)CFDictionaryGetValue(pSource, CFSTR(kIOPSPowerSourceStateKey)); + + if ( cfStateStr != NULL && CFEqual( cfStateStr, CFSTR( kIOPSACPowerValue ) ) ) + { + charging = true; + break; + } + } + + CFRelease(blob); + CFRelease(sources); + + return (charging ? 1 : 0); + } +}; + +#endif // CLIENT_H_INCLUDED diff -Nru electricsheep-2.7~b12+svn20091224/Client/client.rc electricsheep-3.0.2-git20180325/Client/client.rc --- electricsheep-2.7~b12+svn20091224/Client/client.rc 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/client.rc 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,2 @@ +0 ICON "..\\Client\\app.ico" +ELECTRICSHEEP PNG "..\\RuntimeMSVC\\logo256256.png" \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/Client/client_win32.h electricsheep-3.0.2-git20180325/Client/client_win32.h --- electricsheep-2.7~b12+svn20091224/Client/client_win32.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/client_win32.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,619 @@ +#ifndef CLIENT_WIN32_H_INCLUDED +#define CLIENT_WIN32_H_INCLUDED + +#ifndef WIN32 +#error This file is not supposed to be used for this platform... +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include "../msvc/wxApp_main.h" +#include "base.h" +#include "ProcessForker.h" +#include "MathBase.h" +#include "Exception.h" +#include "Log.h" +#include "Player.h" +#include "storage.h" +#include "Settings.h" +#include "MonoInstance.h" +#if defined(WIN32) && defined(_MSC_VER) +#include "../msvc/msvc_fix.h" +#endif + + + +/* + CElectricSheep_Win32(). + Windows specific client code. +*/ +class CElectricSheep_Win32 : public CElectricSheep +{ + CMonoInstance g_SingleInstanceObj; + enum eScrMode + { + eNone, + eConfig, // Forks the config user interface. + ePassword, // Currently ignored, handled by windows anyway for XP>. + ePreview, // Will ignore events, renders into small preview window. + eSaver, // Full screensaver mode. + eFullScreenStandalone, // Full screen + eWindowed, // Windowed mode, will ignore mouse events from exiting. + eWindowed_AllowMultipleInstances, // Same as eWindowed, but allows multiple instances. + }; + + // Mode deduced from cmdline parsing. + eScrMode m_ScrMode; + IDirect3D9 * m_pD3D9; + + // Previous mouse pos, for movement calcs. + bool m_bMouseUnknown; + int32 m_MouseX, m_MouseY; + + bool m_bAllowFKey; + + // Grab a string from the registry. + HRESULT RegGetString( HKEY hKey, LPCSTR szValueName, LPSTR * lpszResult ) + { + #define MAXBUF 4096 + + // Given a HKEY and value name returns a string from the registry. + // Upon successful return the string should be freed using free(). + // eg. RegGetString(hKey, TEXT("my value"), &szString); + + DWORD dwType = 0, dwDataSize = 0, dwBufSize = 0; + LONG lResult; + + // In case we fail set the return string to null... + if( lpszResult != NULL ) + *lpszResult = NULL; + + // Check input parameters... + if( hKey == NULL || lpszResult == NULL ) + return E_INVALIDARG; + + // Get the length of the string in bytes (placed in dwDataSize)... + lResult = RegQueryValueExA(hKey, szValueName, 0, &dwType, NULL, &dwDataSize ); + + // Check result and make sure the registry value is a string(REG_SZ)... + if( lResult != ERROR_SUCCESS ) + return HRESULT_FROM_WIN32( lResult ); + else if( dwType != REG_SZ ) + return DISP_E_TYPEMISMATCH; + + // Allocate memory for string - We add space for a null terminating character... + dwBufSize = dwDataSize + (1 * sizeof(CHAR) ); + *lpszResult = (CHAR *)malloc( dwBufSize ); + + if( *lpszResult == NULL ) + return E_OUTOFMEMORY; + + // Now get the actual string from the registry... + lResult = RegQueryValueExA( hKey, szValueName, 0, &dwType, (LPBYTE)*lpszResult, &dwDataSize ); + + // Check result and type again. If we fail here we must free the memory we allocated... + if( lResult != ERROR_SUCCESS ) + { + free( *lpszResult ); + return HRESULT_FROM_WIN32( lResult ); + } + else if( dwType != REG_SZ ) + { + free( *lpszResult ); + return DISP_E_TYPEMISMATCH; + } + + // We are not guaranteed a null terminated string from RegQueryValueEx so explicitly null terminate the returned string... + (*lpszResult)[ (dwBufSize / sizeof(CHAR)) - 1 ] = '\0'; + + return NOERROR; + } + + public: + CElectricSheep_Win32() : CElectricSheep(), g_SingleInstanceObj( "Global\\{"CLIENT_VERSION_PRETTY"}" ), m_bAllowFKey(false), m_pD3D9(NULL) + { + printf( "CElectricSheep_Win32()\n" ); + + // Windows spawns a screensaver process with idle priority, which will compete with forked generators. + if( SetPriorityClass( GetCurrentProcess(), NORMAL_PRIORITY_CLASS ) ) + printf( "Changed priority class to normal\n" ); + else + printf( "Failed to change priority class\n" ); + } + + virtual ~CElectricSheep_Win32() + { + if (m_pD3D9 != NULL) + { + m_pD3D9->Release(); + } + if( m_ScrMode == eSaver || m_ScrMode == eFullScreenStandalone) + { + //BOOL bUnused; + //SystemParametersInfo( SPI_SCREENSAVERRUNNING, FALSE, &bUnused, WM_SETTINGCHANGE ); + } + //SystemParametersInfo( SPI_SETSCREENSAVEACTIVE, TRUE, NULL, WM_SETTINGCHANGE ); + } + + // + virtual bool Startup() + { + // Check for multiple instances. + + m_ScrMode = eNone; + + // Some very ugly win32 screensaver cmdline parsing. + char *c = GetCommandLineA(); + if( *c=='\"' ) + { + c++; + while( *c!=0 && *c!='\"' ) + c++; + } + else + { + while( *c!=0 && *c!=' ') + c++; + } + + if( *c != 0 ) + c++; + + while( *c==' ' ) + c++; + + HWND hwnd = NULL; + + if( *c==0 ) + { + m_ScrMode = eConfig; + hwnd = NULL; + } + else + { + if( *c=='-' || *c=='/' ) + c++; + + if( *c=='p' || *c=='P' || *c=='l' || *c=='L' ) + { + c++; + while( *c==' ' || *c==':' ) + c++; + + hwnd = (HWND)atoi(c); + m_ScrMode = ePreview; + } + else if( *c=='s' || *c=='S' ) + { + //SystemParametersInfo( SPI_SETSCREENSAVEACTIVE, FALSE, NULL, WM_SETTINGCHANGE ); + m_ScrMode = eSaver; + } + else if( *c=='c' || *c=='C' ) + { + c++; + while( *c==' ' || *c==':' ) + c++; + + m_ScrMode = eConfig; + } + else if( *c=='a' || *c=='A' ) + { + c++; + while( *c==' ' || *c==':' ) + c++; + + hwnd = (HWND)atoi(c); + m_ScrMode = ePassword; + } + // Windowed test mode. + else if( *c=='t' || *c=='T' ) + { + m_ScrMode = eWindowed; + } + // Windowed test mode which allows multiple instances. + else if( *c=='x' || *c=='X' ) + { + m_ScrMode = eWindowed_AllowMultipleInstances; + m_bAllowFKey = true; + } + // fullscreen with working F keys + else if (*c=='r' || *c=='R' ) + { + //SystemParametersInfo( SPI_SETSCREENSAVEACTIVE, FALSE, NULL, WM_SETTINGCHANGE ); + m_ScrMode = eFullScreenStandalone; + m_bAllowFKey = true; + } + } + + // Check for multiple instances if we're not specifically asked not to. + if( m_ScrMode != eWindowed_AllowMultipleInstances && m_ScrMode != eSaver && m_ScrMode != eConfig && m_ScrMode != eFullScreenStandalone) + { + if( g_SingleInstanceObj.IsAnotherInstanceRunning() ) + { + //return false; // we could also exit here to prevent second instance + m_MultipleInstancesMode = true; + } + } else + { + // Instance check taken care of so revert back to eWindowed. + if ( g_SingleInstanceObj.IsAnotherInstanceRunning() == false) + { + if (m_ScrMode != eSaver && m_ScrMode != eConfig && m_ScrMode != eFullScreenStandalone) + m_ScrMode = eWindowed; // treat first instance normally + } + else + m_MultipleInstancesMode = true; + } + + char szPath[ MAX_PATH ]; + if( SUCCEEDED( SHGetFolderPathA( NULL, CSIDL_COMMON_APPDATA, NULL, 0, szPath ) ) ) + { + PathAppendA( szPath, "\\ElectricSheep\\" ); + m_AppData = szPath; + } + + // Get the application installation directory from the registry. (stored by the installer) + m_WorkingDir = ".\\"; + + HKEY key; + if( !RegOpenKeyA( HKEY_LOCAL_MACHINE, "SOFTWARE\\ElectricSheep", &key ) ) + { + LPSTR temp; + if( RegGetString( key, "InstallDir", &temp ) == NOERROR ) + { + m_WorkingDir = temp; + free( temp ); + } + RegCloseKey(key); + } + // If the exe is renamed to .scr, the path lacks trailing slashes for some bizarre reason... + size_t len = m_WorkingDir.size(); + if( m_WorkingDir[ len - 1 ] != '\\' ) + { + m_WorkingDir.append( "\\" ); + } + + if (InitStorage(m_MultipleInstancesMode) == false) + { + MessageBox(NULL, L"Unable to initialize scripts. Try reinstalling.", L"Error!", MB_OK | MB_ICONERROR); + return false; + } + + if (g_SingleInstanceObj.IsAnotherInstanceRunning() == false) + AttachLog(); + + char szLogFileName[ MAX_PATH ] = ""; + + // Try to open the debug-report... + if( GetModuleFileNameA( NULL, szLogFileName, MAX_PATH ) ) + { + LPSTR lpszDot; + + // Look for the '.' before the "EXE" extension. Replace the extension with "RPT". + if(( lpszDot = strrchr( szLogFileName, '.' ) ) ) + { + lpszDot++; // Advance past the '.' + strcpy( lpszDot, "RPT" ); // "RPT" -> "Report" + } + else + strcat( szLogFileName, ".RPT" ); + } + else if( GetWindowsDirectoryA( szLogFileName, MAX_PATH ) ) + { + strcat( szLogFileName, "EXCHNDL.RPT" ); + } + + // Append each line into the logfile. + std::string line; + std::ifstream rptfile( szLogFileName ); + if( rptfile.is_open() ) + { + while( !rptfile.eof() ) + { + getline( rptfile, line ); + g_Log->Fatal( line.c_str() ); + } + + rptfile.close(); + + // And finally delete the report file. + if( remove( szLogFileName ) != 0 ) + g_Log->Warning( "Failed to remove .rpt file!" ); + } + + std::string tmp = "Working dir: " + m_WorkingDir; + g_Log->Info( tmp.c_str() ); + g_Log->Info( "Commandline: %s", GetCommandLineA() ); + + _chdir( m_WorkingDir.c_str() ); + + // Run gui. + if( m_ScrMode == eConfig ) + { + g_Log->Info( "Running config." ); +//#ifdef _DEBUG +// #pragma comment(lib, "wxbase29ud.lib") +// #pragma comment(lib, "wxmsw29ud_core.lib") +// #pragma comment(lib, "wxpngd.lib") +// #pragma comment(lib, "wxzlibd.lib") +//#else +// #pragma comment(lib, "wxbase29u.lib") +// #pragma comment(lib, "wxmsw29u_core.lib") +// #pragma comment(lib, "wxpng.lib") +// #pragma comment(lib, "wxzlib.lib") +//#endif +// #pragma comment(lib, "comctl32.lib") +// #pragma comment(lib, "rpcrt4.lib") +// +// wxApp::SetInstance(new wxWidgetsApp()); +// ::wxEntry( GetModuleHandle(NULL) ); + + + SHELLEXECUTEINFOA sei = {0}; + sei.cbSize = sizeof(sei); + sei.fMask = SEE_MASK_NOASYNC | SEE_MASK_NOCLOSEPROCESS; + sei.hwnd = NULL; + if (IsUserAnAdmin()) + sei.lpVerb = "open"; + else + sei.lpVerb = "runas"; + sei.lpFile = "settingsgui.exe"; + sei.lpParameters = NULL; + sei.lpDirectory = m_WorkingDir.c_str(); + sei.nShow = SW_SHOWNORMAL; + if (ShellExecuteExA(&sei) == TRUE) + { + WaitForSingleObject(sei.hProcess, INFINITE); + CloseHandle(sei.hProcess); + } + m_bConfigMode = true; + + return false; + } + + // Exit if we're not supposed to render anything... + if( m_ScrMode != eSaver && + m_ScrMode != eFullScreenStandalone && + m_ScrMode != ePreview && + m_ScrMode != eWindowed && + m_ScrMode != eWindowed_AllowMultipleInstances) + return false; + + // A window was provided, let's use it. + if( hwnd ) + g_Player().SetHWND( hwnd ); + + // To prevent ctrl+alt+del stuff. + //#warning NOTE (Keffo#1#): This is just annoying until all bugs are gone! + if( m_ScrMode == eSaver || m_ScrMode == eFullScreenStandalone) + { + //BOOL bUnused; + //SystemParametersInfo( SPI_SCREENSAVERRUNNING, TRUE, &bUnused, WM_SETTINGCHANGE ); + } + + // User wants windowed? + if( m_ScrMode == eWindowed || m_ScrMode == eWindowed_AllowMultipleInstances) + g_Player().Fullscreen( false ); + + uint32 monnum = g_Settings()->Get( "settings.player.screen", 0 ); + + m_pD3D9 = Direct3DCreate9( D3D_SDK_VERSION ); + + if ( g_Player().AddDisplay(g_Settings()->Get( "settings.player.screen", 0 ), m_pD3D9, + g_Settings()->Get( "settings.player.MultiDisplayMode", 0 ) == CPlayer::kMDSingleScreen && m_ScrMode != eFullScreenStandalone && m_ScrMode != eWindowed + ) == false) + { + bool foundfirstmon = false; + g_Log->Error( "AddDisplay failed for screen %d", monnum ); + g_Log->Info( "Trying to autodetect usable monitors..." ); + monnum = 0; + while (monnum < 9) + { + g_Log->Info( "Trying monitor %d", monnum ); + if (g_Player().AddDisplay( monnum, m_pD3D9 ) == true) + { + foundfirstmon = true; + g_Log->Info( "Monitor %d ok", monnum ); + break; + } + else + { + g_Log->Error( "Monitor %d failed", monnum ); + ++monnum; + } + } + if (foundfirstmon == false) + return false; + } else + g_Log->Info( "AddDisplay succeeded for screen %d", g_Settings()->Get( "settings.player.screen", 0 )); + if ( m_ScrMode != eWindowed && m_ScrMode != eWindowed_AllowMultipleInstances && g_Settings()->Get( "settings.player.MultiDisplayMode", 0 ) != CPlayer::kMDSingleScreen) + for ( DWORD dw = ( monnum + 1 ); dw < g_Player().Display()->GetNumMonitors(); ++dw ) + { + if ( g_Player().AddDisplay( dw, m_pD3D9 ) == true ) + g_Log->Info( "AddDisplay succeeded for screen %d", dw ); + else + g_Log->Error( "AddDisplay failed for screen %d", dw ); + } + // + if( CElectricSheep::Startup() == false ) + return false; + + // Reset mouse calcs. + m_bMouseUnknown = true; + + return true; + } + + virtual bool HandleOneEvent( DisplayOutput::spCEvent & _event ) + { + // Handle events. + if( _event->Type() == DisplayOutput::CEvent::Event_Power ) + { + g_Log->Info( "Power broadcast event, closing..." ); + return false; + } + else + // Key events. + if( _event->Type() == DisplayOutput::CEvent::Event_KEY ) + { + DisplayOutput::spCKeyEvent spKey = static_cast( _event ); + + switch( spKey->m_Code ) + { + case DisplayOutput::CKeyEvent::KEY_Esc: + if (m_ScrMode != eFullScreenStandalone) // esc exits windowed and screensaver mode + return false; + else + { + ::Base::RecreateProcess(std::string("-X")); + return false; + } + break; + + case DisplayOutput::CKeyEvent::KEY_F: + if (m_bAllowFKey == true) + { + if (m_ScrMode == eWindowed || m_ScrMode == eWindowed_AllowMultipleInstances) + { + // restart or change display here + ::Base::RecreateProcess(std::string("-R")); + return false; + } else + { + ::Base::RecreateProcess(std::string("-X")); + return false; + } + } + break; + case DisplayOutput::CKeyEvent::KEY_TAB: + if (m_ScrMode != eWindowed && m_ScrMode != eWindowed_AllowMultipleInstances && m_ScrMode != eFullScreenStandalone) + return false; + break; + case DisplayOutput::CKeyEvent::KEY_LALT: + case DisplayOutput::CKeyEvent::KEY_MENU: + case DisplayOutput::CKeyEvent::KEY_CTRL: + break; + + // All other keys close... + default: + { + uint32 x = spKey->m_Code; + g_Log->Info( "Key event, closing" ); + return false; + } + } + return true; + } + else + // Process mouse events (ignored in eStandalone mode). + if( _event->Type() == DisplayOutput::CEvent::Event_Mouse ) + { + + if( m_ScrMode != eWindowed + && m_ScrMode != eWindowed_AllowMultipleInstances + && m_ScrMode != ePreview + && m_ScrMode != eFullScreenStandalone ) + { + DisplayOutput::spCMouseEvent spMouse = static_cast( _event ); + + if( spMouse->m_Code == DisplayOutput::CMouseEvent::Mouse_MOVE ) + { + fp4 dx = (fp4)spMouse->m_X - (fp4)m_MouseX; + fp4 dy = (fp4)spMouse->m_Y - (fp4)m_MouseY; + fp4 dist = dx*dx + dy*dy; + + // Store for next run. + m_MouseX = spMouse->m_X; + m_MouseY = spMouse->m_Y; + + if( !m_bMouseUnknown ) + { + // Exit if mouse moved > 20 pixels... + if( dist > 20*20 ) + { + g_Log->Info( "Mouse moved too far(%f), closing...", Base::Math::Sqrt(dist) ); + return false; + } + } + else g_Log->Info( "(ignored) Mouse move (%f)", Base::Math::Sqrt( dist ) ); + + m_bMouseUnknown = false; + return true; + } + else + { + // All other mouse events exit. + return false; + } + } + return true; + } + return false; + } + + virtual bool HandleEvents() + { + DisplayOutput::spCDisplayOutput spDisplay = g_Player().Display(); + + // Handle events. + DisplayOutput::spCEvent spEvent; + while( spDisplay->GetEvent( spEvent ) ) + { + if ( HandleOneEvent( spEvent ) == false ) + { + if (CElectricSheep::HandleOneEvent( spEvent ) == false) + return false; + } + } + + return true; + } + // + bool Update() + { + g_Player().Framerate( m_CurrentFps ); + + if( !CElectricSheep::Update() ) + return false; + + DisplayOutput::spCDisplayOutput spDisplay = g_Player().Display(); + + // We ignore events in preview mode. + if( m_ScrMode == ePreview ) + { + spDisplay->ClearEvents(); + return true; + } + + static const fp4 voteDelaySeconds = 1; + return HandleEvents(); + } + + virtual std::string GetVersion() + { + return CLIENT_VERSION; + } + + virtual int GetACLineStatus() + { + SYSTEM_POWER_STATUS systemPowerStatus = {0}; + if (GetSystemPowerStatus(&systemPowerStatus) != 0) + { + if ((systemPowerStatus.BatteryFlag && 128 != 0) || (systemPowerStatus.BatteryFlag && 255 != 0)) + return -1; // no battery + return systemPowerStatus.ACLineStatus; + } + return -1; + } +}; + + +#endif // CLIENT_H_INCLUDED diff -Nru electricsheep-2.7~b12+svn20091224/Client/Console.h electricsheep-3.0.2-git20180325/Client/Console.h --- electricsheep-2.7~b12+svn20091224/Client/Console.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/Console.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,32 @@ +#ifndef _CONSOLE_H_ +#define _CONSOLE_H_ + +#include "Hud.h" +#include "Rect.h" +#include "Font.h" + +namespace Hud +{ + +/* + CConsole. + +*/ +class CConsole : public CHudEntry +{ + protected: + + DisplayOutput::spCBaseFont m_spFont; + + public: + CConsole( Base::Math::CRect _rect ) : CHudEntry( _rect ) {}; + virtual ~CConsole() {}; + + virtual bool Render( const fp8 _time, DisplayOutput::spCRenderer _spRenderer ) = PureVirtual; +}; + +MakeSmartPointers( CConsole ); + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Client/cpu_usage_linux.h electricsheep-3.0.2-git20180325/Client/cpu_usage_linux.h --- electricsheep-2.7~b12+svn20091224/Client/cpu_usage_linux.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/cpu_usage_linux.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,114 @@ +#ifndef _CPU_USAGE_LINUX_H_ +#define _CPU_USAGE_LINUX_H_ + +#include +#include + +#include +#include + +class ESCpuUsage +{ + Base::CTimer m_Timer; + fp8 m_LastCPUCheckTime; + + fp8 m_LastSystemTime; + fp8 m_LastESTime; + + glibtop *glibtopdata; + glibtop_cpu m_lastProcessorInfo, m_currentProcessorInfo; + + int numProcessors; + +public: + ESCpuUsage(): m_LastCPUCheckTime(0) + { + + glibtopdata = glibtop_init(); + + m_Timer.Reset(); + m_LastCPUCheckTime = m_Timer.Time(); + + struct rusage r_usage; + if (!getrusage(RUSAGE_SELF, &r_usage)) { + + m_LastESTime = (fp8)r_usage.ru_utime.tv_sec + (fp8)r_usage.ru_utime.tv_usec * 1e-6; + + m_LastESTime += (fp8)r_usage.ru_stime.tv_sec + (fp8)r_usage.ru_stime.tv_usec * 1e-6; + + } + + numProcessors = glibtopdata->ncpu + 1; + glibtop_get_cpu (&m_lastProcessorInfo); + } + + virtual ~ESCpuUsage() + { + } + + bool GetCpuUsage(int &_total, int &_es) + { + struct rusage r_usage; + + fp8 newtime = m_Timer.Time(); + + fp8 period = newtime - m_LastCPUCheckTime; + if (period > 0.) + { + if (!getrusage(RUSAGE_SELF, &r_usage)) + { + + fp8 utime = (fp8)r_usage.ru_utime.tv_sec + (fp8)r_usage.ru_utime.tv_usec * 1e-6; + + utime += (fp8)r_usage.ru_stime.tv_sec + (fp8)r_usage.ru_stime.tv_usec * 1e-6; + + _es = int ( ( utime - m_LastESTime ) * 100. / period ); + + m_LastESTime = utime; + } + + float accInUse = 0.0f, accTotal = 0.0f; + + glibtop_get_cpu (&m_currentProcessorInfo); + + for(unsigned i = 0U; i < numProcessors; ++i) + { + float inUse, total; + + inUse = ( + (m_currentProcessorInfo.xcpu_user[i] - m_lastProcessorInfo.xcpu_user[i]) + + (m_currentProcessorInfo.xcpu_sys[i] - m_lastProcessorInfo.xcpu_sys[i]) + + (m_currentProcessorInfo.xcpu_nice[i] - m_lastProcessorInfo.xcpu_nice[i]) + ); + + total = inUse + (m_currentProcessorInfo.xcpu_idle[i] - m_lastProcessorInfo.xcpu_idle[i]); + + accInUse += inUse; + accTotal += total; + } + + _total = (fp8)accInUse * 100. / (fp8)accTotal; + + _es /= numProcessors; + + memcpy(&m_lastProcessorInfo, &m_currentProcessorInfo, sizeof( glibtop_cpu ) ); + + } + else + { + _es = 0; + _total = 0; + } + + _es = ::Base::Math::Clamped(_es, 0, 100); + _total = ::Base::Math::Clamped(_total, 0, 100); + + m_LastCPUCheckTime = newtime; + + return true; + } + +}; + + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Client/cpu_usage_mac.h electricsheep-3.0.2-git20180325/Client/cpu_usage_mac.h --- electricsheep-2.7~b12+svn20091224/Client/cpu_usage_mac.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/cpu_usage_mac.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,146 @@ +#ifndef _CPU_USAGE_MAC_H_ +#define _CPU_USAGE_MAC_H_ + +#include + +#include +#include +#include + + +class ESCpuUsage +{ + Base::CTimer m_Timer; + fp8 m_LastCPUCheckTime; + + fp8 m_LastESTime; + + processor_info_array_t m_lastProcessorInfo; + mach_msg_type_number_t m_lastNumProcessorInfo; + + +public: + ESCpuUsage(): m_LastCPUCheckTime(0) + { + m_Timer.Reset(); + m_LastCPUCheckTime = m_Timer.Time(); + + struct rusage r_usage; + if (!getrusage(RUSAGE_SELF, &r_usage)) { + + m_LastESTime = (fp8)r_usage.ru_utime.tv_sec + (fp8)r_usage.ru_utime.tv_usec * 1e-6; + + m_LastESTime += (fp8)r_usage.ru_stime.tv_sec + (fp8)r_usage.ru_stime.tv_usec * 1e-6; + + } + + processor_info_array_t processorInfo; + mach_msg_type_number_t numProcessorInfo; + natural_t numProcessors = 0U; + + kern_return_t err = host_processor_info(mach_host_self(), PROCESSOR_CPU_LOAD_INFO, &numProcessors, &processorInfo, &numProcessorInfo); + if(err == KERN_SUCCESS) + { + m_lastProcessorInfo = processorInfo; + m_lastNumProcessorInfo = numProcessorInfo; + } + else + { + m_lastProcessorInfo = NULL; + m_lastNumProcessorInfo = 0; + } + + } + + virtual ~ESCpuUsage() + { + if(m_lastProcessorInfo) + { + size_t lastProcessorInfoSize = sizeof(integer_t) * m_lastNumProcessorInfo; + vm_deallocate(mach_task_self(), (vm_address_t)m_lastProcessorInfo, lastProcessorInfoSize); + } + } + + bool GetCpuUsage(int &_total, int &_es) + { + struct rusage r_usage; + + fp8 newtime = m_Timer.Time(); + + fp8 period = newtime - m_LastCPUCheckTime; + if (period > 0.) + { + if (!getrusage(RUSAGE_SELF, &r_usage)) + { + + fp8 utime = (fp8)r_usage.ru_utime.tv_sec + (fp8)r_usage.ru_utime.tv_usec * 1e-6; + + utime += (fp8)r_usage.ru_stime.tv_sec + (fp8)r_usage.ru_stime.tv_usec * 1e-6; + + _es = int ( ( utime - m_LastESTime ) * 100. / period ); + + m_LastESTime = utime; + } + + processor_info_array_t processorInfo; + mach_msg_type_number_t numProcessorInfo; + natural_t numProcessors = 0U; + + kern_return_t err = host_processor_info(mach_host_self(), PROCESSOR_CPU_LOAD_INFO, &numProcessors, &processorInfo, &numProcessorInfo); + if(err == KERN_SUCCESS) + { + float accInUse = 0.0f, accTotal = 0.0f; + + for(unsigned i = 0U; i < numProcessors; ++i) + { + float inUse, total; + + if(m_lastProcessorInfo) + { + inUse = ( + (processorInfo[(CPU_STATE_MAX * i) + CPU_STATE_USER] - m_lastProcessorInfo[(CPU_STATE_MAX * i) + CPU_STATE_USER]) + + (processorInfo[(CPU_STATE_MAX * i) + CPU_STATE_SYSTEM] - m_lastProcessorInfo[(CPU_STATE_MAX * i) + CPU_STATE_SYSTEM]) + + (processorInfo[(CPU_STATE_MAX * i) + CPU_STATE_NICE] - m_lastProcessorInfo[(CPU_STATE_MAX * i) + CPU_STATE_NICE]) + ); + + total = inUse + (processorInfo[(CPU_STATE_MAX * i) + CPU_STATE_IDLE] - m_lastProcessorInfo[(CPU_STATE_MAX * i) + CPU_STATE_IDLE]); + } else { + inUse = processorInfo[(CPU_STATE_MAX * i) + CPU_STATE_USER] + processorInfo[(CPU_STATE_MAX * i) + CPU_STATE_SYSTEM] + processorInfo[(CPU_STATE_MAX * i) + CPU_STATE_NICE]; + total = inUse + processorInfo[(CPU_STATE_MAX * i) + CPU_STATE_IDLE]; + } + + accInUse += inUse; + accTotal += total; + } + + _total = static_cast((fp8)accInUse * 100. / (fp8)accTotal); + + _es /= numProcessors; + + if(m_lastProcessorInfo) + { + size_t lastProcessorInfoSize = sizeof(integer_t) * m_lastNumProcessorInfo; + vm_deallocate(mach_task_self(), (vm_address_t)m_lastProcessorInfo, lastProcessorInfoSize); + } + + m_lastProcessorInfo = processorInfo; + m_lastNumProcessorInfo = numProcessorInfo; + } + } + else + { + _es = 0; + _total = 0; + } + + _es = ::Base::Math::Clamped(_es, 0, 100); + _total = ::Base::Math::Clamped(_total, 0, 100); + + m_LastCPUCheckTime = newtime; + + return true; + } + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Client/CrossFade.h electricsheep-3.0.2-git20180325/Client/CrossFade.h --- electricsheep-2.7~b12+svn20091224/Client/CrossFade.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/CrossFade.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,98 @@ +#ifndef _CROSSFADE_H_ +#define _CROSSFADE_H_ + +#include "Hud.h" +#include "Rect.h" + +namespace Hud +{ + +/* + CFade. + +*/ +class CCrossFade : public CHudEntry +{ + DisplayOutput::spCTextureFlat m_spTexture; + bool m_bSkipped; + bool m_bSkipToNext; + uint32 m_currID; + + public: + CCrossFade( uint32 width, uint32 height, bool skipToNext ) : CHudEntry( Base::Math::CRect(fp4(width), fp4(height) ) ), m_bSkipped(false), m_bSkipToNext(skipToNext) + { + DisplayOutput::spCImage tmpImage = new DisplayOutput::CImage(); + + tmpImage->Create( width, height, DisplayOutput::eImage_RGBA8, 0, false ); + + for (uint32 x = 0; x < width; x++) + { + for (uint32 y = 0; y < height; y++) + { + tmpImage->PutPixel(static_cast(x), static_cast(y), 0, 0, 0, 255); + } + } + + m_spTexture = g_Player().Renderer()->NewTextureFlat(); + m_spTexture->Upload( tmpImage ); + } + + virtual ~CCrossFade() + { + } + + // Override to make it always visible. + virtual bool Visible() const { return true; }; + + void Reset() + { + m_bSkipped = false; + m_currID = g_Player().GetCurrentPlayingID(); + } + + virtual bool Render( const fp8 _time, DisplayOutput::spCRenderer _spRenderer ) + { + if( !CHudEntry::Render( _time, _spRenderer ) ) + return false; + + if( m_spTexture == NULL ) + return false; + + DisplayOutput::spCRenderer spRenderer = g_Player().Renderer(); + + spRenderer->Reset( DisplayOutput::eTexture | DisplayOutput::eShader ); + spRenderer->SetTexture( m_spTexture, 0 ); + spRenderer->SetBlend( "alphablend" ); + spRenderer->Apply(); + + fp4 alpha = fp4(m_Delta * 4.0f); + + if (alpha > 1.0f) + { + if (!m_bSkipped && m_bSkipToNext) + { + //skip to another only if we are still in the same sheep as at the beginning. + if ( m_currID == g_Player().GetCurrentPlayingID() ) + g_Player().SkipToNext(); + + m_bSkipped = true; + } + + if (alpha > 2.0f) + alpha = 1.0f - ( alpha - 1.0f ); + else + alpha = 1.0f; + } + + spRenderer->DrawQuad( Base::Math::CRect( 1, 1 ), Base::Math::CVector4( 1,1,1, alpha ), m_spTexture->GetRect() ); + + return true; + } +}; + +MakeSmartPointers( CCrossFade ); + +}; + +#endif + diff -Nru electricsheep-2.7~b12+svn20091224/Client/CubicFrameDisplay.h electricsheep-3.0.2-git20180325/Client/CubicFrameDisplay.h --- electricsheep-2.7~b12+svn20091224/Client/CubicFrameDisplay.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/CubicFrameDisplay.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,366 @@ +#ifndef _CUBICFRAMEDISPLAY_H_ +#define _CUBICFRAMEDISPLAY_H_ + +#include "Rect.h" +#include "Vector4.h" + +/* + CCubicFrameDisplay(). + Does a piecewise cubic interpolation between two frames using Mitchell Netravali reconstruction filter. +*/ +class CCubicFrameDisplay : public CFrameDisplay +{ + static const uint32 kMaxFrames = 4; + + fp4 m_LastAlpha; + DisplayOutput::spCShader m_spShader; + + // The four frames. + DisplayOutput::spCTextureFlat m_spFrames[ 2 * kMaxFrames ]; + + // Simple ringbuffer... + uint32 m_Frames[ kMaxFrames ]; + uint32 m_NumFrames; + uint32 m_NumSecondFrames; + + bool m_bWaitNextFrame; + + // Mitchell Netravali Reconstruction Filter. + fp4 MitchellNetravali( const fp4 _x, const fp4 _B, const fp4 _C ) + { + float ax = fabsf(_x); + + if( ax < 1.f ) + return( (12.f - 9.f * _B - 6.f * _C) * ax * ax * ax + (-18.f + 12.f * _B + 6.f * _C) * ax * ax + (6.f - 2.f * _B)) / 6.f; + else if( (ax >= 1.f) && (ax < 2.f) ) + return ((-_B - 6.f * _C) * ax * ax * ax + (6.f * _B + 30.f * _C) * ax * ax + (-12.f * _B - 48.f * _C) * ax + (8.f * _B + 24.f * _C)) / 6.f; + else + return 0.f; + } + + public: + CCubicFrameDisplay( DisplayOutput::spCRenderer _spRenderer ) : CFrameDisplay( _spRenderer ) + { + // glsl fragment shader + static const char *cubic_fragmentshaderGL2D = "\ + uniform sampler2D texUnit1; \ + uniform sampler2D texUnit2; \ + uniform sampler2D texUnit3; \ + uniform sampler2D texUnit4; \ + uniform sampler2D texUnit5; \ + uniform sampler2D texUnit6; \ + uniform sampler2D texUnit7; \ + uniform sampler2D texUnit8; \ + uniform vec4 weights;\ + uniform float newalpha;\ + uniform float transPct;\ + void main(void)\ + {\ + vec4 pos, c1, c2, c3, c4;\ + vec4 fc1, fc2;\ + \ + pos = gl_TexCoord[0];\ + c1 = texture2D( texUnit1, pos.st );\ + c2 = texture2D( texUnit2, pos.st );\ + c3 = texture2D( texUnit3, pos.st );\ + c4 = texture2D( texUnit4, pos.st );\ + \ + fc1 = ( c1 * weights.x ) + ( c2 * weights.y ) + ( c3 * weights.z ) + ( c4 * weights.w );\ + \ + c1 = texture2D( texUnit5, pos.st );\ + c2 = texture2D( texUnit6, pos.st );\ + c3 = texture2D( texUnit7, pos.st );\ + c4 = texture2D( texUnit8, pos.st );\ + \ + fc2 = ( c1 * weights.x ) + ( c2 * weights.y ) + ( c3 * weights.z ) + ( c4 * weights.w );\ + \ + gl_FragColor = mix(fc1, fc2, transPct / 100.0); \ + gl_FragColor.a = newalpha;\ + }"; + + // glsl fragment shader 2DRect + static const char *cubic_fragmentshaderGL2DRect = "\ + uniform sampler2DRect texUnit1; \ + uniform sampler2DRect texUnit2; \ + uniform sampler2DRect texUnit3; \ + uniform sampler2DRect texUnit4; \ + uniform sampler2DRect texUnit5; \ + uniform sampler2DRect texUnit6; \ + uniform sampler2DRect texUnit7; \ + uniform sampler2DRect texUnit8; \ + uniform vec4 weights;\ + uniform float newalpha;\ + uniform float transPct;\ + void main(void)\ + {\ + vec4 pos, c1, c2, c3, c4;\ + vec4 fc1, fc2;\ + \ + pos = gl_TexCoord[0];\ + c1 = texture2DRect( texUnit1, pos.st );\ + c2 = texture2DRect( texUnit2, pos.st );\ + c3 = texture2DRect( texUnit3, pos.st );\ + c4 = texture2DRect( texUnit4, pos.st );\ + \ + fc1 = ( c1 * weights.x ) + ( c2 * weights.y ) + ( c3 * weights.z ) + ( c4 * weights.w );\ + \ + c1 = texture2DRect( texUnit5, pos.st );\ + c2 = texture2DRect( texUnit6, pos.st );\ + c3 = texture2DRect( texUnit7, pos.st );\ + c4 = texture2DRect( texUnit8, pos.st );\ + \ + fc2 = ( c1 * weights.x ) + ( c2 * weights.y ) + ( c3 * weights.z ) + ( c4 * weights.w );\ + \ + gl_FragColor = mix(fc1, fc2, transPct / 100.0); \ + gl_FragColor.a = newalpha;\ + }"; + + //gl_FragColor = ( c0 * weights.x ) + ( c1 * weights.y ) + ( c2 * weights.z ) + ( c3 * weights.w ); + // hlsl vertexshader... + static const char *cubic_vertexshader = "\ + float4x4 WorldViewProj: WORLDVIEWPROJECTION;\ + struct VS_OUTPUT\ + {\ + float4 Pos : POSITION;\ + float2 Tex : TEXCOORD0;\ + };\ + VS_OUTPUT main( float4 Pos : POSITION, float2 Tex : TEXCOORD0 )\ + {\ + VS_OUTPUT Out = (VS_OUTPUT)0;\ + Out.Pos = mul( Pos, WorldViewProj );\ + Out.Tex = Tex;\ + return Out;\ + }"; + + // hlsl fragmentshader. + static const char *cubic_fragmentshaderDX = "\ + sampler2D texUnit1: register(s1);\ + sampler2D texUnit2: register(s2);\ + sampler2D texUnit3: register(s3);\ + sampler2D texUnit4: register(s4);\ + sampler2D texUnit5: register(s5);\ + sampler2D texUnit6: register(s6);\ + sampler2D texUnit7: register(s7);\ + sampler2D texUnit8: register(s8);\ + float4 weights;\ + float newalpha;\ + float transPct;\ + float4 main( float2 _uv : TEXCOORD0 ) : COLOR0\ + {\ + float4 c1 = tex2D( texUnit1, _uv );\ + float4 c2 = tex2D( texUnit2, _uv );\ + float4 c3 = tex2D( texUnit3, _uv );\ + float4 c4 = tex2D( texUnit4, _uv );\ + float4 c5 = ( c1 * weights.x ) + ( c2 * weights.y ) + ( c3 * weights.z ) + ( c4 * weights.w );\ + c1 = tex2D( texUnit5, _uv );\ + c2 = tex2D( texUnit6, _uv );\ + c3 = tex2D( texUnit7, _uv );\ + c4 = tex2D( texUnit8, _uv );\ + float4 c6 = ( c1 * weights.x ) + ( c2 * weights.y ) + ( c3 * weights.z ) + ( c4 * weights.w );\ + float4 c7 = lerp( c5, c6, transPct / 100.0 );\ + c7.a = newalpha;\ + return c7;\ + }"; + + + // Compile the shader. + if( _spRenderer->Type() == DisplayOutput::eDX9 ) + m_spShader = _spRenderer->NewShader( cubic_vertexshader, cubic_fragmentshaderDX ); + else + m_spShader = _spRenderer->NewShader( NULL, ( _spRenderer->GetTextureTargetType() == DisplayOutput::eTexture2DRect ) ? cubic_fragmentshaderGL2DRect : cubic_fragmentshaderGL2D ); + + if( !m_spShader ) + m_bValid = false; + + m_NumFrames = 0; + m_NumSecondFrames = 0; + + m_Frames[0] = 0; + m_Frames[1] = 1; + m_Frames[2] = 2; + m_Frames[3] = 3; + + m_bWaitNextFrame = false; + } + + virtual ~CCubicFrameDisplay() + { + } + + // Decode a frame every 1/_fpsCap seconds, store the previous 4 frames, and lerp between them. + virtual bool Update( ContentDecoder::spCContentDecoder _spDecoder, const fp8 _decodeFps, const fp8 /*_displayFps*/, ContentDecoder::sMetaData &_metadata ) + { + fp4 currentalpha = m_LastAlpha; + bool frameGrabbed = false; + bool isSeam = false; + + if (m_bWaitNextFrame) + { +#if !defined(WIN32) && !defined(_MSC_VER) + if ( !GrabFrame( _spDecoder, m_spFrames[ m_Frames[3] ], m_spFrames[ m_Frames[3] + kMaxFrames ], _metadata) ) + { + return false; + } + else + { + frameGrabbed = true; + + Reset(); + + m_bWaitNextFrame = false; + } + +#else + if ( GrabFrame( _spDecoder, m_spFrames[ m_Frames[3] ], m_spFrames[ m_Frames[3] + kMaxFrames ], _metadata ) ) + { + frameGrabbed = true; + + Reset(); + + m_bWaitNextFrame = false; + } +#endif + } + else + { + if( UpdateInterframeDelta( _decodeFps) ) + { + // Shift array back one step. + uint32 tmp = m_Frames[ 0 ]; + m_Frames[ 0 ] = m_Frames[ 1 ]; + m_Frames[ 1 ] = m_Frames[ 2 ]; + m_Frames[ 2 ] = m_Frames[ 3 ]; + m_Frames[ 3 ] = tmp; + + // ... and fill the frontmost slot. + if( !GrabFrame( _spDecoder, m_spFrames[ m_Frames[3] ], m_spFrames[ m_Frames[3] + kMaxFrames ], _metadata ) ) + { + m_bWaitNextFrame = true; +#if !defined(WIN32) && !defined(_MSC_VER) + return false; +#else + m_NumFrames--; +#endif + } + else + frameGrabbed = true; + } + else + { + currentalpha = (fp4)Base::Math::Clamped(m_LastAlpha + + Base::Math::Clamped(m_InterframeDelta/m_FadeCount, 0., 1./m_FadeCount) + , 0., 1.); + } + } + + if (frameGrabbed) + { + m_MetaData = _metadata; + m_LastAlpha = m_MetaData.m_Fade; + currentalpha = m_LastAlpha; + + m_NumFrames++; + + if (m_spFrames[ m_Frames[3] + kMaxFrames ].IsNull()) + m_NumSecondFrames = 0; + else + m_NumSecondFrames++; + + isSeam = _metadata.m_IsSeam; + } + + + if (m_NumFrames > 0 && !m_spFrames[ m_Frames[3] ].IsNull()) + { + // Enable the shader. + m_spRenderer->SetShader( m_spShader ); + + if (isSeam) + { + m_spFrames[ m_Frames[0] ] = m_spFrames[ m_Frames[0] + kMaxFrames ]; + m_spFrames[ m_Frames[1] ] = m_spFrames[ m_Frames[1] + kMaxFrames ]; + m_spFrames[ m_Frames[2] ] = m_spFrames[ m_Frames[2] + kMaxFrames ]; + + m_spFrames[ m_Frames[0] + kMaxFrames ] = NULL; + m_spFrames[ m_Frames[1] + kMaxFrames ] = NULL; + m_spFrames[ m_Frames[2] + kMaxFrames ] = NULL; + } + + uint32 framesToUse = m_NumFrames; + + if (framesToUse > kMaxFrames) + framesToUse = kMaxFrames; + + uint32 i; + + for (i = 0; i < kMaxFrames-framesToUse; i++) + { + uint32 realIdx = m_Frames[ kMaxFrames-framesToUse ]; + + m_spRenderer->SetTexture( m_spFrames[ realIdx ], i + 1); + } + + for (i = kMaxFrames-framesToUse; i < kMaxFrames; i++) + { + uint32 realIdx = m_Frames[i]; + + m_spRenderer->SetTexture( m_spFrames[ realIdx ], i + 1); + } + + if ( m_NumSecondFrames > 0 && !m_spFrames[ m_Frames[3] + kMaxFrames ].IsNull() ) + { + + uint32 secFrameToUse = m_NumSecondFrames; + + if (secFrameToUse > kMaxFrames) + secFrameToUse = kMaxFrames; + + for (i = 0; i < kMaxFrames-secFrameToUse; i++) + { + uint32 realIdx = m_Frames[ kMaxFrames-secFrameToUse ]; + + m_spRenderer->SetTexture( m_spFrames[ realIdx + kMaxFrames ], i + kMaxFrames + 1); + } + + for (i = kMaxFrames-secFrameToUse; i < kMaxFrames; i++) + { + uint32 realIdx = m_Frames[i]; + + m_spRenderer->SetTexture( m_spFrames[ realIdx + kMaxFrames ], i + kMaxFrames + 1); + } + } + + // B = 1, C = 0 - cubic B-spline + // B = 1/3, C = 1/3 - nice + // B = 0, C = 1/2 - Catmull-Rom spline. + const fp4 B = 1.0f; + const fp4 C = 0.0f; + + // Set the filter weights... + m_spShader->Set( "weights", MitchellNetravali( fp4(m_InterframeDelta) + 1.f, B, C ), MitchellNetravali( fp4(m_InterframeDelta), B, C ), + MitchellNetravali( 1.f - fp4(m_InterframeDelta), B, C ), MitchellNetravali( 2.f - fp4(m_InterframeDelta), B, C ) ); + m_spShader->Set( "newalpha", currentalpha); + + m_spShader->Set( "transPct", m_MetaData.m_TransitionProgress); + + m_spRenderer->SetBlend( "alphablend" ); + m_spRenderer->Apply(); + + UpdateTexRect( m_spFrames[ m_Frames[3] ]->GetRect() ); + + m_spRenderer->DrawQuad( m_texRect, Base::Math::CVector4( 1, 1, 1, currentalpha), m_spFrames[ m_Frames[3] ]->GetRect() ); + } + + return true; + } + + virtual fp8 GetFps( fp8 /*_decodeFps*/, fp8 _displayFps ) + { + return _displayFps; + } +}; + +MakeSmartPointers( CCubicFrameDisplay ); + +#endif + diff -Nru electricsheep-2.7~b12+svn20091224/Client/FrameDisplay.h electricsheep-3.0.2-git20180325/Client/FrameDisplay.h --- electricsheep-2.7~b12+svn20091224/Client/FrameDisplay.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/FrameDisplay.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,377 @@ +#ifndef _FRAMEDISPLAY_H_ +#define _FRAMEDISPLAY_H_ + +#include "TextureFlat.h" +#include "Player.h" +#include "Rect.h" +#include "Vector4.h" + +//#ifndef FRAME_DIAG +//#define FRAME_DIAG +//#endif + +/* + CFrameDisplay(). + Basic display handling, simply blits texture. +*/ +class CFrameDisplay +{ + // To keep track of in-between frame times. + fp8 m_Clock; + fp8 m_Acc; + fp8 m_T; + + fp4 m_LastAlpha; + + fp8 m_LastTexMoveClock; + + fp4 m_CurTexMoveOff; + + fp4 m_CurTexMoveDir; + + const fp8 TEX_MOVE_SECS = 60.f * 30.f; //30 minutes + + protected: + fp8 m_FadeCount; + + ContentDecoder::sMetaData m_MetaData; + // Temporary storage for decoded videoframe. + ContentDecoder::spCVideoFrame m_spFrameData; + DisplayOutput::spCImage m_spImageRef; + DisplayOutput::spCImage m_spSecondImageRef; + + DisplayOutput::spCRenderer m_spRenderer; + + // Dimensions of the display surface. + Base::Math::CRect m_dispSize; + + // texture Rect + Base::Math::CRect m_texRect; + + // To keep track of elapsed time. + Base::CTimer m_Timer; + + // Frame texture. + DisplayOutput::spCTextureFlat m_spVideoTexture; + + DisplayOutput::spCTextureFlat m_spSecondVideoTexture; + + bool m_bPreserveAR; + + // Grab a frame from the decoder and use it as a texture. + bool GrabFrame( ContentDecoder::spCContentDecoder _spDecoder, DisplayOutput::spCTextureFlat &_spTexture, DisplayOutput::spCTextureFlat &_spSecondTexture, ContentDecoder::sMetaData &_metadata ) + { + //_metadata.m_Fade = 1.0f; + m_MetaData = _metadata; + if (m_spFrameData != NULL) + { + m_spFrameData->GetMetaData(_metadata); + m_MetaData = _metadata; + } + // Clear old frame data. + m_spFrameData = NULL; + + // Spin until we have a decoded frame from decoder. (spin really?) + m_spFrameData = _spDecoder->Frame(); + if( m_spFrameData != NULL ) + { + m_spFrameData->GetMetaData(_metadata); + m_MetaData = _metadata; + if( m_spImageRef->GetWidth() != m_spFrameData->Width() || m_spImageRef->GetHeight() != m_spFrameData->Height() ) + { + // Frame differs in size, recreate ref image. + m_spImageRef->Create( m_spFrameData->Width(), m_spFrameData->Height(), DisplayOutput::eImage_RGBA8, false, true ); + } + + if (_spTexture.IsNull()) + _spTexture = m_spRenderer->NewTextureFlat(); + + if( _spTexture == NULL ) + return false; + + // Set image texturedata and upload to texture. + m_spImageRef->SetStorageBuffer( m_spFrameData->StorageBuffer() ); + _spTexture->Upload( m_spImageRef ); + +#ifdef FRAME_DIAG + g_Log->Info( "Grabbing frame %ld/%ld from %ld (first)...prog - %f, seam - %d", _metadata.m_FrameIdx, _metadata.m_MaxFrameIdx, _metadata.m_SheepID, _metadata.m_TransitionProgress, _metadata.m_IsSeam ); +#endif + + ContentDecoder::spCVideoFrame spSecondFrameData = _metadata.m_SecondFrame; + + if (!spSecondFrameData.IsNull()) + { + if( m_spSecondImageRef->GetWidth() != spSecondFrameData->Width() || m_spSecondImageRef->GetHeight() != spSecondFrameData->Height() ) + { + // Frame differs in size, recreate ref image. + m_spSecondImageRef->Create( spSecondFrameData->Width(), spSecondFrameData->Height(), DisplayOutput::eImage_RGBA8, false, true ); + } + + if (_spSecondTexture.IsNull()) + _spSecondTexture = m_spRenderer->NewTextureFlat(); + + if( _spSecondTexture != NULL ) + { + // Set image texturedata and upload to texture. + m_spSecondImageRef->SetStorageBuffer( spSecondFrameData->StorageBuffer() ); + _spSecondTexture->Upload( m_spSecondImageRef ); + +#ifdef FRAME_DIAG + ContentDecoder::sMetaData tmpMetaData; + + spSecondFrameData->GetMetaData(tmpMetaData); + + g_Log->Info( "Grabbing frame %ld/%d from %ld (second)...prog - %f, seam - %d", tmpMetaData.m_FrameIdx, tmpMetaData.m_MaxFrameIdx, tmpMetaData.m_SheepID, tmpMetaData.m_TransitionProgress, tmpMetaData.m_IsSeam ); +#endif + } + } + else + _spSecondTexture = NULL; + + } + else + { + g_Log->Warning( "failed to get frame..." ); + return false; + } + + return true; + } + + // Do some math to figure out the delta between frames... + bool UpdateInterframeDelta( const fp8 _fpsCap ) + { + fp8 newTime = m_Timer.Time(); + fp8 deltaTime = newTime - m_Clock; + m_Clock = newTime; + m_Acc += deltaTime; + + const fp8 dt = 1.0 / (fp8)_fpsCap; + bool bCrossedFrame = false; + + // Accumulated time is longer than the requested framerate, we crossed over to the next frame + if( m_Acc >= dt ) + bCrossedFrame = true; + + // Figure out the delta between _fpsCap frames to lerp with. + while( m_Acc >= dt ) + { + m_T += dt; + m_Acc -= dt; + } + + // This is our inter-frame delta, > 0 < 1 < + m_InterframeDelta = m_Acc / dt; + + return bCrossedFrame; + } + + void Reset( void ) + { + g_Log->Warning( "resetting interframe..." ); + + m_Clock = m_Timer.Time(); + m_Acc = 0; + } + + fp8 m_InterframeDelta; + bool m_bValid; + + public: + CFrameDisplay( DisplayOutput::spCRenderer _spRenderer ) + { + m_spVideoTexture = NULL; + m_spSecondVideoTexture = NULL; + m_spFrameData = NULL; + m_Clock = 0; + m_Acc = 0; + m_T = 0; + m_spRenderer = _spRenderer; + m_spImageRef = new DisplayOutput::CImage(); + m_spSecondImageRef = new DisplayOutput::CImage(); + m_bValid = true; + m_FadeCount = (fp8)g_Settings()->Get("settings.player.fadecount", 30); + + m_bPreserveAR = g_Settings()->Get("settings.player.preserve_AR", false); + m_texRect = Base::Math::CRect( 1, 1 ); + m_LastTexMoveClock = -1; + m_CurTexMoveOff = 0; + m_CurTexMoveDir = 1.; + } + + virtual ~CFrameDisplay() + { + m_spVideoTexture = NULL; + m_spSecondVideoTexture = NULL; + } + + bool Valid() { return m_bValid; }; + + // + void SetDisplaySize( const uint32 _w, const uint32 _h ) + { + m_dispSize = Base::Math::CRect( _w, _h ); + m_CurTexMoveOff = 0.f; + } + + // Decode a frame, and render it. + virtual bool Update( ContentDecoder::spCContentDecoder _spDecoder, const fp8 _decodeFps, const fp8 /*_displayFps*/, ContentDecoder::sMetaData &_metadata ) + { + fp4 currentalpha = m_LastAlpha; + bool isSeam = false; + + //making static analyzer happy... + (void)currentalpha; + + if( UpdateInterframeDelta( _decodeFps ) ) + { +#if !defined(WIN32) && !defined(_MSC_VER) + if (!GrabFrame( _spDecoder, m_spVideoTexture, m_spSecondVideoTexture, _metadata)) + { + return false; + } + else + { + m_MetaData = _metadata; + m_LastAlpha = m_MetaData.m_Fade; + currentalpha = m_LastAlpha; + isSeam = m_MetaData.m_IsSeam; + } +#else + if (GrabFrame( _spDecoder, m_spVideoTexture, m_spSecondVideoTexture, _metadata)) + { + m_MetaData = _metadata; + m_LastAlpha = m_MetaData.m_Fade; + currentalpha = m_LastAlpha; + isSeam = m_MetaData.m_IsSeam; + } +#endif + } + else + { + currentalpha = (fp4)Base::Math::Clamped(m_LastAlpha + + Base::Math::Clamped(m_InterframeDelta/m_FadeCount, 0., 1./m_FadeCount) + , 0., 1.); + } + + if (isSeam) + { + m_spSecondVideoTexture = NULL; + } + + if ( m_spVideoTexture.IsNull() ) + return false; + + // Bind texture and render a quad covering the screen. + m_spRenderer->SetBlend( "alphablend" ); + m_spRenderer->SetTexture( m_spVideoTexture, 0 ); + m_spRenderer->Apply(); + + //UpdateInterframeDelta( _decodeFps ); + + fp4 transCoef = m_MetaData.m_TransitionProgress / 100.0f; + + UpdateTexRect( m_spVideoTexture->GetRect() ); + + m_spRenderer->DrawQuad( m_texRect, Base::Math::CVector4( 1,1,1, currentalpha * (1.0f - transCoef) ), m_spVideoTexture->GetRect() ); + + if (!m_spSecondVideoTexture.IsNull()) + { + // Bind the second texture and render a quad covering the screen. + m_spRenderer->SetTexture( m_spSecondVideoTexture, 0 ); + m_spRenderer->Apply(); + + m_spRenderer->DrawQuad( m_texRect, Base::Math::CVector4( 1,1,1, currentalpha * transCoef ), m_spVideoTexture->GetRect() ); + } + + return true; + } + + virtual fp8 GetFps( fp8 /*_decodeFps*/, fp8 _displayFps ) + { + return _displayFps; + } + + virtual void UpdateTexRect(const Base::Math::CRect& texDim) + { + m_texRect.m_X0 = 0.f; + m_texRect.m_Y0 = 0.f; + m_texRect.m_X1 = 1.f; + m_texRect.m_Y1 = 1.f; + + if (!m_bPreserveAR) + return; + + bool landscape = true; + + fp4 r1 = (fp4)m_dispSize.Width() / (fp4)m_dispSize.Height(); + fp4 r2 = texDim.Width() / texDim.Height(); + + if (r2 > r1) + { + r1 = 1.f / r1; + r2 = 1.f / r2; + landscape = false; + } + + fp4 bars = (r1 - r2) / (2 * r1); + + if (bars > 0) + { + fp8 acttm = m_Timer.Time(); + + if (m_LastTexMoveClock < 0) + { + m_LastTexMoveClock = acttm; + } + + if ((acttm - m_LastTexMoveClock) > TEX_MOVE_SECS) + { + m_CurTexMoveOff += bars / 20.f * m_CurTexMoveDir; + m_LastTexMoveClock = acttm; + } + + fp4 *a = NULL, *b = NULL; + + if (landscape) + { + a = &m_texRect.m_X0; + b = &m_texRect.m_X1; + } + else + { + a = &m_texRect.m_Y0; + b = &m_texRect.m_Y1; + } + + if (a == NULL || b == NULL) + return; + + *a += bars + m_CurTexMoveOff; + *b -= bars - m_CurTexMoveOff; + + if (*a <= 0.f) + { + *b += -*a; + *a += -*a; + m_CurTexMoveOff -= bars / 20.f * m_CurTexMoveDir; + m_CurTexMoveDir = -m_CurTexMoveDir; + } + + if (*b >= 1.f) + { + *a -= *b - 1.f; + *b -= *b - 1.f; + m_CurTexMoveOff -= bars / 20.f * m_CurTexMoveDir; + m_CurTexMoveDir = -m_CurTexMoveDir; + } + + } + + } +}; + +MakeSmartPointers( CFrameDisplay ); + +#endif + diff -Nru electricsheep-2.7~b12+svn20091224/Client/Hud.cpp electricsheep-3.0.2-git20180325/Client/Hud.cpp --- electricsheep-2.7~b12+svn20091224/Client/Hud.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/Hud.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,102 @@ +#include +#include +#include "Hud.h" +#include "Settings.h" + +namespace Hud +{ + +/* +*/ +CHudManager::CHudManager() +{ + m_Timer.Reset(); +} + + +/* +*/ +CHudManager::~CHudManager() +{ + m_EntryMap.clear(); +} + +/* +*/ +bool CHudManager::Add( const std::string _name, spCHudEntry _entry, fp8 _duration ) +{ + _entry->SetTime( m_Timer.Time(), _duration ); + m_EntryMap[ _name ] = _entry; + return true; +} + +/* +*/ +bool CHudManager::Remove( const std::string _name ) +{ + m_EntryMap.erase( _name ); + return true; +} + +/* +*/ +bool CHudManager::Render( DisplayOutput::spCRenderer _spRenderer ) +{ + if( _spRenderer == NULL ) + return false; + + _spRenderer->Reset( DisplayOutput::eEverything ); + _spRenderer->Orthographic(); + _spRenderer->Apply(); + + std::map::iterator i; + for( i=m_EntryMap.begin(); i != m_EntryMap.end(); ) + { + spCHudEntry e = i->second; + bool bRemove = false; + + if( e->Visible() ) + { + if( !e->Render( m_Timer.Time(), _spRenderer ) ) + bRemove = true; + } + + if( bRemove ) + { + std::map::iterator next = i; + ++next; + m_EntryMap.erase(i); + i = next; + } + else + ++i; + } + + return true; +} + +// +void CHudManager::HideAll() +{ + std::map::const_iterator i; + for( i=m_EntryMap.begin(); i != m_EntryMap.end(); ++i ) + { + spCHudEntry e = i->second; + e->Visible( false ); + } +} + +// +void CHudManager::Toggle( const std::string _entry ) +{ + bool bState = m_EntryMap[ _entry ]->Visible(); + HideAll(); + m_EntryMap[ _entry ]->Visible( !bState); +} + +void CHudManager::Hide( const std::string _entry ) +{ + m_EntryMap[ _entry ]->Visible( false ); +} + +} diff -Nru electricsheep-2.7~b12+svn20091224/Client/Hud.h electricsheep-3.0.2-git20180325/Client/Hud.h --- electricsheep-2.7~b12+svn20091224/Client/Hud.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/Hud.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,76 @@ +#ifndef _HUD_H_ +#define _HUD_H_ + +#include +#include "base.h" +#include "Timer.h" +#include "Renderer.h" + +namespace Hud +{ + +/* +*/ +class CHudEntry +{ + bool m_bVisible; + + protected: + Base::Math::CRect m_Rect; + fp8 m_StartTime, m_Duration, m_Delta; + + public: + CHudEntry( Base::Math::CRect _rect ) : m_Rect( _rect ) {}; + virtual ~CHudEntry() {}; + + void SetTime( fp8 _startTime, fp8 _duration ) { m_StartTime = _startTime; m_Duration = _duration; m_Delta = 0; m_bVisible = false; }; + virtual bool Render( const fp8 _time, DisplayOutput::spCRenderer /*_spRenderer*/ ) + { + if( m_Duration > 0.0f ) + { + m_Delta = (_time - m_StartTime) / m_Duration; + if( m_Delta > 1.0 ) + return false; + } + + return true; + }; + + void Visible( const bool _bState ) { m_bVisible = _bState; }; + virtual bool Visible() const { return m_bVisible; }; +}; + +MakeSmartPointers( CHudEntry ); + +/* +*/ +class CHudManager +{ + // Timer. + Base::CTimer m_Timer; + + // Entries. + std::map m_EntryMap; + + public: + CHudManager(); + ~CHudManager(); + + // Add/Remove hud entry. (duration -1 means infinite...) + bool Add( const std::string _name, spCHudEntry _entry, fp8 _duration = -1 ); + bool Remove( const std::string _name ); + + // Operators rule. + spCHudEntry Get( const std::string _what ) { return m_EntryMap[ _what ]; } + + bool Render( DisplayOutput::spCRenderer _spRenderer ); + void HideAll(); + void Toggle( const std::string _name ); + void Hide( const std::string _name ); +}; + +MakeSmartPointers( CHudManager ); + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Client/LinearFrameDisplay.h electricsheep-3.0.2-git20180325/Client/LinearFrameDisplay.h --- electricsheep-2.7~b12+svn20091224/Client/LinearFrameDisplay.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/LinearFrameDisplay.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,261 @@ +#ifndef _LINEARFRAMEDISPLAY_H_ +#define _LINEARFRAMEDISPLAY_H_ + +#include "Shader.h" +#include "Rect.h" +#include "Vector4.h" + +/* + CLinearFrameDisplay(). + Does a piecewise linear interpolation between two frames. +*/ +class CLinearFrameDisplay : public CFrameDisplay +{ + static const uint32 kMaxFrames = 2; + + fp4 m_LastAlpha; + // Pixelshader. + DisplayOutput::spCShader m_spShader; + + // The two frames. + DisplayOutput::spCTextureFlat m_spFrames[ 2 * kMaxFrames ]; + uint32 m_State; + + bool m_bWaitNextFrame; + + public: + CLinearFrameDisplay( DisplayOutput::spCRenderer _spRenderer ) : CFrameDisplay( _spRenderer ) + { + m_State = 0; + + // Pixelshader to lerp between two textures. + static const char *linear_pixelshaderGL2D = "\ + uniform float delta;\ + uniform sampler2D texUnit1; \ + uniform sampler2D texUnit2; \ + uniform sampler2D texUnit3; \ + uniform sampler2D texUnit4; \ + uniform float newalpha;\ + uniform float transPct;\ + void main(void)\ + {\ + vec4 c1 = texture2D( texUnit1, gl_TexCoord[0].st );\ + vec4 c2 = texture2D( texUnit2, gl_TexCoord[0].st );\ + vec4 fc1 = mix( c1, c2, delta );\ + \ + c1 = texture2D( texUnit3, gl_TexCoord[0].st );\ + c2 = texture2D( texUnit4, gl_TexCoord[0].st );\ + vec4 fc2 = mix( c1, c2, delta );\ + \ + gl_FragColor = mix( fc1, fc2, transPct / 100.0 );\ + gl_FragColor.a = newalpha;\ + }"; + + // Pixelshader to lerp between two textures. + static const char *linear_pixelshaderGL2DRect = "\ + uniform float delta;\ + uniform sampler2DRect texUnit1; \ + uniform sampler2DRect texUnit2; \ + uniform sampler2DRect texUnit3; \ + uniform sampler2DRect texUnit4; \ + uniform float newalpha;\ + uniform float transPct;\ + void main(void)\ + {\ + vec4 c1 = texture2DRect( texUnit1, gl_TexCoord[0].st );\ + vec4 c2 = texture2DRect( texUnit2, gl_TexCoord[0].st );\ + vec4 fc1 = mix( c1, c2, delta );\ + \ + c1 = texture2DRect( texUnit3, gl_TexCoord[0].st );\ + c2 = texture2DRect( texUnit4, gl_TexCoord[0].st );\ + vec4 fc2 = mix( c1, c2, delta );\ + \ + gl_FragColor = mix( fc1, fc2, transPct / 100.0 );\ + gl_FragColor.a = newalpha;\ + }"; + + // vertexshader... + static const char *linear_vertexshader = "\ + float4x4 WorldViewProj: WORLDVIEWPROJECTION;\ + struct VS_OUTPUT\ + {\ + float4 Pos : POSITION;\ + float2 Tex : TEXCOORD0;\ + };\ + VS_OUTPUT main( float4 Pos : POSITION, float2 Tex : TEXCOORD0 )\ + {\ + VS_OUTPUT Out = (VS_OUTPUT)0;\ + Out.Pos = mul( Pos, WorldViewProj );\ + Out.Tex = Tex;\ + return Out;\ + }"; + + // Pixelshader to lerp between two textures. + static const char *linear_pixelshaderDX = "\ + float delta;\ + float newalpha;\ + float transPct;\ + sampler2D texUnit1: register(s1);\ + sampler2D texUnit2: register(s2);\ + sampler2D texUnit3: register(s3);\ + sampler2D texUnit4: register(s4);\ + float4 main( float2 _uv : TEXCOORD0 ) : COLOR0\ + {\ + float4 c1 = tex2D( texUnit1, _uv );\ + float4 c2 = tex2D( texUnit2, _uv );\ + float4 c3 = lerp( c1, c2, delta );\ + c1 = tex2D( texUnit3, _uv );\ + c2 = tex2D( texUnit4, _uv );\ + float4 c4 = lerp( c1, c2, delta );\ + \ + float4 c5 = lerp( c3, c4, transPct / 100.0 );\ + c5.a = newalpha;\ + return c5;\ + }"; + + // Compile the shader. + if( _spRenderer->Type() == DisplayOutput::eDX9 ) + m_spShader = _spRenderer->NewShader( linear_vertexshader, linear_pixelshaderDX ); + else + m_spShader = _spRenderer->NewShader( NULL, ( _spRenderer->GetTextureTargetType() == DisplayOutput::eTexture2DRect ) ? linear_pixelshaderGL2DRect : linear_pixelshaderGL2D ); + + if( !m_spShader ) + m_bValid = false; + } + + virtual ~CLinearFrameDisplay() + { + } + + // Decode a frame every 1/_fpsCap seconds, store the previous frame, and lerp between them. + virtual bool Update( ContentDecoder::spCContentDecoder _spDecoder, const fp8 _decodeFps, const fp8 /*_displayFps*/, ContentDecoder::sMetaData &_metadata ) + { + fp4 currentalpha = m_LastAlpha; + bool frameGrabbed = false; + bool isSeam = false; + + if (m_bWaitNextFrame) + { +#if !defined(WIN32) && !defined(_MSC_VER) + if ( !GrabFrame( _spDecoder, m_spFrames[ m_State ], m_spFrames[ m_State + kMaxFrames ], _metadata ) ) + { + return false; + } + else + { + frameGrabbed = true; + + Reset(); + + m_bWaitNextFrame = false; + + } + +#else + if ( GrabFrame( _spDecoder, m_spFrames[ m_State ], m_spFrames[ m_State + kMaxFrames ], _metadata ) ) + { + frameGrabbed = true; + + Reset(); + + m_bWaitNextFrame = false; + } +#endif + } + else + { + if( UpdateInterframeDelta( _decodeFps ) ) + { + m_State ^= 1; + + if( !GrabFrame( _spDecoder, m_spFrames[ m_State ], m_spFrames[ m_State + kMaxFrames ], _metadata ) ) + { + m_bWaitNextFrame = true; +#if !defined(WIN32) && !defined(_MSC_VER) + return false; +#endif + } + else + frameGrabbed = true; + } + else + { + currentalpha = (fp4)Base::Math::Clamped(m_LastAlpha + + Base::Math::Clamped(m_InterframeDelta/m_FadeCount, 0., 1./m_FadeCount) + , 0., 1.); + } + + } + + if (frameGrabbed) + { + m_MetaData = _metadata; + m_LastAlpha = m_MetaData.m_Fade; + currentalpha = m_LastAlpha; + + isSeam = _metadata.m_IsSeam; + } + + + if ( m_spFrames[ m_State ] != NULL ) + { + Base::Math::CRect texRect; + + if (isSeam) + { + m_spFrames[ !m_State ] = m_spFrames[ !m_State + kMaxFrames ]; + + m_spFrames[ !m_State + kMaxFrames ] = NULL; + } + + m_spRenderer->SetShader( m_spShader ); + m_spRenderer->SetBlend( "alphablend" ); + + // Only one frame so far, let's display it normally. + if( m_spFrames[ m_State ^ 1 ] == NULL ) + { + // Bind texture and render a quad covering the screen. + m_spRenderer->SetTexture( m_spFrames[ m_State ], 1 ); + m_spRenderer->SetTexture( m_spFrames[ m_State ], 2 ); + + if (!m_spFrames[ m_State + kMaxFrames ].IsNull()) + { + m_spRenderer->SetTexture( m_spFrames[ m_State + kMaxFrames ], 2 ); + m_spRenderer->SetTexture( m_spFrames[ m_State + kMaxFrames ], 3 ); + } + } + else + { + m_spRenderer->SetTexture( m_spFrames[ 0 ], (m_State ^ 1) + 1); + m_spRenderer->SetTexture( m_spFrames[ 1 ], m_State + 1); + + if (!m_spFrames[ m_State + kMaxFrames ].IsNull()) + { + m_spRenderer->SetTexture( m_spFrames[ 2 ], (m_State ^ 1) + kMaxFrames + 1); + m_spRenderer->SetTexture( m_spFrames[ 3 ], m_State + kMaxFrames + 1); + } + } + texRect = m_spFrames[ m_State ]->GetRect(); + m_spShader->Set( "delta", (fp4)m_InterframeDelta ); + m_spShader->Set( "newalpha", (fp4)currentalpha ); + m_spShader->Set( "transPct", m_MetaData.m_TransitionProgress); + m_spRenderer->Apply(); + + UpdateTexRect( texRect ); + + m_spRenderer->DrawQuad( m_texRect, Base::Math::CVector4( 1, 1, 1, currentalpha ), texRect ); + } + + return true; + } + + virtual fp8 GetFps( fp8 /*_decodeFps*/, fp8 _displayFps ) + { + return _displayFps; + } +}; + +MakeSmartPointers( CLinearFrameDisplay ); + +#endif + diff -Nru electricsheep-2.7~b12+svn20091224/Client/lua_playlist.h electricsheep-3.0.2-git20180325/Client/lua_playlist.h --- electricsheep-2.7~b12+svn20091224/Client/lua_playlist.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/lua_playlist.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,451 @@ +#ifndef _LUAPLAYLIST_H +#define _LUAPLAYLIST_H + +#include "Common.h" +#include "Playlist.h" +#include "Log.h" +#include "Timer.h" +#include "Settings.h" +#include "LuaState.h" +#include "luaxml.h" +#include "PlayCounter.h" +#include +#include +#include "Shepherd.h" +#include "isaac.h" +#include "ContentDownloader.h" + +#include "boost/filesystem/path.hpp" +#include "boost/filesystem/operations.hpp" +#include "boost/filesystem/convenience.hpp" +#include + +using boost::filesystem::path; +using boost::filesystem::exists; +using boost::filesystem::directory_iterator; +using boost::filesystem::extension; + + +// Lua. +extern "C" { +#include "lauxlib.h" +#include "lua.h" +#include "lualib.h" +}; + + +namespace ContentDecoder +{ + +#define kSheepNumTreshold 20 + +/* + CLuaPlaylist(). + Abstract handling for playlists implemented in lua. +*/ +static bool randinitialized = false; +static randctx ISAAC_ctx; + +class CLuaPlaylist : public CPlaylist +{ + boost::mutex m_Lock; + + boost::mutex m_CurrentPlayingLock; + + // Path to folder to monitor & update interval in seconds. + path m_Path; + fp8 m_NormalInterval; + fp8 m_EmptyInterval; + fp8 m_Clock; + + Base::CTimer m_Timer; + + uint32 m_numSheep; + + bool m_AutoMedian; + bool m_RandomMedian; + fp8 m_MedianLevel; + uint64 m_FlockMBs; + uint64 m_FlockGoldMBs; + + // The lua state that will do all the work. + Base::Script::CLuaState *m_pState; + + // Simple function to use the logger.. + static int playlistLogger( lua_State *_pState ) + { + assert( _pState !=NULL ); + const char *pString = luaL_checkstring( _pState, 1 ); + + if ( pString != NULL ) + g_Log->Info( pString ); + + return(0); + } + + static int errorMessage( lua_State *_pState ) + { + assert( _pState !=NULL ); + const char *pString = luaL_checkstring( _pState, 1 ); + + if ( pString != NULL ) + ContentDownloader::Shepherd::QueueMessage( pString, 10.0f ); + + return(0); + } + + static int incPlayCount( lua_State *_pState ) + { + uint16 retval = 0; + + uint32 generation = static_cast(luaL_checkint( _pState, 1 )); + uint32 idx = static_cast(luaL_checkint( _pState, 2 )); + + g_PlayCounter().IncPlayCount( generation, idx ); + + retval = g_PlayCounter().PlayCount( generation, idx ); + + lua_pushinteger( _pState, retval ); + + return(1); + } + + static int playCount( lua_State *_pState ) + { + uint16 retval = 0; + + uint32 generation = static_cast(luaL_checkint( _pState, 1 )); + uint32 idx = static_cast(luaL_checkint( _pState, 2 )); + + retval = g_PlayCounter().PlayCount( generation, idx ); + + lua_pushinteger( _pState, retval ); + + return(1); + } + + static int getRandomSeed( lua_State *_pState ) + { + lua_pushinteger( _pState, lua_Integer(time(NULL))); + + return(1); + } + + static int getRand( lua_State *_pState ) + { + if (randinitialized == false) + { + randinitialized = true; + ub4 default_isaac_seed = static_cast(time(0)); + for (size_t lp = 0; lp < RANDSIZ; lp++) + ISAAC_ctx.randrsl[lp] = default_isaac_seed; + irandinit(&ISAAC_ctx, true); + } + + lua_pushnumber( _pState, LUA_NUMBER(double(irand(&ISAAC_ctx))/double(0xffffffff) )); + + return(1); + } + + static int accessTime( lua_State *_pState ) + { + const char *fpath = luaL_checkstring( _pState, 1 ); + + time_t atime = 0; + + if ( fpath != NULL ) + { + struct stat fs; + + if ( !stat(fpath, &fs) ) + { + atime = fs.st_atime; + } + } + + lua_pushinteger( _pState, lua_Integer(atime) ); // fix after year 2038 :) + + return(1); + } + + static int clearMedianSurvivorsStats( lua_State *_pState ) + { + g_PlayCounter().clearMedianSurvivorsStats(); + lua_pushinteger( _pState, lua_Integer(0)); + return(1); + } + + static int clearDeadEndSurvivorsStats( lua_State *_pState ) + { + g_PlayCounter().clearDeadEndSurvivorsStats(); + lua_pushinteger( _pState, lua_Integer(0)); + return(1); + } + + static int incMedianCutSurvivors( lua_State *_pState ) + { + g_PlayCounter().IncMedianCutSurvivors(); + lua_pushinteger( _pState, lua_Integer(0)); + return(1); + } + + static int incDeadEndCutSurvivors( lua_State *_pState ) + { + g_PlayCounter().IncDeadEndCutSurvivors(); + lua_pushinteger( _pState, lua_Integer(0)); + return(1); + } + // + void DeduceGraphnessFromFilenameAndQueue( path const &/*_basedir*/, const std::string& _filename ) + { + uint32 Generation, ID, First, Last; + std::string sheep; + + if( !GetSheepInfoFromPath( _filename, Generation, ID, First, Last, sheep ) ) + { + g_Log->Error( "Unable to deduce graph position from %s", sheep.c_str() ); + return; + } + + path fullPath(_filename ); + std::string xxxname( _filename ); + xxxname.replace(_filename.size() - 3, 3, "xxx"); + + if ( exists( xxxname ) ) + { + remove( fullPath ); + return; + } + + struct stat fs; + + time_t atime = 0; + + if ( !stat( fullPath.string().c_str(), &fs ) ) + { + atime = fs.st_atime; + } + + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "Add", "ssiiiii", (fullPath.branch_path().string() + std::string("/")).c_str(), fullPath.filename().string().c_str(), Generation, ID, First, Last, atime ) ); + m_numSheep++; + } + + void AutoMedianLevel(uint64 megabytes) + { + if (megabytes < 100) + { + g_Log->Info( "Flock < 100 MBs AutoMedian = 1." ); + m_MedianLevel = 1.; + } else + if (megabytes > 1000) + { + g_Log->Info( "Flock > 1000 MBs AutoMedian = .25" ); + m_MedianLevel = .25; + } else + { + m_MedianLevel = 13./12. - fp8(megabytes)/1200.; + if (m_MedianLevel > 1.) + m_MedianLevel = 1.; + if (m_MedianLevel < .25) + m_MedianLevel = .25; + g_Log->Info( "Flock 100 - 1000 MBs AutoMedian = %f", m_MedianLevel ); + } + } + + // + void UpdateDirectory( path const &_dir, const bool _bRebuild = false ) + { + //boost::mutex::scoped_lock locker( m_Lock ); + + m_numSheep = 0; + + std::vector files; + + int usedsheeptype = g_Settings()->Get( "settings.player.PlaybackMixingMode", 0 ); + + if ( usedsheeptype == 0 ) + { + if ( Base::GetFileList( files, _dir.string().c_str(), "avi", true, false ) == false ) + usedsheeptype = 2; // only gold, if any - revert to all if gold not found + } + + if ( usedsheeptype == 1 ) // free sheep only + Base::GetFileList( files, _dir.string().c_str(), "avi", false, true ); + + if ( usedsheeptype > 1 ) // play all sheep, also handle case of error (2 is maximum allowed value) + Base::GetFileList( files, _dir.string().c_str(), "avi", true, true ); + + // Clear the sheep context... + if( _bRebuild ) + { + if (m_AutoMedian) + AutoMedianLevel( m_FlockMBs + m_FlockGoldMBs ); + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "Clear", "d", m_MedianLevel ) ); + //m_pState->Execute( "Clear()" ); + } + + for( std::vector::const_iterator i=files.begin(); i!=files.end(); ++i ) + DeduceGraphnessFromFilenameAndQueue( _dir, *i ); + + // Trigger update on the lua side of things. + m_pState->Execute( "Rebuild()" ); + } + + public: + CLuaPlaylist( const std::string &_scriptRoot, const std::string &_watchFolder, int &/*_usedsheeptype*/ ) : CPlaylist()/*, m_UsedSheepType(_usedsheeptype)*/ + { + m_NormalInterval = fp8(g_Settings()->Get( "settings.player.NormalInterval", 100 )); + m_EmptyInterval = 10.0f; + m_Clock = 0.0f; + m_Path = _watchFolder.c_str(); + + m_numSheep = 0; + + g_Log->Info( "Starting lua playlist (updates every %d seconds)...", m_NormalInterval ); + + // Start the luastate. + m_pState = new Base::Script::CLuaState(); + m_pState->Init( _scriptRoot ); + + // Logging... + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::playlistLogger ); + lua_setglobal( m_pState->GetState(), "g_Log" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::incPlayCount ); + lua_setglobal( m_pState->GetState(), "g_IncPlayCount" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::playCount ); + lua_setglobal( m_pState->GetState(), "g_PlayCount" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::accessTime ); + lua_setglobal( m_pState->GetState(), "g_AccessTime" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::getRand); + lua_setglobal( m_pState->GetState(), "g_CRand" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::getRandomSeed ); + lua_setglobal( m_pState->GetState(), "g_CRandomSeed" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::errorMessage ); + lua_setglobal( m_pState->GetState(), "g_ErrorMessage" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::clearMedianSurvivorsStats ); + lua_setglobal( m_pState->GetState(), "g_ClearMedianSurvivorsStats" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::clearDeadEndSurvivorsStats ); + lua_setglobal( m_pState->GetState(), "g_ClearDeadEndSurvivorsStats" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::incMedianCutSurvivors ); + lua_setglobal( m_pState->GetState(), "g_IncMedianCutSurvivors" ); + lua_pushcfunction( m_pState->GetState(), CLuaPlaylist::incDeadEndCutSurvivors ); + lua_setglobal( m_pState->GetState(), "g_IncDeadEndCutSurvivors" ); + //m_pState->registerLib( "luaXML", luaopen_xml ); + + + // Run the code that will populate this luastate with code. + m_pState->Execute( "require 'playlist'" ); + + int32 loopIterations = g_Settings()->Get( "settings.player.LoopIterations", 2 ); + bool seamlessPlayback = g_Settings()->Get( "settings.player.SeamlessPlayback", false ); + fp8 playEvenly = (fp8) g_Settings()->Get( "settings.player.PlayEvenly", 100 ) / 100.0; + m_MedianLevel = (fp8) g_Settings()->Get( "settings.player.MedianLevel", 80 ) / 100.0; + m_AutoMedian = g_Settings()->Get( "settings.player.AutoMedianLevel", true ); + m_RandomMedian = g_Settings()->Get( "settings.player.RandomMedianLevel", true ); + if (m_AutoMedian) + { + // HACK to get flock size before full initialization + ContentDownloader::Shepherd::setRootPath( g_Settings()->Get( "settings.content.sheepdir", g_Settings()->Root() + "content" ).c_str() ); + m_FlockMBs = ContentDownloader::Shepherd::GetFlockSizeMBsRecount(0); + m_FlockGoldMBs = ContentDownloader::Shepherd::GetFlockSizeMBsRecount(1); + AutoMedianLevel( m_FlockMBs ); + } + + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "Init", "sibddbb", m_Path.string().c_str(), loopIterations, seamlessPlayback, playEvenly, m_MedianLevel, m_AutoMedian, m_RandomMedian) ); + + UpdateDirectory( m_Path ); + } + + // + virtual ~CLuaPlaylist() + { + SAFE_DELETE( m_pState ); + } + + // + virtual bool Add( const std::string &_file ) + { + boost::mutex::scoped_lock locker( m_Lock ); + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "Add", "s", _file.c_str() ) ); + return( true ); + } + + virtual uint32 Size() + { + boost::mutex::scoped_lock locker( m_Lock ); + int32 ret = 0; + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "Size", ">i", &ret ) ); + return (uint32)ret; + } + + virtual bool Next( std::string &_result, bool &_bEnoughSheep, uint32 _curID, const bool _bRebuild = false, bool _bStartByRandom = true ) + { + boost::mutex::scoped_lock locker( m_Lock ); + + fp8 interval = ( m_numSheep > kSheepNumTreshold ) ? m_NormalInterval : m_EmptyInterval; + + // Update from directory if enough time has passed, or we're asked to. + if( _bRebuild || ((m_Timer.Time() - m_Clock) > interval) ) + { + if (g_PlayCounter().ReadOnlyPlayCounts()) + { + g_PlayCounter().ClosePlayCounts(); + m_FlockMBs = ContentDownloader::Shepherd::GetFlockSizeMBsRecount(0); + m_FlockGoldMBs = ContentDownloader::Shepherd::GetFlockSizeMBsRecount(1); + } + UpdateDirectory( m_Path, _bRebuild ); + m_Clock = m_Timer.Time(); + } + + _bEnoughSheep = ( m_numSheep > kSheepNumTreshold ); + + // Gently ask lua about a new file. + int8 *ret = NULL; + int32 stackdelta = Base::Script::Call( m_pState->GetState(), "Next", "ib>s", _curID, _bStartByRandom, &ret ); + + if( stackdelta == 1 && ret != NULL) + if ( *(const char *)ret ) + _result = std::string( (const char *)ret ); + else + { + m_pState->Pop( stackdelta ); + return false; + } + else + { + g_Log->Warning( "Playlist behaved weird" ); + } + + // Clean up return string from stack. + m_pState->Pop( stackdelta ); + + return true; + } + + virtual bool ChooseSheepForPlaying(uint32 curGen, uint32 curID) + { + g_PlayCounter().IncPlayCount(curGen, curID); + + return true; + } + + // Overrides the playlist to play _id next time. + void Override( const uint32 _id ) + { + boost::mutex::scoped_lock locker( m_Lock ); + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "Override", "i", _id ) ); + } + + // Queues _id to be deleted. + void Delete( const uint32 _id ) + { + boost::mutex::scoped_lock locker( m_Lock ); + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "Delete", "i", _id ) ); + } +}; + +MakeSmartPointers( CLuaPlaylist ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Client/main.cpp electricsheep-3.0.2-git20180325/Client/main.cpp --- electricsheep-2.7~b12+svn20091224/Client/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/main.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,76 @@ +#include +#include +#include +#include +#if defined(WIN32) && !defined(_MSC_VER) +#include +#endif +#include +#ifdef WIN32 +#include +#include +#endif +#include +#include + +#include "client.h" + +#ifdef WIN32 +class ExceptionHandler +{ + public: + + ExceptionHandler() + { + LoadLibraryA( "exchndl.dll" ); + } +}; + +static ExceptionHandler gExceptionHandler; // global instance of class + + #include "client_win32.h" + typedef CElectricSheep_Win32 CElectricSheepClient; +#else +#ifdef MAC +#include +#include +#include "client_mac.h" +typedef CElectricSheep_Mac CElectricSheepClient; +#else +#include +#include +#include "client_linux.h" +typedef CElectricSheep_Linux CElectricSheepClient; +#endif +#endif + +// +#ifdef WIN32 +int32 APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +{ +#else +int32 main( int argc, char *argv[] ) +{ + glutInit( &argc, argv ); +#endif + + // Start log (unattached). + g_Log->Startup(); + + CElectricSheepClient client; + + if( client.Startup() ) + client.Run(); + +// g_Log->Info( "Raising access violation...\n" ); +// asm( "movl $0, %eax" ); +// asm( "movl $1, (%eax)" ); + +// __asm("int3"); + + client.Shutdown(); + + g_Log->Shutdown(); + + return 0; +} diff -Nru electricsheep-2.7~b12+svn20091224/Client/Makefile.am electricsheep-3.0.2-git20180325/Client/Makefile.am --- electricsheep-2.7~b12+svn20091224/Client/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/Makefile.am 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,90 @@ +## Process this file with automake to produce Makefile.in + +if IS_LINUX_GNU +linux_CFLAGS=-DLINUX_GNU=1 -DSHAREDIR=\"$(prefix)/share/electricsheep/\" +endif + +if HAVE_AVC_VID2 +AVC_DEFS=-DHAVE_AVC_VID2=1 +endif + + +AM_CPPFLAGS = \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ + -DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \ + -I $(top_srcdir) \ + -iquote ../DisplayOutput/OpenGL \ + -I ../Common \ + -I ../DisplayOutput \ + -I ../DisplayOutput/Renderer \ + -I ../Common/Math \ + -I ../ContentDecoder \ + -I ../TupleStorage \ + -I ../ContentDownloader \ + -I ../lua5.1/src \ + -I ../Client \ + -I ../Networking \ + -I ../tinyXml + +bin_PROGRAMS = electricsheep + +electricsheep_SOURCES = \ +Player.cpp \ +main.cpp \ +Voting.cpp \ +Hud.cpp \ +../Networking/Upload.cpp \ +../Networking/Download.cpp \ +../Networking/Networking.cpp \ +../DisplayOutput/LoadDDS.cpp \ +../DisplayOutput/Image.cpp \ +../DisplayOutput/OpenGL/RendererGL.cpp \ +../DisplayOutput/OpenGL/glx.cpp \ +../DisplayOutput/OpenGL/ShaderGL.cpp \ +../DisplayOutput/OpenGL/TextureFlatGL.cpp \ +../DisplayOutput/OpenGL/wgl.cpp \ +../DisplayOutput/OpenGL/FontGL.cpp \ +../DisplayOutput/OpenGL/mgl.cpp \ +../DisplayOutput/Renderer/Shader.cpp \ +../DisplayOutput/Renderer/Texture.cpp \ +../DisplayOutput/Renderer/Font.cpp \ +../DisplayOutput/Renderer/TextureFlat.cpp \ +../DisplayOutput/Renderer/Renderer.cpp \ +../DisplayOutput/LoadPNG.cpp \ +../DisplayOutput/DisplayOutput.cpp \ +../tinyXml/tinyxmlparser.cpp \ +../tinyXml/tinyxml.cpp \ +../tinyXml/tinystr.cpp \ +../tinyXml/tinyxmlerror.cpp \ +../TupleStorage/diriterator.cpp \ +../TupleStorage/storage.cpp \ +../TupleStorage/luastorage.cpp \ +../ContentDecoder/ContentDecoder.cpp \ +../ContentDownloader/SheepUploader.cpp \ +../ContentDownloader/ContentDownloader.cpp \ +../ContentDownloader/SheepGenerator.cpp \ +../ContentDownloader/SheepDownloader.cpp \ +../ContentDownloader/Sheep.cpp \ +../ContentDownloader/Shepherd.cpp \ +../Common/LuaState.cpp \ +../Common/Common.cpp \ +../Common/AlignedBuffer.cpp \ +../Common/isaac.cpp \ +../Common/pool.cpp \ +../Common/Log.cpp \ +../Common/Math/Rect.cpp \ +../Common/luaxml.cpp \ +../Common/Exception.cpp \ +../Common/md5.c + + + +electricsheep_LDADD = -lboost_system -lboost_thread -lboost_filesystem -lglut \ + $(AVCODEC_LIBS) $(AVFORMAT_LIBS) $(SWSCALE_LIBS) $(AVUTIL_LIBS) $(LUA_LIBS) $(GLU_LIBS) $(GLEE_LIBS) $(BOOST_LDADD) \ + $(CURL_LIBS) $(PNG_LIBS) $(XRENDER_LIBS) $(LIBGTOP_LIBS) $(XRENDER_LIBS) + +AM_CXXFLAGS = $(linux_CFLAGS) $(AVCODEC_CFLAGS) $(AVFORMAT_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(LIBGTOP_CFLAGS) \ + $(LUA_CFLAGS) $(GLU_CFLAGS) $(GLEE_CFLAGS) $(CURL_CFLAGS) $(PNG_CFLAGS) $(LUA_CFLAGS) $(XRENDER_CFLAGS) $(BOOST_CXXFLAGS) -lrt -lz -lGL \ + -D__STDC_CONSTANT_MACROS -Wno-write-strings $(AVC_DEFS) + + diff -Nru electricsheep-2.7~b12+svn20091224/Client/MonoInstance.h electricsheep-3.0.2-git20180325/Client/MonoInstance.h --- electricsheep-2.7~b12+svn20091224/Client/MonoInstance.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/MonoInstance.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,127 @@ +#ifndef _MonoInstance_H_ +#define _MonoInstance_H_ + +#include +#include +#include + +/* + CMonoInstance(). + Make sure that you use a name that is unique for this application otherwise + two apps may think they are the same if they are using same name for 3rd parm to CreateMutex +*/ +class CMonoInstance +{ + protected: + DWORD m_dwLastError; + HANDLE m_hMutex; + + public: + bool WaitForParentPID() + { + PROCESSENTRY32 procentry; + procentry.dwSize = sizeof(PROCESSENTRY32); + HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0 ); + if (hSnapShot != INVALID_HANDLE_VALUE) + { + BOOL bContinue = Process32First( hSnapShot, &procentry ); + DWORD pid = 0; + + while( bContinue == TRUE) + { + if (GetCurrentProcessId() == procentry.th32ProcessID) + { + pid = procentry.th32ParentProcessID; + break; + } + + procentry.dwSize = sizeof(PROCESSENTRY32) ; + bContinue = Process32Next( hSnapShot, &procentry ); + } + + CloseHandle(hSnapShot); + if (pid != 0) + { + HANDLE hProcess = OpenProcess( SYNCHRONIZE | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, + FALSE, procentry.th32ParentProcessID ) ; + + if (hProcess != NULL) + { + HMODULE hMod[512]; + char szFileName[MAX_PATH]; + DWORD dwSize = 0; + if( EnumProcessModules( hProcess, hMod, sizeof( hMod ), &dwSize ) != 0 ) + { + if( GetModuleFileNameExA( hProcess, hMod[0], szFileName, sizeof( szFileName ) ) != 0 ) + { + + std::string extension = szFileName; + //OutputDebugStringA(szFileName); + if (extension.find("es.scr") != extension.npos || extension.find("es.exe") != extension.npos) + { + if (WaitForSingleObject(hProcess, 5000) != WAIT_OBJECT_0) + { + CloseHandle (hProcess); + return false; + } + } + CloseHandle (hProcess); + return true; + } + } + CloseHandle (hProcess); + } + } else + { + return false; + } + } + return false; + } + + CMonoInstance( char *strMutexName ) + { + m_hMutex = CreateMutexA( NULL, FALSE, strMutexName ); // Do early. + if (m_hMutex != NULL) + { + //OutputDebugStringA("CMonoInstance creating mutex 1st time"); + m_dwLastError = GetLastError(); // Save for use later... + if (ERROR_ALREADY_EXISTS == m_dwLastError) // give some time for snapshot + { + CloseHandle( m_hMutex ); + m_hMutex = NULL; + //OutputDebugStringA("WaitForParentPID() ERROR_ALREADY_EXISTS"); + if (WaitForParentPID() == false) + { + Sleep(1000); + WaitForParentPID(); + //OutputDebugStringA("WaitForParentPID() 2"); + } + //OutputDebugStringA("CMonoInstance creating mutex 2nd time"); + m_hMutex = CreateMutexA( NULL, FALSE, strMutexName ); + m_dwLastError = GetLastError(); + } + } else + { + //OutputDebugStringA("assuming m_dwLastError = ERROR_ALREADY_EXISTS"); + m_dwLastError = ERROR_ALREADY_EXISTS; + } + } + + ~CMonoInstance() + { + if( m_hMutex != NULL ) // Do not forget to close handles. + { + //OutputDebugStringA("~CMonoInstance()"); + CloseHandle( m_hMutex ); // Do as late as possible. + m_hMutex = NULL; // Good habit to be in. + } + } + + BOOL IsAnotherInstanceRunning() + { + return( ERROR_ALREADY_EXISTS == m_dwLastError || ERROR_ACCESS_DENIED == m_dwLastError); + } +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Client/PlayCounter.h electricsheep-3.0.2-git20180325/Client/PlayCounter.h --- electricsheep-2.7~b12+svn20091224/Client/PlayCounter.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/PlayCounter.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,258 @@ +/* + * PlayCounter.h + * ElectricSheep + */ + +#ifndef _PLAYCOUNTER_H +#define _PLAYCOUNTER_H + +#include +#include +static const uint32 gl_sMaxGeneration = 100000; +#define max_sheep 100000 +#define max_play_count ((1<<16)-1) +#define log_page_size 10 +#define log_count_size (log_page_size-1) +#define play_count_size (1<>log_count_size)) +#define play_write_rate 10 + +using boost::filesystem::path; + +struct sPlayCountData +{ + uint16 PlayCounts[ max_sheep ]; + FILE* PlayCountFile; +}; + +class CPlayCounter : public Base::CSingleton +{ + friend class Base::CSingleton; + + typedef std::map PlayCountMap; + + PlayCountMap m_PlayCounts; + path m_PlayCountFilePath; + bool m_ReadOnly; + + size_t m_DeadEndCutSurvivors; + size_t m_MedianCutSurvivors; + + int m_PlayCountDecayY; + int m_PlayCountDecayZ; + + uint64 m_PlayCountTotal; + + void InitPlayCounts(uint32 generation) + { + if (generation >= gl_sMaxGeneration || generation == 0) + return; + m_PlayCountTotal = 0; + + PlayCountMap::iterator iter = m_PlayCounts.find(generation); + if (iter == m_PlayCounts.end()) + { + boost::scoped_ptr pdata(new sPlayCountData); + memset(pdata.get(), 0, sizeof(sPlayCountData)); + path generation_path = m_PlayCountFilePath; + std::stringstream generationstr; + generationstr << "play_counts." << generation; + generation_path /= generationstr.str().c_str(); + // create new file for this generation +#ifdef WIN32 + pdata->PlayCountFile = _fsopen(generation_path.string().c_str(), "r+b", _SH_DENYWR); // deny write +#else + pdata->PlayCountFile = fopen(generation_path.string().c_str(), "r+b"); // deny write +#endif + if (pdata->PlayCountFile == NULL) // file not found + { +#ifdef WIN32 + pdata->PlayCountFile = _fsopen(generation_path.string().c_str(), "w+b", _SH_DENYWR); +#else + pdata->PlayCountFile = fopen(generation_path.string().c_str(), "w+b"); +#endif + if ( pdata->PlayCountFile == NULL ) // unable to open for writing + { + pdata->PlayCountFile = fopen(generation_path.string().c_str(), "rb" ); + if ( pdata->PlayCountFile == NULL ) // unable to open for reading + { + m_ReadOnly = true; + g_Log->Error( "Running without play counts: %s", generation_path.string().c_str()); + m_PlayCounts[generation] = *pdata; + return; + } + else + { + g_Log->Warning( "Using read-only playcounts" ); + m_ReadOnly = true; + } + } + else // write after w+b + if ( max_sheep != fwrite( pdata->PlayCounts, sizeof( uint16 ), max_sheep, pdata->PlayCountFile ) ) + { + m_ReadOnly = true; + g_Log->Error( "Cannot initialize play counts, fwrite failed" ); + fclose( pdata->PlayCountFile ); + pdata->PlayCountFile = NULL; + m_PlayCounts[generation] = *pdata; + return; + } + else + fflush(pdata->PlayCountFile); + } + + + size_t nread = fread( pdata->PlayCounts, sizeof( uint16 ), max_sheep, pdata->PlayCountFile); + fflush(pdata->PlayCountFile); + if ( nread < max_sheep ) + { + g_Log->Error( "Cannot initialize play counts, fread failed" ); + fclose( pdata->PlayCountFile ); + pdata->PlayCountFile = NULL; + } + + m_PlayCounts[generation] = *pdata; + + if ( nread == max_sheep ) + for (size_t ii = 0; ii < max_sheep; ++ii) + m_PlayCountTotal += m_PlayCounts[generation].PlayCounts[ii]; + } + } + +public: + CPlayCounter():m_ReadOnly(false), m_DeadEndCutSurvivors(0), m_MedianCutSurvivors(0), m_PlayCountTotal(0) + { + m_PlayCountDecayY = g_Settings()->Get( "settings.player.PlayCountDecayY", 2000 ); + m_PlayCountDecayZ = g_Settings()->Get( "settings.player.PlayCountDecayZ", 60 ); + if (m_PlayCountDecayZ < 0) + m_PlayCountDecayZ = 0; + if (m_PlayCountDecayZ > 100) + m_PlayCountDecayZ = 100; + } + + virtual ~CPlayCounter() + { + Shutdown(); + + SingletonActive( false ); + } + + const char *Description() { return( "Player" ); }; + + void clearMedianSurvivorsStats() + { + m_MedianCutSurvivors = 0; + } + + void clearDeadEndSurvivorsStats() + { + m_DeadEndCutSurvivors = 0; + } + + void IncMedianCutSurvivors() + { + ++m_MedianCutSurvivors; + } + + void IncDeadEndCutSurvivors() + { + ++m_DeadEndCutSurvivors; + } + + uint64 GetMedianCutSurvivors() + { + return m_MedianCutSurvivors; + } + + uint64 GetDeadEndCutSurvivors() + { + return m_DeadEndCutSurvivors; + } + + void ClosePlayCounts() + { + PlayCountMap::iterator iter = m_PlayCounts.begin(); + while (iter != m_PlayCounts.end()) + { + if (iter->second.PlayCountFile != NULL) + { + fflush( iter->second.PlayCountFile ); + fseek( iter->second.PlayCountFile, 0, SEEK_SET ); + size_t nwrite = fwrite( iter->second.PlayCounts, sizeof( uint16 ), max_sheep, iter->second.PlayCountFile ); + if (nwrite != max_sheep) + g_Log->Error( "Writing playcounts failed" ); + fclose( iter->second.PlayCountFile ); + iter->second.PlayCountFile = NULL; + } + ++iter; + } + m_PlayCounts.clear(); + } + + bool Shutdown( void ) + { + ClosePlayCounts(); + + return true; + } + + void SetDirectory( const path& dir ) + { + m_PlayCountFilePath = dir; + } + + void IncPlayCount( uint32 generation, uint32 id ) + { + if (id >= max_sheep || generation > gl_sMaxGeneration || generation == 0) + return; + if (m_PlayCountTotal > static_cast(m_PlayCountDecayY) && m_PlayCountDecayZ != 100) + { + m_PlayCountTotal = 0; + for (PlayCountMap::iterator jj = m_PlayCounts.begin(); jj != m_PlayCounts.end(); ++jj) + for (size_t ii = 0; ii < max_sheep; ++ii) + { + jj->second.PlayCounts[ii] = uint16(m_PlayCountDecayZ/100. * jj->second.PlayCounts[ii]); + m_PlayCountTotal += jj->second.PlayCounts[ii]; + } + } + + PlayCountMap::iterator iter = m_PlayCounts.find(generation); + if (iter == m_PlayCounts.end()) + InitPlayCounts(generation); + + iter = m_PlayCounts.find(generation); + ++iter->second.PlayCounts[id]; + ++m_PlayCountTotal; + } + + uint16 PlayCount( uint32 generation, uint32 id ) + { + if ( id < max_sheep && generation != 0 && generation < gl_sMaxGeneration) + { + PlayCountMap::iterator iter = m_PlayCounts.find(generation); + if (iter == m_PlayCounts.end()) + InitPlayCounts(generation); + + iter = m_PlayCounts.find(generation); + if (iter->second.PlayCounts[id] != 0) + return iter->second.PlayCounts[id]; + else + return 1; + } + return 1; + } + + bool ReadOnlyPlayCounts() + { + return m_ReadOnly; + } +}; + +/* + Helper for less typing... + +*/ +inline CPlayCounter &g_PlayCounter( void ) { return( CPlayCounter::Instance() ); } + +#endif //_PLAYCOUNTER_H + diff -Nru electricsheep-2.7~b12+svn20091224/Client/Player.cpp electricsheep-3.0.2-git20180325/Client/Player.cpp --- electricsheep-2.7~b12+svn20091224/Client/Player.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/Player.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,677 @@ +#ifdef WIN32 +#include +#endif + +#if defined(WIN32) && !defined(_MSC_VER) +#include +#endif +#include +#include +#include + +#ifndef WIN32 +#ifndef LINUX_GNU +#include "GLee.h" +#else +#include +#include +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define __LITTLE_ENDIAN__ __LITTLE_ENDIAN +#undef __BIG_ENDIAN__ +#else +#undef __LITTLE_ENDIAN__ +#define __BIG_ENDIAN__ __BIG_ENDIAN +#endif +#endif +#ifdef MAC +#include +#else +#include +#endif +#endif + +#include "base.h" +#include "MathBase.h" +#include "clientversion.h" +#include "Log.h" +#include "Player.h" + +#ifdef WIN32 +#include "DisplayDX.h" +#include "RendererDX.h" +#if defined(WIN32) && defined(_MSC_VER) && !defined(_WIN64) +#include "../msvc/DisplayDD.h" +#include "../msvc/RendererDD.h" +#endif +#else +#include "DisplayGL.h" +#include "RendererGL.h" +#endif + + +#include "lua_playlist.h" +#include "Settings.h" +#include "ContentDownloader.h" +#include "PlayCounter.h" +#include "storage.h" + +#include "FrameDisplay.h" +#include "LinearFrameDisplay.h" +#include "CubicFrameDisplay.h" + +#include "boost/filesystem/path.hpp" +#include "boost/filesystem/operations.hpp" +#include "boost/filesystem/convenience.hpp" + +#if defined(MAC) || defined(WIN32) + #define HONOR_VBL_SYNC +#endif + +using boost::filesystem::path; +using boost::filesystem::exists; +using boost::filesystem::directory_iterator; +using boost::filesystem::extension; + +using namespace DisplayOutput; + + +/* +*/ +CPlayer::CPlayer() +{ + m_spDecoder = NULL; + m_spPlaylist = NULL; + + m_PlayerFps = 15; // http://en.wikipedia.org/wiki/23_(numerology) + m_DisplayFps = 60; + + m_bFullscreen = true; + m_InitPlayCounts = true; + + m_MultiDisplayMode = kMDSharedMode; + + m_bStarted = false; + + m_CapClock = 0.0; + +#ifdef WIN32 + m_hWnd = NULL; +#endif +} + +/* + SetHWND(). + +*/ +#ifdef WIN32 +void CPlayer::SetHWND( HWND _hWnd ) +{ + g_Log->Info( "Got hwnd... (0x%x)", _hWnd ); + m_hWnd = _hWnd; +}; +#endif + +#ifdef MAC +bool CPlayer::AddDisplay( CGLContextObj _glContext ) +#else +#ifdef WIN32 +bool CPlayer::AddDisplay( uint32 screen, IDirect3D9 *_pIDirect3D9, bool _blank) +#else +bool CPlayer::AddDisplay( uint32 screen ) +#endif +#endif +{ + DisplayOutput::spCDisplayOutput spDisplay; + DisplayOutput::spCRenderer spRenderer; + ContentDecoder::spCContentDecoder spDecoder; + spCFrameDisplay spFrameDisplay; + + static bool detectgold = true; + if (detectgold) + { + detectgold = false; + std::string content = g_Settings()->Root() + "content/"; + std::string watchFolder = g_Settings()->Get( "settings.content.sheepdir", content ) + "/mpeg/"; + + std::vector files; + m_HasGoldSheep = Base::GetFileList( files, watchFolder, "avi", true, false ); + } + // modify aspect ratio and/or window size hint + uint32 w = 1280; + uint32 h = 720; + m_UsedSheepType = g_Settings()->Get( "settings.player.PlaybackMixingMode", 0 ); + switch ( m_UsedSheepType ) + { + case 0: // only gold, if any + { + if (m_HasGoldSheep == false) + { + w = 800; + h = 592; + m_UsedSheepType = 2; + } + } + break; + case 1: // free sheep only + w = 800; + h = 592; + break; + case 2: // all sheep + break; + }; + + + +#ifdef WIN32 +#ifndef _WIN64 + bool bDirectDraw = g_Settings()->Get( "settings.player.directdraw", false ); + CDisplayDD *pDisplayDD = NULL; +#endif + CDisplayDX *pDisplayDX = NULL; +#ifndef _WIN64 + if (bDirectDraw) + { + g_Log->Info( "Attempting to open %s...", CDisplayDD::Description() ); + pDisplayDD = new CDisplayDD(); + } + else +#endif + { + g_Log->Info( "Attempting to open %s...", CDisplayDX::Description() ); + pDisplayDX = new CDisplayDX( _blank, _pIDirect3D9 ); + pDisplayDX->SetScreen( screen ); + } + + + if( pDisplayDX == NULL +#ifndef _WIN64 + && pDisplayDD == NULL +#endif + ) + { + g_Log->Error( "Unable to open display" ); + return false; + } +#ifndef _WIN64 + if (bDirectDraw) + spDisplay = pDisplayDD; + else +#endif + spDisplay = pDisplayDX; + if( m_hWnd ) + { + if( !spDisplay->Initialize( m_hWnd, true ) ) + return false; + } + else + if ( !spDisplay->Initialize( w, h, m_bFullscreen ) ) + return false; +#ifndef _WIN64 + if (bDirectDraw) + spRenderer = new CRendererDD(); + else +#endif + spRenderer = new CRendererDX(); +#else // !WIN32 + + g_Log->Info( "Attempting to open %s...", CDisplayGL::Description() ); + spDisplay = new CDisplayGL(); + if( spDisplay == NULL ) + return false; + +#ifdef MAC + if (_glContext != NULL) + { + if( !spDisplay->Initialize( _glContext, true ) ) + return false; + + spDisplay->ForceWidthAndHeight(w, h); + } +#else + if( !spDisplay->Initialize( w, h, m_bFullscreen ) ) + return false; +#endif + + spRenderer = new CRendererGL(); +#endif + + // Start renderer & set window title. + if (spRenderer->Initialize( spDisplay ) == false) + return false; + spDisplay->Title( "Electric Sheep" ); + + // Create frame display. + int32 displayMode = g_Settings()->Get( "settings.player.DisplayMode", 2 ); + if( displayMode == 2 ) + { + if( spDisplay->HasShaders() ) + { + g_Log->Info( "Using piecewise cubic video display..." ); + spFrameDisplay = new CCubicFrameDisplay( spRenderer ); + } + } + else + { + if( displayMode == 1 ) + { + if( spDisplay->HasShaders() ) + { + g_Log->Info( "Using piecewise linear video display..." ); + spFrameDisplay = new CLinearFrameDisplay( spRenderer ); + g_Settings()->Set( "settings.player.DisplayMode", 1 ); + } + } + } + + if( spFrameDisplay && !spFrameDisplay->Valid() ) + { + g_Log->Warning( "FrameDisplay failed, falling back to normal" ); + g_Settings()->Set( "settings.player.DisplayMode", 0 ); + spFrameDisplay = NULL; + } + + // Fallback to normal. + if( spFrameDisplay == NULL ) + { + g_Log->Info( "Using normal video display..." ); + spFrameDisplay = new CFrameDisplay( spRenderer ); + g_Settings()->Set( "settings.player.DisplayMode", 0 ); + } + + spFrameDisplay->SetDisplaySize( spDisplay->Width(), spDisplay->Height() ); + + { + DisplayUnit *du = new DisplayUnit; + + du->spFrameDisplay = spFrameDisplay; + du->spRenderer = spRenderer; + du->spDisplay = spDisplay; + du->m_MetaData.m_SheepID = 0; + du->m_MetaData.m_SheepGeneration = 0; + du->m_MetaData.m_Fade = 1.f; + du->m_MetaData.m_FileName = ""; + du->m_MetaData.m_LastAccessTime = time(NULL); + du->m_MetaData.m_IsEdge = false; + + if ( m_MultiDisplayMode == kMDIndividualMode && !Stopped() ) + { + du->spDecoder = CreateContentDecoder( true ); + du->spDecoder->Start(); + } + + + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + + if (g_Settings()->Get( "settings.player.reversedisplays", false ) == true) + m_displayUnits.insert(m_displayUnits.begin(), du); + else + m_displayUnits.push_back(du); + + } + + return true; +} + +/* +*/ +bool CPlayer::Startup() +{ + m_DisplayFps = g_Settings()->Get( "settings.player.display_fps", 60. ); + +#ifdef HONOR_VBL_SYNC + if ( g_Settings()->Get( "settings.player.vbl_sync", false ) ) + { + m_DisplayFps = 0.0; + } +#endif + + // Grab some paths for the decoder. + std::string content = g_Settings()->Root() + "content/"; +#ifndef LINUX_GNU + std::string scriptRoot = g_Settings()->Get( "settings.app.InstallDir", std::string("./") ) + "Scripts"; +#else + std::string scriptRoot = g_Settings()->Get( "settings.app.InstallDir", std::string(SHAREDIR) ) + "Scripts"; +#endif + std::string watchFolder = g_Settings()->Get( "settings.content.sheepdir", content ) + "/mpeg/"; + + if( TupleStorage::IStorageInterface::CreateFullDirectory( content.c_str() ) ) + { + if (m_InitPlayCounts) + g_PlayCounter().SetDirectory( content ); + } + + // Tidy up the paths. + path scriptPath = scriptRoot; + path watchPath = watchFolder; + + // Create playlist. + g_Log->Info( "Creating playlist..." ); + m_spPlaylist = new ContentDecoder::CLuaPlaylist( scriptPath.string(), + watchPath.string(), + m_UsedSheepType ); + + // Create decoder last. + g_Log->Info( "Starting decoder..." ); + + m_bStarted = false; + + return true; +} + +ContentDecoder::CContentDecoder *CPlayer::CreateContentDecoder( bool _bStartByRandom ) +{ + if ( m_spPlaylist.IsNull() ) + return NULL; + +#ifndef LINUX_GNU + AVPixelFormat pf = AV_PIX_FMT_RGB32; + + //On PowerPC machines we need to use different pixel format! +#if defined(MAC) && defined(__BIG_ENDIAN__) + pf = AV_PIX_FMT_BGR32_1; +#endif + +#else + + AVPixelFormat pf = AV_PIX_FMT_BGR32; +#if defined(__BIG_ENDIAN__) + pf = AV_PIX_FMT_RGB32_1; +#endif + +#endif + + return new ContentDecoder::CContentDecoder( m_spPlaylist, _bStartByRandom, g_Settings()->Get( "settings.player.CalculateTransitions", true ), (uint32)abs(g_Settings()->Get( "settings.player.BufferLength", 25 )), pf ); +} + +/* + + */ +void CPlayer::ForceWidthAndHeight(uint32 du, uint32 _w, uint32 _h) +{ + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + if (du >= m_displayUnits.size()) + return; + + const DisplayUnit* duptr = m_displayUnits[du]; + + if (duptr == NULL) + return; + +#ifdef MAC + if (!duptr->spDisplay.IsNull()) + { + spCDisplayOutput disp = duptr->spDisplay; + disp->ForceWidthAndHeight(_w, _h); + } +#endif + + if (!duptr->spFrameDisplay.IsNull()) + { + spCFrameDisplay fd = duptr->spFrameDisplay; + fd->SetDisplaySize(_w, _h); + } +} + +/* + +*/ +void CPlayer::Start() +{ + if ( !m_bStarted ) + { + m_CapClock = 0.0; + + if ( m_MultiDisplayMode == kMDSharedMode ) + { + m_spDecoder = CreateContentDecoder( true ); + + if( !m_spDecoder->Start() ) + g_Log->Warning( "Nothing to play" ); + } + else + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + DisplayUnitIterator it = m_displayUnits.begin(); + + for ( ; it != m_displayUnits.end(); it++ ) + { + if ((*it)->spDecoder.IsNull()) + (*it)->spDecoder = CreateContentDecoder( true ); + + if( !(*it)->spDecoder->Start() ) + g_Log->Warning( "Nothing to play" ); + } + } + + m_bStarted = true; + + //m_spRenderer->Reset( DisplayOutput::eEverything ); + //m_spRenderer->Orthographic(); + } +} + +/* +*/ +void CPlayer::Stop() +{ + if ( m_bStarted ) + { + if ( m_MultiDisplayMode == kMDSharedMode ) + { + m_spDecoder->Stop(); + } + else + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + DisplayUnitIterator it = m_displayUnits.begin(); + + for ( ; it != m_displayUnits.end(); it++ ) + { + if (!(*it)->spDecoder.IsNull()) + (*it)->spDecoder->Stop(); + } + } + } + + m_bStarted = false; +} + +/* +*/ +bool CPlayer::Shutdown( void ) +{ + g_Log->Info( "CPlayer::Shutdown()\n" ); + + Stop(); + + if ( m_MultiDisplayMode == kMDSharedMode ) + { + if (m_spDecoder.IsNull() == false) + m_spDecoder->Close(); + } + else + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + DisplayUnitIterator it = m_displayUnits.begin(); + + for ( ; it != m_displayUnits.end(); it++ ) + { + if (!(*it)->spDecoder.IsNull()) + (*it)->spDecoder->Close(); + + } + } + + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + DisplayUnitIterator it = m_displayUnits.begin(); + + for ( ; it != m_displayUnits.end(); it++ ) + { + delete (*it); + } + } + + m_spPlaylist = NULL; + + m_spDecoder = NULL; + + m_displayUnits.clear(); + + m_bStarted = false; + + return true; +} + +/* +*/ +CPlayer::~CPlayer() +{ + // Mark singleton as properly shutdown, to track unwanted access after this point. + SingletonActive( false ); +} + +bool CPlayer::BeginFrameUpdate() +{ + if ( m_MultiDisplayMode == kMDSharedMode ) + { + if (m_spDecoder.IsNull() == false) + m_spDecoder->ResetSharedFrame(); + } + else + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + DisplayUnitIterator it = m_displayUnits.begin(); + + for ( ; it != m_displayUnits.end(); it++ ) + { + if (!(*it)->spDecoder.IsNull()) + (*it)->spDecoder->ResetSharedFrame(); + + } + } + + return true; +} + +bool CPlayer::EndFrameUpdate() +{ + spCFrameDisplay spFD; + + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + spFD = m_displayUnits[ 0 ]->spFrameDisplay; + } + + fp8 capFPS = spFD->GetFps( m_PlayerFps, m_DisplayFps ); + + if ( !spFD.IsNull() && capFPS > 0.000001) + FpsCap( capFPS ); + + return true; +} + +bool CPlayer::BeginDisplayFrame( uint32 displayUnit ) +{ + DisplayUnit* du; + + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + if (displayUnit >= m_displayUnits.size()) + return false; + + du = m_displayUnits[ displayUnit ]; + } + + if (du->spRenderer->BeginFrame() == false) + return false; + + return true; +} + +bool CPlayer::EndDisplayFrame( uint32 displayUnit, bool drawn ) +{ + DisplayUnit* du; + + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + if (displayUnit >= m_displayUnits.size()) + return false; + + du = m_displayUnits[ displayUnit ]; + } + + return du->spRenderer->EndFrame( drawn ); +} + +// Chill the remaining time to keep the framerate. +void CPlayer::FpsCap( const fp8 _cap ) +{ + fp8 diff = 1.0/_cap - (m_Timer.Time() - m_CapClock); + if( diff > 0.0 ) + Base::CTimer::Wait( diff ); + + m_CapClock = m_Timer.Time(); +} + + +/* + Update(). + +*/ +bool CPlayer::Update(uint32 displayUnit, bool &bPlayNoSheepIntro) +{ + bPlayNoSheepIntro = false; + + DisplayUnit* du; + + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + if (displayUnit >= m_displayUnits.size()) + return false; + + du = m_displayUnits[ displayUnit ]; + } + + du->spRenderer->Reset( eEverything ); + du->spRenderer->Orthographic(); + du->spRenderer->Apply(); + + { + boost::mutex::scoped_lock lockthis( m_updateMutex ); + + // Update the frame display, it rests before doing any work to keep the framerate. + if( !du->spFrameDisplay->Update( du->spDecoder.IsNull() ? m_spDecoder : du->spDecoder, m_PlayerFps, m_DisplayFps, du->m_MetaData ) ) + { + if ( (m_spDecoder.IsNull() == false && m_spDecoder->PlayNoSheepIntro()) || + (du->spDecoder.IsNull() == false && du->spDecoder->PlayNoSheepIntro()) ) + { + bPlayNoSheepIntro = true; + return true; + } + return false; + // Failed to update screen here, do something noticeable like show a logo or something.. :) + //g_Log->Warning( "Failed to render frame..." ); + } + } + + if ( (m_spDecoder.IsNull() == false && m_spDecoder->PlayNoSheepIntro()) || + (du->spDecoder.IsNull() == false && du->spDecoder->PlayNoSheepIntro()) ) + { + bPlayNoSheepIntro = true; + return true; + } + + return true; +} diff -Nru electricsheep-2.7~b12+svn20091224/Client/Player.h electricsheep-3.0.2-git20180325/Client/Player.h --- electricsheep-2.7~b12+svn20091224/Client/Player.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/Player.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,260 @@ +#ifndef _PLAYER_H_ +#define _PLAYER_H_ + +#ifdef WIN32 +#include +#include +#endif +#include "DisplayOutput.h" +#include "Renderer.h" +#include "Singleton.h" +#include "ContentDecoder.h" +#include "lua_playlist.h" +#include "Timer.h" +#include "FrameDisplay.h" +#include "Timer.h" + +/** + CPlayer. + Singleton class to display decoded video to display. +*/ +class CPlayer : public Base::CSingleton +{ +public: + typedef enum + { + kMDSharedMode, + kMDIndividualMode, + kMDSingleScreen + } MultiDisplayMode; + +private: + typedef struct + { + DisplayOutput::spCDisplayOutput spDisplay; + DisplayOutput::spCRenderer spRenderer; + ContentDecoder::spCContentDecoder spDecoder; + spCFrameDisplay spFrameDisplay; + ContentDecoder::sMetaData m_MetaData; // current frame meta data + } DisplayUnit; + + typedef std::vector DisplayUnitList; + typedef std::vector::iterator DisplayUnitIterator; + + boost::mutex m_displayListMutex; + + friend class Base::CSingleton; + + // Private constructor accessible only to CSingleton. + CPlayer(); + + // No copy constructor or assignment operator. + NO_CLASS_STANDARDS( CPlayer ); + + // Videodecoder & framedisplay object. + ContentDecoder::spCContentDecoder m_spDecoder; + + DisplayUnitList m_displayUnits; + + // Playlist. + ContentDecoder::spCLuaPlaylist m_spPlaylist; + + + // Timer. + Base::CTimer m_Timer; + + // Goal decoding framerate. + fp8 m_PlayerFps; + + // Goal display framerate; + fp8 m_DisplayFps; + + // Fullscreen or not. + bool m_bFullscreen; + + bool m_InitPlayCounts; + + MultiDisplayMode m_MultiDisplayMode; + + bool m_bStarted; + + // Used to keep track of elapsed time since last frame. + fp8 m_CapClock; + + bool m_HasGoldSheep; + int m_UsedSheepType; + + boost::mutex m_updateMutex; + +#ifdef WIN32 + HWND m_hWnd; + + public: + // When running as a screensaver, we need to pass this along, as it's already created for us. + void SetHWND( HWND _hWnd ); + HWND GetHWND( void ) { return m_hWnd; } + private: +#endif + + ContentDecoder::CContentDecoder *CreateContentDecoder( bool _bStartByRandom = false ); + + void FpsCap( const fp8 _cap ); + + public: + bool Startup(); + bool Shutdown( void ); + virtual ~CPlayer(); + + const char *Description() { return( "Player" ); }; + + bool Closed( void ) + { + DisplayOutput::spCDisplayOutput spDisplay = Display(); + + if( spDisplay == NULL ) + { + g_Log->Warning( "m_spDisplay is NULL" ); + return true; + } + + return spDisplay->Closed(); + } + + bool BeginFrameUpdate(); + bool EndFrameUpdate(); + bool BeginDisplayFrame( uint32 displayUnit ); + bool EndDisplayFrame( uint32 displayUnit, bool drawn = true ); + bool Update(uint32 displayUnit, bool &bPlayNoSheepIntro); + void Start(); + void Stop(); + +#ifdef MAC + bool AddDisplay( CGLContextObj _glContext ); +#else +#ifdef WIN32 + bool AddDisplay( uint32 screen, IDirect3D9 *_pIDirect3D9 = NULL, bool _blank = false ); +#else + bool AddDisplay( uint32 screen ); +#endif +#endif + + inline void PlayCountsInitOff() { m_InitPlayCounts = false; }; + inline void Framerate( const fp8 _fps ) { m_PlayerFps = _fps; }; + inline void Fullscreen( const bool _bState ) { m_bFullscreen = _bState; }; + inline bool Stopped() { return !m_bStarted; }; + + inline DisplayOutput::spCDisplayOutput Display(uint32 du = 0) + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + if (du >= m_displayUnits.size()) + return NULL; + + return m_displayUnits[du]->spDisplay; + } + + inline DisplayOutput::spCRenderer Renderer() + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + return m_displayUnits.empty() ? NULL : m_displayUnits[0]->spRenderer; + } + + inline ContentDecoder::spCContentDecoder Decoder() + { + boost::mutex::scoped_lock lockthis( m_displayListMutex ); + + if ( m_MultiDisplayMode == kMDSharedMode ) + return m_spDecoder; + else + return m_displayUnits.empty() ? NULL : m_displayUnits[0]->spDecoder; + } + + // Playlist stuff. + inline std::string GetCurrentPlayingSheepFile() + { + return m_displayUnits[0]->m_MetaData.m_FileName; + } + inline uint32 GetCurrentPlayingSheepID() + { + return m_displayUnits[0]->m_MetaData.m_SheepID; + }; + inline uint32 GetCurrentPlayingSheepGeneration() + { + return m_displayUnits[0]->m_MetaData.m_SheepGeneration; + }; + inline time_t GetCurrentPlayingatime() + { + return m_displayUnits[0]->m_MetaData.m_LastAccessTime; + }; + inline time_t IsCurrentPlayingEdge() + { + return m_displayUnits[0]->m_MetaData.m_IsEdge; + }; + inline uint32 GetCurrentPlayingID() + { + ContentDecoder::spCContentDecoder decoder = Decoder(); + + if ( decoder.IsNull() ) + return 0; + + return decoder->GetCurrentPlayingID(); + }; + + inline uint32 GetCurrentPlayingGeneration() + { + ContentDecoder::spCContentDecoder decoder = Decoder(); + + if ( decoder.IsNull() ) + return 0; + + return decoder->GetCurrentPlayingGeneration(); + }; + + inline void Delete( const uint32 _id ) { if ( !m_spPlaylist.IsNull() ) m_spPlaylist->Delete( _id ); }; + inline void SkipToNext( void ) + { + ContentDecoder::spCContentDecoder decoder = Decoder(); + + if ( decoder.IsNull() ) + return; + + decoder->ForceNext(); + } + + inline void ReturnToPrevious( void ) + { + ContentDecoder::spCContentDecoder decoder = Decoder(); + + if ( decoder.IsNull() ) + return; + + decoder->ForceNext( -2 ); + } + + inline void RepeatSheep( void ) + { + ContentDecoder::spCContentDecoder decoder = Decoder(); + + if ( decoder.IsNull() ) + return; + + decoder->ForceNext( -1 ); + } + + inline void SetMultiDisplayMode( MultiDisplayMode mode ) { m_MultiDisplayMode = mode; } + inline bool HasGoldSheep() { return m_HasGoldSheep; } + inline int UsedSheepType() { return m_UsedSheepType; } + + inline uint32 GetDisplayCount() { return static_cast(m_displayUnits.size()); } + + void ForceWidthAndHeight(uint32 du, uint32 _w, uint32 _h); +}; + +/* + Helper for less typing... + +*/ +inline CPlayer &g_Player( void ) { return( CPlayer::Instance() ); } + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Client/ServerMessage.h electricsheep-3.0.2-git20180325/Client/ServerMessage.h --- electricsheep-2.7~b12+svn20091224/Client/ServerMessage.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/ServerMessage.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,105 @@ +#ifndef _SERVERMESSAGE_H_ +#define _SERVERMESSAGE_H_ + +#include +#include "Hud.h" +#include "Rect.h" +#include "Console.h" +#ifdef WIN32 +#include "boost/date_time/posix_time/posix_time.hpp" +#endif + +namespace Hud +{ +static boost::posix_time::ptime m_ServerMessageStartTimer = boost::posix_time::second_clock::local_time(); +static bool m_bServerMessageStartTimer = false; +/* + CServerMessage. + +*/ +class CServerMessage : public CConsole +{ + std::string m_Message; + DisplayOutput::CFontDescription m_Desc; + fp4 m_MoveMessageCounter; + + public: + CServerMessage( std::string &_msg, Base::Math::CRect _rect, const uint32 _fontHeight ) : CConsole( _rect ) + { + DisplayOutput::CFontDescription fontDesc; + + m_Desc.AntiAliased( true ); + m_Desc.Height( _fontHeight ); + m_Desc.Style( DisplayOutput::CFontDescription::Normal ); + m_Desc.Italic( false ); + m_Desc.TypeFace( "Trebuchet MS" ); + + size_t offs = _msg.find_last_of( '\n', _msg.size() ); + m_Message = _msg.substr( 0, offs ); + + m_spFont = g_Player().Renderer()->NewFont( m_Desc ); + m_MoveMessageCounter = 0.; + } + + virtual ~CServerMessage() + { + } + + // Override to make it always visible. + virtual bool Visible() const { return true; }; + + // + bool Render( const fp8 _time, DisplayOutput::spCRenderer _spRenderer ) + { + if( !CHudEntry::Render( _time, _spRenderer ) ) + return false; + + if (m_bServerMessageStartTimer == false) + { + m_bServerMessageStartTimer = true; + m_ServerMessageStartTimer = boost::posix_time::second_clock::local_time(); + } + //fp4 step = (fp4)m_Desc.Height() / (fp4)_spRenderer->Display()->Height(); + fp4 edge = 24 / (fp4)_spRenderer->Display()->Width(); + + std::map::const_iterator i; + + // Figure out text extent for all strings. + Base::Math::CRect extent; + Base::Math::CVector2 size = g_Player().Renderer()->GetTextExtent( m_spFont, m_Message ); + extent = extent.Union( Base::Math::CRect( 0, 0, size.m_X+(edge*2), size.m_Y+(edge*2) ) ); + + boost::posix_time::time_duration td = boost::posix_time::second_clock::local_time() - m_ServerMessageStartTimer; + if (td.hours() >= 1) + { + m_MoveMessageCounter += 0.0005f; + if (m_MoveMessageCounter >= 1.f) + m_MoveMessageCounter -= 1.f + edge*2 + fp4(size.m_Y); + } + // Draw quad. + _spRenderer->Reset( DisplayOutput::eTexture | DisplayOutput::eShader | DisplayOutput::eBlend ); + + Base::Math::CRect r( 0.5f - (extent.Width()*0.5f), extent.m_Y0 + m_MoveMessageCounter, + 0.5f + (extent.Width()*0.5f), extent.m_Y1 + m_MoveMessageCounter); + + _spRenderer->SetBlend( "alphablend" ); + _spRenderer->Apply(); + _spRenderer->DrawSoftQuad( r, Base::Math::CVector4( 0, 0, 0, 0.5 ), 16 ); + + //dasvo - terrible hack - redo!! + if (!m_spFont.IsNull()) + m_spFont->Reupload(); + + g_Player().Renderer()->Text( m_spFont, m_Message, Base::Math::CVector4( 1, 1, 1, 1 ), Base::Math::CRect( r.m_X0+edge, r.m_Y0+edge, r.m_X1, r.m_Y1 ), 0 ); + + return true; + } +}; + +MakeSmartPointers( CServerMessage ); + +}; + +#endif + + diff -Nru electricsheep-2.7~b12+svn20091224/Client/Splash.h electricsheep-3.0.2-git20180325/Client/Splash.h --- electricsheep-2.7~b12+svn20091224/Client/Splash.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/Splash.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,167 @@ +#ifndef _SPLASH_H_ +#define _SPLASH_H_ + +#include "Hud.h" +#include "Rect.h" +#include "fastbez.h" + +namespace Hud +{ + +/* + CSplash. + +*/ +class CSplash : public CHudEntry +{ + DisplayOutput::spCTextureFlat m_spTexture; + Base::Math::CFastBezier *m_pAlphaBezier, *m_pSizeBezier; + + public: + CSplash( const fp4 _size, const std::string &_texture ) : CHudEntry( Base::Math::CRect(_size, _size ) ) + { + DisplayOutput::spCImage tmpImage = new DisplayOutput::CImage(); + if( tmpImage->Load( _texture, false ) ) + { + m_spTexture = g_Player().Renderer()->NewTextureFlat(); + m_spTexture->Upload( tmpImage ); + } + + // Adjust aspect... + fp4 aspect = g_Player().Display()->Aspect(); + m_Rect.m_X0 = 0; + m_Rect.m_X1 = _size * aspect; + m_Rect.m_Y0 = 0; + m_Rect.m_Y1 = _size; + + tmpImage = NULL; + + m_pAlphaBezier = new Base::Math::CFastBezier( 0, 2, 1, 0 ); + m_pSizeBezier = new Base::Math::CFastBezier( 1.f, 0.65f, 0.95f, 2.5f ); + } + + virtual ~CSplash() + { + SAFE_DELETE( m_pAlphaBezier ); + SAFE_DELETE( m_pSizeBezier ); + } + + // Override to make it always visible. + virtual bool Visible() const { return true; }; + + bool Render( const fp8 _time, DisplayOutput::spCRenderer _spRenderer ) + { + if( !CHudEntry::Render( _time, _spRenderer ) ) + return false; + + if( m_spTexture == NULL ) + return false; + + DisplayOutput::spCRenderer spRenderer = g_Player().Renderer(); + + spRenderer->Reset( DisplayOutput::eTexture | DisplayOutput::eShader ); + spRenderer->SetTexture( m_spTexture, 0 ); + spRenderer->SetBlend( "alphablend" ); + spRenderer->Apply(); + + + Base::Math::CRect r = m_Rect; + const fp4 s = m_pSizeBezier->Sample( fp4(m_Delta) ); + r.m_X0 = 0.5f - (m_Rect.Width()*s); + r.m_Y0 = 0.5f - (m_Rect.Height()*s); + r.m_X1 = 0.5f + (m_Rect.Width()*s); + r.m_Y1 = 0.5f + (m_Rect.Height()*s); + + spRenderer->DrawQuad( r, Base::Math::CVector4( 1,1,1, Base::Math::saturate( m_pAlphaBezier->Sample( fp4(m_Delta) ) ) ), m_spTexture->GetRect() ); + + return true; + } +}; + +MakeSmartPointers( CSplash ); + +class CSplashImage : public CHudEntry +{ + DisplayOutput::spCTextureFlat m_spTexture; + fp4 m_FadeinTime; + fp4 m_HoldTime; + fp4 m_FadeoutTime; + public: + CSplashImage( const fp4 _size, const std::string &_texture, fp4 fadeintime, fp4 holdtime, fp4 fadeouttime ) : CHudEntry( Base::Math::CRect(_size, _size ) ) + { + DisplayOutput::spCImage tmpImage = new DisplayOutput::CImage(); + if( tmpImage->Load( _texture, false ) ) + { + m_spTexture = g_Player().Renderer()->NewTextureFlat(); + m_spTexture->Upload( tmpImage ); + } + + // Adjust aspect... + fp4 aspect = g_Player().Display()->Aspect(); + m_Rect.m_X0 = 0; + m_Rect.m_X1 = _size * aspect; + m_Rect.m_Y0 = 0; + m_Rect.m_Y1 = _size; + + tmpImage = NULL; + + m_FadeinTime = fadeintime; + m_HoldTime = holdtime; + m_FadeoutTime = fadeouttime; + + } + + virtual ~CSplashImage() + { + } + + // Override to make it always visible. + virtual bool Visible() const { return true; }; + + bool Render( const fp8 _time, DisplayOutput::spCRenderer _spRenderer ) + { + if( !CHudEntry::Render( _time, _spRenderer ) ) + return false; + + if( m_spTexture == NULL ) + return false; + + DisplayOutput::spCRenderer spRenderer = g_Player().Renderer(); + + spRenderer->Reset( DisplayOutput::eTexture | DisplayOutput::eShader ); + spRenderer->SetTexture( m_spTexture, 0 ); + spRenderer->SetBlend( "alphablend" ); + spRenderer->Apply(); + + + Base::Math::CRect r = m_Rect; + r.m_X0 = 0.f; + r.m_Y0 = 0.f; + r.m_X1 = 1.f; + r.m_Y1 = 1.f; + + fp8 alpha = 0.; + + fp8 timepassed = fmod(_time, m_StartTime + m_FadeinTime + m_HoldTime + m_FadeoutTime); + if ( timepassed > m_StartTime + m_FadeinTime + m_HoldTime ) // fadeout + { + alpha = 1. - ( timepassed - ( m_StartTime + m_FadeinTime + m_HoldTime ) ) / m_FadeoutTime; + } + else + { + if ( timepassed > m_StartTime + m_FadeinTime ) // hold + alpha = 1.; + else // fade in + alpha = ( ( timepassed - m_StartTime ) / m_FadeinTime ); + } + + spRenderer->DrawQuad( r, Base::Math::CVector4( 1,1,1, fp4(alpha) ), m_spTexture->GetRect() ); + + return true; + } +}; +MakeSmartPointers( CSplashImage ); +}; + +#endif + diff -Nru electricsheep-2.7~b12+svn20091224/Client/StartupScreen.h electricsheep-3.0.2-git20180325/Client/StartupScreen.h --- electricsheep-2.7~b12+svn20091224/Client/StartupScreen.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/StartupScreen.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,133 @@ +#ifndef _STARTUPSCREEN_H_ +#define _STARTUPSCREEN_H_ + +#include +#include "Hud.h" +#include "Rect.h" +#include "Console.h" + +namespace Hud +{ + +class CStartupScreen : public CHudEntry +{ + std::string m_StartupMessage; + DisplayOutput::CFontDescription m_Desc; + DisplayOutput::spCBaseFont m_spFont; + DisplayOutput::spCImage m_spImageRef; + DisplayOutput::spCTextureFlat m_spVideoTexture; + + Base::Math::CRect m_LogoSize; + fp4 m_MoveMessageCounter; + + public: + CStartupScreen( Base::Math::CRect _rect, const std::string &_FontName, const uint32 _fontHeight ) : CHudEntry( _rect ) + { + DisplayOutput::CFontDescription fontDesc; + + m_Desc.AntiAliased( true ); + m_Desc.Height( _fontHeight ); + m_Desc.Style( DisplayOutput::CFontDescription::Normal ); + m_Desc.Italic( false ); + m_Desc.TypeFace( _FontName ); + + m_spFont = g_Player().Renderer()->NewFont( m_Desc ); + m_StartupMessage = "No Sheep downloaded yet, this should take less than a minute\nbut might take several hours. Please see ElectricSheep.org\nto learn more, or press F1 for help."; + m_spImageRef = new DisplayOutput::CImage(); + m_spImageRef->Create(256, 256, DisplayOutput::eImage_RGBA8, false, true ); +#ifndef LINUX_GNU + m_spImageRef->Load(g_Settings()->Get( "settings.app.InstallDir", std::string(".\\") ) + "electricsheep-smile.png", false); +#else + m_spImageRef->Load(g_Settings()->Get( "settings.app.InstallDir", std::string("") ) + "electricsheep-smile.png", false); +#endif + fp4 aspect = g_Player().Display()->Aspect(); + m_LogoSize.m_X0 = 0.f; + m_LogoSize.m_X1 = 0.2f * aspect; + m_LogoSize.m_Y0 = 0.f; + m_LogoSize.m_Y1 = 0.2f; + + m_spVideoTexture = NULL; + m_MoveMessageCounter = 0.; + } + + virtual ~CStartupScreen() + { + m_spVideoTexture = NULL; + } + + bool Render( const fp8 _time, DisplayOutput::spCRenderer _spRenderer ) + { + CHudEntry::Render( _time, _spRenderer ); + + if (m_bServerMessageStartTimer == false) + { + m_bServerMessageStartTimer = true; + m_ServerMessageStartTimer = boost::posix_time::second_clock::local_time(); + } + + // draw picture + + DisplayOutput::spCImage tmpImage = new DisplayOutput::CImage(); + if( m_spImageRef.IsNull() == false ) + { + m_spVideoTexture = _spRenderer->NewTextureFlat(); + m_spVideoTexture->Upload( m_spImageRef ); + } + + if ( m_spVideoTexture.IsNull() ) + return false; + + _spRenderer->Reset( DisplayOutput::eTexture | DisplayOutput::eShader); + _spRenderer->SetBlend( "alphablend" ); + _spRenderer->SetTexture( m_spVideoTexture, 0 ); + _spRenderer->Apply(); + + Base::Math::CRect rr; + rr.m_X0 = 0.5f - (m_LogoSize.Width()); + rr.m_Y0 = 0.5f - (m_LogoSize.Height()) + m_MoveMessageCounter; + rr.m_X1 = 0.5f + (m_LogoSize.Width()); + rr.m_Y1 = 0.5f + (m_LogoSize.Height()) + m_MoveMessageCounter; + + _spRenderer->DrawQuad( rr, Base::Math::CVector4( 1,1,1,1 ), m_spVideoTexture->GetRect() ); + + // draw text + + //fp4 step = (fp4)m_Desc.Height() / (fp4)_spRenderer->Display()->Height(); + fp4 edge = 24 / (fp4)_spRenderer->Display()->Width(); + + Base::Math::CRect extent; + Base::Math::CVector2 size = g_Player().Renderer()->GetTextExtent( m_spFont, m_StartupMessage ); + extent = extent.Union( Base::Math::CRect( 0, 0, size.m_X+(edge*2), size.m_Y+(edge*2) ) ); + + boost::posix_time::time_duration td = boost::posix_time::second_clock::local_time() - m_ServerMessageStartTimer; + if (td.hours() >= 1) + { + m_MoveMessageCounter += 0.0005f; + if (m_MoveMessageCounter >= 1.f) + m_MoveMessageCounter -= 1.f + edge*2 + fp4(size.m_Y); + } + + // Draw quad. + _spRenderer->Reset( DisplayOutput::eTexture | DisplayOutput::eShader | DisplayOutput::eBlend ); + + Base::Math::CRect r( 0.5f - (extent.Width()*0.5f), extent.m_Y0 + m_MoveMessageCounter, + 0.5f + (extent.Width()*0.5f), extent.m_Y1 + m_MoveMessageCounter); + + _spRenderer->SetBlend( "alphablend" ); + _spRenderer->Apply(); + _spRenderer->DrawSoftQuad( r, Base::Math::CVector4( 0, 0, 0, 0.5f ), 16 ); + + //dasvo - terrible hack - redo!! + if (!m_spFont.IsNull()) + m_spFont->Reupload(); + + _spRenderer->Text( m_spFont, m_StartupMessage, Base::Math::CVector4( 1, 1, 1, 1 ), Base::Math::CRect( r.m_X0+edge, r.m_Y0+edge, r.m_X1, r.m_Y1 ), 0 ); + + return true; + } +}; + +MakeSmartPointers( CStartupScreen ); + +}; +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Client/StatsConsole.h electricsheep-3.0.2-git20180325/Client/StatsConsole.h --- electricsheep-2.7~b12+svn20091224/Client/StatsConsole.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/StatsConsole.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,342 @@ +#ifndef _STATSCONSOLE_H_ +#define _STATSCONSOLE_H_ + +#include +#include "Hud.h" +#include "Rect.h" +#include "Console.h" +#include + +namespace Hud +{ + +/* +*/ +class CStat +{ + bool m_bVisible; + + public: + CStat( const std::string _name ) : m_bVisible(true), m_Name( _name ) {}; + virtual ~CStat() {}; + + std::string m_Name; + + virtual const std::string Report( const fp8 _time ) = PureVirtual; + + void Visible( const bool _bState ) { m_bVisible = _bState; }; + bool Visible( void ) const { return m_bVisible; }; +}; + +//MakeSmartPointers( CStat ); + +/* +*/ +class CStringStat : public CStat +{ + protected: + + std::string m_PreString, m_Value; + + public: + CStringStat( const std::string _name, const std::string _pre, const std::string _init ) : CStat( _name ), m_PreString(_pre), m_Value( _init ) {}; + virtual ~CStringStat() {}; + + virtual const std::string Report( const fp8 /*_time*/ ) + { + std::stringstream s; + s << m_PreString << m_Value; + + std::string res = s.str(); + return res; + } + + void SetSample( const std::string _val ) { m_Value = _val; }; +}; + +//MakeSmartPointers( CStringStat ); + + + +/* +*/ +class CIntCounter : public CStat +{ + protected: + + std::string m_PreString, m_PostString; + fp8 m_Value; + + public: + CIntCounter( const std::string _name, const std::string _pre, const std::string _post ) : CStat( _name ), m_PreString(_pre), m_PostString(_post), m_Value(0) {}; + virtual ~CIntCounter() {}; + + virtual const std::string Report( const fp8 /*_time*/ ) + { + std::stringstream s; + s << m_PreString << uint32(m_Value) << m_PostString ; + return s.str(); + } + + void SetSample( const int32 &_val ) { m_Value = _val; }; + void AddSample( const int32 &_val ) { m_Value += _val; }; +}; + +//MakeSmartPointers( CIntCounter ); + + +/* +*/ +class CAverageCounter : public CIntCounter +{ + fp8 m_Rate; + fp8 m_Time; + std::string m_Average; + + public: + CAverageCounter( const std::string _name, const std::string _pre, const std::string _post, const fp8 _rateInSeconds ) : CIntCounter( _name, _pre, _post ) + { + m_Rate = _rateInSeconds; + m_Time = 0.0; + m_Average = m_PreString; + m_Average += "?"; + m_Average += m_PostString; + + }; + virtual ~CAverageCounter() {}; + + virtual const std::string Report( const fp8 _time ) + { + if ( m_Time < 0.0005 ) + { + m_Time = _time; + m_Value = 0; + + return m_Average; + } + + if( _time - m_Time > m_Rate ) + { + m_Value /= _time - m_Time / m_Rate; + m_Value += 1.0; + + m_Average = CIntCounter::Report( _time ); + m_Value = 0; + m_Time = _time; + } + + return m_Average; + } +}; + +//MakeSmartPointers( CAverageCounter ); + +/* +*/ +class CTimeCountDownStat : public CStat +{ + protected: + + std::string m_PreString, m_PreValue, m_PostValue; + fp8 m_EndTime; + + bool m_ShowMinutes; + + Base::CTimer m_Timer; + + public: + CTimeCountDownStat( const std::string _name, const std::string _pre, const std::string _init ) : CStat( _name ), m_PreString(_pre) + { + m_Timer.Reset(); + + m_ShowMinutes = true; + + SetSample(_init); + }; + + virtual ~CTimeCountDownStat() {}; + + virtual const std::string Report( const fp8 /*_time*/ ) + { + std::stringstream s; + s << m_PreString << m_PreValue; + + if ( m_EndTime > 0.001 ) + { + fp8 delaysec = ceil(m_EndTime - m_Timer.Time()); + + if ( delaysec < 0.0 ) + delaysec = 0.0; + + s << std::fixed << std::setprecision(0); + + if ( m_ShowMinutes && delaysec > 59.0 ) + { + fp8 delaymin = ceil(delaysec / 60.0); + + s << delaymin << ( ( delaymin == 1.0 ) ? " minute" : " minutes" ); + } + else + { + s << delaysec << ( ( delaysec == 1.0 ) ? " second" : " seconds" ); + } + } + + s << m_PostValue; + + std::string res = s.str(); + return res; + } + + void SetSample( const std::string& _val ) + { + m_EndTime = 0.0; + + m_ShowMinutes = true; + + size_t len = _val.size(); + + size_t start = 0, end = len; + + bool found = false; + + for ( size_t i = 0; i < len; i++ ) + { + char ch = _val[i]; + + if ( ch == '{' ) + { + start = i; + found = true; + } + + if ( ch == '}' ) + end = i + 1; + } + + if ( found ) + { + int secs = 0; + + sscanf(_val.substr( start, end - start ).c_str(), "{%d}", &secs); + + if (secs < 120 ) + { + m_ShowMinutes = false; + } + + m_EndTime = m_Timer.Time() + secs; + + m_PreValue = _val.substr( 0, start ); + m_PostValue = _val.substr( end, len - end ); + } + else + { + m_PreValue = _val; + m_PostValue.clear(); + } + + }; +}; + +//MakeSmartPointers( CTimeCountDownStat ); + + + +/* + CStatsConsole. + +*/ +class CStatsConsole : public CConsole +{ + std::map m_Stats; + DisplayOutput::CFontDescription m_Desc; + + public: + CStatsConsole( Base::Math::CRect _rect, const std::string &_FontName, const uint32 _fontHeight ) : CConsole( _rect ) + { + DisplayOutput::CFontDescription fontDesc; + + m_Desc.AntiAliased( true ); + m_Desc.Height( _fontHeight ); + m_Desc.Style( DisplayOutput::CFontDescription::Normal ); + m_Desc.Italic( false ); + m_Desc.TypeFace( _FontName ); + + m_spFont = g_Player().Renderer()->NewFont( m_Desc ); + + m_Stats.clear(); + } + + virtual ~CStatsConsole() + { + std::map::iterator ii = m_Stats.begin(); + while (m_Stats.end() != ii) + { + delete ii->second; + ++ii; + } + m_Stats.clear(); + } + + void Add( CStat *_pStat ) { m_Stats[ _pStat->m_Name ] = _pStat; } + CStat *Get( const std::string &_name ) { return m_Stats[ _name ]; } + + bool Render( const fp8 _time, DisplayOutput::spCRenderer _spRenderer ) + { + CHudEntry::Render( _time, _spRenderer ); + + fp4 step = (fp4)m_Desc.Height() / (fp4)_spRenderer->Display()->Height(); + fp4 pos = 0; + fp4 edge = 24 / (fp4)_spRenderer->Display()->Width(); + + std::map::const_iterator i; + + // Figure out text extent for all strings. + Base::Math::CRect extent; + std::queue sizeq; + for( i=m_Stats.begin(); i != m_Stats.end(); ++i ) + { + CStat *e = i->second; + if( e && e->Visible() ) + { + sizeq.push(_spRenderer->GetTextExtent( m_spFont, e->Report( _time ) )); + extent = extent.Union( Base::Math::CRect( 0, pos, sizeq.back().m_X+(edge*2), sizeq.back().m_Y+(pos)+(edge*2) ) ); + pos += sizeq.back().m_Y; + } + } + + // align soft quad at bottom + extent.m_Y0 = 1.f - extent.m_Y1; + extent.m_Y1 = 1.f; + + // Draw quad. + _spRenderer->Reset( DisplayOutput::eTexture | DisplayOutput::eShader | DisplayOutput::eBlend ); + _spRenderer->SetBlend( "alphablend" ); + _spRenderer->Apply(); + _spRenderer->DrawSoftQuad( extent, Base::Math::CVector4( 0, 0, 0, 0.375f ), 16 ); + + // align text at bottom + pos = extent.m_Y0 + edge; + for( i=m_Stats.begin(); i != m_Stats.end(); ++i ) + { + CStat *e = i->second; + if( e && e->Visible() ) + { + Base::Math::CVector2 size = sizeq.front(); + sizeq.pop(); + _spRenderer->Text( m_spFont, e->Report( _time ), Base::Math::CVector4( 1, 1, 1, 1 ), Base::Math::CRect( edge, pos, 1, size.m_Y+pos+step ), 0 ); + pos += size.m_Y; + } + } + + return true; + } +}; + +MakeSmartPointers( CStatsConsole ); + +}; + +#endif + diff -Nru electricsheep-2.7~b12+svn20091224/Client/Voting.cpp electricsheep-3.0.2-git20180325/Client/Voting.cpp --- electricsheep-2.7~b12+svn20091224/Client/Voting.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/Voting.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,150 @@ +#include +#include +#include + +#include +#include + +#include +#include + +#include "ContentDownloader.h" +#include "Shepherd.h" +#include "Networking.h" +#include "Voting.h" +#include "Log.h" +#include "Settings.h" +#include "Player.h" +#if defined(WIN32) && defined(_MSC_VER) +#include "../msvc/msvc_fix.h" +#endif +/* +*/ +CVote::CVote() +{ + m_Clock = 0; + m_Timer.Reset(); + m_pThread = NULL; + m_Votings.clear( 0 ); +}; + +/* +*/ +CVote::~CVote() +{ + if( m_pThread != NULL ) + { + m_pThread->interrupt(); + try + { + m_pThread->timed_join(boost::posix_time::seconds(3)); + } + catch (boost::thread_interrupted const &) + {} + SAFE_DELETE( m_pThread ); + } +}; + +/* +*/ +void CVote::ThreadFunc() +{ + try + { + VotingInfo vi; + + const char *pServerName = ContentDownloader::Shepherd::serverName( true, ContentDownloader::eVoteServer ); + + if ( pServerName == NULL ) + return; + + const char *pUniqueID = ContentDownloader::Shepherd::uniqueID(); + + if ( pUniqueID == NULL ) + return; + + std::string serverName = pServerName; + std::string uniqueID = pUniqueID; + + while( m_Votings.pop( vi, true ) ) + { + static const char* votedesc[] = { "Negative", "Positive" }; + + g_Log->Info( "%s vote for sheep %d", votedesc[ vi.vtype ], vi.vid ); + + Network::CCurlTransfer *spRequest = new Network::CCurlTransfer( std::string( votedesc[ vi.vtype ] ) + " vote" ); + + char url[ MAX_PATH ]; + + int voteDir = -1; + if( vi.vtype == 1 ) + voteDir = 1; + + snprintf( url, MAX_PATH, "%scgi/vote.cgi?id=%d&vote=%d&u=%s", serverName.c_str(), vi.vid, voteDir, uniqueID.c_str() ); + + // Server responds (correctly) with a "302 Moved", so we need to allow that. + spRequest->Allow( 302 ); + + //If we were interrupted before this point, we don't need to start the unnecessary transfer. + boost::this_thread::interruption_point(); + + // Send it... + if( !spRequest->Perform( url ) ) + { + g_Log->Error( "Failed to vote (%s).\n", url ); + + if( spRequest->ResponseCode() == 401 ) + g_ContentDownloader().ServerFallback(); + } + + boost::this_thread::interruption_point(); + + SAFE_DELETE( spRequest ); + g_Log->Info( "done voting..." ); + } + } + catch (boost::thread_interrupted const &) + { + } +} + +/* + Vote(). + Spawn a thread which sends a vote to the sheep server. +*/ +bool CVote::Vote( const uint32 _id, const uint8 _type, const fp4 _duration ) +{ + const fp8 time = m_Timer.Time(); + + // Check frequency. + if( time - m_Clock > _duration ) + { + if( _type == 0 && g_Settings()->Get( "settings.content.negvotedeletes", true ) ) + { + // Queue this sheep to be deleted. + g_Player().Delete( _id ); + } + + m_Clock = time; + } + else + { + g_Log->Warning( "Voting is not allowed this frequently, be patient..." ); + return false; + } + + VotingInfo vi; + + vi.vid = _id; + vi.vtype = _type; + + m_Votings.push(vi); + + if (m_pThread == NULL) + { + // Spawn the thread. + m_pThread = new boost::thread( boost::bind( &CVote::ThreadFunc, this ) ); + } + + return true; +} diff -Nru electricsheep-2.7~b12+svn20091224/Client/Voting.h electricsheep-3.0.2-git20180325/Client/Voting.h --- electricsheep-2.7~b12+svn20091224/Client/Voting.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Client/Voting.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,41 @@ +#ifndef _VOTING_H_ +#define _VOTING_H_ + +#include "base.h" +#include "Timer.h" +#include "BlockingQueue.h" + +/* + CVote. + Small class to handle voting of sheep. +*/ +class CVote +{ + typedef struct + { + uint32 vid; + uint8 vtype; + } VotingInfo; + + boost::thread *m_pThread; + Base::CTimer m_Timer; + + Base::CBlockingQueue m_Votings; + + void ThreadFunc(); + + fp8 m_Clock; + + public: + CVote(); + virtual ~CVote(); + + bool Vote( const uint32 _id, const uint8 _type, const fp4 _duration ); +}; + + + + +#endif + + diff -Nru electricsheep-2.7~b12+svn20091224/Common/AlignedBuffer.cpp electricsheep-3.0.2-git20180325/Common/AlignedBuffer.cpp --- electricsheep-2.7~b12+svn20091224/Common/AlignedBuffer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/AlignedBuffer.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,247 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include + +#include "AlignedBuffer.h" + +namespace Base +{ + +uint32 CReusableAlignedBuffers::s_PageSize = 0; + +/* + CReusableBuffers(). + +*/ +CReusableAlignedBuffers::CReusableAlignedBuffers() +{ + for ( uint32 i = 0; i < sizeof(m_BufferCache)/sizeof(*m_BufferCache); i++ ) + { + m_BufferCache[i].seed = 0; + m_BufferCache[i].size = 0; + m_BufferCache[i].ptr = NULL; + } + + m_Seed = 0; +} + +/* + ~CReusableAlignedBuffers(). + +*/ +CReusableAlignedBuffers::~CReusableAlignedBuffers() +{ + for ( uint32 i = 0; i < sizeof(m_BufferCache)/sizeof(*m_BufferCache); i++ ) + { + RealFree( m_BufferCache[i].ptr, m_BufferCache[i].size ); + + m_BufferCache[i].seed = 0; + m_BufferCache[i].size = 0; + m_BufferCache[i].ptr = NULL; + } + + SingletonActive( false ); +} + +/* + Allocate(). + +*/ +uint8 *CReusableAlignedBuffers::Allocate( uint32 size ) +{ + { + boost::mutex::scoped_lock locker( m_CacheLock ); + + for ( uint32 i = 0; i < sizeof(m_BufferCache)/sizeof(*m_BufferCache); i++ ) + { + BufferElement *elptr = m_BufferCache + i; + + if ( elptr->ptr != NULL && elptr->size == size ) + { + uint8* retval = elptr->ptr; + + elptr->ptr = NULL; + + return retval; + } + + } + } + +#ifdef WIN32 + //no valloc so malloc for now on WIN32. Needs to be implemented properly + return (uint8 *)malloc( size + GetPageSize() - 1 ); +#else + return (uint8 *)valloc( size ); + //m_Buffer = (uint8 *)mmap( NULL, size, PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0 ); +#endif +} + +void CReusableAlignedBuffers::Free( uint8 *buffer, uint32 size ) +{ + if ( buffer == NULL ) + return; + + boost::mutex::scoped_lock locker( m_CacheLock ); + + uint32 minseed = 0xFFFFFFFF; + uint32 mini = 0; + + for ( uint32 i = 0; i < sizeof(m_BufferCache)/sizeof(*m_BufferCache); i++ ) + { + if ( m_BufferCache[i].ptr == NULL ) + { + mini = i; + break; + } + + //find the entry with the minimal seed, i.e. inserted the earliest + if (minseed > m_BufferCache[i].seed) + { + mini = i; + minseed = m_BufferCache[i].seed; + } + } + + //did not find - really allocate and set to mini + + BufferElement *elptr = m_BufferCache + mini; + + RealFree( elptr->ptr, elptr->size ); + + elptr->ptr = buffer; + + elptr->size = size; + + elptr->seed = m_Seed++; +} + +uint8* CReusableAlignedBuffers::Reallocate( uint8 *buffer, uint32 size ) +{ + return (uint8*)realloc( buffer, size + GetPageSize() - 1 ); +} + + +void CReusableAlignedBuffers::RealFree( uint8 *buffer, uint32 /*size*/ ) +{ + free( buffer ); +} + +/* + CAlignedBuffer(). + +*/ +CAlignedBuffer::CAlignedBuffer() : m_Buffer( NULL ) +{ +} + + +/* + CAlignedBuffer( size ). + +*/ +CAlignedBuffer::CAlignedBuffer( uint32 size ) : m_Buffer( NULL ) +{ + Allocate( size ); +} + + + +/* + ~CAlignedBuffer(). + +*/ +CAlignedBuffer::~CAlignedBuffer() +{ + Free(); +} + +/* + Allocate(). + +*/ +bool CAlignedBuffer::Allocate( uint32 size ) +{ + CReusableAlignedBuffers* rab = g_ReusableAlignedBuffers; + + if (rab == NULL) + return false; + + m_Buffer = rab->Allocate( size ); + + unsigned long mask = CReusableAlignedBuffers::GetPageSize() - 1; + + m_BufferAlignedStart = (uint8*)((unsigned long)(m_Buffer + mask) & ~mask); + + m_Size = size; + + return ( m_Buffer != NULL ); +} + +/* + Reallocate(). + +*/ +bool CAlignedBuffer::Reallocate( uint32 size ) +{ + CReusableAlignedBuffers* rab = g_ReusableAlignedBuffers; + + if (rab == NULL) + return false; + + m_Buffer = (uint8 *)rab->Reallocate( m_Buffer, size ); + + unsigned long mask = CReusableAlignedBuffers::GetPageSize() - 1; + + m_BufferAlignedStart = (uint8*)((unsigned long)(m_Buffer + mask) & ~mask); + + m_Size = size; + + return ( m_Buffer != NULL ); +} + + +/* + Free(). + +*/ +void CAlignedBuffer::Free( void ) +{ + CReusableAlignedBuffers* rab = g_ReusableAlignedBuffers; + + if ( rab != NULL ) + rab->Free( m_Buffer, m_Size ); + else + CReusableAlignedBuffers::RealFree( m_Buffer, m_Size ); +} + +/* + GetBufferPtr(). + +*/ +uint8 *CAlignedBuffer::GetBufferPtr( void ) const +{ + return m_BufferAlignedStart; +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/Common/AlignedBuffer.h electricsheep-3.0.2-git20180325/Common/AlignedBuffer.h --- electricsheep-2.7~b12+svn20091224/Common/AlignedBuffer.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/AlignedBuffer.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,140 @@ +/* + * AlignedBuffer.h + * + * Implements page aligned buffer + * + * Created by dasvo on 2/24/09. + * + */ + +#ifndef _ALIGNEDBUFFER_H_ +#define _ALIGNEDBUFFER_H_ + +#include +#ifndef WIN32 +#include +#endif +#include "base.h" +#include "SmartPtr.h" +#include "Singleton.h" +#include + +#ifdef LINUX_GNU +#include +#endif + +#define BUFFER_CACHE_SIZE 20 + +namespace Base +{ + +MakeSmartPointers( CReusableAlignedBuffers ); + +//idea proposed by F-D. Cami +class CReusableAlignedBuffers : public CSingleton +{ + typedef struct + { + uint32 seed; + + uint32 size; + + uint8 *ptr; + } BufferElement; + + BufferElement m_BufferCache[ BUFFER_CACHE_SIZE ]; + + uint32 m_Seed; + + static uint32 s_PageSize; + + boost::mutex m_CacheLock; + + public: + CReusableAlignedBuffers(); + + ~CReusableAlignedBuffers(); + + uint8* Allocate( uint32 size ); + + void Free( uint8 *ptr, uint32 size ); + + static void RealFree( uint8* ptr, uint32 size ); + + uint8* Reallocate ( uint8* ptr, uint32 size ); + + static inline uint32 GetPageSize( void ) + { + if ( s_PageSize == 0 ) + { + #if defined(WIN32) && WIN32 + SYSTEM_INFO system_info; + GetSystemInfo (&system_info); + s_PageSize = (uint32)system_info.dwPageSize; + #else + s_PageSize = static_cast(getpagesize()); + #endif + } + + return s_PageSize; + } + + bool Shutdown( void ) { return true; } + + const char *Description() { return "CReusableAlignedBuffers"; } + + // Provides singleton access. + static CReusableAlignedBuffers *Instance( const char* /*_pFileStr*/, const uint32 /*_line*/, const char* /*_pFunc*/ ) + { + static CReusableAlignedBuffers rab; + + if( rab.SingletonActive() == false ) + { + printf( "Trying to access shutdown singleton %s\n", rab.Description() ); + return NULL; + } + + return( &rab ); + } +}; + +#define g_ReusableAlignedBuffers Base::CReusableAlignedBuffers::Instance( __FILE__, __LINE__, __FUNCTION__ ) + +/* + CAlignedBuffer. + +*/ +MakeSmartPointers( CAlignedBuffer ); + +class CAlignedBuffer +{ + uint8 *m_Buffer; + + uint8 *m_BufferAlignedStart; + + uint32 m_Size; + + public: + CAlignedBuffer(); + + CAlignedBuffer( uint32 size ); + + ~CAlignedBuffer(); + + bool Allocate(uint32 size); + + bool Reallocate(uint32 size); + + void Free( void ); + + uint8 * GetBufferPtr( void ) const; + + bool IsValid() const { return ( m_Buffer != NULL ); } + + uint32 Size( void ) { return m_Size; } +}; + +}; + +#endif + diff -Nru electricsheep-2.7~b12+svn20091224/Common/base.h electricsheep-3.0.2-git20180325/Common/base.h --- electricsheep-2.7~b12+svn20091224/Common/base.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/base.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,82 @@ +/* + BASE.H + Author: Keffo. + + Self-explanatory. Should be included first of all. +*/ +#ifndef _BASE_H_ +#define _BASE_H_ + +#ifdef LINUX_GNU +#include +#endif + +// Standard signed types. +typedef signed char int8; +typedef signed short int16; +typedef signed int int32; + +// Standard unsigned types. +typedef unsigned char uint8; +typedef unsigned short uint16; +typedef unsigned int uint32; + +// 64bit standard types. +#ifdef _MSC_VER +typedef __int64 int64; +typedef unsigned __int64 uint64; +#else +typedef int64_t int64; +typedef uint64_t uint64; +#endif +// Single & double precision floating points. +typedef float fp4; +typedef double fp8; + +// Lazy. +#define isBit( v, b ) ((v)&(b)) +#define setBit( v, b ) ((v)|=(b)) +#define remBit( v, b ) ((v)&=~(b)) + +/* + Helper macros to make some stuff easier. + +*/ +#define SAFE_DELETE(p) { if( p ) { delete (p); (p)=NULL; } } +#define SAFE_DELETE_ARRAY(p) { if( p ) { delete[] (p); (p)=NULL; } } +#define SAFE_RELEASE(p) { if( p ) { (p)->Release(); (p)=NULL; } } + +// Duh. +#define NO_DEFAULT_CTOR(_x) _x() + +// Disallows the compiler defined copy constructor. +#define NO_COPY_CTOR(_x) _x( const _x& ) + +// Disallows the compiler defined assignment operator. +#define NO_ASSIGNMENT(_x) void operator = ( const _x& ) + +// Lazy. +#define NO_CLASS_STANDARDS(_x) \ + NO_ASSIGNMENT(_x); \ + NO_COPY_CTOR(_x) + + +// +#define PureVirtual 0 + +#ifndef NULL +#define NULL 0 +#endif + +/* + Assert disco. + +*/ +#ifdef DEBUG + #include + #define ASSERT assert +#else +#define ASSERT(b) +#endif + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/BlockingQueue.h electricsheep-3.0.2-git20180325/Common/BlockingQueue.h --- electricsheep-2.7~b12+svn20091224/Common/BlockingQueue.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/BlockingQueue.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,200 @@ +#ifndef __BLOCKING_QUEUE__ +#define __BLOCKING_QUEUE__ + +#include "boost/thread/thread.hpp" +#include "boost/thread/condition.hpp" +#include + +namespace Base +{ + +template class CBlockingQueue +{ +public: + typedef boost::shared_lock reader_lock; + typedef boost::unique_lock writer_lock; + typedef boost::upgrade_lock upg_reader_lock; + typedef boost::upgrade_to_unique_lock< boost::shared_mutex > upgrade_to_writer; + + + //typedef boost::mutex::scoped_lock scoped_lock; + + CBlockingQueue() { m_maxQueueElements = 0xFFFFFFFF; } + + bool push( const T& el, bool pushBack = true, bool checkMax = true ) + { + writer_lock lock( m_mutex ); + + if ( checkMax && m_queue.size() == m_maxQueueElements ) + { + while ( m_queue.size() == m_maxQueueElements ) + m_fullCond.wait(lock); + } + + if ( pushBack ) + m_queue.push_back( el ); + else + m_queue.push_front( el ); + + m_emptyCond.notify_all(); + return true; + } + + bool peek( T& el, bool wait = false, bool popFront = true ) + { + upg_reader_lock lock(m_mutex); + + if ( wait ) + { + while (m_queue.empty()) + { + upgrade_to_writer wlock(lock); + m_emptyCond.wait(m_mutex); + } + } + else + { + if ( m_queue.empty() ) + return false; + } + + if ( popFront ) + { + el = m_queue.front(); + //m_queue.pop_front(); + } + else + { + el = m_queue.back(); + //m_queue.pop_back(); + } + + if ( m_queue.size() < m_maxQueueElements ) + m_fullCond.notify_all(); + + if (m_queue.empty()) + m_nonEmptyCond.notify_all(); + + return true; + } + + void peekn( T& el, size_t n ) + { + reader_lock lock(m_mutex); + + el = m_queue[n]; + } + + bool pop( T& el, bool wait = false, bool popFront = true ) + { + upg_reader_lock lock(m_mutex); + + if ( wait ) + { + while (m_queue.empty()) + { + upgrade_to_writer wlock(lock); + m_emptyCond.wait(m_mutex); + } + } + else + { + if (m_queue.empty()) + { + m_nonEmptyCond.notify_all(); + return false; + } + } + + upgrade_to_writer wlock(lock); + + if ( popFront ) + { + el = m_queue.front(); + m_queue.pop_front(); + } + else + { + el = m_queue.back(); + m_queue.pop_back(); + } + + if ( m_queue.size() < m_maxQueueElements ) + m_fullCond.notify_all(); + + if (m_queue.empty()) + m_nonEmptyCond.notify_all(); + + return true; + } + + bool empty() + { + reader_lock lock( m_mutex ); + return m_queue.empty(); + } + + size_t size() + { + reader_lock lock( m_mutex ); + return m_queue.size(); + } + + void clear( size_t leave ) + { + writer_lock lock( m_mutex ); + + if ( leave == 0 ) + { + m_queue.clear(); + m_nonEmptyCond.notify_all(); + } + else + { + size_t sz = m_queue.size(); + + while ( sz > leave ) + { + m_queue.pop_back(); + + sz--; + } + } + + if ( leave < m_maxQueueElements ) + m_fullCond.notify_all(); + } + + void setMaxQueueElements( size_t max ) + { + writer_lock lock( m_mutex ); + + m_maxQueueElements = max; + } + + bool waitForEmpty() + { + upg_reader_lock lock( m_mutex ); + + if (m_queue.empty()) + return true; + + upgrade_to_writer wlock(lock); + + m_nonEmptyCond.wait( m_mutex ); + + return true; + } + +private: + boost::shared_mutex m_mutex; + boost::condition m_fullCond; + boost::condition m_emptyCond; + boost::condition m_nonEmptyCond; + size_t m_maxQueueElements; + std::deque m_queue; +}; + +}; + +#endif //__BLOCKING_QUEUE__ diff -Nru electricsheep-2.7~b12+svn20091224/Common/clientversion.h electricsheep-3.0.2-git20180325/Common/clientversion.h --- electricsheep-2.7~b12+svn20091224/Common/clientversion.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/clientversion.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,39 @@ +#ifndef CLIENTVERSION_H_INCLUDED +#define CLIENTVERSION_H_INCLUDED + +#ifdef WIN32 + #define CLIENT_VERSIONW L"WIN_3.0.1" + #define CLIENT_VERSION_PRETTYW L"Windows 3.0" + #define CLIENT_SETTINGSW L"ElectricSheep" + + #define CLIENT_VERSION "WIN_3.0.1" + #define CLIENT_VERSION_PRETTY "Windows 3.0.1" + #define CLIENT_SETTINGS "ElectricSheep" + + #define CLIENT_VERSION_PRETTYW2 L"version 3.0.1" +#else + #ifdef MAC + #define CLIENT_VERSION "OSX_3.0.2" + #define CLIENT_VERSION_PRETTY "macOS 3.0.2" + #define CLIENT_SETTINGS "ElectricSheep" + #else + #define CLIENT_VERSION "LNX_2.7b33" + #define CLIENT_VERSION_PRETTY "version 2.7b33" + #define CLIENT_SETTINGS "ElectricSheep" + #endif +#endif + +#ifdef WIN32 + #define CLIENT_SERVERW L"v2d7c.sheepserver.net" + #define REDIRECT_SERVERW L"community.sheepserver.net" +#endif + +#define CLIENT_SERVER "v2d7c.sheepserver.net" +//#define CLIENT_SERVER_REGISTERED "r2d7c.sheepserver.net" +#define REDIRECT_SERVER "community.sheepserver.net" +#define REDIRECT_SERVER_FULL "https://community.sheepserver.net" + +#define BETA_RELEASE + + +#endif // CLIENTVERSION_H_INCLUDED diff -Nru electricsheep-2.7~b12+svn20091224/Common/Common.cbp electricsheep-3.0.2-git20180325/Common/Common.cbp --- electricsheep-2.7~b12+svn20091224/Common/Common.cbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Common.cbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,136 @@ + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/Common/Common.cpp electricsheep-3.0.2-git20180325/Common/Common.cpp --- electricsheep-2.7~b12+svn20091224/Common/Common.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Common.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,73 @@ +#ifdef WIN32 +#include +#else +#include +#endif + +#include +#include +#include +#include +#include "Log.h" + +namespace Base +{ + +using namespace boost::filesystem; + +bool GetFileList( std::vector &_list, const std::string _dir, const std::string _extension, const bool _usegoldsheep, const bool _usefreesheep ) +{ + bool gotSheep = false; + try { + boost::filesystem::path p(_dir); + + directory_iterator end_itr; // default construction yields past-the-end + for ( directory_iterator itr( p ); + itr != end_itr; + ++itr ) + { + std::string dirname(itr->path().filename().string()); + if (is_directory(itr->status())) + { + gotSheep |= GetFileList( _list, (itr->path().string() + std::string("/")), _extension, _usegoldsheep, _usefreesheep ); + } + else + { + std::string fname(itr->path().filename().string()); + std::string ext(itr->path().extension().string()); + + if (ext == std::string(".avi")) + { + int generation; + int id; + int first; + int last; + + if( 4 == sscanf( fname.c_str(), "%d=%d=%d=%d.avi", &generation, &id, &first, &last ) ) + { + std::string xxxname(fname); + xxxname.replace(fname.size() - 3, 3, "xxx"); + + if ( !exists( p/xxxname ) ) // is it deleted? + { + if ( (_usegoldsheep && generation >= 10000) || (_usefreesheep && generation < 10000) ) + { + _list.push_back(itr->path().string().c_str()); + gotSheep = true; + } + } + } + } + } + } + + } + catch(boost::filesystem::filesystem_error& err) + { + g_Log->Error( "Path enumeration threw error: %s", err.what() ); + } + + return gotSheep; +} + +} diff -Nru electricsheep-2.7~b12+svn20091224/Common/Common.h electricsheep-3.0.2-git20180325/Common/Common.h --- electricsheep-2.7~b12+svn20091224/Common/Common.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Common.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,9 @@ +#ifndef _COMMON_H_ +#define _COMMON_H_ + +namespace Base +{ +bool GetFileList( std::vector &_list, const std::string _dir, const std::string _extension, const bool _usegoldsheep, const bool _usefreesheep ); +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Exception.cpp electricsheep-3.0.2-git20180325/Common/Exception.cpp --- electricsheep-2.7~b12+svn20091224/Common/Exception.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Exception.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,68 @@ +/* + CException. + Author: Stef. + + Exception handler. +*/ +#ifdef WIN32 +#include +#endif + +#include +#include +#include +#include + +#include "base.h" +#include "Exception.h" +#include "Log.h" + +namespace Base +{ + +std::string CException::m_ArgString; + +/* + ReportCatch(). + +*/ +void CException::ReportCatch( void ) const +{ +// printf( "%s\n", Text().c_str() ); + g_Log->Error( "EXCEPTION: %s", Text().c_str() ); +#ifdef WIN32 +#ifdef DEBUG + //MessageBox( NULL, Text().c_str(), "Exception", MB_OK | MB_ICONERROR ); +#endif +#endif +} + +/* + Text(). + +*/ +std::string CException::Text( void ) const +{ + std::ostringstream os; + os << "in " << m_File << "(" << m_Line << "): " << m_String; + return( std::string( os.str() ) ); +} + +/* + CollectArguments(). + +*/ +void CException::CollectArguments( const char *String, ... ) +{ + static char s_StringWork[8192]; + + va_list ArgPtr; + + va_start( ArgPtr, String ); + vsprintf( s_StringWork, String, ArgPtr ); + va_end( ArgPtr ); + + m_ArgString = s_StringWork; +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/Common/Exception.h electricsheep-3.0.2-git20180325/Common/Exception.h --- electricsheep-2.7~b12+svn20091224/Common/Exception.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Exception.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,99 @@ +/* + CException. + Author: Stef. + + Exception handler. + + example: + + try + { + uint32 value = something.Function(); + + if( value == 0 ) + ThrowStr( "Something returned 0!" ); + else + ThrowArgs( ="Something returned %d!", value ) ); + } + catch( CException &exception ) + { + SAFE_DELETE( pData ); + exception.ReportCatch(); + } +*/ +#ifndef __EXCEPTION_H_ +#define __EXCEPTION_H_ + +#include +#include "base.h" + +namespace Base +{ + +/* + CException(). + +*/ +class CException +{ + CException( const char *_sz, const char *_szFile, const uint32 _line ) + { + m_File = _szFile; + m_String = _sz; + m_Line = _line; + } + + CException( const std::string &_s, const char * const _szFile, const uint32 _line ) + { + m_File = _szFile; + m_String = _s; + m_Line = _line; + } + + std::string m_String; + std::string m_File; + uint32 m_Line; + + // for PrintfToStatic : + static std::string m_ArgString; + + public: + // + void ReportCatch( void ) const; + + std::string Text( void ) const; + + // + static void Throw( const char *_sz, const char *_szFile,const uint32 _line ) + { + throw( CException( _sz, _szFile, _line ) ); + } + + // + static void Throw( const std::string &_s, const char *_szFile, const uint32 _line ) + { + throw( CException( _s, _szFile, _line ) ); + } + + // + static void Throw( char *_szFile, const uint32 _line ) + { + throw( CException( m_ArgString, _szFile, _line ) ); + } + + // + static void CollectArguments( const char *_String, ... ); // Args. +}; + +}; + + +// Throw an exception with arguments. For example: ThrowArgs( ("Bad ass number %d", 42) ); DONT FORGET THE EXTRA ()! +#define ThrowArgs( varargs ) \ + Base::CException::CollectArguments varargs, \ + Base::CException::Throw( __FILE__, __LINE__ ) + +// Throw a simple CStr exception. +#define ThrowStr( str ) Base::CException::Throw( str, __FILE__, __LINE__ ) + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/isaac.cpp electricsheep-3.0.2-git20180325/Common/isaac.cpp --- electricsheep-2.7~b12+svn20091224/Common/isaac.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/isaac.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,110 @@ +/* +------------------------------------------------------------------------------ +isaac.c: By Bob Jenkins. My random number generator, ISAAC. +MODIFIED: + 960327: Creation (addition of randinit, really) + 970719: use context, not global variables, for internal state + 980324: make a portable version + 991209: modified for inclusion with GNU Backgammon by Gary Wong + 070121: modified for inclusion with flam3 by Erik Reckase +------------------------------------------------------------------------------ +*/ + +#include "isaacs.h" +#include "isaac.h" + +#define ind(mm,x) ((mm)[(x>>2)&(RANDSIZ-1)]) +#define rngstep(mix,a,b,mm,m,m2,r,x) \ +{ \ + x = *m; \ + a = ((a^(mix)) + *(m2++)) & 0xffffffff; \ + *(m++) = y = (ind(mm,x) + a + b) & 0xffffffff; \ + *(r++) = b = (ind(mm,y>>RANDSIZL) + x) & 0xffffffff; \ +} + +void isaac(randctx *ctx) +{ + register ub4 a,b,x,y,*m,*mm,*m2,*r,*mend; + mm=ctx->randmem; r=ctx->randrsl; + a = ctx->randa; b = (ctx->randb + (++ctx->randc)) & 0xffffffff; + for (m = mm, mend = m2 = m+(RANDSIZ/2); m>6 , a, b, mm, m, m2, r, x); + rngstep( a<<2 , a, b, mm, m, m2, r, x); + rngstep( a>>16, a, b, mm, m, m2, r, x); + } + for (m2 = mm; m2>6 , a, b, mm, m, m2, r, x); + rngstep( a<<2 , a, b, mm, m, m2, r, x); + rngstep( a>>16, a, b, mm, m, m2, r, x); + } + ctx->randb = b; ctx->randa = a; +} + + +#define mix(a,b,c,d,e,f,g,h) \ +{ \ + a^=b<<11; d+=a; b+=c; \ + b^=c>>2; e+=b; c+=d; \ + c^=d<<8; f+=c; d+=e; \ + d^=e>>16; g+=d; e+=f; \ + e^=f<<10; h+=e; f+=g; \ + f^=g>>4; a+=f; g+=h; \ + g^=h<<8; b+=g; h+=a; \ + h^=a>>9; c+=h; a+=b; \ +} + +/* if (flag==TRUE), then use the contents of randrsl[] to initialize mm[]. */ +void irandinit(randctx *ctx, word flag) +{ + word i; + ub4 a,b,c,d,e,f,g,h; + ub4 *m,*r; + ctx->randa = ctx->randb = ctx->randc = 0; + m=ctx->randmem; + r=ctx->randrsl; + a=b=c=d=e=f=g=h=0x9e3779b9; /* the golden ratio */ + + for (i=0; i<4; ++i) /* scramble it */ + { + mix(a,b,c,d,e,f,g,h); + } + + if (flag) + { + /* initialize using the contents of r[] as the seed */ + for (i=0; irandcnt=RANDSIZ; /* prepare to use the first set of results */ +} diff -Nru electricsheep-2.7~b12+svn20091224/Common/isaac.h electricsheep-3.0.2-git20180325/Common/isaac.h --- electricsheep-2.7~b12+svn20091224/Common/isaac.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/isaac.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,56 @@ +/* +------------------------------------------------------------------------------ +isaac.h: definitions for a random number generator +MODIFIED: + 960327: Creation (addition of randinit, really) + 970719: use context, not global variables, for internal state + 980324: renamed seed to flag + 980605: recommend RANDSIZL=4 for noncryptography. + 991209: modified for inclusion with GNU Backgammon by Gary Wong + 070121: modified for inclusion with flam3 by Erik Reckase +------------------------------------------------------------------------------ +*/ + +#include "isaacs.h" + +#ifndef _ISAAC_H_ +#define _ISAAC_H_ + +#define RANDSIZL (4) /* I recommend 8 for crypto, 4 for simulations */ +#define RANDSIZ (1<randcnt-- ? \ + (isaac(r), (r)->randcnt=RANDSIZ-1, (r)->randrsl[(r)->randcnt]) : \ + (r)->randrsl[(r)->randcnt]) + +#endif + + diff -Nru electricsheep-2.7~b12+svn20091224/Common/isaacs.h electricsheep-3.0.2-git20180325/Common/isaacs.h --- electricsheep-2.7~b12+svn20091224/Common/isaacs.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/isaacs.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,46 @@ +/* + +------------------------------------------------------------------------------ + +Standard definitions and types, Bob Jenkins + +Modified for inclusion with flam3 by Erik Reckase + +------------------------------------------------------------------------------ + +*/ + +#ifndef _ISAACS_H_ + +#define _ISAACS_H_ + +typedef unsigned int ub4; /* unsigned 4-byte quantities */ + +#define UB4MAXVAL 0xffffffff + +typedef signed int sb4; + +#define SB4MAXVAL 0x7fffffff + +typedef unsigned short int ub2; + +#define UB2MAXVAL 0xffff + +typedef signed short int sb2; + +#define SB2MAXVAL 0x7fff + +typedef unsigned char ub1; + +#define UB1MAXVAL 0xff + +typedef signed char sb1; /* signed 1-byte quantities */ + +#define SB1MAXVAL 0x7f + +typedef int word; /* fastest type available */ + + + +#endif + diff -Nru electricsheep-2.7~b12+svn20091224/Common/linkpool.h electricsheep-3.0.2-git20180325/Common/linkpool.h --- electricsheep-2.7~b12+svn20091224/Common/linkpool.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/linkpool.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,143 @@ +#ifndef __LINKPOOL_H_ +#define __LINKPOOL_H_ + +#include "Log.h" +#include "pool.h" + +/* + + Typical freelist type static pool template. + Uses unallocated memory to keep a list of nodes +*/ + +namespace Memory +{ + +// Unallocated memory in the linkpool will use this to point to fresh mem. +struct CChunk +{ + CChunk *m_pNext; +}; + +/* + CLinkPool. + When allocation fails, the pool will grow according to TGrow, and try the allocation a second time. (4 seems reasonable... ) +*/ +template class CLinkPool : public CPoolBase +{ + bool m_bSingletonActive; + + // No copy constructor or assignment operator. + CLinkPool( const CLinkPool & ); + void operator = ( const CLinkPool & ); + + // Private constructor & destructor. + CLinkPool() : m_bSingletonActive( true ) + { + if( _size < sizeof(CChunk) ) + g_Log->Info( "Pool<%d> created with %d bytes overhead!", sizeof(CChunk) - _size ); + else + g_Log->Info( "Pool<%d> created", _size ); + }; + + virtual ~CLinkPool() + { + m_bSingletonActive = false; + Purge(); + } + + // Minimum size per entry is sizeof( CChunk ). + static size_t Pad( size_t _wantedSize ) { return _wantedSize >= sizeof( CChunk ) ? _wantedSize: sizeof( CChunk ); } + + // Root pointer. + static CChunk *m_pMemoryPool; + + // + inline void Push( CChunk *_pNode ) + { + ASSERT( _pNode ); + _pNode->m_pNext = m_pMemoryPool; + m_pMemoryPool = _pNode; + } + + // + inline CChunk *Pop() + { + CChunk *pNode = m_pMemoryPool; + if( pNode ) + m_pMemoryPool = pNode->m_pNext; + + return pNode; + } + + unsigned int m_Count; + + public: + // Make sure there are _number of objects in the pool. + void Reserve( const unsigned int _number ) + { + g_Log->Info( "Reserving %d objects for pool of size %d...", _number, _size ); + + // Preallocate. + for( unsigned int i=0; i<_number; i++ ) + Push( reinterpret_cast( AllocSys( Pad( _size ) ) ) ); + + m_Count = 0; + } + + // + void *Allocate() + { + // Unlink a chunk from the pool. + void *pMem = Pop(); + if( pMem == NULL ) + { + // Try growing a bit. + Reserve( TGrow ); + + // ...and try again... + pMem = Pop(); + } + + return pMem; + } + + // Deallocate, ie give memory back to the pool. + void Deallocate( void *_pData ) + { + // Link chunk back mem into pool. + Push( reinterpret_cast(_pData) ); + } + + // Purge the pool, give back all it's memory. + virtual void Purge() + { + while( m_pMemoryPool ) + { + char *pData = (char *)Pop(); + if( pData ) + delete pData; + } + } + + // Used below to track access. + bool SingletonActive( void ) { return( m_bSingletonActive ); }; + + // Return instance. + static CLinkPool &Instance() + { + static CLinkPool instance; + + //if( instance.SingletonActive() == false ) + //printf( "Trying to access shutdown singleton Memory::CLinkPool<%d>\n", _size ); + + return( instance ); + } +}; + +// +template CChunk *CLinkPool<_size, TGrow>::m_pMemoryPool = NULL; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Log.cpp electricsheep-3.0.2-git20180325/Common/Log.cpp --- electricsheep-2.7~b12+svn20091224/Common/Log.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Log.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,258 @@ +#include +#include +#include +#include +#include + +#include "base.h" +#include "Log.h" + +// Lua. +extern "C" { +#include "lauxlib.h" +#include "lua.h" +#include "lualib.h" +}; + +namespace Base +{ + +/* + CLog(). + +*/ +CLog::CLog() : m_bActive( false ), m_pFile(NULL) +{ +} + + +/* + ~CLog(). + +*/ +CLog::~CLog() +{ + // Mark singleton as shutdown, to track unwanted access after this point. + SingletonActive( false ); +} + +/* + Startup(). + +*/ +bool CLog::Startup() +{ + //if( ( + //m_pStdout = freopen( "debug.txt", "a+", stdout ); + //) == NULL ) + //exit(-1); + m_pState = NULL; + m_pFile = NULL; + return( true ); +} + +/* + Shutdown(). + +*/ +bool CLog::Shutdown( void ) +{ + Info( "Logger shutting down..." ); + Info( "dummy" ); + Detach(); + + //if( m_pStdout ) + //fclose( m_pStdout ); + + return( true ); +} + +/* +*/ +void CLog::Attach( const std::string &_location, const uint32 /*_level*/ ) +{ + time_t curTime; + time( &curTime ); + + char timeStamp[32] = { 0 }; + strftime( timeStamp, sizeof(timeStamp), "%Y_%m_%d", localtime( &curTime ) ); + + std::stringstream s; + s << _location << timeStamp << ".log"; + std::string f = s.str(); + if( (m_pFile = freopen( f.c_str(), "a+", stdout ) )== NULL ) + { +#ifdef WIN32 + MessageBoxA(NULL, "Unable to create log file, exiting. Please check file permissions for electricsheep folder.", "Log error", MB_OK); +#endif + exit( -1 ); + } + +/* + m_pState = new Base::Script::CLuaState(); + m_pState->Init( "" ); + + // Load embedded scripts. + if( luaL_loadbuffer( m_pState->GetState(),(const char*)luaLogging, sizeof(luaLogging), "logging.lua" ) == 0 ) + lua_pcall( m_pState->GetState(), 0, 0, 0 ); + + // + m_pState->Execute( "require 'os'" ); + m_pState->Execute( "require 'io'" ); + m_pState->Execute( "require 'table'" ); + m_pState->Execute( "require 'string'" ); + m_pState->Execute( "function createLogFile( _location ) logfile = logging.file( _location .. '%s.log', '%y-%m-%d' ) end" ); + m_pState->Execute( "function g_Log( _level, _file, _func, _line, _timestamp, _msg ) logfile:log( _level, _timestamp .. '->['.._level..']:'.._func .. '('..tostring(_line)..'): '.. tostring(_msg) ) end" ); + m_pState->Pop( Script::Call( m_pState->GetState(), "createLogFile", "s", _location.c_str() ) ); +*/ + m_bActive = true; + +} + +/* +*/ +void CLog::Detach( void ) +{ + m_bActive = false; + SAFE_DELETE( m_pState ); + + if( m_pFile ) + fclose( m_pFile ); +} + +/* + SetFile(). + Store file that did the logging. +*/ +void CLog::SetInfo( const char *_pFileStr, const uint32 _line, const char *_pFunc ) +{ + //boost::mutex::scoped_lock locker( m_Lock ); + + std::string tmp = _pFileStr; + size_t offs = tmp.find_last_of( "/\\", tmp.size() ); + + m_File = tmp.substr( offs+1, tmp.size() ); + m_Function = std::string( _pFunc ); + m_Line = _line; +} + +/* +*/ + +char CLog::s_MessageSpam[ m_MaxMessageLength ] = {0}; +char CLog::s_MessageType[ m_MaxMessageLength ] = {0}; +size_t CLog::s_MessageSpamCount = 0; + +void CLog::Log( const char *_pType, /*const char *_file, const uint32 _line, const char *_pFunc,*/ const char *_pStr ) +{ + //boost::mutex::scoped_lock locker( m_Lock ); + + if (m_pFile == NULL) + return; + + time_t curTime; + time( &curTime ); + + char timeStamp[32] = { 0 }; + strftime( timeStamp, sizeof(timeStamp), "%H:%M:%S", localtime( &curTime ) ); + + /* log spam start*/ + if (strcmp(_pStr, s_MessageSpam) == 0) + { + ++s_MessageSpamCount; + return; + } else + { + if (s_MessageSpamCount > 0) + { + if( m_bActive ) + { + fprintf( m_pFile, "[%s-%s]: '%s' x%lu\n", s_MessageType, timeStamp, s_MessageSpam, s_MessageSpamCount ); + fflush( m_pFile ); + } + else + { + fprintf( stdout, "[%s-%s]: '%s' x%lu\n", s_MessageType, timeStamp, s_MessageSpam, s_MessageSpamCount ); + fflush( stdout ); + } + } else + { + if( !m_bActive ) + { + // Not active/attached, dump to stdout. + //fprintf( stdout, "[%s]: %s - %s[%s(%d)]: '%s'\n", _pType, timeStamp, _file, _pFunc, m_Line, _pStr ); + fprintf( stdout, "[%s-%s]: '%s'\n", s_MessageType, timeStamp, s_MessageSpam ); + fflush( stdout ); + } + else + { + //fprintf( m_pFile, "[%s]: %s - %s[%s(%d)]: '%s'\n", _pType, timeStamp, _file, _pFunc, m_Line, _pStr ); + fprintf( m_pFile, "[%s-%s]: '%s'\n", s_MessageType, timeStamp, s_MessageSpam ); + fflush( m_pFile ); + } + } + + s_MessageSpamCount = 0; + memcpy(s_MessageSpam, _pStr, m_MaxMessageLength); + strcpy(s_MessageType, _pType); + return; + } + /* log spam end */ + + if( !m_bActive ) + { + // Not active/attached, dump to stdout. + //fprintf( stdout, "[%s]: %s - %s[%s(%d)]: '%s'\n", _pType, timeStamp, _file, _pFunc, m_Line, _pStr ); + fprintf( stdout, "[%s-%s]: '%s'\n", _pType, timeStamp, _pStr ); + fflush( stdout ); + } + else + { + //fprintf( m_pFile, "[%s]: %s - %s[%s(%d)]: '%s'\n", _pType, timeStamp, _file, _pFunc, m_Line, _pStr ); + fprintf( m_pFile, "[%s-%s]: '%s'\n", _pType, timeStamp, _pStr ); + fflush( m_pFile ); + + /*lua_State *pState = m_pState->GetState(); + + uint32 stackSizeIn = lua_gettop( pState ); + lua_getglobal( pState, "g_Log" ); + + lua_pushstring( pState, _pType ); + lua_pushstring( pState, _file ); + lua_pushstring( pState, _pFunc ); + lua_pushinteger( pState, _line ); + lua_pushstring( pState, timeStamp ); + lua_pushstring( pState, _pStr ); + + luaL_checkstack( pState, 1, "Too many arguments" ); + + int status = lua_pcall( pState, 6, 0, 0 ); + if( status != 0 ) + { + if( !lua_isnil( pState, -1 ) ) + fprintf( stdout, "LUA ERROR: %s\n", lua_tostring( pState, -1 ) ); + + fprintf( stdout, "[%s]: %s - %s[%s(%d)]: '%s'\n", _pType, timeStamp, _file, _pFunc, m_Line, _pStr ); + fflush( stdout ); + + // Detach. + Detach(); + }*/ + } +} + +#define grabvarargs \ + va_list ArgPtr; \ + char pTempStr[ m_MaxMessageLength ]; \ + va_start( ArgPtr, _pFmt ); \ + vsnprintf( pTempStr, m_MaxMessageLength, _pFmt, ArgPtr ); \ + va_end( ArgPtr ); + +// Def our loggers. +void CLog::Debug( const char *_pFmt, ... ) { grabvarargs Log( "DEBUG", /*m_File.c_str(), m_Line, m_Function.c_str(),*/ pTempStr ); } +void CLog::Info( const char *_pFmt, ... ) { grabvarargs Log( "INFO", /*m_File.c_str(), m_Line, m_Function.c_str(),*/ pTempStr ); } +void CLog::Warning( const char *_pFmt, ... ) { grabvarargs Log( "WARN", /*m_File.c_str(), m_Line, m_Function.c_str(),*/ pTempStr ); } +void CLog::Error( const char *_pFmt, ... ) { grabvarargs Log( "ERROR", /*m_File.c_str(), m_Line, m_Function.c_str(),*/ pTempStr ); } +void CLog::Fatal( const char *_pFmt, ... ) { grabvarargs Log( "FATAL", /*m_File.c_str(), m_Line, m_Function.c_str(),*/ pTempStr ); } + +}; diff -Nru electricsheep-2.7~b12+svn20091224/Common/Log.h electricsheep-3.0.2-git20180325/Common/Log.h --- electricsheep-2.7~b12+svn20091224/Common/Log.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Log.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,97 @@ +/* + LOG.H + Author: Stef. + + Implements singleton logging class. +*/ +#ifndef _LOG_H_ +#define _LOG_H_ + +#include "boost/thread.hpp" +#include "base.h" +#include "SmartPtr.h" +#include "Singleton.h" +#include "LuaState.h" + +#ifdef LINUX_GNU +#include +#endif + +namespace Base +{ + +/* + CLog. + +*/ +MakeSmartPointers( CLog ); + +class CLog : public CSingleton +{ + friend class CSingleton; + + boost::mutex m_Lock; + + static const uint32 m_MaxMessageLength = 4096; + static char s_MessageSpam[ m_MaxMessageLength ]; + static char s_MessageType [ m_MaxMessageLength ]; + static size_t s_MessageSpamCount; + + // Private constructor accessible only to CSingleton. + CLog(); + + // No copy constructor or assignment operator. + NO_CLASS_STANDARDS( CLog ); + + bool m_bActive; + + // The luastate that will do all the actual work. + Base::Script::CLuaState *m_pState; + + FILE *m_pFile; + //FILE *m_pStdout; + + // Temporary storage vars. + std::string m_File; + std::string m_Function; + uint32 m_Line; + + void Log( const char *_pType, /*const char *_file, const uint32 _line, const char *_pFunc,*/ const char *_pStr ); + + public: + bool Startup(); + bool Shutdown( void ); + virtual ~CLog(); + + const char *Description() { return "Logger"; }; + + void Attach( const std::string &_location, const uint32 _level = 0 ); + void Detach( void ); + + void SetInfo( const char *_pFileStr, const uint32 _line, const char *_pFunc ); + + void Debug( const char *_pFmt, ... ); + void Info( const char *_pFmt, ... ); + void Warning( const char *_pFmt, ... ); + void Error( const char *_pFmt, ... ); + void Fatal( const char *_pFmt, ... ); + + // Provides singleton access. + static CLog *Instance( const char* /*_pFileStr*/, const uint32 /*_line*/, const char* /*_pFunc*/ ) + { + static CLog log; + + if( log.SingletonActive() == false ) + printf( "Trying to access shutdown singleton %s\n", log.Description() ); + + // Annoying, smartpointer lock&unlock the mutex, then return to someone who will do the same... + //log.SetInfo( _pFileStr, _line, _pFunc ); + return( &log ); + } +}; + +}; + +#define g_Log ::Base::CLog::Instance( __FILE__, __LINE__, __FUNCTION__ ) + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/LuaState.cpp electricsheep-3.0.2-git20180325/Common/LuaState.cpp --- electricsheep-2.7~b12+svn20091224/Common/LuaState.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/LuaState.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,507 @@ +/* + LUASTATE.CPP + Author: Stef. + +*/ +//#include +#include +#include +#include +#ifdef WIN32 +#include +#endif + +#include "Log.h" +#include "base.h" +#include "Exception.h" +#include "LuaState.h" + +// Lua. +extern "C" { +#include "lauxlib.h" +#include "lua.h" +#include "lualib.h" +}; + +#ifdef LINUX_GNU +#include +#define MAX_PATH PATH_MAX +#endif + +#ifndef MAX_PATH +#define MAX_PATH 4096 +#endif + +namespace Base { +namespace Script { + +/* + luaInstallation(). + +*/ +static const char *luaInstallation = " \ + function SetInstallation( _luaPath ) \ + print( 'SetInstallation: ' .. tostring(_luaPath) ) \ + require 'string' \ + LUA_PATH = _luaPath .. '/?.lua;' \ + LUA_PATH = LUA_PATH .. _luaPath .. '/?/?.lua;' \ + LUA_CPATH = _luaPath .. '/?.dll;' \ + LUA_CPATH = LUA_CPATH .. _luaPath .. '/?/?.dll;' \ + package.path = LUA_PATH \ + package.cpath = LUA_CPATH \ + end"; + +/* + addInstallation(). + +*/ +static const char *addInstallation = " \ + function AddInstallation( _package ) \ + print( 'AddInstallation: ' .. tostring(_package) ) \ + require 'string' \ + LUA_PATH = LUA_PATH .. _package .. '/?.lua;' \ + LUA_PATH = LUA_PATH .. _package .. '/?/?.lua;' \ + LUA_CPATH = LUA_CPATH .. _package .. '/?.dll;' \ + LUA_CPATH = LUA_CPATH .. _package .. '/?/?.dll;' \ + package.path = LUA_PATH \ + package.cpath = LUA_CPATH \ + end"; + +// +static int LuaAlert( ::lua_State *_pState ) +{ + ASSERT( _pState != NULL ); + const char *pMsg = lua_tostring( _pState, -1 ); + //ThrowStr( pMsg ); + g_Log->Error( "Lua Alert: %s", pMsg ); + return( 0 ); +} + + +/* + CLuaState(). + +*/ +CLuaState::CLuaState() +{ +} + +/* + ~CLuaState(). + +*/ +CLuaState::~CLuaState() +{ + if( m_pState ) + lua_close( m_pState ); +} + +// +void CLuaState::DumpStack() +{ + g_Log->Debug( "stack: %d\n", lua_gettop( m_pState ) ); +} + +/* + registerLib(). + Pre-register library, so it's up to the script to require libraries. +*/ +void CLuaState::registerLib( const char *_pName, lua_CFunction _func ) +{ + lua_getglobal( m_pState, "package" ); + lua_getfield( m_pState, -1, "preload" ); // 'package.preload' + lua_pushcfunction( m_pState, _func ); + lua_setfield( m_pState, -2, _pName ); // 'package.preload[ _pName ] = f' + lua_pop( m_pState, 2 ); // Pop package & preload tables. +} + +/* + AddPackagePath(). + +*/ +static int c_AddPackagePath( lua_State *_pState ) +{ + const char *packagePath = luaL_checkstring( _pState, 1 ); + + bool bRelative = true; + + if( lua_isboolean( _pState, 2 ) ) + if( lua_toboolean( _pState, 2 ) == 0 ) + bRelative = false; + + char dirBuf[ MAX_PATH + 1]; +#if defined(WIN32) && defined(_MSC_VER) + std::string dir; + if (GetCurrentDirectoryA(sizeof(dirBuf) - 1, dirBuf)) + dir = dirBuf; +#else + std::string dir = getcwd( &dirBuf[0], MAX_PATH + 1 ); +#endif + + if( bRelative ) + dir += packagePath; + else + dir = packagePath; + + Call( _pState, "AddInstallation", "s", (const char *)dir.c_str() ); + + return( 0 ); +} + +/* + Init(). + +*/ +void CLuaState::Init( const std::string &_basePath ) +{ + g_Log->Info( "Lua base bath: %s", _basePath.c_str() ); + + // Create state. + m_pState = luaL_newstate(); + + g_Log->Info( "stack: %d\n", lua_gettop( m_pState ) ); + + lua_gc( m_pState, LUA_GCSTOP, 0 ); + + lua_cpcall( m_pState, luaopen_base, NULL ); // Base library. + lua_cpcall( m_pState, luaopen_package, NULL ); // Package library. (we need this to be able to 'require' from lua) + +#ifdef LUA_JIT + lua_cpcall( m_pState, luaopen_jit, NULL ); +#endif + +#if defined(AMD64) || defined(__LP64__) + Execute( "_PLATFORM = 'x64'" ); +#else + Execute( "_PLATFORM = 'x86'" ); +#endif + + // The following will be pre-registered, and only loaded explicitly from the script. + registerLib( "io", luaopen_io ); + registerLib( "os", luaopen_os ); + registerLib( "table", luaopen_table ); + registerLib( "string", luaopen_string ); + registerLib( "math", luaopen_math ); + registerLib( "debug", luaopen_debug ); + + lua_register( m_pState, "_ALERT", &LuaAlert ); + + // + lua_pushcfunction( m_pState, c_AddPackagePath ); + lua_setglobal( m_pState, "c_AddPackagePath" ); + + // + std::string cmd = luaInstallation; + Execute( luaInstallation ); + + // + cmd = addInstallation; + Execute( addInstallation ); + + Call( m_pState, "SetInstallation", "s", (const char *)_basePath.c_str() ); + + // Start collector again. + lua_gc( m_pState, LUA_GCRESTART, 0 ); +} + +/* +*/ +static int traceback( lua_State *_pLuaState ) +{ + lua_getfield( _pLuaState, LUA_GLOBALSINDEX, "debug" ); + if (!lua_istable( _pLuaState, -1 ) ) + { + lua_pop( _pLuaState, 1 ); + return 1; + } + + lua_getfield( _pLuaState, -1, "traceback" ); + + if( !lua_isfunction( _pLuaState, -1 ) ) + { + lua_pop( _pLuaState, 2 ); + return 1; + } + + lua_pushvalue( _pLuaState, 1 ); // Pass error message. + lua_pushinteger( _pLuaState, 2 ); // Skip this function and traceback. + lua_call( _pLuaState, 2, 1 ); // Call debug.traceback. + + return 1; +} + +/* +*/ +static int docall( lua_State *_pLuaState, int narg, int clear ) +{ + int status; + int base = lua_gettop( _pLuaState ) - narg; // Function index. + + lua_pushcfunction( _pLuaState, traceback ); // Push traceback function. + lua_insert( _pLuaState, base ); // Put it under chunk and args. + + status = lua_pcall( _pLuaState, narg, (clear ? 0 : LUA_MULTRET ), base ); + + lua_remove( _pLuaState, base ); // Remove traceback function. + + // Force a complete garbage collection in case of errors */ + if( status != 0 ) + lua_gc( _pLuaState, LUA_GCCOLLECT, 0 ); + + return( status ); +} + + +/* + reportLua(). + +*/ +static bool reportLua( lua_State *_pLuaState, const int32 _status ) +{ + if( _status && !lua_isnil( _pLuaState, -1 ) ) + { + const char *pMsg = lua_tostring( _pLuaState, -1 ); + + if( !pMsg ) + pMsg = "(error object is not a string)"; + + g_Log->Error( "%s", pMsg ); + //ThrowArgs( ("CLuaState(): %s", pMsg) ); + + lua_pop( _pLuaState, 1 ); + + return false; + } + + return true; +} + +/* + Execute(). + Execute lua code. +*/ +bool CLuaState::Execute( const std::string &_command ) +{ + int status = luaL_loadstring( m_pState, _command.c_str() ); + if( status == 0 ) + status = docall( m_pState, 0, 1 ); + + return reportLua( m_pState, status ); +} + + +// +/*static void LuaCall( lua_State *L, int narg, int clear ) +{ + int status; + lua_checkstack( L, LUA_MINSTACK ); + int top = lua_gettop(L); + int base = top - narg; // function index + lua_pushliteral(L, "_TRACEBACK"); + lua_rawget(L, LUA_GLOBALSINDEX); // get traceback function + lua_insert(L, base); // put it under chunk and args + //status = lua_pcall(L, narg, (clear ? 0 : LUA_MULTRET), base); + status = lua_pcall(L, narg, clear, base ); + lua_remove(L, base); // remove traceback function + //status = LuaError(L, status, top - (narg + 1)); + reportLua( L, status ); + + lua_settop( L, top ); +}*/ + +/* + Run(). + +*/ +bool CLuaState::Run( const std::string &_script ) +{ + int status = luaL_loadfile( m_pState, _script.c_str() ); + if( status == 0 ) + status = lua_pcall( m_pState, 0, 0, 0 ); + + reportLua( m_pState, status ); + + if( status != 0 ) + return false; + + return( true ); +} + +/* + Pop(). + +*/ +void CLuaState::Pop( const int32 _num ) +{ + if( _num != 0 ) + lua_pop( m_pState, _num ); +} + +/* + Call(). + +*/ +int32 Call( lua_State *_pState, const char *_pFunc, const char *_pSig, ... ) +{ + ASSERT( _pState != NULL ); + + uint32 stackSizeIn = static_cast(lua_gettop( _pState )); + if( stackSizeIn != 0 ) + { + g_Log->Error( "Lua stack not empty..." ); + return 0; + } + + int delta = 0; + + va_list pArg; + + //try + { + // Number of arguments and results. + int narg, nres; + + // Get function. + lua_getglobal( _pState, _pFunc ); + + // Push arguments. + narg = 0; + + char *pBinarySource = NULL; + int32 binaryLen = 0; + + // Gimme args. + va_start( pArg, _pSig ); + + while( *_pSig ) + { + // Push arguments. + switch( *_pSig++ ) + { + case 'd': // Double argument. + lua_pushnumber( _pState, va_arg( pArg, fp8 ) ); + break; + + case 'i': // Int argument. + lua_pushinteger( _pState, va_arg( pArg, int32 ) ); + break; + + case 'b': // Bool argument. + lua_pushboolean( _pState, va_arg( pArg, int32 ) != 0 ); + break; + + case 'x': // Binary string argument. Next argument MUST be an integer. (which will be skipped) + pBinarySource = va_arg( pArg, char * ); + binaryLen = va_arg( pArg, int32 ); + lua_pushlstring( _pState, pBinarySource, static_cast(binaryLen) ); + _pSig++; + break; + + case 's': // String argument. + lua_pushstring( _pState, va_arg( pArg, char * ) ); + break; + + case '>': + goto endwhileLabel; + + default: + { + g_Log->Error( "Invalid option (%c)", *(_pSig - 1) ); + return 0; + } + } + + //printf( "stack: %d", lua_gettop( _pState ) ); + + narg++; + luaL_checkstack( _pState, 1, "Too many arguments" ); + + } endwhileLabel: + + // Do the call. + nres = (int)strlen( _pSig ); // Number of expected results. + + //LuaCall( _pState, narg, nres ); + //int status = lua_pcall( _pState, narg, nres, 0 ); + int status = docall( _pState, narg, 0 ); + + reportLua( _pState, status ); + + // Retrieve results. + nres = -nres; // Stack index of first result. + + while( *_pSig ) // Get results. + { + switch( *_pSig++ ) + { + case 'd': // Double result. + if( !lua_isnumber( _pState, nres ) ) + g_Log->Error( "Wrong result type, expected double" ); + else + *va_arg( pArg, fp8 *) = lua_tonumber( _pState, nres ); + + break; + + + case 'b': // Bool result. + if( !lua_isboolean( _pState, nres ) ) + g_Log->Error( "Wrong result type, expected bool" ); + else + *va_arg( pArg, bool *) = lua_toboolean( _pState, nres ) != 0; + + break; + + case 'i': // Int result. + if( !lua_isnumber( _pState, nres ) ) + g_Log->Error( "Wrong result type, expected integer" ); + else + *va_arg( pArg, int32 *) = (int32)lua_tonumber( _pState, nres ); + + break; + + case 's': // String result. + if( !lua_isstring( _pState, nres ) ) + g_Log->Error( "Wrong result type, expected string" ); + else + *va_arg( pArg, const char **) = lua_tostring( _pState, nres ); + + break; + + default: + { + g_Log->Error( "Invalid option (%c)", *(_pSig - 1) ); + break; + } + } + + nres++; + } + + /* + HACK! + Pop delta from stack, keeping this function from raceing away!. + */ + delta = lua_gettop( _pState ) - static_cast(stackSizeIn); + } + /*catch( Base::CException &_e ) + { + va_end( pArg ); + + // Make sure to clean up stack in case of errors. + delta = lua_gettop( _pState ) - stackSizeIn; + if( delta != 0 ) + lua_pop( _pState, delta ); + + g_Log->Warning( "%s", _e.Text().c_str() ); + //_e.ReportCatch(); + return 0; + }*/ + + va_end( pArg ); + + return( delta ); +} + +}; + +}; diff -Nru electricsheep-2.7~b12+svn20091224/Common/LuaState.h electricsheep-3.0.2-git20180325/Common/LuaState.h --- electricsheep-2.7~b12+svn20091224/Common/LuaState.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/LuaState.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,61 @@ +/* + LUASTATE.H + Author: Stef. + + Scriptstate baseclass. +*/ +#ifndef _LUA_STATE_H +#define _LUA_STATE_H + +#include "base.h" + +struct lua_State; +typedef int (*lua_CFunction) (lua_State *L); + +namespace Base { +namespace Script { + +// +int32 Call( lua_State *_pState, const char *_pFunc, const char *_pSig, ... ); + +/* + CLuaState. + Main lua state. +*/ +class CLuaState +{ + NO_CLASS_STANDARDS( CLuaState ); + + protected: + + lua_State *m_pState; + + public: + CLuaState(); + ~CLuaState(); + + // + void Init( const std::string &_basePath ); + void AddPackage( const std::string &_packagePath, const bool _bRelativeRuntimeDir = true ); + void registerLib( const char *_pName, lua_CFunction _func ); + + // Execute lua code. + bool Execute( const std::string &_command ); + + // Run a lua script. + bool Run( const std::string &_script ); + + // + lua_State *GetState( void ) { return( m_pState ); }; + + // + void Pop( const int32 _num ); + + void DumpStack(); +}; + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/luaxml.cpp electricsheep-3.0.2-git20180325/Common/luaxml.cpp --- electricsheep-2.7~b12+svn20091224/Common/luaxml.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/luaxml.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,127 @@ +#include +#include +#include + +#include "../tinyXml/tinyxml.h" +#include "base.h" + +extern "C" { + #include "lua.h" + #include "lauxlib.h" + #include "lualib.h" +} + +/* +*/ +void LuaXML_ParseNode( lua_State *L, TiXmlNode* pNode) +{ + if( !pNode ) + return; + + // Resize stack if neccessary. + luaL_checkstack( L, 5, "LuaXML_ParseNode : recursion too deep" ); + + TiXmlElement* pElem = pNode->ToElement(); + if( pElem ) + { + // Element name. + lua_pushstring( L,"name" ); + lua_pushstring( L,pElem->Value() ); + lua_settable( L,-3 ); + + // Parse attributes. + TiXmlAttribute* pAttr = pElem->FirstAttribute(); + if( pAttr ) + { + lua_pushstring( L,"attr" ); + lua_newtable( L ); + + for( ;pAttr; pAttr = pAttr->Next() ) + { + lua_pushstring( L,pAttr->Name() ); + lua_pushstring( L,pAttr->Value() ); + lua_settable( L, -3 ); + } + + lua_settable( L, -3 ); + } + } + + // Children. + TiXmlNode *pChild = pNode->FirstChild(); + if( pChild ) + { + int iChildCount = 0; + + for( ;pChild; pChild = pChild->NextSibling() ) + { + switch( pChild->Type() ) + { + case TiXmlNode::TINYXML_ELEMENT: + // Normal element, parse recursive. + lua_newtable( L ); + LuaXML_ParseNode( L, pChild ); + lua_rawseti( L, -2, ++iChildCount ); + break; + + case TiXmlNode::TINYXML_TEXT: + // Plaintext, push raw. + lua_pushstring( L, pChild->Value() ); + lua_rawseti( L, -2, ++iChildCount ); + break; + + case TiXmlNode::TINYXML_DECLARATION: + case TiXmlNode::TINYXML_UNKNOWN: + case TiXmlNode::TINYXML_COMMENT: + case TiXmlNode::TINYXML_DOCUMENT: + default: + break; + }; + } + + lua_pushstring( L,"n" ); + lua_pushnumber( L, iChildCount ); + lua_settable( L, -3 ); + } +} + +/* +*/ +static int LuaXML_ParseFile( lua_State *L ) +{ + const char* sFileName = luaL_checkstring( L, 1 ); + TiXmlDocument doc( sFileName ); + doc.LoadFile(); + lua_newtable( L ); + LuaXML_ParseNode( L, &doc ); + return 1; +} + +/* +*/ +static int LuaXML_ParseData( lua_State *L ) +{ + const char *sData = luaL_checkstring( L, 1 ); + + TiXmlDocument doc; + doc.Parse( (const char *)sData, 0, TIXML_ENCODING_UTF8 ); + lua_newtable( L ); + LuaXML_ParseNode( L, &doc ); + return 1; +} + +// +static const luaL_Reg luaxmllib[] = { + { "parseData", LuaXML_ParseData }, + { "parseFile", LuaXML_ParseFile }, + { NULL, NULL } +}; + +/* +** Open math library +*/ +extern int luaopen_xml( lua_State *L ) +{ + luaL_register( L, "luaXML", luaxmllib ); + return 1; +} diff -Nru electricsheep-2.7~b12+svn20091224/Common/luaxml.h electricsheep-3.0.2-git20180325/Common/luaxml.h --- electricsheep-2.7~b12+svn20091224/Common/luaxml.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/luaxml.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,7 @@ +#ifndef _LUAXML_H_ +#define _LUAXML_H_ + +// Register parser functions to lua. +extern int luaopen_xml( struct lua_State *L ); + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/fastbez.h electricsheep-3.0.2-git20180325/Common/Math/fastbez.h --- electricsheep-2.7~b12+svn20091224/Common/Math/fastbez.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/fastbez.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,58 @@ +#ifndef _FASTBEZ_H +#define _FASTBEZ_H + +#include "base.h" +#include "MathBase.h" +#include "Vector3.h" + +namespace Base +{ + +namespace Math +{ + +/* + Pretty fast bezier curves using de Casteljau's algo. + Info: http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/surface/bezier-de-casteljau.html + Very suitable for simd and other types of opts. +*/ + +/* + CFastBezier. + +*/ +class CFastBezier +{ + fp4 m_Curve[4]; + + public: + CFastBezier( fp4 _a, fp4 _b, fp4 _c, fp4 _d ) + { + m_Curve[0] = _a; + m_Curve[1] = _b; + m_Curve[2] = _c; + m_Curve[3] = _d; + } + + inline fp4 Sample( const fp4 _time ) const + { + fp4 a[3]; + fp4 b[2]; + fp4 res; + + a[0] = lerpMacro( m_Curve[0], m_Curve[1], _time ); + a[1] = lerpMacro( m_Curve[1], m_Curve[2], _time ); + a[2] = lerpMacro( m_Curve[2], m_Curve[3], _time ); + b[0] = lerpMacro( a[0], a[1], _time ); + b[1] = lerpMacro( a[1], a[2], _time ); + res = lerpMacro( b[0], b[1], _time ); + + return( res ); + } +}; + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Matrix3x3_x86.h electricsheep-3.0.2-git20180325/Common/Math/Matrix3x3_x86.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Matrix3x3_x86.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Matrix3x3_x86.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,426 @@ +/* + 3x3 matrix class. + NOTE. Will be typedefed and included from Matrix.h. +*/ +#ifndef _MATRIX3X3_X86_H +#define _MATRIX3X3_X86_H + +#include +#include "Vector2_X86.h" +#include "Vector3_X86.h" +#include "MatrixDefs.h" + +namespace Base +{ + +namespace Math +{ + +// Identity +static const fp4 g_matrix3x3_x86_ident[9] = { 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f, }; + +/* + CMatrix3x3_x86. + +*/ +class CMatrix3x3_x86 +{ + public: + CMatrix3x3_x86(); + CMatrix3x3_x86( const CVector3_x86 &_v0, const CVector3_x86 &_v1, const CVector3_x86 &_v2 ); + CMatrix3x3_x86( const CMatrix3x3_x86 &_mx ); + CMatrix3x3_x86( fp4 _m11, fp4 _m12, fp4 _m13, fp4 _m21, fp4 _m22, fp4 _m23, fp4 _m31, fp4 _m32, fp4 _m33 ); + + // + void Aim( const CVector3_x86 &_from, const CVector3_x86 &_to, const CVector3_x86 &_up ); + void AimRestricted( const CVector3_x86 &_from, const CVector3_x86 &_to, const CVector3_x86 &_up ); + + // + void Set( fp4 _m11, fp4 _m12, fp4 _m13, fp4 _m21, fp4 _m22, fp4 _m23, fp4 _m31, fp4 _m32, fp4 _m33 ); + void Set( const CVector3_x86 &_v0, const CVector3_x86 &_v1, const CVector3_x86 &_v2 ); + void Set( const CMatrix3x3_x86 &_m1 ); + + // + void Identity(); + void Transpose(); + bool Orthonorm( const fp4 _limit ); + + // + void Scale( const CVector3_x86 &_s ); + + // World. + void Rotate_X( const fp4 _a ); + void Rotate_Y( const fp4 _a ); + void Rotate_Z( const fp4 _a ); + + // Local. + void Rotate_LX( const fp4 _a ); + void Rotate_LY( const fp4 _a ); + void Rotate_LZ( const fp4 _a ); + + // + void Rotate( const CVector3_x86 &_vec, const fp4 _a ); + + // + CVector3_x86 GetX( void ) const; + CVector3_x86 GetY( void ) const; + CVector3_x86 GetZ( void ) const; + + // + void operator *= ( const CMatrix3x3_x86 &_m1 ); + + // + void Transform( const CVector3_x86 &_src, CVector3_x86 &_dst ) const; + void Translate( const CVector2_x86 &_t ); + + fp4 m_Mat[3][3]; +}; + +/* +*/ +static inline CMatrix3x3_x86 operator * (const CMatrix3x3_x86 &_m0, const CMatrix3x3_x86 &_m1 ) +{ + CMatrix3x3_x86 m2( _m0.m_Mat[0][0]*_m1.m_Mat[0][0] + _m0.m_Mat[0][1]*_m1.m_Mat[1][0] + _m0.m_Mat[0][2]*_m1.m_Mat[2][0], + _m0.m_Mat[0][0]*_m1.m_Mat[0][1] + _m0.m_Mat[0][1]*_m1.m_Mat[1][1] + _m0.m_Mat[0][2]*_m1.m_Mat[2][1], + _m0.m_Mat[0][0]*_m1.m_Mat[0][2] + _m0.m_Mat[0][1]*_m1.m_Mat[1][2] + _m0.m_Mat[0][2]*_m1.m_Mat[2][2], + + _m0.m_Mat[1][0]*_m1.m_Mat[0][0] + _m0.m_Mat[1][1]*_m1.m_Mat[1][0] + _m0.m_Mat[1][2]*_m1.m_Mat[2][0], + _m0.m_Mat[1][0]*_m1.m_Mat[0][1] + _m0.m_Mat[1][1]*_m1.m_Mat[1][1] + _m0.m_Mat[1][2]*_m1.m_Mat[2][1], + _m0.m_Mat[1][0]*_m1.m_Mat[0][2] + _m0.m_Mat[1][1]*_m1.m_Mat[1][2] + _m0.m_Mat[1][2]*_m1.m_Mat[2][2], + + _m0.m_Mat[2][0]*_m1.m_Mat[0][0] + _m0.m_Mat[2][1]*_m1.m_Mat[1][0] + _m0.m_Mat[2][2]*_m1.m_Mat[2][0], + _m0.m_Mat[2][0]*_m1.m_Mat[0][1] + _m0.m_Mat[2][1]*_m1.m_Mat[1][1] + _m0.m_Mat[2][2]*_m1.m_Mat[2][1], + _m0.m_Mat[2][0]*_m1.m_Mat[0][2] + _m0.m_Mat[2][1]*_m1.m_Mat[1][2] + _m0.m_Mat[2][2]*_m1.m_Mat[2][2] ); + return( m2 ); +} + +/* +*/ +static inline CVector3_x86 operator * ( const CMatrix3x3_x86 &_m, const CVector3_x86 &_v ) +{ + return( CVector3_x86( _m.M11*_v.m_X + _m.M21*_v.m_Y + _m.M31*_v.m_Z, + _m.M12*_v.m_X + _m.M22*_v.m_Y + _m.M32*_v.m_Z, + _m.M13*_v.m_X + _m.M23*_v.m_Y + _m.M33*_v.m_Z ) ); +}; + +/* +*/ +inline CMatrix3x3_x86::CMatrix3x3_x86() +{ + memcpy( &(m_Mat[0][0]), g_matrix3x3_x86_ident, sizeof( g_matrix3x3_x86_ident ) ); +} + +/* +*/ +inline CMatrix3x3_x86::CMatrix3x3_x86( const CVector3_x86 &_v0, const CVector3_x86 &_v1, const CVector3_x86 &_v2 ) +{ + M11 = _v0.m_X; M12 = _v0.m_Y; M13 = _v0.m_Z; + M21 = _v1.m_X; M22 = _v1.m_Y; M23 = _v1.m_Z; + M31 = _v2.m_X; M32 = _v2.m_Y; M33 = _v2.m_Z; +} + +/* +*/ +inline CMatrix3x3_x86::CMatrix3x3_x86( const CMatrix3x3_x86 &_m1 ) +{ + memcpy( m_Mat, &(_m1.m_Mat[0][0]), 9*sizeof(fp4) ); +} + +/* +*/ +inline CMatrix3x3_x86::CMatrix3x3_x86( fp4 _m11, fp4 _m12, fp4 _m13, fp4 _m21, fp4 _m22, fp4 _m23, fp4 _m31, fp4 _m32, fp4 _m33 ) +{ + M11 = _m11; M12 = _m12; M13 = _m13; + M21 = _m21; M22 = _m22; M23 = _m23; + M31 = _m31; M32 = _m32; M33 = _m33; +} + +/* +*/ +inline void CMatrix3x3_x86::Aim( const CVector3_x86 &_from, const CVector3_x86 &_to, const CVector3_x86 &_up ) +{ + CVector3_x86 z( _from - _to ); + z.NormalizeFast(); + + CVector3_x86 x( _up * z ); + x.NormalizeFast(); + + CVector3_x86 y = z * x; + + M11 = x.m_X; M12 = x.m_Y; M13 = x.m_Z; + M21 = y.m_X; M22 = y.m_Y; M23 = y.m_Z; + M31 = z.m_X; M32 = z.m_Y; M33 = z.m_Z; +} + +/* +*/ +inline void CMatrix3x3_x86::AimRestricted( const CVector3_x86 &_from, const CVector3_x86 &_to, const CVector3_x86 &_up ) +{ + CVector3_x86 z( _from - _to ); + z.NormalizeFast(); + + CVector3_x86 y( _up ); + y.NormalizeFast(); + + CVector3_x86 x(y * z); + z = x * y; + + M11 = x.m_X; M12 = x.m_Y; M13 = x.m_Z; + M21 = y.m_X; M22 = y.m_Y; M23 = y.m_Z; + M31 = z.m_X; M32 = z.m_Y; M33 = z.m_Z; +} + +/* +*/ +inline void CMatrix3x3_x86::Set( fp4 _m11, fp4 _m12, fp4 _m13, fp4 _m21, fp4 _m22, fp4 _m23, fp4 _m31, fp4 _m32, fp4 _m33 ) +{ + M11 = _m11; M12 = _m12; M13 = _m13; + M21 = _m21; M22 = _m22; M23 = _m23; + M31 = _m31; M32 = _m32; M33 = _m33; +} + +/* +*/ +inline void CMatrix3x3_x86::Set( const CVector3_x86 &_v0, const CVector3_x86 &_v1, const CVector3_x86 &_v2 ) +{ + M11 = _v0.m_X; M12 = _v0.m_Y; M13 = _v0.m_Z; + M21 = _v1.m_X; M22 = _v1.m_Y; M23 = _v1.m_Z; + M31 = _v2.m_X; M32 = _v2.m_Y; M33 = _v2.m_Z; +} + +/* +*/ +inline void CMatrix3x3_x86::Set( const CMatrix3x3_x86 &_m1 ) +{ + memcpy( m_Mat, &(_m1.m_Mat), 9*sizeof(fp4) ); +} + +/* +*/ +inline void CMatrix3x3_x86::Identity( void ) +{ + memcpy( &(m_Mat[0][0]), g_matrix3x3_x86_ident, sizeof(g_matrix3x3_x86_ident) ); +} + +/* +*/ +inline void CMatrix3x3_x86::Transpose( void ) +{ +#define da_swap(x,y) { fp4 t=x; x=y; y=t; } + da_swap( m_Mat[0][1], m_Mat[1][0] ); + da_swap( m_Mat[0][2], m_Mat[2][0] ); + da_swap( m_Mat[1][2], m_Mat[2][1] ); +#undef da_swap +} + +/* +*/ +inline bool CMatrix3x3_x86::Orthonorm( const fp4 _limit ) +{ + if( ((M11*M21+M12*M22+M13*M23) < _limit ) && + ((M11*M31+M12*M32+M13*M33) < _limit ) && + ((M31*M21+M32*M22+M33*M23) < _limit ) && + ((M11*M11+M12*M12+M13*M13) > (1.0f-_limit) ) && + ((M11*M11+M12*M12+M13*M13) < (1.0f+_limit) ) && + ((M21*M21+M22*M22+M23*M23) > (1.0f-_limit) ) && + ((M21*M21+M22*M22+M23*M23) < (1.0f+_limit) ) && + ((M31*M31+M32*M32+M33*M33) > (1.0f-_limit) ) && + ((M31*M31+M32*M32+M33*M33) < (1.0f+_limit) ) ) + return( true ); + else + return( false ); +} + +/* +*/ +inline void CMatrix3x3_x86::Scale( const CVector3_x86 &_s ) +{ + for( uint32 i=0; i<3; i++ ) + { + m_Mat[i][0] *= _s.m_X; + m_Mat[i][1] *= _s.m_Y; + m_Mat[i][2] *= _s.m_Z; + } +} + +/* +*/ +inline void CMatrix3x3_x86::Rotate_X( const fp4 _a ) +{ + fp4 s, c; + SinCos( _a, &s, &c ); + + for( uint32 i=0; i<3; i++ ) + { + fp4 mi1 = m_Mat[i][1]; + fp4 mi2 = m_Mat[i][2]; + m_Mat[i][1] = mi1*c + mi2*-s; + m_Mat[i][2] = mi1*s + mi2*c; + } +} + +/* +*/ +inline void CMatrix3x3_x86::Rotate_Y( const fp4 _a ) +{ + fp4 s, c; + SinCos( _a, &s, &c ); + + for( uint32 i=0; i<3; i++ ) + { + fp4 mi0 = m_Mat[i][0]; + fp4 mi2 = m_Mat[i][2]; + m_Mat[i][0] = mi0*c + mi2*s; + m_Mat[i][2] = mi0*-s + mi2*c; + } +} + +/* +*/ +inline void CMatrix3x3_x86::Rotate_Z( const fp4 _a ) +{ + fp4 s, c; + SinCos( _a, &s, &c ); + + for( uint32 i=0; i<3; i++ ) + { + fp4 mi0 = m_Mat[i][0]; + fp4 mi1 = m_Mat[i][1]; + m_Mat[i][0] = mi0*c + mi1*-s; + m_Mat[i][1] = mi0*s + mi1*c; + } +} + +/* +*/ +inline void CMatrix3x3_x86::Rotate_LX( const fp4 _a ) +{ + fp4 sa, ca; + SinCos( _a, &sa, &ca ); + + CMatrix3x3_x86 rotM; + + rotM.M22 = ca; rotM.M23 = -sa; + rotM.M32 = sa; rotM.M33 = ca; + + (*this) = rotM * (*this); +} + +/* +*/ +inline void CMatrix3x3_x86::Rotate_LY( const fp4 _a ) +{ + fp4 sa, ca; + SinCos( _a, &sa, &ca ); + + CMatrix3x3_x86 rotM; + rotM.M11 = ca; rotM.M13 = sa; + rotM.M31 = -sa; rotM.M33 = ca; + + (*this) = rotM * (*this); +} + +/* +*/ +inline void CMatrix3x3_x86::Rotate_LZ( const fp4 _a ) +{ + fp4 sa, ca; + SinCos( _a, &sa, &ca ); + + CMatrix3x3_x86 rotM; + rotM.M11 = ca; rotM.M12 = -sa; + rotM.M21 = sa; rotM.M22 = ca; + + (*this) = rotM * (*this); +} + +/* + Rotate(). + +*/ +inline void CMatrix3x3_x86::Rotate( const CVector3_x86 &_vec, const fp4 _a ) +{ + CVector3_x86 v( _vec ); + v.NormalizeFast(); + + fp4 sa, ca; + SinCos( _a, &sa, &ca ); + + CMatrix3x3_x86 rotM; + rotM.M11 = ca + (1.0f - ca) * v.m_X * v.m_X; + rotM.M12 = (1.0f - ca) * v.m_X * v.m_Y - sa * v.m_Z; + rotM.M13 = (1.0f - ca) * v.m_Z * v.m_X + sa * v.m_Y; + rotM.M21 = (1.0f - ca) * v.m_X * v.m_Y + sa * v.m_Z; + rotM.M22 = ca + (1.0f - ca) * v.m_Y * v.m_Y; + rotM.M23 = (1.0f - ca) * v.m_Y * v.m_Z - sa * v.m_X; + rotM.M31 = (1.0f - ca) * v.m_Z * v.m_X - sa * v.m_Y; + rotM.M32 = (1.0f - ca) * v.m_Y * v.m_Z + sa * v.m_X; + rotM.M33 = ca + (1.0f - ca) * v.m_Z * v.m_Z; + + (*this) = (*this) * rotM; +} + +/* +*/ +inline CVector3_x86 CMatrix3x3_x86::GetX( void ) const +{ + CVector3_x86 v( M11, M12, M13 ); + return( v ); +} + +/* +*/ +inline CVector3_x86 CMatrix3x3_x86::GetY( void ) const +{ + CVector3_x86 v( M21, M22, M23 ); + return( v ); +} + +/* +*/ +inline CVector3_x86 CMatrix3x3_x86::GetZ( void ) const +{ + CVector3_x86 v( M31, M32, M33 ); + return( v ); +}; + +/* +*/ +inline void CMatrix3x3_x86::operator *= (const CMatrix3x3_x86 &_m1 ) +{ + for( uint32 i=0; i<3; i++ ) + { + fp4 mi0 = m_Mat[i][0]; + fp4 mi1 = m_Mat[i][1]; + fp4 mi2 = m_Mat[i][2]; + m_Mat[i][0] = mi0*_m1.m_Mat[0][0] + mi1*_m1.m_Mat[1][0] + mi2*_m1.m_Mat[2][0]; + m_Mat[i][1] = mi0*_m1.m_Mat[0][1] + mi1*_m1.m_Mat[1][1] + mi2*_m1.m_Mat[2][1]; + m_Mat[i][2] = mi0*_m1.m_Mat[0][2] + mi1*_m1.m_Mat[1][2] + mi2*_m1.m_Mat[2][2]; + } +} + +/* + Multiply source vector with matrix and store in destination vector. + This eliminates the construction of a temp CVector3_x86 object. +*/ +inline void CMatrix3x3_x86::Transform( const CVector3_x86 &_src, CVector3_x86 &_dst ) const +{ + _dst.m_X = M11*_src.m_X + M21*_src.m_Y + M31*_src.m_Z; + _dst.m_Y = M12*_src.m_X + M22*_src.m_Y + M32*_src.m_Z; + _dst.m_Z = M13*_src.m_X + M23*_src.m_Y + M33*_src.m_Z; +} + +/* + Matrix is treated like a 2x2 rotational matrix and 2d-translation. +*/ +inline void CMatrix3x3_x86::Translate( const CVector2_x86 &_t ) +{ + M31 += _t.m_X; + M32 += _t.m_Y; +} + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Matrix4x4_x86.h electricsheep-3.0.2-git20180325/Common/Math/Matrix4x4_x86.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Matrix4x4_x86.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Matrix4x4_x86.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,637 @@ +/* + 4x4 matrix class. + NOTE. Will be typedefed and included from Matrix.h. +*/ +#ifndef _MATRIX4X4_X86_H +#define _MATRIX4X4_X86_H + +#include "Vector3_X86.h" +#include "Vector4_X86.h" +#include "MatrixDefs.h" + +namespace Base +{ + +namespace Math +{ + +// Identity +static const fp4 g_matrix4x4_x86_ident[16] = { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, }; + +/* + CMatrix4x4_x86(). + +*/ +class CMatrix4x4_x86 +{ + public: + CMatrix4x4_x86(); + CMatrix4x4_x86( const CVector4_x86 &_v0, const CVector4_x86 &_v1, const CVector4_x86 &_v2, const CVector4_x86 &_v3 ); + CMatrix4x4_x86( const CMatrix4x4_x86 &_m1 ); + CMatrix4x4_x86( fp4 _m11, fp4 _m12, fp4 _m13, fp4 _m14, + fp4 _m21, fp4 _m22, fp4 _m23, fp4 _m24, + fp4 _m31, fp4 _m32, fp4 _m33, fp4 _m34, + fp4 _m41, fp4 _m42, fp4 _m43, fp4 _m44); + + // + void Set( const CVector4_x86 &_v0, const CVector4_x86 &_v1, const CVector4_x86 &_v2, const CVector4_x86 &_v3 ); + void Set( const CMatrix4x4_x86 &_m1 ); + void Set( fp4 _m11, fp4 _m12, fp4 _m13, fp4 _m14, + fp4 _m21, fp4 _m22, fp4 _m23, fp4 _m24, + fp4 _m31, fp4 _m32, fp4 _m33, fp4 _m34, + fp4 _m41, fp4 _m42, fp4 _m43, fp4 _m44 ); + + // + void Identity(); + void Transpose(); + fp4 Determinant(); + void Invert(); + void InvertFast(); // Only when 3x3rot+trans. + + // + CVector4_x86 &GetX() const; + CVector4_x86 &GetY() const; + CVector4_x86 &GetZ() const; + CVector4_x86 &GetW() const; + + // World. + void Rotate_X( const fp4 _a ); + void Rotate_Y( const fp4 _a ); + void Rotate_Z( const fp4 _a ); + void Rotate( const CVector3_x86 &_vec, const fp4 _a ); + + // + void Translate( const CVector4_x86 &_t ); + void SetTranslation( const CVector4_x86 &_t ); + void Scale( const CVector3_x86 &_s ); + + // Lefthanded. + void AimLH( const CVector3_x86 &_to, const CVector3_x86 &_up ); + void PerspectiveLH( const fp4 _fovY, const fp4 _aspect, const fp4 _zn, const fp4 _zf ); + void PerspectiveOffCenterLH( const fp4 _minX, const fp4 _maxX, const fp4 _minY, const fp4 _maxY, const fp4 _zn, const fp4 _zf ); + void OrthographicLH( const fp4 _w, const fp4 _h, const fp4 _zn, const fp4 _zf ); + + // Righthanded. + void AimRH( const CVector3_x86 &_to, const CVector3_x86 &_up ); + void PerspectiveRH( const fp4 _fovY, const fp4 _aspect, const fp4 _zn, const fp4 _zf ); + void PerspectiveOffCenterRH( const fp4 _minX, const fp4 _maxX, const fp4 _minY, const fp4 _maxY, const fp4 _zn, const fp4 _zf ); + void OrthographicRH( const fp4 _w, const fp4 _h, const fp4 _zn, const fp4 _zf ); + + // + void AimRestricted( const CVector3_x86 &_to, const CVector3_x86 &_up ); + + // + void operator *= ( const CMatrix4x4_x86 &_m1 ); + void MultiplyFast( const CMatrix4x4_x86 &_m1 ); // Only when 14=24=34=0 & 44=1 + + // + CVector3_x86 Transform( const CVector3_x86 &_v) const; // Projecting back into w=1 + + // + void Multiply( const CVector4_x86 &_src, CVector4_x86 &_dst ) const; + void Multiply( const CVector3_x86 &_src, CVector3_x86 &_dst ) const; + + // + fp4 m_Mat[4][4]; +}; + +/* +*/ +inline CMatrix4x4_x86::CMatrix4x4_x86() +{ + memcpy( &(m_Mat[0][0]), g_matrix3x3_x86_ident, sizeof(g_matrix3x3_x86_ident) ); +} + +/* +*/ +inline CMatrix4x4_x86::CMatrix4x4_x86( const CVector4_x86 &_v0, const CVector4_x86 &_v1, const CVector4_x86 &_v2, const CVector4_x86 &_v3 ) +{ + M11 = _v0.m_X; M12 = _v0.m_Y; M13 = _v0.m_Z; M14 = _v0.m_W; + M21 = _v1.m_X; M22 = _v1.m_Y; M23 = _v1.m_Z; M24 = _v1.m_W; + M31 = _v2.m_X; M32 = _v2.m_Y; M33 = _v2.m_Z; M34 = _v2.m_W; + M41 = _v3.m_X; M42 = _v3.m_Y; M43 = _v3.m_Z; M44 = _v3.m_W; +} + +/* +*/ +inline CMatrix4x4_x86::CMatrix4x4_x86( const CMatrix4x4_x86 &_m1 ) +{ + memcpy( m_Mat, &(_m1.m_Mat[0][0]), 16 * sizeof(fp4) ); +} + +/* +*/ +inline CMatrix4x4_x86::CMatrix4x4_x86( fp4 _m11, fp4 _m12, fp4 _m13, fp4 _m14, + fp4 _m21, fp4 _m22, fp4 _m23, fp4 _m24, + fp4 _m31, fp4 _m32, fp4 _m33, fp4 _m34, + fp4 _m41, fp4 _m42, fp4 _m43, fp4 _m44) +{ + M11 = _m11; M12 = _m12; M13 = _m13; M14 = _m14; + M21 = _m21; M22 = _m22; M23 = _m23; M24 = _m24; + M31 = _m31; M32 = _m32; M33 = _m33; M34 = _m34; + M41 = _m41; M42 = _m42; M43 = _m43; M44 = _m44; +} + + +/* +*/ +inline void CMatrix4x4_x86::Set( const CVector4_x86 &_v0, const CVector4_x86 &_v1, const CVector4_x86 &_v2, const CVector4_x86 &_v3 ) +{ + M11 = _v0.m_X; M12 = _v0.m_Y; M13 = _v0.m_Z; M14 = _v0.m_W; + M21 = _v1.m_X; M22 = _v1.m_Y; M23 = _v1.m_Z; M24 = _v1.m_W; + M31 = _v2.m_X; M32 = _v2.m_Y; M33 = _v2.m_Z; M34 = _v2.m_W; + M41 = _v3.m_X; M42 = _v3.m_Y; M43 = _v3.m_Z; M44 = _v3.m_W; +} + +/* +*/ +inline void CMatrix4x4_x86::Set( const CMatrix4x4_x86 &_m1 ) +{ + memcpy( m_Mat, &(_m1.m_Mat[0][0]), 16*sizeof(fp4) ); +} + +/* +*/ +inline void CMatrix4x4_x86::Set( fp4 _m11, fp4 _m12, fp4 _m13, fp4 _m14, + fp4 _m21, fp4 _m22, fp4 _m23, fp4 _m24, + fp4 _m31, fp4 _m32, fp4 _m33, fp4 _m34, + fp4 _m41, fp4 _m42, fp4 _m43, fp4 _m44) +{ + M11=_m11; M12=_m12; M13=_m13; M14=_m14; + M21=_m21; M22=_m22; M23=_m23; M24=_m24; + M31=_m31; M32=_m32; M33=_m33; M34=_m34; + M41=_m41; M42=_m42; M43=_m43; M44=_m44; +} + +/* +*/ +inline void CMatrix4x4_x86::Identity( void ) +{ + memcpy( &(m_Mat[0][0]), g_matrix4x4_x86_ident, sizeof(g_matrix4x4_x86_ident) ); +} + +/* +*/ +inline void CMatrix4x4_x86::Transpose( void ) +{ +#define da_swap(x,y) { fp4 t=x; x=y; y=t; } + da_swap( M12, M21 ); + da_swap( M13, M31 ); + da_swap( M14, M41 ); + da_swap( M23, M32 ); + da_swap( M24, M42 ); + da_swap( M34, M43 ); +#undef da_swap +} + +/* +*/ +inline fp4 CMatrix4x4_x86::Determinant( void ) +{ + return( (M11 * M22 - M12 * M21) * (M33 * M44 - M34 * M43) + -(M11 * M23 - M13 * M21) * (M32 * M44 - M34 * M42) + +(M11 * M24 - M14 * M21) * (M32 * M43 - M33 * M42) + +(M12 * M23 - M13 * M22) * (M31 * M44 - M34 * M41) + -(M12 * M24 - M14 * M22) * (M31 * M43 - M33 * M41) + +(M13 * M24 - M14 * M23) * (M31 * M42 - M32 * M41) ); +} + +/* +*/ +inline void CMatrix4x4_x86::Invert( void ) +{ + fp4 s = Determinant(); + if( s == 0.0f ) + return; + + s = 1.0f / s; + Set( s*(M22*(M33*M44 - M34*M43) + M23*(M34*M42 - M32*M44) + M24*(M32*M43 - M33*M42)), + s*(M32*(M13*M44 - M14*M43) + M33*(M14*M42 - M12*M44) + M34*(M12*M43 - M13*M42)), + s*(M42*(M13*M24 - M14*M23) + M43*(M14*M22 - M12*M24) + M44*(M12*M23 - M13*M22)), + s*(M12*(M24*M33 - M23*M34) + M13*(M22*M34 - M24*M32) + M14*(M23*M32 - M22*M33)), + s*(M23*(M31*M44 - M34*M41) + M24*(M33*M41 - M31*M43) + M21*(M34*M43 - M33*M44)), + s*(M33*(M11*M44 - M14*M41) + M34*(M13*M41 - M11*M43) + M31*(M14*M43 - M13*M44)), + s*(M43*(M11*M24 - M14*M21) + M44*(M13*M21 - M11*M23) + M41*(M14*M23 - M13*M24)), + s*(M13*(M24*M31 - M21*M34) + M14*(M21*M33 - M23*M31) + M11*(M23*M34 - M24*M33)), + s*(M24*(M31*M42 - M32*M41) + M21*(M32*M44 - M34*M42) + M22*(M34*M41 - M31*M44)), + s*(M34*(M11*M42 - M12*M41) + M31*(M12*M44 - M14*M42) + M32*(M14*M41 - M11*M44)), + s*(M44*(M11*M22 - M12*M21) + M41*(M12*M24 - M14*M22) + M42*(M14*M21 - M11*M24)), + s*(M14*(M22*M31 - M21*M32) + M11*(M24*M32 - M22*M34) + M12*(M21*M34 - M24*M31)), + s*(M21*(M33*M42 - M32*M43) + M22*(M31*M43 - M33*M41) + M23*(M32*M41 - M31*M42)), + s*(M31*(M13*M42 - M12*M43) + M32*(M11*M43 - M13*M41) + M33*(M12*M41 - M11*M42)), + s*(M41*(M13*M22 - M12*M23) + M42*(M11*M23 - M13*M21) + M43*(M12*M21 - M11*M22)), + s*(M11*(M22*M33 - M23*M32) + M12*(M23*M31 - M21*M33) + M13*(M21*M32 - M22*M31)) ); +} + +/* + inverts a 4x4 matrix consisting of a 3x3 rotation matrix and a translation (eg. everything that has [0,0,0,1] + as the rightmost column) MUCH cheaper then a real 4x4 inversion. +*/ +inline void CMatrix4x4_x86::InvertFast( void ) +{ + fp4 s = Determinant(); + + if( s == 0.0f ) + return; + + s = 1.0f/s; + + Set( s * ((M22 * M33) - (M23 * M32)), + s * ((M32 * M13) - (M33 * M12)), + s * ((M12 * M23) - (M13 * M22)), + 0.0f, + s * ((M23 * M31) - (M21 * M33)), + s * ((M33 * M11) - (M31 * M13)), + s * ((M13 * M21) - (M11 * M23)), + 0.0f, + s * ((M21 * M32) - (M22 * M31)), + s * ((M31 * M12) - (M32 * M11)), + s * ((M11 * M22) - (M12 * M21)), + 0.0f, + s * (M21*(M33*M42 - M32*M43) + M22*(M31*M43 - M33*M41) + M23*(M32*M41 - M31*M42)), + s * (M31*(M13*M42 - M12*M43) + M32*(M11*M43 - M13*M41) + M33*(M12*M41 - M11*M42)), + s * (M41*(M13*M22 - M12*M23) + M42*(M11*M23 - M13*M21) + M43*(M12*M21 - M11*M22)), + 1.0f ); +} + +/* + M14==M24==M34==0 & M44==1 +*/ +inline void CMatrix4x4_x86::MultiplyFast( const CMatrix4x4_x86 &_m1 ) +{ + for( uint32 i=0; i<4; i++ ) + { + fp4 mi0 = m_Mat[i][0]; + fp4 mi1 = m_Mat[i][1]; + fp4 mi2 = m_Mat[i][2]; + m_Mat[i][0] = mi0*_m1.m_Mat[0][0] + mi1*_m1.m_Mat[1][0] + mi2*_m1.m_Mat[2][0]; + m_Mat[i][1] = mi0*_m1.m_Mat[0][1] + mi1*_m1.m_Mat[1][1] + mi2*_m1.m_Mat[2][1]; + m_Mat[i][2] = mi0*_m1.m_Mat[0][2] + mi1*_m1.m_Mat[1][2] + mi2*_m1.m_Mat[2][2]; + } + + m_Mat[3][0] += _m1.m_Mat[3][0]; + m_Mat[3][1] += _m1.m_Mat[3][1]; + m_Mat[3][2] += _m1.m_Mat[3][2]; + + m_Mat[0][3] = 0.0f; + m_Mat[1][3] = 0.0f; + m_Mat[2][3] = 0.0f; + m_Mat[3][3] = 1.0f; +} + +/* + Transforms a vector by the matrix, projecting the result back into w=1. +*/ +inline CVector3_x86 CMatrix4x4_x86::Transform( const CVector3_x86 &_v ) const +{ + fp4 d = 1.0f / ( M14*_v.m_X + M24*_v.m_Y + M34*_v.m_Z + M44 ); + return( CVector3_x86( (M11*_v.m_X + M21*_v.m_Y + M31*_v.m_Z + M41) * d, + (M12*_v.m_X + M22*_v.m_Y + M32*_v.m_Z + M42) * d, + (M13*_v.m_X + M23*_v.m_Y + M33*_v.m_Z + M43) * d ) ); +} + +/* +*/ +inline CVector4_x86 &CMatrix4x4_x86::GetX( void ) const +{ + return( *(CVector4_x86 *)&M11 ); +} + +/* +*/ +inline CVector4_x86 &CMatrix4x4_x86::GetY( void ) const +{ + return( *(CVector4_x86*)&M21 ); +} + +/* +*/ +inline CVector4_x86 &CMatrix4x4_x86::GetZ( void ) const +{ + return( *(CVector4_x86*)&M31 ); +} + +/* +*/ +inline CVector4_x86 &CMatrix4x4_x86::GetW( void ) const +{ + return( *(CVector4_x86*)&M41 ); +} + +/* +*/ +inline void CMatrix4x4_x86::Rotate_X( const fp4 _a ) +{ + fp4 s, c; + SinCos( _a, &s, &c ); + + for( uint32 i=0; i<4; i++ ) + { + fp4 mi1 = m_Mat[i][1]; + fp4 mi2 = m_Mat[i][2]; + m_Mat[i][1] = mi1*c + mi2*-s; + m_Mat[i][2] = mi1*s + mi2*c; + } +} + +/* +*/ +inline void CMatrix4x4_x86::Rotate_Y( const fp4 _a ) +{ + fp4 s, c; + SinCos( _a, &s, &c ); + + for( uint32 i=0; i<4; i++ ) + { + fp4 mi0 = m_Mat[i][0]; + fp4 mi2 = m_Mat[i][2]; + m_Mat[i][0] = mi0*c + mi2*s; + m_Mat[i][2] = mi0*-s + mi2*c; + } +} + +/* +*/ +inline void CMatrix4x4_x86::Rotate_Z( const fp4 _a ) +{ + fp4 s, c; + SinCos( _a, &s, &c ); + + for( uint32 i=0; i<4; i++ ) + { + fp4 mi0 = m_Mat[i][0]; + fp4 mi1 = m_Mat[i][1]; + m_Mat[i][0] = mi0*c + mi1*-s; + m_Mat[i][1] = mi0*s + mi1*c; + } +} + +/* +*/ +inline void CMatrix4x4_x86::Translate( const CVector4_x86 &_t ) +{ + M41 += _t.m_X; + M42 += _t.m_Y; + M43 += _t.m_Z; + M44 += _t.m_W; // <- Eh? +} + +/* +*/ +inline void CMatrix4x4_x86::SetTranslation( const CVector4_x86 &_t ) +{ + M41 = _t.m_X; + M42 = _t.m_Y; + M43 = _t.m_Z; + M44 = _t.m_W; // <- Eh? +} + +/* +*/ +inline void CMatrix4x4_x86::Scale( const CVector3_x86 &_s ) +{ + for( uint32 i=0; i<4; i++ ) + { + m_Mat[i][0] *= _s.m_X; + m_Mat[i][1] *= _s.m_Y; + m_Mat[i][2] *= _s.m_Z; + } +} + +/* +*/ +inline void CMatrix4x4_x86::AimRH( const CVector3_x86 &_at, const CVector3_x86 &_up ) +{ + CVector3_x86 eye( M41, M42, M43 ); + + CVector3_x86 zaxis = eye - _at; + zaxis.NormalizeFast(); + + CVector3_x86 xaxis = _up * zaxis; + xaxis.NormalizeFast(); + + CVector3_x86 yaxis = zaxis * xaxis; + + M11 = xaxis.m_X; M12 = xaxis.m_Y; M13 = xaxis.m_Z; M14 = 0.0f; + M21 = yaxis.m_X; M22 = yaxis.m_Y; M23 = yaxis.m_Z; M24 = 0.0f; + M31 = zaxis.m_X; M32 = zaxis.m_Y; M33 = zaxis.m_Z; M34 = 0.0f; +} + +/* +*/ +inline void CMatrix4x4_x86::AimLH( const CVector3_x86 &_at, const CVector3_x86 &_up ) +{ + CVector3_x86 eye( M41, M42, M43 ); + + CVector3_x86 zaxis = _at - eye; + zaxis.NormalizeFast(); + + CVector3_x86 xaxis = _up * zaxis; + xaxis.NormalizeFast(); + + CVector3_x86 yaxis = zaxis * xaxis; + + M11 = xaxis.m_X; M12 = yaxis.m_X; M13 = zaxis.m_X; M14 = 0.0f; + M21 = xaxis.m_Y; M22 = yaxis.m_Y; M23 = zaxis.m_Y; M24 = 0.0f; + M31 = xaxis.m_Z; M32 = yaxis.m_Z; M33 = zaxis.m_Z; M34 = 0.0f; +} + +/* +*/ +inline void CMatrix4x4_x86::PerspectiveLH( const fp4 _fovY, const fp4 _aspect, const fp4 _zn, const fp4 _zf ) +{ + fp4 h = 1.0f / tanf( _fovY * 0.5f ); + fp4 w = h / _aspect; + + M11 = w; M12 = 0.0f; M13 = 0.0f; M14 = 0.0f; + M21 = 0.0f; M22 = h; M23 = 0.0f; M24 = 0.0f; + M31 = 0.0f; M32 = 0.0f; M33 = _zf / (_zf - _zn); M34 = 1.0f; + M41 = 0.0f; M42 = 0.0f; M43 = -_zn * (_zf / (_zf - _zn)); M44 = 0.0f; +} + +/* +*/ +inline void CMatrix4x4_x86::PerspectiveRH( const fp4 _fovY, const fp4 _aspect, const fp4 _zn, const fp4 _zf ) +{ + fp4 h = 1.0f / tanf( _fovY * 0.5f ); + fp4 w = h / _aspect; + + M11 = w; M12 = 0.0f; M13 = 0.0f; M14 = 0.0f; + M21 = 0.0f; M22 = h; M23 = 0.0f; M24 = 0.0f; + M31 = 0.0f; M32 = 0.0f; M33 = _zf / (_zn - _zf); M34 = -1.0f; + M41 = 0.0f; M42 = 0.0f; M43 = _zn * (_zf / (_zn - _zf)); M44 = 0.0f; +} + +/* +*/ +inline void CMatrix4x4_x86::PerspectiveOffCenterLH( const fp4 _minX, const fp4 _maxX, const fp4 _minY, const fp4 _maxY, const fp4 _zn, const fp4 _zf ) +{ + M11 = 2.0f * _zn / (_maxX - _minX); M12 = 0.0f, M13 = 0.0f; M14 = 0.0f; + M21 = 0.0f; M22 = 2.0f * _zn / (_maxY - _minY); M23 = 0.0f; M24 = 0.0f; + M31 = (_minX + _maxX) / (_minX - _maxX); M32 = (_maxY + _minY) / (_minY - _maxY); M33 = _zf / (_zf - _zn); M34 = 1.0f; + M41 = 0.0f; M42 = 0.0f; M43 = _zn * _zf / (_zn - _zf); M44 = 0.0f; +} + +/* +*/ +inline void CMatrix4x4_x86::PerspectiveOffCenterRH( const fp4 _minX, const fp4 _maxX, const fp4 _minY, const fp4 _maxY, const fp4 _zn, const fp4 _zf ) +{ + M11 = 2.0f * _zn / (_maxX - _minX); M12 = 0.0f, M13 = 0.0f; M14 = 0.0f; + M21 = 0.0f; M22 = 2.0f * _zn / (_maxY - _minY); M23 = 0.0f; M24 = 0.0f; + M31 = (_minX + _maxX) / (_maxX - _minX); M32 = (_maxY + _minY) / (_maxY - _minY); M33 = _zf / (_zn - _zf); M34 = -1.0f; + M41 = 0.0f; M42 = 0.0f; M43 = _zn * _zf / (_zn - _zf); M44 = 0.0f; +} + +/* +*/ +inline void CMatrix4x4_x86::OrthographicLH( const fp4 _w, const fp4 _h, const fp4 _zn, const fp4 _zf ) +{ + M11 = 2.0f / _w; M12 = 0.0f; M13 = 0.0f; M14 = 0.0f; + M21 = 0.0f; M22 = -2.0f / _h; M23 = 0.0f; M24 = 0.0f; + M31 = 0.0f; M32 = 0.0f; M33 = 1.0f / (_zf - _zn); M34 = 0.0f; + M41 = 0.0f; M42 = 0.0f; M43 = _zn / (_zn - _zf); M44 = 1.0f; +} + +/* +*/ +inline void CMatrix4x4_x86::OrthographicRH( const fp4 _w, const fp4 _h, const fp4 _zn, const fp4 _zf ) +{ + M11 = 2.0f / _w; M12 = 0.0f; M13 = 0.0f; M14 = 0.0f; + M21 = 0.0f; M22 = -2.0f / _h; M23 = 0.0f; M24 = 0.0f; + M31 = 0.0f; M32 = 0.0f; M33 = 1.0f / (_zn - _zf); M34 = 0.0f; + M41 = 0.0f; M42 = 0.0f; M43 = _zn / (_zn - _zf); M44 = 1.0f; +} + +/* +*/ +inline void CMatrix4x4_x86::AimRestricted( const CVector3_x86 &_to, const CVector3_x86 &_up ) +{ + CVector3_x86 from( M41, M42, M43 ); + CVector3_x86 z( from - _to ); + z.NormalizeFast(); + + CVector3_x86 y( _up ); + y.NormalizeFast(); + + CVector3_x86 x(y * z); + z = x * y; + + M11=x.m_X; M12=x.m_Y; M13=x.m_Z; M14=0.0f; + M21=y.m_X; M22=y.m_Y; M23=y.m_Z; M24=0.0f; + M31=z.m_X; M32=z.m_Y; M33=z.m_Z; M34=0.0f; +} + +/* +*/ +inline void CMatrix4x4_x86::operator *= ( const CMatrix4x4_x86 &_m1 ) +{ + for( uint32 i=0; i<4; i++ ) + { + fp4 mi0 = m_Mat[i][0]; + fp4 mi1 = m_Mat[i][1]; + fp4 mi2 = m_Mat[i][2]; + fp4 mi3 = m_Mat[i][3]; + + m_Mat[i][0] = mi0*_m1.m_Mat[0][0] + mi1*_m1.m_Mat[1][0] + mi2*_m1.m_Mat[2][0] + mi3*_m1.m_Mat[3][0]; + m_Mat[i][1] = mi0*_m1.m_Mat[0][1] + mi1*_m1.m_Mat[1][1] + mi2*_m1.m_Mat[2][1] + mi3*_m1.m_Mat[3][1]; + m_Mat[i][2] = mi0*_m1.m_Mat[0][2] + mi1*_m1.m_Mat[1][2] + mi2*_m1.m_Mat[2][2] + mi3*_m1.m_Mat[3][2]; + m_Mat[i][3] = mi0*_m1.m_Mat[0][3] + mi1*_m1.m_Mat[1][3] + mi2*_m1.m_Mat[2][3] + mi3*_m1.m_Mat[3][3]; + } +} + +/* +*/ +inline void CMatrix4x4_x86::Rotate( const CVector3_x86 &_vec, const fp4 _a ) +{ + CVector3_x86 v( _vec ); + v.NormalizeFast(); + + fp4 sa, ca; + SinCos( _a, &sa, &ca ); + + CMatrix4x4_x86 rotM; + rotM.M11 = ca + (1.0f - ca) * v.m_X * v.m_X; + rotM.M12 = (1.0f - ca) * v.m_X * v.m_Y - sa * v.m_Z; + rotM.M13 = (1.0f - ca) * v.m_Z * v.m_X + sa * v.m_Y; + rotM.M21 = (1.0f - ca) * v.m_X * v.m_Y + sa * v.m_Z; + rotM.M22 = ca + (1.0f - ca) * v.m_Y * v.m_Y; + rotM.M23 = (1.0f - ca) * v.m_Y * v.m_Z - sa * v.m_X; + rotM.M31 = (1.0f - ca) * v.m_Z * v.m_X - sa * v.m_Y; + rotM.M32 = (1.0f - ca) * v.m_Y * v.m_Z + sa * v.m_X; + rotM.M33 = ca + (1.0f - ca) * v.m_Z * v.m_Z; + + (*this) *= rotM; +} + +/* +*/ +inline void CMatrix4x4_x86::Multiply( const CVector4_x86 &_src, CVector4_x86 &_dst ) const +{ + _dst.m_X = M11*_src.m_X + M21*_src.m_Y + M31*_src.m_Z + M41*_src.m_W; + _dst.m_Y = M12*_src.m_X + M22*_src.m_Y + M32*_src.m_Z + M42*_src.m_W; + _dst.m_Z = M13*_src.m_X + M23*_src.m_Y + M33*_src.m_Z + M43*_src.m_W; + _dst.m_W = M14*_src.m_X + M24*_src.m_Y + M34*_src.m_Z + M44*_src.m_W; +} + +/* +*/ +inline void CMatrix4x4_x86::Multiply( const CVector3_x86 &_src, CVector3_x86 &_dst ) const +{ + _dst.m_X = M11*_src.m_X + M21*_src.m_Y + M31*_src.m_Z + M41; + _dst.m_Y = M12*_src.m_X + M22*_src.m_Y + M32*_src.m_Z + M42; + _dst.m_Z = M13*_src.m_X + M23*_src.m_Y + M33*_src.m_Z + M43; +} + +/* +*/ +static inline CMatrix4x4_x86 operator * ( const CMatrix4x4_x86 &_m0, const CMatrix4x4_x86 &_m1 ) +{ + CMatrix4x4_x86 m2( + + _m0.m_Mat[0][0]*_m1.m_Mat[0][0] + _m0.m_Mat[0][1]*_m1.m_Mat[1][0] + _m0.m_Mat[0][2]*_m1.m_Mat[2][0] + _m0.m_Mat[0][3]*_m1.m_Mat[3][0], + _m0.m_Mat[0][0]*_m1.m_Mat[0][1] + _m0.m_Mat[0][1]*_m1.m_Mat[1][1] + _m0.m_Mat[0][2]*_m1.m_Mat[2][1] + _m0.m_Mat[0][3]*_m1.m_Mat[3][1], + _m0.m_Mat[0][0]*_m1.m_Mat[0][2] + _m0.m_Mat[0][1]*_m1.m_Mat[1][2] + _m0.m_Mat[0][2]*_m1.m_Mat[2][2] + _m0.m_Mat[0][3]*_m1.m_Mat[3][2], + _m0.m_Mat[0][0]*_m1.m_Mat[0][3] + _m0.m_Mat[0][1]*_m1.m_Mat[1][3] + _m0.m_Mat[0][2]*_m1.m_Mat[2][3] + _m0.m_Mat[0][3]*_m1.m_Mat[3][3], + + _m0.m_Mat[1][0]*_m1.m_Mat[0][0] + _m0.m_Mat[1][1]*_m1.m_Mat[1][0] + _m0.m_Mat[1][2]*_m1.m_Mat[2][0] + _m0.m_Mat[1][3]*_m1.m_Mat[3][0], + _m0.m_Mat[1][0]*_m1.m_Mat[0][1] + _m0.m_Mat[1][1]*_m1.m_Mat[1][1] + _m0.m_Mat[1][2]*_m1.m_Mat[2][1] + _m0.m_Mat[1][3]*_m1.m_Mat[3][1], + _m0.m_Mat[1][0]*_m1.m_Mat[0][2] + _m0.m_Mat[1][1]*_m1.m_Mat[1][2] + _m0.m_Mat[1][2]*_m1.m_Mat[2][2] + _m0.m_Mat[1][3]*_m1.m_Mat[3][2], + _m0.m_Mat[1][0]*_m1.m_Mat[0][3] + _m0.m_Mat[1][1]*_m1.m_Mat[1][3] + _m0.m_Mat[1][2]*_m1.m_Mat[2][3] + _m0.m_Mat[1][3]*_m1.m_Mat[3][3], + + _m0.m_Mat[2][0]*_m1.m_Mat[0][0] + _m0.m_Mat[2][1]*_m1.m_Mat[1][0] + _m0.m_Mat[2][2]*_m1.m_Mat[2][0] + _m0.m_Mat[2][3]*_m1.m_Mat[3][0], + _m0.m_Mat[2][0]*_m1.m_Mat[0][1] + _m0.m_Mat[2][1]*_m1.m_Mat[1][1] + _m0.m_Mat[2][2]*_m1.m_Mat[2][1] + _m0.m_Mat[2][3]*_m1.m_Mat[3][1], + _m0.m_Mat[2][0]*_m1.m_Mat[0][2] + _m0.m_Mat[2][1]*_m1.m_Mat[1][2] + _m0.m_Mat[2][2]*_m1.m_Mat[2][2] + _m0.m_Mat[2][3]*_m1.m_Mat[3][2], + _m0.m_Mat[2][0]*_m1.m_Mat[0][3] + _m0.m_Mat[2][1]*_m1.m_Mat[1][3] + _m0.m_Mat[2][2]*_m1.m_Mat[2][3] + _m0.m_Mat[2][3]*_m1.m_Mat[3][3], + + _m0.m_Mat[3][0]*_m1.m_Mat[0][0] + _m0.m_Mat[3][1]*_m1.m_Mat[1][0] + _m0.m_Mat[3][2]*_m1.m_Mat[2][0] + _m0.m_Mat[3][3]*_m1.m_Mat[3][0], + _m0.m_Mat[3][0]*_m1.m_Mat[0][1] + _m0.m_Mat[3][1]*_m1.m_Mat[1][1] + _m0.m_Mat[3][2]*_m1.m_Mat[2][1] + _m0.m_Mat[3][3]*_m1.m_Mat[3][1], + _m0.m_Mat[3][0]*_m1.m_Mat[0][2] + _m0.m_Mat[3][1]*_m1.m_Mat[1][2] + _m0.m_Mat[3][2]*_m1.m_Mat[2][2] + _m0.m_Mat[3][3]*_m1.m_Mat[3][2], + _m0.m_Mat[3][0]*_m1.m_Mat[0][3] + _m0.m_Mat[3][1]*_m1.m_Mat[1][3] + _m0.m_Mat[3][2]*_m1.m_Mat[2][3] + _m0.m_Mat[3][3]*_m1.m_Mat[3][3]); + + return( m2 ); +} + +/* +*/ +static inline CVector3_x86 operator * ( const CMatrix4x4_x86 &_m, const CVector3_x86 &_v ) +{ + return( CVector3_x86( _m.M11*_v.m_X + _m.M21*_v.m_Y + _m.M31*_v.m_Z + _m.M41, + _m.M12*_v.m_X + _m.M22*_v.m_Y + _m.M32*_v.m_Z + _m.M42, + _m.M13*_v.m_X + _m.M23*_v.m_Y + _m.M33*_v.m_Z + _m.M43 ) ); +} + +/* +*/ +static inline CVector4_x86 operator * ( const CMatrix4x4_x86 &_m, const CVector4_x86 &_v ) +{ + return( CVector4_x86( _m.M11*_v.m_X + _m.M21*_v.m_Y + _m.M31*_v.m_Z + _m.M41*_v.m_W, + _m.M12*_v.m_X + _m.M22*_v.m_Y + _m.M32*_v.m_Z + _m.M42*_v.m_W, + _m.M13*_v.m_X + _m.M23*_v.m_Y + _m.M33*_v.m_Z + _m.M43*_v.m_W, + _m.M14*_v.m_X + _m.M24*_v.m_Y + _m.M34*_v.m_Z + _m.M44*_v.m_W ) ); +} + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/MatrixDefs.h electricsheep-3.0.2-git20180325/Common/Math/MatrixDefs.h --- electricsheep-2.7~b12+svn20091224/Common/Math/MatrixDefs.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/MatrixDefs.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,31 @@ +#ifndef _MATRIXDEFS_H_ +#define _MATRIXDEFS_H_ + +namespace Base +{ + +namespace Math +{ + +#define M11 m_Mat[0][0] +#define M12 m_Mat[0][1] +#define M13 m_Mat[0][2] +#define M14 m_Mat[0][3] +#define M21 m_Mat[1][0] +#define M22 m_Mat[1][1] +#define M23 m_Mat[1][2] +#define M24 m_Mat[1][3] +#define M31 m_Mat[2][0] +#define M32 m_Mat[2][1] +#define M33 m_Mat[2][2] +#define M34 m_Mat[2][3] +#define M41 m_Mat[3][0] +#define M42 m_Mat[3][1] +#define M43 m_Mat[3][2] +#define M44 m_Mat[3][3] + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Matrix.h electricsheep-3.0.2-git20180325/Common/Math/Matrix.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Matrix.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Matrix.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,37 @@ +/* + 3x3 and 4x4 matrix classes. +*/ +#ifndef _MATRIX_H_ +#define _MATRIX_H_ + +#include "base.h" +#include "MathBase.h" + +namespace Base +{ + +namespace Math +{ +/*#ifdef USE_SIMD_SSE + + #include "Matrix3x3_SSE.h" + typedef DisplayOutput::Math::CMatrix3x3_SSE CMatrix3x3; + + #include "Matrix4x4_SSE.h" + typedef DisplayOutput::Math::CMatrix4x4_SSE CMatrix4x4; + +#else*/ + + #include "Matrix3x3_x86.h" + typedef Base::Math::CMatrix3x3_x86 CMatrix3x3; + + #include "Matrix4x4_x86.h" + typedef Base::Math::CMatrix4x4_x86 CMatrix4x4; + +//#endif + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Rect.cpp electricsheep-3.0.2-git20180325/Common/Math/Rect.cpp --- electricsheep-2.7~b12+svn20091224/Common/Math/Rect.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Rect.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,65 @@ +#include +#include +#include "Rect.h" + +namespace Base +{ + +namespace Math +{ + +/* +*/ +CRect &CRect::Normalize( void ) +{ + fp4 t; + if( m_X0 > m_X1 ) + { + t = m_X0; + m_X0 = m_X1; + m_X1 = t; + } + if( m_Y0 > m_Y1 ) + { + t = m_Y0; + m_Y0 = m_Y1; + m_Y1 = t; + } + + return( *this ); +} + +/* +*/ +CRect CRect::Intersection( const CRect &_r ) const +{ + CRect x( std::max( m_X0, _r.m_X0 ), + std::max( m_Y0, _r.m_Y0 ), + std::min( m_X1, _r.m_X1 ), + std::min( m_Y1, _r.m_Y1 ) ); + + if( !x.IsNormalized() ) + x = CRect(); + + return( x ); +} + +// +CRect CRect::Union( const CRect &_r ) const +{ + CRect x( std::min( m_X0, _r.m_X0 ), + std::min( m_Y0, _r.m_Y0 ), + std::max( m_X1, _r.m_X1 ), + std::max( m_Y1, _r.m_Y1 ) ); + + if( !x.IsNormalized() ) + x = CRect(); + + return( x ); +} + + + +}; + +}; diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Rect.h electricsheep-3.0.2-git20180325/Common/Math/Rect.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Rect.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Rect.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,171 @@ +#ifndef _RECT_H +#define _RECT_H + +#include "base.h" +#include "Vector2.h" + +namespace Base +{ +namespace Math +{ + +/* + CRect. + +*/ +class CRect +{ + public: + CRect(); + CRect( const CRect& r ); + CRect( fp4 _w, fp4 _h ); + CRect( fp4 _x0, fp4 _y0, fp4 _x1, fp4 _y1 ); + CRect( const CVector2 &_a, const CVector2 &_b ); + + // 'IsNull' is not very clear, should be 'IsInvalid' or 'IsSingularity' or something like that. + bool IsNull() const; + + // + fp4 Width() const; + fp4 Height() const; + + // Force integer. + int32 iWidth() const; + int32 iHeight() const; + + // + fp4 Aspect( void ) const; + fp4 Area( void ) const; + uint32 iArea( void ) const; + + // + bool IsNormalized() const; + CRect &Normalize(); + + // Boolean things. + CRect Intersection( const CRect &_r ) const; + CRect Union( const CRect &_r ) const; + bool Surrounds( const CRect &_r ) const; + bool Inside( const CVector2 &_p ) const; + + // + fp4 m_X0, m_Y0; + fp4 m_X1, m_Y1; +}; + + +/* +*/ +inline CRect::CRect() : m_X0( 0.0f ), m_Y0( 0.0f ), m_X1( 0.0f ), m_Y1( 0.0f ) +{ +} + +/* +*/ +inline CRect::CRect( const CRect &_r ) : m_X0( _r.m_X0 ), m_Y0( _r.m_Y0 ), m_X1( _r.m_X1 ), m_Y1( _r.m_Y1 ) +{ +} + +/* +*/ +inline CRect::CRect( fp4 _w, fp4 _h ) : m_X0(0), m_Y0(0), m_X1(_w), m_Y1(_h) +{ +} + +/* +*/ +inline CRect::CRect( fp4 _x0, fp4 _y0, fp4 _x1, fp4 _y1 ) : m_X0(_x0), m_Y0(_y0), m_X1(_x1), m_Y1(_y1) +{ +} + +/* +*/ +inline CRect::CRect( const CVector2 &_a, const CVector2 &_b ) : m_X0( _a.m_X ), m_Y0( _a.m_Y ), m_X1( _b.m_X ), m_Y1( _b.m_Y ) +{ +} + +/* +*/ +inline bool CRect::IsNull() const +{ + return( Width() == 0.0f && Height() == 0.0f ); +} + +/* +*/ +inline fp4 CRect::Width() const +{ + return( m_X1 - m_X0 ); +} + +/* +*/ +inline fp4 CRect::Height() const +{ + return( m_Y1 - m_Y0 ); +} + +/* +*/ +inline int32 CRect::iWidth() const +{ + return( (int32)Width() ); +} + +/* +*/ +inline int32 CRect::iHeight() const +{ + return( (int32)Height() ); +} + +/* +*/ +inline bool CRect::IsNormalized() const +{ + return( (Width() >= 0.0f) && (Height() >= 0.0f) ); +} + +/* +*/ +inline bool CRect::Surrounds( const CRect &_r ) const +{ + return( (m_X0 < _r.m_X0) && (m_Y0 < _r.m_Y0) && (m_X1 > _r.m_X1) && (m_Y1 > _r.m_Y1) ); +} + +/* +*/ +inline bool CRect::Inside( const CVector2 &_p ) const +{ + if( (_p.m_X < m_X0) || (_p.m_X > m_X1) ) return( false ); + if( (_p.m_Y < m_Y0) || (_p.m_Y > m_Y1) ) return( false ); + + return( true ); +} + +/* +*/ +inline fp4 CRect::Aspect( void ) const +{ + return( Height() / Width() ); +} + +/* +*/ +inline fp4 CRect::Area( void ) const +{ + return( Width() * Height() ); +} + +/* +*/ +inline uint32 CRect::iArea( void ) const +{ + return uint32( iWidth() * iHeight() ); +} + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Vector2.h electricsheep-3.0.2-git20180325/Common/Math/Vector2.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Vector2.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Vector2.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,27 @@ +/* + 2 component vector class. +*/ +#ifndef _VECTOR2_H +#define _VECTOR2_H + +#include "base.h" +#include "MathBase.h" + +namespace Base +{ + +namespace Math +{ +/*#ifdef USE_SIMD_SSE + #include "Vector2_SSE.h" + typedef Base::Math::CVector2_SSE CVector2; +#else*/ + #include "Vector2_X86.h" + typedef Base::Math::CVector2_x86 CVector2; +//#endif + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Vector2_X86.h electricsheep-3.0.2-git20180325/Common/Math/Vector2_X86.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Vector2_X86.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Vector2_X86.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,236 @@ +/* + 2 component vector class. + NOTE. Will be typedefed and included from vector2.h. +*/ +#ifndef _VECTOR2_X86_H +#define _VECTOR2_X86_H + +namespace Base +{ + +namespace Math +{ + +/* + CVector2_x86. + +*/ +class CVector2_x86 +{ + public: + CVector2_x86(); + CVector2_x86( const float _x, const float _y ); + CVector2_x86( const CVector2_x86 &_vec); + CVector2_x86( const fp4 *_p ); + + // + void Set( const fp4 _x, const fp4 _y ); + void Set( const CVector2_x86 &_vec ); + void Set( const fp4 *_p ); + + // + fp4 Len() const; + fp4 RLen() const; + fp4 RLenFast() const; + fp4 LenSqr() const; + + // + void Normalize(); + void NormalizeFast(); + + // + void operator += ( const CVector2_x86 &_v0 ); + void operator -= ( const CVector2_x86 &_v0 ); + void operator *= ( const fp4 _s ); + void operator /= ( const fp4 _s ); + + // + bool IsEqual( const CVector2_x86 &_v, const fp4 _tol ) const; + int32 Compare( const CVector2_x86 &_v, const fp4 _tol ) const; // -1, 0, +1 + + // + fp4 m_X, m_Y; +}; + +/* +*/ +inline CVector2_x86::CVector2_x86() : m_X( 0.0f ), m_Y( 0.0f ) +{ +} + +/* +*/ +inline CVector2_x86::CVector2_x86( const fp4 _x, const fp4 _y ) : m_X(_x), m_Y(_y) +{ +} + +/* +*/ +inline CVector2_x86::CVector2_x86( const CVector2_x86 &_vec) : m_X( _vec.m_X ), m_Y( _vec.m_Y ) +{ +} + +/* +*/ +inline CVector2_x86::CVector2_x86( const fp4 *_p ) : m_X( _p[0] ), m_Y( _p[1] ) +{ +} + +/* +*/ +inline void CVector2_x86::Set( const fp4 _x, const fp4 _y ) +{ + m_X = _x; + m_Y = _y; +} + +/* +*/ +inline void CVector2_x86::Set( const CVector2_x86 &_v ) +{ + m_X = _v.m_X; + m_Y = _v.m_Y; +} + +/* +*/ +inline void CVector2_x86::Set( const fp4 *_p ) +{ + m_X = _p[0]; + m_Y = _p[1]; +} + +/* +*/ +inline fp4 CVector2_x86::Len( void ) const +{ + return( (fp4)Sqrt( m_X * m_X + m_Y * m_Y ) ); +} + +/* +*/ +inline fp4 CVector2_x86::LenSqr( void ) const +{ + return( m_X * m_X + m_Y * m_Y ); +} + +/* +*/ +inline fp4 CVector2_x86::RLen( void ) const +{ + return( (fp4)RSqrt( m_X * m_X + m_Y * m_Y ) ); +} + +/* +*/ +inline fp4 CVector2_x86::RLenFast( void ) const +{ + return( (fp4)RSqrtFast( m_X * m_X + m_Y * m_Y ) ); +} + +/* + Normalize(). + POTENTIAL BUG. +*/ +inline void CVector2_x86::Normalize( void ) +{ + fp4 l = RLen(); + m_X *= l; + m_Y *= l; +} + +/* + NormalizeFast(). + POTENTIAL BUG. +*/ +inline void CVector2_x86::NormalizeFast( void ) +{ + fp4 l = RLenFast(); + m_X *= l; + m_Y *= l; +} + +/* +*/ +inline void CVector2_x86::operator += ( const CVector2_x86 &_v0 ) +{ + m_X += _v0.m_X; + m_Y += _v0.m_Y; +} + +/* +*/ +inline void CVector2_x86::operator -= ( const CVector2_x86 &_v0 ) +{ + m_X -= _v0.m_X; + m_Y -= _v0.m_Y; +} + +/* +*/ +inline void CVector2_x86::operator *= ( const fp4 _s ) +{ + m_X *= _s; + m_Y *= _s; +} + +/* +*/ +inline void CVector2_x86::operator /= ( const fp4 _s ) +{ + fp4 oS = 1.0f / _s; + m_X *= oS; + m_Y *= oS; +} + +/* +*/ +inline bool CVector2_x86::IsEqual( const CVector2_x86 &_v, const fp4 _tol ) const +{ + if( fabsf( _v.m_X - m_X ) > _tol ) return( false ); + else if( fabsf( _v.m_Y - m_Y ) > _tol ) return( false ); + return( true ); +} + +/* +*/ +inline int32 CVector2_x86::Compare(const CVector2_x86 &_v, const fp4 _tol ) const +{ + if( fabsf( _v.m_X - m_X ) > _tol ) return( (_v.m_X > m_X ) ? +1 : -1 ); + else if( fabsf( _v.m_Y - m_X ) > _tol ) return( (_v.m_Y > m_Y ) ? +1 : -1 ); + else return( 0 ); +} + +/* +*/ +static inline CVector2_x86 operator + ( const CVector2_x86 &_v0, const CVector2_x86 &_v1 ) +{ + return( CVector2_x86( _v0.m_X + _v1.m_X, _v0.m_Y + _v1.m_Y ) ); +} + +/* +*/ +static inline CVector2_x86 operator - ( const CVector2_x86 &_v0, const CVector2_x86 &_v1 ) +{ + return( CVector2_x86( _v0.m_X - _v1.m_X, _v0.m_Y - _v1.m_Y ) ); +} + +/* +*/ +static inline CVector2_x86 operator * ( const CVector2_x86 &_v0, const fp4 _s ) +{ + return( CVector2_x86( _v0.m_X * _s, _v0.m_Y * _s ) ); +} + +/* +*/ +static inline CVector2_x86 operator - ( const CVector2_x86 &_v ) +{ + return( CVector2_x86( -_v.m_X, -_v.m_Y ) ); +} + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Vector3.h electricsheep-3.0.2-git20180325/Common/Math/Vector3.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Vector3.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Vector3.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,27 @@ +/* + 3 component vector class. +*/ +#ifndef _VECTOR3_H +#define _VECTOR3_H + +#include "base.h" +#include "MathBase.h" + +namespace Base +{ + +namespace Math +{ +/*#ifdef USE_SIMD_SSE + #include "Vector3_SSE.h" + typedef Base::Math::CVector3_SSE CVector3; +#else*/ + #include "Vector3_X86.h" + typedef Base::Math::CVector3_x86 CVector3; +//#endif + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Vector3_X86.h electricsheep-3.0.2-git20180325/Common/Math/Vector3_X86.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Vector3_X86.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Vector3_X86.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,383 @@ +/* + 3 component vector class. + NOTE. Will be typedefed and included from vector3.h. +*/ +#ifndef _VECTOR3_X86_H +#define _VECTOR3_X86_H + +namespace Base +{ + +namespace Math +{ + +/* + CVector3_x86(). + +*/ +class CVector3_x86 +{ + public: + CVector3_x86(); + CVector3_x86( const fp4 _x, const fp4 _y, const fp4 _z ); + CVector3_x86( const CVector3_x86 &_vec ); + + // + void Set( const fp4 _x, const fp4 _y, const fp4 _z ); + void Set( const CVector3_x86 &_vec ); + + // + fp4 Len() const; + fp4 RLen() const; + fp4 RLenFast() const; + fp4 LenSqr() const; + + // + void Normalize(); + void NormalizeFast(); + + // + void operator += ( const CVector3_x86 &_v0 ); + void operator -= ( const CVector3_x86 &_v0 ); + void operator *= ( fp4 _s ); + + // + bool operator > ( const CVector3_x86 &_rhs ); + bool operator < ( const CVector3_x86 &_rhs ); + + // + fp4 &operator () ( const uint32 _i ); + fp4 operator () ( const uint32 _i ) const; + + // + bool IsEqual( const CVector3_x86 &_v, const fp4 _tol ) const; + int32 Compare( const CVector3_x86 &_v, const fp4 _tol ) const; // -1, 0, +1. + + // + void Rotate( const CVector3_x86 &_axis, const fp4 _angle ); + void Lerp( const CVector3_x86 &_v0, const fp4 _delta ); + + // Returns a vector orthogonal to self, not normalized. + CVector3_x86 FindOrtho( void ) const; + + // + void Saturate( void ); + fp4 Dot( const CVector3_x86 &_v0 ) const; + static fp4 Distance( const CVector3_x86 &_v0, const CVector3_x86 &_v1 ); + + // + fp4 m_X; + fp4 m_Y; + fp4 m_Z; +}; + +/* +*/ +inline CVector3_x86::CVector3_x86() : m_X( 0.0f ), m_Y( 0.0f ), m_Z( 0.0f ) +{ +} + +/* +*/ +inline CVector3_x86::CVector3_x86( const fp4 _x, const fp4 _y, const fp4 _z) : m_X(_x), m_Y(_y), m_Z(_z) +{ +} + +/* +*/ +inline CVector3_x86::CVector3_x86( const CVector3_x86 &_vec ) : m_X( _vec.m_X ), m_Y( _vec.m_Y ), m_Z( _vec.m_Z ) +{ +} + +/* +*/ +inline void CVector3_x86::Set( const fp4 _x, const fp4 _y, const fp4 _z ) +{ + m_X = _x; + m_Y = _y; + m_Z = _z; +} + +/* +*/ +inline void CVector3_x86::Set( const CVector3_x86 &_vec ) +{ + m_X = _vec.m_X; + m_Y = _vec.m_Y; + m_Z = _vec.m_Z; +} + +/* +*/ +inline fp4 CVector3_x86::Len( void ) const +{ + return( Sqrt( m_X * m_X + m_Y * m_Y + m_Z * m_Z) ); +} + +/* +*/ +inline fp4 CVector3_x86::RLen( void ) const +{ + return( RSqrt( m_X * m_X + m_Y * m_Y + m_Z * m_Z) ); +} + +/* +*/ +inline fp4 CVector3_x86::RLenFast( void ) const +{ + return( RSqrtFast( m_X * m_X + m_Y * m_Y + m_Z * m_Z) ); +} + +/* +*/ +inline fp4 CVector3_x86::LenSqr( void ) const +{ + return( m_X * m_X + m_Y * m_Y + m_Z * m_Z ); +} + +/* + Normalize(). + POTENTIAL BUG. +*/ +inline void CVector3_x86::Normalize( void ) +{ + fp4 l = RLen(); + m_X *= l; + m_Y *= l; + m_Z *= l; +} + +/* + NormalizeFast(). + POTENTIAL BUG. +*/ +inline void CVector3_x86::NormalizeFast( void ) +{ + fp4 l = RLenFast(); + m_X *= l; + m_Y *= l; + m_Z *= l; +} + +/* +*/ +inline void CVector3_x86::operator += ( const CVector3_x86 &_v0 ) +{ + m_X += _v0.m_X; + m_Y += _v0.m_Y; + m_Z += _v0.m_Z; +} + +/* +*/ +inline void CVector3_x86::operator -= ( const CVector3_x86 &_v0 ) +{ + m_X -= _v0.m_X; + m_Y -= _v0.m_Y; + m_Z -= _v0.m_Z; +} + +/* +*/ +inline void CVector3_x86::operator *= ( fp4 _s ) +{ + m_X *= _s; + m_Y *= _s; + m_Z *= _s; +} + +/* +*/ +inline bool CVector3_x86::IsEqual( const CVector3_x86 &_v, const fp4 _tol ) const +{ + if( fabsf( _v.m_X - m_X) > _tol ) return( false ); + else if( fabsf( _v.m_Y - m_Y) > _tol ) return( false ); + else if( fabsf( _v.m_Z - m_Z) > _tol ) return( false ); + + return( true ); +} + +/* +*/ +inline int32 CVector3_x86::Compare( const CVector3_x86 &_v, const fp4 _tol ) const +{ + if( fabsf( _v.m_X - m_X ) > _tol ) return( (_v.m_X > m_X) ? +1 : -1 ); + else if( fabsf( _v.m_Y - m_Y ) > _tol ) return( (_v.m_Y > m_Y) ? +1 : -1 ); + else if( fabsf( _v.m_Z - m_Z ) > _tol ) return( (_v.m_Z > m_Z) ? +1 : -1 ); + else return( 0 ); +} + +/* +*/ +inline void CVector3_x86::Rotate( const CVector3_x86 &_axis, const fp4 _angle ) +{ + fp4 rotM[9]; + fp4 sa, ca; + + SinCos( _angle, &sa, &ca ); + + // Build a rotation matrix. + rotM[0] = ca + (1 - ca) * _axis.m_X * _axis.m_X; + rotM[1] = (1 - ca) * _axis.m_X * _axis.m_Y - sa * _axis.m_Z; + rotM[2] = (1 - ca) * _axis.m_Z * _axis.m_X + sa * _axis.m_Y; + rotM[3] = (1 - ca) * _axis.m_X * _axis.m_Y + sa * _axis.m_Z; + rotM[4] = ca + (1 - ca) * _axis.m_Y * _axis.m_Y; + rotM[5] = (1 - ca) * _axis.m_Y * _axis.m_Z - sa * _axis.m_X; + rotM[6] = (1 - ca) * _axis.m_Z * _axis.m_X - sa * _axis.m_Y; + rotM[7] = (1 - ca) * _axis.m_Y * _axis.m_Z + sa * _axis.m_X; + rotM[8] = ca + (1 - ca) * _axis.m_Z * _axis.m_Z; + + // Handmade multiplication. + CVector3_x86 help( rotM[0] * m_X + rotM[1] * m_Y + rotM[2] * m_Z, + rotM[3] * m_X + rotM[4] * m_Y + rotM[5] * m_Z, + rotM[6] * m_X + rotM[7] * m_Y + rotM[8] * m_Z ); + + *this = help; +} + +/* +*/ +static inline CVector3_x86 operator + ( const CVector3_x86 &_v0, const CVector3_x86 &_v1 ) +{ + return( CVector3_x86( _v0.m_X + _v1.m_X, _v0.m_Y + _v1.m_Y, _v0.m_Z + _v1.m_Z ) ); +} + +/* +*/ +static inline CVector3_x86 operator - ( const CVector3_x86 &_v0, const CVector3_x86 &_v1 ) +{ + return( CVector3_x86( _v0.m_X - _v1.m_X, _v0.m_Y - _v1.m_Y, _v0.m_Z - _v1.m_Z ) ); +} + +/* +*/ +static inline CVector3_x86 operator * ( const CVector3_x86 &_v0, const fp4 _s ) +{ + return( CVector3_x86( _v0.m_X * _s, _v0.m_Y * _s, _v0.m_Z * _s) ); +} + +/* +*/ +static inline CVector3_x86 operator - ( const CVector3_x86 &_v ) +{ + return( CVector3_x86( -_v.m_X, -_v.m_Y, -_v.m_Z ) ); +} + +/* +*/ +static inline CVector3_x86 operator / ( const CVector3_x86 &_v0, const fp4 _s ) +{ + const fp4 rs = 1.0f / _s; + return( CVector3_x86( _v0.m_X*rs, _v0.m_Y*rs, _v0.m_Z*rs) ); +} + +/* + Dot product. +*/ +static inline fp4 operator % ( const CVector3_x86 &_v0, const CVector3_x86 &_v1 ) +{ + return( _v0.m_X * _v1.m_X + _v0.m_Y * _v1.m_Y + _v0.m_Z * _v1.m_Z ); +} + +/* + Cross product. +*/ +static inline CVector3_x86 operator * ( const CVector3_x86 &_v0, const CVector3_x86 &_v1 ) +{ + return( CVector3_x86( _v0.m_Y * _v1.m_Z - _v0.m_Z * _v1.m_Y, + _v0.m_Z * _v1.m_X - _v0.m_X * _v1.m_Z, + _v0.m_X * _v1.m_Y - _v0.m_Y * _v1.m_X ) ); +} + +/* +*/ +inline void CVector3_x86::Lerp( const CVector3_x86 &_v0, const fp4 _delta ) +{ + m_X = _v0.m_X + ((m_X - _v0.m_X) * _delta ); + m_Y = _v0.m_Y + ((m_Y - _v0.m_Y) * _delta ); + m_Z = _v0.m_Z + ((m_Z - _v0.m_Z) * _delta ); +} + +/* +*/ +inline void CVector3_x86::Saturate( void ) +{ + m_X = Clamped( m_X, 0.0f, 1.0f ); + m_Y = Clamped( m_Y, 0.0f, 1.0f ); + m_Z = Clamped( m_Z, 0.0f, 1.0f ); +} + +/* + Find a vector that is orthogonal to self. Self should not be (0,0,0). + Return value is not normalized. +*/ +inline CVector3_x86 CVector3_x86::FindOrtho( void ) const +{ + if( m_X != 0.0f ) + { + return( CVector3_x86( (-m_Y - m_Z) / m_X, 1.0f, 1.0f ) ); + } + else if( m_Y != 0.0f ) + { + return( CVector3_x86( 1.0f, (-m_X - m_Z) / m_Y, 1.0f ) ); + } + else if( m_Z != 0.0f ) + { + return( CVector3_x86( 1.0f, 1.0f, (-m_X - m_Y) / m_Z ) ); + } + else + return( CVector3_x86( 0.0f, 0.0f, 0.0f ) ); +} + +/* + Dot product. +*/ +inline fp4 CVector3_x86::Dot( const CVector3_x86 &_v0 ) const +{ + return( m_X * _v0.m_X + m_Y * _v0.m_Y + m_Z * _v0.m_Z ); +} + +/* +*/ +inline bool CVector3_x86::operator > ( const CVector3_x86 &_rhs ) +{ + if( (m_X > _rhs.m_X) || (m_Y > _rhs.m_Y) || (m_Z > _rhs.m_Z) ) + return( true ); + else + return( false ); +} + +/* +*/ +inline bool CVector3_x86::operator < ( const CVector3_x86 &_rhs ) +{ + if( (m_X < _rhs.m_X) || (m_Y < _rhs.m_Y) || (m_Z < _rhs.m_Z) ) + return( true ); + else + return( false ); +} + +// +inline fp4 &CVector3_x86::operator () ( const uint32 _i ) +{ + return ((fp4 *)this)[_i]; +} + +// +inline fp4 CVector3_x86::operator () ( const uint32 _i ) const +{ + return ((const fp4 *)this)[_i]; +} + +/* +*/ +inline fp4 CVector3_x86::Distance( const CVector3_x86 &_v0, const CVector3_x86 &_v1 ) +{ + CVector3_x86 v( _v1 - _v0 ); + return( Sqrt( v.m_X * v.m_X + v.m_Y * v.m_Y + v.m_Z * v.m_Z) ); +} + +}; +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Vector4.h electricsheep-3.0.2-git20180325/Common/Math/Vector4.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Vector4.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Vector4.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,24 @@ +#ifndef _VECTOR4_H +#define _VECTOR4_H + +#include "base.h" +#include "MathBase.h" +#include + +namespace Base +{ + +namespace Math +{ +/*#ifdef USE_SIMD_SSE + #include "Vector4_SSE.h" + typedef Base::Math::CVector4_SSE CVector4; +#else*/ + #include "Vector4_X86.h" + typedef Base::Math::CVector4_x86 CVector4; +//#endif +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Math/Vector4_X86.h electricsheep-3.0.2-git20180325/Common/Math/Vector4_X86.h --- electricsheep-2.7~b12+svn20091224/Common/Math/Vector4_X86.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Math/Vector4_X86.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,400 @@ +/* + 4 component vector class. + NOTE. Will be typedefed and included from vector4.h. +*/ +#ifndef _VECTOR4_X86_H +#define _VECTOR4_X86_H + +#include "Vector3_X86.h" + +namespace Base +{ + +namespace Math +{ + +/* + CVector4_x86(). + +*/ +class CVector4_x86 +{ + public: + CVector4_x86(); + CVector4_x86( const fp4 _x, const fp4 _y, const fp4 _z, const fp4 _w = 0.0f ); + CVector4_x86( const CVector4_x86 &_vec ); + CVector4_x86( const CVector3_x86 &_vec3 ); // .m_W = 1.0f. + + // + void Set( const fp4 _x, const fp4 _y, const fp4 _z, const fp4 _w ); + void Set( const CVector4_x86 &_v ); + void Set( const CVector3_x86 &_v ); // .m_W = 1.0f. + + // + fp4 Len() const; + fp4 LenSqr() const; + fp4 RLen() const; + fp4 RLenFast() const; + + // + void Normalize(); + void NormalizeFast(); + void OneOver(); + + CVector4_x86 GetOneOver(); + + // + void operator += ( const CVector4_x86 &_v ); + void operator -= ( const CVector4_x86 &_v ); + void operator *= ( const fp4 _s ); + + // + bool operator > ( const CVector4_x86 &_rhs ); + bool operator < ( const CVector4_x86 &_rhs ); + + // + CVector4_x86 &operator = ( const CVector3_x86 &_v ); // .m_W = 1.0f. + + // + fp4 &operator () ( const uint32 _i ); + fp4 operator () ( const uint32 _i ) const; + + // + bool IsEqual( const CVector4_x86 &_v, const fp4 _tol ) const; + int32 Compare( const CVector4_x86 &_v, const fp4 _tol ) const; // -1, 0, +1. + + // + void Minimum( const CVector4_x86 &_v ); + void Maximum( const CVector4_x86 &_v ); + + // + void Lerp( const CVector4_x86 &_v0, const fp4 _delta ); + void Saturate(); + + // + fp4 Dot( const CVector4_x86 &_v0 ) const; + + // + fp4 m_X; + fp4 m_Y; + fp4 m_Z; + fp4 m_W; +}; + +/* +*/ +inline CVector4_x86::CVector4_x86() : m_X(0.0f), m_Y(0.0f), m_Z(0.0f), m_W(0.0f) +{ +} + +/* +*/ +inline CVector4_x86::CVector4_x86( const fp4 _x, const fp4 _y, const fp4 _z, const fp4 _w ) : m_X(_x), m_Y(_y), m_Z(_z), m_W(_w) +{ +} + +/* +*/ +inline CVector4_x86::CVector4_x86( const CVector4_x86 &_v ) : m_X(_v.m_X), m_Y(_v.m_Y), m_Z(_v.m_Z), m_W(_v.m_W) +{ +} + +/* +*/ +inline CVector4_x86::CVector4_x86( const CVector3_x86 &_v) : m_X(_v.m_X), m_Y(_v.m_Y), m_Z(_v.m_Z), m_W(0.0f) +{ +} + +/* +*/ +inline void CVector4_x86::Set( const fp4 _x, const fp4 _y, const fp4 _z, const fp4 _w ) +{ + m_X = _x; + m_Y = _y; + m_Z = _z; + m_W = _w; +} + +/* +*/ +inline void CVector4_x86::Set( const CVector4_x86 &_v ) +{ + m_X = _v.m_X; + m_Y = _v.m_Y; + m_Z = _v.m_Z; + m_W = _v.m_W; +} + +/* +*/ +inline void CVector4_x86::Set( const CVector3_x86 &_v ) +{ + m_X = _v.m_X; + m_Y = _v.m_Y; + m_Z = _v.m_Z; + m_W = 0.0f; +} + +/* +*/ +inline fp4 CVector4_x86::Len( void ) const +{ + return( Sqrt( m_X * m_X + m_Y * m_Y + m_Z * m_Z + m_W * m_W ) ); +} + +/* +*/ +inline fp4 CVector4_x86::LenSqr( void ) const +{ + return( m_X * m_X + m_Y * m_Y + m_Z * m_Z + m_W * m_W ); +} + +/* +*/ +inline fp4 CVector4_x86::RLen( void ) const +{ + return( RSqrt( m_X * m_X + m_Y * m_Y + m_Z * m_Z + m_W * m_W ) ); +} + + +/* +*/ +inline fp4 CVector4_x86::RLenFast( void ) const +{ + return( RSqrtFast( m_X * m_X + m_Y * m_Y + m_Z * m_Z + m_W * m_W ) ); +} + +/* + Normalize(). + POTENTIAL BUG. +*/ +inline void CVector4_x86::Normalize( void ) +{ + fp4 l = RLen(); + m_X *= l; + m_Y *= l; + m_Z *= l; + m_W *= l; +} + + +/* + NormalizeFase(). + POTENTIAL BUG. +*/ +inline void CVector4_x86::NormalizeFast( void ) +{ + fp4 l = RLenFast(); + m_X *= l; + m_Y *= l; + m_Z *= l; + m_W *= l; +} + +inline CVector4_x86 CVector4_x86::GetOneOver() +{ + return CVector4_x86(1.0f/m_X, 1.0f/m_Y, 1.0f/m_Z); +} + +inline void CVector4_x86::OneOver() +{ + m_X=1.0f/m_X; + m_Y=1.0f/m_Y; + m_Z=1.0f/m_Z; +} + +/* +*/ +inline void CVector4_x86::operator += ( const CVector4_x86 &_v ) +{ + m_X += _v.m_X; + m_Y += _v.m_Y; + m_Z += _v.m_Z; + m_W += _v.m_W; +} + +/* +*/ +inline void CVector4_x86::operator -= ( const CVector4_x86 &_v ) +{ + m_X -= _v.m_X; + m_Y -= _v.m_Y; + m_Z -= _v.m_Z; + m_W -= _v.m_W; +} + +/* +*/ +inline void CVector4_x86::operator *= ( const fp4 _s ) +{ + m_X *= _s; + m_Y *= _s; + m_Z *= _s; + m_W *= _s; +} + +/* +*/ +inline CVector4_x86 &CVector4_x86::operator = ( const CVector3_x86 &_v ) +{ + Set( _v ); + return( *this ); +} + +/* +*/ +inline bool CVector4_x86::IsEqual( const CVector4_x86 &_v, const fp4 _tol ) const +{ + if( fabsf( _v.m_X - m_X) > _tol ) return( false ); + else if( fabsf( _v.m_Y - m_Y) > _tol ) return( false ); + else if( fabsf( _v.m_Z - m_Z) > _tol ) return( false ); + else if( fabsf( _v.m_W - m_W) > _tol ) return( false ); + return true; +} + +/* +*/ +inline int32 CVector4_x86::Compare( const CVector4_x86 &_v, const fp4 _tol ) const +{ + if( fabsf( _v.m_X - m_X ) > _tol ) return( (_v.m_X > m_X) ? +1 : -1 ); + else if( fabsf( _v.m_Y - m_Y ) > _tol ) return( (_v.m_Y > m_Y) ? +1 : -1 ); + else if( fabsf( _v.m_Z - m_Z ) > _tol ) return( (_v.m_Z > m_Z) ? +1 : -1 ); + else if( fabsf( _v.m_W - m_W ) > _tol ) return( (_v.m_W > m_W) ? +1 : -1 ); + else return( 0 ); +} + +/* +*/ +inline bool CVector4_x86::operator > ( const CVector4_x86 &_rhs ) +{ + if( (m_X > _rhs.m_X) || (m_Y > _rhs.m_Y) || (m_Z > _rhs.m_Z) || (m_W > _rhs.m_W) ) + return( true ); + else + return( false ); +} + +/* +*/ +inline bool CVector4_x86::operator < ( const CVector4_x86 &_rhs ) +{ + if( (m_X < _rhs.m_X) || (m_Y < _rhs.m_Y) || (m_Z < _rhs.m_Z) || (m_W < _rhs.m_W) ) + return( true ); + else + return( false ); +} + + +/* +*/ +static inline CVector4_x86 operator + ( const CVector4_x86 &_v0, const CVector4_x86 &_v1 ) +{ + return( CVector4_x86( _v0.m_X + _v1.m_X, _v0.m_Y + _v1.m_Y, _v0.m_Z + _v1.m_Z, _v0.m_W + _v1.m_W ) ); +} + +/* +*/ +static inline CVector4_x86 operator - ( const CVector4_x86 &_v0, const CVector4_x86 &_v1 ) +{ + return( CVector4_x86( _v0.m_X - _v1.m_X, _v0.m_Y - _v1.m_Y, _v0.m_Z - _v1.m_Z, _v0.m_W - _v1.m_W ) ); +} + +/* +*/ +static inline CVector4_x86 operator * ( const CVector4_x86 &_v0, const fp4 &_s ) +{ + return( CVector4_x86( _v0.m_X * _s, _v0.m_Y * _s, _v0.m_Z * _s, _v0.m_W * _s ) ); +} + +/* + Dot product. +*/ +static inline fp4 operator % ( const CVector4_x86 &_v0, const CVector4_x86 &_v1 ) +{ + return( _v0.m_X * _v1.m_X + _v0.m_Y * _v1.m_Y + _v0.m_Z * _v1.m_Z + _v0.m_W * _v1.m_W ); +} + + +/* + Cross product. + +*/ +static inline CVector4_x86 operator * ( const CVector4_x86 &_v0, const CVector4_x86 &_v1 ) +{ + return( CVector4_x86( _v0.m_Y * _v1.m_Z - _v0.m_Z * _v1.m_Y, + _v0.m_Z * _v1.m_X - _v0.m_X * _v1.m_Z, + _v0.m_X * _v1.m_Y - _v0.m_Y * _v1.m_X ) ); +} + + + +/* +*/ +static inline CVector4_x86 operator - ( const CVector4_x86 &_v ) +{ + return( CVector4_x86( -_v.m_X, -_v.m_Y, -_v.m_Z, -_v.m_W ) ); +} + +// +inline fp4 &CVector4_x86::operator () ( const uint32 _i ) +{ + return ((fp4 *)this)[_i]; +} + +// +inline fp4 CVector4_x86::operator () ( const uint32 _i ) const +{ + return ((const fp4 *)this)[_i]; +} + + +/* +*/ +inline void CVector4_x86::Lerp( const CVector4_x86 &_v0, const fp4 _delta ) +{ + m_X = _v0.m_X + ( (m_X - _v0.m_X) * _delta ); + m_Y = _v0.m_Y + ( (m_Y - _v0.m_Y) * _delta ); + m_Z = _v0.m_Z + ( (m_Z - _v0.m_Z) * _delta ); + m_W = _v0.m_W + ( (m_W - _v0.m_W) * _delta ); +} + +/* +*/ +inline void CVector4_x86::Saturate( void ) +{ + m_X = Clamped( m_X, 0.0f, 1.0f ); + m_Y = Clamped( m_Y, 0.0f, 1.0f ); + m_Z = Clamped( m_Z, 0.0f, 1.0f ); + m_W = Clamped( m_W, 0.0f, 1.0f ); +} + + +/* + Dot. + +*/ +inline fp4 CVector4_x86::Dot( const CVector4_x86 &_v0 ) const +{ + return( m_X * _v0.m_X + m_Y * _v0.m_Y + m_Z * _v0.m_Z + m_W * _v0.m_W ); +} + +inline void CVector4_x86::Minimum( const CVector4_x86 &_v ) +{ + m_X=std::min(m_X, _v.m_X); + m_Y=std::min(m_Y, _v.m_Y); + m_Z=std::min(m_Z, _v.m_Z); + m_W=std::min(m_W, _v.m_W); +} + +inline void CVector4_x86::Maximum( const CVector4_x86 &_v ) +{ + m_X=std::max(m_X, _v.m_X); + m_Y=std::max(m_Y, _v.m_Y); + m_Z=std::max(m_Z, _v.m_Z); + m_W=std::max(m_W, _v.m_W); +} + + +}; +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/MathBase.h electricsheep-3.0.2-git20180325/Common/MathBase.h --- electricsheep-2.7~b12+svn20091224/Common/MathBase.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/MathBase.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,270 @@ +#ifndef _MATHBASE_H_ +#define _MATHBASE_H_ + +#include + +namespace Base +{ + +namespace Math +{ + +#ifndef INFINITY + #define INFINITY 3.402823466e+38F +#endif + +#ifndef M_E + #define M_E 2.71828182845904523536f +#endif + +#ifndef M_PI + #define M_PI 3.14159265358979323846f +#endif + +#ifndef M_PI05 + #define M_PI05 (M_PI * 0.5f) +#endif + +#ifndef M_PI2 + #define M_PI2 (M_PI * 2.0f) +#endif + +#ifndef M_SQR + #define M_SQR(_a) ( (_a)*(_a) ) +#endif + +#ifndef M_GOLDENRATIO // Fibonnaci sequence. + #define M_GOLDENRATIO 1.61803398874989484820458683436563811772f +#endif + +#ifndef EPSILON + #define EPSILON 0.000001f +#endif + +#ifndef Random + #define Random (((float)rand())/((float)RAND_MAX)) +#endif + +#ifndef M_PI05 + #define M_PI05 (M_PI * 0.5f) +#endif + +#ifndef o_M_PI + #define o_M_PI (1.0f / M_PI) +#endif + +#ifndef o_M_PI2 + #define o_M_PI2 (1.0f / M_PI2) +#endif + +#ifndef lerpMacro + #define lerpMacro(a,b,c) ( (a) + ( ((b) - (a) ) * (c) ) ) +#endif + + +/*#ifndef clamp + #define clamp(x, lo, hi) max(min(x, hi), lo) +#endif*/ + +#ifndef saturate + #define saturate(x) Clamped((x), 0, 1 ) +#endif + +#ifndef Deg2Rad + #define Deg2Rad(_n) ((_n) * 0.017453292f) +#endif + +#ifndef Rad2Deg + #define Rad2Deg(n) ((n) * 57.29577951f) +#endif + + +// Handy clamp template. +template inline T Clamped( const T &_x,const T1 &_lo,const T2 &_hi ) { return( ( _x < _lo ) ? _lo : ( _x > _hi ) ? _hi : _x ); } + +// Sine & Cosine of _angle. For x86 roughly twice as fast as sinf() + cosf()... +inline void SinCos( const fp4 _angle, fp4 *_pSin, fp4 *_pCos ) +{ +//#ifdef AMD64 + *_pSin = (fp4)sinf( _angle ); + *_pCos = (fp4)cosf( _angle ); +/*#else + __asm + { + fld _angle; + fsincos; + mov eax, _pCos; + fstp [eax]; + mov eax, _pSin; + fstp [eax]; + }; +#endif*/ +} + +// Squareroot. MAKE BETTER! +inline fp4 Sqrt( const fp4 _f ) +{ +// ASSERTFP4( _f ); +// ASSERT( _f != 0.0f ); + return( sqrtf( _f ) ); +} + +// Reciprocal squareroot. (~92 clocks) MAKE BETTER! +inline fp4 RSqrt( const fp4 _f ) +{ +// ASSERTFP4( _f ); + return( 1.0f / Sqrt(_f) ); +} + +// Fast approximate reciprocal squareroot. (~31 clocks) +inline fp4 RSqrtFast( fp4 _v ) +{ + // ASSERTFP4( _v ); + // ASSERT( _v != 0.0f ); + + const fp4 v_half = _v * 0.5f; + long i = *(long *) &_v; + i = 0x5f3759df - (i >> 1); + _v = *(fp4 *) &i; + return( _v * (1.5f - v_half * _v * _v) ); +} + + +/* + fist(). + Faster float2int conversion. +*/ +/*inline long fist( float src ) +{ + long res = 0; + long *pDst = &res; + + #ifndef AMD64 + __asm { + mov eax, pDst + fld src + fistp [eax] + }; + #endif + + return( res ); +}*/ + +/* + daPowf(). + Faster powf(). +*/ +/*inline float daPowf( float x, float y ) +{ + float powed; + + #ifndef AMD64 + __asm { + fld y + fld x + + fyl2x + fld1 + fld st(1) + fprem + f2xm1 + faddp st(1), st + fscale + fxch + fstp st + + fstp powed + }; + #endif + + return( powed ); +}*/ + +/* + ClosestPowerOfTwo(). + +*/ +inline unsigned int ClosestPowerOfTwo( const unsigned int _x ) +{ + unsigned int i,k; + + if ( _x == 0 ) + return 0; + + k = _x; + i = 0; + + while( k != 0 ) + { + k >>= 1; + i++; + } + + if ( i==1 ) + return 1; + else + { + i--; + return( 1 << (i + ((_x >> (i-1)) & 1)) ); + } +} + +/* + UpperPowerOfTwo(). + +*/ +inline unsigned int UpperPowerOfTwo( const unsigned int x ) +{ + unsigned int i = 1; + + while( i= _Low ) && ( _Number <= _High ) ); +} + +// +static inline int FloatIsInvalid(const float &_Number) +{ + return (((*((unsigned int*)&_Number)) & 0x7F800000) == 0x7F800000); +} + +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/md5.c electricsheep-3.0.2-git20180325/Common/md5.c --- electricsheep-2.7~b12+svn20091224/Common/md5.c 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/md5.c 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,427 @@ +/* + * md5.h + * + * by Ulrich Drepper , 1995. + * + * Modified by Gary Wong, 2000, 2001. + * + * Functions to compute MD5 message digest of files or memory blocks. + * according to the definition of MD5 in RFC 1321 from April 1992. + * Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 3 or later of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: md5.c,v 1.9 2007/07/02 12:46:38 ace Exp $ + */ + +/* License changed from the GNU LGPL to the GNU GPL (as permitted + under Term 3 of the GNU LGPL) by Gary Wong for distribution + with GNU Backgammon. */ + +#define STDC_HEADERS 1 +#define HAVE_MEMCPY 1 + +#if STDC_HEADERS +# include +# include +#else +# ifndef HAVE_MEMCPY +# define memcpy(d, s, n) bcopy ((s), (d), (n)) +# endif +#endif + +#include "md5.h" + +/* Be conservative and always perform explicit byte-ordering. This is + redundant on little-endian architectures, but is portable. */ +#define WRITE( p, n ) \ + ( ( (unsigned char *) (p) )[ 0 ] = ( (n) & 0xFF ), \ + ( (unsigned char *) (p) )[ 1 ] = ( (n) & 0xFF00 ) >> 8, \ + ( (unsigned char *) (p) )[ 2 ] = ( (n) & 0xFF0000 ) >> 16, \ + ( (unsigned char *) (p) )[ 3 ] = ( (n) & 0xFF000000 ) >> 24 ) + +#define READ( p ) \ + ( (md5_uint32) ( ( (md5_uint32)( (unsigned char *) (p) )[ 0 ] ) | \ + ( (md5_uint32)( (unsigned char *) (p) )[ 1 ] ) << 8 | \ + ( (md5_uint32)( (unsigned char *) (p) )[ 2 ] ) << 16 | \ + ( (md5_uint32)( (unsigned char *) (p) )[ 3 ] ) << 24 ) ) + +/* This array contains the bytes used to pad the buffer to the next + 64-byte boundary. (RFC 1321, 3.1: Step 1) */ +/* But this isn't used ???? */ +/*lint -e{785} Ignore not enough initilizer warning */ +static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; + + +/* Initialize structure containing state of computation. + (RFC 1321, 3.3: Step 3) */ +void +md5_init_ctx (struct md5_ctx *ctx) +{ + ctx->A = 0x67452301; + ctx->B = 0xefcdab89; + ctx->C = 0x98badcfe; + ctx->D = 0x10325476; + + ctx->total[0] = ctx->total[1] = 0; + ctx->buflen = 0; +} + +/* Put result from CTX in first 16 bytes following RESBUF. The result + must be in little endian byte order. + + IMPORTANT: On some systems it is required that RESBUF is correctly + aligned for a 32 bits value. */ +void * +md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) +{ + char *r = (char*)resbuf; + WRITE (r, ctx->A); + WRITE (r + 4, ctx->B); + WRITE (r + 8, ctx->C); + WRITE (r + 12, ctx->D); + + return resbuf; +} + +/* Process the remaining bytes in the internal buffer and the usual + prolog according to the standard and write the result to RESBUF. + + IMPORTANT: On some systems it is required that RESBUF is correctly + aligned for a 32 bits value. */ +void * +md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) +{ + /* Take yet unprocessed bytes into account. */ + md5_uint32 bytes = ctx->buflen; + size_t pad; + + /* Now count remaining bytes. */ + ctx->total[0] += bytes; + if (ctx->total[0] < bytes) + ++ctx->total[1]; + + pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; + memcpy (&ctx->buffer[bytes], fillbuf, pad); + + /* Put the 64-bit file length in *bits* at the end of the buffer. */ + WRITE( ctx->buffer + bytes + pad, ctx->total[0] << 3); + WRITE( ctx->buffer + bytes + pad + 4, ((ctx->total[1] << 3) | + (ctx->total[0] >> 29))); + + /* Process last bytes. */ + md5_process_block (ctx->buffer, bytes + pad + 8, ctx); + + return md5_read_ctx (ctx, resbuf); +} + +/* Compute MD5 message digest for bytes read from STREAM. The + resulting message digest number will be written into the 16 bytes + beginning at RESBLOCK. */ +int +md5_stream (FILE *stream, void *resblock) +{ + /* Important: BLOCKSIZE must be a multiple of 64. */ +#define BLOCKSIZE 4096 + struct md5_ctx ctx; + char buffer[BLOCKSIZE + 72]; + size_t sum; + + /* Initialize the computation context. */ + md5_init_ctx (&ctx); + + /* Iterate over full file contents. */ + for(;;) + { + /* We read the file in blocks of BLOCKSIZE bytes. One call of the + computation function processes the whole buffer so that with the + next round of the loop another block can be read. */ + size_t n; + sum = 0; + + /* Read block. Take care for partial reads. */ + do + { + n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); + + sum += n; + } + while (sum < BLOCKSIZE && n != 0); + if (n == 0 && ferror (stream)) + return 1; + + /* If end of file is reached, end the loop. */ + if (n == 0) + break; + + /* Process buffer with BLOCKSIZE bytes. Note that + BLOCKSIZE % 64 == 0 + */ + md5_process_block (buffer, BLOCKSIZE, &ctx); + } + + /* Add the last bytes if necessary. */ + if (sum > 0) + md5_process_bytes (buffer, sum, &ctx); + + /* Construct result in desired memory. */ + md5_finish_ctx (&ctx, resblock); + return 0; +} + +/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The + result is always in little endian byte order, so that a byte-wise + output yields to the wanted ASCII representation of the message + digest. */ +void * +md5_buffer (const char *buffer, size_t len, void *resblock) +{ + struct md5_ctx ctx; + + /* Initialize the computation context. */ + md5_init_ctx (&ctx); + + /* Process whole buffer but last len % 64 bytes. */ + md5_process_bytes (buffer, len, &ctx); + + /* Put result in desired memory area. */ + return md5_finish_ctx (&ctx, resblock); +} + + +void +md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) +{ + /* const void aligned_buffer = buffer; */ + + /* When we already have some bits in our internal buffer concatenate + both inputs first. */ + if (ctx->buflen != 0) + { + size_t left_over = ctx->buflen; + size_t add = 128 - left_over > len ? len : 128 - left_over; + + /* Only put full words in the buffer. */ + add -= add % sizeof (md5_uint32); + + memcpy (&ctx->buffer[left_over], buffer, add); + ctx->buflen += (md5_uint32)add; + + if (ctx->buflen > 64) + { + md5_process_block (ctx->buffer, ctx->buflen & ~63u, ctx); + + ctx->buflen &= 63; + /* The regions in the following copy operation cannot overlap. */ + memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63u], + ctx->buflen); + } + + buffer = (const char *) buffer + add; + len -= add; + } + + /* Process available complete blocks. */ + if (len > 64) + { + md5_process_block (buffer, len & ~63u, ctx); + buffer = (const char *) buffer + (len & ~63u); + len &= 63; + } + + /* Move remaining bytes in internal buffer. */ + if (len > 0) + { + size_t left_over = ctx->buflen; + + memcpy (&ctx->buffer[left_over], buffer, len); + left_over += len; + if (left_over >= 64) + { + md5_process_block (ctx->buffer, 64, ctx); + left_over -= 64; + memcpy (ctx->buffer, &ctx->buffer[64], left_over); + } + ctx->buflen = (md5_uint32)left_over; + } +} + + +/* These are the four functions used in the four steps of the MD5 algorithm + and defined in the RFC 1321. The first function is a little bit optimized + (as found in Colin Plumbs public domain implementation). */ +/* #define FF(b, c, d) ((b & c) | (~b & d)) */ +#define FF(b, c, d) (d ^ (b & (c ^ d))) +#define FG(b, c, d) FF (d, b, c) +#define FH(b, c, d) (b ^ c ^ d) +#define FI(b, c, d) (c ^ (b | ~d)) + +/* Process LEN bytes of BUFFER, accumulating context into CTX. + It is assumed that LEN % 64 == 0. */ + +void +md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) +{ + md5_uint32 correct_words[16]; + const md5_uint32 *words = (const md5_uint32 *)buffer; + size_t nwords = len / sizeof (md5_uint32); + const md5_uint32 *endp = words + nwords; + md5_uint32 A = ctx->A; + md5_uint32 B = ctx->B; + md5_uint32 C = ctx->C; + md5_uint32 D = ctx->D; + + /* First increment the byte count. RFC 1321 specifies the possible + length of the file up to 2^64 bits. Here we only compute the + number of bytes. Do a double word increment. */ + ctx->total[0] += (md5_uint32)len; + if (ctx->total[0] < len) + ++ctx->total[1]; + + /* Process all bytes in the buffer with 64 bytes in each round of + the loop. */ + while (words < endp) + { + md5_uint32 *cwp = correct_words; + md5_uint32 A_save = A; + md5_uint32 B_save = B; + md5_uint32 C_save = C; + md5_uint32 D_save = D; + + /* First round: using the given function, the context and a constant + the next context is computed. Because the algorithms processing + unit is a 32-bit word and it is determined to work on words in + little endian byte order we perhaps have to change the byte order + before the computation. To reduce the work for the next steps + we store the swapped words in the array CORRECT_WORDS. */ + +#define OP(a, b, c, d, s, T) \ + do \ + { \ + a += FF (b, c, d) + (*cwp++ = READ (words)) + T; \ + ++words; \ + CYCLIC (a, s); \ + a += b; \ + } \ + while (0) + + /* It is unfortunate that C does not provide an operator for + cyclic rotation. Hope the C compiler is smart enough. */ +#define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s))) + + /* Before we start, one word to the strange constants. + They are defined in RFC 1321 as + + T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64 + */ + + /* Round 1. */ + /*lint --e{123, 717} Ignore macro warning */ + OP (A, B, C, D, 7, 0xd76aa478); + OP (D, A, B, C, 12, 0xe8c7b756); + OP (C, D, A, B, 17, 0x242070db); + OP (B, C, D, A, 22, 0xc1bdceee); + OP (A, B, C, D, 7, 0xf57c0faf); + OP (D, A, B, C, 12, 0x4787c62a); + OP (C, D, A, B, 17, 0xa8304613); + OP (B, C, D, A, 22, 0xfd469501); + OP (A, B, C, D, 7, 0x698098d8); + OP (D, A, B, C, 12, 0x8b44f7af); + OP (C, D, A, B, 17, 0xffff5bb1); + OP (B, C, D, A, 22, 0x895cd7be); + OP (A, B, C, D, 7, 0x6b901122); + OP (D, A, B, C, 12, 0xfd987193); + OP (C, D, A, B, 17, 0xa679438e); + OP (B, C, D, A, 22, 0x49b40821); + + /* For the second to fourth round we have the possibly swapped words + in CORRECT_WORDS. Redefine the macro to take an additional first + argument specifying the function to use. */ +#undef OP +#define OP(f, a, b, c, d, k, s, T) \ + do \ + { \ + a += f (b, c, d) + correct_words[k] + T; \ + CYCLIC (a, s); \ + a += b; \ + } \ + while (0) + + /* Round 2. */ + OP (FG, A, B, C, D, 1, 5, 0xf61e2562); + OP (FG, D, A, B, C, 6, 9, 0xc040b340); + OP (FG, C, D, A, B, 11, 14, 0x265e5a51); + OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa); + OP (FG, A, B, C, D, 5, 5, 0xd62f105d); + OP (FG, D, A, B, C, 10, 9, 0x02441453); + OP (FG, C, D, A, B, 15, 14, 0xd8a1e681); + OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8); + OP (FG, A, B, C, D, 9, 5, 0x21e1cde6); + OP (FG, D, A, B, C, 14, 9, 0xc33707d6); + OP (FG, C, D, A, B, 3, 14, 0xf4d50d87); + OP (FG, B, C, D, A, 8, 20, 0x455a14ed); + OP (FG, A, B, C, D, 13, 5, 0xa9e3e905); + OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8); + OP (FG, C, D, A, B, 7, 14, 0x676f02d9); + OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a); + + /* Round 3. */ + OP (FH, A, B, C, D, 5, 4, 0xfffa3942); + OP (FH, D, A, B, C, 8, 11, 0x8771f681); + OP (FH, C, D, A, B, 11, 16, 0x6d9d6122); + OP (FH, B, C, D, A, 14, 23, 0xfde5380c); + OP (FH, A, B, C, D, 1, 4, 0xa4beea44); + OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9); + OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60); + OP (FH, B, C, D, A, 10, 23, 0xbebfbc70); + OP (FH, A, B, C, D, 13, 4, 0x289b7ec6); + OP (FH, D, A, B, C, 0, 11, 0xeaa127fa); + OP (FH, C, D, A, B, 3, 16, 0xd4ef3085); + OP (FH, B, C, D, A, 6, 23, 0x04881d05); + OP (FH, A, B, C, D, 9, 4, 0xd9d4d039); + OP (FH, D, A, B, C, 12, 11, 0xe6db99e5); + OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8); + OP (FH, B, C, D, A, 2, 23, 0xc4ac5665); + + /* Round 4. */ + OP (FI, A, B, C, D, 0, 6, 0xf4292244); + OP (FI, D, A, B, C, 7, 10, 0x432aff97); + OP (FI, C, D, A, B, 14, 15, 0xab9423a7); + OP (FI, B, C, D, A, 5, 21, 0xfc93a039); + OP (FI, A, B, C, D, 12, 6, 0x655b59c3); + OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92); + OP (FI, C, D, A, B, 10, 15, 0xffeff47d); + OP (FI, B, C, D, A, 1, 21, 0x85845dd1); + OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f); + OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0); + OP (FI, C, D, A, B, 6, 15, 0xa3014314); + OP (FI, B, C, D, A, 13, 21, 0x4e0811a1); + OP (FI, A, B, C, D, 4, 6, 0xf7537e82); + OP (FI, D, A, B, C, 11, 10, 0xbd3af235); + OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb); + OP (FI, B, C, D, A, 9, 21, 0xeb86d391); + + /* Add the starting values of the context. */ + A += A_save; + B += B_save; + C += C_save; + D += D_save; + } + + /* Put checksum in context given as argument. */ + ctx->A = A; + ctx->B = B; + ctx->C = C; + ctx->D = D; +} diff -Nru electricsheep-2.7~b12+svn20091224/Common/md5.h electricsheep-3.0.2-git20180325/Common/md5.h --- electricsheep-2.7~b12+svn20091224/Common/md5.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/md5.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,167 @@ +/* + * md5.h + * + * Declaration of functions and data types used for MD5 sum computing + * library functions. + * Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 3 or later of the GNU General Public License as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: md5.h,v 1.4 2007/07/02 12:46:38 ace Exp $ + */ + +/* License changed from the GNU LGPL to the GNU GPL (as permitted + under Term 3 of the GNU LGPL) by Gary Wong for distribution + with GNU Backgammon. */ + +#ifndef _MD5_H +#define _MD5_H 1 + +#include + +#if defined HAVE_LIMITS_H +# include +#endif + +/* The following contortions are an attempt to use the C preprocessor + to determine an unsigned integral type that is 32 bits wide. An + alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but + doing that would require that the configure script compile and *run* + the resulting executable. Locally running cross-compiled executables + is usually not possible. */ + +#ifdef _LIBC +# include +typedef u_int32_t md5_uint32; +#else +# if defined __STDC__ && __STDC__ +# define UINT_MAX_32_BITS 4294967295U +# else +# define UINT_MAX_32_BITS 0xFFFFFFFF +# endif + +/* If UINT_MAX isn't defined, assume it's a 32-bit type. + This should be valid for all systems GNU cares about because + that doesn't include 16-bit systems, and only modern systems + (that certainly have ) have 64+-bit integral types. */ + +# ifndef UINT_MAX +# define UINT_MAX UINT_MAX_32_BITS +# endif + +# if UINT_MAX == UINT_MAX_32_BITS + typedef unsigned int md5_uint32; +# else +# if USHRT_MAX == UINT_MAX_32_BITS + typedef unsigned short md5_uint32; +# else +# if ULONG_MAX == UINT_MAX_32_BITS + typedef unsigned long md5_uint32; +# else + /* The following line is intended to evoke an error. + Using #error is not portable enough. */ + "Cannot determine unsigned 32-bit data type." +# endif +# endif +# endif +#endif + +#undef __P +#if __STDC__ || _MSC_VER +# define __P(x) x +#else +# define __P(x) () +#endif + +#if !defined (__GNUC__) && !defined (__attribute__) +#define __attribute__(x) +#endif + +/* Structure to save state of computation between the single steps. */ +struct md5_ctx +{ + md5_uint32 A; + md5_uint32 B; + md5_uint32 C; + md5_uint32 D; + + md5_uint32 total[2]; + md5_uint32 buflen; + char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32)))); +}; + +#ifdef __cplusplus + extern "C" { +#endif + +/* + * The following three functions are build up the low level used in + * the functions `md5_stream' and `md5_buffer'. + */ + +/* Initialize structure containing state of computation. + (RFC 1321, 3.3: Step 3) */ +extern void md5_init_ctx __P ((struct md5_ctx *ctx)); + +/* Starting with the result of former calls of this function (or the + initialization function) update the context for the next LEN bytes + starting at BUFFER. + It is necessary that LEN is a multiple of 64!!! */ +extern void md5_process_block __P ((const void *buffer, size_t len, + struct md5_ctx *ctx)); + +/* Starting with the result of former calls of this function (or the + initialization function) update the context for the next LEN bytes + starting at BUFFER. + It is NOT required that LEN is a multiple of 64. */ +extern void md5_process_bytes __P ((const void *buffer, size_t len, + struct md5_ctx *ctx)); + +/* Process the remaining bytes in the buffer and put result from CTX + in first 16 bytes following RESBUF. The result is always in little + endian byte order, so that a byte-wise output yields to the wanted + ASCII representation of the message digest. + + IMPORTANT: On some systems it is required that RESBUF is correctly + aligned for a 32 bits value. */ +extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf)); + + +/* Put result from CTX in first 16 bytes following RESBUF. The result is + always in little endian byte order, so that a byte-wise output yields + to the wanted ASCII representation of the message digest. + + IMPORTANT: On some systems it is required that RESBUF is correctly + aligned for a 32 bits value. */ +extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf)); + + +/* Compute MD5 message digest for bytes read from STREAM. The + resulting message digest number will be written into the 16 bytes + beginning at RESBLOCK. */ +extern int md5_stream __P ((FILE *stream, void *resblock)); + +/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The + result is always in little endian byte order, so that a byte-wise + output yields to the wanted ASCII representation of the message + digest. */ +extern void *md5_buffer __P ((const char *buffer, size_t len, + void *resblock)); + +#ifdef __cplusplus + } +#endif + + +#endif /* md5.h */ diff -Nru electricsheep-2.7~b12+svn20091224/Common/MTimer.h electricsheep-3.0.2-git20180325/Common/MTimer.h --- electricsheep-2.7~b12+svn20091224/Common/MTimer.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/MTimer.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,114 @@ +#ifndef _MTIMER_H_ +#define _MTIMER_H_ + +#ifdef _TIMER_H_ +#error "MTimer.h included not from Timer.h" +#endif + +#include +#include + +#include + +//#define USE_RDTSC + +namespace Base +{ + namespace internal + { + static void Wait( fp8 _seconds ) + { + const fp8 floorSeconds = ::floor( _seconds ); + const fp8 fractionalSeconds = _seconds - floorSeconds; + + timespec timeOut; + timeOut.tv_sec = static_cast(floorSeconds); + timeOut.tv_nsec = static_cast(fractionalSeconds * 1e9); + + // Nanosleep may return earlier than expected if there's a signal + // That should be handled by the calling thread. If it happens, + // Sleep again. [Bramz] + timespec timeRemaining; + while( true ) + { + const int32 ret = nanosleep( &timeOut, &timeRemaining ); + if( ret == -1 && errno == EINTR ) + { + // There was only an sleep interruption, go back to sleep. + timeOut.tv_sec = timeRemaining.tv_sec; + timeOut.tv_nsec = timeRemaining.tv_nsec; + } + else + { + // We're done, or error. =) + return; + } + } + } + } + + +class CMTimer : public ITimer +{ + fp8 m_Start; + fp8 m_DeltaStart; + + static inline fp8 realTime() + { + + mach_timebase_info_data_t tTBI; + + mach_timebase_info(&tTBI); + fp8 cv = (static_cast(tTBI.numer)) / (static_cast(tTBI.denom)); + + uint64_t now = mach_absolute_time(); + fp8 tNS = now * cv; + + return tNS * 1e-9; + } + + public: + CMTimer() + { + Reset(); + } + + void Reset() + { + m_DeltaStart = m_Start = realTime(); + } + + fp8 Time() + { + return realTime() - m_Start; + } + + fp8 Delta() + { + const fp8 now = realTime(); + const fp8 dt = now - m_DeltaStart; + m_DeltaStart = now; + return dt; + } + + fp8 Resolution() + { + mach_timebase_info_data_t tTBI; + + mach_timebase_info(&tTBI); + fp8 cv = (static_cast(tTBI.numer)) / (static_cast(tTBI.denom)); + + return cv * 1e-9; + } + + static inline void Wait( fp8 _seconds ) + { + Base::internal::Wait(_seconds); + } +}; + +typedef CMTimer CTimer; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/pool.cpp electricsheep-3.0.2-git20180325/Common/pool.cpp --- electricsheep-2.7~b12+svn20091224/Common/pool.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/pool.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,34 @@ +#include +#include +#include +#include "pool.h" + +namespace Memory +{ + +/* + AllocSys(). + +*/ +void *CPoolBase::AllocSys( size_t _size ) +{ + void *pData = ::operator new( _size, std::nothrow ); + if( !pData ) + { + // Do whatever you want. + } + + return pData; +} + +/* + DeallocSys(). + +*/ +void CPoolBase::DeallocSys( void *_pData ) +{ + if( _pData ) + delete (char *)_pData; +} + +} diff -Nru electricsheep-2.7~b12+svn20091224/Common/pool.h electricsheep-3.0.2-git20180325/Common/pool.h --- electricsheep-2.7~b12+svn20091224/Common/pool.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/pool.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,30 @@ +#ifndef _POOL_H_ +#define _POOL_H_ + +namespace Memory +{ + +/* + CPoolBase. + Abstract baseclass defining pools. +*/ +class CPoolBase +{ + public: + virtual void Purge() = 0; + + // System heap allocation. + static void *AllocSys( size_t _size ); + static void DeallocSys( void *_pData ); +}; + + +// Spiffy macro for declaring classes poolable. +#define POOLED( classtype, pooltype ) \ + public: \ + static void *operator new( size_t s ) { (void)s; ASSERT( s == sizeof( classtype ) ); return pooltype< sizeof(classtype)>::Instance().Allocate(); } \ + static void operator delete( void *_p ) { if( _p ) pooltype< sizeof(classtype)>::Instance().Deallocate( _p ); } \ + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/ProcessForker.h electricsheep-3.0.2-git20180325/Common/ProcessForker.h --- electricsheep-2.7~b12+svn20091224/Common/ProcessForker.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/ProcessForker.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,484 @@ +#ifndef PROCESS_H_INCLUDED +#define PROCESS_H_INCLUDED + +#ifdef WIN32 +#include +#endif + +#include "base.h" +#include "SmartPtr.h" +#include "Exception.h" +#include "Log.h" +#include "Timer.h" +#include + +#ifdef LINUX_GNU +#include +#include +#include +#include +#endif + +namespace Base +{ + +/* + CProcessForker(). + Forks a process with optional env-vars. + + todo; remove non std::string stuff, just messy.. +*/ +#ifdef WIN32 +static void RecreateProcess(std::string parameters) +{ + STARTUPINFOA si = {0}; + si.cb = sizeof(STARTUPINFOA); + PROCESS_INFORMATION pi = {0}; + char temp[MAX_PATH] = {0}; + char winfolder[MAX_PATH] = {0}; + GetWindowsDirectoryA(winfolder, sizeof(winfolder)); + strcpy(temp,std::string(winfolder + std::string("\\es.scr ") + parameters).c_str()); + if (CreateProcessA(0, temp, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi) != 0) + { + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); + } +} + +class CProcessForker +{ + static const uint32 m_BUFSIZE = 8192; + + // Safety. + static const uint32 m_NAMESIZE = 32; + static const uint32 m_VALUESIZE = 256; + + bool m_bTerminate; + bool m_bWaiting; + HANDLE m_hProcess; + + const char *m_pAppName; + const char *m_pAppDir; + + char *m_pEnv; + char *m_pParams; + LPSTR m_pCurrentVar; + LPSTR m_pCurrentParam; + + public: + CProcessForker( const char *_pProcessName, bool _bTerminate = true, const char *_wd = NULL ) : + m_bWaiting(false), m_pAppName( _pProcessName ), m_bTerminate( _bTerminate ), m_pAppDir(_wd) + { + m_pEnv = NULL; + m_pParams = NULL; + m_pCurrentVar = NULL; + m_pCurrentParam = NULL; + m_hProcess = INVALID_HANDLE_VALUE; + } + + ~CProcessForker() + { + if( m_bTerminate ) + { + Terminate(); + } + + SAFE_DELETE( m_pEnv ); + } + + bool PushEnv( const std::string &_name, const std::string &_value ) + { + printf( "PushEnv( %s, %s )\n", _name.c_str() , _value.c_str() ); + + if( !m_pEnv ) + { + m_pEnv = new char[ m_BUFSIZE ]; + m_pCurrentVar = (LPSTR)m_pEnv; + } + + if( _name.size() > m_NAMESIZE ) + { + g_Log->Error( "Oversized env name: %s", _name.c_str() ); + //ThrowArgs(( "Oversized env name: %s", _name.c_str() )); + } + + if( _value.size() > m_VALUESIZE ) + { + g_Log->Error( "Oversized env value: %s", _value.c_str() ); + //ThrowArgs(( "Oversized env value: %s", _value.c_str() )); + } + + std::stringstream stm; + stm << _name << "=" << _value; + + if( strcpy( m_pCurrentVar, stm.str().c_str() ) == NULL ) + return false; + + // Offset please. + m_pCurrentVar += lstrlenA( m_pCurrentVar ) + 1; + return true; + } + + bool PushParam( const std::string &_param ) + { + printf( "PushParam( %s )\n", _param.c_str() ); + + if( !m_pParams ) + { + m_pParams = new char[ m_BUFSIZE ]; + m_pCurrentParam = (LPSTR)m_pParams; + } + + std::stringstream stm; + stm << " " << _param; + + if( strcpy( m_pCurrentParam, stm.str().c_str() ) == NULL ) + return false; + + // Offset please. + m_pCurrentParam += lstrlenA( m_pCurrentParam ); + return true; + } + + void Execute() + { + // Make sure envblock is terminated. + if( m_pEnv ) + *m_pCurrentVar = (CHAR)0; + + // Create the child process, specifying a new environment block. + STARTUPINFOA si; + ZeroMemory( &si, sizeof(STARTUPINFOA) ); + si.cb = sizeof(STARTUPINFOA); + + DWORD dwFlags = CREATE_NO_WINDOW | IDLE_PRIORITY_CLASS; + + PROCESS_INFORMATION pi; + + char cmdLine[ m_BUFSIZE ] = {0}; + + if( m_pParams ) + { + strncpy( cmdLine, m_pParams, MAX_PATH ); //m_pParams starts by " "... + g_Log->Info( "Starting %s%s...", m_pAppName, cmdLine ); + } + else + g_Log->Info( "Starting %s...", m_pAppName ); + + if( !CreateProcessA( m_pAppName, cmdLine, NULL, NULL, TRUE, dwFlags, (LPVOID)m_pEnv, (CHAR *)m_pAppDir, &si, &pi ) ) + { + CHAR msg[ MAX_PATH + 1 ]; + int32 err = GetLastError(); + + FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0, err, MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), msg, MAX_PATH, 0 ); + g_Log->Error( "Process failed with: %s", msg ); + } + else + { + CloseHandle( pi.hThread ); + m_hProcess = pi.hProcess; + } + } + + /*void ExecuteCred() + { + DWORD dwErr = CredUIPromptForCredentials( + &cui, + _T("Tool.exe"), + NULL, + 0, + szName, + CREDUI_MAX_USERNAME_LENGTH+1, + szPwd, + CREDUI_MAX_PASSWORD_LENGTH+1, + &fSave, + CREDUI_FLAGS_USERNAME_TARGET_CREDENTIALS | + CREDUI_FLAGS_REQUEST_ADMINISTRATOR | + CREDUI_FLAGS_EXPECT_CONFIRMATION + ); + //if (!dwErr) + { + TCHAR szUserName[ CREDUI_MAX_USERNAME_LENGTH + 1 ]; + TCHAR szDomainName[ CREDUI_MAX_DOMAIN_TARGET_LENGTH + 1 ]; + + DWORD dwError = CredUIParseUserName( szName, szUserName, + CREDUI_MAX_USERNAME_LENGTH, + szDomainName, + CREDUI_MAX_DOMAIN_TARGET_LENGTH); + + std::wstring strCommandLine(L"Tool.exe"); + + STARTUPINFO strctStartInfo; + ZeroMemory(&strctStartInfo, sizeof(STARTUPINFO)); + strctStartInfo.cb = sizeof(STARTUPINFO); + + PROCESS_INFORMATION strctProcInfo; + ZeroMemory(&strctProcInfo, sizeof(PROCESS_INFORMATION)); + + CreateProcessWithLogonW( + szUserName, + szDomainName, + szPwd, + LOGON_WITH_PROFILE, + NULL, + &strCommandLine[0], + 0, + NULL, + NULL, + &strctStartInfo, + &strctProcInfo)); + + CloseHandle(strctProcInfo.hThread); + CloseHandle(strctProcInfo.hProcess); + + SecureZeroMemory(pszName, sizeof(pszName)); + SecureZeroMemory(pszPwd, sizeof(pszPwd)); + } + }*/ + + + // + int32 Wait() + { + m_bWaiting = true; + bool bExitWhile = false; + DWORD prc = 0; + + while( !bExitWhile ) + { + DWORD rc = 0; + if (m_hProcess == INVALID_HANDLE_VALUE) + rc = WAIT_FAILED; + else + rc = MsgWaitForMultipleObjects( 1, &m_hProcess, FALSE, INFINITE, QS_ALLINPUT ); + switch( rc ) + { + case WAIT_FAILED: + g_Log->Error( "Failed waiting on process handle" ); + bExitWhile = true; + break; + case WAIT_OBJECT_0: + //g_Log->Info( "WAIT_OBJECT_0..." ); + bExitWhile = true; + GetExitCodeProcess( m_hProcess, &prc ); + CloseHandle( m_hProcess ); + m_hProcess = INVALID_HANDLE_VALUE; + break; + + case WAIT_OBJECT_0 + 1: + HWND hwnd = NULL; + MSG msg; + + //g_Log->Info( "WAIT_OBJECT_0+1..." ); + + // Remove any messages that may be in the queue. If the queue contains any mouse or keyboard messages, end the operation. + while( PeekMessage( &msg, hwnd, 0, 0, PM_REMOVE ) ) + { + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } + break; + } + + // Sleep for a quarter of a second. + Base::CTimer::Wait( 0.25 ); + } + + g_Log->Info( "Fork done..." ); + m_bWaiting = false; + return prc; + } + + void Terminate( void ) + { + if( m_hProcess != INVALID_HANDLE_VALUE ) + { + g_Log->Info( "Terminating process..." ); + TerminateProcess( m_hProcess, 0 ); + if( !m_bWaiting ) + { + g_Log->Info( "Closing handle..." ); + CloseHandle( m_hProcess ); + m_hProcess = INVALID_HANDLE_VALUE; + } + } + } +}; + +#else +#include + +class CProcessForker +{ + static const uint32 m_BUFSIZE = 8192; + + // Safety. + static const uint32 m_NAMESIZE = 32; + static const uint32 m_VALUESIZE = 256; + + static const uint32 m_MaxEnvCount = 256; + static const uint32 m_MaxParamCount = 20; + + bool m_bTerminate; + int m_ChildPID; + + const char *m_pAppName; + + char *m_pEnv[m_MaxEnvCount + 1]; + char *m_pParam[m_MaxParamCount + 1]; + uint32 m_EnvSize; + uint32 m_ParamSize; + + public: + CProcessForker( const char *_pProcessName, bool _bTerminate = true, const char */*_wd*/ = NULL ) : + m_bTerminate( _bTerminate ), m_pAppName( _pProcessName ) + { + m_pEnv[0] = NULL; + m_EnvSize = 0; + + char *procName = NULL; + uint32 paramSize = 0; + + if ( _pProcessName != NULL ) + { + procName = new char[strlen(_pProcessName) + 1]; + strcpy( procName, _pProcessName ); + paramSize = 1; + } + + m_pParam[0] = procName; + m_pParam[1] = NULL; + m_ParamSize = paramSize; + + m_ChildPID = -1; + } + + ~CProcessForker() + { + if ( m_bTerminate) + { + Terminate(); + } + + for (uint32 i=0; i < m_EnvSize; i++) + { + SAFE_DELETE_ARRAY(m_pEnv[i]); + } + + for (uint32 i=0; i < m_ParamSize; i++) + { + SAFE_DELETE_ARRAY(m_pParam[i]); + } + } + + bool PushEnv( const std::string &_name, const std::string &_value ) + { + printf( "PushEnv( %s, %s )\n", _name.c_str() , _value.c_str() ); + + if (m_EnvSize >= m_MaxEnvCount) + return false; + + if( _name.size() > m_NAMESIZE ) + { + g_Log->Error( "Oversized env name: %s", _name.c_str() ); + //ThrowArgs(( "Oversized env name: %s", _name.c_str() )); + } + + if( _value.size() > m_VALUESIZE ) + { + g_Log->Error( "Oversized env value: %s", _value.c_str() ); + //ThrowArgs(( "Oversized env value: %s", _value.c_str() )); + } + + std::stringstream stm; + stm << _name << "=" << _value; + + char *env = new char[stm.str().size() + 1]; + + if( strcpy( env, stm.str().c_str() ) == NULL ) + return false; + + m_pEnv[m_EnvSize++] = env; + m_pEnv[m_EnvSize] = NULL; + + return true; + } + + bool PushParam( const std::string &_param ) + { + printf( "PushParam( %s )\n", _param.c_str() ); + + if (m_ParamSize >= m_MaxParamCount) + return false; + + char *param = new char[_param.size() + 1]; + + if( strcpy( param, _param.c_str() ) == NULL ) + return false; + + m_pParam[m_ParamSize++] = param; + m_pParam[m_ParamSize] = NULL; + + return true; + } + + + void Execute() + { + int pid; + if ( ( pid = fork() ) == 0 ) + { +#ifdef MAC + setpriority(PRIO_PROCESS, 0, PRIO_MAX); +#else + setpriority(PRIO_PROCESS, 0, PRIO_MAX); +#endif + execve( m_pAppName, m_pParam, m_pEnv ); + } + else + { + m_ChildPID = pid; + +/*#ifdef MAC + setpriority(PRIO_PROCESS, pid, 19); +#else + setpriority(PRIO_PROCESS, pid, 19); +#endif*/ + } + + } + + // + int32 Wait() + { + if ( m_ChildPID == -1) + return 0; + + int stat_loc; + + waitpid( m_ChildPID, &stat_loc, 0 ); + + m_ChildPID = -1; + + return WEXITSTATUS(stat_loc); + } + + void Terminate( void ) + { + g_Log->Info( "Terminating process..." ); + + if ( m_ChildPID != -1 ) + { + kill( m_ChildPID, SIGTERM ); + m_ChildPID = -1; + } + + } +}; +#endif + +MakeSmartPointers( CProcessForker ); + +}; + +#endif // PROCESS_H_INCLUDED diff -Nru electricsheep-2.7~b12+svn20091224/Common/Singleton.h electricsheep-3.0.2-git20180325/Common/Singleton.h --- electricsheep-2.7~b12+svn20091224/Common/Singleton.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Singleton.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,64 @@ +/* + SINGLETON.H + Author: Stef. + + Singleton template. +*/ +#ifndef _SINGLETON_H_ +#define _SINGLETON_H_ + +#include + +#include "base.h" +#include "Exception.h" + +namespace Base +{ + +/* + CSingleton. + +*/ +template class CSingleton +{ + // We do not want these. + CSingleton( const CSingleton & ); + CSingleton & operator = ( const CSingleton & ); + + protected: + + // + bool m_bSingletonActive; + + public: + CSingleton() : m_bSingletonActive(true) {}; + virtual ~CSingleton() {}; + + // Users must implement this and set Active( false ), to catch unintended access after destruction. + virtual bool Shutdown( void ) = PureVirtual; + + // + void SingletonActive( const bool _state ) { m_bSingletonActive = _state; }; + bool SingletonActive( void ) { return( m_bSingletonActive ); }; + virtual const char *Description() = PureVirtual; + + // Return instance. + static T &Instance() + { + static T instance; + + if( instance.SingletonActive() == false ) + { +#ifndef MAC //needs to be implemented as proper singleton before this is true + printf( "Trying to access shutdown singleton %s\n", instance.Description() ); +#endif + //ThrowArgs(( "Trying to access shutdown singleton %s", instance.Description() )); + } + + return( instance ); + } +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/SmartPtr.h electricsheep-3.0.2-git20180325/Common/SmartPtr.h --- electricsheep-2.7~b12+svn20091224/Common/SmartPtr.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/SmartPtr.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,771 @@ +/* + SMARTPTR.H + Author: Stef. + + Reference counted smart pointer with garbage collection and/or object level thread synchronization. + + SmartPtr - The SmartPtr class + CRefCountPtr - Reference Counting Garbage Collection + CSyncPtr - Synchronized access without Reference Counting Garbage Collection + CSyncRefCountPtr - Synchronized access with Reference Counting Garbage Collection + CSmartPtrBase - The base of all above classes. Used as a common base so an assignment between different pointers is able. + + Examples on how to use these classes. + + 1. Reference Counting. (CRefCountPtr) + 2. Object Level Thread Synchronization. (CSyncPtr) + 3. Object Level Thread Synchronization & Reference Counting. (CSyncRefCountPtr) + + ------ + + 1. Reference Counting on CSomething + ------------------------------------ + + class CSomething + { + CSomething(); + ~CSomething(); + ..... + void do(); + }; + + typedef CRefCountPtr LPSOMETHING; + + void TestFunct() + { + LPSOMETHING p1 = new CSomething; + LPSOMETHING p2 = p1; + + if( p1 == NULL ) + { + .... + } + + p2->do(); + p1 = NULL; + + } // Here the object pointed by p2 WILL BE destroyed automatically + + + 2. Object Level Thread Synchronization for objects of CSomething + --------------------------------------------------------- + + typedef SyncPtr LPSOMETHING; + + void TestFunct() + { + LPSOMETHING p1 = new CSomething; + LPSOMETHING p2 = p1; + + if( p1.IsNULL() ) + { + .... + } + + StartThread( p1 ); + + p2->do(); // Synchronized with the other thread + p1 = NULL; + + } // Here the object pointed by p2 will NOT be destroyed automatically + + void ThreadFunc( LPSOMETHING p ) + { + p->do(); // Synchronized with the other thread + }// Here the object pointed by p will NOT be destroyed automatically + + + + 3. Object Level Thread Synchronization and Reference Counting + for objects of CSomething + --------------------------------------------------------- + + typedef CSyncRefCountPtr LPSOMETHING; + + void TestFunct() + { + LPSOMETHING p1 = new CSomething; + LPSOMETHING p2 = p1; + + if( p1.IsNULL() ) + { + .... + } + + StartThread( p1 ); + + p2->do(); // Synchronized with the other thread + p1 = NULL; + + } // Here the object pointed by p2 WILL BE destroyed automatically if p in ThreadFunc has already released the object. + + void ThreadFunc( LPSOMETHING p ) + { + p->do(); // Synchronized with the other thread + }// Here the object pointed by p WILL BE destroyed automatically if p2 in TestFunc has already released the object. + + + WARNING: Don't use a code like this + + CSomething *ptr = new CSomething(); // A real pointer + LPSOMETHING p1 = ptr; + LPSOMETHING p2 = ptr; This will lead to 2 (two) representation objects. + So you will not have nor proper grabage collection nor proper thread synchronization. + + if( p1 != p2 ) The comparison will say these point to different objects even you think it is the same. + { + ASSERT( FALSE ); + } + + sizeof( CRITICAL_SECTION ) 24 + sizeof( CRefCountRep ) 8 + sizeof( CSyncAccessRep ) 32 + sizeof( CSyncRefCountRep ) 32 + sizeof( CSyncAccess ) 8 + sizeof( SmartPtr ) 4 + sizeof( CSomething* ) 4 + sizeof( int ) 4 +*/ +#ifndef _SMARTPTR_H_ +#define _SMARTPTR_H_ + +#ifdef WIN32 + // If you wrap a non-class with the SmartPtr class, you will receive this warning. i.e. int, short, etc... + //#pragma warning( disable : 4284 ) + // Debug symbols cannot be longer than 255 but when using templates it is usual to have debug symbols longer than 255. + //#pragma warning( disable : 4786 ) + #include + #include +#else + #include +#endif + +#include "base.h" + +namespace Base +{ +/** + CRefCountRep(). + Representation class just for reference counting. +*/ +template class CRefCountRep +{ + T *m_pRealPtr; + long m_counter; + + // Constructors and destructor + public: + CRefCountRep( const T *ptr ); + ~CRefCountRep(); + + long incrRefCount(); + long decrRefCount(); + + T *getPointer() const; + T *getRealPointer() const; + + bool isNull() const; +}; + +// +template CRefCountRep::CRefCountRep( const T *ptr ) : m_pRealPtr( (T*)ptr ), m_counter( 0 ) +{ +} + +// +template CRefCountRep::~CRefCountRep() +{ + ASSERT( m_counter <= 0 ); + SAFE_DELETE( this->m_pRealPtr ); +} + +// +template long CRefCountRep::incrRefCount() { m_counter++; return( m_counter ); } +template long CRefCountRep::decrRefCount() { m_counter--; return( m_counter ); } +template T *CRefCountRep::getPointer() const { return( m_pRealPtr ); } +template T *CRefCountRep::getRealPointer() const{ return( m_pRealPtr ); } +template bool CRefCountRep::isNull() const { return( m_pRealPtr == NULL ); } + +// +template class CSyncAccess; + +/** + CSyncAccessRep(). + Representation class just for thread synchronization. +*/ +template class CSyncAccessRep +{ + protected: + T *m_pRealPtr; + long m_counter; + +#ifdef WIN32 + CRITICAL_SECTION m_CriticalSection; + DWORD m_ThreadID; +#else + pthread_mutex_t m_Mutex; +#endif + + public: + CSyncAccessRep( const T *ptr ); + ~CSyncAccessRep(); + + long incrRefCount(); + long decrRefCount(); + + CSyncAccess getPointer() const; + T *getRealPointer() const; + + bool isNull() const; + + void acquireAccess(); + void releaseAccess(); +}; + +// +template CSyncAccessRep::CSyncAccessRep( const T *ptr ) : m_pRealPtr( (T *)ptr ), m_counter( 0 ) +{ +#ifdef WIN32 + ::InitializeCriticalSection( &m_CriticalSection ); +// ::InitializeCriticalSectionAndSpinCount( &m_CriticalSection, 0x80000400 ); + + //::EnterCriticalSection( &m_CriticalSection ); + //m_ThreadID = GetCurrentThreadId(); + //printf( "New t-pointer, %d", m_ThreadID ); + //::LeaveCriticalSection( &m_CriticalSection ); + +#else + pthread_mutex_init( &m_Mutex, NULL ); +#endif +} + +// +template CSyncAccessRep::~CSyncAccessRep() +{ + ASSERT( m_counter <= 0 ); +#ifdef WIN32 + ::DeleteCriticalSection( &m_CriticalSection ); +#else + pthread_mutex_destroy( &m_Mutex ); +#endif +} + +// +template long CSyncAccessRep::incrRefCount() +{ +#ifdef WIN32 + return( ::InterlockedIncrement( &m_counter ) ); +#else + //printf( "incrRefCount(), m_counter = %d\n", m_counter ); + pthread_mutex_lock( &m_Mutex ); + m_counter++; + pthread_mutex_unlock( &m_Mutex ); + return( m_counter ); +#endif +} + +// +template long CSyncAccessRep::decrRefCount() +{ +#ifdef WIN32 + return( ::InterlockedDecrement( &m_counter ) ); +#else + //printf( "decrRefCount(), m_counter = %d\n", m_counter ); + pthread_mutex_lock( &m_Mutex ); + m_counter--; + pthread_mutex_unlock( &m_Mutex ); + return( m_counter ); +#endif +} + + +// Object of type ACCESS (CSyncAccess) will be automatically created on the stack. +template CSyncAccess CSyncAccessRep::getPointer() const { return( this ); } + +template T *CSyncAccessRep::getRealPointer() const { return( m_pRealPtr ); } +template bool CSyncAccessRep::isNull() const { return( m_pRealPtr == NULL ); } + +template void CSyncAccessRep::acquireAccess() +{ +#ifdef WIN32 + ::EnterCriticalSection( &m_CriticalSection ); + /*if( TryEnterCriticalSection( &m_CriticalSection ) != 0 ) + { + printf( "CS owned by %d...\n", m_ThreadID ); + } + else + m_ThreadID = GetCurrentThreadId();*/ +#else + pthread_mutex_lock( &m_Mutex ); +#endif +} + +// +template void CSyncAccessRep::releaseAccess() +{ +#ifdef WIN32 + m_ThreadID = 0; + ::LeaveCriticalSection( &m_CriticalSection ); +#else + pthread_mutex_unlock( &m_Mutex ); +#endif +} + + + +/* + CSyncRefCountRep. + Representation class for Reference Counting AND Thread Synchronization. +*/ +template class CSyncRefCountRep : public CSyncAccessRep +{ + public: + CSyncRefCountRep( const T *ptr ); + ~CSyncRefCountRep(); +}; + +// +template CSyncRefCountRep::CSyncRefCountRep( const T *ptr ) : CSyncAccessRep( ptr ) +{ +} + +// +template CSyncRefCountRep::~CSyncRefCountRep() +{ + ASSERT( this->m_counter <= 0 ); + // This is the only change needed to make in CSyncRefCountRep class to collect the garbage and + // in the same time to do Object Level Thread Synchronization. + delete( this->m_pRealPtr ); +} + +/* + CSyncAccess. + The SyncAccess class. It is used as an intermediary to achieve object Level Thread Synchronization. +*/ +template class CSyncAccess +{ + typedef CSyncAccessRep REP; + + REP *m_rep; + bool m_acquired; + + public: + CSyncAccess( const CSyncAccess &that ); + CSyncAccess( const CSyncAccess &that ); + CSyncAccess( const REP *rep ); + ~CSyncAccess(); + + T *operator -> (); +}; + +// +template CSyncAccess::CSyncAccess( const REP *rep ) : m_rep( (REP *)rep ), m_acquired( false ) +{ +} + +// +template CSyncAccess::CSyncAccess( const CSyncAccess &that ) : m_rep( that.m_rep ), m_acquired( false ) +{ +} + +// +template CSyncAccess::~CSyncAccess() +{ + if( m_acquired ) + m_rep->releaseAccess(); +} + +// +template T *CSyncAccess::operator -> () +{ + // This is checked by SmartPtr::operator -> () too. + ASSERT( (m_rep != NULL) && (! m_rep->isNull()) ); + + if( !m_acquired ) + { + m_rep->acquireAccess(); + m_acquired = true; + } + + return( m_rep->getRealPointer() ); +} + + + +/* + SmartPtrBase. + The SmartPtrBase class. +*/ +class SmartPtrBase +{ + public: + SmartPtrBase() : m_rep( NULL ) + {}; + + void *m_rep; +}; + +/* + SmartPtr. + +*/ +template class SmartPtr : public SmartPtrBase +{ + void IncrRefCount(); + void DecrRefCount(); + + protected: + + // Helper methods. + void CopyFrom( const SmartPtrBase &ptr ); + void CopyFrom( const T *ptr ); + + public: + SmartPtr(); + ~SmartPtr(); + + // + SmartPtr( const SmartPtr &ptr ); + SmartPtr( const T *ptr ); + SmartPtr( const SmartPtrBase &ptr ); + + // Assignment Operators + SmartPtr &operator = ( const SmartPtr &ptr ); + SmartPtr &operator = ( const T *ptr ); + SmartPtr &operator = ( const SmartPtrBase &ptr ); + + // Operators. + ACCESS operator -> (); + T &operator * (); + + // Casting operator. + operator T *(); + + // Comparison Operators. + bool operator == ( const SmartPtrBase &ptr ); + bool operator == ( const T *ptr ); + bool operator != ( const SmartPtrBase &ptr ); + bool operator != ( const T *ptr ); + + // Attributes. + bool IsNull() const; + long GetRefCount() const; + REP *GetRepPtr() const; +}; + +// +template SmartPtr::SmartPtr() +{ +} + +// +template SmartPtr::~SmartPtr() +{ + DecrRefCount(); +} + +// +template SmartPtr::SmartPtr( const SmartPtr &ptr ) + : SmartPtrBase() +{ + CopyFrom( ptr ); +} + +// +template SmartPtr::SmartPtr( const T *ptr ) + : SmartPtrBase() +{ + CopyFrom( ptr ); +} + +// +template SmartPtr::SmartPtr( const SmartPtrBase &ptr ) +{ + CopyFrom( ptr ); +} + +// +template void SmartPtr::CopyFrom( const SmartPtrBase &ptr ) +{ + if( m_rep != ptr.m_rep ) + { + DecrRefCount(); + m_rep = ptr.m_rep; + IncrRefCount(); + } +} + +// +template void SmartPtr::CopyFrom( const T *ptr ) +{ + DecrRefCount(); + m_rep = (ptr != NULL) ? new REP( ptr ) : NULL; + IncrRefCount(); +} + +// +template SmartPtr &SmartPtr::operator = ( const SmartPtr &ptr ) +{ + CopyFrom( ptr ); + return( *this ); +} + +// +template SmartPtr &SmartPtr::operator = ( const T *ptr ) +{ + CopyFrom( ptr ); + return( *this ); +} + +// +template SmartPtr &SmartPtr::operator = ( const SmartPtrBase &ptr ) +{ + CopyFrom( ptr ); + return( *this ); +} + +// +template ACCESS SmartPtr::operator -> () +{ + ASSERT( ! IsNull() ); + return( GetRepPtr()->getPointer() ); +} + +// +template T &SmartPtr::operator * () +{ + ASSERT( ! IsNull() ); + return( *(GetRepPtr()->getRealPointer()) ); +} + +// +template SmartPtr::operator T *() +{ + return( ( IsNull() ) ? NULL : GetRepPtr()->getRealPointer() ); +} + +// +template bool SmartPtr::operator == ( const SmartPtrBase &ptr ) +{ + return( m_rep == ptr.m_rep ); +} + +// +template bool SmartPtr::operator == ( const T *ptr ) +{ + if( ! IsNull() ) + { + return( GetRepPtr()->getRealPointer() == ptr ); + } + + return( ptr == NULL ); +} + +// +template bool SmartPtr::operator != ( const SmartPtrBase &ptr ) +{ + return( m_rep != ptr.m_rep ); +} + +// +template bool SmartPtr::operator != ( const T *ptr ) +{ + return( ! (operator ==( ptr )) ); +} + +// +template bool SmartPtr::IsNull() const +{ + return( m_rep == NULL ); +} + +// +template long SmartPtr::GetRefCount() const +{ + ASSERT( ! IsNull() ); + return( GetRepPtr()->m_counter ); +} + +// +template REP *SmartPtr::GetRepPtr() const +{ + return( (REP *)m_rep ); +} + +// +template void SmartPtr::IncrRefCount() +{ + if( ! IsNull() ) + GetRepPtr()->incrRefCount(); +} + +// +template void SmartPtr::DecrRefCount() +{ + if( ! IsNull() ) + { + if( GetRepPtr()->decrRefCount() <= 0 ) + { + REP *rep = (REP *)m_rep; + delete rep; + } + + m_rep = NULL; + } +} + +/* + CRefCountPtr. + Helper class for easier use of the SmartPtr class. +*/ +template, class ACCESS = T*> class CRefCountPtr : public SmartPtr +{ + public: + CRefCountPtr() {}; + ~CRefCountPtr() {}; + + // Copy constructor. + CRefCountPtr( const CRefCountPtr& ptr ) : SmartPtr( ptr ) + {}; + + // + CRefCountPtr( const SmartPtrBase& ptr ) : SmartPtr( ptr ) + {}; + + // + CRefCountPtr( const T* ptr ) : SmartPtr( ptr ) + {}; + + // Assignment Operators + CRefCountPtr& operator = ( const CRefCountPtr& ptr ) + { + SmartPtr::CopyFrom( ptr ); + return( *this ); + } + + // + CRefCountPtr &operator = ( const T *ptr ) + { + SmartPtr::CopyFrom( ptr ); + return( *this ); + } + + // + CRefCountPtr &operator = ( const SmartPtrBase &ptr ) + { + SmartPtr::CopyFrom( ptr ); + return( *this ); + } +}; + +/* + CSyncPtr. + Helper class for easier use of the SmartPtr class. +*/ +template, class ACCESS = CSyncAccess > class CSyncPtr : public SmartPtr +{ + public: + CSyncPtr() {}; + ~CSyncPtr() {}; + + // Copy constructor. + CSyncPtr( const CSyncPtr &ptr ) : SmartPtr( ptr ) + {}; + + // + CSyncPtr( const SmartPtrBase &ptr ) : SmartPtr( ptr ) + {}; + + // + CSyncPtr( const T *ptr ) : SmartPtr( ptr ) + {}; + + // Assignment Operators. + CSyncPtr &operator = ( const CSyncPtr &ptr ) + { + CopyFrom( ptr ); + return( *this ); + } + + // + CSyncPtr &operator = ( const T *ptr ) + { + CopyFrom( ptr ); + return( *this ); + } + + // + CSyncPtr &operator = ( const SmartPtrBase &ptr ) + { + SmartPtr::CopyFrom( ptr ); + return( *this ); + } +}; + +/* + CSyncRefCountPtr. + + Thread-synchronized reference-counted smart-pointer. +*/ +template, class ACCESS = CSyncAccess > class CSyncRefCountPtr : public SmartPtr +{ + public: + CSyncRefCountPtr() {}; + ~CSyncRefCountPtr() {}; + + // Copy constructor. + CSyncRefCountPtr( const CSyncRefCountPtr &ptr ) : SmartPtr( ptr ) + {}; + + // + CSyncRefCountPtr( const SmartPtrBase &ptr ) : SmartPtr( ptr ) + {}; + + // + CSyncRefCountPtr( const T *ptr ) : SmartPtr( ptr ) + {}; + + // Assignment Operators. + CSyncRefCountPtr &operator = ( const CSyncRefCountPtr &ptr ) + { + CopyFrom( ptr ); + return( *this ); + } + + // + CSyncRefCountPtr &operator = ( const T *ptr ) + { + CopyFrom( ptr ); + return( *this ); + } + + // + CSyncRefCountPtr &operator = ( const SmartPtrBase &ptr ) + { + SmartPtr::CopyFrom( ptr ); + return( *this ); + } +}; + + +/* + Forward declaration and smart pointer def. + + Example: + + class CRenderer; + + MakeSmartPointers( CRenderer ); + + spCRenderer m_spRenderer; // "smart" + "pointer" + class + tpCRenderer m_tpRenderer; // "thread" + "pointer" + class + tspCRenderer m_tspRenderer; // "thread" + "smart" + "pointer" + class +*/ +#define MakeSmartPointers(CBase) class CBase; \ + typedef Base::CRefCountPtr sp##CBase; \ + typedef Base::CSyncPtr tp##CBase; \ + typedef Base::CSyncRefCountPtr tsp##CBase; \ + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/Timer.h electricsheep-3.0.2-git20180325/Common/Timer.h --- electricsheep-2.7~b12+svn20091224/Common/Timer.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/Timer.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,95 @@ +#ifndef _TIMER_H_ + +#include "base.h" + +#define HIGHRES_UNIX_TIMER + +namespace Base +{ + +// Timer interface. +class ITimer +{ + public: + virtual ~ITimer() {}; + virtual void Reset() = PureVirtual; + virtual fp8 Time() = PureVirtual; + virtual fp8 Delta() = PureVirtual; + virtual fp8 Resolution() = PureVirtual; + //virtual void Wait( fp8 seconds ) = PureVirtual; +}; + +}; + +// Don't include any of these directly, they will typedef themselves to CTimer. +#ifdef WIN32 + #include "WTimer.h" +#else +#ifdef MAC + #include "MTimer.h" +#else +#ifdef HIGHRES_UNIX_TIMER + #include "XTimer.h" +#else +/* +namespace Base +{ + +class CTimer : public ITimer +{ + fp8 m_Time; // Current time in seconds. + fp8 m_Resolution; // Timer resolution in seconds. + clock_t m_TimeCounter; // Time counter in clocks. + clock_t m_DeltaCounter; // Delta counter in clocks. + + public: + CTImer() + { + m_Resolution = 1.0 / CLOCKS_PER_SEC; + Reset(); + } + + void Reset() + { + m_Time = 0; + m_TimeCounter = clock(); + m_DeltaCounter = m_TimeCounter; + } + + fp8 Time() + { + clock_t counter = std::clock(); + fp8 delta = ( counter - m_TimeCounter ) * m_Resolution; + m_TimeCounter = counter; + m_Time += delta; + return m_Time; + } + + fp8 Delta() + { + clock_t counter = std::clock(); + fp8 delta = ( counter - m_DeltaCounter ) * m_Resolution; + m_DeltaCounter = counter; + return delta; + } + + fp8 Resolution() { return m_Resolution; } + + static void Wait( fp8 _seconds ) + { + clock_t start = std::clock(); + clock_t finish = start + clock_t( _seconds / m_Resolution ); + while( std::clock() < finish ); + } +}; + +}; +*/ +#endif + +#endif + +#endif + +#define _TIMER_H_ // Define here so we can test for include mess. +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/WTimer.h electricsheep-3.0.2-git20180325/Common/WTimer.h --- electricsheep-2.7~b12+svn20091224/Common/WTimer.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/WTimer.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,69 @@ +#ifndef _WTIMER_H_ +#define _WTIMER_H_ + +#ifdef _TIMER_H_ +#error "WTimer.h included not from Timer.h" +#endif + +#include + +namespace Base +{ + +/* + CWTimer. +*/ +class CWTimer : public ITimer +{ + fp8 m_Time; // Current time in seconds. + int64 m_TimeCounter; // Raw 64bit timer counter for time. + int64 m_DeltaCounter; // Raw 64bit timer counter for delta. + int64 m_Frequency; // Raw 64bit timer frequency. + + public: + CWTimer() + { + QueryPerformanceFrequency( (LARGE_INTEGER *)&m_Frequency ); + Reset(); + } + + void Reset() + { + QueryPerformanceCounter( (LARGE_INTEGER *)&m_TimeCounter ); + m_DeltaCounter = m_TimeCounter; + m_Time = 0; + } + + fp8 Time() + { + int64 counter; + QueryPerformanceCounter( (LARGE_INTEGER *)&counter ); + m_Time += (fp8)(counter - m_TimeCounter) / (fp8)m_Frequency; + m_TimeCounter = counter; + return m_Time; + } + + fp8 Delta() + { + int64 counter; + QueryPerformanceCounter( (LARGE_INTEGER *)&counter ); + m_DeltaCounter = counter; + return (fp8)(counter - m_DeltaCounter) / (fp8)m_Frequency; + } + + fp8 Resolution() + { + return 1.0 / (fp8)m_Frequency; + } + + static void Wait( const fp8 _seconds ) + { + Sleep( int32(_seconds*1000) ); + } +}; + +typedef CWTimer CTimer; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Common/XTimer.h electricsheep-3.0.2-git20180325/Common/XTimer.h --- electricsheep-2.7~b12+svn20091224/Common/XTimer.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Common/XTimer.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,191 @@ +#ifndef _XTIMER_H_ +#define _XTIMER_H_ + +#ifdef _TIMER_H_ +#error "XTimer.h included not from Timer.h" +#endif + +#include +#include +#include +#include +#include + +//#define USE_RDTSC + +namespace Base +{ + namespace internal + { + static void Wait( fp8 _seconds ) + { + const fp8 floorSeconds = ::floor( _seconds ); + const fp8 fractionalSeconds = _seconds - floorSeconds; + + timespec timeOut; + timeOut.tv_sec = static_cast(floorSeconds); + timeOut.tv_nsec = static_cast(fractionalSeconds * 1e9); + + // Nanosleep may return earlier than expected if there's a signal + // That should be handled by the calling thread. If it happens, + // Sleep again. [Bramz] + timespec timeRemaining; + while( true ) + { + const int32 ret = nanosleep( &timeOut, &timeRemaining ); + if( ret == -1 && errno == EINTR ) + { + // There was only an sleep interruption, go back to sleep. + timeOut.tv_sec = timeRemaining.tv_sec; + timeOut.tv_nsec = timeRemaining.tv_nsec; + } + else + { + // We're done, or error. =) + return; + } + } + } + } + +#ifdef USE_RDTSC + +class CXTimer : public ITimer +{ + uint64 m_Start; + uint64 m_DeltaStart; + fp8 m_Resolution; + + static inline uint64_t Tick() + { + // x86_64 + //uint32 a, d; + //__asm__ __volatile__("rdtsc": "=a"(a), "=d"(d)); + //return (static_cast(d) << 32) | static_cast(a); + + // x86_32 + uint64 val; + __asm__ __volatile__("rdtsc": "=A"(val)); + return val; + } + + static fp8 DetermineResolution() + { + FILE *f = fopen( "/proc/cpuinfo", "r" ); + if( !f ) + return 0.0; + + const int32 bufferSize = 256; + char buffer[ bufferSize ]; + while( fgets(buffer, bufferSize, f) ) + { + fp4 frequency; + if( sscanf( buffer, "cpu MHz : %f", &frequency ) == 1 ) + { + fclose( f ); + return 1e-6 / static_cast(frequency); + } + } + fclose(f); + + return 0.0; + } + + public: + CXTimer() : m_Resolution( DetermineResolution() ) + { + Reset(); + } + + void Reset() + { + m_DeltaStart = m_Start = Tick(); + } + + fp8 Time() + { + const uint64_t now = Tick(); + return m_Resolution * (now - m_Start); + } + + fp8 Delta() + { + const uint64 now = Tick(); + const fp8 dt = m_Resolution * (now - m_DeltaStart); + m_DeltaStart = now; + return dt; + } + + fp8 Resolution() + { + return m_Resolution; + } + + static inline void Wait( fp8 _seconds ) + { + internal::Wait( _seconds ); + } +}; + +#else + +class CXTimer : public ITimer +{ + fp8 m_Start; + fp8 m_DeltaStart; + + static inline fp8 realTime() + { + timespec time; + if( clock_gettime( CLOCK_REALTIME, &time ) != 0 ) + return 0.0; + + return time.tv_sec + time.tv_nsec * 1e-9; + } + + public: + CXTimer() + { + Reset(); + } + + void Reset() + { + m_DeltaStart = m_Start = realTime(); + } + + fp8 Time() + { + return realTime() - m_Start; + } + + fp8 Delta() + { + const fp8 now = realTime(); + const fp8 dt = now - m_DeltaStart; + m_DeltaStart = now; + return dt; + } + + fp8 Resolution() + { + timespec res; + if( clock_getres( CLOCK_REALTIME, &res ) != 0 ) + return 0.0; + + return res.tv_sec + res.tv_nsec * 1e-9; + } + + static inline void Wait( fp8 _seconds ) + { + internal::Wait(_seconds); + } +}; + +#endif + +typedef CXTimer CTimer; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/config.guess electricsheep-3.0.2-git20180325/config.guess --- electricsheep-2.7~b12+svn20091224/config.guess 2002-12-12 09:33:34.000000000 +0000 +++ electricsheep-3.0.2-git20180325/config.guess 1970-01-01 00:00:00.000000000 +0000 @@ -1,890 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. -# -# This file 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. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - cat <dummy.s - .globl main - .ent main -main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` - exit 0 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit 0 ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 - exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc64:OpenBSD:*:*) - echo mips64el-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hkmips:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; - arm32:NetBSD:*:*) - echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - SR2?01:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit 0 ;; - NILE:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit 0 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit 0 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit 0 ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; - 2020:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit 0 ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit 0 ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit 0 ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit 0 ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi - exit 0 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit 0 ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit 0 ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit 0 ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit 0 ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) - echo i386-ibm-aix - exit 0 ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo rs6000-ibm-aix3.2.5 - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit 0 ;; - *:AIX:*:4) - if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=4.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit 0 ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit 0 ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit 0 ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit 0 ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit 0 ;; - 9000/[3478]??:HP-UX:*:*) - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; - 9000/8?? ) HP_ARCH=hppa1.0 ;; - esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; - 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - echo unknown-hitachi-hiuxwe2 - exit 0 ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit 0 ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit 0 ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit 0 ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit 0 ;; - i?86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit 0 ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit 0 ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit 0 ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit 0 ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit 0 ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - exit 0 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} - exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - i?86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - exit 0 ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin32 - exit 0 ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin32 - exit 0 ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; - *:Linux:*:*) - # uname on the ARM produces all sorts of strangeness, and we need to - # filter it out. - case "$UNAME_MACHINE" in - arm* | sa110*) UNAME_MACHINE="arm" ;; - esac - - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` - ld_supported_emulations=`echo $ld_help_string \ - | sed -ne '/supported emulations:/!d - s/[ ][ ]*/ /g - s/.*supported emulations: *// - s/ .*// - p'` - case "$ld_supported_emulations" in - i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; - i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; - sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; - elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; - esac - - if test "${UNAME_MACHINE}" = "alpha" ; then - sed 's/^ //' <dummy.s - .globl main - .ent main - main: - .frame \$30,0,\$26,0 - .prologue 0 - .long 0x47e03d80 # implver $0 - lda \$2,259 - .long 0x47e20c21 # amask $2,$1 - srl \$1,8,\$2 - sll \$2,2,\$2 - sll \$0,3,\$0 - addl \$1,\$0,\$0 - addl \$2,\$0,\$0 - ret \$31,(\$26),1 - .end main -EOF - LIBC="" - ${CC-cc} dummy.s -o dummy 2>/dev/null - if test "$?" = 0 ; then - ./dummy - case "$?" in - 7) - UNAME_MACHINE="alpha" - ;; - 15) - UNAME_MACHINE="alphaev5" - ;; - 14) - UNAME_MACHINE="alphaev56" - ;; - 10) - UNAME_MACHINE="alphapca56" - ;; - 16) - UNAME_MACHINE="alphaev6" - ;; - esac - - objdump --private-headers dummy | \ - grep ld.so.1 > /dev/null - if test "$?" = 0 ; then - LIBC="libc1" - fi - fi - rm -f dummy.s dummy - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 - elif test "${UNAME_MACHINE}" = "mips" ; then - cat >dummy.c </dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - else - # Either a pre-BFD a.out linker (linux-gnuoldld) - # or one that does not give us useful --help. - # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. - # If ld does not provide *any* "supported emulations:" - # that means it is gnuoldld. - echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" - test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 - - case "${UNAME_MACHINE}" in - i?86) - VENDOR=pc; - ;; - *) - VENDOR=unknown; - ;; - esac - # Determine whether the default compiler is a.out or elf - cat >dummy.c < -main(argc, argv) - int argc; - char *argv[]; -{ -#ifdef __ELF__ -# ifdef __GLIBC__ -# if __GLIBC__ >= 2 - printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -# else - printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); -# endif -#else - printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); -#endif - return 0; -} -EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) - echo i386-sequent-sysv4 - exit 0 ;; - i?86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} - fi - exit 0 ;; - i?86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit 0 ;; - pc:*:*:*) - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit 0 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit 0 ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit 0 ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit 0 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit 0 ;; - i?86:LynxOS:2.*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit 0 ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit 0 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit 0 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; - news*:NEWS-OS:*:6*) - echo mips-sony-newsos6 - exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit 0 ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -cat >dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - -#echo '(Unable to guess system type)' 1>&2 - -exit 1 diff -Nru electricsheep-2.7~b12+svn20091224/config.h.in electricsheep-3.0.2-git20180325/config.h.in --- electricsheep-2.7~b12+svn20091224/config.h.in 2007-05-27 23:58:07.000000000 +0000 +++ electricsheep-3.0.2-git20180325/config.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,82 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `expat' library (-lexpat). */ -#undef HAVE_LIBEXPAT - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `setproctitle' function. */ -#undef HAVE_SETPROCTITLE - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_MOUNT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STATVFS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_VFS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if the `setpgrp' function takes no argument. */ -#undef SETPGRP_VOID - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Version number of package */ -#undef VERSION - -/* Define to 1 if the X Window System is missing or not being used. */ -#undef X_DISPLAY_MISSING - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff -Nru electricsheep-2.7~b12+svn20091224/config.sub electricsheep-3.0.2-git20180325/config.sub --- electricsheep-2.7~b12+svn20091224/config.sub 2002-12-12 09:33:34.000000000 +0000 +++ electricsheep-3.0.2-git20180325/config.sub 1970-01-01 00:00:00.000000000 +0000 @@ -1,952 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file 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. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi - -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - linux-gnu*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) - os= - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco5) - os=sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ - | arme[lb] | pyramid | mn10200 | mn10300 \ - | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ - | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ - | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ - | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ - | mipstx39 | mipstx39el \ - | sparc | sparclet | sparclite | sparc64 | v850) - basic_machine=$basic_machine-unknown - ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i[34567]86) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ - | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ - | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ - | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ - | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ - | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* \ - | mipstx39-* | mipstx39el-* \ - | f301-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-cbm - ;; - amigaos | amigados) - basic_machine=m68k-cbm - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-cbm - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [ctj]90-cray) - basic_machine=c90-cray - os=-unicos - ;; - crds | unos) - basic_machine=m68k-crds - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - os=-mvs - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[34567]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i[34567]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i[34567]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i[34567]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - miniframe) - basic_machine=m68000-convergent - ;; - mipsel*-linux*) - basic_machine=mipsel-unknown - os=-linux-gnu - ;; - mips*-linux*) - basic_machine=mips-unknown - os=-linux-gnu - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - np1) - basic_machine=np1-gould - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pentium | p5 | k5 | nexen) - basic_machine=i586-pc - ;; - pentiumpro | p6 | k6 | 6x86) - basic_machine=i686-pc - ;; - pentiumii | pentium2) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | nexen-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | k6-* | 6x86-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=rs6000-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - xmp) - basic_machine=xmp-cray - os=-unicos - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - mips) - if [ x$os = x-linux-gnu ]; then - basic_machine=mips-unknown - else - basic_machine=mips-mips - fi - ;; - romp) - basic_machine=romp-ibm - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sparc) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -ctix* | -uts*) - os=-sysv - ;; - -ns2 ) - os=-nextstep2 - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -xenix) - os=-xenix - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - *-acorn) - os=-riscix1.2 - ;; - arm*-semi) - os=-aout - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-ibm) - os=-aix - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f301-fujitsu) - os=-uxpv - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -hpux*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -vxsim* | -vxworks*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os diff -Nru electricsheep-2.7~b12+svn20091224/configure electricsheep-3.0.2-git20180325/configure --- electricsheep-2.7~b12+svn20091224/configure 2009-07-02 03:06:30.000000000 +0000 +++ electricsheep-3.0.2-git20180325/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,7980 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63. -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell bug-autoconf@gnu.org about your system, - echo including any error possibly output before this message. - echo This can help us improve future autoconf versions. - echo Configuration will now proceed without shell functions. -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - - -exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="electricsheep.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -ac_subst_vars='LTLIBOBJS -LIBOBJS -X11_SHARE -libglade_LIBS -libglade_CFLAGS -PKG_CONFIG -X_EXTRA_LIBS -X_LIBS -X_PRE_LIBS -X_CFLAGS -XMKMF -EGREP -GREP -CPP -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_dependency_tracking -with_x -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -XMKMF -PKG_CONFIG -libglade_CFLAGS -libglade_LIBS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 - { (exit 1); exit 1; }; } - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { $as_echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { $as_echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 - { (exit 1); exit 1; }; } ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { $as_echo "$as_me: error: working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -X features: - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-option-checking ignore unrecognized --enable/--with options - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-x use the X Window System - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - XMKMF Path to xmkmf, Makefile generator for X Window System - PKG_CONFIG path to pkg-config utility - libglade_CFLAGS - C compiler flags for libglade, overriding pkg-config - libglade_LIBS - linker flags for libglade, overriding pkg-config - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -configure -generated by GNU Autoconf 2.63 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" -done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test -r "$ac_site_file"; then - { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_config_headers="$ac_config_headers config.h" - -am__api_version='1.10' - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file -# 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 conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $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". - { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -$as_echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -$as_echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:$LINENO: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE=electricsheep - VERSION="2.7b12" - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:$LINENO: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - -# Provide some information about the compiler. -$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -if test -z "$ac_file"; then - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; }; } -fi - -ac_exeext=$ac_cv_exeext - -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } - fi - fi -fi -{ $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest$ac_cv_exeext -{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:$LINENO: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:$LINENO: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval=$enable_dependency_tracking; -fi - -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - - case $depmode in - nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested - if test "x$enable_dependency_tracking" = xyes; then - continue - else - break - fi - ;; - none) break ;; - esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - -done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Broken: fails on valid input. -continue -fi - -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # Broken: success on invalid input. -continue -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - # Passes both tests. -ac_preproc_ok=: -break -fi - -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done -done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_stdc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then - : -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking for X" >&5 -$as_echo_n "checking for X... " >&6; } - - -# Check whether --with-x was given. -if test "${with_x+set}" = set; then - withval=$with_x; -fi - -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5 -$as_echo "$as_me: error: cannot use X directory names containing '" >&2;} - { (exit 1); exit 1; }; };; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then - $as_echo_n "(cached) " >&6 -else - # One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl dylib la dll; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /usr/lib64 | /lib | /lib64) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi - -# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - # We can compile using X headers with no special include directory. -ac_x_includes= -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done -fi - -rm -f conftest.err conftest.$ac_ext -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -int -main () -{ -XrmInitialize () - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries= -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS=$ac_save_LIBS -for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl dylib la dll; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi # $ac_x_libraries = no - -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac -fi -;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - { $as_echo "$as_me:$LINENO: result: $have_x" >&5 -$as_echo "$have_x" >&6; } - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -$as_echo "libraries $x_libraries, headers $x_includes" >&6; } -fi - -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - -cat >>confdefs.h <<\_ACEOF -#define X_DISPLAY_MISSING 1 -_ACEOF - - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5 -$as_echo_n "checking whether -R must be followed by a space... " >&6; } - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - ac_xsave_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - X_LIBS="$X_LIBS -R$x_libraries" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS="$ac_xsave_LIBS -R $x_libraries" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - X_LIBS="$X_LIBS -R $x_libraries" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: result: neither works" >&5 -$as_echo "neither works" >&6; } -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - ac_c_werror_flag=$ac_xsave_c_werror_flag - LIBS=$ac_xsave_LIBS - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn Johnson says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And Karl Berry says - # the Alpha needs dnet_stub (dnet does not exist). - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XOpenDisplay (); -int -main () -{ -return XOpenDisplay (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } -if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dnet_dnet_ntoa=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_dnet_ntoa=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" -fi - - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5 -$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } -if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldnet_stub $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dnet_ntoa (); -int -main () -{ -return dnet_ntoa (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_dnet_stub_dnet_ntoa=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dnet_stub_dnet_ntoa=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 -$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } -if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" -fi - - fi -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$ac_xsave_LIBS" - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 -$as_echo_n "checking for gethostbyname... " >&6; } -if test "${ac_cv_func_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. - For example, HP-UX 11i declares gettimeofday. */ -#define gethostbyname innocuous_gethostbyname - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char gethostbyname (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef gethostbyname - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_gethostbyname || defined __stub___gethostbyname -choke me -#endif - -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_gethostbyname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_gethostbyname=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 -$as_echo "$ac_cv_func_gethostbyname" >&6; } - - if test $ac_cv_func_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 -$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } -if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_nsl_gethostbyname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_gethostbyname=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 -$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } -if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" -fi - - if test $ac_cv_lib_nsl_gethostbyname = no; then - { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5 -$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } -if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lbsd $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char gethostbyname (); -int -main () -{ -return gethostbyname (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_bsd_gethostbyname=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_bsd_gethostbyname=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5 -$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } -if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" -fi - - fi - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says Simon Leinen: it contains gethostby* - # variants that don't use the name server (or something). -lsocket - # must be given before -lnsl if both are needed. We assume that - # if connect needs -lnsl, so does gethostbyname. - { $as_echo "$as_me:$LINENO: checking for connect" >&5 -$as_echo_n "checking for connect... " >&6; } -if test "${ac_cv_func_connect+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define connect to an innocuous variant, in case declares connect. - For example, HP-UX 11i declares gettimeofday. */ -#define connect innocuous_connect - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char connect (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef connect - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_connect || defined __stub___connect -choke me -#endif - -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_connect=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_connect=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 -$as_echo "$ac_cv_func_connect" >&6; } - - if test $ac_cv_func_connect = no; then - { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 -$as_echo_n "checking for connect in -lsocket... " >&6; } -if test "${ac_cv_lib_socket_connect+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocket $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char connect (); -int -main () -{ -return connect (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_socket_connect=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_connect=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 -$as_echo "$ac_cv_lib_socket_connect" >&6; } -if test "x$ac_cv_lib_socket_connect" = x""yes; then - X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" -fi - - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. - { $as_echo "$as_me:$LINENO: checking for remove" >&5 -$as_echo_n "checking for remove... " >&6; } -if test "${ac_cv_func_remove+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define remove to an innocuous variant, in case declares remove. - For example, HP-UX 11i declares gettimeofday. */ -#define remove innocuous_remove - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char remove (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef remove - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_remove || defined __stub___remove -choke me -#endif - -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_remove=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_remove=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5 -$as_echo "$ac_cv_func_remove" >&6; } - - if test $ac_cv_func_remove = no; then - { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5 -$as_echo_n "checking for remove in -lposix... " >&6; } -if test "${ac_cv_lib_posix_remove+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lposix $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char remove (); -int -main () -{ -return remove (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_posix_remove=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_posix_remove=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5 -$as_echo "$ac_cv_lib_posix_remove" >&6; } -if test "x$ac_cv_lib_posix_remove" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" -fi - - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - { $as_echo "$as_me:$LINENO: checking for shmat" >&5 -$as_echo_n "checking for shmat... " >&6; } -if test "${ac_cv_func_shmat+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define shmat to an innocuous variant, in case declares shmat. - For example, HP-UX 11i declares gettimeofday. */ -#define shmat innocuous_shmat - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char shmat (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef shmat - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_shmat || defined __stub___shmat -choke me -#endif - -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_func_shmat=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func_shmat=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5 -$as_echo "$ac_cv_func_shmat" >&6; } - - if test $ac_cv_func_shmat = no; then - { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5 -$as_echo_n "checking for shmat in -lipc... " >&6; } -if test "${ac_cv_lib_ipc_shmat+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lipc $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shmat (); -int -main () -{ -return shmat (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_ipc_shmat=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ipc_shmat=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5 -$as_echo "$ac_cv_lib_ipc_shmat" >&6; } -if test "x$ac_cv_lib_ipc_shmat" = x""yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" -fi - - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS=$LDFLAGS - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry - { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5 -$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } -if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lICE $X_EXTRA_LIBS $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char IceConnectionNumber (); -int -main () -{ -return IceConnectionNumber (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_ICE_IceConnectionNumber=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_ICE_IceConnectionNumber=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 -$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } -if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then - X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" -fi - - LDFLAGS=$ac_save_LDFLAGS - -fi - -{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -$as_echo_n "checking for an ANSI C-conforming const... " >&6; } -if test "${ac_cv_c_const+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -int -main () -{ -/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_c_const=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -$as_echo "$ac_cv_c_const" >&6; } -if test $ac_cv_c_const = no; then - -cat >>confdefs.h <<\_ACEOF -#define const /**/ -_ACEOF - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:$LINENO: checking for size_t" >&5 -$as_echo_n "checking for size_t... " >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_cv_type_size_t=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof (size_t)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -if (sizeof ((size_t))) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=yes -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -$as_echo "$ac_cv_type_size_t" >&6; } -if test "x$ac_cv_type_size_t" = x""yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_header_time=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF - -fi - - - - -for ac_header in sys/mount.h sys/vfs.h sys/statvfs.h -do -as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 -$as_echo_n "checking $ac_header usability... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 -$as_echo_n "checking $ac_header presence... " >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 -$as_echo_n "checking for $ac_header... " >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - -fi -as_val=`eval 'as_val=${'$as_ac_Header'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - -{ $as_echo "$as_me:$LINENO: checking for XML_ParserCreate in -lexpat" >&5 -$as_echo_n "checking for XML_ParserCreate in -lexpat... " >&6; } -if test "${ac_cv_lib_expat_XML_ParserCreate+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lexpat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char XML_ParserCreate (); -int -main () -{ -return XML_ParserCreate (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_expat_XML_ParserCreate=yes -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_expat_XML_ParserCreate=no -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_expat_XML_ParserCreate" >&5 -$as_echo "$ac_cv_lib_expat_XML_ParserCreate" >&6; } -if test "x$ac_cv_lib_expat_XML_ParserCreate" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBEXPAT 1 -_ACEOF - - LIBS="-lexpat $LIBS" - -else - { { $as_echo "$as_me:$LINENO: error: The expat xml library is required." >&5 -$as_echo "$as_me: error: The expat xml library is required." >&2;} - { (exit 1); exit 1; }; } -fi - -{ $as_echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 -$as_echo_n "checking whether setpgrp takes no argument... " >&6; } -if test "${ac_cv_func_setpgrp_void+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then - { { $as_echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5 -$as_echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -/* If this system has a BSD-style setpgrp which takes arguments, - setpgrp(1, 1) will fail with ESRCH and return -1, in that case - exit successfully. */ - return setpgrp (1,1) != -1; - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_setpgrp_void=no -else - $as_echo "$as_me: program exited with status $ac_status" >&5 -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_setpgrp_void=yes -fi -rm -rf conftest.dSYM -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 -$as_echo "$ac_cv_func_setpgrp_void" >&6; } -if test $ac_cv_func_setpgrp_void = yes; then - -cat >>confdefs.h <<\_ACEOF -#define SETPGRP_VOID 1 -_ACEOF - -fi - - -for ac_func in setproctitle -do -as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 -$as_echo_n "checking for $ac_func... " >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - eval "$as_ac_var=yes" -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -as_val=`eval 'as_val=${'$as_ac_var'} - $as_echo "$as_val"'` - if test "x$as_val" = x""yes; then - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -X11_PREFIX=`pkg-config --print-errors --variable=prefix x11` -X11_SHARE="$X11_PREFIX/share" - - - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi - -fi - -pkg_failed=no -{ $as_echo "$as_me:$LINENO: checking for libglade" >&5 -$as_echo_n "checking for libglade... " >&6; } - -if test -n "$PKG_CONFIG"; then - if test -n "$libglade_CFLAGS"; then - pkg_cv_libglade_CFLAGS="$libglade_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_libglade_CFLAGS=`$PKG_CONFIG --cflags "libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi -if test -n "$PKG_CONFIG"; then - if test -n "$libglade_LIBS"; then - pkg_cv_libglade_LIBS="$libglade_LIBS" - else - if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0\"") >&5 - ($PKG_CONFIG --exists --print-errors "libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - pkg_cv_libglade_LIBS=`$PKG_CONFIG --libs "libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0" 2>/dev/null` -else - pkg_failed=yes -fi - fi -else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - libglade_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0"` - else - libglade_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0"` - fi - # Put the nasty error message in config.log where it belongs - echo "$libglade_PKG_ERRORS" >&5 - - { { $as_echo "$as_me:$LINENO: error: Package requirements (libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0) were not met: - -$libglade_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables libglade_CFLAGS -and libglade_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&5 -$as_echo "$as_me: error: Package requirements (libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0) were not met: - -$libglade_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables libglade_CFLAGS -and libglade_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. -" >&2;} - { (exit 1); exit 1; }; } -elif test $pkg_failed = untried; then - { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables libglade_CFLAGS -and libglade_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&5 -$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables libglade_CFLAGS -and libglade_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; }; } -else - libglade_CFLAGS=$pkg_cv_libglade_CFLAGS - libglade_LIBS=$pkg_cv_libglade_LIBS - { $as_echo "$as_me:$LINENO: result: yes" >&5 -$as_echo "yes" >&6; } - : -fi - - - - -ac_config_files="$ac_config_files Makefile" - -ac_config_files="$ac_config_files electricsheep.desktop" - -ac_config_files="$ac_config_files electricsheep.xml" - -ac_config_files="$ac_config_files electricsheep.spec" - -ac_config_files="$ac_config_files electricsheep.man" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -p' - fi -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by $as_me, which was -generated by GNU Autoconf 2.63. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTION]... [FILE]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.63, - with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2008 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - { $as_echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { $as_echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "electricsheep.desktop") CONFIG_FILES="$CONFIG_FILES electricsheep.desktop" ;; - "electricsheep.xml") CONFIG_FILES="$CONFIG_FILES electricsheep.xml" ;; - "electricsheep.spec") CONFIG_FILES="$CONFIG_FILES electricsheep.spec" ;; - "electricsheep.man") CONFIG_FILES="$CONFIG_FILES electricsheep.man" ;; - - *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - $as_echo "$as_me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=' ' -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\).*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\).*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 -$as_echo "$as_me: error: could not setup config files machinery" >&2;} - { (exit 1); exit 1; }; } -_ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then - break - elif $ac_last_try; then - { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 -$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 -$as_echo "$as_me: error: could not setup config headers machinery" >&2;} - { (exit 1); exit 1; }; } -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 -$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 -$as_echo "$as_me: error: could not create $ac_file" >&2;} - { (exit 1); exit 1; }; } - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 -$as_echo "$as_me: error: could not create -" >&2;} - { (exit 1); exit 1; }; } - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files - # are listed without --file. Let's play safe and only enable the eval - # if we detect the quoting. - case $CONFIG_FILES in - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. We invoke sed twice because it is the - # simplest approach to changing $(DEPDIR) to its actual value in the - # expansion. - for file in `sed -n " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - - esac -done # for ac_tag - - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff -Nru electricsheep-2.7~b12+svn20091224/configure.ac electricsheep-3.0.2-git20180325/configure.ac --- electricsheep-2.7~b12+svn20091224/configure.ac 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/configure.ac 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,347 @@ +gdnl Process this file with autoconf to produce a configure script. +AC_PREREQ(2.57) + +ifdef([m4_pattern_allow], + [m4_pattern_allow([^AC_.*])]) + +AC_INIT(electricsheep,2.7b33-svn,http://code.google.com/p/electricsheep/issues/list) +AC_CANONICAL_HOST +AC_CANONICAL_TARGET + + +AC_CONFIG_SRCDIR([Makefile.am]) +AM_INIT_AUTOMAKE([1.9 tar-pax dist-bzip2]) + +AM_MAINTAINER_MODE + +dnl Uncomment next line to have it build in /usr by default rather than /usr/local +dnl AC_PREFIX_DEFAULT(/usr) + +AC_GNU_SOURCE +AC_ISC_POSIX +AC_PROG_INSTALL +AC_PROG_CC +AC_PROG_CXX + +dnl AC_CONFIG_MACRO_DIR([m4]) + +AC_LIBTOOL_DLOPEN +AC_PROG_LIBTOOL +AM_PROG_CC_STDC +AM_PROG_CC_C_O +AC_HEADER_STDC +AC_C_BIGENDIAN +AC_C_CONST +AC_C_INLINE +AC_SYS_LARGEFILE + +AM_PROG_AS + +ACX_PTHREAD(PTHREAD_OK=true,PTHREAD_OK=false) + +IS_LINUX_GNU="false" + +case "{$target_os}" in + *linux-gnu*) + IS_LINUX_GNU="true" + echo "O/S is GNU/Linux" + ;; + *) + ;; +esac + +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + +if test x$PKG_CONFIG = xno; then + AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH]) +fi + + +AM_CONDITIONAL(IS_LINUX_GNU,$IS_LINUX_GNU) + +dnl Use -Wall if we have gcc. +changequote(,)dnl +if test "x$GCC" = "xyes"; then + case " $CFLAGS " in + *[\ \ ]-Wall[\ \ ]*) ;; + *) CFLAGS="$CFLAGS -Wall" ;; + esac +fi +changequote([,])dnl + + + +dnl Check for WXWidgets +WX_VER_291="" + +AC_PATH_PROGS(WX_CONFIG, [wx-config-2.9 wx-config], no) + +if test x$WX_CONFIG != xno; then + WX_VERSION=`$WX_CONFIG --version` + + WX_MAJOR=${WX_VERSION%%.*}; + WX_MINOR=${WX_VERSION#*.}; + WX_MINOR=${WX_MINOR%%.*}; + WX_MICRO=${WX_VERSION##*.}; + + if test $WX_MAJOR -gt 2; then + WX_VER_291=yes + else + if test $WX_MAJOR -eq 2; then + if test $WX_MINOR -gt 9; then + WX_VER_291=yes + else + if test $WX_MINOR -eq 9; then + if test $WX_MICRO -ge 1; then + WX_VER_291=yes + fi + fi + fi + fi + fi +fi + +if test "$WX_VER_291" != "yes"; then + + dnl Use static version + echo "installed version of wx is too old," + + AC_MSG_ERROR([Please install development libraries for wxWidgets 2.9.1 or higher, and then run this configure script again.]) +fi + +WX_CXXFLAGS="`$WX_CONFIG --cxxflags`" +WX_LIBS="-static `$WX_CONFIG --libs` `$WX_CONFIG --libs richtext`" + +echo "WX_CXXFLAGS is $WX_CXXFLAGS" +echo "WX_LIBS is $WX_LIBS" + +WX_LDADD="$WX_LIBS" + +AC_SUBST(WX_CXXFLAGS) +AC_SUBST(WX_LDADD) + + + +dnl Check for avcodec + + +PKG_CHECK_MODULES([AVCODEC],[libavcodec]) + +dnl Check for avcodec_decode_video2 +AC_CHECK_LIB([avcodec],[avcodec_decode_video2],HAVE_AVC_VID2=true,HAVE_AVC_VID2=false) + +AM_CONDITIONAL(HAVE_AVC_VID2,$HAVE_AVC_VID2) + +AC_SUBST(AVCODEC_CFLAGS) +AC_SUBST(AVCODEC_LIBS) + + + +dnl Check for avformat + +PKG_CHECK_MODULES(AVFORMAT,libavformat) + +AC_SUBST(AVFORMAT_CFLAGS) +AC_SUBST(AVFORMAT_LIBS) + +AC_CHECK_LIB([avformat], [av_open_input_file], AC_DEFINE([USE_OLD_FFMPEG_API]), AC_DEFINE([USE_NEW_FFMPEG_API])) + +dnl Check for swscale + +PKG_CHECK_MODULES(SWSCALE,libswscale) + +AC_SUBST(SWSCALE_CFLAGS) +AC_SUBST(SWSCALE_LIBS) + + +dnl Check for avutil + +PKG_CHECK_MODULES(AVUTIL,libavutil) + +AC_SUBST(AVUTIL_CFLAGS) +AC_SUBST(AVUTIL_LIBS) + + +dnl Check for lua + +PKG_CHECK_MODULES([LUA], [lua5.1],, + [PKG_CHECK_MODULES([LUA], [lua >= 5.1]) +]) + +AC_SUBST(LUA_CFLAGS) +AC_SUBST(LUA_LIBS) + + + +dnl Check for glee + +PKG_CHECK_MODULES([GLEE],[glee], [HAVE_GLEE=true] , [HAVE_GLEE=false] ) +if test "$HAVE_GLEE" = "false"; then + + PKG_CHECK_MODULES([GLEE],[GLee], [HAVE_GLEE=true] , [HAVE_GLEE=false] ) + if test "$HAVE_GLEE" = "false"; then + AC_MSG_CHECKING(for GLee.h) + AC_CHECK_HEADERS(GLee.h GL/GLee.h) + + if test "x$ac_cv_header_GLee_h" = "xno"; then + if test "xac_cv_header_GL_GLee_h" = "xno"; then + AC_MSG_ERROR([neither GLee.h nor GL/GLee.h were found. Please make sure you have GLee.h installed in your include path.]) + fi + dnl found GLee.h in GL subdir + GLEE_CFLAGS="-I $includedir/GL -I/usr/include/GL" + fi + + AC_CHECK_LIB([GLee],[main],GLEE_LIBS="-lGLee", + AC_CHECK_LIB([glee],[main],GLEE_LIBS="-lglee",,)) + + fi + +fi +AC_SUBST(GLEE_CFLAGS) +AC_SUBST(GLEE_LIBS) + + +dnl Check for curl + +PKG_CHECK_MODULES(CURL,libcurl) + +AC_SUBST(CURL_CFLAGS) +AC_SUBST(CURL_LIBS) + + +dnl Check for libpng + +PKG_CHECK_MODULES(PNG,libpng) + +AC_SUBST(PNG_CFLAGS) +AC_SUBST(PNG_LIBS) + + + +dnl Check for Xrender + +PKG_CHECK_MODULES(XRENDER,xrender) + +AC_SUBST(XRENDER_CFLAGS) +AC_SUBST(XRENDER_LIBS) + + +# Check for flam3-animate +AC_PATH_PROG(FLAM3_ANIMATE, flam3-animate, no) +if test x$FLAM3_ANIMATE = xno; then + AC_MSG_ERROR([Cannot find flam3-animate, make sure it is installed and in your PATH]) +fi + + +dnl Check for libgtop-2.0 + +PKG_CHECK_MODULES(LIBGTOP,libgtop-2.0) + +AC_SUBST(LIBGTOP_CFLAGS) +AC_SUBST(LIBGTOP_LIBS) + + +dnl Checks for boost +AC_LANG_PUSH([C++]) + +dnl Check boost version + +REQ_BOOST_VERSION=103900 +AC_MSG_CHECKING(for libboost >= 1.39) + +AC_RUN_IFELSE([ + AC_LANG_PROGRAM( + [ + #include + #include + ], + [dnl +#if BOOST_VERSION >= $REQ_BOOST_VERSION + std::ofstream ofs("conftest.out"); + ofs << BOOST_VERSION / 100000 << '.' << BOOST_VERSION / 100 % 1000; +#else +# error Boost version is too old +#endif + ])], + [ + BOOST_VERSION=`cat conftest.out` + AC_MSG_RESULT(yes) + succeeded=yes + found_system=yes + ], + []) + +AC_LANG_POP([C++]) + + +dnl Check result of boost version +if test "x$succeeded" != "xyes"; then + AC_MSG_ERROR([libboost version 1.41 or higher is required to compile electricsheep.]) +fi + + +AC_LANG_PUSH([C++]) + +dnl Check for boost/thread.hpp +AC_CHECK_HEADER([boost/thread.hpp],, + [AC_MSG_ERROR([you must install libboost-thread to compile electricsheep.]) +]) + +AC_CHECK_LIB([boost_thread],[main],, + [AC_MSG_ERROR([you must install libboost-thread to compile electricsheep.]) +]) + + +dnl Check for boost/filesystem.hpp +AC_CHECK_HEADER([boost/filesystem.hpp],, + [AC_MSG_ERROR([you must install libboost-filesystem to compile electricsheep.]) +]) + +AC_CHECK_LIB([boost_filesystem],[main],, + [AC_MSG_ERROR([you must install libboost-filesystem to compile electricsheep.]) +]) + +dnl Check for boost/system/config.hpp +AC_CHECK_HEADER([boost/system/config.hpp],, + [AC_MSG_ERROR([you must install libboost-system to compile electricsheep.]) +]) + +AC_CHECK_LIB([boost_system],[main],, + [AC_MSG_ERROR([you must install libboost-system to compile electricsheep.]) +]) + +AC_LANG_POP([C++]) + + + +BOOST_LDADD="-lboost_system" + +AC_SUBST(BOOST_LDADD) + + +dnl Check for libtinyxml +AC_CHECK_LIB([tinyxml],[main],, + [AC_MSG_ERROR([you must install libtinyxml dev to compile electricsheep.]) +]) + +dnl Check for libglut +AC_CHECK_LIB([glut],[glutMainLoop],, + [AC_MSG_ERROR([you must install libglut dev to compile electricsheep.]) +]) + + +AC_CHECK_LIB([GL],[glXCreateNewContext],, + [AC_MSG_ERROR([you must install libGL to compile electricsheep.]) +]) + +AC_CHECK_LIB([rt],[clock_gettime],, + [AC_MSG_ERROR([you must install librt to compile electricsheep.]) +]) + + + +AC_OUTPUT([ +Makefile +Client/Makefile +MSVC/SettingsGUI/Makefile +]) diff -Nru electricsheep-2.7~b12+svn20091224/configure.in electricsheep-3.0.2-git20180325/configure.in --- electricsheep-2.7~b12+svn20091224/configure.in 2009-07-02 03:06:30.000000000 +0000 +++ electricsheep-3.0.2-git20180325/configure.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,35 +0,0 @@ -dnl $Id: configure.in,v 1.55 2008/05/16 20:16:41 spotspot Exp $ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT -AC_CONFIG_SRCDIR([electricsheep.c]) -AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE(electricsheep,"2.7b12") -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_MAKE_SET -AC_PROG_MKDIR_P -AC_HEADER_STDC -AC_PATH_XTRA -AC_C_CONST -AC_TYPE_SIZE_T -AC_HEADER_TIME -AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/statvfs.h) -AC_CHECK_LIB([expat],[XML_ParserCreate],,[AC_MSG_ERROR([The expat xml library is required.])]) -AC_FUNC_SETPGRP -AC_CHECK_FUNCS(setproctitle) - -X11_PREFIX=`pkg-config --print-errors --variable=prefix x11` -X11_SHARE="$X11_PREFIX/share" - -PKG_CHECK_MODULES(libglade, libglade-2.0 >= 2.5.0 gtk+-2.0 >= 2.7.0) -AC_SUBST(libglade_CFLAGS) -AC_SUBST(libglade_LIBS) - -AC_SUBST(X11_SHARE) -AC_CONFIG_FILES([Makefile ]) -AC_CONFIG_FILES([electricsheep.desktop ]) -AC_CONFIG_FILES([electricsheep.xml ]) -AC_CONFIG_FILES([electricsheep.spec ]) -AC_CONFIG_FILES([electricsheep.man ]) -AC_OUTPUT diff -Nru electricsheep-2.7~b12+svn20091224/ContentDecoder/ContentDecoder.cbp electricsheep-3.0.2-git20180325/ContentDecoder/ContentDecoder.cbp --- electricsheep-2.7~b12+svn20091224/ContentDecoder/ContentDecoder.cbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDecoder/ContentDecoder.cbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,110 @@ + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/ContentDecoder/ContentDecoder.cpp electricsheep-3.0.2-git20180325/ContentDecoder/ContentDecoder.cpp --- electricsheep-2.7~b12+svn20091224/ContentDecoder/ContentDecoder.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDecoder/ContentDecoder.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,915 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include "ContentDecoder.h" +#include "Playlist.h" +#include "Log.h" +#include "Timer.h" +#include "Settings.h" + +using namespace boost; + +namespace ContentDecoder +{ + +/* + CContentDecoder. + +*/ +CContentDecoder::CContentDecoder( spCPlaylist _spPlaylist, bool _bStartByRandom, bool _bCalculateTransitions, const uint32 _queueLenght, AVPixelFormat _wantedFormat ) +{ + g_Log->Info( "CContentDecoder()" ); + m_FadeCount = static_cast(g_Settings()->Get("settings.player.fadecount", 30)); + // We want errors! + av_log_set_level( AV_LOG_ERROR ); + + // Register all formats and codecs. + av_register_all(); + + m_pScaler = NULL; + m_ScalerWidth = 0; + m_ScalerHeight = 0; + + m_bStartByRandom = _bStartByRandom; + + m_bCalculateTransitions = _bCalculateTransitions; + + m_pDecoderThread = NULL; + + m_FrameQueue.setMaxQueueElements(_queueLenght); + + m_NextSheepQueue.setMaxQueueElements(10); + + m_WantedPixelFormat = _wantedFormat; + + m_bStop = true; + + m_spPlaylist = _spPlaylist; + + m_bForceNext = false; + + m_sharedFrame = NULL; + + m_Initialized = false; + m_NoSheeps = true; + + m_FadeIn = m_FadeCount; + m_FadeOut = 0; + m_prevLast = 0; + + m_MainVideoInfo = NULL;//new sMainVideoInfo(); + m_SecondVideoInfo = NULL; +} + +/* +*/ +CContentDecoder::~CContentDecoder() +{ +} + +/* +*/ +void CContentDecoder::Destroy() +{ + g_Log->Info( "Destroy()" ); + + if (m_MainVideoInfo != NULL) + { + SAFE_DELETE(m_MainVideoInfo); + } + + if (m_SecondVideoInfo != NULL) + { + SAFE_DELETE(m_SecondVideoInfo); + } + + if( m_pScaler ) + { + g_Log->Info( "deleting m_pScalar" ); + sws_freeContext( m_pScaler ); + m_pScaler = NULL; + } +} + +/* + DumpError(). + +*/ +int CContentDecoder::DumpError( int _err ) +{ + if( _err < 0 ) + { + switch( _err ) + { + case AVERROR_INVALIDDATA: g_Log->Error( "Error while parsing header" ); break; + case AVERROR(EIO): g_Log->Error( "I/O error occured. Usually that means that input file is truncated and/or corrupted." ); break; + case AVERROR(ENOMEM): g_Log->Error( "Memory allocation error occured" ); break; + case AVERROR(ENOENT): /*g_Log->Error( "No such file or directory" ); legal, will be warned in Open()*/ break; + default: g_Log->Error( "Error while opening file" ); break; + } + } + + return _err; +} + +/* +*/ +bool CContentDecoder::Open( sOpenVideoInfo *ovi ) +{ + if (ovi == NULL) + return false; + + boost::filesystem::path sys_name( ovi->m_Path ); + + const std::string &_filename = sys_name.string(); + + ovi->m_iCurrentFileFrameCount = 0; + ovi->m_totalFrameCount = 0; + struct stat fs; + if ( !::stat( _filename.c_str(), &fs ) ) + { + ovi->m_CurrentFileatime = fs.st_atime; + } + g_Log->Info( "Opening: %s", _filename.c_str() ); + + //Destroy(); + +#ifdef USE_NEW_FFMPEG_API + if( DumpError( avformat_open_input( &ovi->m_pFormatContext, _filename.c_str(), NULL, NULL ) ) < 0 ) +#else + if( DumpError( av_open_input_file( &ovi->m_pFormatContext, _filename.c_str(), NULL, 0, NULL ) ) < 0 ) +#endif + { + g_Log->Warning( "Failed to open %s...", _filename.c_str() ); + return false; + } + +#ifdef USE_NEW_FFMPEG_API + if( DumpError( avformat_find_stream_info( ovi->m_pFormatContext, NULL ) ) < 0 ) +#else + if( DumpError( av_find_stream_info( ovi->m_pFormatContext ) ) < 0 ) +#endif + { + g_Log->Error( "av_find_stream_info failed with %s...", _filename.c_str() ); + return false; + } + + //dump_format( m_pFormatContext, 0, _filename.c_str(), false ); + + // Find video stream; + ovi->m_VideoStreamID = -1; + for( uint32 i=0; im_pFormatContext->nb_streams; i++ ) + { + if( ovi->m_pFormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO ) + { + ovi->m_pVideoStream = ovi->m_pFormatContext->streams[i]; + ovi->m_VideoStreamID = static_cast(i); + break; + } + } + + if( ovi->m_VideoStreamID == -1 ) + { + g_Log->Error( "Could not find video stream in %s", _filename.c_str() ); + return false; + } + + // Find video codec. + ovi->m_pVideoCodecContext = ovi->m_pFormatContext->streams[ ovi->m_VideoStreamID ]->codec; + if( ovi->m_pVideoCodecContext == NULL ) + { + g_Log->Error( "Video CodecContext not found for %s", _filename.c_str() ); + return false; + } + + ovi->m_pVideoCodec = avcodec_find_decoder( ovi->m_pVideoCodecContext->codec_id ); + + if( ovi->m_pVideoCodec == NULL ) + { + ovi->m_pVideoCodecContext = NULL; + g_Log->Error( "Video Codec not found for %s", _filename.c_str() ); + return false; + } + + //m_pVideoCodecContext->workaround_bugs = 1; + //m_pFormatContext->flags |= AVFMT_FLAG_GENPTS; // Generate pts if missing even if it requires parsing future frames. + ovi->m_pFormatContext->flags |= AVFMT_FLAG_IGNIDX; // Ignore index. + //m_pFormatContext->flags |= AVFMT_FLAG_NONBLOCK; // Do not block when reading packets from input. + +#ifdef USE_NEW_FFMPEG_API + if( DumpError( avcodec_open2( ovi->m_pVideoCodecContext, ovi->m_pVideoCodec, NULL ) ) < 0 ) +#else + if( DumpError( avcodec_open( ovi->m_pVideoCodecContext, ovi->m_pVideoCodec ) ) < 0 ) +#endif + { + g_Log->Error( "avcodec_open failed for %s", _filename.c_str() ); + return false; + } + +#ifdef USE_NEW_FFMPEG_ALLOC_API + ovi->m_pFrame = av_frame_alloc(); +#else + ovi->m_pFrame = avcodec_alloc_frame(); +#endif + + if (ovi->m_pVideoStream->nb_frames > 0) + ovi->m_totalFrameCount = static_cast(ovi->m_pVideoStream->nb_frames); + else + ovi->m_totalFrameCount = uint32(((((double)ovi->m_pFormatContext->duration/(double)AV_TIME_BASE)) / av_q2d(ovi->m_pVideoStream->avg_frame_rate) + .5)); + + ovi->m_ReadingTrailingFrames = false; + + g_Log->Info( "Open done()" ); + + return true; +} + +/* +*/ +void CContentDecoder::Close() +{ + g_Log->Info( "Closing..." ); + + Stop(); + + ClearQueue(); + + Destroy(); + + m_spPlaylist = NULL; + + g_Log->Info( "closed..." ); + +} + +/* +*/ +/*void CContentDecoder::Size( uint32 &_width, uint32 &_height ) +{ + if( m_pVideoCodecContext[ m_CurrentLayer ] ) + { + _width = (uint32)m_pVideoCodecContext[ m_CurrentLayer ]->width; + _height = (uint32)m_pVideoCodecContext[ m_CurrentLayer ]->height; + } +}*/ + +sOpenVideoInfo* CContentDecoder::GetNextSheepInfo() +{ + std::string name; + + sOpenVideoInfo *retOVI = NULL; + + bool sheepfound = false; + + while ( !sheepfound && m_NextSheepQueue.pop(name, true) ) + { + if ( name.empty() ) + break; + + uint32 Generation, ID, First, Last; + std::string fname; + + sheepfound = true; + + retOVI = new sOpenVideoInfo; + + retOVI->m_Path.assign(name); + + if( m_spPlaylist->GetSheepInfoFromPath( name, Generation, ID, First, Last, fname ) ) + { + boost::filesystem::path p( name ); + + if ( !boost::filesystem::exists( p ) ) + { + sheepfound = false; + continue; + } + + std::string xxxname( name ); + xxxname.replace(xxxname.size() - 3, 3, "xxx"); + + if ( boost::filesystem::exists( p/xxxname ) ) + { + sheepfound = false; + continue; + } + + retOVI->m_SheepID = ID; + retOVI->m_Generation = Generation; + retOVI->m_First = First; + retOVI->m_Last = Last; + retOVI->m_bSpecialSheep = false; + } + else + { + retOVI->m_bSpecialSheep = true; + } + } + + return retOVI; +} + +/* + Next(). + Advance to next playlist entry. +*/ +bool CContentDecoder::NextSheepForPlaying( int32 _forceNext ) +{ + + if( m_spPlaylist == NULL ) + { + g_Log->Warning("Playlist == NULL"); + return( false ); + } + + if (_forceNext != 0 ) + { + std::string secondPath(""); + + if (m_SecondVideoInfo != NULL && m_SecondVideoInfo->m_NumIterations == 0) + secondPath.assign(m_SecondVideoInfo->m_Path); + + SAFE_DELETE(m_SecondVideoInfo); + + if (_forceNext < 0) + { + uint32 _numPrevious = (uint32)(-_forceNext); + + if ( m_SheepHistoryQueue.size() > 0 ) + { + if (!secondPath.empty()) + m_NextSheepQueue.push( secondPath, false, false ); + + std::string name; + + for ( uint32 i = 0; i < _numPrevious; i++ ) + { + while ( m_SheepHistoryQueue.pop( name, false, false ) ) + { + m_NextSheepQueue.push( name, false, false ); + + break; + } + } + } + } + else + { + if (!secondPath.empty()) + m_NextSheepQueue.push(secondPath, false, false); + } + } + + SAFE_DELETE(m_MainVideoInfo); + + m_MainVideoInfo = m_SecondVideoInfo; + + m_SecondVideoInfo = NULL; + + if (m_MainVideoInfo == NULL) + { + m_MainVideoInfo = GetNextSheepInfo(); + + if (m_MainVideoInfo == NULL) + return false; + } + + if (!m_MainVideoInfo->m_bSpecialSheep) + { + if (m_SecondVideoInfo == NULL) + { + if (m_MainVideoInfo->IsLoop() && m_LoopIterations > 0 && m_MainVideoInfo->m_NumIterations < (m_LoopIterations - 1)) + { + m_SecondVideoInfo = new sOpenVideoInfo(m_MainVideoInfo); + m_SecondVideoInfo->m_NumIterations++; + } + else + m_SecondVideoInfo = GetNextSheepInfo(); + + } + } + else + m_NoSheeps = true; + + if (!m_MainVideoInfo->IsOpen()) + { + if (!Open( m_MainVideoInfo )) + return false; + } + else + { + //if the video was already open (m_SecondVideoInfo previously), + //we need to assure seamless continuation + m_MainVideoInfo->m_NextIsSeam = true; + } + + if (m_MainVideoInfo->IsOpen()) + { + if (m_MainVideoInfo->m_NumIterations == 0) + { + while( m_SheepHistoryQueue.size() > 50 ) + { + std::string tmpstr; + + m_SheepHistoryQueue.pop( tmpstr ); + } + + m_SheepHistoryQueue.push( m_MainVideoInfo->m_Path ); + + m_spPlaylist->ChooseSheepForPlaying( m_MainVideoInfo->m_Generation, m_MainVideoInfo->m_SheepID ); + } + + m_NoSheeps = false; + } + else + return false; + + if (m_bCalculateTransitions && m_SecondVideoInfo != NULL && !m_SecondVideoInfo->IsOpen() && m_MainVideoInfo->m_Last != m_SecondVideoInfo->m_SheepID && m_MainVideoInfo->m_SheepID != m_SecondVideoInfo->m_First && m_MainVideoInfo->m_Last != m_SecondVideoInfo->m_First && (m_MainVideoInfo->m_Generation / 10000) == (m_SecondVideoInfo->m_Generation / 10000)) + { + Open( m_SecondVideoInfo ); + } + + return true; +} + +/* + CalculateNextSheep(). + Thread function. +*/ +void CContentDecoder::CalculateNextSheep() +{ + try { + + uint32 _curID = 0; + + bool bRebuild = true; + + while (!m_bStop) + { + this_thread::interruption_point(); + + if ( m_spPlaylist == NULL ) + { + thread::sleep( get_system_time() + posix_time::milliseconds(100) ); + continue; + } + + std::string _spath; + bool _enoughSheep = true; + + if( m_spPlaylist->Next( _spath, _enoughSheep, _curID, bRebuild, m_bStartByRandom ) ) + { + bRebuild = false; + + uint32 Generation, ID, First, Last; + std::string fname; + + if ( m_spPlaylist->GetSheepInfoFromPath( _spath, Generation, ID, First, Last, fname ) ) + { + boost::filesystem::path p( _spath ); + + if ( !bRebuild && !boost::filesystem::exists( _spath ) ) + { + bRebuild = true; + continue; + } + + _curID = ID; + } + + if ( !_enoughSheep ) + { + while( !m_NextSheepQueue.empty() ) + { + if ( !m_NextSheepQueue.waitForEmpty() ) + { + break; + } + } + } + + m_NextSheepQueue.push( _spath ); + } + else + bRebuild = true; + + m_Initialized = true; + thread::sleep( get_system_time() + posix_time::milliseconds(100) ); + //this_thread::yield(); + } + } + catch(thread_interrupted const&) + { + } +} + +CVideoFrame *CContentDecoder::ReadOneFrame(sOpenVideoInfo *ovi) +{ + if (ovi == NULL) + return NULL; + + AVFormatContext *pFormatContext = ovi->m_pFormatContext; + + if( !pFormatContext ) + return NULL; + + AVPacket packet; + int frameDecoded = 0; + AVFrame *pFrame = ovi->m_pFrame; + AVCodecContext *pVideoCodecContext = ovi->m_pVideoCodecContext; + CVideoFrame *pVideoFrame = NULL; + + while(true) + { + av_init_packet(&packet); + + packet.data = NULL; + packet.size = 0; + + if (!ovi->m_ReadingTrailingFrames) + { + if ( av_read_frame( pFormatContext, &packet ) < 0 ) + { + ovi->m_ReadingTrailingFrames = true; + av_free_packet(&packet); + continue; + } + } + + //printf( "calling av_dup_packet" ); + /*if( av_dup_packet( &packet ) < 0 ) + { + g_Log->Warning( "av_dup_packet < 0" ); + break; + }*/ + + //printf( "av_read_frame done" ); + if( packet.stream_index != ovi->m_VideoStreamID ) + { + g_Log->Error("Mismatching stream ID"); + break; + } + + //printf( "avcodec_decode_video(0x%x, 0x%x, 0x%x, 0x%x, %d)", m_pVideoCodecContext, pFrame, &frameDecoded, packet.data, packet.size ); + +#if (!defined(LINUX_GNU) || defined(HAVE_AVC_VID2)) + int32 bytesDecoded = avcodec_decode_video2( pVideoCodecContext, pFrame, &frameDecoded, &packet ); +#else + int32 bytesDecoded = avcodec_decode_video( pVideoCodecContext, pFrame, &frameDecoded, packet.data, packet.size ); +#endif + + //g_Log->Info( "avcodec_decode_video decoded %d bytes", bytesDecoded ); + if ( bytesDecoded < 0 ) + { + g_Log->Warning( "Failed to decode video frame: bytesDecoded < 0" ); + break; + } + + //at the beginning of each file we can get few frames with frameDecoded==0 (multi-thread delay) + //all frames will be delayed and the few remaining frames come at the end when ovi->m_ReadingTrailingFrames == true + //only when frameDecoded == 0 and ovi->m_ReadingTrailingFrames == true, we are finally done with the file. + if ( frameDecoded != 0 || ovi->m_ReadingTrailingFrames ) + { + break; + } + + av_free_packet(&packet); + } + + // Do we have a fresh frame? + if( frameDecoded != 0 ) + { + //g_Log->Info( "frame decoded" ); + + //if( pFrame->interlaced_frame ) + //avpicture_deinterlace( (AVPicture *)pFrame, (AVPicture *)pFrame, m_pVideoCodecContext->pix_fmt, m_pVideoCodecContext->width, m_pVideoCodecContext->height ); + + // If the decoded video has a different resolution, delete the scaler to trigger it to be recreated. + if( m_ScalerWidth != (uint32)pVideoCodecContext->width || m_ScalerHeight != (uint32)pVideoCodecContext->height ) + { + g_Log->Info( "size doesn't match, recreating" ); + + if( m_pScaler ) + { + g_Log->Info( "deleting m_pScalar" ); + sws_freeContext( m_pScaler ); + m_pScaler = NULL; + } + } + + // Make sure scaler is created. + if( m_pScaler == NULL ) + { + g_Log->Info( "creating m_pScaler" ); + + m_pScaler = sws_getContext( pVideoCodecContext->width, pVideoCodecContext->height, pVideoCodecContext->pix_fmt, + pVideoCodecContext->width, pVideoCodecContext->height, m_WantedPixelFormat, SWS_BICUBIC, NULL, NULL, NULL ); + + // Store width & height now... + m_ScalerWidth = static_cast(pVideoCodecContext->width); + m_ScalerHeight = (uint32)pVideoCodecContext->height; + + if( m_pScaler == NULL ) + g_Log->Warning( "scaler == null" ); + } + + //printf( "creating pVideoFrame" ); + pVideoFrame = new CVideoFrame( pVideoCodecContext, m_WantedPixelFormat, std::string(pFormatContext->filename) ); + AVFrame *pDest = pVideoFrame->Frame(); + + //printf( "calling sws_scale()" ); + sws_scale( m_pScaler, pFrame->data, pFrame->linesize, 0, pVideoCodecContext->height, pDest->data, pDest->linesize ); + +#ifdef USE_NEW_FFMPEG_ALLOC_API + if ( pVideoCodecContext->refcounted_frames ) + av_frame_unref( pFrame ); +#endif + + ovi->m_iCurrentFileFrameCount++; + + /*if (m_totalFrameCount > 0) + { + //g_Log->Info("framcount %lu, %lf", (long)(((double)m_pFormatContext->duration/(double)AV_TIME_BASE)),av_q2d(m_pVideoStream->avg_frame_rate)); + if (m_iCurrentFileFrameCount == m_totalFrameCount - m_FadeCount) + { + if (m_prevLast != m_nextFirst) + { + //g_Log->Info("FADING prevLast %u nextFirst %u", m_prevLast, m_nextFirst); + m_FadeOut = m_FadeCount + 1; + } + } + pVideoFrame->SetMetaData_Fade(1.f); + if (m_FadeOut > 0) + { + --m_FadeOut; + if (m_FadeOut == 0) + m_FadeIn = 0; + pVideoFrame->SetMetaData_Fade(fp4(m_FadeOut) / fp4(m_FadeCount)); + //g_Log->Info("FADING fadeout %u fadein %u framecount %u", m_FadeOut, m_FadeIn, m_iCurrentFileFrameCount); + } + if (m_FadeIn < m_FadeCount) + { + ++m_FadeIn; + pVideoFrame->SetMetaData_Fade(fp4(m_FadeIn) / fp4(m_FadeCount)); + //g_Log->Info("FADING fadeout %u fadein %u framecount %u", m_FadeOut, m_FadeIn, m_iCurrentFileFrameCount); + } + }*/ + + pVideoFrame->SetMetaData_SheepID( ovi->m_SheepID ); + pVideoFrame->SetMetaData_SheepGeneration( ovi->m_Generation ); + pVideoFrame->SetMetaData_IsEdge( ovi->IsEdge() ); + pVideoFrame->SetMetaData_atime( ovi->m_CurrentFileatime ); + pVideoFrame->SetMetaData_IsSeam( ovi->m_NextIsSeam ); + pVideoFrame->SetMetaData_FrameIdx( ovi->m_iCurrentFileFrameCount ); + pVideoFrame->SetMetaData_MaxFrameIdx( ovi->m_totalFrameCount ); + ovi->m_NextIsSeam = false; + } + + av_free_packet( &packet ); + return pVideoFrame; +} + +/* + ReadPackets(). + Thread function. +*/ +void CContentDecoder::ReadPackets() +{ + try { + + g_Log->Info( "Packet thread started..." ); + + if( !NextSheepForPlaying() ) + return; + + while( true ) + { + this_thread::interruption_point(); + + int32 nextForced = NextForced(); + + if (nextForced != 0) + ForceNext( 0 ); + + bool bDoNextSheep = true; + + if (nextForced == 0) + { + CVideoFrame *pMainVideoFrame = ReadOneFrame(m_MainVideoInfo); + + if (pMainVideoFrame != NULL) + { + CVideoFrame *pSecondVideoFrame = NULL; + +#define kTransitionFrameLength 60 + + if (m_SecondVideoInfo != NULL && m_SecondVideoInfo->IsOpen() && m_MainVideoInfo->m_iCurrentFileFrameCount >= (m_MainVideoInfo->m_totalFrameCount - kTransitionFrameLength)) + pSecondVideoFrame = ReadOneFrame(m_SecondVideoInfo); + + if (pSecondVideoFrame != NULL) + { + pMainVideoFrame->SetMetaData_SecondFrame(pSecondVideoFrame); + + if (m_SecondVideoInfo->m_iCurrentFileFrameCount < kTransitionFrameLength) + pMainVideoFrame->SetMetaData_TransitionProgress((fp4)m_SecondVideoInfo->m_iCurrentFileFrameCount * 100.f / ((fp4)kTransitionFrameLength - 1.f)); + else + pMainVideoFrame->SetMetaData_TransitionProgress(100.f); + } + else + pMainVideoFrame->SetMetaData_TransitionProgress(0.f); + + m_FrameQueue.push( pMainVideoFrame ); + + bDoNextSheep = false; + + //printf( "yielding..." ); + //m_pDecoderThread->yield(); + } + } + + if (bDoNextSheep) + { + g_Log->Info( "calling Next()" ); + + NextSheepForPlaying( nextForced ); + + if ( nextForced != 0 ) + ClearQueue(); + } + } + + } + catch(thread_interrupted const&) + { + } + + printf( "decoder thread ending..." ); + + g_Log->Info( "Ending decoder thread..." ); +} + +void CContentDecoder::ResetSharedFrame() +{ + m_sharedFrame = NULL; +} + +/* + Frame(). + Pop a frame from the decoder queue. + User must free this resource! +*/ +spCVideoFrame CContentDecoder::Frame() +{ + //mutex::scoped_lock lock( m_sharedFrameMutex ); + + if ( m_sharedFrame.IsNull() ) + { + CVideoFrame *tmp = NULL; + + if ( !m_FrameQueue.pop( tmp, false ) ) + { + tmp = NULL; + } + + m_sharedFrame = tmp; + } + else + m_sharedFrame->CopyBuffer(); + + + return m_sharedFrame; +} + + +/* + Start. + Start decoding playlist. +*/ +bool CContentDecoder::Start() +{ + if( m_spPlaylist == NULL ) + { + g_Log->Warning( "No playlist..." ); + return false; + } + + //abs is a protection against malicious negative numbers giving large integer when converted to uint32 + m_LoopIterations = static_cast(g_Settings()->Get( "settings.player.LoopIterations", 2 )); + + // Start by opening, so we have a context to work with. + m_bStop = false; + + m_pNextSheepThread = new thread( bind( &CContentDecoder::CalculateNextSheep, this ) ); + +#ifdef WIN32 + SetThreadPriority( (HANDLE)m_pNextSheepThread->native_handle(), THREAD_PRIORITY_BELOW_NORMAL ); + SetThreadPriorityBoost( (HANDLE)m_pNextSheepThread->native_handle(), TRUE ); +#else + struct sched_param sp; + sp.sched_priority = 8; //Foreground NORMAL_PRIORITY_CLASS - THREAD_PRIORITY_BELOW_NORMAL + pthread_setschedparam( (pthread_t)m_pNextSheepThread->native_handle(), SCHED_RR, &sp ); +#endif + + while ( Initialized() == false ) + thread::sleep( get_system_time() + posix_time::milliseconds(100) ); + + m_pDecoderThread = new thread( bind( &CContentDecoder::ReadPackets, this ) ); + + int retry = 0; + + CVideoFrame *tmp = NULL; + + while ( retry < 10 && !m_FrameQueue.peek( tmp, false ) && !m_bStop) + { + thread::sleep( get_system_time() + posix_time::milliseconds(100) ); + retry++; + } + + if (tmp == NULL) + return false; + + return true; +} + +/* +*/ +void CContentDecoder::Stop() +{ + m_bStop = true; + + if( m_pDecoderThread ) + { + m_pDecoderThread->interrupt(); + m_pDecoderThread->join(); + SAFE_DELETE( m_pDecoderThread ); + } + + if( m_pNextSheepThread ) + { + m_pNextSheepThread->interrupt(); + m_pNextSheepThread->join(); + SAFE_DELETE( m_pNextSheepThread ); + } +} + +void CContentDecoder::ClearQueue( uint32 leave ) +{ + while ( m_FrameQueue.size() > leave ) + { + CVideoFrame *vf; + + if ( m_FrameQueue.pop( vf, false, false ) ) + { + delete vf; + } + } +} + +/* +*/ +uint32 CContentDecoder::QueueLength() +{ + return (uint32)m_FrameQueue.size(); +} + +/* +*/ +void CContentDecoder::ForceNext( int32 forced ) +{ + upgrade_lock lock( m_ForceNextMutex ); + m_bForceNext = forced; +}; + +/* +*/ +int32 CContentDecoder::NextForced( void ) +{ + shared_lock lock( m_ForceNextMutex ); + return m_bForceNext; +}; + + + +} diff -Nru electricsheep-2.7~b12+svn20091224/ContentDecoder/ContentDecoder.h electricsheep-3.0.2-git20180325/ContentDecoder/ContentDecoder.h --- electricsheep-2.7~b12+svn20091224/ContentDecoder/ContentDecoder.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDecoder/ContentDecoder.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,268 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef _CONTENTDECODER_H +#define _CONTENTDECODER_H + +// FFmpeg headers. +extern "C"{ +#if defined(WIN32) || defined(MAC) || defined (LINUX_GNU) + #include "libavcodec/avcodec.h" + #include "libavformat/avformat.h" + #include "libswscale/swscale.h" +#else + #include "avcodec.h" + #include "avformat.h" + #include "swscale.h" +#endif +} + +#include "base.h" +#include +#include +#include "boost/thread/thread.hpp" +#include "boost/thread/mutex.hpp" +#include "boost/thread/xtime.hpp" +#include "boost/bind.hpp" +#include "Frame.h" +#include "Playlist.h" +#include "BlockingQueue.h" + +namespace ContentDecoder +{ + +struct sOpenVideoInfo +{ + sOpenVideoInfo() + : m_pFrame(NULL), + m_pFormatContext(NULL), + m_pVideoCodecContext(NULL), + m_pVideoCodec(NULL), + m_pVideoStream(NULL), + m_VideoStreamID(-1), + m_totalFrameCount(0), + m_CurrentFileatime(0), + m_iCurrentFileFrameCount(0), + m_Generation(0), + m_SheepID(0), + m_First(0), + m_Last(0), + m_bSpecialSheep(false), + m_NumIterations(0), + m_NextIsSeam(false), + m_ReadingTrailingFrames(false) + + { } + + sOpenVideoInfo( const sOpenVideoInfo* ovi) + : m_pFrame(NULL), + m_pFormatContext(NULL), + m_pVideoCodecContext(NULL), + m_pVideoCodec(NULL), + m_pVideoStream(NULL), + m_VideoStreamID(-1), + m_totalFrameCount(0), + m_CurrentFileatime(0), + m_iCurrentFileFrameCount(0), + m_Generation(ovi->m_Generation), + m_SheepID(ovi->m_SheepID), + m_First(ovi->m_First), + m_Last(ovi->m_Last), + m_Path(ovi->m_Path), + m_bSpecialSheep(ovi->m_bSpecialSheep), + m_NumIterations(ovi->m_NumIterations), + m_NextIsSeam(false), + m_ReadingTrailingFrames(false) + { } + + virtual ~sOpenVideoInfo() + { + if( m_pVideoCodecContext ) + { + avcodec_close( m_pVideoCodecContext ); + m_pVideoCodecContext = NULL; + } + + if( m_pFormatContext ) + { +#ifdef USE_NEW_FFMPEG_API + avformat_close_input( &m_pFormatContext ); +#else + av_close_input_file( m_pFormatContext ); + m_pFormatContext = NULL; +#endif // USE_NEW_FFMPEG_API + } + + if ( m_pFrame ) + { +#ifdef USE_NEW_FFMPEG_ALLOC_API + av_frame_free( &m_pFrame ); +#else + avcodec_free_frame( &m_pFrame ); +#endif + m_pFrame = NULL; + } + } + + bool IsLoop() { return (!m_bSpecialSheep && !IsEdge()); } + + void Reset() { m_pFormatContext = NULL; } + + bool IsOpen() { return (m_pFormatContext != NULL); } + + bool EqualsTo( sOpenVideoInfo *ovi ) + { + return ( m_SheepID == ovi->m_SheepID && m_Generation == ovi->m_Generation ); + } + + bool IsEdge() + { + if (m_bSpecialSheep) + return false; + + return !(m_First == m_Last && m_Last == m_SheepID); + } + + AVFrame *m_pFrame; + AVFormatContext *m_pFormatContext; + AVCodecContext *m_pVideoCodecContext; + AVCodec *m_pVideoCodec; + AVStream *m_pVideoStream; + int32 m_VideoStreamID; + uint32 m_totalFrameCount; + time_t m_CurrentFileatime; + uint32 m_iCurrentFileFrameCount; + uint32 m_Generation; + uint32 m_SheepID; + uint32 m_First; + uint32 m_Last; + std::string m_Path; + bool m_bSpecialSheep; + uint32 m_NumIterations; + bool m_NextIsSeam; + bool m_ReadingTrailingFrames; +}; + +/* + CContentDecoder. + Video decoding wrapper for ffmpeg, influenced by glover. +*/ +class CContentDecoder +{ + bool m_bStop; + uint32 m_prevLast; + + + uint32 m_FadeIn; + uint32 m_FadeOut; + uint32 m_FadeCount; + + SwsContext *m_pScaler; + uint32 m_ScalerWidth; + uint32 m_ScalerHeight; + + // Thread & threadfunction. + boost::thread *m_pDecoderThread; + void ReadPackets(); + + boost::thread *m_pNextSheepThread; + void CalculateNextSheep(); + + // Queue for decoded frames. + Base::CBlockingQueue m_FrameQueue; + boost::shared_mutex m_ForceNextMutex; + + // Codec context & working objects. + sOpenVideoInfo *m_MainVideoInfo; + + sOpenVideoInfo *m_SecondVideoInfo; + + AVPixelFormat m_WantedPixelFormat; + + + spCPlaylist m_spPlaylist; + + Base::CBlockingQueue m_NextSheepQueue; + Base::CBlockingQueue m_SheepHistoryQueue; + + + uint32 m_LoopIterations; + + int32 m_bForceNext; + + spCVideoFrame m_sharedFrame; + boost::mutex m_sharedFrameMutex; + + bool m_bStartByRandom; + + bool m_NoSheeps; + + bool m_Initialized; + + bool m_bCalculateTransitions; + + bool Open( sOpenVideoInfo *ovi ); + sOpenVideoInfo* GetNextSheepInfo(); + bool NextSheepForPlaying( int32 _forceNext = 0 ); + void Destroy(); + + CVideoFrame *ReadOneFrame(sOpenVideoInfo *ovi); + + static int DumpError( int _err ); + + public: + CContentDecoder( spCPlaylist _spPlaylist, bool _bStartByRandom, bool _bAllowTransitions, const uint32 _queueLenght, AVPixelFormat _wantedPixelFormat = AV_PIX_FMT_RGB24 ); + virtual ~CContentDecoder(); + + bool Initialized() { return m_Initialized; } + void Close(); + bool Start(); + void Stop(); + + //CVideoFrame *DecodeFrame(); + void ResetSharedFrame(); + spCVideoFrame Frame(); + + bool Stopped() { return m_bStop; }; + bool Healthy() { return true; }; + + bool PlayNoSheepIntro() + { + return m_NoSheeps; + }; + + inline uint32 GetCurrentPlayingID() { return (m_MainVideoInfo != NULL) ? m_MainVideoInfo->m_SheepID : 0; }; + inline uint32 GetCurrentPlayingGeneration() { return (m_MainVideoInfo != NULL) ? m_MainVideoInfo->m_Generation : 0; }; + + uint32 QueueLength(); + + void ClearQueue( uint32 leave = 0 ); + + void ForceNext( int32 forced = 1 ); + int32 NextForced( void ); +}; + +MakeSmartPointers( CContentDecoder ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDecoder/DirectoryPlaylist.h electricsheep-3.0.2-git20180325/ContentDecoder/DirectoryPlaylist.h --- electricsheep-2.7~b12+svn20091224/ContentDecoder/DirectoryPlaylist.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDecoder/DirectoryPlaylist.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,73 @@ +#ifndef DIRECTIRYPLAYLIST_H_INCLUDED +#define DIRECTIRYPLAYLIST_H_INCLUDED + +#include +#include "playlist.h" +#include + +using boost::filesystem::directory_iterator; + +/** + CDirectoryPlaylist. + Scans a directory for avi files and loops them. +*/ +class CDirectoryPlaylist : public ContentDecoder::CLoopingPlaylist +{ + public: + CDirectoryPlaylist( const std::string &_directory ) : ContentDecoder::CLoopingPlaylist() + { + std::set valid; + + for( directory_iterator i(_directory), end; i != end; ++i ) + { + std::string file = i->string(); + size_t pos = file.rfind('.'); + if( pos != std::string::npos ) + { + const std::string ext = file.substr( pos+1 ); + if( ext == "avi" ) + Add( file ); + } + } + } +}; + +MakeSmartPointers( CDirectoryPlaylist ); + +#endif +/*#ifndef DIRECTIRYPLAYLIST_H_INCLUDED +#define DIRECTIRYPLAYLIST_H_INCLUDED + +#include +#include "playlist.h" +#include */ + + +/* + CDirectoryPlaylist. + Scans a directory for avi files and loops them. +*/ +/*class CDirectoryPlaylist : ContentDecoder::CLoopingPlaylist +{ + std::string m_Directory; + + public: + CDirectoryPlaylist( std::string _directory ) : ContentDecoder::CLoopingPlaylist(), m_Directory( _directory ) + { + std::set valid; + + for( directory_iterator i(m_Directory), end; i != end; ++i ) + { + if( extension( *i ) != ".avi" ) + continue; + + std::string file = i->string(); + + Add( file ); + } + } +}; + +MakeSmartPointers( CDirectoryPlaylist ); + +#endif*/ diff -Nru electricsheep-2.7~b12+svn20091224/ContentDecoder/Frame.h electricsheep-3.0.2-git20180325/ContentDecoder/Frame.h --- electricsheep-2.7~b12+svn20091224/ContentDecoder/Frame.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDecoder/Frame.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,230 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef _FRAME_H_ +#define _FRAME_H_ + +#include "base.h" +#include "SmartPtr.h" +#include "linkpool.h" +#include "AlignedBuffer.h" + +#if defined(LIBAVCODEC_VERSION_INT) && (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(55,28,1)) +#define USE_NEW_FFMPEG_ALLOC_API +#endif + +#if defined(MAC) || (defined(WIN32) && defined(_MSC_VER)) +#define USE_NEW_FFMPEG_API +#endif + +namespace ContentDecoder +{ +class CVideoFrame; + +MakeSmartPointers( CVideoFrame ); + +struct sMetaData +{ + fp4 m_Fade; + std::string m_FileName; + uint32 m_SheepID; + uint32 m_SheepGeneration; + time_t m_LastAccessTime; + bool m_IsEdge; + spCVideoFrame m_SecondFrame; + bool m_IsSeam; + fp4 m_TransitionProgress; + uint32 m_FrameIdx; + uint32 m_MaxFrameIdx; +}; + +/* + CVideoFrame. + Base class for a decoded video frame. + Will converts itself to specified format if needed. +*/ +class CVideoFrame +{ + protected: + uint32 m_Width; + uint32 m_Height; + fp8 m_Pts; + + sMetaData m_MetaData; + + Base::spCAlignedBuffer m_spBuffer; + AVFrame *m_pFrame; + + public: + CVideoFrame( AVCodecContext *_pCodecContext, AVPixelFormat _format, std::string _filename ) : m_pFrame(NULL) + { + assert( _pCodecContext ); + if ( _pCodecContext == NULL) + g_Log->Info( "_pCodecContext == NULL" ); + + m_MetaData.m_Fade = 1.f; + m_MetaData.m_FileName = _filename; + m_MetaData.m_LastAccessTime = 0; + m_MetaData.m_SheepID = 0; + m_MetaData.m_SheepGeneration = 0; + m_MetaData.m_IsEdge = false; + m_MetaData.m_IsSeam = false; + m_MetaData.m_SecondFrame = NULL; + m_MetaData.m_TransitionProgress = 0.f; + + m_Width = static_cast(_pCodecContext->width); + m_Height = static_cast(_pCodecContext->height); + + +#ifdef USE_NEW_FFMPEG_ALLOC_API + m_pFrame = av_frame_alloc(); +#else + m_pFrame = avcodec_alloc_frame(); +#endif + + if (m_pFrame != NULL) + { + int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); + m_spBuffer = new Base::CAlignedBuffer( static_cast(numBytes) * sizeof(uint8) ); + avpicture_fill( (AVPicture *)m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); + } else + g_Log->Error( "m_pFrame == NULL" ); + } + + virtual ~CVideoFrame() + { + if( m_pFrame ) + { +#ifdef USE_NEW_FFMPEG_ALLOC_API + av_frame_free( &m_pFrame ); +#else + avcodec_free_frame( &m_pFrame ); +#endif + } + } + + inline void GetMetaData(sMetaData &_metadata) + { + _metadata = m_MetaData; + } + + inline void SetMetaData_Fade(fp4 _fade) + { + m_MetaData.m_Fade = _fade; + } + + inline void SetMetaData_FileName(std::string _filename) + { + m_MetaData.m_FileName = _filename; + } + + inline void SetMetaData_SheepID(uint32 _sheepid) + { + m_MetaData.m_SheepID = _sheepid; + } + + inline void SetMetaData_SheepGeneration(uint32 _sheepgeneration) + { + m_MetaData.m_SheepGeneration = _sheepgeneration; + } + + inline void SetMetaData_IsEdge(bool _isedge) + { + m_MetaData.m_IsEdge = _isedge; + } + + inline void SetMetaData_atime(time_t _atime) + { + m_MetaData.m_LastAccessTime = _atime; + } + + inline void SetMetaData_SecondFrame(CVideoFrame *pSecondFrame) + { + m_MetaData.m_SecondFrame = pSecondFrame; + } + + inline void SetMetaData_IsSeam(bool bIsSeam) + { + m_MetaData.m_IsSeam = bIsSeam; + } + + inline void SetMetaData_TransitionProgress(fp4 progress) + { + m_MetaData.m_TransitionProgress = progress; + } + + inline void SetMetaData_FrameIdx(uint32 idx) + { + m_MetaData.m_FrameIdx = idx; + } + + inline void SetMetaData_MaxFrameIdx(uint32 idx) + { + m_MetaData.m_MaxFrameIdx = idx; + } + + inline void Pts( const fp8 _pts ) { m_Pts = _pts; }; + inline fp8 Pts( void ) { return m_Pts; }; + inline uint32 Width() { return m_Width; }; + inline uint32 Height() { return m_Height; }; + + inline AVFrame *Frame() { return m_pFrame; }; + + virtual inline uint8 *Data() + { + if( !m_pFrame ) + return NULL; + + return m_pFrame->data[0]; + }; + + virtual inline Base::spCAlignedBuffer& StorageBuffer() + { + return m_spBuffer; + }; + + virtual void CopyBuffer() + { + Base::CAlignedBuffer *newBuffer = new Base::CAlignedBuffer( m_spBuffer->Size() ); + + memcpy( newBuffer->GetBufferPtr(), m_spBuffer->GetBufferPtr(), m_spBuffer->Size() ); + + + m_spBuffer = newBuffer; + }; + + + virtual inline int32 Stride() + { + if( !m_pFrame ) + return 0; + + return m_pFrame->linesize[0]; + }; + + //POOLED( CVideoFrame, Memory::CLinkPool ); +}; + + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDecoder/graph_playlist.h electricsheep-3.0.2-git20180325/ContentDecoder/graph_playlist.h --- electricsheep-2.7~b12+svn20091224/ContentDecoder/graph_playlist.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDecoder/graph_playlist.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,190 @@ +#ifndef _GRAPHPLAYLIST_H +#define _GRAPHPLAYLIST_H + +#include "playlist.h" +#include "Log.h" +#include "Timer.h" +#include "Settings.h" +#include +#include +#include +#include + + +#include "boost/filesystem/path.hpp" +#include "boost/filesystem/operations.hpp" +#include "boost/filesystem/convenience.hpp" + +using boost::filesystem::path; +using boost::filesystem::exists; +using boost::filesystem::no_check; +using boost::filesystem::directory_iterator; +using boost::filesystem::extension; + +namespace ContentDecoder +{ + +/* + CNode(). + One node in the flock graph. +*/ +class CNode +{ + NO_CLASS_STANDARDS( CNode ); + + int32 m_Generation; + int32 m_ID; + int32 m_First; + int32 m_Last; + + std::string m_Filename; + std::string m_StorageUrl; + + int32 m_PlayCount; + + public: + CNode() : m_Generation(-1), m_ID(-1), m_First(-1), m_Last(-1), m_PlayCount(0) + {} + + ~CNode() + { + TupleStorage::spIStorageNode spNode = g_Settings().OpenNode( m_StorageUrl ); + spNode->Set( "PlayCount", m_PlayCount ); + + } + + // Deduce generation & graph location from filename. + bool Init( std::string &_filename ) + { + // Save what we're all about. + m_Filename = _filename; + + // Remove the full path so we can work on the filename. + size_t offs = _filename.find_last_of( "/\\", _filename.size() ); + std::string sheep = _filename.substr( offs+1, _filename.size()-1 ); + + // Deduce graph position from filename. + int ret = sscanf( sheep.c_str(), "%d=%d=%d=%d.avi", &m_Generation, &m_ID, &m_First, &m_Last ); + if( ret != 4 ) + { + g_Log->Error( "Unable to deduce graph position from %s", sheep.c_str() ); + return false; + } + + g_Log->Error( "Node: %d->%d->%d->%d", m_Generation, m_ID, m_First, m_Last ); + + // Create storage url. + std::stringstream s; + s << "\\settings\\flocks\\" << sheep << "\\"; + m_StorageUrl = s.str(); + + // Update storage. + m_PlayCount = g_Settings().Get( m_StorageUrl, "PlayCount", 0 ); + + return true; + } + + const std::string &FileName() { return( m_Filename ); }; + const int32 PlayCount() { return( m_PlayCount ); }; + void IncPlayCount() { m_PlayCount++; }; +}; + +MakeSmartPointers( CNode ); + +typedef std::multimap< std::string, spCNode > gnode_t; + +/* + CGraphPlaylist(). + Perodically polls a directory for video, and traverses based on filename, in a graph-like manner, + while prioritizing loops & edges ala Spot style. +*/ +#warning TODO (Keffo#1#): Move this stuff to Lua, no need to bother with this in C/C++! +class CGraphPlaylist : public CPlaylist +{ + // Path to folder to monitor & update interval in seconds. + path m_Path; + fp8 m_Interval; + fp8 m_Clock; + + Base::CTimer m_Timer; + + gnode_t m_Graph; + + void UpdateDirectory( path const &_dir ) + { + //g_Log->Info( "Monitoring in %s...", monitor_dir.string().c_str() ); + for( directory_iterator i( _dir ), end; i != end; ++i ) + { + #warning TODO (Keffo#1#): Remove hardcoded extension... + if( extension(*i) != ".avi" ) + continue; + + std::string file = i->string(); + + // Add to collection if it's not already there. + gnode_t::iterator k = m_Graph.find( file ); + if( k == m_Graph.end() ) + { + // Create a new node. + spCNode spNode = new CNode(); + if( spNode->Init( file ) ) + m_Graph.insert( std::make_pair( file, spNode ) ); + } + } + } + + public: + CGraphPlaylist( const std::string &_watchFolder ) : CPlaylist() + { + m_Interval = 2; + m_Clock = 0; + + boost::filesystem::path::default_name_check(boost::filesystem::native); + + // Update now so other parts of the code doesn't freak when this returns zero length; + m_Path = _watchFolder.c_str(); + + g_Log->Info( "Starting graphing playlist in %s...", m_Path.native_directory_string().c_str() ); + UpdateDirectory( m_Path ); + } + + virtual ~CGraphPlaylist() + {} + + // + virtual bool Add( const std::string &_file ) + { + printf( "%s\n", _file.c_str() ); + return( true ); + } + + virtual uint32 Size() { return m_Graph.size(); } + + virtual bool Next() + { + try + { + // Update from directory if enough time has passed. + if( m_Timer.Time() > m_Clock + m_Interval ) + { + UpdateDirectory( m_Path ); + m_Clock = m_Timer.Time(); + } + + // Placeholder! + return true; + } + catch( ... ) + { + g_Log->Error( "eh?" ); + } + + return true; + } +}; + +MakeSmartPointers( CGraphPlaylist ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDecoder/LoopingPlaylist.h electricsheep-3.0.2-git20180325/ContentDecoder/LoopingPlaylist.h --- electricsheep-2.7~b12+svn20091224/ContentDecoder/LoopingPlaylist.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDecoder/LoopingPlaylist.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,56 @@ +#ifndef _LOOPINGPLAYLIST_H +#define _LOOPINGPLAYLIST_H + +#include "Playlist.h" +#include + +namespace ContentDecoder +{ + +/* + CLoopingPlaylist(). + Looping playlist based on an array. +*/ +class CLoopingPlaylist : public CPlaylist +{ + std::vector m_List; + uint32 m_Index; + + public: + CLoopingPlaylist() : CPlaylist() + { + m_Index = 0; + } + + virtual ~CLoopingPlaylist() + {} + + // + virtual bool Add( const std::string &_file ) + { + m_List.push_back( _file ); + return( true ); + } + + virtual bool Next( std::string &_result ) + { + if( m_List.empty() ) + return false; + + printf( "%d\n", m_Index ); + _result = m_List[ m_Index ]; + + m_Index++; + if( m_Index >= m_List.capacity() ) + m_Index = 0; + + return true; + } +}; + +MakeSmartPointers( CLoopingPlaylist ); + +} + + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDecoder/Playlist.h electricsheep-3.0.2-git20180325/ContentDecoder/Playlist.h --- electricsheep-2.7~b12+svn20091224/ContentDecoder/Playlist.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDecoder/Playlist.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,50 @@ +#ifndef _PLAYLIST_H +#define _PLAYLIST_H + +#include +#include "base.h" +#include "SmartPtr.h" + +namespace ContentDecoder +{ + +/* + CPlaylist(). + Playlist interface. +*/ +class CPlaylist +{ + public: + CPlaylist() {} + virtual ~CPlaylist() {} + virtual uint32 Size() = PureVirtual; + virtual bool Add( const std::string &_file ) = PureVirtual; + virtual bool Next( std::string &_result, bool& _bEnoughSheep, uint32 _curID, const bool _bRebuild = false, bool _bStartByRandom = true ) = PureVirtual; + virtual bool ChooseSheepForPlaying( uint32 curGen, uint32 curID ) = PureVirtual; + + virtual bool GetSheepInfoFromPath( const std::string& _path, uint32& Generation, uint32& ID, uint32& First, uint32& Last, std::string& _filename ) + { + // Remove the full path so we can work on the filename. + size_t offs = _path.find_last_of( "/\\", _path.size() ); + + _filename = _path.substr(offs+1); + + // Deduce graph position from filename. + int ret = sscanf( _filename.c_str(), "%d=%d=%d=%d.avi", &Generation, &ID, &First, &Last ); + if( ret != 4 ) + { + g_Log->Error( "Unable to deduce sheep info from %s", _path.c_str() ); + return false; + } + + return true; + } + +}; + +MakeSmartPointers( CPlaylist ); + +} + + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDecoder/SimplePlaylist.h electricsheep-3.0.2-git20180325/ContentDecoder/SimplePlaylist.h --- electricsheep-2.7~b12+svn20091224/ContentDecoder/SimplePlaylist.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDecoder/SimplePlaylist.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,54 @@ +#ifndef _SIMPLEPLAYLIST_H +#define _SIMPLEPLAYLIST_H + +#include "Playlist.h" +#include "Log.h" +#include + +namespace ContentDecoder +{ + +/* + CSimplePlaylist(). + Normal linear playlist based on a queue. +*/ +class CSimplePlaylist : public CPlaylist +{ + std::queue m_List; + + public: + CSimplePlaylist() : CPlaylist() + {} + + virtual ~CSimplePlaylist() + {} + + // + virtual bool Add( const std::string &_file ) + { + m_List.push( _file ); + return( true ); + } + + virtual uint32 Size() { return static_cast(m_List.size()); } + + virtual bool Next( std::string &_result, bool& _bEnoughSheep, uint32 /*_curID*/, const bool /*_bRebuild*/ = false, bool /*_bStartByRandom*/ = false ) + { + if( m_List.empty() ) + return false; + + _result = m_List.front(); + m_List.pop(); + + _bEnoughSheep = true; + + return true; + } +}; + +MakeSmartPointers( CSimplePlaylist ); + +} + + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/ContentDownloader.cbp electricsheep-3.0.2-git20180325/ContentDownloader/ContentDownloader.cbp --- electricsheep-2.7~b12+svn20091224/ContentDownloader/ContentDownloader.cbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/ContentDownloader.cbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,165 @@ + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/ContentDownloader.cpp electricsheep-3.0.2-git20180325/ContentDownloader/ContentDownloader.cpp --- electricsheep-2.7~b12+svn20091224/ContentDownloader/ContentDownloader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/ContentDownloader.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,241 @@ +#ifdef WIN32 +#include +#endif +#include +#include +#include + +#include "base.h" +#include "Log.h" +#include "clientversion.h" +#include "Settings.h" +#include "Networking.h" + +#include "Shepherd.h" +#include "ContentDownloader.h" +#include "SheepDownloader.h" +#include "SheepGenerator.h" +#ifdef MAC +#include +#endif + +namespace ContentDownloader +{ + +// Generators. +std::vector gGenerators; +std::vector gGeneratorThreads; + +/* +*/ +CContentDownloader::CContentDownloader() +{ +} + +// +static std::string generateID() +{ + uint8 *salt; + uint32 u; + char id[17]; + id[16] = 0; + +#ifdef WIN32 + SYSTEMTIME syst; + GetSystemTime(&syst); + salt = ((unsigned char *)&syst) + sizeof(SYSTEMTIME) - 8; +#else + timeval cur_time; + gettimeofday(&cur_time, NULL); + + salt = (unsigned char*)&cur_time; +#endif + + for( u=0; u<16; u++ ) + { + unsigned r = static_cast(rand()); + r = r ^ (salt[u>>1] >> ((u&1)<<2)); + r &= 15; + if( r < 10 ) + r += '0'; + else + r += 'A' - 10; + + id[u] = static_cast(r & 0xFF); + } + + return std::string( id ); +} + +// +void CContentDownloader::ServerFallback() +{ + Shepherd::setRegistered( false ); + g_NetworkManager->Logout(); +} + +/* +*/ +bool CContentDownloader::Startup( const bool _bPreview, bool _bReadOnlyInstance ) +{ + g_Log->Info( "Attempting to start contentdownloader...", _bPreview ); + Shepherd::initializeShepherd(); + + Shepherd::setRedirectServerName( g_Settings()->Get( "settings.content.redirectserver", std::string(REDIRECT_SERVER_FULL) ).c_str() ); + + std::string root = g_Settings()->Get( "settings.content.sheepdir", g_Settings()->Root() + "content" ); + + if (root.empty()) + { + root = g_Settings()->Root() + "content"; + g_Settings()->Set( "settings.content.sheepdir", root ); + } + + Shepherd::setRootPath( root.c_str() ); + Shepherd::setCacheSize( g_Settings()->Get( "settings.content.cache_size", 2000 ), 0 ); + Shepherd::setCacheSize( g_Settings()->Get( "settings.content.cache_size_gold", 2000 ), 1 ); + if (g_Settings()->Get( "settings.content.unlimited_cache", true) == true) + Shepherd::setCacheSize( 0, 0 ); + if (g_Settings()->Get( "settings.content.unlimited_cache_gold", true) == true) + Shepherd::setCacheSize( 0, 1 ); + Shepherd::setPassword( g_Settings()->Get( "settings.content.password_md5", std::string("") ).c_str() ); + Shepherd::setUniqueID( g_Settings()->Get( "settings.content.unique_id", generateID() ).c_str() ); + Shepherd::setUseProxy( g_Settings()->Get( "settings.content.use_proxy", false ) ); + Shepherd::setRegistered( g_Settings()->Get( "settings.content.registered", false ) ); + Shepherd::setProxy( g_Settings()->Get( "settings.content.proxy", std::string("") ).c_str() ); + Shepherd::setProxyUserName( g_Settings()->Get( "settings.content.proxy_username", std::string("") ).c_str() ); + Shepherd::setProxyPassword( g_Settings()->Get( "settings.content.proxy_password", std::string("") ).c_str() ); + + Shepherd::setSaveFrames( g_Settings()->Get( "settings.generator.save_frames", false ) ); + SheepGenerator::setNickName( g_Settings()->Get( "settings.generator.nickname", std::string("") ).c_str() ); + SheepGenerator::setURL( g_Settings()->Get( "settings.generator.user_url", std::string("") ).c_str() ); + + m_gDownloader = NULL; + + if( g_Settings()->Get( "settings.content.download_mode", true ) && _bReadOnlyInstance == false) + { + m_gDownloader = new SheepDownloader(); + g_Log->Info( "Starting download thread..." ); + m_gDownloadThread = new boost::thread( boost::bind( &SheepDownloader::shepherdCallback, m_gDownloader ) ); +#ifdef WIN32 + SetThreadPriority( (HANDLE)m_gDownloadThread->native_handle(), THREAD_PRIORITY_BELOW_NORMAL ); + SetThreadPriorityBoost( (HANDLE)m_gDownloadThread->native_handle(), TRUE ); +#else + struct sched_param sp; + sp.sched_priority = 6; //Background NORMAL_PRIORITY_CLASS - THREAD_PRIORITY_BELOW_NORMAL + pthread_setschedparam( (pthread_t)m_gDownloadThread->native_handle(), SCHED_RR, &sp ); +#endif + } + else + g_Log->Warning( "Downloading disabled." ); + + if( g_Settings()->Get( "settings.generator.enabled", true ) && _bReadOnlyInstance == false) + { + // Create the generators based on the number of processors. + uint32 ncpus = 1; + if( g_Settings()->Get( "settings.generator.all_cores", false ) ) + { +#ifdef WIN32 + SYSTEM_INFO sysInfo; + GetSystemInfo( &sysInfo ); + ncpus = (uint32)sysInfo.dwNumberOfProcessors; +#else + #ifdef MAC + ncpus = static_cast(MPProcessors()); + #else +#ifdef LINUX_GNU + ncpus = sysconf( _SC_NPROCESSORS_ONLN ); +#endif + #endif +#endif + } + + if (ncpus > 1) + --ncpus; + uint32 i; + for( i=0; iInfo( "Starting generator for core %d...", i ); + gGenerators.push_back( new SheepGenerator() ); + gGenerators[i]->setGeneratorId( i ); + } + + g_Log->Info( "Starting generator threads..." ); + + for( i=0; inative_handle(), THREAD_PRIORITY_IDLE ); + SetThreadPriorityBoost( (HANDLE)gGeneratorThreads[i]->native_handle(), FALSE ); +#else + struct sched_param sp; + sp.sched_priority = 1; //THREAD_PRIORITY_IDLE - THREAD_PRIORITY_IDLE + pthread_setschedparam( (pthread_t)gGeneratorThreads[i]->native_handle(), SCHED_RR, &sp ); +#endif + } + } + else + g_Log->Warning( "Generators disabled..." ); + + g_Log->Info( "...success" ); + + return true; +} + +/* +*/ +bool CContentDownloader::Shutdown( void ) +{ + // Terminate the threads. + g_Log->Info( "Terminating download thread." ); + + g_NetworkManager->Abort(); + + if( m_gDownloadThread && m_gDownloader ) + { + m_gDownloader->Abort(); + m_gDownloadThread->interrupt(); + + m_gDownloadThread->timed_join(boost::posix_time::seconds(3)); + + SAFE_DELETE( m_gDownloadThread ); + } + + SAFE_DELETE( m_gDownloader ); + + for( unsigned int i=0; iAbort(); + gGeneratorThreads[i]->interrupt(); + } + + for( unsigned int i=0; itimed_join(boost::posix_time::seconds(3)); + + SAFE_DELETE( gGeneratorThreads[i] ); + SAFE_DELETE( gGenerators[i] ); + } + + gGenerators.clear(); + gGeneratorThreads.clear(); + + // Notify the shepherd that the app is about to close so that he can properly clean up his threads + Shepherd::notifyShepherdOfHisUntimleyDeath(); + + return true; +} + +/* +*/ +CContentDownloader::~CContentDownloader() +{ + // Mark singleton as properly shutdown, to track unwanted access after this point. + SingletonActive( false ); +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/ContentDownloader.h electricsheep-3.0.2-git20180325/ContentDownloader/ContentDownloader.h --- electricsheep-2.7~b12+svn20091224/ContentDownloader/ContentDownloader.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/ContentDownloader.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,57 @@ +#ifndef _CONTENT_DOWNLOADER_H_ +#define _CONTENT_DOWNLOADER_H_ + +#include "boost/thread/thread.hpp" +#include "base.h" +#include "SmartPtr.h" +#include "Singleton.h" + +#ifndef MAX_PATH +#define MAX_PATH 4096 +#endif + + +namespace ContentDownloader +{ + +/** + CContentDownloader. + Singleton class to handle downloading of sheep. +*/ +class CContentDownloader : public Base::CSingleton +{ + friend class Base::CSingleton; + + // Private constructor accessible only to CSingleton. + CContentDownloader(); + + // No copy constructor or assignment operator. + NO_CLASS_STANDARDS( CContentDownloader ); + + // Downloader. + class SheepDownloader *m_gDownloader; + boost::thread *m_gDownloadThread; + + public: + bool Startup( const bool _bPreview, bool _bReadOnlyInstance = false ); + bool Shutdown( void ); + + const char *Description() { return "Content Downloader"; }; + + std::string ServerMessages(); + + // Called if network said unauthorized, will fallback everything to unregistered server. + void ServerFallback(); + + virtual ~CContentDownloader(); +}; + +}; + +/* + Helper for less typing... + +*/ +inline ContentDownloader::CContentDownloader &g_ContentDownloader( void ) { return( ContentDownloader::CContentDownloader::Instance() ); } + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/Sheep.cpp electricsheep-3.0.2-git20180325/ContentDownloader/Sheep.cpp --- electricsheep-2.7~b12+svn20091224/ContentDownloader/Sheep.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/Sheep.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,135 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include + +#include "Sheep.h" + +namespace ContentDownloader +{ + +Sheep::Sheep() +// +// Description: +// Default constrictor. Initialize all class data. +// +{ + fURL = NULL; + fFileSize = 0; + fFileName = NULL; + fWriteTime = 0; + fRating = 0; + fDownloaded = false; + fSheepId = 0; + fFirst = 0; + fLast = 0; + fType = 0; + fDeleted = false; + fGeneration = 0; + fIsTemp = false; +} + +Sheep::Sheep( const Sheep &sheep ) +// +// Description: +// Copy constrictor. copies all class data. +// +{ + fURL = NULL; + fFileName = NULL; + setURL(sheep.fURL); + setFileName(sheep.fFileName); + fFileSize = sheep.fFileSize; + fWriteTime = sheep.fWriteTime; + fRating = sheep.fRating; + fDownloaded = sheep.fDownloaded; + fSheepId = sheep.fSheepId; + fFirst = sheep.fFirst; + fLast = sheep.fLast; + fType = sheep.fType; + fDeleted = sheep.fDeleted; + fGeneration = sheep.fGeneration; + fIsTemp = sheep.fIsTemp; +} + +Sheep::~Sheep() +// +// Description: +// Destructor. Cleans up any alocated data. +// +{ + if(fURL != NULL) + { + delete [] fURL; + fURL = NULL; + } + + if(fFileName != NULL) + { + delete [] fFileName; + fFileName = NULL; + } +} + +void +Sheep::setURL(const char *url) +// +// Description: +// Sets the URL for this sheep. +// +{ + if(fURL == NULL) + { + delete [] fURL; + fURL = NULL; + } + + if(url) + { + fURL = new char[strlen(url) + 1]; + strcpy(fURL, url); + } +} + +void +Sheep::setFileName(const char *filename) +// +// Description: +// Sets the filename of the sheep. +// +{ + if(fFileName == NULL) + { + delete [] fFileName; + fFileName = NULL; + } + + if(filename) + { + fFileName = new char[strlen(filename) + 1]; + strcpy(fFileName, filename); + } +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepDownloader.cpp electricsheep-3.0.2-git20180325/ContentDownloader/SheepDownloader.cpp --- electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepDownloader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/SheepDownloader.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,1094 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include +#include +#include + +//#include +//#include + +#include +#include +#include + +#include +#include +#ifndef WIN32 +#include +#include +#endif +#ifdef LINUX_GNU +#include +#include +#define MAX_PATH PATH_MAX +#endif + +#include "base.h" +#include "MathBase.h" +#include "clientversion.h" +#include "Networking.h" +#include "ContentDownloader.h" +#include "SheepDownloader.h" +#ifdef WIN32 +#include "io.h" +#include "SheepGenerator.h" +#endif +#include "Shepherd.h" +#include "Settings.h" +#include "Log.h" +#include "Timer.h" +#include "PlayCounter.h" +#if defined(WIN32) && defined(_MSC_VER) +#include "../msvc/msvc_fix.h" +#endif + +namespace ContentDownloader +{ + +using namespace std; +using namespace boost; + +#define MAXBUF 1024 +#define TIMEOUT 600 +static const int32 MAX_TIMEOUT = 24*60*60; // 1 day +#define MIN_MEGABYTES 1024 +#define MIN_READ_INTERVAL 3600 + +#ifndef DEBUG +static const uint32 INIT_DELAY = 60; +#endif + +// Initialize the class data +int SheepDownloader::fDownloadedSheep = 0; +uint32 SheepDownloader::fCurrentGeneration = 0; +bool SheepDownloader::fGotList = false; +bool SheepDownloader::fListDirty = true; +time_t SheepDownloader::fLastListTime = 0; + +boost::mutex SheepDownloader::s_DownloaderMutex; + +/* +*/ +SheepDownloader::SheepDownloader() +{ + fHasMessage = false; + fCurrentGeneration = 0; + m_bAborted = false; + fGotList = false; + fListDirty = true; + updateCachedSheep(); + deleteCached(0, 0); + deleteCached(0, 1); +} + +/* +*/ +SheepDownloader::~SheepDownloader() +{ + clearFlocks(); +} + +/* +*/ +void SheepDownloader::initializeDownloader() +{ +} + +/* +*/ +void SheepDownloader::closeDownloader() +{ +} + +/* + numberOfDownloadedSheep(). + Returns the total number of downloaded sheep. +*/ +int SheepDownloader::numberOfDownloadedSheep() +{ + boost::mutex::scoped_lock lockthis( s_DownloaderMutex ); + + int returnVal; + returnVal = fDownloadedSheep; + return returnVal; +} + +/* + clearFlocks(). + Clears the sheep arrays for the client and the server and deletes the memory they allocated. +*/ +void SheepDownloader::clearFlocks() +{ + boost::mutex::scoped_lock lockthis( s_DownloaderMutex ); + // Clear the server flock. + for( uint32 i=0; i < fServerFlock.size(); i++ ) + SAFE_DELETE( fServerFlock[i] ); + + fServerFlock.clear(); + + fGotList = false; + + fListDirty = true; + + // Clear the client flock. + for(unsigned i = 0; i < fClientFlock.size(); i++) + delete fClientFlock[i]; + + fClientFlock.clear(); +} + +void SheepDownloader::Abort( void ) +{ + boost::mutex::scoped_lock lockthis( m_AbortMutex ); + + m_bAborted = true; +} + +// Downloads the given sheep from the server and supplies a unique name for it based on it's ids. +bool SheepDownloader::downloadSheep( Sheep *sheep ) +{ + if( sheep->downloaded() ) + return false; + + char tmp[32]; + // To identify transfer. + snprintf( tmp, 32, "Sheep #%d.%05d", sheep->generation(), sheep->id() ); + + m_spSheepDownloader = new Network::CFileDownloader( tmp ); + + Network::spCFileDownloader spDownload = m_spSheepDownloader; + + bool dlded = spDownload->Perform( sheep->URL() ); + + m_spSheepDownloader = NULL; + + { + boost::mutex::scoped_lock lockthis( m_AbortMutex ); + + if ( m_bAborted ) + return false; + } + + if( !dlded ) + { + g_Log->Warning( "Failed to download %s.\n", sheep->URL() ); + + if( spDownload->ResponseCode() == 401 ) + g_ContentDownloader().ServerFallback(); + + return false; + } + + if (sheep->fileSize() != spDownload->Data().size()) + { + g_Log->Warning( "Failed to download %s - file size mismatch.\n", sheep->URL() ); + return false; + } + // Save file. + char filename[ MAXBUF ]; + snprintf( filename, MAXBUF, "%s%05d=%05d=%05d=%05d.avi", Shepherd::mpegPath(), sheep->generation(), sheep->id(), sheep->firstId(), sheep->lastId() ); + if( !spDownload->Save( filename ) ) + { + g_Log->Error( "Unable to save %s\n", filename ); + return false; + } + + return true; +} + +#if 1//DASVO_TEST +// +void SheepDownloader::handleListElement(TiXmlElement* listElement) +{ + int32 cur_gen = 0; + + listElement->QueryIntAttribute("gen", &cur_gen); + + if (cur_gen <= 0 ) + { + cur_gen = 0; + g_Log->Error( "generation must be positive.\n" ); + } + + setCurrentGeneration( static_cast(cur_gen) ); + + TiXmlElement* pChildNode; + for ( pChildNode = listElement->FirstChildElement(); pChildNode; pChildNode = pChildNode->NextSiblingElement() ) + { + const char* name = pChildNode->Value(); + + if( !strcmp( "sheep", name ) ) + { + const char *state = NULL; + if( 0 == currentGeneration() ) + g_Log->Error( "malformed list, received sheep without generation set.\n" ); + + // Create a new sheep and parse the attributes. + Sheep *newSheep = new Sheep(); + newSheep->setGeneration( currentGeneration() ); + + const char *a; + if ((a = pChildNode->Attribute("id"))) newSheep->setId(static_cast(atoi(a))); + if ((a = pChildNode->Attribute("type"))) newSheep->setType(atoi(a)); + if ((a = pChildNode->Attribute("time"))) newSheep->setFileWriteTime(atoi(a)); + if ((a = pChildNode->Attribute("size"))) newSheep->setFileSize(static_cast(atol(a))); + if ((a = pChildNode->Attribute("rating"))) newSheep->setRating(atoi(a)); + if ((a = pChildNode->Attribute("first"))) newSheep->setFirstId(static_cast(atoi(a))); + if ((a = pChildNode->Attribute("last"))) newSheep->setLastId(static_cast(atoi(a))); + if ((a = pChildNode->Attribute("state"))) state = a; + if ((a = pChildNode->Attribute("url"))) newSheep->setURL(a); + + // TODO: fix malformed state, potential error + if (state != NULL) + { + if( !strcmp(state, "done") && (0 == newSheep->type()) ) + fServerFlock.push_back(newSheep); + else + { + if( !strcmp( state, "expunge" ) ) + { + char buf[ MAXBUF ]; + sprintf(buf, "%s%05d=%05d=%05d=%05d.avi", Shepherd::mpegPath(), newSheep->generation(), newSheep->id(), newSheep->firstId(), newSheep->lastId() ); + remove( buf ); + } + + SAFE_DELETE( newSheep ); + } + } + } + else if( !strcmp( "message", name ) ) + { + setHasMessage( true ); + + const char *txt = pChildNode->GetText(); + if (txt) + Shepherd::addMessageText( txt, strlen(txt), 30 ); + + } + else if( !strcmp( "error", name ) ) + { + char server_error_type[ MAXBUF ]; + + const char *a = pChildNode->Attribute("type"); + + if( a ) + { + if( !strcmp( a, "unauthenticated" ) ) + strncpy( server_error_type, "Invalid Nickname or Password", MAXBUF ); + else + strncpy( server_error_type, a, MAXBUF ); + + Shepherd::addMessageText( server_error_type, strlen( server_error_type ), 180 ); // 3 minutes + } + } + } +} +#else +// +void SheepDownloader::getEndElement(void *userData, const char *name) +{ + SheepDownloader *dl = (SheepDownloader *)userData; + if( !strcmp( "message", name ) ) + dl->setHasMessage( false ); +} + +// +void SheepDownloader::characterHandler(void *userData, const char *s, int len) +{ + SheepDownloader *dl = (SheepDownloader *)userData; + if( dl->hasMessage() ) + Shepherd::addMessageText( s, len, 30 ); +} + +// +void SheepDownloader::listStartElement(void *userData, const char *name, const char **atts) +{ + SheepDownloader *dl = (SheepDownloader *)userData; + int i = 0; + + if( !strcmp( "list", name ) ) + { + while( atts[i] ) + { + if( !strcmp( atts[i], "gen" ) ) + { + dl->setCurrentGeneration( atoi( atts[i+1] ) ); + if (dl->currentGeneration() == 0 ) + g_Log->Error( "generation must be positive.\n" ); + + break; + } + i += 2; + } + } + else if( !strcmp( "sheep", name ) ) + { + const char *state = NULL; + if( 0 == dl->currentGeneration() ) + g_Log->Error( "malformed list, received sheep without generation set.\n" ); + + // Create a new sheep and parse the attributes. + Sheep *newSheep = new Sheep(); + newSheep->setGeneration( dl->currentGeneration() ); + + while( atts[i] ) + { + const char *a = atts[i+1]; + if (!strcmp(atts[i], "id")) newSheep->setId(atoi(a)); + else if (!strcmp(atts[i], "type")) newSheep->setType(atoi(a)); + else if (!strcmp(atts[i], "time")) newSheep->setFileWriteTime(atoi(a)); + else if (!strcmp(atts[i], "size")) newSheep->setFileSize(atol(a)); + else if (!strcmp(atts[i], "rating")) newSheep->setRating(atoi(a)); + else if (!strcmp(atts[i], "first")) newSheep->setFirstId(atoi(a)); + else if (!strcmp(atts[i], "last")) newSheep->setLastId(atoi(a)); + else if (!strcmp(atts[i], "state")) state = a; + else if (!strcmp(atts[i], "url")) newSheep->setURL(a); + i += 2; + } + if( !strcmp(state, "done") && (0 == newSheep->type()) ) + dl->fServerFlock.push_back(newSheep); + else + { + if( !strcmp( state, "expunge" ) ) + { + char buf[ MAXBUF ]; + sprintf(buf, "%s%05d=%05d=%05d=%05d.avi", Shepherd::mpegPath(), newSheep->generation(), newSheep->id(), newSheep->firstId(), newSheep->lastId() ); + remove( buf ); + } + + SAFE_DELETE( newSheep ); + } + } + else if( !strcmp( "message", name ) ) dl->setHasMessage( true ); + else if( !strcmp( "error", name ) ) + { + char server_error_type[ MAXBUF ]; + + while( atts[i] ) + { + if( !strcmp( atts[i], "type" ) ) + { + if( !strcmp( atts[i+1], "unauthenticated" ) ) + strncpy( server_error_type, "Invalid Nickname or Password", MAXBUF ); + else + strncpy( server_error_type, atts[i+1], MAXBUF ); + + Shepherd::addMessageText( server_error_type, strlen( server_error_type ), 180 ); // 3 minutes + } + + i += 2; + } + } +} +#endif + +// Parse the sheep list and create the server sheep. +void SheepDownloader::parseSheepList() +{ + boost::mutex::scoped_lock lockthis( s_DownloaderMutex ); + + char pbuf[MAXBUF]; + + // Open the file. + sprintf(pbuf, "%slist_%s.xml", Shepherd::xmlPath(), Shepherd::role()); + + TiXmlDocument doc(pbuf); + if (doc.LoadFile()) + { + TiXmlHandle hDoc(&doc); + TiXmlElement* listElement; + + listElement=hDoc.FirstChild( "list" ).Element(); + + //only if there is at least one child in the list, we delete the list from previous request + if (listElement && listElement->FirstChildElement() != NULL) + { + fGotList = false; + + SheepArray::iterator it = fServerFlock.begin(); + while(it != fServerFlock.end()) + { + delete *it; + it++; + } + fServerFlock.clear(); + + handleListElement(listElement); + } + else + { + g_Log->Error( "There are no sheep in the downloaded list, is that correct?!?\n" ); + return; + } + } + else + { + g_Log->Error( "%s at line %d\n", doc.ErrorDesc(), doc.ErrorRow() ); + return; + } + + //remove( pbuf ); + fGotList = true; + fListDirty = false; +} + +/* + updateCachedSheep(). + Run through the client cache to update it. +*/ +void SheepDownloader::updateCachedSheep() +{ + boost::mutex::scoped_lock lockthis( s_DownloaderMutex ); + + // Get the client flock. + if( Shepherd::getClientFlock( &fClientFlock ) ) + { + // Run through the client flock to find deleted sheep. + for( uint32 i=0; ideleted() && fGotList ) + { + // If it is than run through the server flock to see if it is still there. + uint32 j; + for( j=0; jid() == currentSheep->id() && fServerFlock[j]->generation() == currentSheep->generation() ) + break; + } + + // If it was not found on the server then it is time to delete the file. + if( j == fServerFlock.size() ) + { + g_Log->Info( "Deleting %s", currentSheep->fileName() ); + if (remove( currentSheep->fileName() ) != 0) + g_Log->Warning( "Failed to remove %s", currentSheep->fileName()); + else + { + Shepherd::subClientFlockBytes(currentSheep->fileSize(), currentSheep->getGenerationType()); + Shepherd::subClientFlockCount(currentSheep->getGenerationType()); + } + continue; + } + continue; + } + else if( currentSheep->isTemp() ) + { + g_Log->Info( "Deleting %s", currentSheep->fileName() ); + if (remove( currentSheep->fileName() ) != 0) + g_Log->Warning( "Failed to remove %s", currentSheep->fileName()); + continue; + } + + if (fGotList) + { + // Update the sheep rating from the server. + for( uint32 j=0; jid() == currentSheep->id() && shp->generation() == currentSheep->generation() ) + if( shp->firstId() == currentSheep->firstId() ) + if( shp->lastId() == currentSheep->lastId() ) + { + currentSheep->setRating( shp->rating() ); + break; + } + } + } + + // Should use win native call but i don't know what it is. + struct stat stat_buf; + if( -1 != stat( currentSheep->fileName(), &stat_buf ) ) + currentSheep->setFileWriteTime( stat_buf.st_mtime ); + } + +// fRenderer->updateClientFlock( fClientFlock ); + } +} + +/* + cacheOverflow(). + Checks if the cache will overflow if the given number of bytes are added. +*/ +int SheepDownloader::cacheOverflow( const double &bytes, const int getGenerationType ) const +{ +/* +//karelsson - is it here for a reason??? +boost::uintmax_t availableBytes; + + +#ifdef WIN32 + ULARGE_INTEGER avBytes; + + // Get the available number of bytes on the disk. + if( !GetDiskFreeSpaceExA( Shepherd::xmlPath(), (PULARGE_INTEGER)&avBytes, NULL, NULL ) ) + { + g_Log->Error( "Unable to get free disc space" ); + avBytes.QuadPart = 0; + exit(1); + } + + availableBytes = (boost::uintmax_t)avBytes.QuadPart; +#else + struct statfs buf; + if(statfs(Shepherd::xmlPath(), &buf) < 0) + { + g_Log->Error( "not enough space on disk" ); + exit(1); + } + + availableBytes = (boost::uintmax_t)buf.f_bavail * (boost::uintmax_t)buf.f_bsize; +#endif*/ + + // Return the overflow status + return (Shepherd::cacheSize(getGenerationType) && (bytes > (1024.0 * 1024.0 * Shepherd::cacheSize(getGenerationType)))); +} + +/* + deleteCached(). + This function will make sure there is enough room in the cache for any newly downloaded files. + If the cache is to large than the oldest and worst rated files will be deleted. +*/ +void SheepDownloader::deleteCached( const uint64 &size, const int getGenerationType ) +{ + double total; + time_t oldest_time; // oldest time for sheep with highest playcount + int highest_playcount; + uint32 best; // oldest sheep with highest playcount + time_t oldest_sheep_time; // oldest time for sheep (from whole flock) + uint32 oldest; // oldest sheep index + +// updateCachedSheep(); + + if( Shepherd::cacheSize(getGenerationType) != 0 ) + { + while( fClientFlock.size() ) + { + // Initialize some data. + total = size; + oldest_time = 0; + highest_playcount = 0; + best = 0; + oldest = 0; + oldest_sheep_time = 0; + + // Iterate the client flock to get the oldest and worst_rated file. + for( uint32 i=0; ideleted() || curSheep->isTemp() || curSheep->getGenerationType() != getGenerationType ) + continue; + + // Store the file size. + total += curSheep->fileSize(); + + if ( oldest_sheep_time == 0 || oldest_sheep_time > curSheep->fileWriteTime() ) + { + oldest = i; + oldest_sheep_time = curSheep->fileWriteTime(); + } + + uint16 curPlayCount = g_PlayCounter().PlayCount(curSheep->generation(), curSheep->id()); + + if( oldest_time == 0 || + ( curPlayCount > highest_playcount) || + ( (curPlayCount == highest_playcount) && (curSheep->fileWriteTime() < oldest_time) ) + ) + { + // Update this as the file to delete if necessary. + best = i; + oldest_time = curSheep->fileWriteTime(); + highest_playcount = g_PlayCounter().PlayCount(curSheep->generation(), curSheep->id()); + } + } + + // If a file is found and the cache has overflowed then start deleting. + if( oldest_time && cacheOverflow( total, getGenerationType ) ) + { + if (rand() % 2 == 0) + { + best = oldest; + oldest_time = oldest_sheep_time; + g_Log->Info("Deleting oldest sheep"); + } else + g_Log->Info("Deleting most played sheep"); + + std::string filename(fClientFlock[ best ]->fileName()); + if (filename.find_last_of("/\\") != filename.npos) + filename.erase( filename.begin(), filename.begin() + static_cast(filename.find_last_of("/\\")) + 1); + + uint16 playcount = g_PlayCounter().PlayCount( fClientFlock[ best ]->generation(), fClientFlock[ best ]->id() ) - 1; + std::stringstream temp; + std::string temptime = ctime( &oldest_time ); + temptime.erase(temptime.size() - 1); + + temp << "Deleted: " << filename << ", played:" << playcount << " time" << ((playcount == 1) ? "," : "s,") << temptime; + Shepherd::AddOverflowMessage( temp.str() ); + g_Log->Info("%s", temp.str().c_str()); + deleteSheep( fClientFlock[ best ] ); + } + else + { + // Cache is ok so return. + return; + } + } + } +} + +/* + deleteSheep(). + +*/ +void SheepDownloader::deleteSheep( Sheep *sheep ) +{ + if (remove( sheep->fileName() ) != 0) + g_Log->Warning( "Failed to remove %s", sheep->fileName()); + else + { + Shepherd::subClientFlockBytes(sheep->fileSize(), sheep->getGenerationType()); + Shepherd::subClientFlockCount(sheep->getGenerationType()); + } + sheep->setDeleted( true ); + + // Create the filename with an xxx extension. + size_t len = strlen( sheep->fileName() ); + char *deletedFile = new char[ len + 1 ]; + strcpy( deletedFile, sheep->fileName() ); + + deletedFile[len - 3] = 'x'; + deletedFile[len - 2] = 'x'; + deletedFile[len - 1] = 'x'; + + // Open the deleted file and save the zero length file. + FILE *out = fopen( deletedFile, "wb" ); + if( out != NULL ) + fclose( out ); + + SAFE_DELETE_ARRAY( deletedFile ); + + /*if( sheep->firstId() == sheep->lastId() ) + { + // It's a loop so you might as well delete the edges as well. + for( uint32 i=0; ideleted() || curSheep->isTemp() ) + continue; + + if( curSheep->firstId() == sheep->id() || curSheep->lastId() == sheep->id() ) + deleteSheep( curSheep ); + } + }*/ +} + +/* +*/ +void SheepDownloader::deleteSheepId( uint32 sheepId ) +{ + for( uint32 i=0; ideleted() || curSheep->isTemp() ) + continue; + + if( curSheep->id() == sheepId ) + deleteSheep( curSheep ); + } +} + +bool SheepDownloader::isFolderAccessible( const char *folder ) +{ + if (folder == NULL) + return false; +#ifdef WIN32 + if (_access(folder, 6) != 0) + return false; +#else + if (access(folder, 6) != 0) + return false; +#endif + + struct stat status; + std::string tempstr(folder); + if (tempstr.size() > 1 && (tempstr.at(tempstr.size()-1) == '\\' || tempstr.at(tempstr.size()-1) == '/')) + tempstr.erase( tempstr.size() - 1 ); + if ( stat( tempstr.c_str(), &status ) == -1) + return false; + + if ( !(status.st_mode & S_IFDIR) ) + return false; // it's a file + + return true; +} + +/* + findSheepToDownload(). + This method loads all of the sheep that are cached on disk and deletes any files in the cache that no longer exist on the server +*/ +void SheepDownloader::findSheepToDownload() +{ + int best_rating; + time_t best_ctime; + int best_anim; + int best_rating_old; + int best_anim_old; + time_t best_ctime_old; + + try { +#ifndef DEBUG + + //if there are at least three sheep to display in content folder, sleep, otherwise start to download immediately + if ( fClientFlock.size() > 3 ) + { + std::stringstream tmp; + + tmp << "Downloading starts in {" << (int32)ContentDownloader::INIT_DELAY << "}..."; + + Shepherd::setDownloadState(tmp.str()); + + // Make sure we are really deeply settled asleep, avoids lots of timed out frames. + g_Log->Info( "Chilling for %d seconds before trying to download sheeps...", ContentDownloader::INIT_DELAY ); + + thread::sleep( get_system_time() + posix_time::seconds(ContentDownloader::INIT_DELAY) ); + } +#endif + + boost::uintmax_t lpFreeBytesAvailable = 0; + + int32 failureSleepDuration = TIMEOUT; + int32 badSheepSleepDuration = TIMEOUT; + + + while( 1 ) + { + + this_thread::interruption_point(); + bool incorrect_folder = false; +#ifdef WIN32 + ULARGE_INTEGER winlpFreeBytesAvailable, winlpTotalNumberOfBytes, winlpRealBytesAvailable; + + if ( GetDiskFreeSpaceExA( Shepherd::xmlPath(),(PULARGE_INTEGER)&winlpFreeBytesAvailable,(PULARGE_INTEGER)&winlpTotalNumberOfBytes,(PULARGE_INTEGER)&winlpRealBytesAvailable ) ) + { + lpFreeBytesAvailable = winlpFreeBytesAvailable.QuadPart; + } else + incorrect_folder = true; +#else + struct statfs buf; + if( statfs( Shepherd::xmlPath(), &buf) >= 0 ) + { + lpFreeBytesAvailable = (boost::uintmax_t)buf.f_bavail * (boost::uintmax_t)buf.f_bsize; + } else + incorrect_folder = true; +#endif + + incorrect_folder = incorrect_folder || ( !isFolderAccessible( Shepherd::xmlPath() ) || !isFolderAccessible( Shepherd::mpegPath() ) ); + if( lpFreeBytesAvailable < ((boost::uintmax_t)MIN_MEGABYTES * 1024 * 1024) || incorrect_folder) + { + if (incorrect_folder) + { + const char *err = "Content folder is not working. Downloading disabled.\n"; + Shepherd::addMessageText( err, strlen(err), 180 ); //3 minutes + + thread::sleep( get_system_time() + posix_time::seconds(TIMEOUT) ); + } + else + { + const char *err = "Low disk space. Downloading disabled.\n"; + Shepherd::addMessageText( err, strlen(err), 180 ); //3 minutes + + thread::sleep( get_system_time() + posix_time::seconds(TIMEOUT) ); + + boost::mutex::scoped_lock lockthis( s_DownloaderMutex ); + + deleteCached( 0, 0 ); + deleteCached( 0, 1 ); + } + } + else + { + best_anim_old = -1; + std::string best_anim_old_url; + best_ctime_old = 0; + best_rating_old = INT_MAX; + + // Reset the generation number. + setCurrentGeneration( 0 ); + + // Get the sheep list from the server. + if( getSheepList() ) + { + Shepherd::setDownloadState("Searching for sheep to download..."); + + if (fListDirty) + { + //clearFlocks(); + parseSheepList(); + } + else + { + fGotList = true; + } + + do + { + best_rating = INT_MIN; + best_ctime = 0; + best_anim = -1; + + updateCachedSheep(); + + boost::mutex::scoped_lock lockthis( s_DownloaderMutex ); + + unsigned int i; + unsigned int j; + + size_t downloadedcount = 0; + for( i=0; iid() == fClientFlock[j]->id()) && (fServerFlock[i]->generation() == fClientFlock[j]->generation()) ) + { + downloadedcount++; + break; + } + } + } + // Iterate the server flock to find the next sheep to download. + for( i=0; iid() == fClientFlock[j]->id()) && (fServerFlock[i]->generation() == fClientFlock[j]->generation()) ) + break; + } + + // If it is not found and the cache is ok to store than check if the file should be downloaded based on rating and server file write time. + if( (j == fClientFlock.size()) && !cacheOverflow((double)fServerFlock[i]->fileSize(), fServerFlock[i]->getGenerationType()) ) + { + // Check if it is the best file to download. + if( (best_ctime == 0 && best_ctime_old == 0) || + (fServerFlock[i]->rating() > best_rating && fServerFlock[i]->rating() <= best_rating_old) || + (fServerFlock[i]->rating() == best_rating && fServerFlock[i]->fileWriteTime() < best_ctime ) ) + { + if ( fServerFlock[i]->rating() != best_rating_old || + (fServerFlock[i]->rating() == best_rating_old && fServerFlock[i]->fileWriteTime() > best_ctime_old) ) + { + best_rating = fServerFlock[i]->rating(); + best_ctime = fServerFlock[i]->fileWriteTime(); + best_anim = static_cast(i); + } + } + } + } + + // Found a valid sheep so download it. + if( best_anim != -1 ) + { + best_ctime_old = best_ctime; + best_rating_old = best_rating; + // Make enough room in the cache for it. + deleteCached( fServerFlock[ static_cast(best_anim) ]->fileSize(), fServerFlock[ static_cast(best_anim) ]->getGenerationType() ); + + std::stringstream downloadingsheepstr; + downloadingsheepstr << "Downloading sheep " << downloadedcount+1 << "/" << fServerFlock.size() << "...\n"; + Shepherd::setDownloadState(downloadingsheepstr.str() + fServerFlock[ static_cast(best_anim) ]->URL()); + + g_Log->Info( "Best sheep to download rating=%d, fServerFlock index=%d, write time=%s", best_rating, best_anim, ctime(&best_ctime) ); + if( downloadSheep( fServerFlock[ static_cast(best_anim) ] ) ) + { + //failureSleepDuration = 0; + badSheepSleepDuration = TIMEOUT; + } else + { + best_anim_old = best_anim; + best_anim_old_url = fServerFlock[ static_cast(best_anim_old) ]->URL(); + } + } + this_thread::interruption_point(); + } while (best_anim != -1); + + if (best_anim_old == -1) + { + failureSleepDuration = badSheepSleepDuration; + + badSheepSleepDuration = Base::Math::Clamped( badSheepSleepDuration * 2, TIMEOUT, MAX_TIMEOUT ); + + std::stringstream tmp; + + tmp << "All available sheep downloaded, will retry in {" << std::fixed << std::setprecision(0) << failureSleepDuration << "}..."; + + Shepherd::setDownloadState(tmp.str()); + } + else + { + // Gradually increase duration betwee 10 seconds and TIMEOUT, if the sheep fail to download consecutively + failureSleepDuration = badSheepSleepDuration; + + badSheepSleepDuration = Base::Math::Clamped( badSheepSleepDuration * 2, TIMEOUT, MAX_TIMEOUT ); + + std::stringstream tmp; + + tmp << "Downloading failed, will retry in {" << std::fixed << std::setprecision(0) << failureSleepDuration << "}...\n" << best_anim_old_url; + Shepherd::setDownloadState(tmp.str()); + } + } + else + { + // Error connecting to server so timeout then try again. + const char *err = "error connecting to server"; + Shepherd::addMessageText( err, strlen(err), 180 ); // 3 minutes. + failureSleepDuration = TIMEOUT; + + badSheepSleepDuration = 10; + } + + thread::sleep( get_system_time() + posix_time::seconds(failureSleepDuration) ); + + //failureSleepDuration = TIMEOUT; + + } + } + } + catch(thread_interrupted const&) + { + } +} + +/* + getSheepList(). + This method will download the sheep list and uncompress it. +*/ +bool SheepDownloader::getSheepList() +{ + const char *xmlPath = Shepherd::xmlPath(); + + char filename[ MAX_PATH ]; + snprintf( filename, MAX_PATH, "%slist_%s.xml", xmlPath, Shepherd::role() ); + + struct stat stat_buf; + if( -1 != stat( filename, &stat_buf) ) + { + if( time(0) - stat_buf.st_mtime < MIN_READ_INTERVAL ) + return true; + } + + Shepherd::setDownloadState("Getting sheep list..."); + + snprintf( filename, MAX_PATH, "%slist.gzip", xmlPath ); + + // Create the url for getting the cp file to create the frame + char url[ MAXBUF*5 ]; + snprintf( url, MAXBUF*5, "%scgi/list?v=%s&u=%s", ContentDownloader::Shepherd::serverName(), + CLIENT_VERSION, + Shepherd::uniqueID() ); + + Network::spCFileDownloader spDownload = new Network::CFileDownloader( "Sheep list" ); + if( !spDownload->Perform( url ) ) + { + if( spDownload->ResponseCode() == 304 ) // "Not Modified" + return true; + + if( spDownload->ResponseCode() == 401 ) + g_ContentDownloader().ServerFallback(); + + g_Log->Error( "Failed to download %s.\n", url ); + return false; + } + + // Save the data to file. + if( !spDownload->Save( filename ) ) + { + g_Log->Error( "Unable to save %s\n", filename ); + return false; + } + + // Save file time. + time( &fLastListTime ); + + // Open the file to write the uncompressed xml data. + snprintf( filename, MAX_PATH, "%slist_%s.xml", xmlPath, Shepherd::role() ); + FILE *outXML = fopen( filename, "wb" ); + if( outXML == NULL ) + return false; + + // Reset the current generation + //setCurrentGeneration( 0 ); + + // Gzopen the compressed file to uncompress. + snprintf( filename, MAX_PATH, "%slist.gzip", xmlPath ); + gzFile gzinF = gzopen( filename, "rb" ); + if( gzinF == NULL ) + { + g_Log->Error( "Unable to open %s", filename ); + fclose( outXML ); + return false; + } + + // Uncompress the data. + char buf[ MAXBUF ]; + int numBytes = 0; + do + { + numBytes = gzread( gzinF, buf, 250 ); + if (numBytes <= 0) + break; + fwrite( buf, static_cast(numBytes), 1, outXML ); + } while( !gzeof( gzinF ) ); + + // Close the input and output file. + gzclose( gzinF ); + fclose( outXML ); + + fListDirty = true; + + // Delete the temp file with the compressed data. + snprintf( filename, MAX_PATH, "%slist.gzip", xmlPath ); + remove( filename ); + + return true; +} + +/* + shepherdCallback(). + This method is also in charge of downling the sheep in their transitional order. +*/ +void SheepDownloader::shepherdCallback( void *data ) +{ + ((SheepDownloader *)data)->findSheepToDownload(); +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepDownloader.h electricsheep-3.0.2-git20180325/ContentDownloader/SheepDownloader.h --- electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepDownloader.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/SheepDownloader.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,145 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef _SHEEPDOWNLOADER_H_ +#define _SHEEPDOWNLOADER_H_ + +#if 1//DASVO_TEST +#include "tinyxml.h" +#else +#include "expat.h" +#endif +#include "Sheep.h" +#include "Networking.h" + +namespace ContentDownloader +{ +class SheepRenderer; + +/* + + This class is responsible for downloading and queueing new sheep to the renderer.. +*/ +class SheepDownloader +{ + // number of sheep that the downloader has downloaded + static int fDownloadedSheep; + + // sheep flocks + SheepArray fServerFlock; + SheepArray fClientFlock; + SheepRenderer *fRenderer; + + // boolean for message checks + bool fHasMessage; + static uint32 fCurrentGeneration; + + static time_t fLastListTime; + + static boost::mutex s_DownloaderMutex; + + bool m_bAborted; + + Network::spCFileDownloader m_spSheepDownloader; + + boost::mutex m_AbortMutex; + + protected: + + // Downloads the given sheep and queues it up for rendering. + bool downloadSheep( Sheep *sheep ); + + // Function to parse the cache and find a sheep to download. + void findSheepToDownload(); + + // Ipdate the cached sheep and make sure there is enough room for a second sheep. + void updateCachedSheep(); + + // Clears the flock list being maintained + void clearFlocks(); + + // Delete enough sheep to clear enough room for the given amount of bytes. + void deleteCached( const uint64 &bytes, const int getGenerationType ); + + bool isFolderAccessible( const char *folder ); + + // This methods parses the sheep list and intializes the array of server sheep. + void parseSheepList(); + +#if 1//DASVO_TEST + void handleListElement(TiXmlElement* listElement); +#else + // Functions to parse the XML structures. + static void listStartElement( void *userData, const char *name, const char **atts ); + static void characterHandler( void *userData, const char *s, int len ); + static void getEndElement( void *userData, const char *name ); +#endif + + // Message retrival from server. + void setHasMessage(const bool &hasMessage) { fHasMessage = hasMessage; } + bool hasMessage() const { return fHasMessage; } + + void setCurrentGeneration(const uint32 &generation) { fCurrentGeneration = generation; } + + // Checks the disk space to make sure the cache is not being overflowed. + int cacheOverflow(const double &bytes, const int getGenerationType) const; + + // Clean global and static data for the downloader threads. + static void closeDownloader(); + + // Function to initialize the downloader threads + static void initializeDownloader(); + + void deleteSheep(Sheep *sheep); + + static bool fGotList; + + static bool fListDirty; + + public: + SheepDownloader(); + virtual ~SheepDownloader(); + + static void shepherdCallback(void* data); + + static int numberOfDownloadedSheep(); + + static uint32 currentGeneration() { return fCurrentGeneration; } + + static bool getSheepList(); + + + // add to the number of downloaded sheep (called by torrent) + static void addDownloadedSheep(int sheep) { fDownloadedSheep += sheep; } + + void deleteSheepId(uint32 sheepId); + + // Aborts the working thread + void Abort( void ); + + // Declare friend classes for protected data accesss. + friend class Shepherd; +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepGenerator.cpp electricsheep-3.0.2-git20180325/ContentDownloader/SheepGenerator.cpp --- electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepGenerator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/SheepGenerator.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,660 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifdef WIN32 +#include +#include +#endif +#include +#include +#include +#include +#include +#include + +#include "base.h" +#include "MathBase.h" +#include "Log.h" +#include "Timer.h" +#include "clientversion.h" +#include "Networking.h" +#include "Timer.h" +#include "ContentDownloader.h" +#include "SheepGenerator.h" +#include "Shepherd.h" +#include "SheepUploader.h" +#include "ProcessForker.h" +#include "Settings.h" +#if defined(WIN32) && defined(_MSC_VER) +#include "../msvc/msvc_fix.h" +#endif + +namespace ContentDownloader +{ + +using namespace boost; + +static const uint32 MAXBUF = 1024; +static const uint32 TIMEOUT = 600; +static const uint32 MAX_TIMEOUT = 24*60*60U; // 1 day +#ifndef DEBUG +static const uint32 INIT_DELAY = 600; +#endif + +// Initialize the static class data. +char *SheepGenerator::fNickName = NULL; +char *SheepGenerator::fURL = NULL; + +// Initialize any global data. +boost::mutex SheepGenerator::s_GeneratorMutex; + +boost::mutex SheepGenerator::s_NickNameMutex; + +/* +*/ +SheepGenerator::SheepGenerator() +{ + fHasMessage = false; + fGeneratorId = 0; + fTempFile = NULL; + m_DelayAfterRenderSec = g_Settings()->Get( "settings.generator.DelayAfterRenderSeconds", 1 ); +} + +/* +*/ +SheepGenerator::~SheepGenerator() +{ + g_Log->Info( "~SheepGenerator()..." ); + + SAFE_DELETE_ARRAY( fNickName ); + SAFE_DELETE_ARRAY( fURL ); + + if( fTempFile ) + remove( fTempFile ); + + //SAFE_DELETE(m_spFlam); + + //m_spFlam = NULL; +} + +/* +*/ +void SheepGenerator::initializeGenerator() +{ +} + +/* +*/ +void SheepGenerator::closeGenerator() +{ + g_Log->Info( "Closing generator..." ); +} + +/* +*/ +void SheepGenerator::Abort() +{ + if ( !m_spFlam.IsNull() ) + m_spFlam->Terminate(); +} + + +/* +*/ +void SheepGenerator::setNickName( const char *nick ) +{ + boost::mutex::scoped_lock lockthis( s_NickNameMutex ); + + SAFE_DELETE_ARRAY( fNickName ); + fNickName = new char[ strlen(nick) + 1 ]; + strcpy( fNickName, nick ); +} + +/* +*/ +const char *SheepGenerator::nickName() +{ + boost::mutex::scoped_lock lockthis( s_NickNameMutex ); + + return fNickName; +} + +/* +*/ +void SheepGenerator::setURL( const char *url ) +{ + boost::mutex::scoped_lock lockthis( s_GeneratorMutex ); + + SAFE_DELETE_ARRAY( fURL ); + size_t len = strlen( url ); + fURL = new char[ len + 1 ]; + strncpy( fURL, url, len + 1 ); +} + +/* +*/ +const char *SheepGenerator::URL() +{ + boost::mutex::scoped_lock lockthis( s_GeneratorMutex ); + + return fURL; +} + +#if 1//DASVO_TEST +// +void SheepGenerator::handleGetElement(TiXmlElement* getElement, SheepUploader *uploader) +{ + uploader->setHasMessage( false ); + + if ( strcmp( "get", getElement->Value() ) != 0 ) + return; + + const char *a; + if ((a = getElement->Attribute("gen"))) uploader->setSheepGeneration( atoi(a) ); + if ((a = getElement->Attribute("id"))) uploader->setSheepID( atoi(a) ); + if ((a = getElement->Attribute("job"))) uploader->setSheepJob( atoi(a) ); + if ((a = getElement->Attribute("time"))) uploader->setSheepTime( atoi(a) ); + if ((a = getElement->Attribute("frame"))) + { + g_Log->Info( "frame: %u", atoi(a) ); + uploader->setSheepTime(atoi(a)); + uploader->setSheepJob(atoi(a)); + } + + TiXmlElement* pChildNode; + for ( pChildNode = getElement->FirstChildElement(); pChildNode; pChildNode = pChildNode->NextSiblingElement() ) + { + const char* name = pChildNode->Value(); + + if( !strcmp( "message", name ) ) + { + uploader->setHasMessage( true ); + + const char *txt = pChildNode->GetText(); + if (txt) + Shepherd::addMessageText( txt, strlen(txt), 30 ); + + } + else if( !strcmp( "error", name ) ) + { + char server_error_type[ MAXBUF ]; + + const char *at = pChildNode->Attribute("type"); + + if( at ) + { + strncpy( server_error_type, at, MAXBUF ); + + Shepherd::addMessageText( server_error_type, strlen( server_error_type ), 180 ); // 3 minutes + } + } + } +} +#else +/* + getStartElement(). + This method will parse the start element of the control point file to get information specific to the frame. +*/ +void SheepGenerator::getStartElement( void *userData, const char *name, const char **atts ) +{ + SheepUploader *uploader = (SheepUploader *)userData; + int i = 0; + + if( !strcmp( "get", name ) ) + { + while( atts[i] != NULL) + { + const char *a = atts[i+1]; + + if( !strcmp(atts[i], "gen") ) uploader->setSheepGeneration( atoi(a) ); + else if( !strcmp(atts[i], "id") ) uploader->setSheepID( atoi(a) ); + else if( !strcmp(atts[i], "job") ) uploader->setSheepJob( atoi(a) ); + else if( !strcmp(atts[i], "time") ) uploader->setSheepTime( atoi(a) ); + else if( !strcmp(atts[i], "frame") ) + { + g_Log->Info( "frame: %u", atoi(a) ); + uploader->setSheepTime(atoi(a)); + uploader->setSheepJob(atoi(a)); + } + + i += 2; + } + } + else if (!strcmp( "message", name )) + { + uploader->setHasMessage( true ); + } + else if( !strcmp( "error", name ) ) + { + char servererrortype[ ContentDownloader::MAXBUF ]; + while( atts[i] ) + { + if( !strcmp(atts[i], "type") ) + { + strncpy( servererrortype, atts[i+1], ContentDownloader::MAXBUF ); + ContentDownloader::Shepherd::addMessageText( servererrortype, strlen(servererrortype), 180 ); //3 minutes + } + i += 2; + } + } +} + +/* + getEndElement(). + This method gets the end element of the control point file. +*/ +void SheepGenerator::getEndElement( void *userData, const char *name ) +{ + SheepUploader *uploader = (SheepUploader *)userData; + if( !strcmp( "message", name ) ) + uploader->setHasMessage( false ); +} + +/* + characterHandler(). + Character handler for the parser. +*/ +void SheepGenerator::characterHandler( void *userData, const XML_Char *s, int len ) +{ + SheepUploader *uploader = (SheepUploader *)userData; + if( uploader->hasMessage() ) + ContentDownloader::Shepherd::addMessageText( s, len, 30 ); // 5 minutes. +} +#endif + +/* + getControlPoints(). + This method downloads, uncompreses and parses the control point file need to create the frame for the sheep. +*/ +bool SheepGenerator::getControlPoints( SheepUploader *uploader ) +{ + // Encode the nickname & user-url since they're part of the request. + std::string nickEncoded = Network::CManager::Encode( SheepGenerator::nickName() ); + std::string urlEncoded = Network::CManager::Encode( SheepGenerator::URL() ); + + // Create the url for getting the cp file to create the frame + char url[ MAXBUF*5 ]; + snprintf( url, MAXBUF*5, "%scgi/get?n=%s&w=%s&v=%s&u=%s&r=%.3g&c=%.3g", ContentDownloader::Shepherd::serverName( true, ContentDownloader::eRenderServer ), + nickEncoded.c_str(), + urlEncoded.c_str(), + CLIENT_VERSION, + Shepherd::uniqueID(), + 1.0, + 1.0 ); + + char tmp[ 128 ]; + snprintf( tmp, 128, "Controlpoints for generator #%d", fGeneratorId ); + Network::spCFileDownloader spDownload = new Network::CFileDownloader( tmp ); + if( !spDownload->Perform( url ) ) + { + g_Log->Error( "Failed to download %s.\n", url ); + + if( spDownload->ResponseCode() == 401 ) + g_ContentDownloader().ServerFallback(); + + return false; + } + + const char *xmlPath = Shepherd::xmlPath(); + + // Save the data to file. + char filename[ MAX_PATH ]; + snprintf( filename, MAX_PATH, "%scp_%u.gzip", xmlPath, fGeneratorId ); + if( !spDownload->Save( filename ) ) + { + g_Log->Error( "Unable to save %s\n", filename ); + return false; + } + + // Open the input and output files for decompression. + snprintf( filename, MAX_PATH, "%scp_%u.xml", xmlPath, fGeneratorId ); + FILE *outXML = fopen( filename, "w" ); + if( outXML == NULL ) + { + g_Log->Error( "Unable to open %s", filename ); + return false; + } + + + snprintf( filename, MAX_PATH, "%scp_%u.gzip", xmlPath, fGeneratorId ); + gzFile gzinF = gzopen( filename, "rb" ); + if( gzinF == NULL ) + { + g_Log->Error( "Unable to open %s", filename ); + fclose( outXML ); + return false; + } + + // Decompress the file into the xml file. + char buf[ MAXBUF ]; + int numBytes = 0; + do + { + numBytes = gzread( gzinF, buf, 250 ); + if (numBytes <= 0) + break; + fwrite( buf, static_cast(numBytes), 1, outXML ); + } while( !gzeof( gzinF ) ); + + fclose( outXML ); + gzclose( gzinF ); + + // Delete the temp file. + snprintf( filename, MAX_PATH, "%scp_%u.gzip", xmlPath, fGeneratorId ); + remove( filename ); + + snprintf( filename, MAX_PATH, "%scp_%u.xml", xmlPath, fGeneratorId ); +#if 1//DASVO_TEST + TiXmlDocument doc(filename); + if (doc.LoadFile()) + { + TiXmlHandle hDoc(&doc); + TiXmlElement* getElement; + + getElement=hDoc.FirstChild("get").Element(); + + handleGetElement(getElement, uploader); + } + else + { + fprintf( stderr, "%s at line %d\n", doc.ErrorDesc(), doc.ErrorRow() ); + } +#else + FILE *inXML = fopen( filename, "r" ); + if( inXML == NULL ) + { + g_Log->Error( "Unable to open %s", filename ); + return false; + } + + // Parse the xml file. + XML_Parser parser; + parser = XML_ParserCreate( NULL ); + XML_SetElementHandler( parser, getStartElement, getEndElement ); + XML_SetCharacterDataHandler( parser, characterHandler ); + XML_SetUserData( parser, uploader ); + + int done = 0; + + do + { + size_t len = fread( buf, 1, MAXBUF, inXML ); + done = len < MAXBUF; + if( len == 0 ) // Lost contact, no data to parse. + break; + + if( !XML_Parse( parser, buf, len, done ) ) + { + g_Log->Error( "%s at line %d\n", XML_ErrorString( XML_GetErrorCode( parser ) ), XML_GetCurrentLineNumber( parser ) ); + break; + } + } while( !done ); + + XML_ParserFree( parser ); + + fclose( inXML ); +#endif + + + return true; +} + +/* +*/ +bool SheepGenerator::generateSheep() +{ + char cpf[ MAX_PATH ]; + char jpf[ MAX_PATH ]; + + try + { +#ifdef WIN32 + std::string forkee = g_Settings()->Get( "settings.app.InstallDir", std::string(".\\") ) + "flam3-animate.exe"; +#else +#ifndef LINUX_GNU + std::string forkee = g_Settings()->Get( "settings.app.InstallDir", std::string("./") ) + "flam3-animate"; +#else + /* linux should find it in the user's $PATH */ + char fullpath[MAX_PATH]; + FILE *fp = popen( "which flam3-animate", "r" ); + char *ret = fgets( fullpath, MAX_PATH, fp ); + pclose( fp ); + + if ( strlen ( fullpath ) > 0 ) + /* remove terminating newline */ + memset( fullpath + strlen( fullpath ) - 1, 0 , 1 ); + + std::string forkee( fullpath ); +#endif +#endif + +#ifndef DEBUG + { + std::stringstream tmp; + + tmp << "Rendering starts in {" << std::fixed << std::setprecision(0) << (int32)ContentDownloader::INIT_DELAY << "}..."; + + Shepherd::setRenderState(tmp.str()); + // Make sure we are really deeply settled asleep, avoids lots of timed out frames. + g_Log->Info( "Chilling for %d seconds before trying to render frames...", ContentDownloader::INIT_DELAY ); + + thread::sleep( get_system_time() + posix_time::seconds(ContentDownloader::INIT_DELAY) ); + } +#endif + + uint32 failureSleepDuration = TIMEOUT; + uint32 noWorkSleepDuration = 0; + Base::CTimer timer; + + while( true ) + { + this_thread::interruption_point(); + + SheepUploader *uploader = new SheepUploader(); + Shepherd::setRenderState( "Requesting control points from the server..." ); + // Get the control points for the frame. + bool allowRender = Shepherd::RenderingAllowed(); + if( getControlPoints( uploader ) && allowRender) + { + bool hasWork = true; + Shepherd::setRenderState( "Processing received control points..." ); + // We got data from server, reset failure delay. + failureSleepDuration = TIMEOUT; + + // Create the filenames to send to the flame generator. + snprintf( cpf, MAX_PATH, "%scp_%u.xml", ContentDownloader::Shepherd::xmlPath(), fGeneratorId ); + + //fp8 starttime = timer.Time(); + + // Parse the xml file to get env-vars. + TiXmlDocument *pDoc = new TiXmlDocument; + + uint32 sleeptime = TIMEOUT; + if( pDoc ) + { + if( pDoc->LoadFile( cpf ) ) + { + TiXmlNode *pNode = pDoc->FirstChild( "get" ); + if( pNode ) + { + TiXmlNode *pArgs = pNode->FirstChild( "args" ); + if( pArgs ) + { + // Create process... + std::string fmt = "tmp"; + m_spFlam = new Base::CProcessForker( forkee.c_str() ); + + TiXmlElement *pElement = pArgs->ToElement(); + for( TiXmlAttribute *pAttribute = pElement->FirstAttribute(); pAttribute; pAttribute = pAttribute->Next() ) + { + if( std::string( pAttribute->Name() ) == "format" ) + fmt = pAttribute->Value(); + + m_spFlam->PushEnv( pAttribute->Name(), pAttribute->Value() ); + } + + snprintf( jpf, MAX_PATH, "%ssheep_%d_%d_%d.%s", ContentDownloader::Shepherd::jpegPath(), uploader->sheepGeneration(), uploader->sheepID(), uploader->sheepJob(), fmt.c_str() ); +#ifdef WIN32 + + fTempFile = _strdup(jpf); +#else + fTempFile = strdup(jpf); +#endif + + // Fork flam process, throws if failed. + m_spFlam->PushEnv( "verbose", "0" ); + m_spFlam->PushEnv( "in", cpf ); + m_spFlam->PushEnv( "out", jpf ); + m_spFlam->PushEnv( "nthreads", "1" ); + m_spFlam->Execute(); + + Shepherd::FrameStarted(); + m_spFlam->Wait(); + + //if the sheep's file really exists, mark it as completed + FILE *f = fopen( jpf, "rb" ); + if ( f ) + { + Shepherd::FrameCompleted(); + fclose( f ); + } + + thread::sleep( get_system_time() + posix_time::seconds(m_DelayAfterRenderSec) ); + + uploader->setSheepFile( jpf ); + if( uploader->uploadSheep() ) + sleeptime = 0; + else + sleeptime = TIMEOUT; + + SAFE_DELETE( uploader ); + + if( !ContentDownloader::Shepherd::saveFrames() ) + { + if (remove( jpf ) != 0) + g_Log->Warning( "Failed to remove %s", jpf); + } + + free( fTempFile ); + fTempFile = NULL; + } + else + { + hasWork = false; + noWorkSleepDuration = Base::Math::Clamped( noWorkSleepDuration * 2, TIMEOUT, MAX_TIMEOUT ); + // No args node, check for "retry" & message... + TiXmlElement *pElement = pNode->ToElement(); + for( TiXmlAttribute *pAttribute = pElement->FirstAttribute(); pAttribute; pAttribute = pAttribute->Next() ) + { + if( std::string( pAttribute->Name() ) == "retry" ) + { + //sleeptime = static_cast(atoi( pAttribute->Value() )); + sleeptime = 0; // ignore value from server + g_Log->Info( "Retry in %dsec", sleeptime ); + } + } + + pNode = pNode->FirstChild( "message" ); + if( pNode ) + { + pNode = pNode->FirstChild(); + if( pNode ) + { + TiXmlText *pText = pNode->ToText(); + if( pText ) + ContentDownloader::Shepherd::addMessageText( pText->Value(), strlen(pText->Value()), 180); //3 minutes + } + } + } + } + } + SAFE_DELETE( pDoc ); + } + + if( sleeptime > 0 || (noWorkSleepDuration > 0 && hasWork == false)) + { + g_Log->Info( "Chilling for %d+%d seconds...", sleeptime, noWorkSleepDuration ); + + std::stringstream tmp; + if (hasWork == false) + tmp << "No work received from server. "; + else + noWorkSleepDuration = 0; + tmp << "Rendering restarting in {" << std::fixed << std::setprecision(0) << (sleeptime + noWorkSleepDuration) << "}..."; + Shepherd::setRenderState(tmp.str()); + + thread::sleep( get_system_time() + posix_time::seconds(sleeptime + noWorkSleepDuration) ); + } + else + { + noWorkSleepDuration = 0; + thread::yield(); + } + } + else + { + if (allowRender == false) + { + g_Log->Warning( "Rendering not allowed... chilling for %d seconds...", failureSleepDuration ); + + thread::sleep( get_system_time() + posix_time::seconds(failureSleepDuration) ); + + std::stringstream tmp; + tmp << "Rendering restarting in {" << std::fixed << std::setprecision(0) << failureSleepDuration << "}..."; + Shepherd::setRenderState(tmp.str()); + + failureSleepDuration = TIMEOUT;//Base::Math::Clamped( failureSleepDuration * 2, TIMEOUT, failureSleepDuration*10 ); + } + else + { + g_Log->Warning( "Unable to get control points from server... chilling for %d seconds...", failureSleepDuration ); + + thread::sleep( get_system_time() + posix_time::seconds(failureSleepDuration) ); + + std::stringstream tmp; + tmp << "Rendering restarting in {" << std::fixed << std::setprecision(0) << failureSleepDuration << "}..."; + Shepherd::setRenderState(tmp.str()); + + failureSleepDuration = TIMEOUT;//Base::Math::Clamped( failureSleepDuration * 2, TIMEOUT, failureSleepDuration*10 ); + } + } + SAFE_DELETE( uploader ); + } + } + catch(thread_interrupted const&) + { + } + + return true; +} + +/* + shepherdCallback(). + This method is the entry point for the shepherd. The method will create new frames and get than indicate to the uploader to begin uploading them +*/ +void SheepGenerator::shepherdCallback( void* data ) +{ + ((SheepGenerator *)data)->generateSheep(); +} + +} diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepGenerator.h electricsheep-3.0.2-git20180325/ContentDownloader/SheepGenerator.h --- electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepGenerator.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/SheepGenerator.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,111 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef _SHEEPGENERATOR_H_ +#define _SHEEPGENERATOR_H_ + +#if 0//DASVO_TEST +#include "expat.h" +#endif +#include "base.h" +#include "ProcessForker.h" +#include "tinyxml.h" + + +namespace ContentDownloader +{ + +class SheepUploader; + +/* + SheepGenerator. + This class is responsible for creating sheep frames to be uploaded to the server. +*/ +class SheepGenerator +{ + public: + + static char *fNickName; + static char *fURL; + + Base::spCProcessForker m_spFlam; + + static boost::mutex s_GeneratorMutex; + static boost::mutex s_NickNameMutex; + + + char *fTempFile; + bool fHasMessage; + uint32 fGeneratorId; + int32 m_DelayAfterRenderSec; + + protected: + // Gets the control point file from the server. + bool getControlPoints( SheepUploader *uploader ); + + // Generates a sheep from the control point file that was last downloaded. + bool generateSheep(); + + public: + SheepGenerator(); + virtual ~SheepGenerator(); + + static void shepherdCallback( void* data ); + + // Sets/gets the nickname to be used with the sheep server. + static void setNickName(const char *nick); + static const char *nickName(); + + // Sets/gets the url to be displayed with the nickname on the server + static void setURL( const char *url ); + static const char *URL(); + +#if 1//DASVO_TEST + void handleGetElement(TiXmlElement* getElement, SheepUploader *uploader); +#else + // Functions to parse the XML structures. + static void getStartElement( void *userData, const char *name, const char **atts ); + static void characterHandler( void *userData, const XML_Char *s, int len ); + static void getEndElement( void *userData, const char *name ); +#endif + + // Sets/gets whether or not to play a beep after a sheep frame has been generated. + static void setPlayBeep( const int &playBeep ); + static int playBeep(); + + // Sets/gets generator thread ID. + void setGeneratorId(const uint32 id) { fGeneratorId = id; } + uint32 generatorId() const { return fGeneratorId; } + + void Abort( void ); + + friend class Shepherd; + + // Initialize global data used by the generators. + static void initializeGenerator(); + + // Cleans up any global data used by the generators. + static void closeGenerator(); +}; + +}; +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/Sheep.h electricsheep-3.0.2-git20180325/ContentDownloader/Sheep.h --- electricsheep-2.7~b12+svn20091224/ContentDownloader/Sheep.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/Sheep.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,194 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef _SHEEP_H_ +#define _SHEEP_H_ + +#include "base.h" + +namespace ContentDownloader +{ + +// +// Description: +// This class will represent a sheep as it exists +// on the server or on the client. It has methods to +// get and set different aspects of a sheep +// +class Sheep +{ +public: + // Default constructor + // + Sheep(); + + // Copy Constructor + // + Sheep( const Sheep &sheep ); + + // Destructor + // + ~Sheep(); + + // sets the URL that this sheep lives at + // + void setURL(const char *url); + + // returns the URL that the sheep lives at + // + const char *URL() const { return fURL; } + + // Sets the current rating of the sheep on the server + // + void setRating(const int &rating) { fRating = rating; } + + // gets the current rating of the sheep + // + int rating() const { return fRating; } + + // Sets the sheep file size on the server + // + void setFileSize(const uint64 &size) { fFileSize = size; } + + // gets the sheep file size + // + uint64 fileSize() const { return fFileSize; } + + // Sets the sheep file name + // + void setFileName(const char *name); + + // gets the sheep file name + // + const char *fileName() const { return fFileName; } + + // sets the file write time + // + void setFileWriteTime( const time_t &time ) { fWriteTime = time; } + + // gets the file write time + // + time_t fileWriteTime() const { return fWriteTime; } + + // sets the sheep id + // + void setId( const uint32 &id ) { fSheepId = id; } + + // gets the sheep id + // + uint32 id() const { return fSheepId; } + + // sets the the sheep that transitions into this sheep + // + void setFirstId( const uint32 &first ) { fFirst = first; } + + // gets the sheep that transitions into this sheep + // + uint32 firstId() const { return fFirst; } + + // sets the sheep that this sheep should transistion + // into + // + void setLastId( const uint32 &last ) { fLast = last; } + + // gets the sheep that this sheep should transition into + // + uint32 lastId() const { return fLast; } + + // sets whether or not this sheep has been deleted from the + // server + // + void setDeleted( const bool &state ) { fDeleted = state; } + + // gets if the sheep has been deleted from the server + // + bool deleted() const { return fDeleted; } + + // set the sheep type + // + void setType( const int &type ) { fType = type; } + + // returns the sheep type + // + int type() const { return fType; } + + // sets whether or not the sheep has been downloaded + // + void setDownloaded( const bool &state ) { fDownloaded = state; } + + // returns if the sheep has been downloaded + // + bool downloaded() const { return fDownloaded; } + + // set the sheep generation + // + void setGeneration( const uint32 &gen ) { fGeneration = gen; } + + // returns the sheep generation + // + uint32 generation() const { return fGeneration; } + + // returns sheep generation type (currently 0 - normal, 1 - gold) + int getGenerationType() const + { + if ( generation() < 10000 ) + return 0; + else + return 1; + } + + // sets if the sheep is a tmp file + // which means it is either being downloaded + // or was left from the last download process + // + void setIsTemp(const bool &isTemp) { fIsTemp = isTemp; } + + // returns if the sheep is a tmp sheep + // + bool isTemp() const { return fIsTemp; } + +private: + // private memeber data + // + char *fURL; + char *fFileName; + uint64 fFileSize; + time_t fWriteTime; + int fRating; + uint32 fSheepId; + uint32 fFirst; + uint32 fLast; + int fType; + bool fDeleted; + bool fDownloaded; + uint32 fGeneration; + bool fIsTemp; +}; + +// This is a convienince for defining an array +// of sheep using stl::vector +// +typedef std::vector SheepArray; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepUploader.cpp electricsheep-3.0.2-git20180325/ContentDownloader/SheepUploader.cpp --- electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepUploader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/SheepUploader.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,130 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifdef WIN32 +#include +#endif +#include +#include + +#include "Log.h" +#include "clientversion.h" +#include "ContentDownloader.h" +#include "Networking.h" +#include "Shepherd.h" +#include "SheepUploader.h" +#if defined(WIN32) && defined(_MSC_VER) +#include "../msvc/msvc_fix.h" +#endif + +namespace ContentDownloader +{ + +// +SheepUploader::SheepUploader() +{ + fAnimID = -1; + fGen = -1; + fJob = -1; + fTime = -1; + fHasMessage = false; + fSheepFile = NULL; +} + +// +SheepUploader::~SheepUploader() +{ + if(fSheepFile) + { + delete [] fSheepFile; + } +} + +// Sets the sheep file to the given filename. +void SheepUploader::setSheepFile( const char *fullFileName ) +{ + if( fSheepFile ) + SAFE_DELETE_ARRAY( fSheepFile ); + + if( fullFileName ) + { + fSheepFile = new char[ strlen( fullFileName ) + 1 ]; + strcpy( fSheepFile, fullFileName ); + } +} + +// Upload the sheep frame that exists on disk. +bool SheepUploader::uploadSheep() +{ + g_Log->Info( "uploadSheep(): %s", fSheepFile ); + + // Validate the file and get the file size of the file. + long fileSize = -1; + FILE *f = fopen( fSheepFile, "rb" ); + if ( f != NULL ) + { + fseek( f, 0, SEEK_END ); + fileSize = ftell( f ); + fclose( f ); + } + else + { + g_Log->Error( "Frame doesn't exist(%s)!", fSheepFile ); + return false; + } + + if (fileSize <= 0) + return false; + + + // Use only the file base name as uploader name, not the whole path. + char *upname = strrchr( fSheepFile, PATH_SEPARATOR_C ); + + if ( upname == NULL ) + upname = fSheepFile; + else + upname++; + + Network::spCFileUploader spUpload = new Network::CFileUploader( upname ); + char url[ MAX_PATH ]; + snprintf( url, MAX_PATH, "%scgi/put?j=%d&id=%d&s=%ld&g=%d&v=%s&u=%s", ContentDownloader::Shepherd::serverName(), + fJob, + fAnimID, + fileSize, + fGen, + CLIENT_VERSION, + Shepherd::uniqueID() ); + + if( !spUpload->PerformUpload( url, fSheepFile, static_cast(fileSize) ) ) + { + g_Log->Error( "Failed to upload %s.\n", url ); + + if( spUpload->ResponseCode() == 401 ) + g_ContentDownloader().ServerFallback(); + + return false; + } + + return true; +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepUploader.h electricsheep-3.0.2-git20180325/ContentDownloader/SheepUploader.h --- electricsheep-2.7~b12+svn20091224/ContentDownloader/SheepUploader.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/SheepUploader.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,82 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef _SHEEPUPLOADER_H_ +#define _SHEEPUPLOADER_H_ + +#include "base.h" + +namespace ContentDownloader +{ + +// +// Description: +// This class uploads the sheep frame that +// is currently on disk. +// +class SheepUploader +{ + int32 fAnimID; + int32 fGen; + int32 fJob; + int32 fTime; + bool fHasMessage; + char *fSheepFile; + + protected: + // Uploads the sheep from disk. + bool uploadSheep(); + + public: + SheepUploader(); + virtual ~SheepUploader(); + + // Sets/gets the sheep ID for the frame on disk. + void setSheepID( const int32 &animID ) { fAnimID = animID; } + int32 sheepID() const { return fAnimID; } + + // sets/gets the sheep file on disk + void setSheepFile( const char *fullFileName ); + const char *sheepFile() const { return fSheepFile; } + + // sets/gets the sheep generation for the frame on disk + void setSheepGeneration( const int32 &gen ) { fGen = gen; } + int32 sheepGeneration() const { return fGen; } + + // sets/gets the job for the frame on disk. + void setSheepJob( const int32 &job ) { fJob = job; } + int32 sheepJob() const { return fJob; } + + // sets/gets the sheep frame for the frame on disk + void setSheepTime( const int32 &time ) { fTime = time; }; + int32 sheepTime() { return fTime ; }; + + // sets/gets if the server has sent a message + void setHasMessage(const bool &hasMessage) { fHasMessage = hasMessage; } + bool hasMessage() const { return fHasMessage; } + + friend class SheepGenerator; +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/Shepherd.cpp electricsheep-3.0.2-git20180325/ContentDownloader/Shepherd.cpp --- electricsheep-2.7~b12+svn20091224/ContentDownloader/Shepherd.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/Shepherd.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,853 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include +//#include +#include +#include +#include +#include +#include +#if defined(WIN32) && defined(_MSC_VER) +#include "../msvc/msvc_fix.h" +#else +#include +#endif +#include + +#include "base.h" +#include "clientversion.h" +#include "Log.h" +#include "Settings.h" +#include "Shepherd.h" +#include "SheepDownloader.h" +#include "SheepGenerator.h" +#include "md5.h" + +namespace ContentDownloader +{ + +// declare namespace we are using +// +using namespace std; + +#define MAXBUF 1024 +#define MIN_READ_INTERVAL 600 + +// Initialize static class data +// +uint64 Shepherd::s_ClientFlockBytes = 0; +uint64 Shepherd::s_ClientFlockGoldBytes = 0; +uint64 Shepherd::s_ClientFlockCount = 0; +uint64 Shepherd::s_ClientFlockGoldCount = 0; +atomic_char_ptr Shepherd::fRootPath(NULL); +atomic_char_ptr Shepherd::fMpegPath(NULL); +atomic_char_ptr Shepherd::fXmlPath(NULL); +atomic_char_ptr Shepherd::fJpegPath(NULL); +atomic_char_ptr Shepherd::fRedirectServerName(NULL); +atomic_char_ptr Shepherd::fServerName(NULL); +atomic_char_ptr Shepherd::fVoteServerName(NULL); +atomic_char_ptr Shepherd::fRenderServerName(NULL); +atomic_char_ptr Shepherd::fProxy(NULL); +atomic_char_ptr Shepherd::fProxyUser(NULL); +atomic_char_ptr Shepherd::fProxyPass(NULL); +int Shepherd::fUseProxy = 0; +int Shepherd::fSaveFrames = 0; +int Shepherd::fCacheSize = 100; +int Shepherd::fCacheSizeGold = 100; +int Shepherd::fRegistered = 0; +atomic_char_ptr Shepherd::fPassword(NULL); +atomic_char_ptr Shepherd::fUniqueID(NULL); +atomic_char_ptr Shepherd::fRole(NULL); +boost::detail::atomic_count *Shepherd::renderingFrames = NULL; +boost::detail::atomic_count *Shepherd::totalRenderedFrames = NULL; +bool Shepherd::m_RenderingAllowed = true; + +std::queue Shepherd::m_MessageQueue; +boost::mutex Shepherd::m_MessageQueueMutex; + +std::vector Shepherd::m_OverflowMessageQueue; +boost::mutex Shepherd::s_OverflowMessageQueueMutex; + +boost::mutex Shepherd::s_ShepherdMutex; + +boost::shared_mutex Shepherd::s_DownloadStateMutex; +boost::shared_mutex Shepherd::s_RenderStateMutex; + +boost::shared_mutex Shepherd::s_GetServerNameMutex; + +boost::mutex Shepherd::s_ComputeServerNameMutex; + +bool Shepherd::fShutdown = false; +int Shepherd::fChangeRes = 0; +int Shepherd::fChangingRes = 0; + +time_t Shepherd::s_LastRequestTime = 0; + +Base::CBlockingQueue Shepherd::fStringsToDelete; + +std::string Shepherd::s_DownloadState; +std::string Shepherd::s_RenderState; + +bool Shepherd::s_IsDownloadStateNew = false; +bool Shepherd::s_IsRenderStateNew = false; + +#define _24_HOURS (60 * 60 * 24) + + +Shepherd::~Shepherd() +{ + g_Log->Info( "~Shepherd()..." ); + + while( m_MessageQueue.size() != 0 ) + m_MessageQueue.pop(); +} + +void Shepherd::initializeShepherd(/*HINSTANCE hInst, HWND hWnd*/) +// +// Description: +// Initialize global data for the shepherd and his heard. +// +{ + SheepDownloader::initializeDownloader(); + SheepGenerator::initializeGenerator(); + + totalRenderedFrames = new boost::detail::atomic_count((int)(int32)g_Settings()->Get( "settings.generator.totalFramesRendered", 0 )); + renderingFrames = new boost::detail::atomic_count(0); +} + +/* + notifyShepherdOfHisUntimleyDeath(). + This method gets called by the main window procedure before the app is about to close. This allows the shepherd to clean any data that it allocated. +*/ +void Shepherd::notifyShepherdOfHisUntimleyDeath() +{ + g_Log->Info( "notifyShepherdOfHisUntimleyDeath..." ); + + SheepDownloader::closeDownloader(); + SheepGenerator::closeGenerator(); + + //boost::mutex::scoped_lock lockthis( s_ShepherdMutex ); + + SAFE_DELETE_ARRAY( fRootPath ); + SAFE_DELETE_ARRAY( fMpegPath ); + SAFE_DELETE_ARRAY( fXmlPath ); + SAFE_DELETE_ARRAY( fJpegPath ); + SAFE_DELETE_ARRAY( fRedirectServerName ); + SAFE_DELETE_ARRAY( fServerName ); + SAFE_DELETE_ARRAY( fVoteServerName ); + SAFE_DELETE_ARRAY( fRenderServerName ); + SAFE_DELETE_ARRAY( fPassword ); + SAFE_DELETE_ARRAY( fProxy ); + SAFE_DELETE_ARRAY( fProxyUser ); + SAFE_DELETE_ARRAY( fProxyPass ); + SAFE_DELETE_ARRAY( fUniqueID ); + SAFE_DELETE_ARRAY( fRole ); + + SAFE_DELETE( totalRenderedFrames ); + SAFE_DELETE( renderingFrames ); + + std::vector::const_iterator it; + + char *str; + + while(fStringsToDelete.pop(str)) + { + SAFE_DELETE_ARRAY( str ); + } + + fStringsToDelete.clear(0); +} + +void Shepherd::setNewAndDeleteOldString(atomic_char_ptr &str, char *newval, boost::memory_order mem_ord) +{ + char *toDelete = str.exchange(newval, mem_ord); + + if (toDelete != NULL) + fStringsToDelete.push(toDelete); +} + +void Shepherd::setRootPath(const char *path) +// +// Description: +// This method is used to set the root path +// where all of the files will be created and downloaded +// to. The method also initializes all of the relative paths +// for the subdirectories. +// +{ + // strip off trailing white space + // + size_t len = strlen(path); + char *runner = const_cast(path) + len - 1; + while(*runner == ' ') + { + len--; runner--; + } + + //we need space for trailing \ character + char *newRootPath = new char[len + 2]; + + // copy the data + memcpy(newRootPath, path, len); + + // check for the trailing \ character + if(*runner != PATH_SEPARATOR_C) + { + newRootPath[len] = PATH_SEPARATOR_C; + newRootPath[len + 1] = '\0'; + } + else + newRootPath[len] = '\0'; + + // create the directory for the path +#ifdef WIN32 + CreateDirectoryA(newRootPath, NULL); +#else + mkdir(newRootPath, 0755); +#endif + + setNewAndDeleteOldString(fRootPath, newRootPath); + + char *newMpegPath = new char[(len + 12)]; + + snprintf(newMpegPath, len + 12, "%smpeg%c", newRootPath,PATH_SEPARATOR_C); +#ifdef WIN32 + CreateDirectoryA(newMpegPath, NULL); +#else + mkdir(newMpegPath, 0755); +#endif + + setNewAndDeleteOldString(fMpegPath, newMpegPath); + + char *newXmlPath = new char[(len + 12)]; + snprintf(newXmlPath, len + 12,"%sxml%c", newRootPath,PATH_SEPARATOR_C); +#ifdef WIN32 + CreateDirectoryA(newXmlPath, NULL); +#else + mkdir(newXmlPath, 0755); +#endif + + setNewAndDeleteOldString(fXmlPath, newXmlPath); + + char *newJpegPath = new char[(len + 12)]; + snprintf(newJpegPath, len + 12,"%sjpeg%c", newRootPath,PATH_SEPARATOR_C); +#ifdef WIN32 + CreateDirectoryA(newJpegPath, NULL); +#else + mkdir(newJpegPath, 0755); +#endif + + setNewAndDeleteOldString(fJpegPath, newJpegPath); +} + +void Shepherd::setRole( const char *role ) +{ + size_t len = strlen(role); + + char *newRole = new char[len + 1]; + strcpy(newRole, role); + + setNewAndDeleteOldString(fRole, newRole); +} + +const char *Shepherd::role() +{ + return fRole.load(boost::memory_order_relaxed); +} + +void +Shepherd::setRedirectServerName(const char *server) +// +// Description: +// Sets the server name for the sheep server. +// +{ + size_t len = strlen(server); + + char *newRedirectServerName = new char[len + 1]; + strcpy(newRedirectServerName, server); + + setNewAndDeleteOldString(fRedirectServerName, newRedirectServerName); +} + + +void +Shepherd::setProxy(const char *proxy) +// +// Description: +// Sets the proxy server address for tcp|ip +// transactions. +// +{ + size_t len = strlen(proxy); + + char *newProxy = new char[len + 1]; + strcpy(newProxy, proxy); + + setNewAndDeleteOldString(fProxy, newProxy); +} + +void +Shepherd::setProxyUserName(const char *userName) +// +// Description: +// Sets the proxy username. +// +{ + size_t len = strlen(userName); + + char *newProxyUser = new char[len + 1]; + strcpy(newProxyUser, userName); + + setNewAndDeleteOldString(fProxyUser, newProxyUser); +} + +void +Shepherd::setProxyPassword(const char *password) +// +// Description: +// Sets the proxy password. +// +{ + size_t len = strlen(password); + + char *newProxyPass = new char[len + 1]; + strcpy(newProxyPass, password); + + setNewAndDeleteOldString(fProxyPass, newProxyPass); +} + +int +Shepherd::filenameIsMpg(const char *name) +// +// Description: +// Returns if the file is a valid mpeg name. +// +{ + size_t n = strlen(name); + return !((n <= 4 || 0 != strcmp(&name[n-4], ".avi")) ); +} + +int +Shepherd::filenameIsXxx(const char *name) +// +// Description: +// Returns if the file is a deleted mpeg file. +// +{ + size_t n = strlen(name); + return !(n <= 4 || 0 != strcmp(&name[n-4], ".xxx")); +} + +int +Shepherd::filenameIsTmp(const char *name) +// +// Description: +// Returns if the file is a deleted mpeg file. +// +{ + size_t n = strlen(name); + return !(n <= 4 || 0 != strcmp(&name[n-4], ".tmp")); +} + +void Shepherd::addMessageText(const char *s, size_t len, time_t timeout) +{ + QueueMessage( std::string( s, len ), (fp8)timeout ); +} + +const char *Shepherd::rootPath() +{ + return fRootPath.load(boost::memory_order_relaxed); +} + +const char *Shepherd::mpegPath() +{ + return fMpegPath.load(boost::memory_order_relaxed); +} + +const char *Shepherd::xmlPath() +{ + return fXmlPath.load(boost::memory_order_relaxed); +} + +const char *Shepherd::jpegPath() +{ + return fJpegPath.load(boost::memory_order_relaxed); +} + +std::string Shepherd::computeMD5( const std::string& str ) +{ + unsigned char digest[16]; //md5 digest size is 16 + + md5_buffer( str.c_str(), str.size(), digest ); + + std::string md5Str; + + for (uint32 i = 0; i < sizeof(digest); i++) + { + const char *hex_digits = "0123456789ABCDEF"; + + md5Str += hex_digits[ digest[i] >> 4 ]; + md5Str += hex_digits[ digest[i] & 0x0F ]; + } + + return md5Str; +} + + +const char *Shepherd::serverName( bool allowServerQuery, eServerTargetType serverType) +{ + //just want to get current server name? We should not block!!! + if (!allowServerQuery) + { + return fServerName.load(boost::memory_order_relaxed); + } + + { + boost::mutex::scoped_lock lockName( s_ComputeServerNameMutex ); + + if ( ( fServerName.load(boost::memory_order_relaxed) == NULL || (time(0) - s_LastRequestTime) > _24_HOURS ) ) + { + const char *redirectServerName = REDIRECT_SERVER_FULL; //fRedirectServerName.load(boost::memory_order_relaxed); + + if ( redirectServerName != NULL ) + { + std::string nickEncoded = Network::CManager::Encode( SheepGenerator::nickName() ); + std::string passEncoded = Network::CManager::Encode( Shepherd::password() ); + + bool addHTTP = false; + + if (redirectServerName[0] != 'h' || redirectServerName[1] != 't' || redirectServerName[2] != 't' || redirectServerName[3] != 'p') + { + addHTTP = true; + } + + // Create the url for getting the cp file to create the frame + char url[ MAXBUF*5 ]; + snprintf( url, MAXBUF*5, "%s%s/query.php?q=redir&u=%s&p=%s&v=%s&i=%s", + addHTTP ? "http://" : "", + redirectServerName, + nickEncoded.c_str(), + passEncoded.c_str(), + CLIENT_VERSION, + Shepherd::uniqueID() + ); + + Network::spCFileDownloader spDownload = new Network::CFileDownloader( "Sheep Server Request" ); + + if( spDownload->Perform( url ) ) + { + std::string response( spDownload->Data() ); + + //TinyXML has problems with string not terminated by \n + response += "\n"; + + TiXmlDocument doc; + if ( doc.Parse(response.c_str(), NULL, TIXML_ENCODING_UTF8 ) ) + { + TiXmlHandle hDoc(&doc); + TiXmlElement* listElement; + const char *host = NULL; + const char *vote = NULL; + const char *render = NULL; + const char *role = NULL; + + listElement=hDoc.FirstChild( "query" ).FirstChild( "redir" ).Element(); + + if ( listElement != NULL ) + { + host = listElement->Attribute("host"); + vote = listElement->Attribute("vote"); + render = listElement->Attribute("render"); + role = listElement->Attribute("role"); + } + + if (vote != NULL && *vote != 0) + { + const char *oldVoteServerName = fVoteServerName.load(boost::memory_order_relaxed); + + if (oldVoteServerName == NULL || (strcmp(oldVoteServerName, vote) != 0)) + { + char *newVoteServerName = new char[strlen(vote) + 1]; + + strcpy(newVoteServerName, vote); + + setNewAndDeleteOldString(fVoteServerName, newVoteServerName); + } + } + + + if (render != NULL && *render != 0) + { + const char *oldRenderServerName = fRenderServerName.load(boost::memory_order_relaxed); + + if (oldRenderServerName == NULL || (strcmp(oldRenderServerName, render) != 0)) + { + char *newRenderServerName = new char[strlen(render) + 1]; + + strcpy(newRenderServerName, render); + + setNewAndDeleteOldString(fRenderServerName, newRenderServerName); + } + } + + + if ( host != NULL && *host != 0 ) + { + const char *oldServerName = fServerName.load(boost::memory_order_relaxed); + + if ( oldServerName == NULL || (strcmp( oldServerName, host ) != 0) ) + { + char *newServerName = new char[ strlen(host) + 1 ]; + + strcpy( newServerName, host ); + + setNewAndDeleteOldString(fServerName, newServerName); + } + + } + + if ( role != NULL && *role != 0 ) + { + setRole(role); + } + } + else + { + fprintf( stderr, "Server Request Failed: %s at line %d\n", doc.ErrorDesc(), doc.ErrorRow() ); + } + + time(&s_LastRequestTime); + } + } + } + } + + switch (serverType) + { + case eVoteServer: + if (fVoteServerName.load(boost::memory_order_relaxed) != NULL) return fVoteServerName.load(boost::memory_order_relaxed); + else return fServerName.load(boost::memory_order_relaxed); + case eRenderServer: + if (fRenderServerName.load(boost::memory_order_relaxed) != NULL) return fRenderServerName.load(boost::memory_order_relaxed); + else return fServerName.load(boost::memory_order_relaxed); + case eHostServer: + default: + return fServerName.load(boost::memory_order_relaxed); +} +} + +const char *Shepherd::proxy() +{ + return fProxy.load(boost::memory_order_relaxed); +} + +const char *Shepherd::proxyUserName() +{ + return fProxyUser.load(boost::memory_order_relaxed); +} + +/* +*/ +const char *Shepherd::proxyPassword() +{ + return fProxyPass.load(boost::memory_order_relaxed); +} + +/* +*/ +void Shepherd::setPassword( const char *password ) +{ + size_t len = strlen(password); + + char *newPassword = new char[ len + 1 ]; + strcpy( newPassword, password ); + + setNewAndDeleteOldString(fPassword, newPassword); +} + +/* +*/ +const char *Shepherd::password() +{ + return fPassword.load(boost::memory_order_relaxed); +} + +/* + Get flock size in MBs after recounting +*/ + +uint64 Shepherd::GetFlockSizeMBsRecount(const int generationtype) +{ + if (generationtype == 0) + { + ContentDownloader::SheepArray tempSheepArray; + ContentDownloader::Shepherd::getClientFlock(&tempSheepArray); + for(unsigned i = 0; i < tempSheepArray.size(); ++i) + delete tempSheepArray[i]; + } + if (generationtype == 1) + return ContentDownloader::Shepherd::getClientFlockMBs(1); + + return ContentDownloader::Shepherd::getClientFlockMBs(0); +} + +/* + getClientFlock(). + This method fills the given sheeparray with all of the sheep on the client. +*/ +bool Shepherd::getClientFlock(SheepArray *sheep) +{ + uint64 clientFlockBytes = 0; + uint64 clientFlockCount = 0; + + uint64 clientFlockGoldBytes = 0; + uint64 clientFlockGoldCount = 0; + + SheepArray::iterator iter; + for (iter = sheep->begin(); iter != sheep->end(); ++iter ) + delete *iter; + + sheep->clear(); + + // Get the sheep in fMpegPath. + getSheep( mpegPath(), sheep ); + for (iter = sheep->begin(); iter != sheep->end(); ++iter ) + { + if ((*iter)->getGenerationType() == 0) + { + clientFlockBytes += (*iter)->fileSize(); + ++clientFlockCount; + } + else if ((*iter)->getGenerationType() == 1) + { + clientFlockGoldBytes += (*iter)->fileSize(); + ++clientFlockGoldCount; + } + } + + + s_ClientFlockBytes = clientFlockBytes; + s_ClientFlockCount = clientFlockCount; + + s_ClientFlockGoldBytes = clientFlockGoldBytes; + s_ClientFlockGoldCount = clientFlockGoldCount; + + return true; +} + +using namespace boost::filesystem; + +/* + getSheep(). + Recursively loops through all files in the path looking for sheep. +*/ +bool Shepherd::getSheep( const char *path, SheepArray *sheep ) +{ + bool gotSheep = false; + char fbuf[ MAXBUF ]; + + try { + boost::filesystem::path p(path); + + directory_iterator end_itr; // default construction yields past-the-end + for ( directory_iterator itr( p ); + itr != end_itr; + ++itr ) + { + uint32 id = 0; + uint32 first = 0; + uint32 last = 0; + uint32 generation = 0; + bool isTemp = false; + bool isDeleted = false; + + if (is_directory(itr->status())) + { + bool gotSheepSubfolder = getSheep( (char*)(itr->path().string() + std::string("/")).c_str(), sheep ); + gotSheep |= gotSheepSubfolder; + + if (!gotSheepSubfolder) + remove_all(itr->path()); + } + else + { + std::string fname(itr->path().filename().string()); + + if( Shepherd::filenameIsXxx( fname.c_str() ) ) + { + // We have found an mpeg so check the filename to see if it is valid than add it + if( 4 != sscanf( fname.c_str(), "%d=%d=%d=%d.xxx", &generation, &id, &first, &last ) ) + { + // This file is from the older format so delete it from the cache. + remove(itr->path()); + continue; + } + + isDeleted = true; + } + else if( Shepherd::filenameIsTmp( fname.c_str() ) ) + { + // This file is an unfinished downloaded file so mark it for deletion. + if( 4 != sscanf( fname.c_str(), "%d=%d=%d=%d.avi.tmp", &generation, &id, &first, &last ) ) + { + // This file is from the older format so delete it from the cache. + remove(itr->path()); + continue; + } + isTemp = true; + } + else if( Shepherd::filenameIsMpg( fname.c_str() ) ) + { + // We have found an mpeg so check the filename to see if it is valid than add it + if( 4 != sscanf( fname.c_str(), "%d=%d=%d=%d.avi", &generation, &id, &first, &last ) ) + { + // This file is from the older format so delete it from the cache. + remove(itr->path()); + continue; + } + + std::string xxxname(fname); + xxxname.replace(fname.size() - 3, 3, "xxx"); + + if ( exists( p/xxxname ) ) + { + isDeleted = true; + } + } + else + { + // Not a recognizable file skip it. + continue; + } + + // Allocate the sheep and set the attributes. + Sheep *newSheep = new Sheep(); + newSheep->setGeneration( generation ); + newSheep->setId( id ); + newSheep->setFirstId( first ); + newSheep->setLastId( last ); + newSheep->setIsTemp( isTemp ); + newSheep->setDeleted( isDeleted ); + + // Set the filename. + snprintf( fbuf, MAXBUF, "%s%s", path, fname.c_str() ); + newSheep->setFileName( fbuf ); + struct stat sbuf; + + stat( fbuf, &sbuf ); + newSheep->setFileWriteTime( sbuf.st_ctime ); + newSheep->setFileSize( static_cast(sbuf.st_size) ); + + // Add it to the return array. + sheep->push_back( newSheep ); + gotSheep = true; + } + } + + } + catch(boost::filesystem::filesystem_error& err) + { + g_Log->Error( "Path enumeration threw error: %s", err.what() ); + } + + return gotSheep; +} + +// Sets the unique id for this Shepherd. +void Shepherd::setUniqueID( const char *uniqueID ) +{ + size_t len; + if( strlen( uniqueID ) > 16 ) + len = strlen( uniqueID ); + else + len = 16; + + char *newUniqueID = new char[ len + 1 ]; + strcpy( newUniqueID, uniqueID ); + + setNewAndDeleteOldString(fUniqueID, newUniqueID); +} + +// This method returns the unique ID to use. +const char *Shepherd::uniqueID() +{ + return fUniqueID.load(boost::memory_order_relaxed); +} + +void Shepherd::setDownloadState( const std::string& state ) +{ + boost::upgrade_lock lockthis( s_DownloadStateMutex ); + + s_DownloadState.assign( state ); + + s_IsDownloadStateNew = true; +} + +std::string Shepherd::downloadState( bool &isnew ) +{ + boost::shared_lock lockthis( s_DownloadStateMutex ); + + isnew = s_IsDownloadStateNew; + + s_IsDownloadStateNew = false; + + return s_DownloadState; +} + +void Shepherd::setRenderState( const std::string& state ) +{ + boost::upgrade_lock lockthis( s_RenderStateMutex ); + + s_RenderState.assign( state ); + + s_IsRenderStateNew = true; +} + +std::string Shepherd::renderState( bool &isnew ) +{ + boost::shared_lock lockthis( s_RenderStateMutex ); + + isnew = s_IsRenderStateNew; + + s_IsRenderStateNew = false; + + return s_RenderState; +} + +// +void Shepherd::FrameStarted() { if (renderingFrames) ++(*renderingFrames); } +int Shepherd::FramesRendering() { return renderingFrames ? static_cast(*renderingFrames) : 0; } +int Shepherd::TotalFramesRendered() { return totalRenderedFrames ? static_cast(*totalRenderedFrames) : 0; } +bool Shepherd::RenderingAllowed() { return m_RenderingAllowed; } +void Shepherd::SetRenderingAllowed(bool _yesno) { m_RenderingAllowed = _yesno; } + +// +void Shepherd::FrameCompleted() +{ + if (renderingFrames) --(*renderingFrames); + if (totalRenderedFrames) ++(*totalRenderedFrames); + g_Settings()->Set( "settings.generator.totalFramesRendered", totalRenderedFrames ? (int32)*totalRenderedFrames : 0 ); +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/Shepherd.h electricsheep-3.0.2-git20180325/ContentDownloader/Shepherd.h --- electricsheep-2.7~b12+svn20091224/ContentDownloader/Shepherd.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/Shepherd.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,393 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef _SHEPHERD_H_ +#define _SHEPHERD_H_ + +#include "base.h" +#include "SmartPtr.h" +#include +#include "boost/thread/mutex.hpp" +#include "boost/detail/atomic_count.hpp" +#include "boost/atomic.hpp" +#include "Timer.h" +#include "Sheep.h" +#include "Log.h" +#include "BlockingQueue.h" + +#ifdef WIN32 +#define PATH_SEPARATOR_C '\\' +#else +#define PATH_SEPARATOR_C '/' +#endif + +namespace ContentDownloader +{ + +enum eServerTargetType +{ + eHostServer, + eVoteServer, + eRenderServer +}; + +class CMessageBody +{ + public: + CMessageBody( const std::string &_str, const fp8 _duration ) : m_Msg( _str ), m_Duration(_duration) {}; + ~CMessageBody() {}; + + std::string m_Msg; + fp8 m_Duration; +}; + +MakeSmartPointers( CMessageBody ); + +class CTimedMessageBody +{ + public: + CTimedMessageBody( const std::string &_str, const fp8 _duration ) : m_Msg( _str ), m_Duration(_duration) { m_Timer.Reset(); }; + ~CTimedMessageBody() {}; + + bool TimedOut() + { + if (m_Timer.Time() > m_Duration) + return true; + + return false; + } + Base::CTimer m_Timer; + std::string m_Msg; + fp8 m_Duration; +}; + +MakeSmartPointers( CTimedMessageBody ); + +typedef boost::atomic atomic_char_ptr; + +/* + Shepherd. + This class is responsible for managing the threads to create, render, and download sheep. +*/ +class Shepherd +{ + typedef struct _SHEPHERD_MESSAGE + { + char *text; + int length; + time_t expire; + } SHEPHERD_MESSAGE; + + // Gets all sheep in path. + static bool getSheep( const char *path, SheepArray *sheep ); + + static uint64 s_ClientFlockBytes; + static uint64 s_ClientFlockCount; + + static uint64 s_ClientFlockGoldBytes; + static uint64 s_ClientFlockGoldCount; + + static atomic_char_ptr fRootPath; + static atomic_char_ptr fMpegPath; + static atomic_char_ptr fXmlPath; + static atomic_char_ptr fJpegPath; + static atomic_char_ptr fRedirectServerName; + static atomic_char_ptr fServerName; + static atomic_char_ptr fVoteServerName; + static atomic_char_ptr fRenderServerName; + static atomic_char_ptr fProxy; + static atomic_char_ptr fProxyUser; + static atomic_char_ptr fProxyPass; + static int fSaveFrames; + static int fUseProxy; + static int fCacheSize; + static int fCacheSizeGold; + static int fFuseLen; + static int fRegistered; + static atomic_char_ptr fPassword; + static atomic_char_ptr fUniqueID; + static bool fShutdown; + static int fChangeRes; + static int fChangingRes; + static atomic_char_ptr fRole; + static boost::detail::atomic_count *renderingFrames; + static boost::detail::atomic_count *totalRenderedFrames; + static bool m_RenderingAllowed; + + + static std::queue m_MessageQueue; + static boost::mutex m_MessageQueueMutex; + + static std::vector m_OverflowMessageQueue; + static boost::mutex s_OverflowMessageQueueMutex; + + static boost::mutex s_ShepherdMutex; + + static boost::shared_mutex s_DownloadStateMutex; + + static boost::shared_mutex s_RenderStateMutex; + + static boost::mutex s_ComputeServerNameMutex; + + static boost::shared_mutex s_GetServerNameMutex; + + + static time_t s_LastRequestTime; + + static Base::CBlockingQueue fStringsToDelete; + + static std::string s_DownloadState; + + static std::string s_RenderState; + + static bool s_IsDownloadStateNew; + + static bool s_IsRenderStateNew; + + public: + Shepherd(); + ~Shepherd(); + + static void initializeShepherd(); + + // + static void setUseProxy( const int &useProxy ) { fUseProxy = useProxy; } + static int useProxy() { return fUseProxy; } + + static void setProxy(const char *proxy); + static const char *proxy(); + static void setProxyUserName( const char *userName ); + static const char *proxyUserName(); + static void setProxyPassword( const char *password ); + static const char *proxyPassword(); + + // + static void setSaveFrames(const int &saveFrames) { fSaveFrames = saveFrames; } + static int saveFrames() { return fSaveFrames; } + + // + static void setRegistered( const int ®istered ) { fRegistered = registered; } + static int registered() { return fRegistered; } + + // + static int cacheSize( const int getGenerationType ) + { + switch (getGenerationType) + { + case 0 : + return fCacheSize; + break; + case 1 : + return fCacheSizeGold; + break; + default: + g_Log->Error("Getting cache size for unknown generation type %d", getGenerationType); + return 0; + }; + } + static void setCacheSize( const int &size, const int getGenerationType ) + { + + /*if( (size < 300) && (size > 0) ) fCacheSize = 300; + else*/ + switch (getGenerationType) + { + case 0 : + fCacheSize = size; + break; + case 1 : + fCacheSizeGold = size; + break; + default: + g_Log->Error("Setting cache size for unknown generation type %d", getGenerationType); + }; + } + + // + static void setChangeRes(const int &changeRes) { fChangeRes = changeRes; } + static int changeRes() { return fChangeRes; } + static void setChangingRes(int state) { fChangingRes = state; } + static void incChangingRes() { fChangingRes++; } + static int getChangingRes() { return fChangingRes; } + + // + static void notifyShepherdOfHisUntimleyDeath(); + + static void setNewAndDeleteOldString(atomic_char_ptr &str, char *newval, boost::memory_order mem_ord = boost::memory_order_relaxed); + static void setRootPath( const char *path ); + static const char *rootPath(); + static const char *mpegPath(); + static const char *xmlPath(); + static const char *jpegPath(); + + static void setRole( const char *role ); + static const char *role(); + + // Gets/sets the host name of the server to use. + static void setRedirectServerName( const char *server ); + static const char *serverName( bool allowServerQuery = true, eServerTargetType serverType = eHostServer); + + // Gets/sets the registration password. + static void setPassword( const char *password ); + static const char *password(); + + //computes MD5 hash + static std::string computeMD5( const std::string& str ); + + // Overlay text management for the renderer. + static void addMessageText( const char *s, size_t len, time_t timeout ); + + + // Called from generators. + static void FrameStarted(); + static void FrameCompleted(); + static int FramesRendering(); + static int TotalFramesRendered(); + static bool RenderingAllowed(); + static void SetRenderingAllowed(bool _yesno); + + static bool AddOverflowMessage( const std::string _msg ) + { + boost::mutex::scoped_lock lockthis( s_OverflowMessageQueueMutex ); + m_OverflowMessageQueue.push_back( new CTimedMessageBody( _msg, 60. ) ); + return true; + } + + static bool PopOverflowMessage( std::string &_dst ) + { + boost::mutex::scoped_lock lockthis( s_OverflowMessageQueueMutex ); + if( m_OverflowMessageQueue.size() > 10 ) + { + m_OverflowMessageQueue.erase(m_OverflowMessageQueue.begin(), m_OverflowMessageQueue.begin() + static_cast::difference_type>(m_OverflowMessageQueue.size()) - 10); + } + if( m_OverflowMessageQueue.size() > 0 ) + { + bool del = false; + size_t deletestart = 0; + size_t deleteend = 0; + for (size_t ii = 0; ii != m_OverflowMessageQueue.size(); ++ii) + { + spCTimedMessageBody msg = m_OverflowMessageQueue[ii]; + _dst += msg->m_Msg; + if (msg->TimedOut()) + { + if (del == false) + { + deletestart = ii; + deleteend = ii; + } + else + { + deleteend = ii; + } + del = true; + } + _dst += "\n"; + } + _dst.erase(_dst.find_last_of("\n")); + + if (del == true) + { + m_OverflowMessageQueue.erase(m_OverflowMessageQueue.begin() + static_cast::difference_type>(deletestart), m_OverflowMessageQueue.begin() + static_cast::difference_type>(deleteend) + 1); + } + + return true; + } + return false; + } + + static bool QueueMessage( const std::string _msg, const fp8 _duration ) + { + boost::mutex::scoped_lock lockthis( m_MessageQueueMutex ); + m_MessageQueue.push( new CMessageBody( _msg, _duration ) ); + return true; + } + + static bool PopMessage( std::string &_dst, fp8 &_duration ) + { + boost::mutex::scoped_lock lockthis( m_MessageQueueMutex ); + if( m_MessageQueue.size() > 0 ) + { + spCMessageBody msg = m_MessageQueue.front(); + _dst = msg->m_Msg; + _duration = msg->m_Duration; + m_MessageQueue.pop(); + return true; + } + return false; + } + + + // Methods to check for filename extensions. + static int filenameIsMpg(const char *name); + static int filenameIsXxx(const char *name); + static int filenameIsTmp(const char *name); + + // Method to get all of the sheep the exist on the client. + static bool getClientFlock(SheepArray *sheep); + static uint64 GetFlockSizeMBsRecount(const int generationtype); + + // Sets/Gets the unique id for this Shepherd. + static void setUniqueID( const char *uniqueID ); + static const char *uniqueID(); + + static void setDownloadState( const std::string& state ); + static std::string downloadState( bool& isnew ); + + static void setRenderState( const std::string& state ); + static std::string renderState( bool& isnew ); + + static void subClientFlockBytes(uint64 removedbytes, const int generationtype) + { + if ( generationtype == 0 ) + s_ClientFlockBytes -= removedbytes; + if ( generationtype == 1 ) + s_ClientFlockGoldBytes -= removedbytes; + } + static void subClientFlockCount(const int generationtype) + { + if ( generationtype == 0 ) + --s_ClientFlockCount; + if ( generationtype == 1 ) + --s_ClientFlockGoldCount; + } + + static uint64 getClientFlockMBs(const int generationtype) + { + if ( generationtype == 0 ) + return s_ClientFlockBytes/1024/1024; + if ( generationtype == 1 ) + return s_ClientFlockGoldBytes/1024/1024; + return 0; + } + static uint64 getClientFlockCount(const int generationtype) + { + if ( generationtype == 0 ) + return s_ClientFlockCount; + if ( generationtype == 1 ) + return s_ClientFlockGoldCount; + return 0; + } +}; + +}; +#endif diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/Torrent.cpp electricsheep-3.0.2-git20180325/ContentDownloader/Torrent.cpp --- electricsheep-2.7~b12+svn20091224/ContentDownloader/Torrent.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/Torrent.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,286 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#include "libtorrent/torrent_handle.hpp" + +#include "Torrent.h" +#include "Shepherd.h" +#include "SheepDownloader.h" + +namespace ContentDownloader +{ + +// declare namespace we are using +// +using namespace std; +using namespace libtorrent; + +Torrent::Torrent() +// +// Description: +// Default constrictor. Initialize all class data. +// +{ + fFileSize = 0; + fURL = NULL; + fFileName = NULL; + fGeneration = -1; + fDownloaded = false; + fDeleted = false; + fActive = false; + fGotHandle = false; + fInSeeding = false; + fSingleDownload = -1; + fPurged = false; + fSeedQueue = false; + fDownloadQueue = false; + fReannounceCounter = 0; + fNextReannounce = 1; + fTorrentState = none; +} + +Torrent::Torrent( Torrent &torrent ) +// +// Description: +// Copy constrictor. copies all class data. +// +{ + setId(torrent.fTorrentId); + setURL(torrent.fURL); + setFileName(torrent.fFileName); + fGeneration = torrent.fGeneration; + fFileSize = torrent.fFileSize; + fDownloaded = torrent.fDownloaded; + fDeleted = torrent.fDeleted; + fActive = torrent.fActive; + fGotHandle = torrent.fGotHandle; + fInSeeding = torrent.fInSeeding; + fSingleDownload = torrent.fSingleDownload; + fPurged = torrent.fPurged; + fSeedQueue = torrent.fSeedQueue; + fDownloadQueue = torrent.fDownloadQueue; + fTorrentHandle = torrent.fTorrentHandle; + fReannounceCounter = torrent.fReannounceCounter; + fNextReannounce = torrent.fNextReannounce; + fTorrentState = torrent.fTorrentState; +} + +Torrent::~Torrent() +// +// Description: +// Destructor. Cleans up any alocated data. +// +{ + if(fURL != NULL) + { + delete [] fURL; + fURL = NULL; + } + + if(fFileName != NULL) + { + delete [] fFileName; + fFileName = NULL; + } +} + +bool +Torrent::isSeeding() +// +// Description: +// Returns true if torrent is seeding +// +{ + if (fTorrentHandle.is_valid()) { + libtorrent::torrent_status status=fTorrentHandle.status(); + if(status.state == libtorrent::torrent_status::seeding) + return true; + else + return false; + } + else + return false; +} + +void +Torrent::moveSeeding() +// Description: +// Moves the finished torrent from /torrent to /mpeg/ +// +{ + if (fTorrentHandle.is_valid()) { + char file[255]; + if (generation() == -1) + setGeneration(SheepDownloader::currentGeneration()); +#ifndef LINUX_GNU + sprintf(file,"%s%i\\",Shepherd::mpegPath(),generation()); + CreateDirectory(file, NULL); +#else + sprintf(file,"%s%i",Shepherd::mpegPath(),generation()); + mkdir(file, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); +#endif + fTorrentHandle.pause(); + fTorrentHandle.move_storage(file); + fTorrentHandle.resume(); + fInSeeding = true; + } +} + +void +Torrent::setURL(const char *url) +// +// Description: +// Sets the URL for this torrent. +// +{ + if(fURL == NULL) + { + delete [] fURL; + fURL = NULL; + } + + if(url) + { + fURL = new char[strlen(url) + 1]; + strcpy(fURL, url); + } +} + +void +Torrent::setFileName(const char *filename) +// +// Description: +// Sets the filename of the torrent. +// +{ + if(fFileName == NULL) + { + delete [] fFileName; + fFileName = NULL; + } + + if(filename) + { + fFileName = new char[strlen(filename) + 1]; + strcpy(fFileName, filename); + } +} + +void +Torrent::setId(const char *id) +// +// Description: +// Sets the filename of the sheep. +// +{ + if(fTorrentId == NULL) + { + delete [] fTorrentId; + fTorrentId = NULL; + } + + if(id) + { + fTorrentId = new char[strlen(id) + 1]; + strcpy(fTorrentId, id); + } +} + +void +Torrent::setActive( const bool &state ) +{ + fActive = state; + if (fActive == true && fTorrentHandle.is_valid()) + { + fGotHandle = true; + } else + { + fGotHandle = false; + } +} + +void +Torrent::resetSingleDownload() +{ + if (fTorrentHandle.is_valid()) { + fSingleDownload = -1; + const int num_files = fTorrentHandle.get_torrent_info().num_files(); + std::vector bitmask(num_files, false); + fTorrentHandle.pause(); + fTorrentHandle.filter_files(bitmask); + fTorrentHandle.resume(); + } +} + +void +Torrent::setSingleDownload( const int &index ) +{ + if (fTorrentHandle.is_valid()) { + fSingleDownload = index; + const int num_files = fTorrentHandle.get_torrent_info().num_files(); + std::vector bitmask(num_files, true); + assert(index > 0 && index <= num_files); + bitmask[index - 1] = false; + fTorrentHandle.pause(); + fTorrentHandle.filter_files(bitmask); + fTorrentHandle.resume(); + } +} + +float +Torrent::getRatio(int place) +{ + if (fTorrentHandle.is_valid()) { + libtorrent::torrent_status status=fTorrentHandle.status(); + float complete = (float)(status.num_complete+((30-place)/3)); + float incomplete = (float)status.num_incomplete; + if (incomplete < 1) + return 1000; + else if (complete < 1) + return -100; + return complete/incomplete; + } + return 0; +} + +libtorrent::torrent_status::state_t +Torrent::getStatus() +{ + if (fTorrentHandle.is_valid()) + return fTorrentHandle.status().state; + else + return libtorrent::torrent_status::queued_for_checking; +} + +bool +Torrent::is_paused() +{ + if (fTorrentHandle.is_valid()) + if(fTorrentHandle.is_paused()) + return true; + else + return false; + else + return false; +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/ContentDownloader/Torrent.h electricsheep-3.0.2-git20180325/ContentDownloader/Torrent.h --- electricsheep-2.7~b12+svn20091224/ContentDownloader/Torrent.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ContentDownloader/Torrent.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,179 @@ +/////////////////////////////////////////////////////////////////////////////// +// +// electricsheep for windows - collaborative screensaver +// Copyright 2003 Nicholas Long +// electricsheep for windows is based of software +// written by Scott Draves +// +// 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. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// +/////////////////////////////////////////////////////////////////////////////// +#ifndef __TORRENT_H_ +#define __TORRENT_H_ + +#include "libtorrent/torrent_handle.hpp" + +namespace ContentDownloader +{ + +// +// Description: +// This class will represent a torrent as it exists +// on the server or on the client. It has methods to +// get and set different aspects of a torrent +// +class Torrent +{ +public: + + enum torrentstate_t + { + none, + queued_seed, + queued_download, + seed, + download + }; + + + // Default constructor + Torrent(); + + // Copy Constructor + Torrent( Torrent &torrent ); + + // Destructor + ~Torrent(); + + // sets the URL that this torrent lives at + void setURL(const char *url); + + // returns the URL that the torrent lives at + const char *URL() const { return fURL; } + + // Sets the torrent file size on the server + void setFileSize(const long &size) { fFileSize = size; } + + // gets the torrent file size + long fileSize() const { return fFileSize; } + + // Sets the torrent file name + void setFileName(const char *name); + + // gets the torrent file name + const char *fileName() const { return fFileName; } + + // sets the torrent id + void setId(const char *id); + + // gets the torrent id + char *const id() const { return fTorrentId; } + + // sets whether or not the torrent has been downloaded + void setDownloaded( const bool &state ) { fDownloaded = state; } + + // returns if the torrent has been downloaded + bool downloaded() const { return fDownloaded; } + + // sets whether or not the torrent has been added to the session + void setActive( const bool &state ); + + // returns if the torrent has been added to the session + bool active() const { return fActive; } + + // sets whether or not the torrent has been removed from the server + void setDeleted( const bool &state ) { fDeleted = state; } + + // returns if the torrent has been removed from the server + bool deleted() const { return fDeleted; } + + // set the torrent generation + void setGeneration( const int &gen ) { fGeneration = gen; } + + // returns the torrent generation + int generation() const { return fGeneration; } + + // returns true if this torrent is just seeding + bool isSeeding(); + + // move finished files to mpg dir + void moveSeeding(); + + void setInSeeding( const bool &state ) { fInSeeding = state; } + bool inSeeding() { return fInSeeding; } + + void setPurged( const bool &state ) { fPurged = state; } + bool purged() { return fPurged; } + + void stopSeeding() { fInSeeding = false; } + + // handle single sheep downloads + void setSingleDownload( const int &index); + int singleDownload() { return fSingleDownload; } + void resetSingleDownload(); + + void setSeedQueue( const bool &state ) { fSeedQueue = state; } + bool seedQueue() { return fSeedQueue; } + void setDownloadQueue( const bool &state ) { fDownloadQueue = state; } + bool downloadQueue() { return fDownloadQueue; } + float getRatio(int place); + + bool gotHandle() {return fGotHandle; } + + bool is_paused(); + + libtorrent::torrent_status::state_t getStatus(); + + libtorrent::torrent_info getInfo() {return fTorrentHandle.get_torrent_info(); } + + libtorrent::torrent_handle handle() { return fTorrentHandle; } + + libtorrent::torrent_handle fTorrentHandle; + + int fReannounceCounter; + int fNextReannounce; + + void setTorrentState( const torrentstate_t &state ) { fTorrentState = state; } + torrentstate_t torrentState() { return fTorrentState; } + +private: + // private memeber data + // + char *fURL; + char *fFileName; + char *fTorrentId; + bool fDownloaded; + int fGeneration; + bool fActive; + bool fDeleted; + bool fGotHandle; + bool fInSeeding; + int fFileSize; + int fSingleDownload; + bool fPurged; + bool fSeedQueue; + bool fDownloadQueue; + + torrentstate_t fTorrentState; +}; + +// This is a convienince for defining an array +// of torrents using stl::vector +// +typedef std::vector TorrentArray; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/COPYING electricsheep-3.0.2-git20180325/COPYING --- electricsheep-2.7~b12+svn20091224/COPYING 2008-11-28 06:35:16.000000000 +0000 +++ electricsheep-3.0.2-git20180325/COPYING 2018-05-17 14:40:33.000000000 +0000 @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,64 +277,4 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. + END OF TERMS AND CONDITIONS diff -Nru electricsheep-2.7~b12+svn20091224/curlTest/curlTest.cbp electricsheep-3.0.2-git20180325/curlTest/curlTest.cbp --- electricsheep-2.7~b12+svn20091224/curlTest/curlTest.cbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/curlTest/curlTest.cbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,62 @@ + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/curlTest/luacurl.cpp electricsheep-3.0.2-git20180325/curlTest/luacurl.cpp --- electricsheep-2.7~b12+svn20091224/curlTest/luacurl.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/curlTest/luacurl.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,1102 @@ +/* luacurl.c + * + * author : Alexander Marinov (alekmarinov@gmail.com) + * project : luacurl + * description : Binds libCURL to Lua + * copyright : The same as Lua license (http://www.lua.org/license.html) and + * curl license (http://curl.haxx.se/docs/copyright.html) + * todo : multipart formpost building, + * curl multi + * + * Contributors: Thomas Harning added support for tables/threads as the CURLOPT_*DATA items. + *******************************************************************************************/ + +#include +#include +#include "curl/curl.h" +#include "curl/easy.h" + +#ifndef LIBCURL_VERSION + #include +#endif + +#if !defined(LUA_VERSION_NUM) || (LUA_VERSION_NUM <= 500) +#define luaL_checkstring luaL_check_string +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#include "lua.h" +#include "lauxlib.h" +#include "lualib.h" + +#ifndef LUACURL_API +#define LUACURL_API extern +#endif + +#define LUACURL_LIBNAME "curl" +#define CURLHANDLE "curlT" + +#define MAKE_VERSION_NUM(x,y,z) (z + (y << 8) + (x << 16)) +#define CURL_NEWER(x,y,z) (MAKE_VERSION_NUM(x,y,z) <= LIBCURL_VERSION_NUM) +#define CURL_OLDER(x,y,z) (MAKE_VERSION_NUM(x,y,z) > LIBCURL_VERSION_NUM) + +/* Fast set table macro */ +#define LUA_SET_TABLE(context, key_type, key, value_type, value) \ + lua_push##key_type(context, key); \ + lua_push##value_type(context, value); \ + lua_settable(context, -3); + +/* wrap curl option with simple option type */ +#define C_OPT(n, t) +/* wrap curl option with string list type */ +#define C_OPT_SL(n) static const char* KEY_##n = #n; +/* wrap the other curl options not included above */ +#define C_OPT_SPECIAL(n) + +/* describes all currently supported curl options available to curl 7.15.2 */ +#define ALL_CURL_OPT \ + C_OPT_SPECIAL(WRITEDATA) \ + C_OPT(URL, string) \ + C_OPT(PORT, number) \ + C_OPT(PROXY, string) \ + C_OPT(USERPWD, string) \ + C_OPT(PROXYUSERPWD, string) \ + C_OPT(RANGE, string) \ + C_OPT_SPECIAL(READDATA) \ + C_OPT_SPECIAL(WRITEFUNCTION) \ + C_OPT_SPECIAL(READFUNCTION) \ + C_OPT(TIMEOUT, number) \ + C_OPT(INFILESIZE, number) \ + C_OPT(POSTFIELDS, string) \ + C_OPT(REFERER, string) \ + C_OPT(FTPPORT, string) \ + C_OPT(USERAGENT, string) \ + C_OPT(LOW_SPEED_LIMIT, number) \ + C_OPT(LOW_SPEED_TIME, number) \ + C_OPT(RESUME_FROM, number) \ + C_OPT(COOKIE, string) \ + C_OPT_SL(HTTPHEADER) \ + C_OPT_SL(HTTPPOST) \ + C_OPT(SSLCERT, string) \ + C_OPT(SSLKEYPASSWD, string) \ + C_OPT(CRLF, boolean) \ + C_OPT_SL(QUOTE) \ + C_OPT_SPECIAL(HEADERDATA) \ + C_OPT(COOKIEFILE, string) \ + C_OPT(SSLVERSION, number) \ + C_OPT(TIMECONDITION, number) \ + C_OPT(TIMEVALUE, number) \ + C_OPT(CUSTOMREQUEST, string) \ + C_OPT_SL(POSTQUOTE) \ + C_OPT(WRITEINFO, string) \ + C_OPT(VERBOSE, boolean) \ + C_OPT(HEADER, boolean) \ + C_OPT(NOPROGRESS, boolean) \ + C_OPT(NOBODY, boolean) \ + C_OPT(FAILONERROR, boolean) \ + C_OPT(UPLOAD, boolean) \ + C_OPT(POST, boolean) \ + C_OPT(FTPLISTONLY, boolean) \ + C_OPT(FTPAPPEND, boolean) \ + C_OPT(NETRC, number) \ + C_OPT(FOLLOWLOCATION, boolean) \ + C_OPT(TRANSFERTEXT, boolean) \ + C_OPT(PUT, boolean) \ + C_OPT_SPECIAL(PROGRESSFUNCTION) \ + C_OPT_SPECIAL(PROGRESSDATA) \ + C_OPT(AUTOREFERER, boolean) \ + C_OPT(PROXYPORT, number) \ + C_OPT(POSTFIELDSIZE, number) \ + C_OPT(HTTPPROXYTUNNEL, boolean) \ + C_OPT(INTERFACE, string) \ + C_OPT(KRB4LEVEL, string) \ + C_OPT(SSL_VERIFYPEER, boolean) \ + C_OPT(CAINFO, string) \ + C_OPT(MAXREDIRS, number) \ + C_OPT(FILETIME, boolean) \ + C_OPT_SL(TELNETOPTIONS) \ + C_OPT(MAXCONNECTS, number) \ + C_OPT(CLOSEPOLICY, number) \ + C_OPT(FRESH_CONNECT, boolean) \ + C_OPT(FORBID_REUSE, boolean) \ + C_OPT(RANDOM_FILE, string) \ + C_OPT(EGDSOCKET, string) \ + C_OPT(CONNECTTIMEOUT, number) \ + C_OPT_SPECIAL(HEADERFUNCTION) \ + C_OPT(HTTPGET, boolean) \ + C_OPT(SSL_VERIFYHOST, number) \ + C_OPT(COOKIEJAR, string) \ + C_OPT(SSL_CIPHER_LIST, string) \ + C_OPT(HTTP_VERSION, number) \ + C_OPT(FTP_USE_EPSV, boolean) \ + C_OPT(SSLCERTTYPE, string) \ + C_OPT(SSLKEY, string) \ + C_OPT(SSLKEYTYPE, string) \ + C_OPT(SSLENGINE, string) \ + C_OPT(SSLENGINE_DEFAULT, boolean) \ + C_OPT(DNS_USE_GLOBAL_CACHE, boolean) \ + C_OPT(DNS_CACHE_TIMEOUT, number) \ + C_OPT_SL(PREQUOTE) \ + C_OPT(COOKIESESSION, boolean) \ + C_OPT(CAPATH, string) \ + C_OPT(BUFFERSIZE, number) \ + C_OPT(NOSIGNAL, boolean) \ + C_OPT(PROXYTYPE, number) \ + C_OPT(ENCODING, string) \ + C_OPT_SL(HTTP200ALIASES) \ + C_OPT(UNRESTRICTED_AUTH, boolean) \ + C_OPT(FTP_USE_EPRT, boolean) \ + C_OPT(HTTPAUTH, number) \ + C_OPT(FTP_CREATE_MISSING_DIRS, boolean) \ + C_OPT(PROXYAUTH, number) \ + C_OPT(FTP_RESPONSE_TIMEOUT, number) \ + C_OPT(IPRESOLVE, number) \ + C_OPT(MAXFILESIZE, number) \ + C_OPT(INFILESIZE_LARGE, number) \ + C_OPT(RESUME_FROM_LARGE, number) \ + C_OPT(MAXFILESIZE_LARGE, number) \ + C_OPT(NETRC_FILE, string) \ + C_OPT(FTP_SSL, number) \ + C_OPT(POSTFIELDSIZE_LARGE, number) \ + C_OPT(TCP_NODELAY, boolean) \ + C_OPT(SOURCE_USERPWD, string) \ + C_OPT_SL(SOURCE_PREQUOTE) \ + C_OPT_SL(SOURCE_POSTQUOTE) \ + C_OPT(FTPSSLAUTH, number) \ + C_OPT_SPECIAL(IOCTLFUNCTION) \ + C_OPT_SPECIAL(IOCTLDATA) \ + C_OPT(SOURCE_URL, string) \ + C_OPT_SL(SOURCE_QUOTE) \ + C_OPT(FTP_ACCOUNT, string) + +#if CURL_OLDER(7,12,1) || CURL_NEWER(7,16,2) + #define CURLOPT_SOURCE_PREQUOTE -MAKE_VERSION_NUM(1,12,7)+0 + #define CURLOPT_SOURCE_POSTQUOTE -MAKE_VERSION_NUM(1,12,7)+1 + #define CURLOPT_SOURCE_USERPWD -MAKE_VERSION_NUM(1,12,7)+2 +#endif + +#if CURL_OLDER(7,12,2) + #define CURLOPT_FTPSSLAUTH -MAKE_VERSION_NUM(2,12,7)+0 +#endif + +#if CURL_OLDER(7,12,3) + #define CURLOPT_TCP_NODELAY -MAKE_VERSION_NUM(3,12,7)+0 + #define CURLOPT_IOCTLFUNCTION -MAKE_VERSION_NUM(3,12,7)+1 + #define CURLOPT_IOCTLDATA -MAKE_VERSION_NUM(3,12,7)+2 + #define CURLE_SSL_ENGINE_INITFAILED -MAKE_VERSION_NUM(3,12,7)+3 + #define CURLE_IOCTLFUNCTION -MAKE_VERSION_NUM(3,12,7)+4 + #define CURLE_IOCTLDATA -MAKE_VERSION_NUM(3,12,7)+5 +#endif + +#if CURL_OLDER(7,13,0) + #define CURLOPT_FTP_ACCOUNT -MAKE_VERSION_NUM(0,13,7)+2 + #define CURLE_INTERFACE_FAILED -MAKE_VERSION_NUM(0,13,7)+3 + #define CURLE_SEND_FAIL_REWIND -MAKE_VERSION_NUM(0,13,7)+4 +#endif + +#if CURL_OLDER(7,13,0) || CURL_NEWER(7,16,2) + #define CURLOPT_SOURCE_URL -MAKE_VERSION_NUM(0,13,7)+0 + #define CURLOPT_SOURCE_QUOTE -MAKE_VERSION_NUM(0,13,7)+1 +#endif + +#if CURL_OLDER(7,13,1) + #define CURLE_LOGIN_DENIED -MAKE_VERSION_NUM(1,13,7)+0 +#endif + +/* register static the names of options of type curl_slist */ +ALL_CURL_OPT + +/* not supported options for any reason + CURLOPT_STDERR (TODO) + CURLOPT_ERRORBUFFER (all curl operations return error message via curl_easy_strerror) + CURLOPT_SHARE (TODO) + CURLOPT_PRIVATE (TODO) + CURLOPT_DEBUGFUNCTION (requires curl debug mode) + CURLOPT_DEBUGDATA + CURLOPT_SSLCERTPASSWD (duplicated by SSLKEYPASSWD) + CURLOPT_SSL_CTX_FUNCTION (TODO, this will make sense only if openssl is available in Lua) + CURLOPT_SSL_CTX_DATA +*/ + +/* wrap values of arbitrary type */ +union luaValueT +{ + struct curl_slist *slist; + curl_read_callback rcb; + curl_write_callback wcb; + curl_progress_callback pcb; + +#if CURL_NEWER(7,12,3) + curl_ioctl_callback icb; +#endif + + long nval; + char* sval; + void* ptr; +}; + +/* CURL object wrapper type */ +typedef struct +{ + CURL* curl; + lua_State* L; + int fwriterRef; int wudtype; union luaValueT wud; + int freaderRef; int rudtype; union luaValueT rud; + int fprogressRef; int pudtype; union luaValueT pud; + int fheaderRef; int hudtype; union luaValueT hud; + int fioctlRef; int iudtype; union luaValueT iud; +} curlT; + +/* push correctly luaValue to Lua stack */ +static void pushLuaValueT(lua_State* L, int t, union luaValueT v) +{ + switch (t) + { + case LUA_TNIL: lua_pushnil(L); break; + case LUA_TBOOLEAN: lua_pushboolean(L, v.nval); break; + case LUA_TTABLE: + case LUA_TFUNCTION: + case LUA_TTHREAD: + case LUA_TUSERDATA: lua_rawgeti(L, LUA_REGISTRYINDEX, v.nval); break; + case LUA_TLIGHTUSERDATA: lua_pushlightuserdata(L, v.ptr); break; + case LUA_TNUMBER: lua_pushnumber(L, v.nval); break; + case LUA_TSTRING: lua_pushstring(L, v.sval); break; + default: luaL_error(L, "invalid type %s\n", lua_typename(L, t)); + } +} + +/* curl callbacks connected with Lua functions */ +static size_t readerCallback( void *ptr, size_t size, size_t nmemb, void *stream) +{ + const char* readBytes; + curlT* c=(curlT*)stream; + lua_rawgeti(c->L, LUA_REGISTRYINDEX, c->freaderRef); + pushLuaValueT(c->L, c->rudtype, c->rud); + lua_pushnumber(c->L, size * nmemb); + lua_call(c->L, 2, 1); + readBytes=lua_tostring(c->L, -1); + if (readBytes) + { + memcpy(ptr, readBytes, lua_strlen(c->L, -1)); + return lua_strlen(c->L, -1); + } + return 0; +} + +static size_t writerCallback(void *ptr, size_t size, size_t nmemb, void *stream) +{ + curlT* c=(curlT*)stream; + lua_rawgeti(c->L, LUA_REGISTRYINDEX, c->fwriterRef); + pushLuaValueT(c->L, c->wudtype, c->wud); + lua_pushlstring(c->L, (const char *)ptr, size * nmemb); + lua_call(c->L, 2, 1); + return (size_t)lua_tonumber(c->L, -1); +} + +int progressCallback(void *clientp, double dltotal, double dlnow, double ultotal, double ulnow) +{ + curlT* c=(curlT*)clientp; + lua_rawgeti(c->L, LUA_REGISTRYINDEX, c->fprogressRef); + pushLuaValueT(c->L, c->pudtype, c->pud); + lua_pushnumber(c->L, dltotal); + lua_pushnumber(c->L, dlnow); + lua_pushnumber(c->L, ultotal); + lua_pushnumber(c->L, ulnow); + lua_call(c->L, 5, 1); + return (int)lua_tonumber(c->L, -1); +} + +static size_t headerCallback(void *ptr, size_t size, size_t nmemb, void *stream) +{ + curlT* c=(curlT*)stream; + lua_rawgeti(c->L, LUA_REGISTRYINDEX, c->fheaderRef); + pushLuaValueT(c->L, c->hudtype, c->hud); + lua_pushlstring(c->L, (const char *)ptr, size * nmemb); + lua_call(c->L, 2, 1); + return (size_t)lua_tonumber(c->L, -1); +} + +#if CURL_NEWER(7,12,3) +curlioerr ioctlCallback(CURL *handle, int cmd, void *clientp) +{ + curlT* c=(curlT*)clientp; + lua_rawgeti(c->L, LUA_REGISTRYINDEX, c->fioctlRef); + pushLuaValueT(c->L, c->iudtype, c->iud); + lua_pushnumber(c->L, cmd); + lua_call(c->L, 2, 1); + return (curlioerr)lua_tonumber(c->L, -1); +} +#endif + +/* Initializes CURL connection */ +static int lcurl_easy_init(lua_State* L) +{ + curlT* c = (curlT*)lua_newuserdata(L, sizeof(curlT)); + c->L=L; + c->freaderRef=c->fwriterRef=c->fprogressRef=c->fheaderRef=c->fioctlRef=LUA_REFNIL; + c->rud.nval=c->wud.nval=c->pud.nval=c->hud.nval=c->iud.nval=0; + c->rudtype=c->wudtype=c->pudtype=c->hudtype=c->iudtype=LUA_TNIL; + /* open curl handle */ + c->curl = curl_easy_init(); + /* set metatable to curlT object */ + luaL_getmetatable(L, CURLHANDLE); + lua_setmetatable(L, -2); + return 1; +} + +/* Escapes URL strings */ +static int lcurl_escape(lua_State* L) +{ + if (!lua_isnil(L, 1)) + { + const char* s=luaL_checkstring(L, 1); + lua_pushstring(L, curl_escape(s, (int)lua_strlen(L, 1))); + return 1; + } else + { + luaL_argerror(L, 1, "string parameter expected"); + } + return 0; +} + +/* Unescapes URL encoding in strings */ +static int lcurl_unescape(lua_State* L) +{ + if (!lua_isnil(L, 1)) + { + const char* s=luaL_checkstring(L, 1); + lua_pushstring(L, curl_unescape(s, (int)lua_strlen(L, 1))); + return 1; + } else + { + luaL_argerror(L, 1, "string parameter expected"); + } + return 0; +} + +/* Access curlT object from the Lua stack at specified position */ +static curlT* tocurl (lua_State *L, int cindex) +{ + curlT* c=(curlT*)luaL_checkudata(L, cindex, CURLHANDLE); + if (!c) luaL_argerror(L, cindex, "invalid curl object"); + if (!c->curl) luaL_error(L, "attempt to use closed curl object"); + return c; +} + +/* Request internal information from the curl session */ +static int lcurl_easy_getinfo(lua_State* L) +{ + curlT* c=tocurl(L, 1); + CURLINFO nInfo; + CURLcode code=(CURLcode)-1; + luaL_checktype(L, 2, LUA_TNUMBER); /* accept info code number only */ + nInfo = (CURLINFO)lua_tonumber(L, 2); + if (nInfo>CURLINFO_SLIST) + { + /* string list */ + struct curl_slist *slist=0; + if (CURLE_OK == (code=curl_easy_getinfo(c->curl, nInfo, &slist))) + { + if (slist) + { + int i; + lua_newtable(L); + for (i=1; slist; i++, slist=slist->next) + { + lua_pushnumber(L, i); + lua_pushstring(L, slist->data); + lua_settable(L, -3); + } + curl_slist_free_all(slist); + } else + { + lua_pushnil(L); + } + return 1; + } else + { + /* curl_easy_getinfo returns error */ + } + } else + if (nInfo>CURLINFO_DOUBLE) + { + /* double */ + double value; + if (CURLE_OK == (code=curl_easy_getinfo(c->curl, nInfo, &value))) + { + lua_pushnumber(L, value); + return 1; + } else + { + /* curl_easy_getinfo returns error */ + } + } else + if (nInfo>CURLINFO_LONG) + { + /* long */ + long value; + if (CURLE_OK == (code=curl_easy_getinfo(c->curl, nInfo, &value))) + { + lua_pushinteger(L, (lua_Integer)value); + return 1; + } else + { + /* curl_easy_getinfo returns error */ + } + } else + if (nInfo>CURLINFO_STRING) + { + /* string */ + char* value; + if (CURLE_OK == (code=curl_easy_getinfo(c->curl, nInfo, &value))) + { + lua_pushstring(L, value); + return 1; + } else + { + /* curl_easy_getinfo returns error */ + } + } +/* on error */ + /* return nil, error message, error code */ + lua_pushnil(L); + if (code>CURLE_OK) + { + #if CURL_NEWER(7,11,2) + lua_pushstring(L, curl_easy_strerror(code)); + #else + lua_pushfstring(L, "Curl error: #%d", (code)); + #endif + lua_pushnumber(L, code); + return 3; + } + else + { + lua_pushfstring(L, "Invalid CURLINFO number: %d", nInfo); + return 2; + } +} + +/* convert argument n to string allowing nil values */ +static union luaValueT get_string(lua_State* L, int n) +{ + union luaValueT v; + v.sval=(char*)lua_tostring(L, 3); + return v; +} + +/* convert argument n to number allowing only number convertable values */ +static union luaValueT get_number(lua_State* L, int n) +{ + union luaValueT v; + v.nval=(int)luaL_checknumber(L, n); + return v; +} + +/* get argument n as boolean but if not boolean argument then fail with Lua error */ +static union luaValueT get_boolean(lua_State* L, int n) +{ + union luaValueT v; + if (!lua_isboolean(L, n)) + { + luaL_argerror(L, n, "boolean value expected"); + } + v.nval=(int)lua_toboolean(L, n); + return v; +} + +/* remove and free old slist from registry if any associated with the given key */ +static void free_slist(lua_State* L, const char** key) +{ + struct curl_slist *slist; + lua_pushlightuserdata(L, (void *)key); + lua_rawget(L, LUA_REGISTRYINDEX); + slist=(struct curl_slist *)lua_topointer(L, -1); + if (slist) + { + curl_slist_free_all(slist); + } +} + +/* after argument number n combine all arguments to the curl type curl_slist */ +static union luaValueT get_slist(lua_State* L, int n, const char** key) +{ + int i; + union luaValueT v; + struct curl_slist *slist=0; + + /* free the previous slist if any */ + free_slist(L, key); + + /* check if all parameters are strings */ + for (i=n; ifreaderRef); /* unregister previous reference to reader if any */ + c->freaderRef=ref; /* keep the reader function reference in self */ + v.rcb=(curl_read_callback)readerCallback; /* redirect the option value to readerCallback */ + if (CURLE_OK != (code=curl_easy_setopt(c->curl, CURLOPT_READDATA, c))) goto on_error; + } + else if (curlOpt == CURLOPT_WRITEFUNCTION) + { + luaL_unref(L, LUA_REGISTRYINDEX, c->fwriterRef); + c->fwriterRef=ref; + v.wcb=(curl_write_callback)writerCallback; + if (CURLE_OK != (code=curl_easy_setopt(c->curl, CURLOPT_WRITEDATA, c))) goto on_error; + } + else if (curlOpt == CURLOPT_PROGRESSFUNCTION) + { + luaL_unref(L, LUA_REGISTRYINDEX, c->fprogressRef); + c->fprogressRef=ref; + v.pcb=(curl_progress_callback)progressCallback; + if (CURLE_OK != (code=curl_easy_setopt(c->curl, CURLOPT_PROGRESSDATA, c))) goto on_error; + } + else if (curlOpt == CURLOPT_HEADERFUNCTION) + { + luaL_unref(L, LUA_REGISTRYINDEX, c->fheaderRef); + c->fheaderRef=ref; + v.wcb=(curl_write_callback)headerCallback; + if (CURLE_OK != (code=curl_easy_setopt(c->curl, CURLOPT_HEADERDATA, c))) goto on_error; + } +#if CURL_NEWER(7,12,3) + else if (curlOpt == CURLOPT_IOCTLFUNCTION) + { + luaL_unref(L, LUA_REGISTRYINDEX, c->fioctlRef); + c->fioctlRef=ref; + v.icb=ioctlCallback; + if (CURLE_OK != (code=curl_easy_setopt(c->curl, CURLOPT_IOCTLDATA, c))) goto on_error; + } +#endif + else + { + /* When the option code is any of CURLOPT_xxxDATA and the argument is table, + /* userdata or function set the curl option value to the lua object reference */ + v.nval=ref; + } + }break; + }break; + +/* Handle all supported curl options differently according the specific option argument type */ +#undef C_OPT +#define C_OPT(n, t) \ + case CURLOPT_##n: \ + v=get_##t(L, 3); \ + break; + +#undef C_OPT_SL +#define C_OPT_SL(n) \ + case CURLOPT_##n: \ + { \ + v=get_slist(L, 3, &KEY_##n); \ + }break; + +/* Expands all the list of switch-case's here */ +ALL_CURL_OPT + + default: + luaL_error(L, "Not supported curl option %d", curlOpt); + } + + /* additional check if the option value has compatible type with the option code */ + switch (lua_type(L, 3)) + { + case LUA_TFUNCTION: /* allow function argument only for the special option codes */ + if (curlOpt == CURLOPT_READFUNCTION + || curlOpt == CURLOPT_WRITEFUNCTION + || curlOpt == CURLOPT_PROGRESSFUNCTION + || curlOpt == CURLOPT_HEADERFUNCTION + || curlOpt == CURLOPT_IOCTLFUNCTION + ) + break; + case LUA_TTABLE: /* allow table or userdata only for the callback parameter option */ + case LUA_TUSERDATA: + if (curlOpt != CURLOPT_READDATA + && curlOpt != CURLOPT_WRITEDATA + && curlOpt != CURLOPT_PROGRESSDATA + && curlOpt != CURLOPT_HEADERDATA +#if CURL_NEWER(7,12,3) + && curlOpt != CURLOPT_IOCTLDATA +#endif + ) + luaL_error(L, "argument #2 type %s is not compatible with this option", lua_typename(L, 3)); + break; + } + + /* handle curl option for setting callback parameter */ + switch (curlOpt) + { + case CURLOPT_READDATA: + if (c->rudtype == LUA_TFUNCTION || c->rudtype == LUA_TUSERDATA || c->rudtype == LUA_TTABLE || c->rudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->rud.nval); /* unref previously referenced read data */ + c->rudtype=lua_type(L, 3); /* set the read data type */ + c->rud=v; /* set the read data value (it can be reference) */ + v.ptr=c; /* set the real read data to curl as our self object */ + break; + case CURLOPT_WRITEDATA: + if (c->wudtype == LUA_TFUNCTION || c->wudtype == LUA_TUSERDATA || c->wudtype == LUA_TTABLE || c->wudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->wud.nval); + c->wudtype=lua_type(L, 3); + c->wud=v; + v.ptr=c; + break; + case CURLOPT_PROGRESSDATA: + if (c->pudtype == LUA_TFUNCTION || c->pudtype == LUA_TUSERDATA || c->pudtype == LUA_TTABLE || c->pudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->pud.nval); + c->pudtype=lua_type(L, 3); + c->pud=v; + v.ptr=c; + break; + case CURLOPT_HEADERDATA: + if (c->hudtype == LUA_TFUNCTION || c->hudtype == LUA_TUSERDATA || c->hudtype == LUA_TTABLE || c->hudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->hud.nval); + c->hudtype=lua_type(L, 3); + c->hud=v; + v.ptr=c; + break; +#if CURL_NEWER(7,12,3) + case CURLOPT_IOCTLDATA: + if (c->iudtype == LUA_TFUNCTION || c->iudtype == LUA_TUSERDATA || c->iudtype == LUA_TTABLE || c->iudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->iud.nval); + c->iudtype=lua_type(L, 3); + c->iud=v; + v.ptr=c; + break; +#endif + } + + /* set easy the curl option with the processed value */ + if (CURLE_OK == (code=curl_easy_setopt( c->curl, (CURLoption)(int)lua_tonumber(L, 2), v.nval))) + { + /* on success return true */ + lua_pushboolean(L, 1); + return 1; + } +on_error: + /* on fail return nil, error message, error code */ + lua_pushnil(L); +#if CURL_NEWER(7,11,2) + lua_pushstring(L, curl_easy_strerror(code)); +#else + lua_pushfstring(L, "Curl error: #%d", (code)); +#endif + lua_pushnumber(L, code); + return 3; +} + +/* perform the curl commands */ +static int lcurl_easy_perform(lua_State* L) +{ + CURLcode code; /* return error code from curl */ + curlT* c = tocurl(L, 1); /* get self object */ + code = curl_easy_perform(c->curl); /* do the curl perform */ + if (CURLE_OK == code) + { + /* on success return true */ + lua_pushboolean(L, 1); + return 1; + } + /* on fail return nil, error message, error code */ + lua_pushnil(L); +#if CURL_NEWER(7,11,2) + lua_pushstring(L, curl_easy_strerror(code)); +#else + lua_pushfstring(L, "Curl error: #%d", (code)); +#endif + lua_pushnumber(L, code); + return 3; +} + +/* Finalizes CURL */ +static int lcurl_easy_close(lua_State* L) +{ + curlT* c=tocurl(L, 1); + curl_easy_cleanup(c->curl); + luaL_unref(L, LUA_REGISTRYINDEX, c->freaderRef); + luaL_unref(L, LUA_REGISTRYINDEX, c->fwriterRef); + luaL_unref(L, LUA_REGISTRYINDEX, c->fprogressRef); + luaL_unref(L, LUA_REGISTRYINDEX, c->fheaderRef); + luaL_unref(L, LUA_REGISTRYINDEX, c->fioctlRef); + if (c->rudtype == LUA_TFUNCTION || c->rudtype == LUA_TUSERDATA || c->rudtype == LUA_TTABLE || c->rudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->rud.nval); + if (c->wudtype == LUA_TFUNCTION || c->wudtype == LUA_TUSERDATA || c->wudtype == LUA_TTABLE || c->wudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->wud.nval); + if (c->pudtype == LUA_TFUNCTION || c->pudtype == LUA_TUSERDATA || c->pudtype == LUA_TTABLE || c->pudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->pud.nval); + if (c->hudtype == LUA_TFUNCTION || c->hudtype == LUA_TUSERDATA || c->hudtype == LUA_TTABLE || c->hudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->hud.nval); + if (c->iudtype == LUA_TFUNCTION || c->iudtype == LUA_TUSERDATA || c->iudtype == LUA_TTABLE || c->iudtype == LUA_TTHREAD) + luaL_unref(L, LUA_REGISTRYINDEX, c->iud.nval); + +#undef C_OPT +#undef C_OPT_SL +#undef C_OPT_SPECIAL +#define C_OPT(n, t) +#define C_OPT_SL(n) free_slist(L, &KEY_##n); +#define C_OPT_SPECIAL(n) + + ALL_CURL_OPT + + c->curl=0; + lua_pushboolean(L, 1); + return 1; +} + +/* garbage collect the curl object */ +static int lcurl_gc(lua_State* L) +{ + curlT* c = (curlT*)luaL_checkudata(L, 1, CURLHANDLE); + if (c && c->curl) + { + curl_easy_cleanup(c->curl); + } + return 0; +} + + +static const struct luaL_reg luacurl_meths[] = +{ + {"close", lcurl_easy_close}, + {"setopt", lcurl_easy_setopt}, + {"perform", lcurl_easy_perform}, + {"getinfo", lcurl_easy_getinfo}, + {"__gc", lcurl_gc}, + {0, 0} +}; + +static const struct luaL_reg luacurl_funcs[] = +{ + {"new", lcurl_easy_init}, + {"escape", lcurl_escape}, + {"unescape", lcurl_unescape}, + {0, 0} +}; + +static void createmeta (lua_State *L) +{ + luaL_newmetatable(L, CURLHANDLE); + lua_pushliteral(L, "__index"); + lua_pushvalue(L, -2); + lua_rawset(L, -3); +} + +/* + * Assumes the table is on top of the stack. + */ +static void set_info (lua_State *L) +{ + LUA_SET_TABLE(L, literal, "_COPYRIGHT", literal, "(C) 2003-2006 AVIQ Systems AG"); + LUA_SET_TABLE(L, literal, "_DESCRIPTION", literal, "LuaCurl binds the CURL easy interface to Lua"); + LUA_SET_TABLE(L, literal, "_NAME", literal, "luacurl"); + LUA_SET_TABLE(L, literal, "_VERSION", literal, "1.1.0"); + LUA_SET_TABLE(L, literal, "_CURLVERSION", string, curl_version()); + LUA_SET_TABLE(L, literal, "_SUPPORTED_CURLVERSION", literal, LIBCURL_VERSION); +} + +static void setcurlerrors(lua_State* L) +{ + LUA_SET_TABLE(L, literal, "OK", number, CURLE_OK); + LUA_SET_TABLE(L, literal, "FAILED_INIT", number, CURLE_FAILED_INIT); + LUA_SET_TABLE(L, literal, "UNSUPPORTED_PROTOCOL", number, CURLE_UNSUPPORTED_PROTOCOL); + LUA_SET_TABLE(L, literal, "URL_MALFORMAT", number, CURLE_URL_MALFORMAT); + LUA_SET_TABLE(L, literal, "URL_MALFORMAT_USER", number, CURLE_URL_MALFORMAT_USER); + LUA_SET_TABLE(L, literal, "COULDNT_RESOLVE_PROXY", number, CURLE_COULDNT_RESOLVE_PROXY); + LUA_SET_TABLE(L, literal, "COULDNT_RESOLVE_HOST", number, CURLE_COULDNT_RESOLVE_HOST); + LUA_SET_TABLE(L, literal, "COULDNT_CONNECT", number, CURLE_COULDNT_CONNECT); + LUA_SET_TABLE(L, literal, "FTP_WEIRD_SERVER_REPLY", number, CURLE_FTP_WEIRD_SERVER_REPLY); + LUA_SET_TABLE(L, literal, "FTP_ACCESS_DENIED", number, CURLE_FTP_ACCESS_DENIED); + LUA_SET_TABLE(L, literal, "FTP_USER_PASSWORD_INCORRECT", number, CURLE_FTP_USER_PASSWORD_INCORRECT); + LUA_SET_TABLE(L, literal, "FTP_WEIRD_PASS_REPLY", number, CURLE_FTP_WEIRD_PASS_REPLY); + LUA_SET_TABLE(L, literal, "FTP_WEIRD_USER_REPLY", number, CURLE_FTP_WEIRD_USER_REPLY); + LUA_SET_TABLE(L, literal, "FTP_WEIRD_PASV_REPLY", number, CURLE_FTP_WEIRD_PASV_REPLY); + LUA_SET_TABLE(L, literal, "FTP_WEIRD_227_FORMAT", number, CURLE_FTP_WEIRD_227_FORMAT); + LUA_SET_TABLE(L, literal, "FTP_CANT_GET_HOST", number, CURLE_FTP_CANT_GET_HOST); + LUA_SET_TABLE(L, literal, "FTP_CANT_RECONNECT", number, CURLE_FTP_CANT_RECONNECT); + LUA_SET_TABLE(L, literal, "FTP_COULDNT_SET_BINARY", number, CURLE_FTP_COULDNT_SET_BINARY); + LUA_SET_TABLE(L, literal, "PARTIAL_FILE", number, CURLE_PARTIAL_FILE); + LUA_SET_TABLE(L, literal, "FTP_COULDNT_RETR_FILE", number, CURLE_FTP_COULDNT_RETR_FILE); + LUA_SET_TABLE(L, literal, "FTP_WRITE_ERROR", number, CURLE_FTP_WRITE_ERROR); + LUA_SET_TABLE(L, literal, "FTP_QUOTE_ERROR", number, CURLE_FTP_QUOTE_ERROR); + LUA_SET_TABLE(L, literal, "HTTP_RETURNED_ERROR", number, CURLE_HTTP_RETURNED_ERROR); + LUA_SET_TABLE(L, literal, "WRITE_ERROR", number, CURLE_WRITE_ERROR); + LUA_SET_TABLE(L, literal, "MALFORMAT_USER", number, CURLE_MALFORMAT_USER); + LUA_SET_TABLE(L, literal, "FTP_COULDNT_STOR_FILE", number, CURLE_FTP_COULDNT_STOR_FILE); + LUA_SET_TABLE(L, literal, "READ_ERROR", number, CURLE_READ_ERROR); + LUA_SET_TABLE(L, literal, "OUT_OF_MEMORY", number, CURLE_OUT_OF_MEMORY); + LUA_SET_TABLE(L, literal, "OPERATION_TIMEOUTED", number, CURLE_OPERATION_TIMEOUTED); + LUA_SET_TABLE(L, literal, "FTP_COULDNT_SET_ASCII", number, CURLE_FTP_COULDNT_SET_ASCII); + LUA_SET_TABLE(L, literal, "FTP_PORT_FAILED", number, CURLE_FTP_PORT_FAILED); + LUA_SET_TABLE(L, literal, "FTP_COULDNT_USE_REST", number, CURLE_FTP_COULDNT_USE_REST); + LUA_SET_TABLE(L, literal, "FTP_COULDNT_GET_SIZE", number, CURLE_FTP_COULDNT_GET_SIZE); + LUA_SET_TABLE(L, literal, "HTTP_RANGE_ERROR", number, CURLE_HTTP_RANGE_ERROR); + LUA_SET_TABLE(L, literal, "HTTP_POST_ERROR", number, CURLE_HTTP_POST_ERROR); + LUA_SET_TABLE(L, literal, "SSL_CONNECT_ERROR", number, CURLE_SSL_CONNECT_ERROR); + LUA_SET_TABLE(L, literal, "BAD_DOWNLOAD_RESUME", number, CURLE_BAD_DOWNLOAD_RESUME); + LUA_SET_TABLE(L, literal, "FILE_COULDNT_READ_FILE", number, CURLE_FILE_COULDNT_READ_FILE); + LUA_SET_TABLE(L, literal, "LDAP_CANNOT_BIND", number, CURLE_LDAP_CANNOT_BIND); + LUA_SET_TABLE(L, literal, "LDAP_SEARCH_FAILED", number, CURLE_LDAP_SEARCH_FAILED); + LUA_SET_TABLE(L, literal, "LIBRARY_NOT_FOUND", number, CURLE_LIBRARY_NOT_FOUND); + LUA_SET_TABLE(L, literal, "FUNCTION_NOT_FOUND", number, CURLE_FUNCTION_NOT_FOUND); + LUA_SET_TABLE(L, literal, "ABORTED_BY_CALLBACK", number, CURLE_ABORTED_BY_CALLBACK); + LUA_SET_TABLE(L, literal, "BAD_FUNCTION_ARGUMENT", number, CURLE_BAD_FUNCTION_ARGUMENT); + LUA_SET_TABLE(L, literal, "BAD_CALLING_ORDER", number, CURLE_BAD_CALLING_ORDER); + LUA_SET_TABLE(L, literal, "INTERFACE_FAILED", number, CURLE_INTERFACE_FAILED); + LUA_SET_TABLE(L, literal, "BAD_PASSWORD_ENTERED", number, CURLE_BAD_PASSWORD_ENTERED); + LUA_SET_TABLE(L, literal, "TOO_MANY_REDIRECTS", number, CURLE_TOO_MANY_REDIRECTS); + LUA_SET_TABLE(L, literal, "UNKNOWN_TELNET_OPTION", number, CURLE_UNKNOWN_TELNET_OPTION); + LUA_SET_TABLE(L, literal, "TELNET_OPTION_SYNTAX", number, CURLE_TELNET_OPTION_SYNTAX); + LUA_SET_TABLE(L, literal, "OBSOLETE", number, CURLE_OBSOLETE); + LUA_SET_TABLE(L, literal, "SSL_PEER_CERTIFICATE", number, CURLE_SSL_PEER_CERTIFICATE); + LUA_SET_TABLE(L, literal, "GOT_NOTHING", number, CURLE_GOT_NOTHING); + LUA_SET_TABLE(L, literal, "SSL_ENGINE_NOTFOUND", number, CURLE_SSL_ENGINE_NOTFOUND); + LUA_SET_TABLE(L, literal, "SSL_ENGINE_SETFAILED", number, CURLE_SSL_ENGINE_SETFAILED); + LUA_SET_TABLE(L, literal, "SEND_ERROR", number, CURLE_SEND_ERROR); + LUA_SET_TABLE(L, literal, "RECV_ERROR", number, CURLE_RECV_ERROR); + LUA_SET_TABLE(L, literal, "SHARE_IN_USE", number, CURLE_SHARE_IN_USE); + LUA_SET_TABLE(L, literal, "SSL_CERTPROBLEM", number, CURLE_SSL_CERTPROBLEM); + LUA_SET_TABLE(L, literal, "SSL_CIPHER", number, CURLE_SSL_CIPHER); + LUA_SET_TABLE(L, literal, "SSL_CACERT", number, CURLE_SSL_CACERT); + LUA_SET_TABLE(L, literal, "BAD_CONTENT_ENCODING", number, CURLE_BAD_CONTENT_ENCODING); + LUA_SET_TABLE(L, literal, "LDAP_INVALID_URL", number, CURLE_LDAP_INVALID_URL); + LUA_SET_TABLE(L, literal, "FILESIZE_EXCEEDED", number, CURLE_FILESIZE_EXCEEDED); + LUA_SET_TABLE(L, literal, "FTP_SSL_FAILED", number, CURLE_FTP_SSL_FAILED); + LUA_SET_TABLE(L, literal, "SEND_FAIL_REWIND", number, CURLE_SEND_FAIL_REWIND); + LUA_SET_TABLE(L, literal, "SSL_ENGINE_INITFAILED", number, CURLE_SSL_ENGINE_INITFAILED); + LUA_SET_TABLE(L, literal, "LOGIN_DENIED", number, CURLE_LOGIN_DENIED); +} + +static void setcurloptions(lua_State* L) +{ +#undef C_OPT_SPECIAL +#undef C_OPT +#undef C_OPT_SL +#define C_OPT(n, t) LUA_SET_TABLE(L, literal, "OPT_"#n, number, CURLOPT_##n); +#define C_OPT_SL(n) C_OPT(n, dummy) +#define C_OPT_SPECIAL(n) C_OPT(n, dummy) + +ALL_CURL_OPT +} + +static void setcurlvalues(lua_State* L) +{ +#if CURL_NEWER(7,12,1) + LUA_SET_TABLE(L, literal, "READFUNC_ABORT", number, CURL_READFUNC_ABORT); +#endif + +#if CURL_NEWER(7,12,3) + /* enum curlioerr */ + LUA_SET_TABLE(L, literal, "IOE_OK", number, CURLIOE_OK); + LUA_SET_TABLE(L, literal, "IOE_UNKNOWNCMD", number, CURLIOE_UNKNOWNCMD); + LUA_SET_TABLE(L, literal, "IOE_FAILRESTART", number, CURLIOE_FAILRESTART); + + /* enum curliocmd */ + LUA_SET_TABLE(L, literal, "IOCMD_NOP", number, CURLIOCMD_NOP); + LUA_SET_TABLE(L, literal, "IOCMD_RESTARTREAD", number, CURLIOCMD_RESTARTREAD); +#endif + + /* enum curl_proxytype */ + LUA_SET_TABLE(L, literal, "PROXY_HTTP", number, CURLPROXY_HTTP); + LUA_SET_TABLE(L, literal, "PROXY_SOCKS4", number, CURLPROXY_SOCKS4); + LUA_SET_TABLE(L, literal, "PROXY_SOCKS5", number, CURLPROXY_SOCKS5); + + /* auth types */ + LUA_SET_TABLE(L, literal, "AUTH_NONE", number, CURLAUTH_NONE); + LUA_SET_TABLE(L, literal, "AUTH_BASIC", number, CURLAUTH_BASIC); + LUA_SET_TABLE(L, literal, "AUTH_DIGEST", number, CURLAUTH_DIGEST); + LUA_SET_TABLE(L, literal, "AUTH_GSSNEGOTIATE", number, CURLAUTH_GSSNEGOTIATE); + LUA_SET_TABLE(L, literal, "AUTH_NTLM", number, CURLAUTH_NTLM); + LUA_SET_TABLE(L, literal, "AUTH_ANY", number, CURLAUTH_ANY); + LUA_SET_TABLE(L, literal, "AUTH_ANYSAFE", number, CURLAUTH_ANYSAFE); + + /* enum curl_ftpssl */ + LUA_SET_TABLE(L, literal, "FTPSSL_NONE", number, CURLFTPSSL_NONE); + LUA_SET_TABLE(L, literal, "FTPSSL_TRY", number, CURLFTPSSL_TRY); + LUA_SET_TABLE(L, literal, "FTPSSL_CONTROL", number, CURLFTPSSL_CONTROL); + LUA_SET_TABLE(L, literal, "FTPSSL_ALL", number, CURLFTPSSL_ALL); + +#if CURL_NEWER(7,12,2) + /* enum curl_ftpauth */ + LUA_SET_TABLE(L, literal, "FTPAUTH_DEFAULT", number, CURLFTPAUTH_DEFAULT); + LUA_SET_TABLE(L, literal, "FTPAUTH_SSL", number, CURLFTPAUTH_SSL); + LUA_SET_TABLE(L, literal, "FTPAUTH_TLS", number, CURLFTPAUTH_TLS); +#endif + + /* ip resolve options */ + LUA_SET_TABLE(L, literal, "IPRESOLVE_WHATEVER", number, CURL_IPRESOLVE_WHATEVER); + LUA_SET_TABLE(L, literal, "IPRESOLVE_V4", number, CURL_IPRESOLVE_V4); + LUA_SET_TABLE(L, literal, "IPRESOLVE_V6", number, CURL_IPRESOLVE_V6); + + /* http versions */ + LUA_SET_TABLE(L, literal, "HTTP_VERSION_NONE", number, CURL_HTTP_VERSION_NONE); + LUA_SET_TABLE(L, literal, "HTTP_VERSION_1_0", number, CURL_HTTP_VERSION_1_0); + LUA_SET_TABLE(L, literal, "HTTP_VERSION_1_1", number, CURL_HTTP_VERSION_1_1); + + /* CURL_NETRC_OPTION */ + LUA_SET_TABLE(L, literal, "NETRC_IGNORED", number, CURL_NETRC_IGNORED); + LUA_SET_TABLE(L, literal, "NETRC_OPTIONAL", number, CURL_NETRC_OPTIONAL); + LUA_SET_TABLE(L, literal, "NETRC_REQUIRED", number, CURL_NETRC_REQUIRED); + + /* ssl version */ + LUA_SET_TABLE(L, literal, "SSLVERSION_DEFAULT", number, CURL_SSLVERSION_DEFAULT); + LUA_SET_TABLE(L, literal, "SSLVERSION_TLSv1", number, CURL_SSLVERSION_TLSv1); + LUA_SET_TABLE(L, literal, "SSLVERSION_SSLv2", number, CURL_SSLVERSION_SSLv2); + LUA_SET_TABLE(L, literal, "SSLVERSION_SSLv3", number, CURL_SSLVERSION_SSLv3); + + /* CURLOPT_TIMECONDITION */ + LUA_SET_TABLE(L, literal, "TIMECOND_NONE", number, CURL_TIMECOND_NONE); + LUA_SET_TABLE(L, literal, "TIMECOND_IFMODSINCE", number, CURL_TIMECOND_IFMODSINCE); + LUA_SET_TABLE(L, literal, "TIMECOND_IFUNMODSINCE", number, CURL_TIMECOND_IFUNMODSINCE); + LUA_SET_TABLE(L, literal, "TIMECOND_LASTMOD", number, CURL_TIMECOND_LASTMOD); + + /* enum CURLformoption */ + LUA_SET_TABLE(L, literal, "COPYNAME", number, CURLFORM_COPYNAME); + LUA_SET_TABLE(L, literal, "PTRNAME", number, CURLFORM_PTRNAME); + LUA_SET_TABLE(L, literal, "NAMELENGTH", number, CURLFORM_NAMELENGTH); + LUA_SET_TABLE(L, literal, "COPYCONTENTS", number, CURLFORM_COPYCONTENTS); + LUA_SET_TABLE(L, literal, "PTRCONTENTS", number, CURLFORM_PTRCONTENTS); + LUA_SET_TABLE(L, literal, "CONTENTSLENGTH", number, CURLFORM_CONTENTSLENGTH); + LUA_SET_TABLE(L, literal, "FILECONTENT", number, CURLFORM_FILECONTENT); + LUA_SET_TABLE(L, literal, "ARRAY", number, CURLFORM_ARRAY); + LUA_SET_TABLE(L, literal, "OBSOLETE", number, CURLFORM_OBSOLETE); + LUA_SET_TABLE(L, literal, "FILE", number, CURLFORM_FILE); + LUA_SET_TABLE(L, literal, "BUFFER", number, CURLFORM_BUFFER); + LUA_SET_TABLE(L, literal, "BUFFERPTR", number, CURLFORM_BUFFERPTR); + LUA_SET_TABLE(L, literal, "BUFFERLENGTH", number, CURLFORM_BUFFERLENGTH); + LUA_SET_TABLE(L, literal, "CONTENTTYPE", number, CURLFORM_CONTENTTYPE); + LUA_SET_TABLE(L, literal, "CONTENTHEADER", number, CURLFORM_CONTENTHEADER); + LUA_SET_TABLE(L, literal, "FILENAME", number, CURLFORM_FILENAME); + LUA_SET_TABLE(L, literal, "END", number, CURLFORM_END); + LUA_SET_TABLE(L, literal, "OBSOLETE2", number, CURLFORM_OBSOLETE2); + + /* enum CURLFORMcode*/ + LUA_SET_TABLE(L, literal, "CURL_FORMADD_OK", number, CURL_FORMADD_OK); + LUA_SET_TABLE(L, literal, "CURL_FORMADD_MEMORY", number, CURL_FORMADD_MEMORY); + LUA_SET_TABLE(L, literal, "CURL_FORMADD_OPTION_TWICE", number, CURL_FORMADD_OPTION_TWICE); + LUA_SET_TABLE(L, literal, "CURL_FORMADD_NULL", number, CURL_FORMADD_NULL); + LUA_SET_TABLE(L, literal, "CURL_FORMADD_UNKNOWN_OPTION", number, CURL_FORMADD_UNKNOWN_OPTION); + LUA_SET_TABLE(L, literal, "CURL_FORMADD_INCOMPLETE", number, CURL_FORMADD_INCOMPLETE); + LUA_SET_TABLE(L, literal, "CURL_FORMADD_ILLEGAL_ARRAY", number, CURL_FORMADD_ILLEGAL_ARRAY); + +#if CURL_NEWER(7,12,1) + LUA_SET_TABLE(L, literal, "CURL_FORMADD_DISABLED", number, CURL_FORMADD_DISABLED); +#endif + + /* enum curl_closepolicy*/ + LUA_SET_TABLE(L, literal, "CLOSEPOLICY_OLDEST", number, CURLCLOSEPOLICY_OLDEST); + LUA_SET_TABLE(L, literal, "CLOSEPOLICY_LEAST_RECENTLY_USED", number, CURLCLOSEPOLICY_LEAST_RECENTLY_USED); + LUA_SET_TABLE(L, literal, "CLOSEPOLICY_LEAST_TRAFFIC", number, CURLCLOSEPOLICY_LEAST_TRAFFIC); + LUA_SET_TABLE(L, literal, "CLOSEPOLICY_SLOWEST", number, CURLCLOSEPOLICY_SLOWEST); + LUA_SET_TABLE(L, literal, "CLOSEPOLICY_CALLBACK", number, CURLCLOSEPOLICY_CALLBACK); +} + +static void setcurlinfo(lua_State* L) +{ + LUA_SET_TABLE(L, literal, "INFO_NONE", number, CURLINFO_NONE); + LUA_SET_TABLE(L, literal, "INFO_EFFECTIVE_URL", number, CURLINFO_EFFECTIVE_URL); + LUA_SET_TABLE(L, literal, "INFO_RESPONSE_CODE", number, CURLINFO_RESPONSE_CODE); + LUA_SET_TABLE(L, literal, "INFO_TOTAL_TIME", number, CURLINFO_TOTAL_TIME); + LUA_SET_TABLE(L, literal, "INFO_NAMELOOKUP_TIME", number, CURLINFO_NAMELOOKUP_TIME); + LUA_SET_TABLE(L, literal, "INFO_CONNECT_TIME", number, CURLINFO_CONNECT_TIME); + LUA_SET_TABLE(L, literal, "INFO_PRETRANSFER_TIME", number, CURLINFO_PRETRANSFER_TIME); + LUA_SET_TABLE(L, literal, "INFO_SIZE_UPLOAD", number, CURLINFO_SIZE_UPLOAD); + LUA_SET_TABLE(L, literal, "INFO_SIZE_DOWNLOAD", number, CURLINFO_SIZE_DOWNLOAD); + LUA_SET_TABLE(L, literal, "INFO_SPEED_DOWNLOAD", number, CURLINFO_SPEED_DOWNLOAD); + LUA_SET_TABLE(L, literal, "INFO_SPEED_UPLOAD", number, CURLINFO_SPEED_UPLOAD); + LUA_SET_TABLE(L, literal, "INFO_HEADER_SIZE", number, CURLINFO_HEADER_SIZE); + LUA_SET_TABLE(L, literal, "INFO_REQUEST_SIZE", number, CURLINFO_REQUEST_SIZE); + LUA_SET_TABLE(L, literal, "INFO_SSL_VERIFYRESULT", number, CURLINFO_SSL_VERIFYRESULT); + LUA_SET_TABLE(L, literal, "INFO_FILETIME", number, CURLINFO_FILETIME); + LUA_SET_TABLE(L, literal, "INFO_CONTENT_LENGTH_DOWNLOAD", number, CURLINFO_CONTENT_LENGTH_DOWNLOAD); + LUA_SET_TABLE(L, literal, "INFO_CONTENT_LENGTH_UPLOAD", number, CURLINFO_CONTENT_LENGTH_UPLOAD); + LUA_SET_TABLE(L, literal, "INFO_STARTTRANSFER_TIME", number, CURLINFO_STARTTRANSFER_TIME); + LUA_SET_TABLE(L, literal, "INFO_CONTENT_TYPE", number, CURLINFO_CONTENT_TYPE); + LUA_SET_TABLE(L, literal, "INFO_REDIRECT_TIME", number, CURLINFO_REDIRECT_TIME); + LUA_SET_TABLE(L, literal, "INFO_REDIRECT_COUNT", number, CURLINFO_REDIRECT_COUNT); + LUA_SET_TABLE(L, literal, "INFO_PRIVATE", number, CURLINFO_PRIVATE); + LUA_SET_TABLE(L, literal, "INFO_HTTP_CONNECTCODE", number, CURLINFO_HTTP_CONNECTCODE); + LUA_SET_TABLE(L, literal, "INFO_HTTPAUTH_AVAIL", number, CURLINFO_HTTPAUTH_AVAIL); + LUA_SET_TABLE(L, literal, "INFO_PROXYAUTH_AVAIL", number, CURLINFO_PROXYAUTH_AVAIL); + LUA_SET_TABLE(L, literal, "INFO_OS_ERRNO", number, CURLINFO_OS_ERRNO); + LUA_SET_TABLE(L, literal, "INFO_NUM_CONNECTS", number, CURLINFO_NUM_CONNECTS); + LUA_SET_TABLE(L, literal, "INFO_SSL_ENGINES", number, CURLINFO_SSL_ENGINES); +// LUA_SET_TABLE(L, literal, "INFO_COOKIELIST", number, CURLINFO_COOKIELIST); +#if CURL_NEWER(7,15,2) + LUA_SET_TABLE(L, literal, "INFO_LASTSOCKET", number, CURLINFO_LASTSOCKET); +#endif +} + +LUACURL_API int luaopen_curl( lua_State *L ) +{ + curl_global_init( CURL_GLOBAL_ALL ); /* In windows, this will init the winsock stuff */ + createmeta(L); + luaL_openlib (L, 0, luacurl_meths, 0); + luaL_openlib (L, LUACURL_LIBNAME, luacurl_funcs, 0); + set_info(L); + setcurlerrors(L); + setcurloptions(L); + setcurlvalues(L); + setcurlinfo(L); + return 1; +} + +#ifdef __cplusplus +} +#endif diff -Nru electricsheep-2.7~b12+svn20091224/curlTest/luacurl.h electricsheep-3.0.2-git20180325/curlTest/luacurl.h --- electricsheep-2.7~b12+svn20091224/curlTest/luacurl.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/curlTest/luacurl.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,7 @@ +#ifndef _LUACURL_H_ +#define _LUACURL_H_ + +// Register parser functions to lua. +extern "C" int luaopen_curl( struct lua_State *L ); + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/curlTest/luazlib.cpp electricsheep-3.0.2-git20180325/curlTest/luazlib.cpp --- electricsheep-2.7~b12+svn20091224/curlTest/luazlib.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/curlTest/luazlib.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,373 @@ +// $Id: luazlib.c 1048 2006-05-22 09:24:53Z kaos $ + +#include +#include +#include "luazlib.h" + +// TODO: all file handling routines + +static int zlib_compress( lua_State * L ) +{ + int rc; + uLong dstL, srcL; + Byte * dst; + const Byte * src; + + src = (Byte *)luaL_checklstring( L, 1, (size_t*)&srcL ); + dstL = (uLong)( 1.1 * srcL + 12 ); + dst = (Byte *)malloc( dstL ); + if( !dst ) + { + lua_pushnil( L ); + lua_pushliteral( L, "failed to allocate output buffer" ); + return 2; + } + + rc = compress( dst, &dstL, src, srcL ); + switch( rc ) + { + case Z_OK: + lua_pushlstring( L, (const char *)dst, dstL ); + lua_pushnumber( L, dstL ); + break; + + case Z_MEM_ERROR: + lua_pushnil( L ); + lua_pushliteral( L, "not enough memory" ); + break; + + case Z_BUF_ERROR: + lua_pushnil( L ); + lua_pushliteral( L, "output buffer error" ); + break; + } + + free( dst ); + return 2; +} + +static int dynamic_uncompress( Bytef ** dst, uLongf * dstLen, const Bytef * src, uLong srcLen ); + +static int zlib_uncompress( lua_State * L ) +{ + int rc; + uLong dstL, srcL; + Byte * dst; + const Byte * src; + + src = (Byte *)luaL_checklstring( L, 1, (size_t *)&srcL ); + dstL = srcL; + rc = dynamic_uncompress( &dst, &dstL, src, srcL ); + switch( rc ) + { + case Z_OK: + lua_pushlstring( L, (const char *)dst, dstL ); + lua_pushnumber( L, dstL ); + break; + + case Z_MEM_ERROR: + lua_pushnil( L ); + lua_pushliteral( L, "not enough memory" ); + break; + + case Z_BUF_ERROR: + lua_pushnil( L ); + lua_pushliteral( L, "output buffer error" ); + break; + + case Z_DATA_ERROR: + lua_pushnil( L ); + lua_pushliteral( L, "input data corrupted" ); + break; + } + + free( dst ); + return 2; +} + +///////////////////////////// +// gzip specific - based on zlib's gzio.c +static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */ + +/* gzip flag byte */ +#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */ +#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */ +#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */ +#define ORIG_NAME 0x08 /* bit 3 set: original file name present */ +#define COMMENT 0x10 /* bit 4 set: file comment present */ +#define RESERVED 0xE0 /* bits 5..7: reserved */ + +typedef struct gz_stream { + z_stream stream; + int z_err; /* error code for last stream operation */ + uLong crc; /* crc32 of uncompressed data */ +} gz_stream; + + +static int get_byte( gz_stream *s ) +{ + if (s->stream.avail_in == 0) { + return EOF; + } + + s->stream.avail_in--; + return *(s->stream.next_in)++; +} + +static uLong getLong( gz_stream *s) +{ + uLong x = (uLong)get_byte(s); + int c; + + x += ((uLong)get_byte(s))<<8; + x += ((uLong)get_byte(s))<<16; + c = get_byte(s); + if (c == EOF) s->z_err = Z_DATA_ERROR; + x += ((uLong)c)<<24; + //printf( "zlib: getLong() == %.4lx (%d)\n", x, s->z_err ); + return x; +} + +static void check_header( gz_stream *s ) +{ + int method; /* method byte */ + int flags; /* flags byte */ + uInt len; + int c; + + /* Assure two bytes in the buffer so we can peek ahead -- handle case + where first byte of header is at the end of the buffer after the last + gzip segment */ + len = s->stream.avail_in; + if (len < 2) { + s->z_err = Z_ERRNO; + return; + } + + /* Peek ahead to check the gzip magic header */ + if (s->stream.next_in[0] != gz_magic[0] || + s->stream.next_in[1] != gz_magic[1]) { + s->z_err = Z_ERRNO; + return; + } + + s->stream.avail_in -= 2; + s->stream.next_in += 2; + + /* Check the rest of the gzip header */ + method = get_byte(s); + flags = get_byte(s); + if (method != Z_DEFLATED || (flags & RESERVED) != 0) { + s->z_err = Z_DATA_ERROR; + return; + } + + /* Discard time, xflags and OS code: */ + for (len = 0; len < 6; len++) (void)get_byte(s); + + if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */ + len = (uInt)get_byte(s); + len += ((uInt)get_byte(s))<<8; + /* len is garbage if EOF but the loop below will quit anyway */ + while (len-- != 0 && get_byte(s) != EOF) ; + } + if ((flags & ORIG_NAME) != 0) { /* skip the original file name */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & COMMENT) != 0) { /* skip the .gz file comment */ + while ((c = get_byte(s)) != 0 && c != EOF) ; + } + if ((flags & HEAD_CRC) != 0) { /* skip the header crc */ + for (len = 0; len < 2; len++) (void)get_byte(s); + } + + s->z_err = Z_OK; +} + +static int gz_uncompress( Bytef ** dst, uLongf * dstLen, const Bytef * src, uLong srcLen ) +{ + int err; + gz_stream *s; + Bytef * buf = NULL; + Bytef * start; /* starting point for crc computation */ + + *dst = NULL; + s = (gz_stream *)malloc(sizeof(gz_stream)); + if (!s) return Z_MEM_ERROR; + + s->stream.zalloc = (alloc_func)0; + s->stream.zfree = (free_func)0; + s->stream.opaque = (voidpf)0; + s->stream.next_in = Z_NULL; + s->stream.next_out = Z_NULL; + s->stream.avail_in = s->stream.avail_out = 0; + s->z_err = Z_OK; + s->crc = crc32(0L, Z_NULL, 0); + + err = inflateInit2(&(s->stream), -MAX_WBITS); + /* windowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are + * present after the compressed stream. + */ + if (err != Z_OK ) { + printf( "zlib: inflateInit2() failed: %d\n", err ); + free(s); + return err; + } + + s->stream.next_in = (Bytef*)src; + s->stream.avail_in = srcLen; + + check_header(s); /* skip the .gz header */ + if( s->z_err != Z_OK ) + { + err = s->z_err; + free(s); + printf( "zlib: check_header() failed: %d\n", err ); + return err; + } + + do + { + buf = (Bytef *)realloc( buf, (2 * s->stream.avail_in) + s->stream.total_out ); + start = s->stream.next_out = buf + s->stream.total_out; + s->stream.avail_out = 2 * s->stream.avail_in; + + s->z_err = inflate(&(s->stream), Z_NO_FLUSH); + //printf( "zlib: inflate total out: %ld (%d)\n", s->stream.total_out, s->z_err ); + s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start)); + if( s->z_err == Z_STREAM_END ) + { + s->z_err = Z_OK; + if (getLong(s) == s->crc) + break; + + printf( "zlib: crc32 check failed (%.4lx)\n", s->crc ); + s->z_err = Z_DATA_ERROR; + break; + } + + if (s->z_err != Z_OK ) + { + printf( "zlib: inflate() failed: %d\n", s->z_err ); + break; + } + + }while( s->stream.avail_in ); + + *dst = buf; + *dstLen = s->stream.total_out; + err = inflateEnd(&(s->stream)); + //printf( "zlib: inflate %d, inflate end %d\n", err, s->z_err ); + err = s->z_err == Z_OK ? err : s->z_err; + free(s); + + return err; +} + +///////////////////////////////////////////////////////////////////// +static int zlib_gzuncompress( lua_State * L ) +{ + int rc; + uLong dstL, srcL; + Byte * dst; + const Byte * src; + + src = (Byte *)luaL_checklstring( L, 1, (size_t *)&srcL ); + dstL = srcL; + rc = gz_uncompress( &dst, &dstL, src, srcL ); + switch( rc ) + { + case Z_OK: + lua_pushlstring( L, (const char *)dst, dstL ); + lua_pushnumber( L, dstL ); + break; + + case Z_MEM_ERROR: + lua_pushnil( L ); + lua_pushliteral( L, "not enough memory" ); + break; + + case Z_BUF_ERROR: + lua_pushnil( L ); + lua_pushliteral( L, "output buffer error" ); + break; + + case Z_DATA_ERROR: + lua_pushnil( L ); + lua_pushliteral( L, "input data corrupted" ); + break; + } + + free( dst ); + return 2; +} + + + +///////////////////////////////////////////////////////////////////// + +static const luaL_Reg zlib_funcs[] = +{ + { "compress", zlib_compress }, + { "uncompress", zlib_uncompress }, + { "gzuncompress", zlib_gzuncompress }, + { NULL, NULL } +}; + +LUAZLIB_API int luaopen_zlib( lua_State * L ) +{ + luaL_openlib( L, LUA_ZLIBNAME, zlib_funcs, 0 ); + + lua_pushliteral (L, "_COPYRIGHT"); + lua_pushliteral (L, "Copyright (C) 2006 Andreas Stenius, Boxcom AB"); + lua_settable (L, -3); + lua_pushliteral (L, "_DESCRIPTION"); + lua_pushliteral (L, "Binding to the zlib library"); + lua_settable (L, -3); + lua_pushliteral (L, "_VERSION"); + lua_pushliteral (L, "LuaZlib 1.0.0"); + lua_settable (L, -3); + + return 1; +} + +// modifed uncompress from zlib sources +static int dynamic_uncompress( Bytef ** dst, uLongf * dstLen, const Bytef * src, uLong srcLen ) +{ + z_stream stream; + int err; + Bytef * buf = NULL; + + *dst = NULL; + stream.next_in = (Bytef*)src; + stream.avail_in = (uInt)srcLen; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + + err = inflateInit(&stream); + if (err != Z_OK) return err; + + do + { + buf = (Bytef *)realloc( buf, (2 * stream.avail_in) + stream.total_out ); + stream.next_out = buf + stream.total_out; + stream.avail_out = 2 * stream.avail_in; + + err = inflate(&stream, Z_SYNC_FLUSH); + if( err == Z_STREAM_END ) break; + if (err != Z_OK ) + { + inflateEnd( &stream ); + return err; + } + }while( stream.avail_in ); + + *dst = buf; + *dstLen = stream.total_out; + err = inflateEnd(&stream); + return err; +} diff -Nru electricsheep-2.7~b12+svn20091224/curlTest/luazlib.h electricsheep-3.0.2-git20180325/curlTest/luazlib.h --- electricsheep-2.7~b12+svn20091224/curlTest/luazlib.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/curlTest/luazlib.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,21 @@ +// $Id: luazlib.h 1045 2006-05-19 23:48:17Z kaos $ + +#ifndef __LUA_ZLIB_H__ +#define __LUA_ZLIB_H__ + +extern "C" +{ +#include "lua.h" +#include "lauxlib.h" +#include "lualib.h" +}; + + +#ifndef LUAZLIB_API +#define LUAZLIB_API LUA_API +#endif + +#define LUA_ZLIBNAME "zlib" +LUAZLIB_API int luaopen_zlib( struct lua_State * L ); + +#endif //__LUA_ZLIB_H__ diff -Nru electricsheep-2.7~b12+svn20091224/curlTest/main.cpp electricsheep-3.0.2-git20180325/curlTest/main.cpp --- electricsheep-2.7~b12+svn20091224/curlTest/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/curlTest/main.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,114 @@ +#include +#include "Networking.h" + +// +static std::string generateID() +{ + unsigned char *salt; + unsigned int u; + char id[17]; + id[16] = 0; + + SYSTEMTIME syst; + GetSystemTime(&syst); + salt = ((unsigned char *)&syst) + sizeof(SYSTEMTIME) - 8; + + for( u=0; u<16; u++ ) + { + unsigned int r = rand(); + r = r ^ (salt[u>>1] >> ((u&1)<<2)); + r &= 15; + if( r < 10 ) + r += '0'; + else + r += 'A' - 10; + + id[u] = r; + } + + return std::string( id ); +} + +// +void TestDownload() +{ + printf( "**** Authenticated download ****\n{\n" ); + + // Download test. + Network::spCFileDownloader spDownload = new Network::CFileDownloader( "Download test" ); + spDownload->Login( "keffo", "discodans" ); + + if( spDownload->Perform( "http://r2d7c.sheepserver.net/gen/243/7854/sheep.avi" ) ) + { + printf( "%s\n", spDownload->Status().c_str() ); + spDownload->Save( "test.avi" ); + } + else + printf( "Download failed...\n" ); + + spDownload = NULL; + + printf( "}\n**** Authenticated download complete ****\n\n" ); +} + +// +void TestUpload() +{ + printf( "**** Authenticated upload ****\n{\n" ); + + // Upload test. + Network::spCFileUploader spUpload = new Network::CFileUploader( "Upload test" ); + spUpload->Login( "keffo", "discodans" ); + + std::string serverName = "r2d7c.sheepserver.net"; + std::string uniqueID = generateID(); + + // Get filesize. + FILE *pFile = fopen( "test.png", "rb" ); + fseek( pFile, 0, SEEK_END ); + long fileSize = ftell( pFile ); + fseek( pFile, 0, SEEK_SET); + fclose( pFile ); + + // Make a fake upload url. + /*std::stringstream url; + url << "http://" << serverName + << "/cgi/put?j=" << 123 // Job. + << "&id=" << 321 // AnimID. + << "&s=" << fileSize // Filesize. + << "&g=" << 666 // Generation. + << "&v=" << "WIN_2.7b11" // Client version. + << "&u=" << uniqueID; // Client ID.*/ + + char pbuf[256]; + snprintf( pbuf, 255, "http://%s/cgi/put?j=%d&id=%d&s=%ld&g=%d&v=%s&u=%s", serverName.c_str(), 123, 321, fileSize, 666, "WIN_2.7b11", uniqueID.c_str() ); + +/*http://%s/cgi/put?j=%d + &id=%d + &s=%ld + &g=%d + &v=%s + &u=%s*/ + + if( spUpload->Perform( /*url.str()*/pbuf, "test.png", fileSize ) ) + printf( "%s\n", spUpload->().c_str() ); + else + printf( "Upload failed...\n" ); + + + + spUpload = NULL; + + printf( "}\n**** Authenticated upload complete ****\n\n" ); +} + +// +int main( int argc, char *argv[] ) +{ + g_NetworkManager->Startup(); + + TestDownload(); + TestUpload(); + + g_NetworkManager->Shutdown(); +} diff -Nru electricsheep-2.7~b12+svn20091224/debian/changelog electricsheep-3.0.2-git20180325/debian/changelog --- electricsheep-2.7~b12+svn20091224/debian/changelog 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/changelog 2018-05-19 00:55:09.000000000 +0000 @@ -1,22 +1,41 @@ -electricsheep (2.7~b12+svn20091224-2build1) trusty; urgency=low +electricsheep (3.0.2-git20180325-1ppa1~artful1) artful; urgency=low - * No change rebuild against libav 9. + * Rebuild for Ubuntu/Artful (17.10) + * Note: needs flam 3.1.1 - -- Dmitrijs Ledkovs Sat, 09 Nov 2013 18:18:22 +0000 + -- Hermann Vosseler Sat, 19 May 2018 02:55:09 +0200 -electricsheep (2.7~b12+svn20091224-2) unstable; urgency=low +electricsheep (3.0.2-git20180325-1~stretch) Lumiera-stretch-tools; urgency=low - * Oprhan the package, set maintainer to Debian QA Group + * New upstream release 3.0.2 (2018-03-25) + * require newest flam3 release. + * update to build agaist libjpeg9 + * bump Debian standards version + * update the installed desktop files + * fix some FFmpeg deprecation warnings + * build against lib versions from the Linux distro - -- Roberto C. Sanchez Mon, 23 Sep 2013 20:33:04 -0400 + -- Hermann Vosseler Thu, 17 May 2018 17:50:05 +0200 -electricsheep (2.7~b12+svn20091224-1.2) unstable; urgency=low +electricsheep (2.7~b33-svn20150718-2ppa1~trusty) trusty; urgency=low - * Non-maintainer upload. - * debian/patches/fix-ftbfs-libav9.patch: Fix build failure with libav 9 API. - Thanks to Reinhard Tartler for the patch. (Closes: #692980) + * Rebuild for Ubuntu trusty (14.04 LTS) - -- Sebastian Ramacher Fri, 06 Sep 2013 01:48:27 +0200 + -- Hermann Vosseler Mon, 10 Aug 2015 01:40:20 +0200 + +electricsheep (2.7~b33-svn20150718-2) Lumera-jessie-tools; urgency=low + + * fix package definition to also work on Ubuntu + + -- Hermann Vosseler Mon, 10 Aug 2015 01:32:23 +0200 + +electricsheep (2.7~b33-svn20150718-1) lumiera-jessie-tools; urgency=low + + * New upstream snapshot from 2015-07-18 + * Start over with a 'all default automatic' debian package based on CDBS + * Build for use on Debian/Jessie + + -- Hermann Vosseler Sun, 09 Aug 2015 16:56:33 +0200 electricsheep (2.7~b12+svn20091224-1.1) unstable; urgency=low diff -Nru electricsheep-2.7~b12+svn20091224/debian/compat electricsheep-3.0.2-git20180325/debian/compat --- electricsheep-2.7~b12+svn20091224/debian/compat 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/compat 2018-05-17 15:50:05.000000000 +0000 @@ -1 +1 @@ -5 +10 diff -Nru electricsheep-2.7~b12+svn20091224/debian/control electricsheep-3.0.2-git20180325/debian/control --- electricsheep-2.7~b12+svn20091224/debian/control 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/control 2018-05-17 15:50:05.000000000 +0000 @@ -1,15 +1,45 @@ Source: electricsheep Section: x11 Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Debian QA Group -Build-Depends: debhelper (>= 5), quilt, autotools-dev, autoconf, pkg-config, x11proto-core-dev, libglade2-dev (>= 2.5.0), libgtk2.0-dev (>= 2.7.0), libavformat-dev -Standards-Version: 3.8.3 +Maintainer: Ichthyostega +Standards-Version: 4.0.1 +Build-Depends: debhelper (>= 10), + cdbs, + dh-autoreconf, + autotools-dev, + autoconf, + automake, + libtool, + pkg-config, + libwxgtk3.0-dev, + libgtk2.0-dev, + glee-dev, + freeglut3-dev, + libgl1-mesa-dev, + libavcodec-dev, + libavformat-dev, + libswscale-dev, + liblua5.1-0-dev, + libcurl4-openssl-dev, + libxml2-dev, + libtinyxml-dev, + libjpeg9-dev, + libgtop2-dev, + libboost-dev (>= 1.39), + libboost-filesystem-dev (>= 1.39), + libboost-thread-dev (>= 1.39), + flam3 (>= 3.1.1~) Homepage: http://www.electricsheep.org Package: electricsheep Architecture: any -Depends: mplayer, flam3 (>= 2.7.19), debconf | debconf-2.0, curl, xloadimage, libjpeg-progs, ${shlibs:Depends}, ${misc:Depends} +Depends: , ${shlibs:Depends}, ${misc:Depends}, + debconf | debconf-2.0, + flam3 (>= 3.1.1~), + mplayer, + xloadimage, + libjpeg-progs, + curl Description: screensaver showing collective dream of sleeping computers Electric sheep is the collective dream of sleeping computers from all over the internet. Less poetically, it is an Internet server and @@ -17,3 +47,10 @@ In the background, it contributes render cycles to the next animation. Periodically, it uploads completed frames to the server, where they are compressed for distribution to all clients. + . + NOTE: The videos downloaded and displayed by Electric Sheep are + Creative Commons licensed (a mixture of CC-BY and CC-BY-NC). Some jobs + rendered by the network may be for images or animations which are not + sheep at all, and will not appear in the screen-saver. Some of these + are used for commercial purposes in order to support the developers + and servers that make the software. diff -Nru electricsheep-2.7~b12+svn20091224/debian/default-files/electricsheep.desktop electricsheep-3.0.2-git20180325/debian/default-files/electricsheep.desktop --- electricsheep-2.7~b12+svn20091224/debian/default-files/electricsheep.desktop 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/default-files/electricsheep.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -[Desktop Entry] -Exec=electricsheep -Icon=kscreensaver -Type=Application -Actions=InWindow;Root -X-KDE-Category=Fractals -X-KDE-Type=OpenGL -Name=ElectricSheep -Categories=Settings;DesktopSettings - -[Desktop Action InWindow] -Exec=electricsheep -window-id %w -Name=Display in specified window -Name[af]=Vertoon in gespesifiseer venster -Name[bg]=Стартиране в избран прозорец -Name[br]=Diskwel er prenestr spisaet -Name[bs]=Prikaži u navedenom prozoru -Name[ca]=Mostra a la finestra especificada -Name[cs]=Zobrazit v určeném okně -Name[cy]=Dangos mewn ffenestr penodol -Name[da]=Visning i angivet vindue -Name[de]=In vorgegebenem Fenster anzeigen -Name[el]=Προβολή στο καθορισμένο παράθυρο -Name[eo]=Montru en indikita fenestro -Name[es]=Mostrar en la pantalla especificada -Name[et]=Määratud aknas näitamine -Name[fi]=Näytä määrätyssä ikkunassa -Name[fo]=Vís í givin gluggi -Name[fr]=Affichage dans la fenêtre spécifiée -Name[he]=הצג בחלון המצויין -Name[hu]=Megjelenítés a megadott ablakban -Name[is]=Birta í völdum glugga -Name[it]=Mostra nella finestra specificata -Name[ja]=特定のウィンドウで表示 -Name[lv]=Rādīt norādītajā logā -Name[mt]=Uri f'window speċifika -Name[nb]=Vis i angitt vindu -Name[nl]=In een gedefinieerd venster weergeven -Name[nn]=Vis i oppgitt vindauge -Name[nso]=Bontsha kago di-window tseo di bontshitswego -Name[pl]=Wyświetl w zadanym oknie -Name[pt]=Mostrar na janela especificada -Name[pt_BR]=Mostrar em janela especificada -Name[ro]=Afişează în fereastra specificată -Name[ru]=Отображать в указанном окне -Name[sk]=Zobraziť v zadanom okne -Name[sl]=Prikaz v določenemu oknu -Name[sr]=Прикажи у задатом прозору -Name[sv]=Visa i angivet fönster -Name[th]=แสดงในหน้าต่างที่กำหนด -Name[tr]=Belirtilen pencerede göster -Name[uk]=Відобразити у вказаному вікні -Name[ven]=Sumbedzani kha windo dzo bulwaho fhedzi -Name[xh]=Bonisa kwi window ekhankanyiweyo -Name[xx]=xxDisplay in specified windowxx -Name[zh_CN]=在指定的窗口中显示 -Name[zh_TW]=在指定的視窗中顯示 -Name[zu]=Veza kwi-window ecacisiwe -NoDisplay=true - -[Desktop Action Root] -Exec=electricsheep --root 1 -Name=Display in root window -Name[af]=Vertoon in root venster -Name[bg]=Стартиране в главния прозорец -Name[bs]=Prikaži u korijenskom prozoru -Name[ca]=Mostra a la finestra arrel -Name[cs]=Zobrazit na pozadí plochy -Name[cy]=Dangos mewn ffenestr gwraidd -Name[da]=Visning i root-vindue -Name[de]=In Hintergrundfenster anzeigen -Name[el]=Προβολή στο βασικό παράθυρο -Name[eo]=Montru en radika fenestro -Name[es]=Mostrar en la ventana raíz -Name[et]=Juuraknas näitamine -Name[fi]=Näytä root-ikkunassa -Name[fo]=Vís á bakgrundini -Name[fr]=Affichage dans la fenêtre racine -Name[he]=הצג בחלון השורש -Name[hu]=Megjelenítés a gyökérablakban -Name[is]=Birta í bakgrunni skjáborðs -Name[it]=Mostra sullo sfondo -Name[ja]=ルートウィンドウで表示 -Name[lv]=Rādīt saknes logā -Name[mt]=Uri fuq l-isfond -Name[nb]=Vis i root-vindu -Name[nl]=In hoofdvenster weergeven -Name[nn]=Vis i rotvindauget -Name[nso]=Bontsha kago window ya modu -Name[pl]=Wyświetl w oknie pierwotnym -Name[pt]=Mostrar na janela de fundo -Name[pt_BR]=Mostrar na janela-raiz -Name[ru]=Отображать в корневом окне -Name[sk]=Zobraziť v koreňovom okne -Name[sl]=Prikaz v korenskem oknu -Name[sr]=Прикажи у главном (root) прозору -Name[sv]=Visa i rotfönstret -Name[th]=แสดงในหน้าต่างหลัก -Name[tr]=Kök pencerede göster -Name[uk]=Відобразити на тлі екрана -Name[ven]=Sumbedzani kha windo ya mudzi -Name[xh]=Bonisa kwingcambu ye window -Name[xx]=xxDisplay in root windowxx -Name[zh_CN]=在根窗口中显示 -Name[zh_TW]=在根視窗中顯示 -Name[zu]=Veza kwimpande ye-window -NoDisplay=true diff -Nru electricsheep-2.7~b12+svn20091224/debian/default-files/electricsheep.desktop.gnome electricsheep-3.0.2-git20180325/debian/default-files/electricsheep.desktop.gnome --- electricsheep-2.7~b12+svn20091224/debian/default-files/electricsheep.desktop.gnome 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/default-files/electricsheep.desktop.gnome 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=ElectricSheep -Comment=Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. -TryExec=electricsheep -Exec=electricsheep --root 1 -StartupNotify=false -Terminal=false -Type=Application -Categories=Screensaver; -OnlyShowIn=GNOME;KDE;XFCE diff -Nru electricsheep-2.7~b12+svn20091224/debian/desktop-files/ElectricSheep.desktop electricsheep-3.0.2-git20180325/debian/desktop-files/ElectricSheep.desktop --- electricsheep-2.7~b12+svn20091224/debian/desktop-files/ElectricSheep.desktop 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/desktop-files/ElectricSheep.desktop 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,118 @@ +[Desktop Entry] +Version=1.2 +Exec=electricsheep +TryExec=electricsheep +Icon=electricsheep +Type=Application +Terminal=false +Actions=InWindow;Root;Setup; +X-KDE-ServiceTypes=ScreenSaver +X-KDE-Category=Fractals +X-KDE-Type=OpenGL +Name=ElectricSheep +Categories=Settings;DesktopSettings +Comment=Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. See www.electricsheep.org. + +[Desktop Action Setup] +Exec=electricsheep-preferences +Icon=preferences-desktop-screensaver +Name=Setup... +Name[de]=Einrichten... + +[Desktop Action InWindow] +Exec=electricsheep -window-id %w +Name=Display in specified window +Name[af]=Vertoon in gespesifiseer venster +Name[bg]=Стартиране в избран прозорец +Name[br]=Diskwel er prenestr spisaet +Name[bs]=Prikaži u navedenom prozoru +Name[ca]=Mostra a la finestra especificada +Name[cs]=Zobrazit v určeném okně +Name[cy]=Dangos mewn ffenestr penodol +Name[da]=Visning i angivet vindue +Name[de]=In vorgegebenem Fenster anzeigen +Name[el]=Προβολή στο καθορισμένο παράθυρο +Name[eo]=Montru en indikita fenestro +Name[es]=Mostrar en la pantalla especificada +Name[et]=Määratud aknas näitamine +Name[fi]=Näytä määrätyssä ikkunassa +Name[fo]=Vís í givin gluggi +Name[fr]=Affichage dans la fenêtre spécifiée +Name[he]=הצג בחלון המצויין +Name[hu]=Megjelenítés a megadott ablakban +Name[is]=Birta í völdum glugga +Name[it]=Mostra nella finestra specificata +Name[ja]=特定のウィンドウで表示 +Name[lv]=Rādīt norādītajā logā +Name[mt]=Uri f'window speċifika +Name[nb]=Vis i angitt vindu +Name[nl]=In een gedefinieerd venster weergeven +Name[nn]=Vis i oppgitt vindauge +Name[nso]=Bontsha kago di-window tseo di bontshitswego +Name[pl]=Wyświetl w zadanym oknie +Name[pt]=Mostrar na janela especificada +Name[pt_BR]=Mostrar em janela especificada +Name[ro]=Afişează în fereastra specificată +Name[ru]=Отображать в указанном окне +Name[sk]=Zobraziť v zadanom okne +Name[sl]=Prikaz v določenemu oknu +Name[sr]=Прикажи у задатом прозору +Name[sv]=Visa i angivet fönster +Name[th]=แสดงในหน้าต่างที่กำหนด +Name[tr]=Belirtilen pencerede göster +Name[uk]=Відобразити у вказаному вікні +Name[ven]=Sumbedzani kha windo dzo bulwaho fhedzi +Name[xh]=Bonisa kwi window ekhankanyiweyo +Name[xx]=xxDisplay in specified windowxx +Name[zh_CN]=在指定的窗口中显示 +Name[zh_TW]=在指定的視窗中顯示 +Name[zu]=Veza kwi-window ecacisiwe +NoDisplay=true + +[Desktop Action Root] +Exec=electricsheep --root 1 +Name=Display in root window +Name[af]=Vertoon in root venster +Name[bg]=Стартиране в главния прозорец +Name[bs]=Prikaži u korijenskom prozoru +Name[ca]=Mostra a la finestra arrel +Name[cs]=Zobrazit na pozadí plochy +Name[cy]=Dangos mewn ffenestr gwraidd +Name[da]=Visning i root-vindue +Name[de]=In Hintergrundfenster anzeigen +Name[el]=Προβολή στο βασικό παράθυρο +Name[eo]=Montru en radika fenestro +Name[es]=Mostrar en la ventana raíz +Name[et]=Juuraknas näitamine +Name[fi]=Näytä root-ikkunassa +Name[fo]=Vís á bakgrundini +Name[fr]=Affichage dans la fenêtre racine +Name[he]=הצג בחלון השורש +Name[hu]=Megjelenítés a gyökérablakban +Name[is]=Birta í bakgrunni skjáborðs +Name[it]=Mostra sullo sfondo +Name[ja]=ルートウィンドウで表示 +Name[lv]=Rādīt saknes logā +Name[mt]=Uri fuq l-isfond +Name[nb]=Vis i root-vindu +Name[nl]=In hoofdvenster weergeven +Name[nn]=Vis i rotvindauget +Name[nso]=Bontsha kago window ya modu +Name[pl]=Wyświetl w oknie pierwotnym +Name[pt]=Mostrar na janela de fundo +Name[pt_BR]=Mostrar na janela-raiz +Name[ru]=Отображать в корневом окне +Name[sk]=Zobraziť v koreňovom okne +Name[sl]=Prikaz v korenskem oknu +Name[sr]=Прикажи у главном (root) прозору +Name[sv]=Visa i rotfönstret +Name[th]=แสดงในหน้าต่างหลัก +Name[tr]=Kök pencerede göster +Name[uk]=Відобразити на тлі екрана +Name[ven]=Sumbedzani kha windo ya mudzi +Name[xh]=Bonisa kwingcambu ye window +Name[xx]=xxDisplay in root windowxx +Name[zh_CN]=在根窗口中显示 +Name[zh_TW]=在根視窗中顯示 +Name[zu]=Veza kwimpande ye-window +NoDisplay=true diff -Nru electricsheep-2.7~b12+svn20091224/debian/desktop-files/screensaver-electricsheep.desktop electricsheep-3.0.2-git20180325/debian/desktop-files/screensaver-electricsheep.desktop --- electricsheep-2.7~b12+svn20091224/debian/desktop-files/screensaver-electricsheep.desktop 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/desktop-files/screensaver-electricsheep.desktop 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.2 +Name=ElectricSheep +Comment=Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. See www.electricsheep.org. +TryExec=electricsheep-saver +Exec=electricsheep-saver +StartupNotify=false +Terminal=false +Type=Application +Icon=electricsheep +Categories=Screensaver; +OnlyShowIn=GNOME;KDE;XFCE diff -Nru electricsheep-2.7~b12+svn20091224/debian/gbp.conf electricsheep-3.0.2-git20180325/debian/gbp.conf --- electricsheep-2.7~b12+svn20091224/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/gbp.conf 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,30 @@ +# Configuration file for git-buildpackage and friends +# +# tweaked by Ichthyo for maintining "Electric Sheep" + +[DEFAULT] +upstream-tree = TAG +debian-branch = deb +upstream-tag = tar-%(version)s +debian-tag = debian/%(version)s +pristine-tar = False +sign-tags = True + +[buildpackage] +# area for building packages +export-dir = ../pack.deb/ +ignore-new = True +compression = xz +export = INDEX + + +[dch] +git-log = --no-merges +#snapshot-number = snapshot + 1 +# include 7 digits of the commit id in the changelog enty +id-length = 7 +# use author/email configured in Git repo +git-author = True +# automatically figure out the last release +auto = True + diff -Nru electricsheep-2.7~b12+svn20091224/debian/gnome-screensaver-helper/electricsheep.desktop electricsheep-3.0.2-git20180325/debian/gnome-screensaver-helper/electricsheep.desktop --- electricsheep-2.7~b12+svn20091224/debian/gnome-screensaver-helper/electricsheep.desktop 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/gnome-screensaver-helper/electricsheep.desktop 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ - -[Desktop Entry] -Encoding=UTF-8 -Name=ElectricSheep -Comment=Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. This module requires a high-bandwidth, always-on connection to the internet such as DSL or cable-modem. The first time you run it, it normally takes 5 to 10 minutes before the first sheep is downloaded and displayed. After that, it should come up immediately. If you have installed the hacked xscreensaver that supports passing key-presses onto the graphics hack and this feature is enabled, then pressing the up arrow-key transmits a vote for the currently displayed sheep to the server. The votes are the basis of a fitness function for an evolutionary algorithm on the sheep genomes. Vote for the sheep you like, and they will mate, reproduce, and evolve! See http://electricsheep.org for more information. This is version 2.6.4. -TryExec=electricsheep -Exec=electricsheep --root 1 --zoom 1 -StartupNotify=false -Terminal=false -Type=Application -Categories=Screensaver diff -Nru electricsheep-2.7~b12+svn20091224/debian/import_upstream.sh electricsheep-3.0.2-git20180325/debian/import_upstream.sh --- electricsheep-2.7~b12+svn20091224/debian/import_upstream.sh 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/import_upstream.sh 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,20 @@ +#!/bin/bash +# +# ElectricSheep: import an upstream tree from Git +# and transform into a form suitable as 'upstream-tarball' + +if [ ! -d client_generic ] + then + echo "should be in the root of a Git checkout. Expect directory 'client_generic'" + exit -1 +fi + +cd client_generic +git rm -rf MacBuild ffmpeg boost libpng libxml lua5.1 + +cd .. +git mv client_generic/* . +rmdir client_generic + +echo "...transformed source tree" +echo "please check in to Git" diff -Nru electricsheep-2.7~b12+svn20091224/debian/menu electricsheep-3.0.2-git20180325/debian/menu --- electricsheep-2.7~b12+svn20091224/debian/menu 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/menu 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -?package(electricsheep):needs="X11" section="Applications/Graphics" title="Electric Sheep" command="/usr/bin/electricsheep" diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/0001-Lua_from_system.patch electricsheep-3.0.2-git20180325/debian/patches/0001-Lua_from_system.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/0001-Lua_from_system.patch 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/0001-Lua_from_system.patch 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,44 @@ +From: Ichthyostega +Date: Sun, 9 Aug 2015 16:09:04 +0200 +Subject: Build against Lua from system + +build against Lua installed on the system, +instead of Lua interpreter shipped with the package +--- + Client/Makefile.am | 1 - + MSVC/SettingsGUI/Makefile.am | 3 +-- + 2 files changed, 1 insertion(+), 3 deletions(-) + +diff --git a/Client/Makefile.am b/Client/Makefile.am +index a4983e7..50a4850 100644 +--- a/Client/Makefile.am ++++ b/Client/Makefile.am +@@ -21,7 +21,6 @@ AM_CPPFLAGS = \ + -I ../ContentDecoder \ + -I ../TupleStorage \ + -I ../ContentDownloader \ +- -I ../lua5.1/src \ + -I ../Client \ + -I ../Networking \ + -I ../tinyXml +diff --git a/MSVC/SettingsGUI/Makefile.am b/MSVC/SettingsGUI/Makefile.am +index a604339..de17af6 100644 +--- a/MSVC/SettingsGUI/Makefile.am ++++ b/MSVC/SettingsGUI/Makefile.am +@@ -19,7 +19,6 @@ AM_CPPFLAGS = \ + -I ../../ContentDecoder \ + -I ../../TupleStorage \ + -I ../../ContentDownloader \ +- -I ../../lua5.1/src \ + -I ../../Client \ + -I ../../Networking \ + -I ../../tinyXml \ +@@ -53,7 +52,7 @@ electricsheep_preferences_SOURCES = \ + electricsheep_preferences_LDADD = -lboost_thread -lboost_filesystem $(CURL_LIBS) $(LUA_LIBS) -ltinyxml @WX_LDADD@ @BOOST_LDADD@ + + #AM_CXXFLAGS = $(linux_CFLAGS) -fpermissive @WX_CXXFLAGS@ +-AM_CXXFLAGS = $(linux_CFLAGS) @WX_CXXFLAGS@ ++AM_CXXFLAGS = $(linux_CFLAGS) $(LUA_CFLAGS) @WX_CXXFLAGS@ + + + diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/0002-obsolete_pthread_check.patch electricsheep-3.0.2-git20180325/debian/patches/0002-obsolete_pthread_check.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/0002-obsolete_pthread_check.patch 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/0002-obsolete_pthread_check.patch 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,23 @@ +From: Ichthyostega +Date: Sun, 9 Aug 2015 17:31:56 +0200 +Subject: Drop obsolete pthreads autoconf check + +drop obsolete Autoconf macro to check for pthreads. +This macro is not supported in currrent Autotools. +And seemingly we're using boost-threads anyway +--- + configure.ac | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b9b9c91..e9a562c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -37,7 +37,6 @@ AC_SYS_LARGEFILE + + AM_PROG_AS + +-ACX_PTHREAD(PTHREAD_OK=true,PTHREAD_OK=false) + + IS_LINUX_GNU="false" + diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/0003-fix-Linux-version.patch electricsheep-3.0.2-git20180325/debian/patches/0003-fix-Linux-version.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/0003-fix-Linux-version.patch 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/0003-fix-Linux-version.patch 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,49 @@ +From: Ichthyostega +Date: Thu, 17 May 2018 17:37:49 +0200 +Subject: Fix Linux Version information + +...looks like this was just overlooked... + +also disable the BETA_RELEASE flag, since this package is based on a release version +--- + Common/clientversion.h | 6 +++--- + configure.ac | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Common/clientversion.h b/Common/clientversion.h +index 0df1e26..88b866d 100644 +--- a/Common/clientversion.h ++++ b/Common/clientversion.h +@@ -17,8 +17,8 @@ + #define CLIENT_VERSION_PRETTY "macOS 3.0.2" + #define CLIENT_SETTINGS "ElectricSheep" + #else +- #define CLIENT_VERSION "LNX_2.7b33" +- #define CLIENT_VERSION_PRETTY "version 2.7b33" ++ #define CLIENT_VERSION "LNX_3.0.2" ++ #define CLIENT_VERSION_PRETTY "version 3.0.2" + #define CLIENT_SETTINGS "ElectricSheep" + #endif + #endif +@@ -33,7 +33,7 @@ + #define REDIRECT_SERVER "community.sheepserver.net" + #define REDIRECT_SERVER_FULL "https://community.sheepserver.net" + +-#define BETA_RELEASE ++//#define BETA_RELEASE + + + #endif // CLIENTVERSION_H_INCLUDED +diff --git a/configure.ac b/configure.ac +index e9a562c..eb158d9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4,7 +4,7 @@ AC_PREREQ(2.57) + ifdef([m4_pattern_allow], + [m4_pattern_allow([^AC_.*])]) + +-AC_INIT(electricsheep,2.7b33-svn,http://code.google.com/p/electricsheep/issues/list) ++AC_INIT(electricsheep,3.0.2,http://code.google.com/p/electricsheep/issues/list) + AC_CANONICAL_HOST + AC_CANONICAL_TARGET + diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/0004-install-FreeDesktop-entries-from-Debian-packaging.patch electricsheep-3.0.2-git20180325/debian/patches/0004-install-FreeDesktop-entries-from-Debian-packaging.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/0004-install-FreeDesktop-entries-from-Debian-packaging.patch 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/0004-install-FreeDesktop-entries-from-Debian-packaging.patch 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,45 @@ +From: Ichthyostega +Date: Fri, 18 May 2018 17:27:10 +0200 +Subject: install FreeDesktop entries from Debian packaging + +...instead of the very old *.desktop files from upstream tree. +Basically those files are OK, but meanwhile, FreeDesktop is a common standard, +and uses almost the same format previously employed by KDE and Gnome +--- + Makefile.am | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index cb5ca22..ad79e66 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -25,8 +25,6 @@ EXTRA_DIST = \ + Runtime/Scripts/*.lua \ + Runtime/Scripts/Dictionary/*.lua \ + Runtime/Scripts/logging/*.lua \ +- menu-entries/ElectricSheep.desktop \ +- menu-entries/electricsheep-saver.desktop \ + menu-entries/electricsheep.xpm \ + Runtime/electricsheep-attr.png \ + Runtime/electricsheep-frown.png \ +@@ -61,8 +59,6 @@ install-data-local: + mkdir -p $(DESTDIR)$(sharedir)/electricsheep/icons + mkdir -p $(DESTDIR)$(gnome_screensaver_dir) + cp -rf $(srcdir)/Runtime/Scripts $(DESTDIR)$(sharedir)/electricsheep +- mkdir -p $(DESTDIR)$(sharedir)/applications/ +- cp -f $(srcdir)/menu-entries/ElectricSheep.desktop.kde $(DESTDIR)$(sharedir)/applications/ElectricSheep.desktop + mkdir -p $(DESTDIR)$(sharedir)/pixmaps/ + cp -f $(srcdir)/menu-entries/electricsheep.xpm $(DESTDIR)$(sharedir)/pixmaps/ + cp -f $(srcdir)/Runtime/electricsheep-attr.png $(DESTDIR)$(sharedir)/electricsheep/ +@@ -72,8 +68,9 @@ install-data-local: + cp -f $(srcdir)/Runtime/TrebuchetMS-24.glf $(DESTDIR)$(sharedir)/electricsheep/ + mkdir -p $(DESTDIR)$(bindir) + cp -f $(srcdir)/electricsheep-saver $(DESTDIR)$(bindir) && chmod a+rx $(DESTDIR)$(bindir)/electricsheep-saver +- mkdir -p $(DESTDIR)/usr/share/applications/screensavers/ +- cp -f $(srcdir)/menu-entries/electricsheep-saver.desktop $(DESTDIR)/usr/share/applications/screensavers/electricsheep.desktop ++ mkdir -p $(DESTDIR)$(sharedir)/applications/screensavers/ ++ cp -f $(srcdir)/debian/desktop-files/ElectricSheep.desktop $(DESTDIR)$(sharedir)/applications/ElectricSheep.desktop ++ cp -f $(srcdir)/debian/desktop-files/screensaver-electricsheep.desktop $(DESTDIR)/usr/share/applications/screensavers/electricsheep.desktop + mkdir -p $(DESTDIR)$(gnome_screensaver_dir) + cp -f $(srcdir)/electricsheep-saver-gnome $(DESTDIR)$(gnome_screensaver_dir)/electricsheep-saver && chmod a+rx $(DESTDIR)$(gnome_screensaver_dir)/electricsheep-saver + diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/0005-install-PNG-into-default-Icon-theme.patch electricsheep-3.0.2-git20180325/debian/patches/0005-install-PNG-into-default-Icon-theme.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/0005-install-PNG-into-default-Icon-theme.patch 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/0005-install-PNG-into-default-Icon-theme.patch 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,29 @@ +From: Ichthyostega +Date: Fri, 18 May 2018 18:10:47 +0200 +Subject: install PNG into default Icon theme + +--- + Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Makefile.am b/Makefile.am +index ad79e66..82c541a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -33,6 +33,7 @@ EXTRA_DIST = \ + Runtime/TrebuchetMS-24.glf \ + Runtime/sheep_logo.xpm \ + Runtime/sheep_logo2.xpm \ ++ Runtime/logo.png \ + wxWidgets-2.9.1 \ + $(doc_DATA) + +@@ -66,6 +67,8 @@ install-data-local: + cp -f $(srcdir)/Runtime/electricsheep-smile.png $(DESTDIR)$(sharedir)/electricsheep/ + cp -f $(srcdir)/Runtime/TrebuchetMS-20.glf $(DESTDIR)$(sharedir)/electricsheep/ + cp -f $(srcdir)/Runtime/TrebuchetMS-24.glf $(DESTDIR)$(sharedir)/electricsheep/ ++ mkdir -p $(DESTDIR)$(sharedir)/icons/hicolor/64x64/apps/ ++ cp -f $(srcdir)/Runtime/logo.png $(DESTDIR)$(sharedir)/icons/hicolor/64x64/apps/electricsheep.png + mkdir -p $(DESTDIR)$(bindir) + cp -f $(srcdir)/electricsheep-saver $(DESTDIR)$(bindir) && chmod a+rx $(DESTDIR)$(bindir)/electricsheep-saver + mkdir -p $(DESTDIR)$(sharedir)/applications/screensavers/ diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/0006-fix-some-FFmpeg-deprecations.patch electricsheep-3.0.2-git20180325/debian/patches/0006-fix-some-FFmpeg-deprecations.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/0006-fix-some-FFmpeg-deprecations.patch 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/0006-fix-some-FFmpeg-deprecations.patch 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1,103 @@ +From: Ichthyostega +Date: Fri, 18 May 2018 23:29:42 +0200 +Subject: fix some FFmpeg deprecations + +This changeset applies some obvious and directly indicated fixes for ContentDecode +to replace features deprecated in FFmpeg. + +Frame.h: + avpicture_get_size -> av_image_get_buffer_size (defensively using align=1 byte) + avpicture_fill -> av_image_fill_arrays + +ContentDecoder.cpp + use AVStream::codecpar instead of AVStream::codec + av_free_packet -> av_packet_unref + +NOTE: there remain some not-so-obvious deprecations to fix + + - in ContentDecoder.cpp, line 200: *writing* to AVStream::codec + + - in ContentDecoder.cpp, line 578: avcodec_decode_video2 + should be replaced by avcodec_send_package(..) followed + by avcodec_receive_frame. +--- + ContentDecoder/ContentDecoder.cpp | 8 ++++---- + ContentDecoder/ContentDecoder.h | 4 ++++ + ContentDecoder/Frame.h | 4 ++-- + 3 files changed, 10 insertions(+), 6 deletions(-) + +diff --git a/ContentDecoder/ContentDecoder.cpp b/ContentDecoder/ContentDecoder.cpp +index 8bfbc78..ee6cbbe 100644 +--- a/ContentDecoder/ContentDecoder.cpp ++++ b/ContentDecoder/ContentDecoder.cpp +@@ -182,7 +182,7 @@ bool CContentDecoder::Open( sOpenVideoInfo *ovi ) + ovi->m_VideoStreamID = -1; + for( uint32 i=0; im_pFormatContext->nb_streams; i++ ) + { +- if( ovi->m_pFormatContext->streams[i]->codec->codec_type == AVMEDIA_TYPE_VIDEO ) ++ if( ovi->m_pFormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ) + { + ovi->m_pVideoStream = ovi->m_pFormatContext->streams[i]; + ovi->m_VideoStreamID = static_cast(i); +@@ -553,7 +553,7 @@ CVideoFrame *CContentDecoder::ReadOneFrame(sOpenVideoInfo *ovi) + if ( av_read_frame( pFormatContext, &packet ) < 0 ) + { + ovi->m_ReadingTrailingFrames = true; +- av_free_packet(&packet); ++ av_packet_unref(&packet); + continue; + } + } +@@ -595,7 +595,7 @@ CVideoFrame *CContentDecoder::ReadOneFrame(sOpenVideoInfo *ovi) + break; + } + +- av_free_packet(&packet); ++ av_packet_unref(&packet); + } + + // Do we have a fresh frame? +@@ -687,7 +687,7 @@ CVideoFrame *CContentDecoder::ReadOneFrame(sOpenVideoInfo *ovi) + ovi->m_NextIsSeam = false; + } + +- av_free_packet( &packet ); ++ av_packet_unref( &packet ); + return pVideoFrame; + } + +diff --git a/ContentDecoder/ContentDecoder.h b/ContentDecoder/ContentDecoder.h +index 313fd8f..7f14e6e 100644 +--- a/ContentDecoder/ContentDecoder.h ++++ b/ContentDecoder/ContentDecoder.h +@@ -29,10 +29,14 @@ extern "C"{ + #include "libavcodec/avcodec.h" + #include "libavformat/avformat.h" + #include "libswscale/swscale.h" ++ #include "libavutil/imgutils.h" ++ #include "libavutil/avutil.h" + #else + #include "avcodec.h" + #include "avformat.h" + #include "swscale.h" ++ #include "imgutils.h" ++ #include "avutil.h" + #endif + } + +diff --git a/ContentDecoder/Frame.h b/ContentDecoder/Frame.h +index 7744297..4d2ee3f 100644 +--- a/ContentDecoder/Frame.h ++++ b/ContentDecoder/Frame.h +@@ -103,9 +103,9 @@ class CVideoFrame + + if (m_pFrame != NULL) + { +- int32 numBytes = avpicture_get_size( _format, _pCodecContext->width, _pCodecContext->height ); ++ int32 numBytes = av_image_get_buffer_size( _format, _pCodecContext->width, _pCodecContext->height, 1 ); + m_spBuffer = new Base::CAlignedBuffer( static_cast(numBytes) * sizeof(uint8) ); +- avpicture_fill( (AVPicture *)m_pFrame, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height ); ++ av_image_fill_arrays( m_pFrame->data, m_pFrame->linesize, m_spBuffer->GetBufferPtr(), _format, _pCodecContext->width, _pCodecContext->height, 1 ); + } else + g_Log->Error( "m_pFrame == NULL" ); + } diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/fix_ftbfs_libav_0.7.patch electricsheep-3.0.2-git20180325/debian/patches/fix_ftbfs_libav_0.7.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/fix_ftbfs_libav_0.7.patch 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/fix_ftbfs_libav_0.7.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,31 +0,0 @@ -Index: electricsheep-2.7~b12+svn20091224/electricsheep.c -=================================================================== ---- electricsheep-2.7~b12+svn20091224.orig/electricsheep.c 2011-07-14 06:24:14.981991391 +0200 -+++ electricsheep-2.7~b12+svn20091224/electricsheep.c 2011-07-14 06:30:50.861991426 +0200 -@@ -670,7 +670,7 @@ - input_stream_index = -1; - for (j = 0; j < ictx->nb_streams; j++) { - AVCodecContext *enc = ictx->streams[j]->codec; -- if (CODEC_TYPE_VIDEO == enc->codec_type) { -+ if (AVMEDIA_TYPE_VIDEO == enc->codec_type) { - input_stream_index = j; - break; - } -@@ -696,7 +696,7 @@ - - output_ctx = avformat_alloc_context(); - -- ofmt = guess_format(NULL, fname, NULL); -+ ofmt = av_guess_format(NULL, fname, NULL); - if (!ofmt) { - fprintf(logout, "could not determine format from %s.\n", fname); - exit(1); -@@ -738,7 +738,7 @@ - av_init_packet(&opkt); - if (av_parser_change(ictx->streams[input_stream_index]->parser, output_ctx->streams[0]->codec, - &opkt.data, &opkt.size, ipkt.data, ipkt.size, -- ipkt.flags & PKT_FLAG_KEY)) -+ ipkt.flags & AV_PKT_FLAG_KEY)) - opkt.destruct= av_destruct_packet; - - if (-1 == av_interleaved_write_frame(output_ctx, &opkt)) { diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/fix-ftbfs-libav9.patch electricsheep-3.0.2-git20180325/debian/patches/fix-ftbfs-libav9.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/fix-ftbfs-libav9.patch 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/fix-ftbfs-libav9.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -Author: Reinhard Tartler -Description: Fixes FTBFS with libav 9 -Bug-Debian: http://bugs.debian.org/692980 -Bug-Ubunut: https://bugs.launchpad.net/bugs/1077657 - -Index: electricsheep-2.7~b12+svn20091224/electricsheep.c -=================================================================== ---- electricsheep-2.7~b12+svn20091224.orig/electricsheep.c 2012-11-11 09:26:13.668980478 +0000 -+++ electricsheep-2.7~b12+svn20091224/electricsheep.c 2012-11-11 15:52:41.300263686 +0000 -@@ -657,12 +657,12 @@ - return; - } - -- if (0 > av_open_input_file(&ictx, fname, NULL, 0, NULL)) { -+ if (0 > avformat_open_input(&ictx, fname, NULL, NULL)) { - perror(fname); - exit(1); - } - -- if (0 > av_find_stream_info(ictx)) { -+ if (0 > avformat_find_stream_info(ictx, NULL)) { - fprintf(logout, "%s: could not find codec parameters\n", fname); - exit(1); - } -@@ -682,7 +682,6 @@ - - if (NULL == output_ctx) { - AVCodecContext *codec, *icodec; -- AVStream *st; - char pipe[20]; - if (1) - sprintf(pipe, "pipe:%d", fileno(avi_pipe)); -@@ -703,9 +702,8 @@ - } - output_ctx->oformat = ofmt; - -- st = av_new_stream(output_ctx, output_ctx->nb_streams); -- st->stream_copy = 1; -- av_set_parameters(output_ctx, NULL); -+ // NB: This is pointless, cf http://lists.libav.org/pipermail/libav-devel/2012-November/038967.html -+ // st->stream_copy = 1; - - icodec = ictx->streams[input_stream_index]->codec; - codec = output_ctx->streams[0]->codec; -@@ -723,12 +721,12 @@ - codec->height = icodec->height; - codec->has_b_frames = icodec->has_b_frames; - -- if (url_fopen(&output_ctx->pb, pipe, URL_WRONLY) < 0) { -+ if (avio_open(&output_ctx->pb, pipe, AVIO_FLAG_WRITE) < 0) { - fprintf(logout, "Could not open '%s'\n", pipe); - exit(1); - } - -- av_write_header(output_ctx); -+ avformat_write_header(output_ctx, NULL); - } - - while (1) { -@@ -748,7 +746,7 @@ - av_free_packet(&opkt); - av_free_packet(&ipkt); - } -- av_close_input_file(ictx); -+ avformat_close_input(&ictx); - } - - time_t search_time; -@@ -1771,7 +1769,7 @@ - (unsigned)XML_GetCurrentLineNumber(parser)); - break; - } -- if (debug > 1) fprintf(logout, "list read loop len=%d\n", len); -+ if (debug > 1) fprintf(logout, "list read loop len=%zd\n", len); - } while (!done); - XML_ParserFree(parser); - diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/fix_link_as-needed.patch electricsheep-3.0.2-git20180325/debian/patches/fix_link_as-needed.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/fix_link_as-needed.patch 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/fix_link_as-needed.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -Index: electricsheep-2.7~b12+svn20091224/Makefile.am -=================================================================== ---- electricsheep-2.7~b12+svn20091224.orig/Makefile.am 2011-07-14 06:47:50.981991518 +0200 -+++ electricsheep-2.7~b12+svn20091224/Makefile.am 2011-07-14 06:51:35.741991539 +0200 -@@ -9,7 +9,8 @@ - pkgdata_DATA = electricsheep-wait.avi electricsheep-preferences.glade - - electricsheep_preferences_CFLAGS = @libglade_CFLAGS@ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" --electricsheep_preferences_LDFLAGS = @libglade_LIBS@ -export-dynamic -+electricsheep_preferences_LDFLAGS = -export-dynamic -+electricsheep_preferences_LDADD = @libglade_LIBS@ - electricsheep_preferences_SOURCES = electricsheep-preferences.c utils.c md5.c - - -Index: electricsheep-2.7~b12+svn20091224/Makefile.in -=================================================================== ---- electricsheep-2.7~b12+svn20091224.orig/Makefile.in 2011-07-14 06:53:33.251991549 +0200 -+++ electricsheep-2.7~b12+svn20091224/Makefile.in 2011-07-14 06:53:31.631991549 +0200 -@@ -64,7 +64,7 @@ - electricsheep_preferences-md5.$(OBJEXT) - electricsheep_preferences_OBJECTS = \ - $(am_electricsheep_preferences_OBJECTS) --electricsheep_preferences_LDADD = $(LDADD) -+electricsheep_preferences_LDADD = $(LDADD) @libglade_LIBS@ - electricsheep_preferences_LINK = $(CCLD) \ - $(electricsheep_preferences_CFLAGS) $(CFLAGS) \ - $(electricsheep_preferences_LDFLAGS) $(LDFLAGS) -o $@ -@@ -202,7 +202,7 @@ - electricsheep_LDADD = -lavformat -lavcodec -lavutil -lm -lz - pkgdata_DATA = electricsheep-wait.avi electricsheep-preferences.glade - electricsheep_preferences_CFLAGS = @libglade_CFLAGS@ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" --electricsheep_preferences_LDFLAGS = @libglade_LIBS@ -export-dynamic -+electricsheep_preferences_LDFLAGS = -export-dynamic - electricsheep_preferences_SOURCES = electricsheep-preferences.c utils.c md5.c - electricsheep_SOURCES = electricsheep.c getdate.c utils.c md5.c - man1_MANS = electricsheep.man diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/manpage_fix.patch electricsheep-3.0.2-git20180325/debian/patches/manpage_fix.patch --- electricsheep-2.7~b12+svn20091224/debian/patches/manpage_fix.patch 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/manpage_fix.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,214 +0,0 @@ -Properly escape the use of hyphens in upstream's manpage. ---- trunk.orig/electricsheep.man.in -+++ trunk/electricsheep.man.in -@@ -1,39 +1,39 @@ - .TH ElectricSheep 1 "" "X Version 11" - .SH NAME --electricsheep - a distributed screen-saver (version @VERSION@) -+electricsheep \- a distributed screen-saver (version @VERSION@) - --electricsheep-preferences - GUI to edit defaults for electricsheep -+electricsheep-preferences \- GUI to edit defaults for electricsheep - .SH SYNOPSIS - .B electricsheep --[\--preferences \fIfile\fP] --[\--nick \fIname\fP] --[\--password \fIstring\fP] --[\--url \fIurl\fP] --[\--nrepeats \fIN\fP] --[\--max-repeats \fIN\fP] --[\--frame-rate \fIN\fP] --[\--nthreads \fIN\fP] --[\--server \fIhost/path\fP] --[\--display-anim \fI0/1\fP] --[\--show-errors \fI0/1\fP] --[\--standalone \fI0/1\fP] --[\--save-dir \fIpath\fP] --[\--reset-fuse \fIN\fP] --[\--nice \fIN\fP] --[\--proxy \fIURL\fP] --[\--proxy-user \fIuser:password\fP] --[\--timeout \fIN\fP] --[\--start-sheep \fIN\fP] --[\--debug \fI0/1\fP] -+[\-\-preferences \fIfile\fP] -+[\-\-nick \fIname\fP] -+[\-\-password \fIstring\fP] -+[\-\-url \fIurl\fP] -+[\-\-nrepeats \fIN\fP] -+[\-\-max-repeats \fIN\fP] -+[\-\-frame-rate \fIN\fP] -+[\-\-nthreads \fIN\fP] -+[\-\-server \fIhost/path\fP] -+[\-\-display-anim \fI0/1\fP] -+[\-\-show-errors \fI0/1\fP] -+[\-\-standalone \fI0/1\fP] -+[\-\-save-dir \fIpath\fP] -+[\-\-reset-fuse \fIN\fP] -+[\-\-nice \fIN\fP] -+[\-\-proxy \fIURL\fP] -+[\-\-proxy-user \fIuser:password\fP] -+[\-\-timeout \fIN\fP] -+[\-\-start-sheep \fIN\fP] -+[\-\-debug \fI0/1\fP] - [\-window-id \fIid\fP] --[\--bracket-begin \fIdate/id\fP] --[\--bracket-end \fIdate/id\fP] --[\--data-dir \fIdir\fP] --[\--logfile \fIfile\fP] --[\--video-driver \fIname\fP] -+[\-\-bracket-begin \fIdate/id\fP] -+[\-\-bracket-end \fIdate/id\fP] -+[\-\-data-dir \fIdir\fP] -+[\-\-logfile \fIfile\fP] -+[\-\-video-driver \fIname\fP] - - .B electricsheep-preferences --[\--preferences \fI\fP] -+[\-\-preferences \fI\fP] - - .SH DESCRIPTION - -@@ -52,111 +52,111 @@ - - .SH OPTIONS - .TP 8 --.B \--preferences \fIfile\fP -+.B \-\-preferences \fIfile\fP - Give the location for the preferences. The default is ~/.electricsheep/preferences.xml. - .TP 8 --.B \--bracket-begin \fIdate/id\fP -+.B \-\-bracket-begin \fIdate/id\fP - Play no sheep before this one or this time. - .TP 8 --.B \--bracket-end \fIdate/id\fP -+.B \-\-bracket-end \fIdate/id\fP - Play no sheep after this one or this time. - .TP 8 --.B \--data-dir \fIdir\fP -+.B \-\-data-dir \fIdir\fP - Set the directory to find splash images and other data files. - .TP 8 --.B \--debug \fI0/1\fP -+.B \-\-debug \fI0/1\fP - If 1 then print copious debug information. The default is 0. - .TP 8 --.B \--display-anim \fI0/1\fP -+.B \-\-display-anim \fI0/1\fP - If 1 then display the animated sheep, if 0 then do not. Not - displaying the sheep allows one to contribute rendering more rendering - cycles because no CPU time is spent on display. It also allows one to - run on a computer without an X display at all. The default is 1. - .TP 8 --.B \--frame-rate \fIN\fP -+.B \-\-frame-rate \fIN\fP - Specify the frame-rate for sheep display in frames per second. The - default is 23. If your client is having trouble completing frames - because it is spending all its CPU time in the display process then - decreasing this might help. Or increase it if you have extra CPU for - smoother display. - .TP 8 --.B \--logfile \fIfile\fP -+.B \-\-logfile \fIfile\fP - Write errors and diagnostics to this file instead of stderr and stdout. - .TP 8 --.B \--max-megabytes \fIN\fP -+.B \-\-max-megabytes \fIN\fP - Specify the maximum number of megabytes of disk storage to use to --store sheep (in the directory specified with --save-dir). The default -+store sheep (in the directory specified with \-\-save-dir). The default - is 2000. Zero (0) means there is no maximum. - .TP 8 --.B \--max-repeats \fIN\fP -+.B \-\-max-repeats \fIN\fP - Maximum number of times to repeat any sheep. The default is 3. - .TP 8 --.B \--min-megabytes \fIN\fP -+.B \-\-min-megabytes \fIN\fP - Specify the minimum number of megabytes of disk storage to leave free. - The default is 2000. Zero (0) means there is no minimum. - .TP 8 --.B \--nice \fIN\fP -+.B \-\-nice \fIN\fP - Specify the priority adjustment for render process and all non-display - processes. The default is 10. - .TP 8 --.B \--nick \fIname\fP -+.B \-\-nick \fIname\fP - Specify a nickname. The server keeps credits the frames according to - nickname and ranks nicknames according to who contributes the most. - .TP 8 --.B \--password \fIstring\fP -+.B \-\-password \fIstring\fP - Authenticate to the server using this password. Note: the password is - not encrypted! - .TP 8 --.B \--nrepeats \fIN\fP -+.B \-\-nrepeats \fIN\fP - Number of times to repeat each sheep. The default is 1. Transitions - between sheep are not repeated. - .TP 8 --.B \--nthreads \fIN\fP -+.B \-\-nthreads \fIN\fP - Specify the number of rendering threads. By default there is one (1). - .TP 8 --.B \--proxy \fIURL\fP -+.B \-\-proxy \fIURL\fP - Specify a proxy as per curl(1). - .TP 8 --.B \--proxy-user \fIuser:password\fP -+.B \-\-proxy-user \fIuser:password\fP - Specify a proxy user and password as per curl(1). - .TP 8 --.B \--save-dir \fIpath\fP -+.B \-\-save-dir \fIpath\fP - Specifies a directory to save the sheep in. The default is ~/.electricsheep. - .TP 8 --.B \--show-errors \fI0/1\fP -+.B \-\-show-errors \fI0/1\fP - If 0 then do not report problems connecting to server. The default is 1. - .TP 8 --.B \--standalone \fI0/1\fP -+.B \-\-standalone \fI0/1\fP - If 1 then run without connecting to the internet at all, just displays - the sheep already downloaded and do no rendering. The default is 0. - .TP 8 --.B \--start-sheep \fIN\fP -+.B \-\-start-sheep \fIN\fP - Specify the ID of the sheep to display first. The default is to - display a random sheep. - .TP 8 --.B \--timeout \fIN\fP -+.B \-\-timeout \fIN\fP - Specify the timeout in seconds for server operations. The default is - 401. - .TP 8 --.B \--tryagain \fIN\fP -+.B \-\-tryagain \fIN\fP - Specify the time in seconds to wait before retrying to contact the - server. The default is 696. - .TP 8 --.B \--url \fIname\fP -+.B \-\-url \fIname\fP - Specify a vanity URL to go with with the nickname. - .TP 8 --.B \--video-driver \fIname\fP --Passed on to mplayer -vo, try "gl" and "x11" and "xv" or leave it -+.B \-\-video-driver \fIname\fP -+Passed on to mplayer \-vo, try "gl" and "x11" and "xv" or leave it - blank for the default. - .TP 8 --.B \--voting \fI0/1\fP -+.B \-\-voting \fI0/1\fP - If 1 then enable the voting interface, which is broken in this beta. - .TP 8 - .B \-window-id \fIX\fP - Specify in hex the window ID to draw into. Note the single leading - dash (this option's syntax is required by xscreensaver). The default --is to display in a new window. If both --root and -window-id are --specified then -window-id takes precedence. -+is to display in a new window. If both \-\-root and \-window\-id are -+specified then \-window-id takes precedence. - .SH ENVIRONMENT - .PP - .TP 8 diff -Nru electricsheep-2.7~b12+svn20091224/debian/patches/series electricsheep-3.0.2-git20180325/debian/patches/series --- electricsheep-2.7~b12+svn20091224/debian/patches/series 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/patches/series 2018-05-17 15:50:05.000000000 +0000 @@ -1,4 +1,6 @@ -fix_link_as-needed.patch -fix_ftbfs_libav_0.7.patch -manpage_fix.patch -fix-ftbfs-libav9.patch +0001-Lua_from_system.patch +0002-obsolete_pthread_check.patch +0003-fix-Linux-version.patch +0004-install-FreeDesktop-entries-from-Debian-packaging.patch +0005-install-PNG-into-default-Icon-theme.patch +0006-fix-some-FFmpeg-deprecations.patch diff -Nru electricsheep-2.7~b12+svn20091224/debian/rules electricsheep-3.0.2-git20180325/debian/rules --- electricsheep-2.7~b12+svn20091224/debian/rules 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/rules 2018-05-17 15:50:05.000000000 +0000 @@ -1,108 +1,12 @@ #!/usr/bin/make -f -# Sample debian/rules that uses debhelper. -# GNU copyright 1997 to 1999 by Joey Hess. +# +# Debian package definition for "Electric Sheep" +# by Ichthyostega +# + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/autoreconf.mk -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 -include /usr/share/quilt/quilt.make -# The GNOME screensaver path for screensavers .desktop files -GNOME_SS_PATH=/usr/share/applications/screensavers -# The path where xscreensaver looks for an .xml file -XSS_CONF_PATH=/usr/share/xscreensaver/config - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -CFLAGS = -Wall -g - -#ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -#else -# CFLAGS += -O2 -#endif - -config.status: configure $(QUILT_STAMPFN) - dh_testdir -ifneq "$(wildcard /usr/share/misc/config.sub)" "" - cp -f /usr/share/misc/config.sub config.sub -endif -ifneq "$(wildcard /usr/share/misc/config.guess)" "" - cp -f /usr/share/misc/config.guess config.guess -endif - ./configure $(confflags) \ - --prefix=/usr \ - --datadir=\$${prefix}/share \ - --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info \ - --host=$(DEB_HOST_GNU_TYPE) \ - --build=$(DEB_BUILD_GNU_TYPE) - -build: build-stamp - -build-stamp: config.status - dh_testdir - $(MAKE) CFLAGS="$(CFLAGS)" - touch build-stamp - -clean: clean-patched unpatch -clean-patched: $(QUILT_STAMPFN) - dh_testdir - dh_testroot - rm -f build-stamp - rm -f debian/*.substvars - [ ! -f Makefile ] || $(MAKE) distclean - rm -f config.sub config.guess - rm -f config.status - rm -f config.log - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - $(MAKE) install DESTDIR=$(CURDIR)/debian/electricsheep - # The xscreensaver .xml config file - mkdir -p $(CURDIR)/debian/electricsheep$(XSS_CONF_PATH) - cp $(CURDIR)/electricsheep.xml \ - $(CURDIR)/debian/electricsheep$(XSS_CONF_PATH) - # The Application .desktop file - mkdir -p $(CURDIR)/debian/electricsheep$(GNOME_SS_PATH) - cp $(CURDIR)/debian/default-files/electricsheep.desktop.gnome \ - $(CURDIR)/debian/electricsheep$(GNOME_SS_PATH)/electricsheep.desktop - # ... and for kscreensaver - mkdir -p $(CURDIR)/debian/electricsheep/usr/share/applnk/System/ScreenSavers - cp $(CURDIR)/debian/default-files/electricsheep.desktop $(CURDIR)/debian/electricsheep/usr/share/applnk/System/ScreenSavers - # cleanup - rm -rf $(CURDIR)/debian/electricsheep/usr/include - -# Build architecture-independent files here. -binary-indep: build install - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - dh_installdebconf - dh_installdocs - dh_installexamples - dh_installmenu - dh_installman - dh_gconf --priority=20 - dh_installchangelogs - dh_link - dh_strip - dh_compress - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install diff -Nru electricsheep-2.7~b12+svn20091224/debian/source/format electricsheep-3.0.2-git20180325/debian/source/format --- electricsheep-2.7~b12+svn20091224/debian/source/format 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/source/format 2018-05-17 15:50:05.000000000 +0000 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru electricsheep-2.7~b12+svn20091224/debian/watch electricsheep-3.0.2-git20180325/debian/watch --- electricsheep-2.7~b12+svn20091224/debian/watch 2018-05-19 01:37:13.000000000 +0000 +++ electricsheep-3.0.2-git20180325/debian/watch 2018-05-17 15:50:05.000000000 +0000 @@ -1,3 +1,3 @@ # While upstream technically makes releases, they aren't really announced and # released to the public. The way upstream usuallly expects people to obtain -# the software is by checking out or exporting from subversion. +# the software is by checking out or exporting from Git. diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/DisplayDX.cpp electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/DisplayDX.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/DisplayDX.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/DisplayDX.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,740 @@ +#ifdef WIN32 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "DisplayDX.h" +#include "Log.h" +#include "settings.h" + +#include "Exception.h" + +namespace DisplayOutput +{ + +bool m_bWaitForInputIdle = false; +bool g_bPreview = false; +static HWND gl_hFocusWindow = NULL; + +/* + CDisplayDX(). + +*/ +CDisplayDX::CDisplayDX(bool _blank, IDirect3D9 *_pIDirect3D9) : CDisplayOutput() +{ + memset(&m_PresentationParams, 0, sizeof(m_PresentationParams)); + m_pDevice = NULL; + m_WindowHandle = NULL; + m_bScreensaver = false; + m_DesiredScreenID = 0; + m_bWaitForInputIdle = false; + m_dwNumMonitors = 0; + m_Shader20 = false; + m_pDirect3DInstance = _pIDirect3D9; + m_BlankUnused = _blank; +} + +/* + ~CDisplayDX(). + +*/ +CDisplayDX::~CDisplayDX() +{ + g_Log->Info( "~CDisplayDX()" ); +} + +/* + EnumMonitors(). + +*/ +void CDisplayDX::EnumMonitors() +{ + DWORD iDevice = 0; + DISPLAY_DEVICE dispdev = {0}; + DISPLAY_DEVICE dispdev2 = {0}; + DEVMODE devmode = {0}; + + dispdev.cb = sizeof(dispdev); + dispdev2.cb = sizeof(dispdev2); + devmode.dmSize = sizeof(devmode); + devmode.dmDriverExtra = 0; + MonitorInfo *pMonitorInfoNew; + + while( EnumDisplayDevices( NULL, iDevice, (DISPLAY_DEVICE*)&dispdev, 0 ) ) + { + // Ignore NetMeeting's mirrored displays. + if( ( dispdev.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER ) == 0 ) + { + // To get monitor info for a display device, call EnumDisplayDevices a second time, + // passing dispdev.DeviceName (from the first call) as the first parameter. + if (EnumDisplayDevices( dispdev.DeviceName, 0, (DISPLAY_DEVICE *)&dispdev2, 0 ) != 0) + { + pMonitorInfoNew = &m_Monitors[ m_dwNumMonitors ]; + ZeroMemory( pMonitorInfoNew, sizeof(MonitorInfo) ); + lstrcpy( pMonitorInfoNew->strDeviceName, dispdev.DeviceString ); + lstrcpy( pMonitorInfoNew->strMonitorName, dispdev2.DeviceString ); + pMonitorInfoNew->iAdapter = NO_ADAPTER; + + if( dispdev.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP ) + { + if (EnumDisplaySettings( dispdev.DeviceName, ENUM_CURRENT_SETTINGS, &devmode ) != 0) + { + if( dispdev.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE ) + g_Log->Info( "DISPLAY_DEVICE_PRIMARY_DEVICE" ); + //{ + // For some reason devmode.dmPosition is not always (0, 0) for the primary display, so force it. + //pMonitorInfoNew->rcScreen.left = 0; + //pMonitorInfoNew->rcScreen.top = 0; + //} + //else + //{ + pMonitorInfoNew->rcScreen.left = devmode.dmPosition.x; + pMonitorInfoNew->rcScreen.top = devmode.dmPosition.y; + //} + + pMonitorInfoNew->rcScreen.right = pMonitorInfoNew->rcScreen.left + devmode.dmPelsWidth; + pMonitorInfoNew->rcScreen.bottom = pMonitorInfoNew->rcScreen.top + devmode.dmPelsHeight; + + pMonitorInfoNew->hMonitor = MonitorFromRect( &pMonitorInfoNew->rcScreen, MONITOR_DEFAULTTONULL ); + g_Log->Info( "EnumMonitors %d x=%u y=%u w=%u h=%u", m_dwNumMonitors, devmode.dmPosition.x, devmode.dmPosition.y, devmode.dmPelsWidth, devmode.dmPelsHeight); + } + } + + m_dwNumMonitors ++; + if( m_dwNumMonitors == MAX_DISPLAYS ) + break; + } + } + iDevice++; + } +} + +void CDisplayDX::BlankUnusedMonitors(WNDCLASS &wnd, HWND hWnd, HINSTANCE hInstance) +{ + if (m_BlankUnused) + { + g_Log->Info( "Blanking unused monitors"); + RECT rc; + DWORD dwStyle; + + dwStyle = WS_VISIBLE | WS_POPUP; + + for( DWORD iMonitor = 0; iMonitor < m_dwNumMonitors; iMonitor++ ) + { + MonitorInfo *pMonitorInfo; + pMonitorInfo = &m_Monitors[ iMonitor ]; + if( pMonitorInfo->hMonitor == NULL ) + continue; + + rc = pMonitorInfo->rcScreen; + if( iMonitor != m_DesiredScreenID ) + { + g_Log->Info( "Monitor iMonitor != m_DesiredScreenID %d!=%d x1=%d y1=%d x2=%d y2=%d ", iMonitor, m_DesiredScreenID, rc.left, rc.top, rc.right - rc.left,rc.bottom - rc.top); + pMonitorInfo->hWnd = CreateWindowEx( WS_EX_TOPMOST, L"ElectricsheepWndClass", L"ES", dwStyle, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, hWnd, NULL, hInstance, NULL ); + } + + } + + MONITORINFO monitorInfo; + + for( DWORD iMonitor = 0; iMonitor < m_dwNumMonitors; iMonitor++ ) + { + MonitorInfo *pMonitorInfo = &m_Monitors[iMonitor]; + monitorInfo.cbSize = sizeof(MONITORINFO); + GetMonitorInfo( pMonitorInfo->hMonitor, &monitorInfo ); + + g_Log->Info( "Monitor %d x1=%d y1=%d x2=%d y2=%d", iMonitor, monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.top, monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top); + + if( iMonitor != m_DesiredScreenID ) + { + g_Log->Info( "Blanking"); + pMonitorInfo->rcScreen = monitorInfo.rcMonitor; + SetWindowPos( pMonitorInfo->hWnd, HWND_TOPMOST, monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.top, monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top, SWP_NOACTIVATE ); + } + } + } else + g_Log->Info( "Not Blanking unused monitors"); +} + +/* + wndProc(). + Handle all events, push them onto the eventqueue. +*/ +LRESULT CALLBACK CDisplayDX::wndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + PAINTSTRUCT ps; + + switch( msg ) + { + case WM_USER: + // All initialization messages have gone through. Allow 500ms of idle time, then proceed with initialization. + SetTimer( hWnd, 1, 500, NULL ); + g_Log->Info( "Starting 500ms preview timer" ); + break; + + case WM_TIMER: + // Initial idle time is done, proceed with initialization. + m_bWaitForInputIdle = false; + g_Log->Info( "500ms preview timer done" ); + KillTimer( hWnd, 1 ); + break; + + case WM_PAINT: + { + if (BeginPaint( hWnd, &ps ) != NULL) + { + /*if( g_bPreview ) + { + RECT rc; + GetClientRect( hWnd,&rc ); + FillRect( ps.hdc, &rc, (HBRUSH)GetStockObject(BLACK_BRUSH) ); + }*/ + + EndPaint( hWnd, &ps ); + } + return 0; + } + + case WM_CLOSE: + DestroyWindow(hWnd); + break; + + case WM_DESTROY: + PostQuitMessage(0); + break; + + case WM_KEYUP: + { + CKeyEvent *spEvent = new CKeyEvent(); + spEvent->m_bPressed = true; + + switch( wParam ) + { + case VK_TAB: spEvent->m_Code = CKeyEvent::KEY_TAB; break; + case VK_LWIN: spEvent->m_Code = CKeyEvent::KEY_LALT; break; + case VK_MENU: spEvent->m_Code = CKeyEvent::KEY_MENU; break; + case VK_LEFT: spEvent->m_Code = CKeyEvent::KEY_LEFT; break; + case VK_RIGHT: spEvent->m_Code = CKeyEvent::KEY_RIGHT; break; + case VK_UP: spEvent->m_Code = CKeyEvent::KEY_UP; break; + case VK_DOWN: spEvent->m_Code = CKeyEvent::KEY_DOWN; break; + case VK_SPACE: spEvent->m_Code = CKeyEvent::KEY_SPACE; break; + case 0x46: spEvent->m_Code = CKeyEvent::KEY_F; break; + case VK_CONTROL:spEvent->m_Code = CKeyEvent::KEY_CTRL; break; + case VK_F1: spEvent->m_Code = CKeyEvent::KEY_F1; break; + case VK_F2: spEvent->m_Code = CKeyEvent::KEY_F2; break; + case VK_F3: spEvent->m_Code = CKeyEvent::KEY_F3; break; + case VK_F4: spEvent->m_Code = CKeyEvent::KEY_F4; break; + case VK_F8: spEvent->m_Code = CKeyEvent::KEY_F8; break; + case VK_ESCAPE: spEvent->m_Code = CKeyEvent::KEY_Esc; break; + } + + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_LBUTTONUP: + { + CMouseEvent *spEvent = new CMouseEvent(); + spEvent->m_Code = CMouseEvent::Mouse_LEFT; + spEvent->m_X = MAKEPOINTS( lParam ).x; + spEvent->m_Y = MAKEPOINTS( lParam ).y; + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_RBUTTONUP: + { + CMouseEvent *spEvent = new CMouseEvent(); + spEvent->m_Code = CMouseEvent::Mouse_RIGHT; + spEvent->m_X = MAKEPOINTS( lParam ).x; + spEvent->m_Y = MAKEPOINTS( lParam ).y; + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_MOUSEMOVE: + { + CMouseEvent *spEvent = new CMouseEvent(); + spEvent->m_Code = CMouseEvent::Mouse_MOVE; + + spEvent->m_X = MAKEPOINTS( lParam ).x; + spEvent->m_Y = MAKEPOINTS( lParam ).y; + + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_POWERBROADCAST: + switch( LOWORD( wParam ) ) + { + case PBT_APMBATTERYLOW: + case PBT_APMSUSPEND: + { + CPowerEvent *spEvent = new CPowerEvent(); + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + } + break; + + default: + { + return DefWindowProc( hWnd, msg, wParam, lParam ); + } + } + return 0; +} + +UINT CDisplayDX::GetAdapterOrdinal() +{ + if (m_pDirect3DInstance == NULL || (g_Settings()->Get( "settings.player.force_default_adapter", false ) == true)) + { + g_Log->Error( "Using default adapter for screen %d", m_DesiredScreenID ); + return D3DADAPTER_DEFAULT; + } + MONITORINFO monitorInfo; + for( DWORD iMonitor = 0; iMonitor < m_dwNumMonitors; iMonitor++ ) + { + if (iMonitor == m_DesiredScreenID) + { + MonitorInfo *pMonitorInfo = &m_Monitors[iMonitor]; + monitorInfo.cbSize = sizeof(MONITORINFO); + if ( GetMonitorInfo( pMonitorInfo->hMonitor, &monitorInfo ) != 0 ) + for ( UINT iAdapter = 0; iAdapter < m_pDirect3DInstance->GetAdapterCount(); ++iAdapter ) + { + if ( m_pDirect3DInstance->GetAdapterMonitor(iAdapter) == pMonitorInfo->hMonitor ) + { + g_Log->Info( "Using adapter %d for screen %d", iAdapter, m_DesiredScreenID ); + return iAdapter; + } + } + } + } + g_Log->Info( "Using default adapter for screen %d", m_DesiredScreenID ); + return D3DADAPTER_DEFAULT; +} + +/* +*/ +bool CDisplayDX::InitDX9() +{ + if( m_pDirect3DInstance == NULL ) + { + g_Log->Error( "Couldn't initialize Direct3D\nMake sure you have DirectX 9.0c or later installed." ); + return false; + } else + g_Log->Info( "Direct3D Initialized from old IDirect3D9 object" ); + + + memset( &m_PresentationParams, 0, sizeof(m_PresentationParams) ); + + m_PresentationParams.BackBufferFormat = D3DFMT_X8R8G8B8; + if (g_Settings()->Get( "settings.player.MultiDisplayMode", 0 ) != 2 && g_Settings()->Get( "settings.player.force_windowed_directx", true ) == true) + m_PresentationParams.Windowed = TRUE; + else + m_PresentationParams.Windowed = !m_bFullScreen; + + D3DDISPLAYMODE dm = {0}; + if ( m_bFullScreen && m_pDirect3DInstance->GetAdapterDisplayMode( GetAdapterOrdinal(), &dm ) == D3D_OK ) + { + m_PresentationParams.BackBufferWidth = dm.Width; + m_PresentationParams.BackBufferHeight = dm.Height; + } else + { + m_PresentationParams.BackBufferWidth = m_Width; + m_PresentationParams.BackBufferHeight = m_Height; + } + g_Log->Info( "Using backbuffer w=%d h=%d", m_PresentationParams.BackBufferWidth, m_PresentationParams.BackBufferHeight); + m_PresentationParams.BackBufferCount = 1; + m_PresentationParams.hDeviceWindow = m_WindowHandle; + + m_PresentationParams.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; + + if (g_Settings()->Get( "settings.player.vbl_sync", false ) == true) + m_PresentationParams.PresentationInterval = D3DPRESENT_INTERVAL_ONE; + else + m_PresentationParams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; + + m_PresentationParams.SwapEffect = D3DSWAPEFFECT_DISCARD; + + m_PresentationParams.EnableAutoDepthStencil = false; + + m_PresentationParams.MultiSampleType = D3DMULTISAMPLE_NONE; + + D3DCAPS9 caps; + DWORD dwVertexProcessing = 0; + m_pDirect3DInstance->GetDeviceCaps(0, D3DDEVTYPE_HAL, &caps); + if ( caps.VertexShaderVersion >= D3DVS_VERSION(2,0) ) + m_Shader20 = true; + if (caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) + { + if ( caps.VertexShaderVersion < D3DVS_VERSION(1,1) ) + { + dwVertexProcessing = D3DCREATE_MIXED_VERTEXPROCESSING; + g_Log->Info( "DX: Mixed vertex processing" ); + m_Shader20 = false; + } + else + { + dwVertexProcessing = D3DCREATE_HARDWARE_VERTEXPROCESSING; + g_Log->Info( "DX: Hardware vertex processing" ); + m_Shader20 = true; + + } + } + else + { + dwVertexProcessing = D3DCREATE_SOFTWARE_VERTEXPROCESSING; + g_Log->Info( "DX: Software vertex processing" ); + m_Shader20 = false; + } + + HRESULT devresult = m_pDirect3DInstance->CreateDevice( m_bFullScreen ? GetAdapterOrdinal() : D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, (gl_hFocusWindow == NULL) ? m_WindowHandle : gl_hFocusWindow, D3DCREATE_FPU_PRESERVE | dwVertexProcessing, &m_PresentationParams, &m_pDevice); +/* UINT adapterid = 0; + for (adapterid = 0; adapterid < m_pDirect3D->GetAdapterCount(); ++adapterid) + { + D3DADAPTER_IDENTIFIER9 adapterid9; + m_pDirect3D->GetAdapterIdentifier(adapterid, 0, &adapterid9); + if (strstr(adapterid9.Description, "PerfHUD") != 0) + break; + } + HRESULT devresult = m_pDirect3D->CreateDevice( adapterid, D3DDEVTYPE_REF, m_WindowHandle, D3DCREATE_FPU_PRESERVE | dwVertexProcessing, &m_PresentationParams, &m_pDevice);*/ + if(devresult != D3D_OK ) + { + g_Log->Error( "Failed to create Direct3D 9 device" ); + switch (devresult) + { + case D3DERR_DEVICELOST: + g_Log->Info( "CreateDevice returned D3DERR_DEVICELOST" ); + break; + case D3DERR_INVALIDCALL: + g_Log->Info( "CreateDevice returned D3DERR_INVALIDCALL" ); + break; + case D3DERR_NOTAVAILABLE: + g_Log->Info( "CreateDevice returned D3DERR_NOTAVAILABLE" ); + break; + case D3DERR_OUTOFVIDEOMEMORY: + g_Log->Info( "CreateDevice returned D3DERR_OUTOFVIDEOMEMORY" ); + break; + default: + g_Log->Info( "CreateDevice returned %X", devresult ); + break; + }; + return false; + } + if (gl_hFocusWindow == NULL && m_bFullScreen == true) + { + g_Log->Info( "gl_hFocusWindow = m_WindowHandle" ); + gl_hFocusWindow = m_WindowHandle; + } + return true; +} + + +/* + createwindow(). + Creates a new window, _w * _h in size, optionally fullscreen. +*/ +HWND CDisplayDX::createwindow( uint32 _w, uint32 _h, const bool _bFullscreen ) +{ + m_bFullScreen = _bFullscreen; + HMODULE hInstance = GetModuleHandle(NULL); + + EnumMonitors(); + + WNDCLASS wndclass = {0}; + RECT windowRect; + SetRect( &windowRect, 0, 0, _w, _h ); + g_Log->Info( "CDisplayDX::createwindow x=%u y=%u w=%u h=%u", 0, 0, _w, _h); + wndclass.style = CS_HREDRAW | CS_VREDRAW; + wndclass.lpfnWndProc = (WNDPROC)CDisplayDX::wndProc; + wndclass.cbClsExtra = 0; + wndclass.cbWndExtra = 0; + wndclass.hInstance = hInstance; + wndclass.hIcon = LoadIcon (GetModuleHandle(NULL), MAKEINTRESOURCE(1)); + wndclass.hCursor = NULL;//LoadCursor (NULL, IDC_ARROW); + wndclass.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH); + wndclass.lpszMenuName = NULL; + wndclass.lpszClassName = L"ElectricsheepWndClass"; + + static bool wndclassAlreadyRegistered = false; + if( wndclassAlreadyRegistered == false && !RegisterClass (&wndclass) ) + { + return 0; + } + wndclassAlreadyRegistered = true; + + /*if( _bFullscreen ) + { + DEVMODE dmScreenSettings; + memset(&dmScreenSettings, 0, sizeof(dmScreenSettings)); + dmScreenSettings.dmSize = sizeof(dmScreenSettings); + dmScreenSettings.dmPelsWidth = _w; + dmScreenSettings.dmPelsHeight = _h; + dmScreenSettings.dmBitsPerPel = 32; + dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; + + if( ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL ) + OutputDebugString("Failed to change display settings"); + }*/ + + unsigned long exStyle; + unsigned long style; + if( _bFullscreen ) + { + exStyle = WS_EX_APPWINDOW | WS_EX_TOPMOST; + style = WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; + } + else + { + exStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; + style = WS_OVERLAPPEDWINDOW | + WS_CLIPSIBLINGS | WS_CLIPCHILDREN; + } + + AdjustWindowRectEx( &windowRect, style, false, exStyle ); + int ww = windowRect.right - windowRect.left; + int hh = windowRect.bottom - windowRect.top; + int xx = 0; + int yy = 0; + g_Log->Info( "CDisplayDX::createwindow AdjustWindowRectEx x=%u y=%u w=%u h=%u", 0, 0, ww, hh); + MONITORINFO monitorInfo; + + for( DWORD iMonitor = 0; iMonitor < m_dwNumMonitors; iMonitor++ ) + { + if (iMonitor == m_DesiredScreenID && _bFullscreen) + { + MonitorInfo *pMonitorInfo = &m_Monitors[iMonitor]; + monitorInfo.cbSize = sizeof(MONITORINFO); + GetMonitorInfo( pMonitorInfo->hMonitor, &monitorInfo ); + pMonitorInfo->rcScreen = monitorInfo.rcMonitor; + //SetWindowPos( hWnd, HWND_TOPMOST, monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.top, monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top, SWP_NOACTIVATE ); + xx = monitorInfo.rcMonitor.left; + yy = monitorInfo.rcMonitor.top; + ww = monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left; + hh = monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top; + g_Log->Info( "CDisplayDX::createwindow SetWindowPos x=%u y=%u w=%u h=%u", monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.top, monitorInfo.rcMonitor.right - monitorInfo.rcMonitor.left, monitorInfo.rcMonitor.bottom - monitorInfo.rcMonitor.top); + } + } + + HWND hWnd = CreateWindowEx( exStyle, L"ElectricsheepWndClass", L"Electricsheep", style, xx, yy, ww, hh, NULL, NULL, hInstance, NULL ); + BlankUnusedMonitors(wndclass, hWnd, hInstance); + return hWnd; +} + +/* + Initialize(). + We already have a window from the screensaver, so store it and pass along all 0's to initialize + a child window. +*/ +bool CDisplayDX::Initialize( HWND _hWnd, bool _bPreview ) +{ + m_bScreensaver = true; + m_bPreview = _bPreview; + m_WindowHandle = _hWnd; + + HMODULE hInstance = GetModuleHandle( NULL ); + + WNDCLASS wc = {0}; + + wc.style = CS_VREDRAW | CS_HREDRAW; + wc.lpfnWndProc = (WNDPROC)CDisplayDX::wndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hIcon = LoadIcon (GetModuleHandle(NULL), MAKEINTRESOURCE(1)); + wc.hCursor = NULL; + wc.hbrBackground = NULL; + wc.lpszMenuName = NULL; + wc.lpszClassName = L"ElectricsheepWndClass"; + RegisterClass( &wc ); + + if( _bPreview ) + { + g_bPreview = true; + + RECT rc; + //GetWindowRect( _hWnd, &rc ); + GetClientRect( _hWnd, &rc ); + int32 cx = rc.right - rc.left; + int32 cy = rc.bottom - rc.top; + + g_Log->Info( "rc: %d, %d", cx, cy ); + + DWORD dwStyle = WS_VISIBLE | WS_CHILD; + AdjustWindowRect( &rc, dwStyle, FALSE ); + m_WindowHandle = CreateWindow( L"ElectricsheepWndClass", L"Preview", dwStyle, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, _hWnd, NULL, hInstance, NULL ); + g_Log->Info( "CDisplayDX::Initialize x=%u y=%u w=%u h=%u", rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top); + if( m_WindowHandle == NULL ) + { + g_Log->Error( "CDisplayDX::Initialize unable to create window for preview" ); + //ThrowStr( "Unable to create window..." ); + return false; + } + + m_Width = cx; + m_Height = cy; + + g_Log->Info( "Screensaver preview (%dx%d)", cx, cy ); + + // In preview mode, "pause" (enter a limited message loop) briefly before proceeding, so the display control panel knows to update itself. + m_bWaitForInputIdle = true; + + // Post a message to mark the end of the initial group of window messages + PostMessage( m_WindowHandle, WM_USER, 0, 0 ); + + InvalidateRect( GetParent( _hWnd ), NULL, FALSE ); // Invalidate the hwnd so it gets drawn + UpdateWindow( GetParent( _hWnd ) ); + UpdateWindow( GetParent( _hWnd ) ); + + MSG msg; + while( m_bWaitForInputIdle ) + { + // If GetMessage returns FALSE, it's quitting time. + if( !GetMessage( &msg, m_WindowHandle, 0, 0 ) ) + { + // Post the quit message to handle it later + PostQuitMessage(0); + break; + } + + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } + + if( !InitDX9() ) + return false; + + //ShowWindow( _hWnd, SW_SHOW ); + //SetForegroundWindow( _hWnd ); + SetFocus( _hWnd ); + ShowCursor( true ); + } + else + { +// int32 cx = GetSystemMetrics( SM_CXSCREEN ); +// int32 cy = GetSystemMetrics( SM_CYSCREEN ); + RECT rc; + GetWindowRect( _hWnd, &rc ); + m_Width = rc.right - rc.left; + m_Height = rc.bottom - rc.top; + g_Log->Info( "CDisplayDX::Initialize right=%u left=%u bottom=%u top=%u", rc.right, rc.left, rc.bottom, rc.top); + //DWORD exstyle = 0;//WS_EX_TOPMOST; + //DWORD style = WS_CHILD | WS_VISIBLE; + + m_WindowHandle = _hWnd;//CreateWindowEx( exstyle, "Electricsheep", "Saver", style, 0, 0, cx, cy, _hWnd, NULL, hInstance, NULL ); + if( m_WindowHandle == NULL ) + { + g_Log->Error( "CDisplayDX::Initialize unable to create window from _hWnd" ); + return false; + } + + g_Log->Info( "Screensaver (%dx%d)", m_Width, m_Height ); + + // Hide cursor. + ShowCursor( false ); + + if( !InitDX9() ) + return false; + } + + return true; +} + + //w = GetSystemMetrics( SM_CXVIRTUALSCREEN ); + //h = GetSystemMetrics( SM_CYVIRTUALSCREEN ); +/* SetWindowPos( m_WindowHandle, HWND_TOPMOST, + GetSystemMetrics( SM_XVIRTUALSCREEN ), + GetSystemMetrics( SM_YVIRTUALSCREEN ), + GetSystemMetrics( SM_CXVIRTUALSCREEN ), + GetSystemMetrics( SM_CYVIRTUALSCREEN ), SWP_SHOWWINDOW );*/ + + +/* + Initialize(). + +*/ +HWND CDisplayDX::Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ) +{ + m_WindowHandle = createwindow( _width, _height, _bFullscreen ); + if( m_WindowHandle == 0 ) + { + g_Log->Error( "CDisplayDX::Initialize createwindow returned 0" ); + return 0; + } + + // Show or Hide cursor. + ShowCursor( !_bFullscreen ); + + // Get window dimensions. + RECT rect; + GetClientRect( m_WindowHandle, &rect ); + m_Width = rect.right - rect.left; + m_Height = rect.bottom - rect.top; + + ShowWindow( m_WindowHandle, SW_SHOW ); + if (gl_hFocusWindow == NULL) + { + SetForegroundWindow( m_WindowHandle ); + SetFocus( m_WindowHandle ); + } + + if( !InitDX9() ) + return false; + + return m_WindowHandle; +} + +// +void CDisplayDX::Title( const std::string &_title ) +{ + SetWindowTextA( m_WindowHandle, _title.c_str() ); +} + +// +void CDisplayDX::Update() +{ + MSG msg; + + /*if( m_bPreview ) + { + g_Log->Info( "Invalidating" ); + InvalidateRect( m_WindowHandle, NULL, FALSE ); // Invalidate the hwnd so it gets drawn + UpdateWindow( m_WindowHandle ); + }*/ + + while( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) ) + { + if( GetMessage( &msg, NULL, 0, 0) <= 0 ) // error or WM_QUIT + { + m_bClosed = true; + return; + } + + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } +} + +/* +*/ +void CDisplayDX::SwapBuffers() +{ +} + + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/DisplayDX.h electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/DisplayDX.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/DisplayDX.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/DisplayDX.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,104 @@ +#ifndef _DISPLAYDX__H_ +#define _DISPLAYDX__H_ + +#ifdef WIN32 + +#include +#include + +#include "DisplayOutput.h" + +namespace DisplayOutput +{ + +#define MAX_DISPLAYS 9 +#define NO_ADAPTER 0xffffffff +#define NO_MONITOR 0xffffffff + +// Structure for holding information about a monitor. +struct MonitorInfo +{ + TCHAR strDeviceName[ 128 ]; + TCHAR strMonitorName[ 128 ]; + HMONITOR hMonitor; + RECT rcScreen; + DWORD iAdapter; // Which D3DAdapterInfo corresponds to this monitor + HWND hWnd; + + // Error message state + FLOAT xError; + FLOAT yError; + FLOAT widthError; + FLOAT heightError; + FLOAT xVelError; + FLOAT yVelError; +}; + + +/* + CDisplayDX. + Windows DirectX output. +*/ +class CDisplayDX : public CDisplayOutput +{ + bool m_BlankUnused; + bool m_Shader20; + D3DPRESENT_PARAMETERS m_PresentationParams; + IDirect3DDevice9 *m_pDevice; + + HWND m_WindowHandle; + uint32 m_DesiredScreenID; + + IDirect3D9 *m_pDirect3DInstance; + + void EnumMonitors(); + HWND createwindow( uint32 _w, uint32 _h, const bool _bFullscreen ); + MonitorInfo m_Monitors[ MAX_DISPLAYS ]; + DWORD m_dwNumMonitors; + + // Only valid when running as a screensaver. + bool m_bScreensaver; + bool m_bPreview; + + bool m_bFullscreenSwitch; + bool m_bStartedFullscreen; + + bool InitDX9(); + + public: + CDisplayDX(bool _blank, IDirect3D9 *_pIDirect3D9); + virtual ~CDisplayDX(); + + virtual DWORD GetNumMonitors() { return m_dwNumMonitors; } + void BlankUnusedMonitors(WNDCLASS &wnd, HWND hWnd, HINSTANCE hInstance); + + static LRESULT CALLBACK wndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); + + static char *Description() { return "Windows DirectX display"; }; + virtual HWND Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ); + + UINT GetAdapterOrdinal(); + HWND WindowHandle( void ) { return m_WindowHandle; }; + IDirect3DDevice9 *Device() { return m_pDevice; }; + D3DPRESENT_PARAMETERS PresentParameters() { return m_PresentationParams; }; + + void SetScreen( const uint32 _screen ) { m_DesiredScreenID = _screen; }; + + // This is used when running as a screensaver, where the hwnd might already be provided. + virtual bool Initialize( HWND _hWnd, bool _bPreview ); + + // + virtual void Title( const std::string &_title ); + virtual void Update(); + + virtual bool HasShaders() { return m_Shader20; }; + void SwapBuffers(); +}; + +MakeSmartPointers( CDisplayDX ); + +}; + +#endif + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/FontDX.cpp electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/FontDX.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/FontDX.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/FontDX.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,79 @@ +#include +#include +#include + +#include "base.h" +#include "FontDX.h" +#include "Log.h" +#include "RendererDX.h" + +namespace DisplayOutput +{ + +/* + CFontDX(). + +*/ +CFontDX::CFontDX( IDirect3DDevice9 *_pDevice ) : CBaseFont(), m_pDXFont( NULL ), m_pDevice( _pDevice ) +{ +} + + +/* + ~CFontDX(). + +*/ +CFontDX::~CFontDX() +{ + ASSERT( m_pDXFont ); + SAFE_RELEASE( m_pDXFont ); +} + +/* +*/ +bool CFontDX::Create() +{ + ASSERT( m_pDXFont == NULL ); + + uint32 fontFlags = 0; + switch( m_FontDescription.Style() ) + { + case CFontDescription::Thin: fontFlags |= FW_THIN; break; + case CFontDescription::Light: fontFlags |= FW_LIGHT; break; + case CFontDescription::Normal: fontFlags |= FW_NORMAL; break; + case CFontDescription::Bold: fontFlags |= FW_BOLD; break; + case CFontDescription::UberBold: fontFlags |= FW_EXTRABOLD; break; + } + + uint32 height = m_FontDescription.Height(); + //HDC hdc = GetDC(NULL); + //if (hdc != NULL) + //{ + // height = -MulDiv(m_FontDescription.Height(), GetDeviceCaps(hdc ,LOGPIXELSY), 72); + // ReleaseDC(NULL, hdc); + // height = -MulDiv(m_FontDescription.Height(), 72, 72) - 1; + //} + //else + //{ + // height = -MulDiv(m_FontDescription.Height(), 72, 72) - 1; + //} + HRESULT hr = g_DLLFun->D3DXCreateFontA_fun( m_pDevice, + height, 0, + fontFlags, 0, + m_FontDescription.Italic(), + DEFAULT_CHARSET, + OUT_DEFAULT_PRECIS, + m_FontDescription.AntiAliased() ? ANTIALIASED_QUALITY : NONANTIALIASED_QUALITY, + DEFAULT_PITCH|FF_DONTCARE, + m_FontDescription.TypeFace().c_str(), + &m_pDXFont ); + + if( FAILED(hr ) ) + ThrowStr( "D3DXCreateFont() failed!" ); + + ASSERT( m_pDXFont ); + + return( true ); +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/FontDX.h electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/FontDX.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/FontDX.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/FontDX.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,39 @@ +/* + FONTDX9.H + Author: Stef. + + DX9 Font. +*/ +#ifndef _FONTDX_H_ +#define _FONTDX_H_ + +#include "base.h" +#include "SmartPtr.h" +#include "Font.h" + +namespace DisplayOutput +{ + +/* + CFontDX. + +*/ +class CFontDX : public CBaseFont +{ + IDirect3DDevice9 *m_pDevice; + ID3DXFont *m_pDXFont; + + public: + CFontDX( IDirect3DDevice9 *_pDevice ); + virtual ~CFontDX(); + + bool Create(); + + ID3DXFont *GetDXFont( void ) { return( m_pDXFont ); }; +}; + +MakeSmartPointers( CFontDX ); + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/RendererDX.cpp electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/RendererDX.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/RendererDX.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/RendererDX.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,643 @@ +#include + +#include "DisplayDX.h" +#include "RendererDX.h" +#include "TextureFlatDX.h" +#include "ShaderDX.h" +#include "FontDX.h" +#include "Matrix.h" + +namespace DisplayOutput +{ + +/* + GetBlendConstant(). + +*/ +const int32 GetBlendConstant( const int32 _src ) +{ + static int32 formatLut[] = + { + D3DBLEND_ZERO, + D3DBLEND_ONE, + D3DBLEND_SRCCOLOR, + D3DBLEND_INVSRCCOLOR, + D3DBLEND_DESTCOLOR, + D3DBLEND_INVDESTCOLOR, + D3DBLEND_SRCALPHA, + D3DBLEND_INVSRCALPHA, + D3DBLEND_DESTALPHA, + D3DBLEND_INVDESTALPHA, + D3DBLEND_SRCALPHASAT, + }; + + return( formatLut[ _src ] ); +} + +/* + GetBlendMode(). + +*/ +const int32 GetBlendMode( const int32 _src ) +{ + static int32 formatLut[] = + { + D3DBLENDOP_ADD, + D3DBLENDOP_SUBTRACT, + D3DBLENDOP_REVSUBTRACT, + D3DBLENDOP_MIN, + D3DBLENDOP_MAX, + }; + + return( formatLut[ _src ] ); +} + + + +/* +*/ +CRendererDX::CRendererDX() : CRenderer(), m_pDevice(NULL), m_pSprite(NULL) +{ +} + +/* +*/ +CRendererDX::~CRendererDX() +{ + for (size_t ii = 0; ii < m_Fonts.size(); ++ii) + { + SAFE_RELEASE(m_Fonts[ii]); + } + SAFE_RELEASE( m_pSprite ); + Reset( DisplayOutput::eEverything ); + Apply(); + SAFE_RELEASE( m_pDevice ); +} + +/* +*/ +bool CRendererDX::Initialize( spCDisplayOutput _spDisplay ) +{ + if( !CRenderer::Initialize( _spDisplay ) ) + return false; + + if (g_DLLFun->Init() == false) + return false; + + spCDisplayDX spDisplay = (spCDisplayDX)_spDisplay; + + m_WindowHandle = spDisplay->WindowHandle(); + + m_pDevice = spDisplay->Device(); + + m_PresentationParams = spDisplay->PresentParameters(); + + D3DVIEWPORT9 vp = { 0, 0, _spDisplay->Width(), _spDisplay->Height(), 0.0f, 1.0f }; + m_pDevice->SetViewport( &vp ); + +// D3DXCreateLine( m_pDevice, &m_pLine ); + + // Create sprite object for batched rendering. + HRESULT hr = g_DLLFun->D3DXCreateSprite_fun( m_pDevice, &m_pSprite ); + if( FAILED(hr) ) + { + g_Log->Error( "D3DCreateSprite() failed!" ); + return false; + } + + m_spSoftCorner = NULL; + + Defaults(); + + return true; +} + +void CRendererDX::Defaults() +{ + g_Log->Info( "CRendererDX::Defaults()" ); + + m_pDevice->SetRenderState( D3DRS_ZENABLE, FALSE ); + m_pDevice->SetRenderState( D3DRS_ZWRITEENABLE, FALSE ); + m_pDevice->SetRenderState( D3DRS_LIGHTING, FALSE ); + m_pDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE ); + m_pDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); + m_pDevice->SetRenderState(D3DRS_ALPHAREF, (DWORD)8); + + m_pDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE ); + m_pDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); + m_pDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); + + m_pDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_MODULATE ); + m_pDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE ); + m_pDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE ); + m_pDevice->SetTextureStageState( 0, D3DTSS_TEXCOORDINDEX, 0 ); + m_pDevice->SetTextureStageState( 0, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE ); + + m_pDevice->SetTextureStageState( 1, D3DTSS_ALPHAOP, D3DTOP_DISABLE ); + m_pDevice->SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DISABLE ); + + m_pDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR ); + m_pDevice->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR ); + m_pDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR ); + + m_pDevice->SetSamplerState( 1, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR ); + m_pDevice->SetSamplerState( 1, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR ); + m_pDevice->SetSamplerState( 1, D3DSAMP_MINFILTER, D3DTEXF_LINEAR ); + + m_pDevice->SetSamplerState( 2, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR ); + m_pDevice->SetSamplerState( 2, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR ); + m_pDevice->SetSamplerState( 2, D3DSAMP_MINFILTER, D3DTEXF_LINEAR ); + + m_pDevice->SetSamplerState( 3, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR ); + m_pDevice->SetSamplerState( 3, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR ); + m_pDevice->SetSamplerState( 3, D3DSAMP_MINFILTER, D3DTEXF_LINEAR ); +} + +bool CRendererDX::TestResetDevice() +{ + HRESULT devicestate = m_pDevice->TestCooperativeLevel(); + if (devicestate == D3DERR_DEVICELOST) + { + Sleep(100); + return true; + } + else + if (devicestate == D3DERR_DEVICENOTRESET) + { + m_pSprite->OnLostDevice(); + for (size_t i = 0; i < m_Fonts.size(); ++i) + { + m_Fonts[i]->OnLostDevice(); + } + HRESULT hr = m_pDevice->Reset(&m_PresentationParams); + if (hr == D3D_OK) + { + m_pSprite->OnResetDevice(); + for (size_t i = 0; i < m_Fonts.size(); ++i) + { + m_Fonts[i]->OnResetDevice(); + } + Defaults(); + Reset( DisplayOutput::eEverything ); + Apply(); + } else + { + switch (hr) + { + case D3DERR_DEVICELOST: + g_Log->Error("Device reset: D3DERR_DEVICELOST"); + break; + case D3DERR_DEVICEREMOVED: + g_Log->Error("Device reset: D3DERR_DEVICEREMOVED"); + break; + case D3DERR_DRIVERINTERNALERROR: + g_Log->Error("Device reset: D3DERR_DRIVERINTERNALERROR"); + break; + case D3DERR_OUTOFVIDEOMEMORY: + g_Log->Error("Device reset: D3DERR_OUTOFVIDEOMEMORY"); + break; + default: + g_Log->Error("Device reset: %u", hr); + break; + } + } + } + return false; +} +/* +*/ +bool CRendererDX::BeginFrame( void ) +{ + if( !CRenderer::BeginFrame() ) + return false; + + if (TestResetDevice()) + return false; + + m_pDevice->Clear(0, NULL, D3DCLEAR_TARGET, 0, 0., 0); + + if(FAILED(m_pDevice->BeginScene())) + { + return false; + } + + return true; +} + +/* +*/ +bool CRendererDX::EndFrame( bool drawn = true ) +{ + if( !CRenderer::EndFrame() ) + return false; + + if (TestResetDevice()) + return false; + + m_pDevice->EndScene(); + //IDirect3DSwapChain9 *swapchain = NULL; + //if SUCCEEDED(m_pDevice->GetSwapChain(0, &swapchain)) + //{ + // if (swapchain->Present(NULL, NULL, NULL, NULL, D3DPRESENT_DONOTWAIT) == D3DERR_WASSTILLDRAWING) + // { + // return false; + // } + // swapchain->Release(); + //} + + m_pDevice->Present( NULL, NULL, NULL, NULL ); + + return true; +} + +/* +*/ +void CRendererDX::Apply() +{ + // Update world transformation. + if( isBit( m_bDirtyMatrices, eWorld ) ) + { + m_pDevice->SetTransform( D3DTS_WORLD, (D3DMATRIX *) (const fp4 *)m_WorldMat.m_Mat ); + remBit( m_bDirtyMatrices, eWorld ); + } + + // Update view transformation. + if( isBit( m_bDirtyMatrices, eView ) ) + { + m_pDevice->SetTransform( D3DTS_VIEW, (D3DMATRIX *) (const fp4 *)m_ViewMat.m_Mat ); + remBit( m_bDirtyMatrices, eView ); + } + + // Update projection transformation. + if( isBit( m_bDirtyMatrices, eProjection ) ) + { + m_pDevice->SetTransform( D3DTS_PROJECTION, (D3DMATRIX *) (const fp4 *)m_ProjMat.m_Mat ); + remBit( m_bDirtyMatrices, eProjection ); + } + + // Blend state. Suboptimal! + if( m_spActiveBlend != m_spSelectedBlend ) + { + m_spActiveBlend = m_spSelectedBlend; + + m_pDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, m_spActiveBlend->m_bEnabled ); + m_pDevice->SetRenderState( D3DRS_SRCBLEND, GetBlendConstant( m_spActiveBlend->m_Src ) ); + m_pDevice->SetRenderState( D3DRS_DESTBLEND, GetBlendConstant( m_spActiveBlend->m_Dst ) ); + m_pDevice->SetRenderState( D3DRS_BLENDOP, GetBlendMode( m_spActiveBlend->m_Mode ) ); + } + + CRenderer::Apply(); +} + +/* +*/ +void CRendererDX::Reset( const uint32 _flags ) +{ + CRenderer::Reset( _flags ); +} + + +/* +*/ +spCTextureFlat CRendererDX::NewTextureFlat( spCImage _spImage, const uint32 _flags ) +{ + spCTextureFlat spTex = new CTextureFlatDX( m_pDevice, _flags ); + spTex->Upload( _spImage ); + return spTex; +} + +/* +*/ +spCTextureFlat CRendererDX::NewTextureFlat( const uint32 _flags ) +{ + spCTextureFlat spTex = new CTextureFlatDX( m_pDevice, _flags ); + return spTex; +} + +/* +*/ +spCShader CRendererDX::NewShader( const char *_pVertexShader, const char *_pFragmentShader ) +{ + spCShader spShader = new CShaderDX( m_pDevice, fp4(m_spDisplay->Width()), fp4(m_spDisplay->Height()) ); + if( !spShader->Build( _pVertexShader, _pFragmentShader ) ) + return NULL; + + if( m_spActiveShader != NULL ) + m_spActiveShader->Bind(); + + return spShader; +} + +/* +*/ +spCBaseFont CRendererDX::NewFont( CFontDescription &_desc ) +{ + CBaseFont *pFont = new CFontDX( m_pDevice ); + pFont->FontDescription( _desc ); + pFont->Create(); + ID3DXFont *font = ((CFontDX *) pFont)->GetDXFont(); + font->AddRef(); + m_Fonts.push_back(font); + return pFont; +} + +/* +*/ +void CRendererDX::Text( spCBaseFont _spFont, const std::string &_text, const Base::Math::CVector4 &_color, const Base::Math::CRect &_rect, uint32 _flags ) +{ + ASSERT( _text != "" ); + + if( _spFont == NULL ) + return; + + const fp4 w05 = (fp4)m_spDisplay->Width() * 0.5f; + const fp4 h05 = (fp4)m_spDisplay->Height() * 0.5f; + Base::Math::CRect _r( lerpMacro( -w05, w05, _rect.m_X0 ), lerpMacro( -h05, h05, _rect.m_Y0 ), lerpMacro( -w05, w05, _rect.m_X1 ), lerpMacro( -h05, h05, _rect.m_Y1 ) ); + + RECT r = { (LONG)_r.m_X0, (LONG)_r.m_Y0, (LONG)_r.m_X1, (LONG)_r.m_Y1, }; + + DWORD d3dFlags = DT_NOCLIP; + + if( _flags & CBaseFont::Bottom ) d3dFlags |= DT_BOTTOM; // bug if CBaseFont::Bottom == 0 because of check _flag & 0 != 0 + if( _flags & CBaseFont::Top ) d3dFlags |= DT_TOP; + if( _flags & CBaseFont::Center ) d3dFlags |= DT_CENTER; + if( _flags & CBaseFont::Left ) d3dFlags |= DT_LEFT; + if( _flags & CBaseFont::Right ) d3dFlags |= DT_RIGHT; + if( _flags & CBaseFont::VCenter ) d3dFlags |= DT_VCENTER; + if( _flags & CBaseFont::NoClip ) d3dFlags |= DT_NOCLIP; + if( _flags & CBaseFont::ExpandTabs ) d3dFlags |= DT_EXPANDTABS; + if( _flags & CBaseFont::WordBreak ) d3dFlags |= DT_WORDBREAK; + + DWORD d3dColor = D3DCOLOR_COLORVALUE( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + spCFontDX spDXFont = _spFont; + ID3DXFont *pDXFont = spDXFont->GetDXFont(); + ASSERT( pDXFont ); + + m_pSprite->Begin( D3DXSPRITE_ALPHABLEND | D3DXSPRITE_SORT_TEXTURE | D3DXSPRITE_OBJECTSPACE | D3DXSPRITE_DO_NOT_ADDREF_TEXTURE ); + pDXFont->DrawTextA( m_pSprite, (const char *)_text.c_str(), -1, &r, d3dFlags, d3dColor ); + m_pSprite->End(); +} + +/* +*/ +Base::Math::CVector2 CRendererDX::GetTextExtent( spCBaseFont _spFont, const std::string &_text ) +{ + ASSERT( _text != "" ); + + Base::Math::CVector2 result; + + if( _spFont == NULL ) + return result; + + uint32 width = 0; + uint32 height = 0; + + fp4 dispWidth = (fp4)m_spDisplay->Width(); + fp4 dispHeight = (fp4)m_spDisplay->Height(); + + spCFontDX spDXFont = _spFont; + ID3DXFont *pDXFont = spDXFont->GetDXFont(); + ASSERT( pDXFont ); + + // Make a copy of `text' and extend it by `.'. + size_t textLength = _text.length(); + ASSERT( textLength < 2048 ); + + static char pTmp[ 2048 ]; + strcpy( pTmp, (const char *)_text.c_str() ); + pTmp[ textLength ] = '.'; + pTmp[ textLength + 1 ] = '\0'; + + // Determine extents of `.'. + RECT dotRect = { 0, 0, 0, 0 }; + int32 h = pDXFont->DrawTextA( NULL, ".", -1, &dotRect, DT_LEFT | DT_NOCLIP | DT_CALCRECT, 0 ); + int32 dotWidth = dotRect.right - dotRect.left; + + RECT rect = { 0, 0, 0, 0 }; + h = pDXFont->DrawTextA( NULL, pTmp, -1, &rect, DT_LEFT | DT_NOCLIP | DT_CALCRECT, 0 ); + + width = rect.right - rect.left - dotWidth; + height = rect.bottom - rect.top; + + result = Base::Math::CVector2( (fp4(width) / dispWidth), (fp4(height) / dispHeight) ); + + return( result ); +} + + +/* + DrawRect(). + +*/ +void CRendererDX::DrawRect( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const fp4 _width ) +{ +/* ASSERT( m_pLine != NULL ); + + D3DXVECTOR2 aVertices[] = { D3DXVECTOR2( _rect.m_X0, _rect.m_Y0 ), + D3DXVECTOR2( _rect.m_X1, _rect.m_Y0 ), + D3DXVECTOR2( _rect.m_X1, _rect.m_Y1 ), + D3DXVECTOR2( _rect.m_X0, _rect.m_Y1 ), + D3DXVECTOR2( _rect.m_X0, _rect.m_Y0 ) }; + + DWORD rgba = D3DCOLOR_COLORVALUE( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + m_pLine->SetWidth( _width ); + m_pLine->Draw( aVertices, sizeof(aVertices) / sizeof(aVertices[0]), rgba );*/ +} + +/* + DrawQuad(). + +*/ +void CRendererDX::DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color ) +{ + m_pDevice->SetFVF( D3DFVF_XYZ | D3DFVF_DIFFUSE ); + + const fp4 w05 = (fp4)m_spDisplay->Width() * 0.5f; + const fp4 h05 = (fp4)m_spDisplay->Height() * 0.5f; + Base::Math::CRect r( lerpMacro( -w05, w05, _rect.m_X0 ), lerpMacro( -h05, h05, _rect.m_Y0 ), lerpMacro( -w05, w05, _rect.m_X1 ), lerpMacro( -h05, h05, _rect.m_Y1 ) ); + + DWORD rgba = D3DCOLOR_COLORVALUE( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + struct Q { + D3DXVECTOR3 vertex; + uint32 color; + }; + + Q qv[4]; + + qv[0].vertex = D3DXVECTOR3( r.m_X0, r.m_Y0, 0 ); + qv[1].vertex = D3DXVECTOR3( r.m_X1, r.m_Y0, 0 ); + qv[2].vertex = D3DXVECTOR3( r.m_X1, r.m_Y1, 0 ); + qv[3].vertex = D3DXVECTOR3( r.m_X0, r.m_Y1, 0 ); + qv[0].color = rgba; + qv[1].color = rgba; + qv[2].color = rgba; + qv[3].color = rgba; + + if(!SUCCEEDED(m_pDevice->DrawPrimitiveUP( D3DPT_TRIANGLEFAN, 2, qv, sizeof(Q) ))) { + g_Log->Error("DrawPrimitiveUP failed"); + } +} + +/* +*/ +void CRendererDX::DrawSoftQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const fp4 _width ) +{ + if( m_spSoftCorner == NULL ) + { + DisplayOutput::spCImage tmpImage = new DisplayOutput::CImage(); + tmpImage->Create( 32, 32, DisplayOutput::eImage_RGBA8 ); + + for( uint32 y=0; y<32; y++) + for( uint32 x=0; x<32; x++ ) + { + fp4 c = Base::Math::saturate(1.0f - powf( Base::Math::Sqrt( fp4(x*x + y*y) ) / 31.0f, 1.0f )); + tmpImage->PutPixel( x, y, c, c, c, c ); + } + + m_spSoftCorner = NewTextureFlat(); + m_spSoftCorner->Upload( tmpImage ); + } + + const fp4 w05 = (fp4)m_spDisplay->Width() * 0.5f; + const fp4 h05 = (fp4)m_spDisplay->Height() * 0.5f; + Base::Math::CRect r( lerpMacro( -w05, w05, _rect.m_X0 ), lerpMacro( -h05, h05, _rect.m_Y0 ), lerpMacro( -w05, w05, _rect.m_X1 ), lerpMacro( -h05, h05, _rect.m_Y1 ) ); + DWORD rgba = D3DCOLOR_COLORVALUE( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + struct Q { + D3DXVECTOR3 vertex; + uint32 color; + D3DXVECTOR2 tc; + Q( const fp4 _x, const fp4 _y, const fp4 _tx, const fp4 _ty, const uint32 _c ) + { + vertex = D3DXVECTOR3( _x, _y, 0 ); + tc = D3DXVECTOR2( _tx, _ty ); + color = _c; + } + }; + + fp4 x0 = r.m_X0; + fp4 y0 = r.m_Y0; + fp4 x1 = r.m_X1; + fp4 y1 = r.m_Y1; + + fp4 x0bw = r.m_X0 + _width; + fp4 y0bw = r.m_Y0 + _width; + fp4 x1bw = r.m_X1 - _width; + fp4 y1bw = r.m_Y1 - _width; + + m_pDevice->SetFVF( D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1 ); + + Q border[] = + { + Q(x0, y0bw, 1, 0,rgba), + Q(x0, y0 , 1, 1,rgba), + Q(x0bw, y0bw, 0, 0,rgba), + Q(x0bw, y0 , 0, 1,rgba), + Q(x1bw, y0bw, 0, 0,rgba), + Q(x1bw, y0 , 0, 1,rgba), + + Q(x1bw, y0 , 0, 1,rgba), + Q(x1, y0 , 1, 1,rgba), + Q(x1bw, y0bw, 0, 0,rgba), + Q(x1, y0bw, 1, 0,rgba), + Q(x1bw, y1bw, 0, 0,rgba), + Q(x1, y1bw, 1, 0,rgba), + + Q(x1, y1bw, 1, 0,rgba), + Q(x1, y1 , 1, 1,rgba), + Q(x1bw, y1bw, 0, 0,rgba), + Q(x1bw, y1 , 0, 1,rgba), + Q(x0bw, y1bw, 0, 0,rgba), + Q(x0bw, y1 , 0, 1,rgba), + + Q(x0bw, y1 , 0, 1,rgba), + Q(x0, y1 , 1, 1,rgba), + Q(x0bw, y1bw, 0, 0,rgba), + Q(x0, y1bw, 1, 0,rgba), + Q(x0bw, y0bw, 0, 0,rgba), + Q(x0, y0bw, 1, 0,rgba), + }; + + SetTexture( m_spSoftCorner, 0 ); + Apply(); + + m_pDevice->SetSamplerState( 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP ); + m_pDevice->SetSamplerState( 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP ); + + if(!SUCCEEDED(m_pDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 22, border, sizeof(Q) ))) { + g_Log->Error("DrawSoftQuad::DrawPrimitiveUP failed"); + } + + // Center + SetTexture( NULL, 0 ); + Apply(); + + fp4 wu = _width / m_spDisplay->Width(); + fp4 hu = _width / m_spDisplay->Height(); + + Base::Math::CRect r2( _rect.m_X0 + wu, _rect.m_Y0 + hu, _rect.m_X1 - wu, _rect.m_Y1 - hu ); + DrawQuad( r2, _color ); +} + + +/* + DrawQuad(). + +*/ +void CRendererDX::DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const Base::Math::CRect &_uvrect ) +{ + m_pDevice->SetFVF( D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1 ); + + const fp4 w05 = (fp4)m_spDisplay->Width() * 0.5f; + const fp4 h05 = (fp4)m_spDisplay->Height() * 0.5f; + Base::Math::CRect r( lerpMacro( -w05, w05, _rect.m_X0 ), lerpMacro( -h05, h05, _rect.m_Y0 ), lerpMacro( -w05, w05, _rect.m_X1 ), lerpMacro( -h05, h05, _rect.m_Y1 ) ); + + DWORD rgba = D3DCOLOR_COLORVALUE( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + struct Q { + D3DXVECTOR3 vertex; + uint32 color; + D3DXVECTOR2 tc; + }; + + Q qv[4]; + + qv[0].vertex = D3DXVECTOR3( r.m_X0-1.f, r.m_Y0-1.f, 0 ); + qv[1].vertex = D3DXVECTOR3( r.m_X1, r.m_Y0-1.f, 0 ); + qv[2].vertex = D3DXVECTOR3( r.m_X1, r.m_Y1, 0 ); + qv[3].vertex = D3DXVECTOR3( r.m_X0-1.f, r.m_Y1, 0 ); + qv[0].color = rgba; + qv[1].color = rgba; + qv[2].color = rgba; + qv[3].color = rgba; + qv[0].tc = D3DXVECTOR2( _uvrect.m_X0, _uvrect.m_Y0 ); + qv[1].tc = D3DXVECTOR2( _uvrect.m_X1, _uvrect.m_Y0 ); + qv[2].tc = D3DXVECTOR2( _uvrect.m_X1, _uvrect.m_Y1 ); + qv[3].tc = D3DXVECTOR2( _uvrect.m_X0, _uvrect.m_Y1 ); + + if(!SUCCEEDED(m_pDevice->DrawPrimitiveUP( D3DPT_TRIANGLEFAN, 2, qv, sizeof(Q) ))) { + g_Log->Error("DrawPrimitiveUP 2 failed"); + } +} + +/* + DrawRect(). + +*/ +void CRendererDX::DrawLine( const Base::Math::CVector2 &_start, const Base::Math::CVector2 &_end, const Base::Math::CVector4 &_color, const fp4 _width ) +{ +/* ASSERT( m_pLine != NULL ); + + D3DXVECTOR2 aVertices[] = { D3DXVECTOR2( _start.m_X, _start.m_Y ), D3DXVECTOR2( _end.m_X, _end.m_Y ) }; + + DWORD rgba = D3DCOLOR_COLORVALUE( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + m_pLine->SetWidth( _width ); + m_pLine->Draw( aVertices, sizeof(aVertices) / sizeof(aVertices[0]), rgba );*/ +} + +} + diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/RendererDX.h electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/RendererDX.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/RendererDX.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/RendererDX.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,84 @@ +#ifndef _RENDERERDX_H_ +#define _RENDERERDX_H_ + +#include +#include +#include + +#include "base.h" +#include "SmartPtr.h" +#include "Renderer.h" +#include "TextureFlat.h" +#include "Image.h" +#include "Vector4.h" +#include "../msvc/DirectX_DLL_functions.h" + +namespace DisplayOutput +{ + +/* + CRendererDX(). + +*/ +class CRendererDX : public CRenderer +{ + HWND m_WindowHandle; + D3DPRESENT_PARAMETERS m_PresentationParams; + IDirect3DDevice9 *m_pDevice; + + //ID3DXLine *m_pLine; + ID3DXSprite *m_pSprite; + + std::vector m_Fonts; + spCTextureFlat m_spSoftCorner; + + public: + CRendererDX(); + virtual ~CRendererDX(); + + IDirect3DDevice9 *Device() { return m_pDevice; }; + + virtual eRenderType Type( void ) const { return eDX9; }; + virtual const std::string Description( void ) const { return "DirectX 9"; }; + + // + bool Initialize( spCDisplayOutput _spDisplay ); + + // + void Defaults(); + + // + bool BeginFrame( void ); + bool EndFrame( bool drawn ); + + // + void Apply(); + void Reset( const uint32 _flags ); + + bool TestResetDevice(); + + // + spCTextureFlat NewTextureFlat( const uint32 flags = 0 ); + spCTextureFlat NewTextureFlat( spCImage _spImage, const uint32 flags = 0 ); + + // + spCBaseFont NewFont( CFontDescription &_desc ); + void Text( spCBaseFont _spFont, const std::string &_text, const Base::Math::CVector4 &_color, const Base::Math::CRect &_rect, uint32 _flags ); + Base::Math::CVector2 GetTextExtent( spCBaseFont _spFont, const std::string &_text ); + + // + spCShader NewShader( const char *_pVertexShader, const char *_pFragmentShader ); + + // Aux functions. + void DrawLine( const Base::Math::CVector2 &_start, const Base::Math::CVector2 &_end, const Base::Math::CVector4 &_color, const fp4 _width = 1.0f ); + void DrawRect( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const fp4 _width = 1.0f ); + void DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color ); + void DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const Base::Math::CRect &_uvRect ); + void DrawSoftQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const fp4 _width ); +}; + +MakeSmartPointers( CRendererDX ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/ShaderDX.cpp electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/ShaderDX.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/ShaderDX.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/ShaderDX.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,325 @@ +#include +#include + +#if defined(WIN32) && defined(_MSC_VER) +#include "d3dx9.h" +#include "../msvc/msvc_fix.h" +#endif +#include "Exception.h" +#include "RendererDX.h" +#include "ShaderDX.h" +#include "Matrix.h" +#include "Log.h" + +namespace DisplayOutput +{ + +/* +*/ +CShaderDX::CShaderDX( IDirect3DDevice9 *_pDevice, float _width, float _height ) : m_pDevice( _pDevice ), m_Width(_width), m_Height(_height) +{ + if (_pDevice == NULL) + g_Log->Error( "CShaderDX received device == NULL" ); + m_pVertexShader = NULL; + m_pFragmentShader = NULL; +} + +/* +*/ +CShaderDX::~CShaderDX() +{ + SAFE_RELEASE( m_pVertexShader ); + SAFE_RELEASE( m_pFragmentShader ); +} + + +/* +*/ +bool CShaderDX::Bind() +{ + m_pDevice->SetVertexShader( m_pVertexShader ); + m_pDevice->SetPixelShader( m_pFragmentShader ); + return true; +} + +/* +*/ +bool CShaderDX::Apply() +{ + std::map< std::string, spCShaderUniform >::const_iterator iter; + + if( m_pVertexShader ) + { + spCShaderUniform spUni = Uniform( "WorldViewProj" ); + if( spUni != NULL ) + { + Base::Math::CMatrix4x4 matWorld, matView, matProj, matWorldViewProj; + + matWorld.Identity(); + matView.Identity(); + matProj.OrthographicRH(m_Width, m_Height, -1.f, 1.f); + + matWorldViewProj = matWorld * matView * matProj; + + spUni->SetData( (D3DMATRIX *) (const fp4 *)matWorldViewProj.m_Mat, sizeof(D3DXMATRIX) ); + } + } + + + // Update all uniforms. + for( iter = m_Uniforms.begin(); iter != m_Uniforms.end(); ++iter ) + ((spCShaderUniform)iter->second)->Apply(); + + // Update all samplers. + for( iter = m_Samplers.begin(); iter != m_Samplers.end(); ++iter ) + ((spCShaderUniform)iter->second)->Apply(); + return true; +} + +/* +*/ +bool CShaderDX::Unbind() +{ + m_pDevice->SetVertexShader( NULL ); + m_pDevice->SetPixelShader( NULL ); + return true; +} + +/* +*/ +bool CShaderDX::Build( const char *_pVertexShader, const char *_pFragmentShader ) +{ + if( !_pVertexShader && !_pFragmentShader ) + return false; + + g_Log->Info( "CShaderDX::Build" ); + + LPD3DXBUFFER pShaderBuf = NULL; + LPD3DXBUFFER pErrorsBuf = NULL; + + if( _pVertexShader != NULL ) + { + std::string shaderString = _pVertexShader; + + const char *profile = g_DLLFun->D3DXGetVertexShaderProfile_fun( m_pDevice ); + + if( g_DLLFun->D3DXCompileShader_fun( shaderString.c_str(), (UINT)shaderString.length(), NULL, NULL, "main", profile, D3DXSHADER_SKIPVALIDATION, &pShaderBuf, &pErrorsBuf, &m_pVertexConstants ) == D3D_OK ) + { + if (FAILED(m_pDevice->CreateVertexShader( (DWORD *)pShaderBuf->GetBufferPointer(), &m_pVertexShader ))) + { + g_Log->Error( "Unable to create vertex shader" ); + if (pErrorsBuf != NULL) + g_Log->Error( "DX Error: %s", (const char *)pErrorsBuf->GetBufferPointer() ); + } + } + else + { + g_Log->Error( "Unable to compile vertex shaders" ); + if (pErrorsBuf != NULL) + g_Log->Error( "DX Error: %s", (const char *)pErrorsBuf->GetBufferPointer() ); + } + + SAFE_RELEASE( pShaderBuf ); + SAFE_RELEASE( pErrorsBuf ); + + if( !m_pVertexShader ) + return false; + } + + if( _pFragmentShader != NULL ) + { + std::string shaderString = _pFragmentShader; + + const char *profile = g_DLLFun->D3DXGetPixelShaderProfile_fun( m_pDevice ); + + if( g_DLLFun->D3DXCompileShader_fun( shaderString.c_str(), (UINT)shaderString.length(), NULL, NULL, "main", profile, D3DXSHADER_SKIPVALIDATION, &pShaderBuf, &pErrorsBuf, &m_pFragmentConstants ) == D3D_OK ) + { + if (FAILED(m_pDevice->CreatePixelShader( (DWORD *)pShaderBuf->GetBufferPointer(), &m_pFragmentShader ))) + { + g_Log->Error( "Unable to create fragment shader" ); + if (pErrorsBuf != NULL) + g_Log->Error( (const char *)pErrorsBuf->GetBufferPointer() ); + } + } else + { + g_Log->Error( "Unable to compile fragment shader" ); + if (pErrorsBuf != NULL) + g_Log->Error( (const char *)pErrorsBuf->GetBufferPointer() ); + } + + + SAFE_RELEASE( pShaderBuf ); + SAFE_RELEASE( pErrorsBuf ); + + if( !m_pFragmentShader ) + return false; + } + + D3DXCONSTANT_DESC cDesc; + + if( m_pVertexShader ) + { + D3DXCONSTANTTABLE_DESC vsDesc; + m_pVertexConstants->GetDesc( &vsDesc ); + + for( uint32 i=0; iGetConstantDesc( m_pVertexConstants->GetConstant( NULL, i ), &cDesc, &count ); + + if( cDesc.Type >= D3DXPT_SAMPLER && cDesc.Type <= D3DXPT_SAMPLERCUBE ) + { + g_Log->Error( "go vertex sample something else.." ); + return false; + } + + eUniformType eType = eUniform_Float; + + if( cDesc.Class == D3DXPC_MATRIX_COLUMNS ) + { + switch( cDesc.Type ) + { + case D3DXPT_FLOAT: eType = eUniform_Matrix4; break; + default: + g_Log->Warning( "Unknown vertex uniform type for %s -> %d", cDesc.Name, cDesc.Type ); + } + } + else + { + switch( cDesc.Type ) + { + case D3DXPT_BOOL: eType = eUniform_Boolean; break; + case D3DXPT_INT: eType = eUniform_Int; break; + case D3DXPT_FLOAT: eType = eUniform_Float; break; + default: + g_Log->Warning( "Unknown vertex uniform type for %s -> %d", cDesc.Name, cDesc.Type ); + } + } + + m_Uniforms[ cDesc.Name ] = new CShaderUniformDX( m_pDevice, cDesc.Name, eType, cDesc.RegisterIndex ); + } + } + + if( m_pFragmentShader ) + { + D3DXCONSTANTTABLE_DESC psDesc; + m_pFragmentConstants->GetDesc( &psDesc ); + + for( uint32 i=0; iGetConstantDesc( m_pFragmentConstants->GetConstant( NULL, i ), &cDesc, &count ); + + if( cDesc.Type >= D3DXPT_SAMPLER && cDesc.Type <= D3DXPT_SAMPLERCUBE ) + m_Samplers[ cDesc.Name ] = new CShaderUniformDX( m_pDevice, cDesc.Name, eUniform_Sampler, cDesc.RegisterIndex ); + else + { + // Already from vs? + spCShaderUniform spUni = Uniform( cDesc.Name ); + if( spUni != NULL ) + g_Log->Error( "code this!" ); + else + { + eUniformType eType = eUniform_Float; + + if( cDesc.Class == D3DXPC_VECTOR ) + { + switch( cDesc.Type ) + { + case D3DXPT_BOOL: eType = eUniform_Boolean; break; + case D3DXPT_INT: eType = eUniform_Int; break; + case D3DXPT_FLOAT: eType = eUniform_Float4; break; + default: + g_Log->Warning( "Unknown pixel uniform type for %s -> %d", cDesc.Name, cDesc.Type ); + } + } + else + { + switch( cDesc.Type ) + { + case D3DXPT_BOOL: eType = eUniform_Boolean; break; + case D3DXPT_INT: eType = eUniform_Int; break; + case D3DXPT_FLOAT: eType = eUniform_Float; break; + default: + g_Log->Warning( "Unknown pixel uniform type for %s -> %d", cDesc.Name, cDesc.Type ); + } + } + + m_Uniforms[ cDesc.Name ] = new CShaderUniformDX( m_pDevice, cDesc.Name, eType, cDesc.RegisterIndex ); + } + } + } + } + + return true; +} + +/* +*/ +bool CShaderUniformDX::SetData( void *_pData, const uint32 _size ) +{ + if( m_pData == NULL ) + { + m_Size = 0; + + switch( m_eType ) + { + case eUniform_Sampler: m_Size = sizeof(int32); break; + case eUniform_Float: m_Size = sizeof(fp4); break; + case eUniform_Float4: m_Size = sizeof(fp4)*4; break; + case eUniform_Int: m_Size = sizeof(int32); break; + case eUniform_Boolean: m_Size = sizeof(BOOL); break; + case eUniform_Matrix4: m_Size = sizeof(fp4)*16; break; + default: + g_Log->Warning( "Unknown uniform type" ); + return false; + break; + } + + if( m_Size != _size ) + g_Log->Warning( "hmm, uniform size != _size?"); + + m_pData = new uint8[ m_Size ]; + ZeroMemory(m_pData, m_Size); + } + + if( memcmp( m_pData, _pData, _size ) ) + { + if (m_eType == eUniform_Float) + { + memcpy(m_float4Data, _pData, sizeof(float)); + m_float4Data[1] = 0.f; + m_float4Data[2] = 0.f; + m_float4Data[3] = 0.f; + } + memcpy( m_pData, _pData, _size ); + m_bDirty = true; + } + + return true; +} + +/* +*/ +void CShaderUniformDX::Apply() +{ + if( !m_bDirty || m_pData == NULL ) + return; + + switch( m_eType ) + { +// case eUniform_Sampler: break; + case eUniform_Float: m_pDevice->SetPixelShaderConstantF( m_Index, (const float *)m_float4Data, 1); break; + case eUniform_Float4: m_pDevice->SetPixelShaderConstantF( m_Index, (const float *)m_pData, m_Size/sizeof(float)/4 ); break; + case eUniform_Int: g_Log->Warning( "eUniform_Int used in ShaderDX"); m_pDevice->SetPixelShaderConstantI( m_Index, (const int32 *)m_pData, m_Size/sizeof(int32)/4 ); break; + case eUniform_Boolean: m_pDevice->SetPixelShaderConstantB( m_Index, (const BOOL *)m_pData, m_Size/sizeof(BOOL)); break; + case eUniform_Matrix4: m_pDevice->SetVertexShaderConstantF( m_Index, (const fp4 *)m_pData, m_Size/sizeof(float)/4 ); break; + } + + // Always update everything + // Uncommenting this will break shaders after device reset and few other situations + //m_bDirty = false; +} + +} + diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/ShaderDX.h electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/ShaderDX.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/ShaderDX.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/ShaderDX.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,94 @@ +#ifndef _SHADERDX_H_ +#define _SHADERDX_H_ + +#include "Log.h" +#include "Shader.h" + +namespace DisplayOutput +{ + +class CShaderUniformDX : public CShaderUniform +{ + uint32 m_Index; + uint32 m_Size; + uint8 *m_pData; + fp4 m_float4Data[4]; + + IDirect3DDevice9 *m_pDevice; + + public: + CShaderUniformDX( IDirect3DDevice9 *_pDevice, const std::string _name, const eUniformType _eType, const uint32 _index = 0, const uint32 _size = 0 ) : + CShaderUniform( _name, _eType ), m_Index( _index ), m_pDevice( _pDevice ), m_pData(NULL) + { + std::string type; + + switch( _eType ) + { + case eUniform_Sampler: type = "Sampler"; break; + case eUniform_Float: type = "Float"; break; + case eUniform_Float2: type = "Float2"; break; + case eUniform_Float3: type = "Float2"; break; + case eUniform_Float4: type = "Float4"; break; + case eUniform_Int: type = "Int"; break; + case eUniform_Int2: type = "Int2"; break; + case eUniform_Int3: type = "Int3"; break; + case eUniform_Int4: type = "Int4"; break; + case eUniform_Boolean: type = "Boolean"; break; + case eUniform_Boolean2: type = "Boolean2"; break; + case eUniform_Boolean3: type = "Boolean2"; break; + case eUniform_Boolean4: type = "Boolean4"; break; + case eUniform_Matrix2: type = "Matrix2"; break; + case eUniform_Matrix3: type = "Matrix3"; break; + case eUniform_Matrix4: type = "Matrix4"; break; + } + + if( type.size() == 0 ) + g_Log->Warning( ("Unknown uniform " + _name).c_str() ); + else + g_Log->Info( ("Uniform '" + _name + "' (" + type + ")").c_str() ); + }; + + virtual ~CShaderUniformDX() + { + SAFE_DELETE_ARRAY( m_pData ); + }; + + virtual bool SetData( void *_pData, const uint32 _size ); + virtual void Apply(); +}; + +MakeSmartPointers( CShaderUniformDX ); + +/* + CShaderDX(). + +*/ +class CShaderDX : public CShader +{ + IDirect3DDevice9 *m_pDevice; + + IDirect3DVertexShader9 *m_pVertexShader; + IDirect3DPixelShader9 *m_pFragmentShader; + + ID3DXConstantTable *m_pVertexConstants; + ID3DXConstantTable *m_pFragmentConstants; + + float m_Width; + float m_Height; + + public: + CShaderDX( IDirect3DDevice9 *_pDevice, float _width, float _height ); + virtual ~CShaderDX(); + + virtual bool Bind( void ); + virtual bool Unbind( void ); + virtual bool Apply( void ); + + bool Build( const char *_pVertexShader, const char *_pFragmentShader ); +}; + +MakeSmartPointers( CShaderDX ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/TextureFlatDX.cpp electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/TextureFlatDX.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/TextureFlatDX.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/TextureFlatDX.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,158 @@ +#include +#include +#include + +#include "base.h" +#include "Log.h" +#include "MathBase.h" +#include "Exception.h" +#include "DisplayOutput.h" +#include "RendererDX.h" +#include "TextureFlatDX.h" + +namespace DisplayOutput +{ + +// These map 1:1 with eImageFormat in Image.h... *Keep them in sync!!!* +static const D3DFORMAT dxformats[] = +{ + D3DFMT_UNKNOWN, + + // Plain formats + D3DFMT_L8, + D3DFMT_A8L8, + D3DFMT_X8R8G8B8, + D3DFMT_A8R8G8B8, + + D3DFMT_L16, + D3DFMT_G16R16, + D3DFMT_UNKNOWN, // RGB16 not directly supported + D3DFMT_A16B16G16R16, + + D3DFMT_R16F, + D3DFMT_G16R16F, + D3DFMT_UNKNOWN, // RGB16F not directly supported + D3DFMT_A16B16G16R16F, + + D3DFMT_R32F, + D3DFMT_G32R32F, + D3DFMT_UNKNOWN, // RGB32F not directly supported + D3DFMT_A32B32G32R32F, + + // Packed formats + D3DFMT_A4R4G4B4, + D3DFMT_R5G6B5, + + // Compressed formats + D3DFMT_DXT1, + D3DFMT_DXT3, + D3DFMT_DXT5, + + // Depth formats + D3DFMT_D16, + D3DFMT_D24X8, +}; + +/* +*/ +CTextureFlatDX::CTextureFlatDX( IDirect3DDevice9 *_pDevice, const uint32 _flags ) : CTextureFlat( _flags ), m_pDevice( _pDevice ), m_pTextureDX9(NULL) +{ + if (_pDevice == NULL) + g_Log->Error( "Texture received device == NULL" ); +} + +/* +*/ +CTextureFlatDX::~CTextureFlatDX() +{ + SAFE_RELEASE( m_pTextureDX9 ); +} + +/* +*/ +bool CTextureFlatDX::Upload( spCImage _spImage ) +{ + m_spImage = _spImage; + + CImageFormat format = m_spImage->GetFormat(); + + if( m_Size.iWidth() != (int32)_spImage->GetWidth() || + m_Size.iHeight() != (int32)_spImage->GetHeight() || + m_Format != format.getFormatEnum() ) + { + // Stuff changed, nuke old texture. + SAFE_RELEASE( m_pTextureDX9 ); + } + + if( !m_pTextureDX9 ) + { + HRESULT hr = m_pDevice->CreateTexture( m_spImage->GetWidth(), m_spImage->GetHeight(), + m_spImage->GetNumMipMaps(), + 0, dxformats[ format.getFormatEnum() ], + D3DPOOL_MANAGED, &m_pTextureDX9, NULL ); + + g_Log->Info( "%s texture created", format.GetDescription().c_str() ); + + m_Size = Base::Math::CRect( fp4(m_spImage->GetWidth()), fp4(m_spImage->GetHeight()) ); + m_Format = format.getFormatEnum(); + + if( FAILED( hr ) ) + { + g_Log->Error( "Texture upload failed!" ); + return( false ); + } + } + + // Copy texturedata. + uint32 mipMapLevel = 0; + uint8 *pSrc = m_spImage->GetData( 0 ); + + while( pSrc ) + { + D3DLOCKED_RECT rect; + + HRESULT hr = m_pTextureDX9->LockRect( mipMapLevel, &rect, NULL, 0 ); + if( !FAILED(hr) ) + { + memcpy( rect.pBits, pSrc, m_spImage->getMipMappedSize( mipMapLevel, 1 ) ); + m_pTextureDX9->UnlockRect( mipMapLevel ); + } + + pSrc = m_spImage->GetData( ++mipMapLevel ); + } + + m_bDirty = true; + return true; +} + +/* +*/ +bool CTextureFlatDX::Bind( const uint32 _index ) +{ + HRESULT hr = m_pDevice->SetTexture( _index, m_pTextureDX9 ); + if( FAILED( hr ) ) + { + g_Log->Error( "Bind failed!" ); + return( false ); + } + + m_bDirty = false; + + return true; +} + +/* +*/ +bool CTextureFlatDX::Unbind( const uint32 _index ) +{ + HRESULT hr = m_pDevice->SetTexture( _index, NULL ); + if( FAILED( hr ) ) + { + g_Log->Error( "Bind failed!" ); + return( false ); + } + + return true; +} + +} diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/TextureFlatDX.h electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/TextureFlatDX.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DirectX/TextureFlatDX.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DirectX/TextureFlatDX.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,36 @@ +#ifndef _TEXTUREFLATDX_H +#define _TEXTUREFLATDX_H + +#include "TextureFlat.h" + +namespace DisplayOutput +{ + +/* + CTextureFlatDX. + +*/ +class CTextureFlatDX : public CTextureFlat +{ + IDirect3DTexture9 *m_pTextureDX9; + IDirect3DDevice9 *m_pDevice; + + // Internal to keep track if size or format changed. + DisplayOutput::eImageFormat m_Format; + + public: + Base::Math::CRect m_Size; + + CTextureFlatDX( IDirect3DDevice9 *_pDevice, const uint32 _flags = 0 ); + virtual ~CTextureFlatDX(); + + virtual bool Upload( spCImage _spImage ); + virtual bool Bind( const uint32 _index ); + virtual bool Unbind( const uint32 _index ); +}; + +MakeSmartPointers( CTextureFlatDX ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DisplayOutput.cbp electricsheep-3.0.2-git20180325/DisplayOutput/DisplayOutput.cbp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DisplayOutput.cbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DisplayOutput.cbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,235 @@ + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DisplayOutput.cpp electricsheep-3.0.2-git20180325/DisplayOutput/DisplayOutput.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DisplayOutput.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DisplayOutput.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,57 @@ +#include +#include "DisplayOutput.h" +#include "Exception.h" + + +namespace DisplayOutput +{ + +// Eventqueue to store all key, mouse & power events. +std::queue CDisplayOutput::m_EventQueue; + +/* +*/ +CDisplayOutput::CDisplayOutput() : m_XPosition(10) , m_YPosition(10), m_Width(0), m_Height(0), + m_bFullScreen(false), m_bVSync(false), m_bClosed(false) +{ +} + +/* +*/ +CDisplayOutput::~CDisplayOutput() +{ + ClearEvents(); +} + +/* +*/ +bool CDisplayOutput::GetEvent( spCEvent &_spEvent ) +{ + if( !m_EventQueue.empty() ) + { + _spEvent = m_EventQueue.front(); + m_EventQueue.pop(); + return true; + } + + return false; +} + +/* +*/ +void CDisplayOutput::ClearEvents() +{ + while( !m_EventQueue.empty() ) + m_EventQueue.pop(); +} + +/* +*/ +void CDisplayOutput::AppendEvent( spCEvent _event ) +{ + m_EventQueue.push( _event ); +} + + + +}; diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/DisplayOutput.h electricsheep-3.0.2-git20180325/DisplayOutput/DisplayOutput.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/DisplayOutput.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/DisplayOutput.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,205 @@ +#ifndef _DISPLAY_OUTPUT_H +#define _DISPLAY_OUTPUT_H + +#include +#include "base.h" +#include "SmartPtr.h" +#include "linkpool.h" +#ifdef MAC +#undef Random +#include +#endif + +namespace DisplayOutput +{ + +/* + CEvent. + Event interface. +*/ +class CEvent +{ + public: + enum eEventType + { + Event_KEY, + Event_Mouse, + Event_Power, + Event_NONE + }; + + virtual ~CEvent() {} + + virtual eEventType Type() { return( Event_NONE ); }; + + POOLED( CEvent, Memory::CLinkPool ); +}; + +MakeSmartPointers( CEvent ); + +/* + CKeyEvent. + Keyboard event. +*/ +class CKeyEvent : public CEvent +{ + public: + enum eKeyCode + { + KEY_TAB, + KEY_LALT, + KEY_MENU, + KEY_CTRL, + KEY_F, + KEY_s, + KEY_SPACE, + KEY_LEFT, + KEY_RIGHT, + KEY_UP, + KEY_DOWN, + KEY_F1, + KEY_F2, + KEY_F3, + KEY_F4, + KEY_F5, + KEY_F6, + KEY_F7, + KEY_F8, + KEY_F9, + KEY_F10, + KEY_F11, + KEY_F12, + KEY_Esc, + KEY_NONE + }; + + CKeyEvent() : m_bPressed( true ), m_Code( KEY_NONE ) {} + + virtual ~CKeyEvent() {} + + virtual eEventType Type() { return( CEvent::Event_KEY ); }; + bool m_bPressed; + eKeyCode m_Code; + + POOLED( CKeyEvent, Memory::CLinkPool ); +}; + +MakeSmartPointers( CKeyEvent ); + + +/* + CMouseEvent. + Mouse event. +*/ +class CMouseEvent : public CEvent +{ + public: + enum eMouseCode + { + Mouse_LEFT, + Mouse_RIGHT, + Mouse_MOVE, + Mouse_NONE + }; + + CMouseEvent() : m_Code( Mouse_NONE ) {} + + virtual ~CMouseEvent() {} + + virtual eEventType Type() { return( CEvent::Event_Mouse ); }; + eMouseCode m_Code; + + int32 m_X; + int32 m_Y; + + POOLED( CMouseEvent, Memory::CLinkPool ); +}; + +MakeSmartPointers( CMouseEvent ); + + + +/* + CPowerEvent. + Power broadcast event. +*/ +class CPowerEvent : public CEvent +{ + public: + CPowerEvent() {} + + virtual ~CPowerEvent() {} + + virtual eEventType Type() { return( CEvent::Event_Power ); }; +}; + +MakeSmartPointers( CPowerEvent ); + +/* + CDisplayOutput. + Base class. + + Note, it's up to constructor(or Initialize()), to set width/height. +*/ +class CDisplayOutput +{ + protected: + + int32 m_XPosition; + int32 m_YPosition; + uint32 m_Width; + uint32 m_Height; + bool m_bFullScreen; + bool m_bVSync; + bool m_bClosed; + + static std::queue m_EventQueue; + + public: + CDisplayOutput(); + virtual ~CDisplayOutput(); + +#ifdef WIN32 + virtual bool Initialize( HWND _hWnd, bool _bPreview ) = PureVirtual; + virtual HWND Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ) = PureVirtual; + virtual HWND WindowHandle( void ) = PureVirtual; + virtual DWORD GetNumMonitors() { return 1; } +#else +#ifdef MAC + virtual bool Initialize( CGLContextObj _glContext, bool _bPreview ) = PureVirtual; + virtual void SetContext( CGLContextObj glContext ) = PureVirtual; + virtual CGLContextObj GetContext( void ) = PureVirtual; + virtual void ForceWidthAndHeight( uint32 _width, uint32 _height ) = PureVirtual; +#else + virtual bool Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ) = PureVirtual; +#endif +#endif + + // + virtual void Title( const std::string &_title) = PureVirtual; + virtual void Update() = PureVirtual; + virtual void SwapBuffers() = PureVirtual; + + bool GetEvent( spCEvent &_event ); + void AppendEvent( spCEvent _event ); + void ClearEvents(); + + virtual bool HasShaders() { return false; }; + uint32 Width() + { + return( m_Width ); + }; + uint32 Height() + { + return( m_Height ); + }; + fp4 Aspect() { return( (fp4)m_Height / (fp4)m_Width ); }; + bool Closed() { return( m_bClosed ); }; + void Close() { m_bClosed = true; }; +}; + +MakeSmartPointers( CDisplayOutput ); + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Image.cpp electricsheep-3.0.2-git20180325/DisplayOutput/Image.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Image.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Image.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,952 @@ +#include +#include +#include + +#include "base.h" +#include "Exception.h" +#include "Log.h" +#include "MathBase.h" +#include "Image.h" + +namespace DisplayOutput +{ + +/* + CImage(). + +*/ +CImage::CImage() : m_Format( eImage_None ), m_Width(0), m_Height(0), m_nMipMaps(0), m_bRef( false ) +{ +} + +/* + CImage(). + +*/ +void CImage::Copy( const CImage &_image, const uint32 _mipLevel ) +{ + g_Log->Info( "CImage( const CImage & )..." ); + + if( _mipLevel == 0 ) + { + m_Width = _image.m_Width; + m_Height = _image.m_Width; + m_nMipMaps = _image.m_nMipMaps; + m_Format = _image.m_Format; + m_bRef = _image.isReference(); + + if( !m_bRef ) + { + uint32 size = getMipMappedSize( 0, m_nMipMaps ); + m_spData = new Base::CAlignedBuffer( size ); + if (m_spData->IsValid()) + memcpy( m_spData->GetBufferPtr(), _image.GetData( 0 ), size ); + } + } + else + { + m_Width = _image.GetWidth( _mipLevel ); + m_Height = _image.GetHeight( _mipLevel ); + m_nMipMaps = 1;//getNumberOfMipMapsFromDimesions(); + m_Format = _image.m_Format; + m_bRef = false; + + if( !m_bRef ) + { + uint32 size = getMipMappedSize( 0, m_nMipMaps ); + m_spData = new Base::CAlignedBuffer( size ); + if ( m_spData->IsValid() ) + memcpy( m_spData->GetBufferPtr(), _image.GetData( _mipLevel ), size ); + } + } +} + +/* + CImage(). + +*/ +void CImage::Create( const uint32 _w, const uint32 _h, const eImageFormat _format, const bool _bMipmaps, const bool _bRef ) +{ +// g_Log->Info( "Create( %d, %d, 0x%x )", _w, _h, _format ); + + m_Width = _w; + m_Height = _h; + m_nMipMaps = _bMipmaps ? getNumberOfMipMapsFromDimesions() : 1; + m_Format = _format; + m_bRef = _bRef ; + + if( !m_bRef ) + { + uint32 size = getMipMappedSize( 0, m_nMipMaps ); + m_spData = new Base::CAlignedBuffer( size ); + memset( m_spData->GetBufferPtr(), 0, size ); + } +} + +/* + ~CImage(). + +*/ +CImage::~CImage() +{ +// g_Log->Info( "~CImage()..." ); +} + +/* + GetData(). + +*/ +uint8 *CImage::GetData( const uint32 _mipLevel ) const +{ + if( m_bRef && m_spData.IsNull() ) + return( NULL ); + + const Base::CAlignedBuffer *ab = m_spData.GetRepPtr()->getRealPointer(); + + if( _mipLevel == 0 ) + return( ab->GetBufferPtr() ); + + return( _mipLevel < m_nMipMaps) ? ab->GetBufferPtr() + getMipMappedSize( 0, _mipLevel ) : NULL; +} + +/* + SetData(). + +*/ +void CImage::SetData( uint8* /*_pData*/ ) +{ + //if( !m_bRef /*|| m_nMipMaps > 1*/ ) + //return; + + //m_pData = _pData; +} + + +/* + GetPitch(). + +*/ +uint32 CImage::GetPitch( const uint32 _level ) const +{ + return( GetWidth( _level ) * m_Format.getBPPixel() ); +} + + +/* +*/ +uint32 CImage::getMipMappedSize( const uint32 _firstMipMapLevel, const uint32 _nMipMapLevels ) const +{ + return( getMipMappedSize( _firstMipMapLevel, _nMipMapLevels, m_Format ) ); +} + +/*int Image::getPixelCount(const int firstMipMapLevel, int nMipMapLevels) const { + int w = getWidth (firstMipMapLevel); + int h = getHeight(firstMipMapLevel); + int d = getDepth (firstMipMapLevel); + int size = 0; + while (nMipMapLevels){ + size += w * h * d; + w >>= 1; + h >>= 1; + d >>= 1; + if (w + h + d == 0) break; + if (w == 0) w = 1; + if (h == 0) h = 1; + if (d == 0) d = 1; + + nMipMapLevels--; + } + + return (depth == 0)? 6 * size : size; +}*/ + +/* + getMipMappedSize(). + +*/ +uint32 CImage::getMipMappedSize( const uint32 _firstMipMapLevel, const uint32 _nMipMapLevels, const CImageFormat &_format ) const +{ + uint32 w = GetWidth( _firstMipMapLevel ) << 1; + uint32 h = GetHeight( _firstMipMapLevel ) << 1; + + uint32 level = 0; + uint32 size = 0; + + while( level < _nMipMapLevels && (w != 1 || h != 1) ) + { + if( w > 1 ) w >>= 1; + if( h > 1 ) h >>= 1; + + if( _format.isCompressed() ) + size += ((w + 3) >> 2) * ((h + 3) >> 2); + else + size += w * h; + + level++; + } + + if( _format.isCompressed() ) + size *= _format.getBPBlock(); + else + size *= _format.getBPPixel(); + + return( size ); +} + + +/* + getNumberOfMipMapsFromDimesions(). + +*/ +uint32 CImage::getNumberOfMipMapsFromDimesions( void ) const +{ + uint32 m = (m_Width > m_Height)? m_Width : m_Height; + uint32 i = 0; + + while( m > 0 ) + { + m >>= 1; + i++; + } + + return( i ); +} + +/* + Load(). + +*/ +bool CImage::Load( const std::string &_fileName, const bool _calcMipmaps ) +{ + std::string ext = ""; + + size_t offs = _fileName.find_last_of( '.', _fileName.size() ); + if( offs != _fileName.size() ) + ext = _fileName.substr( offs+1, _fileName.size()-1 ); + + if( ext == "" ) + { + g_Log->Warning( "CImage::Load() No extension found for %s", _fileName.c_str() ); + return( false ); + } + + bool foundExt = false; + + // DDS? + if( ext == "dds" ) + { + foundExt = true; + if( !LoadDDS( _fileName, _calcMipmaps ) ) + return( false ); + } + + // TGA? + /*if( ext == "tga" ) + { + foundExt = true; + if( !LoadTGA( _fileName, _calcMipmaps ) ) + return( false ); + }*/ + + // JPG? + /*if( ext == "jpg" ) + { + foundExt = true; + if( !LoadJPG( _fileName, _calcMipmaps ) ) + return( false ); + }*/ + + // PNG? + if( ext == "png" ) + { + foundExt = true; + if( !LoadPNG( _fileName, _calcMipmaps ) ) + return( false ); + } + + // Unknown extension? + if( foundExt == false ) + { + g_Log->Warning( "CImage::Load() Unknown extension for %s", _fileName.c_str() ); + return( false ); + } + + if( _calcMipmaps && !m_Format.isCompressed() ) + { + if( !GenerateMipmaps() ) + return( false ); + } + + if( m_nMipMaps == 0 ) + m_nMipMaps = 1; + + // Done! + g_Log->Info( "CImage::Load( %s ): (%d x %d, %d MipMaps)", (const char *)_fileName.c_str(), m_Width, m_Height, m_nMipMaps ); + return( true ); +} + +/* + GenerateMipmaps(). + +*/ +bool CImage::GenerateMipmaps( void ) +{ + // Check if the image is power of two. + uint32 w = Base::Math::ClosestPowerOfTwo( m_Width ); + uint32 h = Base::Math::ClosestPowerOfTwo( m_Height ); + + if( w != m_Width || h != m_Height) + { + // TODO: resize? + g_Log->Error( "CImage::GenerateMipmaps(): Image is not power of two!" ); + return( false ); + } + + m_nMipMaps = getNumberOfMipMapsFromDimesions(); + return( createMipMaps() ); +} + +/* + Load(). + +*/ +bool CImage::Save( const std::string &_fileName ) +{ + std::string ext = ""; + + size_t offs = _fileName.find_last_of( '.', _fileName.size() ); + if( offs != _fileName.size() ) + ext = _fileName.substr( offs+1, _fileName.size()-1 ); + + if( ext == "" ) + { + g_Log->Warning( "CImage::Save() No extension found for %s", _fileName.c_str() ); + return( false ); + } + + // DDS? + if( ext == "dds" ) + { + if( !SaveDDS( _fileName ) ) + return( false ); + } + + g_Log->Info( "CImage::Save( %s ): Complete!", (const char *)_fileName.c_str(), m_Width, m_Height, m_nMipMaps ); + return( true ); +} + +/* + SaveDDS(). + +*/ + +#define DDPF_ALPHAPIXELS 0x00000001 +#define DDPF_FOURCC 0x00000004 +#define DDPF_RGB 0x00000040 + +#define DDSD_CAPS 0x00000001 +#define DDSD_HEIGHT 0x00000002 +#define DDSD_WIDTH 0x00000004 +#define DDSD_PITCH 0x00000008 +#define DDSD_PIXELFORMAT 0x00001000 +#define DDSD_MIPMAPCOUNT 0x00020000 +#define DDSD_LINEARSIZE 0x00080000 +#define DDSD_DEPTH 0x00800000 +#define DDSCAPS_COMPLEX 0x00000008 +#define DDSCAPS_TEXTURE 0x00001000 +#define DDSCAPS_MIPMAP 0x00400000 + +// +#pragma pack (push, 1) + +struct DDSHeader { + unsigned int ddsIdentifier; + unsigned int size; + unsigned int flags; + unsigned int height; + unsigned int width; + unsigned int pitchOrLinearSize; + unsigned int depth; + unsigned int nMipMaps; + unsigned int reserved[11]; + unsigned int size2; + unsigned int flags2; + unsigned int fourCC; + unsigned int bpp; + + unsigned int rBitMask; + unsigned int gBitMask; + unsigned int bBitMask; + unsigned int aBitMask; + + unsigned int caps1; + unsigned int caps2; + unsigned int reserved2[3]; +}; +#pragma pack (pop) + +bool CImage::SaveDDS( const std::string &_fileName ) +{ + eImageFormat fmt = m_Format.getFormatEnum(); + + if( (fmt < eImage_I8 || fmt > eImage_RGBA8 ) && fmt != eImage_RGB565 && !m_Format.isCompressed() ) + return( false ); + + uint32 nChannels = m_Format.GetChannels(); + + uint32 fourCC[] = { MCHAR4('D','X','T','1'), + MCHAR4('D','X','T','3'), + MCHAR4('D','X','T','5'), + MCHAR4('A','T','I','2') }; + + DDSHeader header = { + MCHAR4('D','D','S',' '), + 124, + DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | static_cast(m_nMipMaps > 1? DDSD_MIPMAPCOUNT : 0), + m_Height, + m_Width, + 0, + 0, + (m_nMipMaps > 1)? m_nMipMaps : 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, + 32, + m_Format.isCompressed() ? DDPF_FOURCC : static_cast((nChannels < 3)? 0x00020000 : DDPF_RGB) | static_cast((nChannels & 1)? 0 : DDPF_ALPHAPIXELS), + m_Format.isCompressed() ? fourCC[ fmt - eImage_DXT1 ] : 0, + 8 * nChannels, + static_cast((nChannels >= 3)? 0x00ff0000 : 0xFF), + static_cast((nChannels >= 3)? 0x0000ff00 : 0), + static_cast((nChannels >= 3)? 0x000000ff : 0), + (nChannels >= 3)? 0xff000000 : (nChannels == 2)? 0xFF00 : 0, + DDSCAPS_TEXTURE | static_cast(m_nMipMaps > 1? DDSCAPS_MIPMAP | DDSCAPS_COMPLEX : 0), + 0, + { 0, 0, 0 }, + }; + + FILE *pFile = fopen( _fileName.c_str(), "wb" ); + if( !pFile ) + return( false ); + + fwrite( &header, sizeof(header), 1, pFile ); + + uint32 size = getMipMappedSize( 0, m_nMipMaps ); + + bool bAlpha = false; + + if( bAlpha && (fmt == eImage_RGB8 || fmt == eImage_RGBA8) ) + flipChannels( m_spData->GetBufferPtr(), size / nChannels, nChannels ); + + fwrite( GetData( 0 ), size, 1, pFile ); + + // Flip back... =) + if( bAlpha && (fmt == eImage_RGB8 || fmt == eImage_RGBA8) ) + flipChannels( m_spData->GetBufferPtr(), size / nChannels, nChannels ); + + fclose( pFile ); + + return( true ); +} + +/* + buildMipMap8(). + +*/ +void buildMipMap8( uint8 *dest, uint8 *src, uint32 width, uint32 height, uint32 channels ) +{ + uint32 xOff = (width < 2)? 0 : channels; + uint32 yOff = (height < 2)? 0 : width * channels; + + for( uint32 y=0; y> 2; + src++; + } + src += xOff; + } + src += yOff; + } +} + +/* + buildMipMap32f(). + +*/ +void buildMipMap32f( fp4 *dest, fp4 *src, uint32 width, uint32 height, uint32 channels ) +{ + uint32 xOff = (width < 2)? 0 : channels; + uint32 yOff = (height < 2)? 0 : width * channels; + + for( uint32 y=0; y> 8) & 0xF8) + ((src[xOff] >> 8) & 0xF8) + ((src[diff] >> 8) & 0xF8) + ((src[diff + xOff] >> 8) & 0xF8)); + g = (((src[0] >> 3) & 0xFC) + ((src[xOff] >> 3) & 0xFC) + ((src[diff] >> 3) & 0xFC) + ((src[diff + xOff] >> 3) & 0xFC)); + b = (((src[0] << 3) & 0xF8) + ((src[xOff] << 3) & 0xF8) + ((src[diff] << 3) & 0xF8) + ((src[diff + xOff] << 3) & 0xF8)); + + *dest++ = (uint16)(((r << 6) & 0xF800) | ((g << 1) & 0x07E0) | ((b >> 5) & 0x1F)); + src += 2; + } + + src += width; + } +} + +/* + createMipMaps(). + +*/ +bool CImage::createMipMaps( void ) +{ + if( m_Format.isCompressed() ) + return( false ); + + if( m_bRef ) + return( false ); + + uint32 w = m_Width; + uint32 h = m_Height; + + union { + uint8 *src; + uint16 *src16; + fp4 *src32f; + }; + + union { + uint8 *dest; + uint16 *dest16; + fp4 *dest32f; + }; + + if( m_nMipMaps <= 1 ) + { + m_spData->Reallocate( getMipMappedSize() ); + m_nMipMaps = getNumberOfMipMapsFromDimesions(); + } + + dest = m_spData->GetBufferPtr(); + + uint32 nChannels = m_Format.GetChannels(); + + while( w > 1 || h > 1 ) + { + src = dest; + + if( m_Format.isPlain() ) + { + if( m_Format.isFloat() ) + { + dest32f += w * h * nChannels; + buildMipMap32f(dest32f, src32f, w, h, nChannels); + } + else + { + dest += w * h * nChannels; + buildMipMap8(dest, src, w, h, nChannels); + } + } + else + { + dest16 += w * h; + buildMipMapRGB565(dest16, src16, w, h); + } + + if( w > 1) w >>= 1; + if( h > 1) h >>= 1; + } + + return( true ); +} + +/* +*/ +uint32 CImage::getNumPixels( const uint32 _firstMipMapLevel, const uint32 _nMipMapLevels ) const +{ + uint32 w = GetWidth( _firstMipMapLevel ) << 1; + uint32 h = GetHeight( _firstMipMapLevel ) << 1; + uint32 level = 0; + uint32 size = 0; + + while( level < _nMipMapLevels && (w != 1 || h != 1) ) + { + if( w > 1 ) w >>= 1; + if( h > 1 ) h >>= 1; + + size += w * h; + level++; + } + + return( size ); +} + +/* + Convert(). + +*/ +bool CImage::Convert( const eImageFormat _newFormatType ) +{ + if( _newFormatType == m_Format.m_Format ) + return( false ); + + if( !m_Format.isPlain() ) + return( false ); + + if( m_bRef ) + return( false ); + + // + CImageFormat newFormat = CImageFormat( _newFormatType ); + if( !newFormat.isPlain() ) + return( false ); + + uint8 *src = m_spData->GetBufferPtr(); + Base::spCAlignedBuffer newPixels = new Base::CAlignedBuffer( getMipMappedSize( 0, m_nMipMaps, newFormat ) ); + uint8 *dest = newPixels->GetBufferPtr(); + + uint32 nPixels = getNumPixels( 0, m_nMipMaps ); + + if( m_Format.is( eImage_RGB8 ) && newFormat.is( eImage_RGBA8 ) ) + { + // Fast path for RGB->RGBA8 + do + { + dest[0] = src[0]; + dest[1] = src[1]; + dest[2] = src[2]; + dest[3] = 255; + dest += 4; + src += 3; + } while ( --nPixels ); + } + else + { + uint32 srcSize = m_Format.getBPPixel(); + uint32 nSrcChannels = m_Format.GetChannels(); + + uint32 destSize = newFormat.getBPPixel(); + uint32 nDestChannels = newFormat.GetChannels(); + + do + { + fp4 rgba[4]; + + rgba[0] = rgba[1] = rgba[2] = rgba[3] = 0.0f; + + if( m_Format.isFloat() ) + { + for( uint32 i=0; i= eImage_I16 && m_Format.m_Format <= eImage_RGBA16 ) + { + for( uint32 i=0; i= eImage_I16 && newFormat.m_Format <= eImage_RGBA16 ) + { + for( uint32 i=0; i> 21 ); +} + + +/* + Scale(). + +*/ +bool CImage::Scale( const uint32 _newWidth, const uint32 _newHeight, const eScaleFilters _eFilter ) +{ + if( !m_Format.isPlain() || m_Format.isFloat() ) + { + if( m_Format.isCompressed() ) + g_Log->Warning( "CImage::Scale(): No deal, image is compressed." ); + + if( m_Format.isFloat() ) + g_Log->Warning( "CImage::Scale(): No deal, image is float." ); + + if( m_Format.isDepth() ) + g_Log->Warning( "CImage::Scale(): No deal, image is depth." ); + + return( false ); + } + + if ( _newHeight < 2 || _newWidth < 2 ) + { + g_Log->Warning( "CImage::Scale(): No deal, new size too small." ); + return ( false ); + } + + uint32 nChannels = m_Format.GetChannels(); + + Base::spCAlignedBuffer newPixels = new Base::CAlignedBuffer( _newWidth * _newHeight * nChannels ); + + uint8 *pData = GetData( 0 ); + + uint32 x,y,k,sampleX, sampleY, wX, wY; + uint8 *src, *dest = newPixels->GetBufferPtr(); + + switch( _eFilter ) + { + case eImage_Nearest: + for( y=0; y<_newHeight; y++ ) + { + sampleY = (m_Height - 1) * y / (_newHeight - 1); + for( x=0; x<_newWidth; x++ ) + { + sampleX = (m_Width - 1) * x / (_newWidth - 1); + for( k=0; k>= 8; + + for( x=0; x<_newWidth; x++ ) + { + sampleX = (((m_Width - 1) * x) << 8) / (_newWidth - 1); + wX = sampleX & 0xFF; + sampleX >>= 8; + + src = pData + (sampleY * m_Width + sampleX) * nChannels; + + for( k=0; k(src[ 0 ]) + + (256 - wX) * ( wY) * static_cast(src[ m_Width * nChannels ]) + + ( wX) * (256 - wY) * static_cast(src[ nChannels ]) + + ( wX) * ( wY) * static_cast(src[ (m_Width + 1) * nChannels ]) ) >> 16) & 0xFF; + src++; + } + } + } + break; + case eImage_Bicubic: + int a,b,c,d; + int res; + + for( y=0; y<_newHeight; y++ ) + { + sampleY = (((m_Height - 1) * y) << 7) / (_newHeight - 1); + wY = sampleY & 0x7F; + sampleY >>= 7; + + for( x=0; x<_newWidth; x++ ) + { + sampleX = (((m_Width - 1) * x) << 7) / (_newWidth - 1); + wX = sampleX & 0x7F; + sampleX >>= 7; + + src = pData + ((sampleY - 1) * m_Width + (sampleX - 1)) * nChannels; + + for( k=0; k(wX)) & 0xFF; + if( sampleY > 0 ) + a = icerp(src[0], src[nChannels], src[2 * nChannels], src[3 * nChannels], static_cast(wX)) & 0xFF; + else + a = b; + + c = icerp(src[2 * m_Width * nChannels], src[(2 * m_Width + 1) * nChannels], src[(2 * m_Width + 2) * nChannels], src[(2 * m_Width + 3) * nChannels], static_cast(wX)) & 0xFF; + if( sampleY < _newHeight - 1 ) + d = icerp(src[3 * m_Width * nChannels], src[(3 * m_Width + 1) * nChannels], src[(3 * m_Width + 2) * nChannels], src[(3 * m_Width + 3) * nChannels], static_cast(wX)) & 0xFF; + else + d = c; + + res = icerp( a, b, c, d, static_cast(wY) ) & 0xFF; + *dest++ = (res < 0)? 0 : (res > 255)? 255 : (res & 0xFF); + src++; + } + } + } + break; + } + + m_spData = newPixels; + m_Width = _newWidth; + m_Height = _newHeight; + m_nMipMaps = 1; + + return( true ); +} + +/* +*/ +void CImage::PutPixel( const int32 _x, const int32 _y, const fp4 _r, const fp4 _g, const fp4 _b, const fp4 _a ) +{ + // Complicated formats are no go. + if( !m_Format.isPlain() ) + return; + + if( _x < 0 || _x >= (int)m_Width ) + return; + + if( _y < 0 || _y >= (int)m_Height ) + return; + + fp4 rgba[4] = { _r, _g, _b, _a }; + + uint32 nDestChannels = m_Format.GetChannels(); + uint8 *pData = (GetData(0) + (static_cast(_y) * GetPitch())) + (static_cast(_x) * m_Format.getBPPixel() ); + + if( m_Format.isFloat() ) + { + for( uint8 i=0; i= eImage_I16 && m_Format.m_Format <= eImage_RGBA16 ) + { + for( uint8 i=0; i (int)m_Width ) + return; + + if( _y < 0 || _y > (int)m_Height ) + return; + + uint32 nSrcChannels = m_Format.GetChannels(); + uint8 *pData = (GetData(0) + (static_cast(_y) * GetPitch())) + (static_cast(_x) * m_Format.getBPPixel() ); + fp4 rgba[4]; + + rgba[0] = rgba[1] = rgba[2] = rgba[3] = 0.0f; + + if( m_Format.isFloat() ) + { + for( uint32 i=0; i= eImage_I16 && m_Format.m_Format <= eImage_RGBA16 ) + { + for( uint32 i=0; i +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define __LITTLE_ENDIAN__ __LITTLE_ENDIAN +#undef __BIG_ENDIAN__ +#else +#undef __LITTLE_ENDIAN__ +#define __BIG_ENDIAN__ __BIG_ENDIAN +#endif +#endif + +namespace DisplayOutput +{ + +/* + The imageformats are NOT flexible or changeable! + If they are for some reason changed in any way, it¥s extremely important that the renderers conversion-tables are uptodate! +*/ + +enum eImageFormat { + + eImage_None = 0, + + // Plain formats. + eImage_I8, + eImage_IA8, + eImage_RGB8, + eImage_RGBA8, + + eImage_I16, + eImage_RG16, + eImage_RGB16, + eImage_RGBA16, + + eImage_I16F, + eImage_RG16F, + eImage_RGB16F, + eImage_RGBA16F, + + eImage_I32F, + eImage_RG32F, + eImage_RGB32F, + eImage_RGBA32F, + + // Packed formats. + eImage_RGBA4, + eImage_RGB565, + + // Compressed formats. + eImage_DXT1, + eImage_DXT3, + eImage_DXT5, + + // Depth formats. + eImage_D16, + eImage_D24, +}; + + +enum eScaleFilters { + eImage_Nearest = 0, + eImage_Bilinear, + eImage_Bicubic, +}; + +/* +*/ +class CImageFormat { + + public: + eImageFormat m_Format; + + CImageFormat() : m_Format( eImage_None ) {}; + CImageFormat( eImageFormat _format ) : m_Format( _format ) {}; + CImageFormat( const CImageFormat &_image ) : m_Format( _image.m_Format ) {}; + + // + inline std::string GetDescription( void ) const + { + std::string desc = ""; + + switch( m_Format ) + { + case eImage_I8: desc = "I8"; break; + case eImage_I16: desc = "I16"; break; + case eImage_I16F: desc = "I16F"; break; + case eImage_I32F: desc = "I32F"; break; + case eImage_D16: desc = "D16"; break; + case eImage_D24: desc = "D24"; break; + case eImage_IA8: desc = "IA8"; break; + case eImage_RG16: desc = "RG16"; break; + case eImage_RG16F: desc = "RG16F"; break; + case eImage_RG32F: desc = "RG32F"; break; + case eImage_RGB8: desc = "RGB8"; break; + case eImage_RGB16: desc = "RGB16"; break; + case eImage_RGB16F: desc = "RGB16F"; break; + case eImage_RGB32F: desc = "RGB32F"; break; + case eImage_RGBA4: desc = "RGBA4"; break; + case eImage_RGB565: desc = "RGB565"; break; + case eImage_DXT1: desc = "DXT1"; break; + case eImage_RGBA8: desc = "RGBA8"; break; + case eImage_RGBA16: desc = "RGBA16"; break; + case eImage_RGBA16F: desc = "RGBA16F"; break; + case eImage_RGBA32F: desc = "RGBA32F"; break; + case eImage_DXT3: desc = "DXT3"; break; + case eImage_DXT5: desc = "DXT5"; break; + default: + desc = "Unknown"; break; + } + + return( desc ); + } + + // + inline uint32 GetChannels( void ) const + { + switch( m_Format ) + { + case eImage_I8: + case eImage_I16: + case eImage_I16F: + case eImage_I32F: + case eImage_D16: + case eImage_D24: + return( 1 ); + case eImage_IA8: + case eImage_RG16: + case eImage_RG16F: + case eImage_RG32F: + case eImage_RGBA4: + return( 2 ); + case eImage_RGB8: + case eImage_RGB16: + case eImage_RGB16F: + case eImage_RGB32F: + case eImage_RGB565: + case eImage_DXT1: + return( 3 ); + case eImage_RGBA8: + case eImage_RGBA16: + case eImage_RGBA16F: + case eImage_RGBA32F: + case eImage_DXT3: + case eImage_DXT5: + return( 4 ); + default: + g_Log->Error( "CImageFormat::GetChannels = fubar" ); + return( 0 ); + } + } + + // Bytes per block. + inline uint32 getBPBlock( void ) const + { + return( (m_Format == eImage_DXT1 ) ? 8 : 16 ); + } + + // Bytes per pixel. + inline uint32 getBPPixel( void ) const + { + switch( m_Format ) + { + case eImage_I8: + return( 1 ); + case eImage_IA8: + case eImage_I16: + case eImage_I16F: + case eImage_RGB565: + case eImage_D16: + case eImage_RGBA4: + return( 2 ); + case eImage_RGB8: + case eImage_D24: + return( 3 ); + case eImage_RGBA8: + case eImage_RG16: + case eImage_RG16F: + case eImage_I32F: + return( 4 ); + case eImage_RGB16: + case eImage_RGB16F: + return( 6 ); + case eImage_RG32F: + return( 8 ); + case eImage_RGBA16: + case eImage_RGBA16F: + case eImage_RGB32F: + return( 12 ); + case eImage_RGBA32F: + return( 16 ); + default: + return(0); + } + } + + // + inline bool is( const eImageFormat _format ) const { return( m_Format == _format ); }; + + inline eImageFormat getFormatEnum( void ) const { return( m_Format ); } + + inline bool isPlain( void ) const { return( m_Format <= eImage_RGBA32F ); } + inline bool isPacked( void ) const { return( m_Format == eImage_RGB565 ); } + inline bool isCompressed(void) const { return( (m_Format >= eImage_DXT1) && ( m_Format <= eImage_DXT5 ) ); } + inline bool isFloat(void) const { return( (m_Format >= eImage_I16F) && ( m_Format <= eImage_RGBA32F) ); } + inline bool isDepth(void) const { return( (m_Format >= eImage_D16) && (m_Format <= eImage_D24) ); } +}; + +MakeSmartPointers( CImageFormat ); + + +// +inline void flipChannels( uint8 *_pData, uint32 _nPixels, const uint32 _nChannels ) +{ + uint8 tmp; + + do { + tmp = _pData[_nChannels - 1]; + + for ( uint32 i = _nChannels - 1; i > 0; i-- ) + { + _pData[i] = _pData[i - 1]; + } + + _pData[0] = tmp; + + _pData += _nChannels; + } while (--_nPixels); +} + +inline void flipChannelsRB( uint8 *_pData, uint32 _nPixels, const uint32 _nChannels ) +{ + uint8 tmp; + + do { + tmp = _pData[0]; + _pData[0] = _pData[2]; + _pData[2] = tmp; + _pData += _nChannels; + } while (--_nPixels); +} + +#if (defined(MAC) || defined(LINUX_GNU)) +#ifdef __LITTLE_ENDIAN__ + #define MCHAR4(a, b, c, d) (a | (b << 8) | (c << 16) | (d << 24)) +#else + #define MCHAR4(a, b, c, d) (d | (c << 8) | (b << 16) | (a << 24)) +#endif +#else +#define MCHAR4(a, b, c, d) (a | (b << 8) | (c << 16) | (d << 24)) +#endif + +#define MAX_MIPMAP (sizeof(uint32) * 8) + +/* + CImage. + Image class. +*/ +class CImage { + + uint32 getNumberOfMipMapsFromDimesions( void ) const; + uint32 getMipMappedSize( const uint32 _firstMipMapLevel, const uint32 _nMipMapLevels, const CImageFormat &_format ) const; + uint32 getNumPixels( const uint32 _firstMipMapLevel, const uint32 _nMipMapLevels ) const; + bool createMipMaps( void ); + + // Image loaders. + bool LoadDDS( const std::string &_fileName, const bool _wantMipMaps = true ); + //bool LoadTGA( const std::string &_fileName, const bool _wantMipMaps = true ); + bool LoadPNG( const std::string &_fileName, const bool _wantMipMaps = true ); + //bool LoadJPG( const std::string &_fileName, const bool _wantMipMaps = true ); + + // Image savers. + bool SaveDDS( const std::string &_fileName ); + + protected: + + CImageFormat m_Format; + + Base::spCAlignedBuffer m_spData; + + uint32 m_Width; + uint32 m_Height; + + uint32 m_nMipMaps; + + bool m_bRef; + + public: + CImage(); + ~CImage(); + + // + void Create( const uint32 _w, const uint32 _h, const eImageFormat _format, const bool _bMipmaps = false, const bool _bRef = false ); + void Copy( const CImage &_image, const uint32 _mipLevel ); + + bool Load( const std::string &_filename, const bool _calcMimaps = true ); + bool Save( const std::string &_filename ); + + Base::spCAlignedBuffer& GetStorageBuffer( void ) { return m_spData; } + void SetStorageBuffer( Base::spCAlignedBuffer &buffer ) { m_spData = buffer; } + + uint8 *GetData( const uint32 _mipLevel ) const; + void SetData( uint8 *_pData ); + + uint32 GetPitch( const uint32 _mipMapLevel = 0 ) const; + + // + bool Scale( const uint32 _newWidth, const uint32 _newHeight, const eScaleFilters _eFilter ); + bool Convert( const eImageFormat _newFormat ); + + // + bool GenerateMipmaps( void ); + + // + inline bool isReference( void ) const { return( m_bRef ); }; + inline uint32 GetWidth( const uint32 _mipMapLevel = 0 ) const { uint32 a = m_Width >> _mipMapLevel; return( (a == 0)? 1 : a ); } + inline uint32 GetHeight( const uint32 _mipMapLevel = 0 ) const { uint32 a = m_Height >> _mipMapLevel; return( (a == 0)? 1 : a ); } + inline Base::Math::CRect GetRect( void ) const { return( Base::Math::CRect( (fp4)m_Width, (fp4)m_Height ) ); }; + inline uint32 GetNumMipMaps( void ) const { return( m_nMipMaps ); }; + uint32 getMipMappedSize( const uint32 _firstMipMapLevel = 0, const uint32 _nMipMapLevels = 0x7FFFFFFF ) const; + inline const CImageFormat &GetFormat( void ) const { return( m_Format ); }; + + // + void GetPixel( const int32 _x, const int32 _y, fp4 &_r, fp4 &_g, fp4 &_b, fp4 &_a ); + void PutPixel( const int32 _x, const int32 _y, const fp4 _r, const fp4 _g, const fp4 _b, const fp4 _a ); +}; + +MakeSmartPointers( CImage ); + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/LoadDDS.cpp electricsheep-3.0.2-git20180325/DisplayOutput/LoadDDS.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/LoadDDS.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/LoadDDS.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,125 @@ +#include +#include "base.h" +#include "Image.h" + +namespace DisplayOutput +{ + +// +#pragma pack (push, 1) + +struct DDSHeader { + unsigned int ddsIdentifier; + unsigned int size; + unsigned int flags; + unsigned int height; + unsigned int width; + unsigned int pitchOrLinearSize; + unsigned int depth; + unsigned int nMipMaps; + unsigned int reserved[11]; + unsigned int size2; + unsigned int flags2; + unsigned int fourCC; + unsigned int bpp; + + unsigned int rBitMask; + unsigned int gBitMask; + unsigned int bBitMask; + unsigned int aBitMask; + + unsigned int caps1; + unsigned int caps2; + unsigned int reserved2[3]; +}; +#pragma pack (pop) + +/* + LoadDDS(). + +*/ +bool CImage::LoadDDS( const std::string &_fileName, const bool _wantMipMaps ) +{ + DDSHeader header; + + FILE *pFileData = fopen( _fileName.c_str(), "rb" ); + if( !pFileData ) + { + ThrowStr( ("CImage::LoadDDS() Unable to open " + _fileName).c_str() ); + return( false ); + } + + fread( &header, sizeof(header), 1, pFileData ); + if( header.ddsIdentifier != MCHAR4('D', 'D', 'S', ' ') ) + { + ThrowStr( ("CImage::LoadDDS() No valid header in " + _fileName) ); + return( false ); + } + + m_Width = header.width; + m_Height = header.height; + + m_nMipMaps = header.nMipMaps; + + if( m_nMipMaps <= 0 || !_wantMipMaps ) + m_nMipMaps = 1; + else + m_nMipMaps = getNumberOfMipMapsFromDimesions(); + + switch( header.fourCC ) + { + case MCHAR4('D', 'X', 'T', '1'): + m_Format = CImageFormat( eImage_DXT1 ); + break; + case MCHAR4('D', 'X', 'T', '3'): + m_Format = CImageFormat( eImage_DXT3 ); + break; + case MCHAR4('D', 'X', 'T', '5'): + m_Format = CImageFormat( eImage_DXT5 ); + break; + default: + switch( header.bpp ) + { + case 8: + m_Format = CImageFormat( eImage_I8 ); + break; + case 16: + if( header.aBitMask ) + m_Format = CImageFormat( eImage_IA8 ); + else + m_Format = CImageFormat( eImage_I16 ); + break; + case 24: + m_Format = CImageFormat( eImage_RGB8 ); + break; + case 32: + m_Format = CImageFormat( eImage_RGBA8 ); + break; + default: + return( false ); + } + } + + // Calculate how large buffer we need possibly including mipmaps. + uint32 readSize = getMipMappedSize( 0, m_nMipMaps ); + uint32 size; + + if( m_Format.isPlain() && _wantMipMaps ) + size = getMipMappedSize( 0, 0x7fffffff ); + else + size = readSize; + + m_spData = new Base::CAlignedBuffer( size ); + fread( m_spData->GetBufferPtr(), readSize, 1, pFileData ); + + /*if( m_Format.is( eImage_RGB8 ) || m_Format.is( eImage_RGBA8 ) ) + { + int nChannels = m_Format.GetChannels(); + flipChannels( m_pData, readSize / nChannels, nChannels ); + }*/ + + fclose( pFileData ); + + return( true ); +} +}; diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/LoadPNG.cpp electricsheep-3.0.2-git20180325/DisplayOutput/LoadPNG.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/LoadPNG.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/LoadPNG.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,161 @@ +#include +#include "base.h" +#include "Log.h" +#include "Image.h" +#include "png.h" + +#ifdef LINUX_GNU +#include +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define __LITTLE_ENDIAN__ __LITTLE_ENDIAN +#undef __BIG_ENDIAN__ +#else +#undef __LITTLE_ENDIAN__ +#define __BIG_ENDIAN__ __BIG_ENDIAN +#endif +#endif + +namespace DisplayOutput +{ + +/* + LoadPNG(). + +*/ +bool CImage::LoadPNG( const std::string &_fileName, const bool _wantMipMaps ) +{ + png_structp png_ptr = NULL; + png_infop info_ptr = NULL; + FILE *file; + + png_byte pbSig[8]; + int iBitDepth, iColorType; + double dGamma; + png_color_16 *pBackground; + png_byte **ppbRowPointers; + + // open the PNG input file + if( (file = fopen( _fileName.c_str(), "rb")) == NULL ) + { + g_Log->Warning( "Unable to open %s", _fileName.c_str() ); + return( false ); + } + + // first check the eight byte PNG signature + fread( pbSig, 1, 8, file ); + if( png_sig_cmp( pbSig, 0, 8 ) != 0) + { + g_Log->Warning( "%s doesn't have a valid png signature...", _fileName.c_str() ); + fclose( file ); + return( false ); + } + + // create the two png(-info) structures + if( (png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, (png_error_ptr) NULL, (png_error_ptr) NULL) ) == NULL ) + { + fclose( file ); + return( false ); + } + + if( (info_ptr = png_create_info_struct(png_ptr)) == NULL ) + { + png_destroy_read_struct( &png_ptr, NULL, NULL ); + fclose( file ); + return( false ); + } + + // initialize the png structure + png_init_io( png_ptr, file ); + png_set_sig_bytes( png_ptr, 8 ); + + // read all PNG info up to image data + png_read_info( png_ptr, info_ptr ); + + // get width, height, bit-depth and color-type + png_get_IHDR(png_ptr, info_ptr, (png_uint_32 *) &m_Width, (png_uint_32 *) &m_Height, &iBitDepth, &iColorType, NULL, NULL, NULL); + + // expand images of all color-type and bit-depth to 3x8 bit RGB images + // let the library process things like alpha, transparency, background + if( iBitDepth == 16 ) png_set_strip_16( png_ptr ); + if( iColorType == PNG_COLOR_TYPE_PALETTE ) png_set_expand( png_ptr ); + if( iBitDepth < 8 ) png_set_expand( png_ptr ); + if( png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS) ) png_set_expand( png_ptr ); + + // set the background color to draw transparent and alpha images over. + if( png_get_bKGD( png_ptr, info_ptr, &pBackground ) ) + png_set_background( png_ptr, pBackground, PNG_BACKGROUND_GAMMA_FILE, 1, 1.0 ); + + // if required set gamma conversion + if( png_get_gAMA( png_ptr, info_ptr, &dGamma ) ) + png_set_gamma( png_ptr, 2.2, dGamma ); + + //if( !useRGBA ) + // png_set_bgr( png_ptr ); + + // after the transformations have been registered update info_ptr data + png_read_update_info( png_ptr, info_ptr ); + + // get again width, height and the new bit-depth and color-type + png_get_IHDR( png_ptr, info_ptr, (png_uint_32 *) &m_Width, (png_uint_32 *) &m_Height, &iBitDepth, &iColorType, NULL, NULL, NULL ); + uint32 nChannels = png_get_channels( png_ptr, info_ptr ); + + switch( nChannels ) + { + case 1: m_Format = CImageFormat( eImage_I8 ); break; + case 2: m_Format = CImageFormat( eImage_IA8 ); break; + case 3: m_Format = CImageFormat( eImage_RGB8 ); break; + case 4: m_Format = CImageFormat( eImage_RGBA8 ); break; + } + + if( !_wantMipMaps ) + m_nMipMaps = 1; + else + m_nMipMaps = getNumberOfMipMapsFromDimesions(); + + // now we can allocate memory to store the image + //m_pData = new uint8[ getMipMappedSize( 0, _wantMipMaps ? 0x7fffffff : 1 ) ]; + m_spData = new Base::CAlignedBuffer( getMipMappedSize( 0, m_nMipMaps ) ); + + // set the individual row-pointers to point at the correct offsets + ppbRowPointers = new png_bytep[ m_Height ]; + for( uint32 i=0; iGetBufferPtr() + i * m_Width * nChannels; + + // now we can go ahead and just read the whole image + png_read_image( png_ptr, ppbRowPointers ); + + // read the additional chunks in the PNG file (not really needed) + png_read_end( png_ptr, NULL ); + +#if defined(MAC) && !defined(__BIG_ENDIAN__) + if (nChannels < 3) { + g_Log->Warning( "bad number of channels %d ...", nChannels ); + } else { + for( uint32 i=0; i + +@interface ESOpenGLView : NSOpenGLView +{ + +} + ++ (NSOpenGLPixelFormat*) esPixelFormat; + +- (id) initWithFrame: (NSRect) frameRect; + +- (BOOL)needsDisplay; + +@end diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/ESOpenGLView.m electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/ESOpenGLView.m --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/ESOpenGLView.m 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/ESOpenGLView.m 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,47 @@ +#import +#import +#import +#import "ESOpenGLView.h" +#import "base.h" + +@implementation ESOpenGLView + +// pixel format definition ++ (NSOpenGLPixelFormat*) esPixelFormat +{ + NSOpenGLPixelFormatAttribute attributes [] = { + //NSOpenGLPFAFullScreen, + //NSOpenGLPFAScreenMask, + // CGDisplayIDToOpenGLDisplayMask(kCGDirectMainDisplay), + NSOpenGLPFAWindow, + NSOpenGLPFAAllRenderers, + NSOpenGLPFAAccelerated, + NSOpenGLPFANoRecovery, + //NSOpenGLPFAMPSafe, + NSOpenGLPFABackingStore, + NSOpenGLPFADoubleBuffer, // double buffered + NSOpenGLPFAColorSize, (NSOpenGLPixelFormatAttribute)32, // 32 bit color buffer + NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute)16, // 32 bit depth buffer +// NSOpenGLPFAAlphaSize, (NSOpenGLPixelFormatAttribute)8, + NSOpenGLPFAAllowOfflineRenderers, + 1262, //magical number to make sure integrated card is used on MBP-mid-2010 + (NSOpenGLPixelFormatAttribute)nil + }; + return [[NSOpenGLPixelFormat alloc] initWithAttributes:attributes]; +} + +-(id) initWithFrame: (NSRect) frameRect +{ + NSOpenGLPixelFormat * pf = [ESOpenGLView esPixelFormat]; + + self = [super initWithFrame: frameRect pixelFormat: pf]; + + return self; +} + +- (BOOL)needsDisplay +{ + return NO; +} + +@end diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/FontGL.cpp electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/FontGL.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/FontGL.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/FontGL.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,189 @@ +#include "FontGL.h" +#include "Log.h" +#include "Settings.h" +#include +#include + +#ifdef LINUX_GNU +#include +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define __LITTLE_ENDIAN__ __LITTLE_ENDIAN +#undef __BIG_ENDIAN__ +#else +#undef __LITTLE_ENDIAN__ +#define __BIG_ENDIAN__ __BIG_ENDIAN +#endif +#endif + +#if defined( WIN32 ) || defined( __LITTLE_ENDIAN__ ) + #define SWAP_LONG_(x) ((x << 24) | ((x << 8) & 0x00FF0000) | ((x >> 8) & 0x0000FF00) | (x >> 24)) + #define SWAP_SHORT_(x) ((unsigned short)((unsigned short)(x) << 8) | (unsigned short)((unsigned short)(x) >> 8)) +#else + #define SWAP_LONG_(x) x + #define SWAP_SHORT_(x) x +#endif + +// Helper function to read a piece of data from a stream. +template +void Read_Object(T& to_read, S& in) +{ + in.read(reinterpret_cast(&to_read), sizeof(T)); +} + +// This is how glyphs are stored in the file. +struct Glyph_Buffer +{ + unsigned char ascii, width; + unsigned short x, y; +}; + + +namespace DisplayOutput +{ + +/* + CFontGL(). + +*/ +CFontGL::CFontGL( spCTextureFlat textTexture ) : CBaseFont(), m_glyphs(NULL) +{ + m_spTextTexture = textTexture; + + for (uint32 i = 0; i != 256; ++i) + m_table[i] = NULL; + +} + + +/* + ~CFontGL(). + +*/ +CFontGL::~CFontGL() +{ + SAFE_DELETE_ARRAY(m_glyphs); +} + +/* +*/ +bool CFontGL::Create() +{ + // Open the file and check whether it is any good (a font file + // starts with "F0") +#ifndef LINUX_GNU + std::ifstream input((g_Settings()->Get( "settings.app.InstallDir", std::string(".\\") ) + "TrebuchetMS-20.glf").c_str(), std::ios::binary); +#else + std::ifstream input((g_Settings()->Get( "settings.app.InstallDir", std::string("") ) + "TrebuchetMS-20.glf").c_str(), std::ios::binary); +#endif + if (input.fail() || input.get() != 'F' || input.get() != '0') + return false; + + // Get the texture size, the number of glyphs and the line height. + uint32 width, height, n_chars, line_height, tmp; + + //multibytes fields are stored as big endian + Read_Object(tmp, input); + width = SWAP_LONG_(tmp); + + Read_Object(tmp, input); + height = SWAP_LONG_(tmp); + + Read_Object(tmp, input); + line_height = SWAP_LONG_(tmp); + + Read_Object(tmp, input); + n_chars = SWAP_LONG_(tmp); + + m_lineHeight = line_height; + m_texLineHeight = static_cast(m_lineHeight) / (fp4)height; + + // Make the glyph table. + m_glyphs = new Glyph[n_chars]; + for (uint32 i = 0; i != 256; ++i) + m_table[i] = NULL; + + // Read every glyph, store it in the glyph array and set the right + // pointer in the table. + Glyph_Buffer buffer; + for (uint32 i = 0; i < n_chars; ++i){ + Read_Object(buffer, input); + + buffer.x = SWAP_SHORT_(buffer.x); + buffer.y = SWAP_SHORT_(buffer.y); + + m_glyphs[i].tex_x1 = static_cast(buffer.x) / (fp4)width; + m_glyphs[i].tex_x2 = static_cast(buffer.x + buffer.width) / (fp4)width; + m_glyphs[i].tex_y1 = static_cast(buffer.y) / (fp4)height; + m_glyphs[i].advance = buffer.width; + + m_table[buffer.ascii] = m_glyphs + i; + } + + // All chars that do not have their own glyph are set to point to + // the default glyph. + Glyph* default_glyph = m_table[(unsigned char)'\xFF']; + // We must have the default character (stored under '\xFF') + if (default_glyph == NULL) + return false; + + for (uint32 i = 0; i != 256; ++i){ + if (m_table[i] == NULL) + m_table[i] = default_glyph; + } + + m_spTextImage = new DisplayOutput::CImage(); + + m_spTextImage->Create( width, height, eImage_RGBA8, 0, false ); + + if (height != m_spTextImage->GetHeight() || m_spTextImage->GetPitch(0) != width * 4) + return false; + + input.read(reinterpret_cast(m_spTextImage->GetData(0)), m_spTextImage->GetPitch(0) * m_spTextImage->GetHeight()); + + m_spTextTexture->Upload(m_spTextImage); + + return( true ); +} + +fp4 CFontGL::LineHeight() const +{ + return m_lineHeight; +} + +fp4 CFontGL::TexLineHeight() const +{ + return m_texLineHeight; +} + +fp4 CFontGL::CharWidth(uint8 c) const +{ + if (m_table[c]) + return m_table[c]->advance; + else + return 0.0; +} + +fp4 CFontGL::StringWidth(const std::string& str) const +{ + fp4 total = 0.0; + for (uint32 i = 0; i != str.size(); ++i) + total += CharWidth(static_cast(str[i])); + return total; +} + +CFontGL::Glyph *CFontGL::GetGlyph(uint8 c) +{ + return m_table[c]; +} + +spCTextureFlat CFontGL::GetTexture( void ) +{ + return m_spTextTexture; +} + +void CFontGL::Reupload() +{ + m_spTextTexture->Reupload(); +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/FontGL.h electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/FontGL.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/FontGL.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/FontGL.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,72 @@ +/* + FONTGL.H + Author: dasvo. + + OpenGL Font. +*/ +#ifndef _FONTGL_H_ +#define _FONTGL_H_ + +#include +#include "base.h" +#include "SmartPtr.h" +#include "Font.h" +#include "Image.h" +#include "TextureFlat.h" + +namespace DisplayOutput +{ + +/* + CFontGL. + +*/ +class CFontGL : public CBaseFont +{ +public: + typedef struct + { + fp4 tex_x1, tex_y1, tex_x2; + fp4 advance; + } Glyph; + +private: + Glyph* m_glyphs; + + Glyph* m_table[256]; + + fp4 m_lineHeight; + + fp4 m_texLineHeight; + + spCImage m_spTextImage; + + spCTextureFlat m_spTextTexture; + + public: + CFontGL( spCTextureFlat textTexture ); + virtual ~CFontGL(); + + bool Create( void ); + + fp4 LineHeight( void ) const; + + fp4 TexLineHeight( void ) const; + + fp4 CharWidth( uint8 c ) const; + + fp4 StringWidth( const std::string& str ) const; + + Glyph *GetGlyph( uint8 c ); + + spCTextureFlat GetTexture( void ); + + virtual void Reupload(); + +}; + +MakeSmartPointers( CFontGL ); + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/GLee.c electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/GLee.c --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/GLee.c 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/GLee.c 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,11359 @@ +/*************************************************************************** +* +* GLee.c +* GLee (OpenGL Easy Extension library) +* Version : 5.21 +* +* Copyright (c)2006 Ben Woodhouse All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer as +* the first lines of this file unmodified. +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY BEN WOODHOUSE ``AS IS'' AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +* IN NO EVENT SHALL BEN WOODHOUSE BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +* Web: http://elf-stone.com/glee.php +* +* [This file was automatically generated by GLeeGen 5.21 +* +***************************************************************************/ + +#ifdef _MSC_VER + #pragma optimize( "g", off ) +#endif + +#include +#include +#include +#include "GLee.h" + +#if defined(__APPLE__) || defined(__APPLE_CC__) + #include +#endif + +typedef GLuint(*GLEE_LINK_FUNCTION)(void); + +GLboolean __GLeeInited=GL_FALSE; + +#ifndef _WIN32 + #define __stdcall /* nothing */ +#endif + +void * __GLeeGetProcAddress(const char *extname) +{ +#ifdef WIN32 + return (void*)wglGetProcAddress(extname); +#elif defined(__APPLE__) || defined(__APPLE_CC__) + CFBundleRef bundle; + CFURLRef bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, CFSTR("/System/Library/Frameworks/OpenGL.framework"), kCFURLPOSIXPathStyle, true); + + CFStringRef functionName = CFStringCreateWithCString(kCFAllocatorDefault, extname, kCFStringEncodingASCII); + + void *function; + + bundle = CFBundleCreate(kCFAllocatorDefault, bundleURL); + assert(bundle != NULL); + + function = CFBundleGetFunctionPointerForName(bundle, functionName); + + CFRelease(bundleURL); + CFRelease(functionName); + CFRelease(bundle); + + return function; +#else + return (void*)glXGetProcAddressARB((const GLubyte *)extname); +#endif +} + + + + +/* Extension querying variables */ + +GLboolean _GLEE_VERSION_1_2 = GL_FALSE; +GLboolean _GLEE_ARB_imaging = GL_FALSE; +GLboolean _GLEE_VERSION_1_3 = GL_FALSE; +GLboolean _GLEE_VERSION_1_4 = GL_FALSE; +GLboolean _GLEE_VERSION_1_5 = GL_FALSE; +GLboolean _GLEE_VERSION_2_0 = GL_FALSE; +GLboolean _GLEE_VERSION_2_1 = GL_FALSE; +GLboolean _GLEE_ARB_multitexture = GL_FALSE; +GLboolean _GLEE_ARB_transpose_matrix = GL_FALSE; +GLboolean _GLEE_ARB_multisample = GL_FALSE; +GLboolean _GLEE_ARB_texture_env_add = GL_FALSE; +GLboolean _GLEE_ARB_texture_cube_map = GL_FALSE; +GLboolean _GLEE_ARB_texture_compression = GL_FALSE; +GLboolean _GLEE_ARB_texture_border_clamp = GL_FALSE; +GLboolean _GLEE_ARB_point_parameters = GL_FALSE; +GLboolean _GLEE_ARB_vertex_blend = GL_FALSE; +GLboolean _GLEE_ARB_matrix_palette = GL_FALSE; +GLboolean _GLEE_ARB_texture_env_combine = GL_FALSE; +GLboolean _GLEE_ARB_texture_env_crossbar = GL_FALSE; +GLboolean _GLEE_ARB_texture_env_dot3 = GL_FALSE; +GLboolean _GLEE_ARB_texture_mirrored_repeat = GL_FALSE; +GLboolean _GLEE_ARB_depth_texture = GL_FALSE; +GLboolean _GLEE_ARB_shadow = GL_FALSE; +GLboolean _GLEE_ARB_shadow_ambient = GL_FALSE; +GLboolean _GLEE_ARB_window_pos = GL_FALSE; +GLboolean _GLEE_ARB_vertex_program = GL_FALSE; +GLboolean _GLEE_ARB_fragment_program = GL_FALSE; +GLboolean _GLEE_ARB_vertex_buffer_object = GL_FALSE; +GLboolean _GLEE_ARB_occlusion_query = GL_FALSE; +GLboolean _GLEE_ARB_shader_objects = GL_FALSE; +GLboolean _GLEE_ARB_vertex_shader = GL_FALSE; +GLboolean _GLEE_ARB_fragment_shader = GL_FALSE; +GLboolean _GLEE_ARB_shading_language_100 = GL_FALSE; +GLboolean _GLEE_ARB_texture_non_power_of_two = GL_FALSE; +GLboolean _GLEE_ARB_point_sprite = GL_FALSE; +GLboolean _GLEE_ARB_fragment_program_shadow = GL_FALSE; +GLboolean _GLEE_ARB_draw_buffers = GL_FALSE; +GLboolean _GLEE_ARB_texture_rectangle = GL_FALSE; +GLboolean _GLEE_ARB_color_buffer_float = GL_FALSE; +GLboolean _GLEE_ARB_half_float_pixel = GL_FALSE; +GLboolean _GLEE_ARB_texture_float = GL_FALSE; +GLboolean _GLEE_ARB_pixel_buffer_object = GL_FALSE; +GLboolean _GLEE_EXT_abgr = GL_FALSE; +GLboolean _GLEE_EXT_blend_color = GL_FALSE; +GLboolean _GLEE_EXT_polygon_offset = GL_FALSE; +GLboolean _GLEE_EXT_texture = GL_FALSE; +GLboolean _GLEE_EXT_texture3D = GL_FALSE; +GLboolean _GLEE_SGIS_texture_filter4 = GL_FALSE; +GLboolean _GLEE_EXT_subtexture = GL_FALSE; +GLboolean _GLEE_EXT_copy_texture = GL_FALSE; +GLboolean _GLEE_EXT_histogram = GL_FALSE; +GLboolean _GLEE_EXT_convolution = GL_FALSE; +GLboolean _GLEE_SGI_color_matrix = GL_FALSE; +GLboolean _GLEE_SGI_color_table = GL_FALSE; +GLboolean _GLEE_SGIS_pixel_texture = GL_FALSE; +GLboolean _GLEE_SGIX_pixel_texture = GL_FALSE; +GLboolean _GLEE_SGIS_texture4D = GL_FALSE; +GLboolean _GLEE_SGI_texture_color_table = GL_FALSE; +GLboolean _GLEE_EXT_cmyka = GL_FALSE; +GLboolean _GLEE_EXT_texture_object = GL_FALSE; +GLboolean _GLEE_SGIS_detail_texture = GL_FALSE; +GLboolean _GLEE_SGIS_sharpen_texture = GL_FALSE; +GLboolean _GLEE_EXT_packed_pixels = GL_FALSE; +GLboolean _GLEE_SGIS_texture_lod = GL_FALSE; +GLboolean _GLEE_SGIS_multisample = GL_FALSE; +GLboolean _GLEE_EXT_rescale_normal = GL_FALSE; +GLboolean _GLEE_EXT_vertex_array = GL_FALSE; +GLboolean _GLEE_EXT_misc_attribute = GL_FALSE; +GLboolean _GLEE_SGIS_generate_mipmap = GL_FALSE; +GLboolean _GLEE_SGIX_clipmap = GL_FALSE; +GLboolean _GLEE_SGIX_shadow = GL_FALSE; +GLboolean _GLEE_SGIS_texture_edge_clamp = GL_FALSE; +GLboolean _GLEE_SGIS_texture_border_clamp = GL_FALSE; +GLboolean _GLEE_EXT_blend_minmax = GL_FALSE; +GLboolean _GLEE_EXT_blend_subtract = GL_FALSE; +GLboolean _GLEE_EXT_blend_logic_op = GL_FALSE; +GLboolean _GLEE_SGIX_interlace = GL_FALSE; +GLboolean _GLEE_SGIX_pixel_tiles = GL_FALSE; +GLboolean _GLEE_SGIS_texture_select = GL_FALSE; +GLboolean _GLEE_SGIX_sprite = GL_FALSE; +GLboolean _GLEE_SGIX_texture_multi_buffer = GL_FALSE; +GLboolean _GLEE_EXT_point_parameters = GL_FALSE; +GLboolean _GLEE_SGIS_point_parameters = GL_FALSE; +GLboolean _GLEE_SGIX_instruments = GL_FALSE; +GLboolean _GLEE_SGIX_texture_scale_bias = GL_FALSE; +GLboolean _GLEE_SGIX_framezoom = GL_FALSE; +GLboolean _GLEE_SGIX_tag_sample_buffer = GL_FALSE; +GLboolean _GLEE_FfdMaskSGIX = GL_FALSE; +GLboolean _GLEE_SGIX_polynomial_ffd = GL_FALSE; +GLboolean _GLEE_SGIX_reference_plane = GL_FALSE; +GLboolean _GLEE_SGIX_flush_raster = GL_FALSE; +GLboolean _GLEE_SGIX_depth_texture = GL_FALSE; +GLboolean _GLEE_SGIS_fog_function = GL_FALSE; +GLboolean _GLEE_SGIX_fog_offset = GL_FALSE; +GLboolean _GLEE_HP_image_transform = GL_FALSE; +GLboolean _GLEE_HP_convolution_border_modes = GL_FALSE; +GLboolean _GLEE_INGR_palette_buffer = GL_FALSE; +GLboolean _GLEE_SGIX_texture_add_env = GL_FALSE; +GLboolean _GLEE_EXT_color_subtable = GL_FALSE; +GLboolean _GLEE_PGI_vertex_hints = GL_FALSE; +GLboolean _GLEE_PGI_misc_hints = GL_FALSE; +GLboolean _GLEE_EXT_paletted_texture = GL_FALSE; +GLboolean _GLEE_EXT_clip_volume_hint = GL_FALSE; +GLboolean _GLEE_SGIX_list_priority = GL_FALSE; +GLboolean _GLEE_SGIX_ir_instrument1 = GL_FALSE; +GLboolean _GLEE_SGIX_calligraphic_fragment = GL_FALSE; +GLboolean _GLEE_SGIX_texture_lod_bias = GL_FALSE; +GLboolean _GLEE_SGIX_shadow_ambient = GL_FALSE; +GLboolean _GLEE_EXT_index_texture = GL_FALSE; +GLboolean _GLEE_EXT_index_material = GL_FALSE; +GLboolean _GLEE_EXT_index_func = GL_FALSE; +GLboolean _GLEE_EXT_index_array_formats = GL_FALSE; +GLboolean _GLEE_EXT_compiled_vertex_array = GL_FALSE; +GLboolean _GLEE_EXT_cull_vertex = GL_FALSE; +GLboolean _GLEE_SGIX_ycrcb = GL_FALSE; +GLboolean _GLEE_SGIX_fragment_lighting = GL_FALSE; +GLboolean _GLEE_IBM_rasterpos_clip = GL_FALSE; +GLboolean _GLEE_HP_texture_lighting = GL_FALSE; +GLboolean _GLEE_EXT_draw_range_elements = GL_FALSE; +GLboolean _GLEE_WIN_phong_shading = GL_FALSE; +GLboolean _GLEE_WIN_specular_fog = GL_FALSE; +GLboolean _GLEE_EXT_light_texture = GL_FALSE; +GLboolean _GLEE_SGIX_blend_alpha_minmax = GL_FALSE; +GLboolean _GLEE_SGIX_impact_pixel_texture = GL_FALSE; +GLboolean _GLEE_EXT_bgra = GL_FALSE; +GLboolean _GLEE_SGIX_async = GL_FALSE; +GLboolean _GLEE_SGIX_async_pixel = GL_FALSE; +GLboolean _GLEE_SGIX_async_histogram = GL_FALSE; +GLboolean _GLEE_INTEL_texture_scissor = GL_FALSE; +GLboolean _GLEE_INTEL_parallel_arrays = GL_FALSE; +GLboolean _GLEE_HP_occlusion_test = GL_FALSE; +GLboolean _GLEE_EXT_pixel_transform = GL_FALSE; +GLboolean _GLEE_EXT_pixel_transform_color_table = GL_FALSE; +GLboolean _GLEE_EXT_shared_texture_palette = GL_FALSE; +GLboolean _GLEE_EXT_separate_specular_color = GL_FALSE; +GLboolean _GLEE_EXT_secondary_color = GL_FALSE; +GLboolean _GLEE_EXT_texture_perturb_normal = GL_FALSE; +GLboolean _GLEE_EXT_multi_draw_arrays = GL_FALSE; +GLboolean _GLEE_EXT_fog_coord = GL_FALSE; +GLboolean _GLEE_REND_screen_coordinates = GL_FALSE; +GLboolean _GLEE_EXT_coordinate_frame = GL_FALSE; +GLboolean _GLEE_EXT_texture_env_combine = GL_FALSE; +GLboolean _GLEE_APPLE_specular_vector = GL_FALSE; +GLboolean _GLEE_APPLE_transform_hint = GL_FALSE; +GLboolean _GLEE_SGIX_fog_scale = GL_FALSE; +GLboolean _GLEE_SUNX_constant_data = GL_FALSE; +GLboolean _GLEE_SUN_global_alpha = GL_FALSE; +GLboolean _GLEE_SUN_triangle_list = GL_FALSE; +GLboolean _GLEE_SUN_vertex = GL_FALSE; +GLboolean _GLEE_EXT_blend_func_separate = GL_FALSE; +GLboolean _GLEE_INGR_color_clamp = GL_FALSE; +GLboolean _GLEE_INGR_interlace_read = GL_FALSE; +GLboolean _GLEE_EXT_stencil_wrap = GL_FALSE; +GLboolean _GLEE_EXT_422_pixels = GL_FALSE; +GLboolean _GLEE_NV_texgen_reflection = GL_FALSE; +GLboolean _GLEE_EXT_texture_cube_map = GL_FALSE; +GLboolean _GLEE_SUN_convolution_border_modes = GL_FALSE; +GLboolean _GLEE_EXT_texture_env_add = GL_FALSE; +GLboolean _GLEE_EXT_texture_lod_bias = GL_FALSE; +GLboolean _GLEE_EXT_texture_filter_anisotropic = GL_FALSE; +GLboolean _GLEE_EXT_vertex_weighting = GL_FALSE; +GLboolean _GLEE_NV_light_max_exponent = GL_FALSE; +GLboolean _GLEE_NV_vertex_array_range = GL_FALSE; +GLboolean _GLEE_NV_register_combiners = GL_FALSE; +GLboolean _GLEE_NV_fog_distance = GL_FALSE; +GLboolean _GLEE_NV_texgen_emboss = GL_FALSE; +GLboolean _GLEE_NV_blend_square = GL_FALSE; +GLboolean _GLEE_NV_texture_env_combine4 = GL_FALSE; +GLboolean _GLEE_MESA_resize_buffers = GL_FALSE; +GLboolean _GLEE_MESA_window_pos = GL_FALSE; +GLboolean _GLEE_EXT_texture_compression_s3tc = GL_FALSE; +GLboolean _GLEE_IBM_cull_vertex = GL_FALSE; +GLboolean _GLEE_IBM_multimode_draw_arrays = GL_FALSE; +GLboolean _GLEE_IBM_vertex_array_lists = GL_FALSE; +GLboolean _GLEE_SGIX_subsample = GL_FALSE; +GLboolean _GLEE_SGIX_ycrcb_subsample = GL_FALSE; +GLboolean _GLEE_SGIX_ycrcba = GL_FALSE; +GLboolean _GLEE_SGI_depth_pass_instrument = GL_FALSE; +GLboolean _GLEE_3DFX_texture_compression_FXT1 = GL_FALSE; +GLboolean _GLEE_3DFX_multisample = GL_FALSE; +GLboolean _GLEE_3DFX_tbuffer = GL_FALSE; +GLboolean _GLEE_EXT_multisample = GL_FALSE; +GLboolean _GLEE_SGIX_vertex_preclip = GL_FALSE; +GLboolean _GLEE_SGIX_convolution_accuracy = GL_FALSE; +GLboolean _GLEE_SGIX_resample = GL_FALSE; +GLboolean _GLEE_SGIS_point_line_texgen = GL_FALSE; +GLboolean _GLEE_SGIS_texture_color_mask = GL_FALSE; +GLboolean _GLEE_EXT_texture_env_dot3 = GL_FALSE; +GLboolean _GLEE_ATI_texture_mirror_once = GL_FALSE; +GLboolean _GLEE_NV_fence = GL_FALSE; +GLboolean _GLEE_IBM_texture_mirrored_repeat = GL_FALSE; +GLboolean _GLEE_NV_evaluators = GL_FALSE; +GLboolean _GLEE_NV_packed_depth_stencil = GL_FALSE; +GLboolean _GLEE_NV_register_combiners2 = GL_FALSE; +GLboolean _GLEE_NV_texture_compression_vtc = GL_FALSE; +GLboolean _GLEE_NV_texture_rectangle = GL_FALSE; +GLboolean _GLEE_NV_texture_shader = GL_FALSE; +GLboolean _GLEE_NV_texture_shader2 = GL_FALSE; +GLboolean _GLEE_NV_vertex_array_range2 = GL_FALSE; +GLboolean _GLEE_NV_vertex_program = GL_FALSE; +GLboolean _GLEE_SGIX_texture_coordinate_clamp = GL_FALSE; +GLboolean _GLEE_SGIX_scalebias_hint = GL_FALSE; +GLboolean _GLEE_OML_interlace = GL_FALSE; +GLboolean _GLEE_OML_subsample = GL_FALSE; +GLboolean _GLEE_OML_resample = GL_FALSE; +GLboolean _GLEE_NV_copy_depth_to_color = GL_FALSE; +GLboolean _GLEE_ATI_envmap_bumpmap = GL_FALSE; +GLboolean _GLEE_ATI_fragment_shader = GL_FALSE; +GLboolean _GLEE_ATI_pn_triangles = GL_FALSE; +GLboolean _GLEE_ATI_vertex_array_object = GL_FALSE; +GLboolean _GLEE_EXT_vertex_shader = GL_FALSE; +GLboolean _GLEE_ATI_vertex_streams = GL_FALSE; +GLboolean _GLEE_ATI_element_array = GL_FALSE; +GLboolean _GLEE_SUN_mesh_array = GL_FALSE; +GLboolean _GLEE_SUN_slice_accum = GL_FALSE; +GLboolean _GLEE_NV_multisample_filter_hint = GL_FALSE; +GLboolean _GLEE_NV_depth_clamp = GL_FALSE; +GLboolean _GLEE_NV_occlusion_query = GL_FALSE; +GLboolean _GLEE_NV_point_sprite = GL_FALSE; +GLboolean _GLEE_NV_texture_shader3 = GL_FALSE; +GLboolean _GLEE_NV_vertex_program1_1 = GL_FALSE; +GLboolean _GLEE_EXT_shadow_funcs = GL_FALSE; +GLboolean _GLEE_EXT_stencil_two_side = GL_FALSE; +GLboolean _GLEE_ATI_text_fragment_shader = GL_FALSE; +GLboolean _GLEE_APPLE_client_storage = GL_FALSE; +GLboolean _GLEE_APPLE_element_array = GL_FALSE; +GLboolean _GLEE_APPLE_fence = GL_FALSE; +GLboolean _GLEE_APPLE_vertex_array_object = GL_FALSE; +GLboolean _GLEE_APPLE_vertex_array_range = GL_FALSE; +GLboolean _GLEE_APPLE_ycbcr_422 = GL_FALSE; +GLboolean _GLEE_S3_s3tc = GL_FALSE; +GLboolean _GLEE_ATI_draw_buffers = GL_FALSE; +GLboolean _GLEE_ATI_pixel_format_float = GL_FALSE; +GLboolean _GLEE_ATI_texture_env_combine3 = GL_FALSE; +GLboolean _GLEE_ATI_texture_float = GL_FALSE; +GLboolean _GLEE_NV_float_buffer = GL_FALSE; +GLboolean _GLEE_NV_fragment_program = GL_FALSE; +GLboolean _GLEE_NV_half_float = GL_FALSE; +GLboolean _GLEE_NV_pixel_data_range = GL_FALSE; +GLboolean _GLEE_NV_primitive_restart = GL_FALSE; +GLboolean _GLEE_NV_texture_expand_normal = GL_FALSE; +GLboolean _GLEE_NV_vertex_program2 = GL_FALSE; +GLboolean _GLEE_ATI_map_object_buffer = GL_FALSE; +GLboolean _GLEE_ATI_separate_stencil = GL_FALSE; +GLboolean _GLEE_ATI_vertex_attrib_array_object = GL_FALSE; +GLboolean _GLEE_OES_read_format = GL_FALSE; +GLboolean _GLEE_EXT_depth_bounds_test = GL_FALSE; +GLboolean _GLEE_EXT_texture_mirror_clamp = GL_FALSE; +GLboolean _GLEE_EXT_blend_equation_separate = GL_FALSE; +GLboolean _GLEE_MESA_pack_invert = GL_FALSE; +GLboolean _GLEE_MESA_ycbcr_texture = GL_FALSE; +GLboolean _GLEE_EXT_pixel_buffer_object = GL_FALSE; +GLboolean _GLEE_NV_fragment_program_option = GL_FALSE; +GLboolean _GLEE_NV_fragment_program2 = GL_FALSE; +GLboolean _GLEE_NV_vertex_program2_option = GL_FALSE; +GLboolean _GLEE_NV_vertex_program3 = GL_FALSE; +GLboolean _GLEE_EXT_framebuffer_object = GL_FALSE; +GLboolean _GLEE_GREMEDY_string_marker = GL_FALSE; +GLboolean _GLEE_EXT_Cg_shader = GL_FALSE; +GLboolean _GLEE_EXT_timer_query = GL_FALSE; +GLboolean _GLEE_EXT_texture_buffer_object = GL_FALSE; +GLboolean _GLEE_EXT_gpu_shader4 = GL_FALSE; +GLboolean _GLEE_EXT_geometry_shader4 = GL_FALSE; +GLboolean _GLEE_EXT_bindable_uniform = GL_FALSE; +GLboolean _GLEE_EXT_framebuffer_sRGB = GL_FALSE; +GLboolean _GLEE_EXT_texture_shared_exponent = GL_FALSE; +GLboolean _GLEE_EXT_packed_float = GL_FALSE; +GLboolean _GLEE_EXT_texture_array = GL_FALSE; +GLboolean _GLEE_EXT_texture_integer = GL_FALSE; +GLboolean _GLEE_NV_depth_buffer_float = GL_FALSE; +GLboolean _GLEE_EXT_texture_compression_latc = GL_FALSE; +GLboolean _GLEE_NV_transform_feedback = GL_FALSE; +GLboolean _GLEE_NV_geometry_program4 = GL_FALSE; +GLboolean _GLEE_NV_gpu_program4 = GL_FALSE; +GLboolean _GLEE_NV_framebuffer_multisample_coverage = GL_FALSE; +GLboolean _GLEE_EXT_framebuffer_multisample = GL_FALSE; +GLboolean _GLEE_EXT_framebuffer_blit = GL_FALSE; +GLboolean _GLEE_EXT_texture_compression_rgtc = GL_FALSE; +GLboolean _GLEE_EXT_color_matrix = GL_FALSE; +GLboolean _GLEE_SGIX_texture_select = GL_FALSE; +GLboolean _GLEE_INGR_blend_func_separate = GL_FALSE; +GLboolean _GLEE_SGIX_depth_pass_instrument = GL_FALSE; +GLboolean _GLEE_SGIX_igloo_interface = GL_FALSE; +GLboolean _GLEE_EXT_draw_buffers2 = GL_FALSE; +GLboolean _GLEE_NV_parameter_buffer_object = GL_FALSE; +GLboolean _GLEE_EXT_draw_instanced = GL_FALSE; +GLboolean _GLEE_EXT_fragment_lighting = GL_FALSE; +GLboolean _GLEE_EXT_packed_depth_stencil = GL_FALSE; +GLboolean _GLEE_EXT_scene_marker = GL_FALSE; +GLboolean _GLEE_EXT_stencil_clear_tag = GL_FALSE; +GLboolean _GLEE_EXT_texture_compression_dxt1 = GL_FALSE; +GLboolean _GLEE_EXT_texture_env = GL_FALSE; +GLboolean _GLEE_EXT_texture_sRGB = GL_FALSE; +GLboolean _GLEE_IBM_static_data = GL_FALSE; +GLboolean _GLEE_MESAX_texture_stack = GL_FALSE; +GLboolean _GLEE_OES_byte_coordinates = GL_FALSE; +GLboolean _GLEE_OES_compressed_paletted_texture = GL_FALSE; +GLboolean _GLEE_OES_single_precision = GL_FALSE; +GLboolean _GLEE_SGIX_pixel_texture_bits = GL_FALSE; +GLboolean _GLEE_SGIX_texture_range = GL_FALSE; + +/* GL Extension names */ + +char __GLeeGLExtensionNames[300][39]={ + "GL_VERSION_1_2", + "GL_ARB_imaging", + "GL_VERSION_1_3", + "GL_VERSION_1_4", + "GL_VERSION_1_5", + "GL_VERSION_2_0", + "GL_VERSION_2_1", + "GL_ARB_multitexture", + "GL_ARB_transpose_matrix", + "GL_ARB_multisample", + "GL_ARB_texture_env_add", + "GL_ARB_texture_cube_map", + "GL_ARB_texture_compression", + "GL_ARB_texture_border_clamp", + "GL_ARB_point_parameters", + "GL_ARB_vertex_blend", + "GL_ARB_matrix_palette", + "GL_ARB_texture_env_combine", + "GL_ARB_texture_env_crossbar", + "GL_ARB_texture_env_dot3", + "GL_ARB_texture_mirrored_repeat", + "GL_ARB_depth_texture", + "GL_ARB_shadow", + "GL_ARB_shadow_ambient", + "GL_ARB_window_pos", + "GL_ARB_vertex_program", + "GL_ARB_fragment_program", + "GL_ARB_vertex_buffer_object", + "GL_ARB_occlusion_query", + "GL_ARB_shader_objects", + "GL_ARB_vertex_shader", + "GL_ARB_fragment_shader", + "GL_ARB_shading_language_100", + "GL_ARB_texture_non_power_of_two", + "GL_ARB_point_sprite", + "GL_ARB_fragment_program_shadow", + "GL_ARB_draw_buffers", + "GL_ARB_texture_rectangle", + "GL_ARB_color_buffer_float", + "GL_ARB_half_float_pixel", + "GL_ARB_texture_float", + "GL_ARB_pixel_buffer_object", + "GL_EXT_abgr", + "GL_EXT_blend_color", + "GL_EXT_polygon_offset", + "GL_EXT_texture", + "GL_EXT_texture3D", + "GL_SGIS_texture_filter4", + "GL_EXT_subtexture", + "GL_EXT_copy_texture", + "GL_EXT_histogram", + "GL_EXT_convolution", + "GL_SGI_color_matrix", + "GL_SGI_color_table", + "GL_SGIS_pixel_texture", + "GL_SGIX_pixel_texture", + "GL_SGIS_texture4D", + "GL_SGI_texture_color_table", + "GL_EXT_cmyka", + "GL_EXT_texture_object", + "GL_SGIS_detail_texture", + "GL_SGIS_sharpen_texture", + "GL_EXT_packed_pixels", + "GL_SGIS_texture_lod", + "GL_SGIS_multisample", + "GL_EXT_rescale_normal", + "GL_EXT_vertex_array", + "GL_EXT_misc_attribute", + "GL_SGIS_generate_mipmap", + "GL_SGIX_clipmap", + "GL_SGIX_shadow", + "GL_SGIS_texture_edge_clamp", + "GL_SGIS_texture_border_clamp", + "GL_EXT_blend_minmax", + "GL_EXT_blend_subtract", + "GL_EXT_blend_logic_op", + "GL_SGIX_interlace", + "GL_SGIX_pixel_tiles", + "GL_SGIS_texture_select", + "GL_SGIX_sprite", + "GL_SGIX_texture_multi_buffer", + "GL_EXT_point_parameters", + "GL_SGIS_point_parameters", + "GL_SGIX_instruments", + "GL_SGIX_texture_scale_bias", + "GL_SGIX_framezoom", + "GL_SGIX_tag_sample_buffer", + "GL_FfdMaskSGIX", + "GL_SGIX_polynomial_ffd", + "GL_SGIX_reference_plane", + "GL_SGIX_flush_raster", + "GL_SGIX_depth_texture", + "GL_SGIS_fog_function", + "GL_SGIX_fog_offset", + "GL_HP_image_transform", + "GL_HP_convolution_border_modes", + "GL_INGR_palette_buffer", + "GL_SGIX_texture_add_env", + "GL_EXT_color_subtable", + "GL_PGI_vertex_hints", + "GL_PGI_misc_hints", + "GL_EXT_paletted_texture", + "GL_EXT_clip_volume_hint", + "GL_SGIX_list_priority", + "GL_SGIX_ir_instrument1", + "GL_SGIX_calligraphic_fragment", + "GL_SGIX_texture_lod_bias", + "GL_SGIX_shadow_ambient", + "GL_EXT_index_texture", + "GL_EXT_index_material", + "GL_EXT_index_func", + "GL_EXT_index_array_formats", + "GL_EXT_compiled_vertex_array", + "GL_EXT_cull_vertex", + "GL_SGIX_ycrcb", + "GL_SGIX_fragment_lighting", + "GL_IBM_rasterpos_clip", + "GL_HP_texture_lighting", + "GL_EXT_draw_range_elements", + "GL_WIN_phong_shading", + "GL_WIN_specular_fog", + "GL_EXT_light_texture", + "GL_SGIX_blend_alpha_minmax", + "GL_SGIX_impact_pixel_texture", + "GL_EXT_bgra", + "GL_SGIX_async", + "GL_SGIX_async_pixel", + "GL_SGIX_async_histogram", + "GL_INTEL_texture_scissor", + "GL_INTEL_parallel_arrays", + "GL_HP_occlusion_test", + "GL_EXT_pixel_transform", + "GL_EXT_pixel_transform_color_table", + "GL_EXT_shared_texture_palette", + "GL_EXT_separate_specular_color", + "GL_EXT_secondary_color", + "GL_EXT_texture_perturb_normal", + "GL_EXT_multi_draw_arrays", + "GL_EXT_fog_coord", + "GL_REND_screen_coordinates", + "GL_EXT_coordinate_frame", + "GL_EXT_texture_env_combine", + "GL_APPLE_specular_vector", + "GL_APPLE_transform_hint", + "GL_SGIX_fog_scale", + "GL_SUNX_constant_data", + "GL_SUN_global_alpha", + "GL_SUN_triangle_list", + "GL_SUN_vertex", + "GL_EXT_blend_func_separate", + "GL_INGR_color_clamp", + "GL_INGR_interlace_read", + "GL_EXT_stencil_wrap", + "GL_EXT_422_pixels", + "GL_NV_texgen_reflection", + "GL_EXT_texture_cube_map", + "GL_SUN_convolution_border_modes", + "GL_EXT_texture_env_add", + "GL_EXT_texture_lod_bias", + "GL_EXT_texture_filter_anisotropic", + "GL_EXT_vertex_weighting", + "GL_NV_light_max_exponent", + "GL_NV_vertex_array_range", + "GL_NV_register_combiners", + "GL_NV_fog_distance", + "GL_NV_texgen_emboss", + "GL_NV_blend_square", + "GL_NV_texture_env_combine4", + "GL_MESA_resize_buffers", + "GL_MESA_window_pos", + "GL_EXT_texture_compression_s3tc", + "GL_IBM_cull_vertex", + "GL_IBM_multimode_draw_arrays", + "GL_IBM_vertex_array_lists", + "GL_SGIX_subsample", + "GL_SGIX_ycrcb_subsample", + "GL_SGIX_ycrcba", + "GL_SGI_depth_pass_instrument", + "GL_3DFX_texture_compression_FXT1", + "GL_3DFX_multisample", + "GL_3DFX_tbuffer", + "GL_EXT_multisample", + "GL_SGIX_vertex_preclip", + "GL_SGIX_convolution_accuracy", + "GL_SGIX_resample", + "GL_SGIS_point_line_texgen", + "GL_SGIS_texture_color_mask", + "GL_EXT_texture_env_dot3", + "GL_ATI_texture_mirror_once", + "GL_NV_fence", + "GL_IBM_texture_mirrored_repeat", + "GL_NV_evaluators", + "GL_NV_packed_depth_stencil", + "GL_NV_register_combiners2", + "GL_NV_texture_compression_vtc", + "GL_NV_texture_rectangle", + "GL_NV_texture_shader", + "GL_NV_texture_shader2", + "GL_NV_vertex_array_range2", + "GL_NV_vertex_program", + "GL_SGIX_texture_coordinate_clamp", + "GL_SGIX_scalebias_hint", + "GL_OML_interlace", + "GL_OML_subsample", + "GL_OML_resample", + "GL_NV_copy_depth_to_color", + "GL_ATI_envmap_bumpmap", + "GL_ATI_fragment_shader", + "GL_ATI_pn_triangles", + "GL_ATI_vertex_array_object", + "GL_EXT_vertex_shader", + "GL_ATI_vertex_streams", + "GL_ATI_element_array", + "GL_SUN_mesh_array", + "GL_SUN_slice_accum", + "GL_NV_multisample_filter_hint", + "GL_NV_depth_clamp", + "GL_NV_occlusion_query", + "GL_NV_point_sprite", + "GL_NV_texture_shader3", + "GL_NV_vertex_program1_1", + "GL_EXT_shadow_funcs", + "GL_EXT_stencil_two_side", + "GL_ATI_text_fragment_shader", + "GL_APPLE_client_storage", + "GL_APPLE_element_array", + "GL_APPLE_fence", + "GL_APPLE_vertex_array_object", + "GL_APPLE_vertex_array_range", + "GL_APPLE_ycbcr_422", + "GL_S3_s3tc", + "GL_ATI_draw_buffers", + "GL_ATI_pixel_format_float", + "GL_ATI_texture_env_combine3", + "GL_ATI_texture_float", + "GL_NV_float_buffer", + "GL_NV_fragment_program", + "GL_NV_half_float", + "GL_NV_pixel_data_range", + "GL_NV_primitive_restart", + "GL_NV_texture_expand_normal", + "GL_NV_vertex_program2", + "GL_ATI_map_object_buffer", + "GL_ATI_separate_stencil", + "GL_ATI_vertex_attrib_array_object", + "GL_OES_read_format", + "GL_EXT_depth_bounds_test", + "GL_EXT_texture_mirror_clamp", + "GL_EXT_blend_equation_separate", + "GL_MESA_pack_invert", + "GL_MESA_ycbcr_texture", + "GL_EXT_pixel_buffer_object", + "GL_NV_fragment_program_option", + "GL_NV_fragment_program2", + "GL_NV_vertex_program2_option", + "GL_NV_vertex_program3", + "GL_EXT_framebuffer_object", + "GL_GREMEDY_string_marker", + "GL_EXT_Cg_shader", + "GL_EXT_timer_query", + "GL_EXT_texture_buffer_object", + "GL_EXT_gpu_shader4", + "GL_EXT_geometry_shader4", + "GL_EXT_bindable_uniform", + "GL_EXT_framebuffer_sRGB", + "GL_EXT_texture_shared_exponent", + "GL_EXT_packed_float", + "GL_EXT_texture_array", + "GL_EXT_texture_integer", + "GL_NV_depth_buffer_float", + "GL_EXT_texture_compression_latc", + "GL_NV_transform_feedback", + "GL_NV_geometry_program4", + "GL_NV_gpu_program4", + "GL_NV_framebuffer_multisample_coverage", + "GL_EXT_framebuffer_multisample", + "GL_EXT_framebuffer_blit", + "GL_EXT_texture_compression_rgtc", + "GL_EXT_color_matrix", + "GL_SGIX_texture_select", + "GL_INGR_blend_func_separate", + "GL_SGIX_depth_pass_instrument", + "GL_SGIX_igloo_interface", + "GL_EXT_draw_buffers2", + "GL_NV_parameter_buffer_object", + "GL_EXT_draw_instanced", + "GL_EXT_fragment_lighting", + "GL_EXT_packed_depth_stencil", + "GL_EXT_scene_marker", + "GL_EXT_stencil_clear_tag", + "GL_EXT_texture_compression_dxt1", + "GL_EXT_texture_env", + "GL_EXT_texture_sRGB", + "GL_IBM_static_data", + "GL_MESAX_texture_stack", + "GL_OES_byte_coordinates", + "GL_OES_compressed_paletted_texture", + "GL_OES_single_precision", + "GL_SGIX_pixel_texture_bits", + "GL_SGIX_texture_range" +}; +int __GLeeGLNumExtensions=300; + +/* GL_VERSION_1_2 */ + +#ifdef __GLEE_GL_VERSION_1_2 +void __stdcall _Lazy_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {if (GLeeInit()) glBlendColor(red, green, blue, alpha);} +void __stdcall _Lazy_glBlendEquation(GLenum mode) {if (GLeeInit()) glBlendEquation(mode);} +void __stdcall _Lazy_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices) {if (GLeeInit()) glDrawRangeElements(mode, start, end, count, type, indices);} +void __stdcall _Lazy_glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) {if (GLeeInit()) glColorTable(target, internalformat, width, format, type, table);} +void __stdcall _Lazy_glColorTableParameterfv(GLenum target, GLenum pname, const GLfloat * params) {if (GLeeInit()) glColorTableParameterfv(target, pname, params);} +void __stdcall _Lazy_glColorTableParameteriv(GLenum target, GLenum pname, const GLint * params) {if (GLeeInit()) glColorTableParameteriv(target, pname, params);} +void __stdcall _Lazy_glCopyColorTable(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) {if (GLeeInit()) glCopyColorTable(target, internalformat, x, y, width);} +void __stdcall _Lazy_glGetColorTable(GLenum target, GLenum format, GLenum type, GLvoid * table) {if (GLeeInit()) glGetColorTable(target, format, type, table);} +void __stdcall _Lazy_glGetColorTableParameterfv(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetColorTableParameterfv(target, pname, params);} +void __stdcall _Lazy_glGetColorTableParameteriv(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetColorTableParameteriv(target, pname, params);} +void __stdcall _Lazy_glColorSubTable(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) {if (GLeeInit()) glColorSubTable(target, start, count, format, type, data);} +void __stdcall _Lazy_glCopyColorSubTable(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) {if (GLeeInit()) glCopyColorSubTable(target, start, x, y, width);} +void __stdcall _Lazy_glConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) {if (GLeeInit()) glConvolutionFilter1D(target, internalformat, width, format, type, image);} +void __stdcall _Lazy_glConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) {if (GLeeInit()) glConvolutionFilter2D(target, internalformat, width, height, format, type, image);} +void __stdcall _Lazy_glConvolutionParameterf(GLenum target, GLenum pname, GLfloat params) {if (GLeeInit()) glConvolutionParameterf(target, pname, params);} +void __stdcall _Lazy_glConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat * params) {if (GLeeInit()) glConvolutionParameterfv(target, pname, params);} +void __stdcall _Lazy_glConvolutionParameteri(GLenum target, GLenum pname, GLint params) {if (GLeeInit()) glConvolutionParameteri(target, pname, params);} +void __stdcall _Lazy_glConvolutionParameteriv(GLenum target, GLenum pname, const GLint * params) {if (GLeeInit()) glConvolutionParameteriv(target, pname, params);} +void __stdcall _Lazy_glCopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) {if (GLeeInit()) glCopyConvolutionFilter1D(target, internalformat, x, y, width);} +void __stdcall _Lazy_glCopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) {if (GLeeInit()) glCopyConvolutionFilter2D(target, internalformat, x, y, width, height);} +void __stdcall _Lazy_glGetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid * image) {if (GLeeInit()) glGetConvolutionFilter(target, format, type, image);} +void __stdcall _Lazy_glGetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetConvolutionParameterfv(target, pname, params);} +void __stdcall _Lazy_glGetConvolutionParameteriv(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetConvolutionParameteriv(target, pname, params);} +void __stdcall _Lazy_glGetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) {if (GLeeInit()) glGetSeparableFilter(target, format, type, row, column, span);} +void __stdcall _Lazy_glSeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) {if (GLeeInit()) glSeparableFilter2D(target, internalformat, width, height, format, type, row, column);} +void __stdcall _Lazy_glGetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) {if (GLeeInit()) glGetHistogram(target, reset, format, type, values);} +void __stdcall _Lazy_glGetHistogramParameterfv(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetHistogramParameterfv(target, pname, params);} +void __stdcall _Lazy_glGetHistogramParameteriv(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetHistogramParameteriv(target, pname, params);} +void __stdcall _Lazy_glGetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) {if (GLeeInit()) glGetMinmax(target, reset, format, type, values);} +void __stdcall _Lazy_glGetMinmaxParameterfv(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetMinmaxParameterfv(target, pname, params);} +void __stdcall _Lazy_glGetMinmaxParameteriv(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetMinmaxParameteriv(target, pname, params);} +void __stdcall _Lazy_glHistogram(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) {if (GLeeInit()) glHistogram(target, width, internalformat, sink);} +void __stdcall _Lazy_glMinmax(GLenum target, GLenum internalformat, GLboolean sink) {if (GLeeInit()) glMinmax(target, internalformat, sink);} +void __stdcall _Lazy_glResetHistogram(GLenum target) {if (GLeeInit()) glResetHistogram(target);} +void __stdcall _Lazy_glResetMinmax(GLenum target) {if (GLeeInit()) glResetMinmax(target);} +void __stdcall _Lazy_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) {if (GLeeInit()) glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);} +void __stdcall _Lazy_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) {if (GLeeInit()) glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);} +void __stdcall _Lazy_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {if (GLeeInit()) glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);} +PFNGLBLENDCOLORPROC pglBlendColor=_Lazy_glBlendColor; +PFNGLBLENDEQUATIONPROC pglBlendEquation=_Lazy_glBlendEquation; +PFNGLDRAWRANGEELEMENTSPROC pglDrawRangeElements=_Lazy_glDrawRangeElements; +PFNGLCOLORTABLEPROC pglColorTable=_Lazy_glColorTable; +PFNGLCOLORTABLEPARAMETERFVPROC pglColorTableParameterfv=_Lazy_glColorTableParameterfv; +PFNGLCOLORTABLEPARAMETERIVPROC pglColorTableParameteriv=_Lazy_glColorTableParameteriv; +PFNGLCOPYCOLORTABLEPROC pglCopyColorTable=_Lazy_glCopyColorTable; +PFNGLGETCOLORTABLEPROC pglGetColorTable=_Lazy_glGetColorTable; +PFNGLGETCOLORTABLEPARAMETERFVPROC pglGetColorTableParameterfv=_Lazy_glGetColorTableParameterfv; +PFNGLGETCOLORTABLEPARAMETERIVPROC pglGetColorTableParameteriv=_Lazy_glGetColorTableParameteriv; +PFNGLCOLORSUBTABLEPROC pglColorSubTable=_Lazy_glColorSubTable; +PFNGLCOPYCOLORSUBTABLEPROC pglCopyColorSubTable=_Lazy_glCopyColorSubTable; +PFNGLCONVOLUTIONFILTER1DPROC pglConvolutionFilter1D=_Lazy_glConvolutionFilter1D; +PFNGLCONVOLUTIONFILTER2DPROC pglConvolutionFilter2D=_Lazy_glConvolutionFilter2D; +PFNGLCONVOLUTIONPARAMETERFPROC pglConvolutionParameterf=_Lazy_glConvolutionParameterf; +PFNGLCONVOLUTIONPARAMETERFVPROC pglConvolutionParameterfv=_Lazy_glConvolutionParameterfv; +PFNGLCONVOLUTIONPARAMETERIPROC pglConvolutionParameteri=_Lazy_glConvolutionParameteri; +PFNGLCONVOLUTIONPARAMETERIVPROC pglConvolutionParameteriv=_Lazy_glConvolutionParameteriv; +PFNGLCOPYCONVOLUTIONFILTER1DPROC pglCopyConvolutionFilter1D=_Lazy_glCopyConvolutionFilter1D; +PFNGLCOPYCONVOLUTIONFILTER2DPROC pglCopyConvolutionFilter2D=_Lazy_glCopyConvolutionFilter2D; +PFNGLGETCONVOLUTIONFILTERPROC pglGetConvolutionFilter=_Lazy_glGetConvolutionFilter; +PFNGLGETCONVOLUTIONPARAMETERFVPROC pglGetConvolutionParameterfv=_Lazy_glGetConvolutionParameterfv; +PFNGLGETCONVOLUTIONPARAMETERIVPROC pglGetConvolutionParameteriv=_Lazy_glGetConvolutionParameteriv; +PFNGLGETSEPARABLEFILTERPROC pglGetSeparableFilter=_Lazy_glGetSeparableFilter; +PFNGLSEPARABLEFILTER2DPROC pglSeparableFilter2D=_Lazy_glSeparableFilter2D; +PFNGLGETHISTOGRAMPROC pglGetHistogram=_Lazy_glGetHistogram; +PFNGLGETHISTOGRAMPARAMETERFVPROC pglGetHistogramParameterfv=_Lazy_glGetHistogramParameterfv; +PFNGLGETHISTOGRAMPARAMETERIVPROC pglGetHistogramParameteriv=_Lazy_glGetHistogramParameteriv; +PFNGLGETMINMAXPROC pglGetMinmax=_Lazy_glGetMinmax; +PFNGLGETMINMAXPARAMETERFVPROC pglGetMinmaxParameterfv=_Lazy_glGetMinmaxParameterfv; +PFNGLGETMINMAXPARAMETERIVPROC pglGetMinmaxParameteriv=_Lazy_glGetMinmaxParameteriv; +PFNGLHISTOGRAMPROC pglHistogram=_Lazy_glHistogram; +PFNGLMINMAXPROC pglMinmax=_Lazy_glMinmax; +PFNGLRESETHISTOGRAMPROC pglResetHistogram=_Lazy_glResetHistogram; +PFNGLRESETMINMAXPROC pglResetMinmax=_Lazy_glResetMinmax; +PFNGLTEXIMAGE3DPROC pglTexImage3D=_Lazy_glTexImage3D; +PFNGLTEXSUBIMAGE3DPROC pglTexSubImage3D=_Lazy_glTexSubImage3D; +PFNGLCOPYTEXSUBIMAGE3DPROC pglCopyTexSubImage3D=_Lazy_glCopyTexSubImage3D; +#endif + +/* GL_ARB_imaging */ + +#ifdef __GLEE_GL_ARB_imaging +#endif + +/* GL_VERSION_1_3 */ + +#ifdef __GLEE_GL_VERSION_1_3 +void __stdcall _Lazy_glActiveTexture(GLenum texture) {if (GLeeInit()) glActiveTexture(texture);} +void __stdcall _Lazy_glClientActiveTexture(GLenum texture) {if (GLeeInit()) glClientActiveTexture(texture);} +void __stdcall _Lazy_glMultiTexCoord1d(GLenum target, GLdouble s) {if (GLeeInit()) glMultiTexCoord1d(target, s);} +void __stdcall _Lazy_glMultiTexCoord1dv(GLenum target, const GLdouble * v) {if (GLeeInit()) glMultiTexCoord1dv(target, v);} +void __stdcall _Lazy_glMultiTexCoord1f(GLenum target, GLfloat s) {if (GLeeInit()) glMultiTexCoord1f(target, s);} +void __stdcall _Lazy_glMultiTexCoord1fv(GLenum target, const GLfloat * v) {if (GLeeInit()) glMultiTexCoord1fv(target, v);} +void __stdcall _Lazy_glMultiTexCoord1i(GLenum target, GLint s) {if (GLeeInit()) glMultiTexCoord1i(target, s);} +void __stdcall _Lazy_glMultiTexCoord1iv(GLenum target, const GLint * v) {if (GLeeInit()) glMultiTexCoord1iv(target, v);} +void __stdcall _Lazy_glMultiTexCoord1s(GLenum target, GLshort s) {if (GLeeInit()) glMultiTexCoord1s(target, s);} +void __stdcall _Lazy_glMultiTexCoord1sv(GLenum target, const GLshort * v) {if (GLeeInit()) glMultiTexCoord1sv(target, v);} +void __stdcall _Lazy_glMultiTexCoord2d(GLenum target, GLdouble s, GLdouble t) {if (GLeeInit()) glMultiTexCoord2d(target, s, t);} +void __stdcall _Lazy_glMultiTexCoord2dv(GLenum target, const GLdouble * v) {if (GLeeInit()) glMultiTexCoord2dv(target, v);} +void __stdcall _Lazy_glMultiTexCoord2f(GLenum target, GLfloat s, GLfloat t) {if (GLeeInit()) glMultiTexCoord2f(target, s, t);} +void __stdcall _Lazy_glMultiTexCoord2fv(GLenum target, const GLfloat * v) {if (GLeeInit()) glMultiTexCoord2fv(target, v);} +void __stdcall _Lazy_glMultiTexCoord2i(GLenum target, GLint s, GLint t) {if (GLeeInit()) glMultiTexCoord2i(target, s, t);} +void __stdcall _Lazy_glMultiTexCoord2iv(GLenum target, const GLint * v) {if (GLeeInit()) glMultiTexCoord2iv(target, v);} +void __stdcall _Lazy_glMultiTexCoord2s(GLenum target, GLshort s, GLshort t) {if (GLeeInit()) glMultiTexCoord2s(target, s, t);} +void __stdcall _Lazy_glMultiTexCoord2sv(GLenum target, const GLshort * v) {if (GLeeInit()) glMultiTexCoord2sv(target, v);} +void __stdcall _Lazy_glMultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r) {if (GLeeInit()) glMultiTexCoord3d(target, s, t, r);} +void __stdcall _Lazy_glMultiTexCoord3dv(GLenum target, const GLdouble * v) {if (GLeeInit()) glMultiTexCoord3dv(target, v);} +void __stdcall _Lazy_glMultiTexCoord3f(GLenum target, GLfloat s, GLfloat t, GLfloat r) {if (GLeeInit()) glMultiTexCoord3f(target, s, t, r);} +void __stdcall _Lazy_glMultiTexCoord3fv(GLenum target, const GLfloat * v) {if (GLeeInit()) glMultiTexCoord3fv(target, v);} +void __stdcall _Lazy_glMultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r) {if (GLeeInit()) glMultiTexCoord3i(target, s, t, r);} +void __stdcall _Lazy_glMultiTexCoord3iv(GLenum target, const GLint * v) {if (GLeeInit()) glMultiTexCoord3iv(target, v);} +void __stdcall _Lazy_glMultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r) {if (GLeeInit()) glMultiTexCoord3s(target, s, t, r);} +void __stdcall _Lazy_glMultiTexCoord3sv(GLenum target, const GLshort * v) {if (GLeeInit()) glMultiTexCoord3sv(target, v);} +void __stdcall _Lazy_glMultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) {if (GLeeInit()) glMultiTexCoord4d(target, s, t, r, q);} +void __stdcall _Lazy_glMultiTexCoord4dv(GLenum target, const GLdouble * v) {if (GLeeInit()) glMultiTexCoord4dv(target, v);} +void __stdcall _Lazy_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {if (GLeeInit()) glMultiTexCoord4f(target, s, t, r, q);} +void __stdcall _Lazy_glMultiTexCoord4fv(GLenum target, const GLfloat * v) {if (GLeeInit()) glMultiTexCoord4fv(target, v);} +void __stdcall _Lazy_glMultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q) {if (GLeeInit()) glMultiTexCoord4i(target, s, t, r, q);} +void __stdcall _Lazy_glMultiTexCoord4iv(GLenum target, const GLint * v) {if (GLeeInit()) glMultiTexCoord4iv(target, v);} +void __stdcall _Lazy_glMultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) {if (GLeeInit()) glMultiTexCoord4s(target, s, t, r, q);} +void __stdcall _Lazy_glMultiTexCoord4sv(GLenum target, const GLshort * v) {if (GLeeInit()) glMultiTexCoord4sv(target, v);} +void __stdcall _Lazy_glLoadTransposeMatrixf(const GLfloat * m) {if (GLeeInit()) glLoadTransposeMatrixf(m);} +void __stdcall _Lazy_glLoadTransposeMatrixd(const GLdouble * m) {if (GLeeInit()) glLoadTransposeMatrixd(m);} +void __stdcall _Lazy_glMultTransposeMatrixf(const GLfloat * m) {if (GLeeInit()) glMultTransposeMatrixf(m);} +void __stdcall _Lazy_glMultTransposeMatrixd(const GLdouble * m) {if (GLeeInit()) glMultTransposeMatrixd(m);} +void __stdcall _Lazy_glSampleCoverage(GLclampf value, GLboolean invert) {if (GLeeInit()) glSampleCoverage(value, invert);} +void __stdcall _Lazy_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);} +void __stdcall _Lazy_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);} +void __stdcall _Lazy_glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data);} +void __stdcall _Lazy_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);} +void __stdcall _Lazy_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);} +void __stdcall _Lazy_glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data);} +void __stdcall _Lazy_glGetCompressedTexImage(GLenum target, GLint level, GLvoid * img) {if (GLeeInit()) glGetCompressedTexImage(target, level, img);} +PFNGLACTIVETEXTUREPROC pglActiveTexture=_Lazy_glActiveTexture; +PFNGLCLIENTACTIVETEXTUREPROC pglClientActiveTexture=_Lazy_glClientActiveTexture; +PFNGLMULTITEXCOORD1DPROC pglMultiTexCoord1d=_Lazy_glMultiTexCoord1d; +PFNGLMULTITEXCOORD1DVPROC pglMultiTexCoord1dv=_Lazy_glMultiTexCoord1dv; +PFNGLMULTITEXCOORD1FPROC pglMultiTexCoord1f=_Lazy_glMultiTexCoord1f; +PFNGLMULTITEXCOORD1FVPROC pglMultiTexCoord1fv=_Lazy_glMultiTexCoord1fv; +PFNGLMULTITEXCOORD1IPROC pglMultiTexCoord1i=_Lazy_glMultiTexCoord1i; +PFNGLMULTITEXCOORD1IVPROC pglMultiTexCoord1iv=_Lazy_glMultiTexCoord1iv; +PFNGLMULTITEXCOORD1SPROC pglMultiTexCoord1s=_Lazy_glMultiTexCoord1s; +PFNGLMULTITEXCOORD1SVPROC pglMultiTexCoord1sv=_Lazy_glMultiTexCoord1sv; +PFNGLMULTITEXCOORD2DPROC pglMultiTexCoord2d=_Lazy_glMultiTexCoord2d; +PFNGLMULTITEXCOORD2DVPROC pglMultiTexCoord2dv=_Lazy_glMultiTexCoord2dv; +PFNGLMULTITEXCOORD2FPROC pglMultiTexCoord2f=_Lazy_glMultiTexCoord2f; +PFNGLMULTITEXCOORD2FVPROC pglMultiTexCoord2fv=_Lazy_glMultiTexCoord2fv; +PFNGLMULTITEXCOORD2IPROC pglMultiTexCoord2i=_Lazy_glMultiTexCoord2i; +PFNGLMULTITEXCOORD2IVPROC pglMultiTexCoord2iv=_Lazy_glMultiTexCoord2iv; +PFNGLMULTITEXCOORD2SPROC pglMultiTexCoord2s=_Lazy_glMultiTexCoord2s; +PFNGLMULTITEXCOORD2SVPROC pglMultiTexCoord2sv=_Lazy_glMultiTexCoord2sv; +PFNGLMULTITEXCOORD3DPROC pglMultiTexCoord3d=_Lazy_glMultiTexCoord3d; +PFNGLMULTITEXCOORD3DVPROC pglMultiTexCoord3dv=_Lazy_glMultiTexCoord3dv; +PFNGLMULTITEXCOORD3FPROC pglMultiTexCoord3f=_Lazy_glMultiTexCoord3f; +PFNGLMULTITEXCOORD3FVPROC pglMultiTexCoord3fv=_Lazy_glMultiTexCoord3fv; +PFNGLMULTITEXCOORD3IPROC pglMultiTexCoord3i=_Lazy_glMultiTexCoord3i; +PFNGLMULTITEXCOORD3IVPROC pglMultiTexCoord3iv=_Lazy_glMultiTexCoord3iv; +PFNGLMULTITEXCOORD3SPROC pglMultiTexCoord3s=_Lazy_glMultiTexCoord3s; +PFNGLMULTITEXCOORD3SVPROC pglMultiTexCoord3sv=_Lazy_glMultiTexCoord3sv; +PFNGLMULTITEXCOORD4DPROC pglMultiTexCoord4d=_Lazy_glMultiTexCoord4d; +PFNGLMULTITEXCOORD4DVPROC pglMultiTexCoord4dv=_Lazy_glMultiTexCoord4dv; +PFNGLMULTITEXCOORD4FPROC pglMultiTexCoord4f=_Lazy_glMultiTexCoord4f; +PFNGLMULTITEXCOORD4FVPROC pglMultiTexCoord4fv=_Lazy_glMultiTexCoord4fv; +PFNGLMULTITEXCOORD4IPROC pglMultiTexCoord4i=_Lazy_glMultiTexCoord4i; +PFNGLMULTITEXCOORD4IVPROC pglMultiTexCoord4iv=_Lazy_glMultiTexCoord4iv; +PFNGLMULTITEXCOORD4SPROC pglMultiTexCoord4s=_Lazy_glMultiTexCoord4s; +PFNGLMULTITEXCOORD4SVPROC pglMultiTexCoord4sv=_Lazy_glMultiTexCoord4sv; +PFNGLLOADTRANSPOSEMATRIXFPROC pglLoadTransposeMatrixf=_Lazy_glLoadTransposeMatrixf; +PFNGLLOADTRANSPOSEMATRIXDPROC pglLoadTransposeMatrixd=_Lazy_glLoadTransposeMatrixd; +PFNGLMULTTRANSPOSEMATRIXFPROC pglMultTransposeMatrixf=_Lazy_glMultTransposeMatrixf; +PFNGLMULTTRANSPOSEMATRIXDPROC pglMultTransposeMatrixd=_Lazy_glMultTransposeMatrixd; +PFNGLSAMPLECOVERAGEPROC pglSampleCoverage=_Lazy_glSampleCoverage; +PFNGLCOMPRESSEDTEXIMAGE3DPROC pglCompressedTexImage3D=_Lazy_glCompressedTexImage3D; +PFNGLCOMPRESSEDTEXIMAGE2DPROC pglCompressedTexImage2D=_Lazy_glCompressedTexImage2D; +PFNGLCOMPRESSEDTEXIMAGE1DPROC pglCompressedTexImage1D=_Lazy_glCompressedTexImage1D; +PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC pglCompressedTexSubImage3D=_Lazy_glCompressedTexSubImage3D; +PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC pglCompressedTexSubImage2D=_Lazy_glCompressedTexSubImage2D; +PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC pglCompressedTexSubImage1D=_Lazy_glCompressedTexSubImage1D; +PFNGLGETCOMPRESSEDTEXIMAGEPROC pglGetCompressedTexImage=_Lazy_glGetCompressedTexImage; +#endif + +/* GL_VERSION_1_4 */ + +#ifdef __GLEE_GL_VERSION_1_4 +void __stdcall _Lazy_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) {if (GLeeInit()) glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);} +void __stdcall _Lazy_glFogCoordf(GLfloat coord) {if (GLeeInit()) glFogCoordf(coord);} +void __stdcall _Lazy_glFogCoordfv(const GLfloat * coord) {if (GLeeInit()) glFogCoordfv(coord);} +void __stdcall _Lazy_glFogCoordd(GLdouble coord) {if (GLeeInit()) glFogCoordd(coord);} +void __stdcall _Lazy_glFogCoorddv(const GLdouble * coord) {if (GLeeInit()) glFogCoorddv(coord);} +void __stdcall _Lazy_glFogCoordPointer(GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glFogCoordPointer(type, stride, pointer);} +void __stdcall _Lazy_glMultiDrawArrays(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount) {if (GLeeInit()) glMultiDrawArrays(mode, first, count, primcount);} +void __stdcall _Lazy_glMultiDrawElements(GLenum mode, const GLsizei * count, GLenum type, const GLvoid* * indices, GLsizei primcount) {if (GLeeInit()) glMultiDrawElements(mode, count, type, indices, primcount);} +void __stdcall _Lazy_glPointParameterf(GLenum pname, GLfloat param) {if (GLeeInit()) glPointParameterf(pname, param);} +void __stdcall _Lazy_glPointParameterfv(GLenum pname, const GLfloat * params) {if (GLeeInit()) glPointParameterfv(pname, params);} +void __stdcall _Lazy_glPointParameteri(GLenum pname, GLint param) {if (GLeeInit()) glPointParameteri(pname, param);} +void __stdcall _Lazy_glPointParameteriv(GLenum pname, const GLint * params) {if (GLeeInit()) glPointParameteriv(pname, params);} +void __stdcall _Lazy_glSecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue) {if (GLeeInit()) glSecondaryColor3b(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3bv(const GLbyte * v) {if (GLeeInit()) glSecondaryColor3bv(v);} +void __stdcall _Lazy_glSecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue) {if (GLeeInit()) glSecondaryColor3d(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3dv(const GLdouble * v) {if (GLeeInit()) glSecondaryColor3dv(v);} +void __stdcall _Lazy_glSecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue) {if (GLeeInit()) glSecondaryColor3f(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3fv(const GLfloat * v) {if (GLeeInit()) glSecondaryColor3fv(v);} +void __stdcall _Lazy_glSecondaryColor3i(GLint red, GLint green, GLint blue) {if (GLeeInit()) glSecondaryColor3i(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3iv(const GLint * v) {if (GLeeInit()) glSecondaryColor3iv(v);} +void __stdcall _Lazy_glSecondaryColor3s(GLshort red, GLshort green, GLshort blue) {if (GLeeInit()) glSecondaryColor3s(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3sv(const GLshort * v) {if (GLeeInit()) glSecondaryColor3sv(v);} +void __stdcall _Lazy_glSecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue) {if (GLeeInit()) glSecondaryColor3ub(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3ubv(const GLubyte * v) {if (GLeeInit()) glSecondaryColor3ubv(v);} +void __stdcall _Lazy_glSecondaryColor3ui(GLuint red, GLuint green, GLuint blue) {if (GLeeInit()) glSecondaryColor3ui(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3uiv(const GLuint * v) {if (GLeeInit()) glSecondaryColor3uiv(v);} +void __stdcall _Lazy_glSecondaryColor3us(GLushort red, GLushort green, GLushort blue) {if (GLeeInit()) glSecondaryColor3us(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3usv(const GLushort * v) {if (GLeeInit()) glSecondaryColor3usv(v);} +void __stdcall _Lazy_glSecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glSecondaryColorPointer(size, type, stride, pointer);} +void __stdcall _Lazy_glWindowPos2d(GLdouble x, GLdouble y) {if (GLeeInit()) glWindowPos2d(x, y);} +void __stdcall _Lazy_glWindowPos2dv(const GLdouble * v) {if (GLeeInit()) glWindowPos2dv(v);} +void __stdcall _Lazy_glWindowPos2f(GLfloat x, GLfloat y) {if (GLeeInit()) glWindowPos2f(x, y);} +void __stdcall _Lazy_glWindowPos2fv(const GLfloat * v) {if (GLeeInit()) glWindowPos2fv(v);} +void __stdcall _Lazy_glWindowPos2i(GLint x, GLint y) {if (GLeeInit()) glWindowPos2i(x, y);} +void __stdcall _Lazy_glWindowPos2iv(const GLint * v) {if (GLeeInit()) glWindowPos2iv(v);} +void __stdcall _Lazy_glWindowPos2s(GLshort x, GLshort y) {if (GLeeInit()) glWindowPos2s(x, y);} +void __stdcall _Lazy_glWindowPos2sv(const GLshort * v) {if (GLeeInit()) glWindowPos2sv(v);} +void __stdcall _Lazy_glWindowPos3d(GLdouble x, GLdouble y, GLdouble z) {if (GLeeInit()) glWindowPos3d(x, y, z);} +void __stdcall _Lazy_glWindowPos3dv(const GLdouble * v) {if (GLeeInit()) glWindowPos3dv(v);} +void __stdcall _Lazy_glWindowPos3f(GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glWindowPos3f(x, y, z);} +void __stdcall _Lazy_glWindowPos3fv(const GLfloat * v) {if (GLeeInit()) glWindowPos3fv(v);} +void __stdcall _Lazy_glWindowPos3i(GLint x, GLint y, GLint z) {if (GLeeInit()) glWindowPos3i(x, y, z);} +void __stdcall _Lazy_glWindowPos3iv(const GLint * v) {if (GLeeInit()) glWindowPos3iv(v);} +void __stdcall _Lazy_glWindowPos3s(GLshort x, GLshort y, GLshort z) {if (GLeeInit()) glWindowPos3s(x, y, z);} +void __stdcall _Lazy_glWindowPos3sv(const GLshort * v) {if (GLeeInit()) glWindowPos3sv(v);} +PFNGLBLENDFUNCSEPARATEPROC pglBlendFuncSeparate=_Lazy_glBlendFuncSeparate; +PFNGLFOGCOORDFPROC pglFogCoordf=_Lazy_glFogCoordf; +PFNGLFOGCOORDFVPROC pglFogCoordfv=_Lazy_glFogCoordfv; +PFNGLFOGCOORDDPROC pglFogCoordd=_Lazy_glFogCoordd; +PFNGLFOGCOORDDVPROC pglFogCoorddv=_Lazy_glFogCoorddv; +PFNGLFOGCOORDPOINTERPROC pglFogCoordPointer=_Lazy_glFogCoordPointer; +PFNGLMULTIDRAWARRAYSPROC pglMultiDrawArrays=_Lazy_glMultiDrawArrays; +PFNGLMULTIDRAWELEMENTSPROC pglMultiDrawElements=_Lazy_glMultiDrawElements; +PFNGLPOINTPARAMETERFPROC pglPointParameterf=_Lazy_glPointParameterf; +PFNGLPOINTPARAMETERFVPROC pglPointParameterfv=_Lazy_glPointParameterfv; +PFNGLPOINTPARAMETERIPROC pglPointParameteri=_Lazy_glPointParameteri; +PFNGLPOINTPARAMETERIVPROC pglPointParameteriv=_Lazy_glPointParameteriv; +PFNGLSECONDARYCOLOR3BPROC pglSecondaryColor3b=_Lazy_glSecondaryColor3b; +PFNGLSECONDARYCOLOR3BVPROC pglSecondaryColor3bv=_Lazy_glSecondaryColor3bv; +PFNGLSECONDARYCOLOR3DPROC pglSecondaryColor3d=_Lazy_glSecondaryColor3d; +PFNGLSECONDARYCOLOR3DVPROC pglSecondaryColor3dv=_Lazy_glSecondaryColor3dv; +PFNGLSECONDARYCOLOR3FPROC pglSecondaryColor3f=_Lazy_glSecondaryColor3f; +PFNGLSECONDARYCOLOR3FVPROC pglSecondaryColor3fv=_Lazy_glSecondaryColor3fv; +PFNGLSECONDARYCOLOR3IPROC pglSecondaryColor3i=_Lazy_glSecondaryColor3i; +PFNGLSECONDARYCOLOR3IVPROC pglSecondaryColor3iv=_Lazy_glSecondaryColor3iv; +PFNGLSECONDARYCOLOR3SPROC pglSecondaryColor3s=_Lazy_glSecondaryColor3s; +PFNGLSECONDARYCOLOR3SVPROC pglSecondaryColor3sv=_Lazy_glSecondaryColor3sv; +PFNGLSECONDARYCOLOR3UBPROC pglSecondaryColor3ub=_Lazy_glSecondaryColor3ub; +PFNGLSECONDARYCOLOR3UBVPROC pglSecondaryColor3ubv=_Lazy_glSecondaryColor3ubv; +PFNGLSECONDARYCOLOR3UIPROC pglSecondaryColor3ui=_Lazy_glSecondaryColor3ui; +PFNGLSECONDARYCOLOR3UIVPROC pglSecondaryColor3uiv=_Lazy_glSecondaryColor3uiv; +PFNGLSECONDARYCOLOR3USPROC pglSecondaryColor3us=_Lazy_glSecondaryColor3us; +PFNGLSECONDARYCOLOR3USVPROC pglSecondaryColor3usv=_Lazy_glSecondaryColor3usv; +PFNGLSECONDARYCOLORPOINTERPROC pglSecondaryColorPointer=_Lazy_glSecondaryColorPointer; +PFNGLWINDOWPOS2DPROC pglWindowPos2d=_Lazy_glWindowPos2d; +PFNGLWINDOWPOS2DVPROC pglWindowPos2dv=_Lazy_glWindowPos2dv; +PFNGLWINDOWPOS2FPROC pglWindowPos2f=_Lazy_glWindowPos2f; +PFNGLWINDOWPOS2FVPROC pglWindowPos2fv=_Lazy_glWindowPos2fv; +PFNGLWINDOWPOS2IPROC pglWindowPos2i=_Lazy_glWindowPos2i; +PFNGLWINDOWPOS2IVPROC pglWindowPos2iv=_Lazy_glWindowPos2iv; +PFNGLWINDOWPOS2SPROC pglWindowPos2s=_Lazy_glWindowPos2s; +PFNGLWINDOWPOS2SVPROC pglWindowPos2sv=_Lazy_glWindowPos2sv; +PFNGLWINDOWPOS3DPROC pglWindowPos3d=_Lazy_glWindowPos3d; +PFNGLWINDOWPOS3DVPROC pglWindowPos3dv=_Lazy_glWindowPos3dv; +PFNGLWINDOWPOS3FPROC pglWindowPos3f=_Lazy_glWindowPos3f; +PFNGLWINDOWPOS3FVPROC pglWindowPos3fv=_Lazy_glWindowPos3fv; +PFNGLWINDOWPOS3IPROC pglWindowPos3i=_Lazy_glWindowPos3i; +PFNGLWINDOWPOS3IVPROC pglWindowPos3iv=_Lazy_glWindowPos3iv; +PFNGLWINDOWPOS3SPROC pglWindowPos3s=_Lazy_glWindowPos3s; +PFNGLWINDOWPOS3SVPROC pglWindowPos3sv=_Lazy_glWindowPos3sv; +#endif + +/* GL_VERSION_1_5 */ + +#ifdef __GLEE_GL_VERSION_1_5 +void __stdcall _Lazy_glGenQueries(GLsizei n, GLuint * ids) {if (GLeeInit()) glGenQueries(n, ids);} +void __stdcall _Lazy_glDeleteQueries(GLsizei n, const GLuint * ids) {if (GLeeInit()) glDeleteQueries(n, ids);} +GLboolean __stdcall _Lazy_glIsQuery(GLuint id) {if (GLeeInit()) return glIsQuery(id); return (GLboolean)0;} +void __stdcall _Lazy_glBeginQuery(GLenum target, GLuint id) {if (GLeeInit()) glBeginQuery(target, id);} +void __stdcall _Lazy_glEndQuery(GLenum target) {if (GLeeInit()) glEndQuery(target);} +void __stdcall _Lazy_glGetQueryiv(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetQueryiv(target, pname, params);} +void __stdcall _Lazy_glGetQueryObjectiv(GLuint id, GLenum pname, GLint * params) {if (GLeeInit()) glGetQueryObjectiv(id, pname, params);} +void __stdcall _Lazy_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint * params) {if (GLeeInit()) glGetQueryObjectuiv(id, pname, params);} +void __stdcall _Lazy_glBindBuffer(GLenum target, GLuint buffer) {if (GLeeInit()) glBindBuffer(target, buffer);} +void __stdcall _Lazy_glDeleteBuffers(GLsizei n, const GLuint * buffers) {if (GLeeInit()) glDeleteBuffers(n, buffers);} +void __stdcall _Lazy_glGenBuffers(GLsizei n, GLuint * buffers) {if (GLeeInit()) glGenBuffers(n, buffers);} +GLboolean __stdcall _Lazy_glIsBuffer(GLuint buffer) {if (GLeeInit()) return glIsBuffer(buffer); return (GLboolean)0;} +void __stdcall _Lazy_glBufferData(GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage) {if (GLeeInit()) glBufferData(target, size, data, usage);} +void __stdcall _Lazy_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data) {if (GLeeInit()) glBufferSubData(target, offset, size, data);} +void __stdcall _Lazy_glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data) {if (GLeeInit()) glGetBufferSubData(target, offset, size, data);} +GLvoid* __stdcall _Lazy_glMapBuffer(GLenum target, GLenum access) {if (GLeeInit()) return glMapBuffer(target, access); return (GLvoid*)0;} +GLboolean __stdcall _Lazy_glUnmapBuffer(GLenum target) {if (GLeeInit()) return glUnmapBuffer(target); return (GLboolean)0;} +void __stdcall _Lazy_glGetBufferParameteriv(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetBufferParameteriv(target, pname, params);} +void __stdcall _Lazy_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid* * params) {if (GLeeInit()) glGetBufferPointerv(target, pname, params);} +PFNGLGENQUERIESPROC pglGenQueries=_Lazy_glGenQueries; +PFNGLDELETEQUERIESPROC pglDeleteQueries=_Lazy_glDeleteQueries; +PFNGLISQUERYPROC pglIsQuery=_Lazy_glIsQuery; +PFNGLBEGINQUERYPROC pglBeginQuery=_Lazy_glBeginQuery; +PFNGLENDQUERYPROC pglEndQuery=_Lazy_glEndQuery; +PFNGLGETQUERYIVPROC pglGetQueryiv=_Lazy_glGetQueryiv; +PFNGLGETQUERYOBJECTIVPROC pglGetQueryObjectiv=_Lazy_glGetQueryObjectiv; +PFNGLGETQUERYOBJECTUIVPROC pglGetQueryObjectuiv=_Lazy_glGetQueryObjectuiv; +PFNGLBINDBUFFERPROC pglBindBuffer=_Lazy_glBindBuffer; +PFNGLDELETEBUFFERSPROC pglDeleteBuffers=_Lazy_glDeleteBuffers; +PFNGLGENBUFFERSPROC pglGenBuffers=_Lazy_glGenBuffers; +PFNGLISBUFFERPROC pglIsBuffer=_Lazy_glIsBuffer; +PFNGLBUFFERDATAPROC pglBufferData=_Lazy_glBufferData; +PFNGLBUFFERSUBDATAPROC pglBufferSubData=_Lazy_glBufferSubData; +PFNGLGETBUFFERSUBDATAPROC pglGetBufferSubData=_Lazy_glGetBufferSubData; +PFNGLMAPBUFFERPROC pglMapBuffer=_Lazy_glMapBuffer; +PFNGLUNMAPBUFFERPROC pglUnmapBuffer=_Lazy_glUnmapBuffer; +PFNGLGETBUFFERPARAMETERIVPROC pglGetBufferParameteriv=_Lazy_glGetBufferParameteriv; +PFNGLGETBUFFERPOINTERVPROC pglGetBufferPointerv=_Lazy_glGetBufferPointerv; +#endif + +/* GL_VERSION_2_0 */ + +#ifdef __GLEE_GL_VERSION_2_0 +void __stdcall _Lazy_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {if (GLeeInit()) glBlendEquationSeparate(modeRGB, modeAlpha);} +void __stdcall _Lazy_glDrawBuffers(GLsizei n, const GLenum * bufs) {if (GLeeInit()) glDrawBuffers(n, bufs);} +void __stdcall _Lazy_glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) {if (GLeeInit()) glStencilOpSeparate(face, sfail, dpfail, dppass);} +void __stdcall _Lazy_glStencilFuncSeparate(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) {if (GLeeInit()) glStencilFuncSeparate(frontfunc, backfunc, ref, mask);} +void __stdcall _Lazy_glStencilMaskSeparate(GLenum face, GLuint mask) {if (GLeeInit()) glStencilMaskSeparate(face, mask);} +void __stdcall _Lazy_glAttachShader(GLuint program, GLuint shader) {if (GLeeInit()) glAttachShader(program, shader);} +void __stdcall _Lazy_glBindAttribLocation(GLuint program, GLuint index, const GLchar * name) {if (GLeeInit()) glBindAttribLocation(program, index, name);} +void __stdcall _Lazy_glCompileShader(GLuint shader) {if (GLeeInit()) glCompileShader(shader);} +GLuint __stdcall _Lazy_glCreateProgram(void) {if (GLeeInit()) return glCreateProgram(); return (GLuint)0;} +GLuint __stdcall _Lazy_glCreateShader(GLenum type) {if (GLeeInit()) return glCreateShader(type); return (GLuint)0;} +void __stdcall _Lazy_glDeleteProgram(GLuint program) {if (GLeeInit()) glDeleteProgram(program);} +void __stdcall _Lazy_glDeleteShader(GLuint shader) {if (GLeeInit()) glDeleteShader(shader);} +void __stdcall _Lazy_glDetachShader(GLuint program, GLuint shader) {if (GLeeInit()) glDetachShader(program, shader);} +void __stdcall _Lazy_glDisableVertexAttribArray(GLuint index) {if (GLeeInit()) glDisableVertexAttribArray(index);} +void __stdcall _Lazy_glEnableVertexAttribArray(GLuint index) {if (GLeeInit()) glEnableVertexAttribArray(index);} +void __stdcall _Lazy_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) {if (GLeeInit()) glGetActiveAttrib(program, index, bufSize, length, size, type, name);} +void __stdcall _Lazy_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) {if (GLeeInit()) glGetActiveUniform(program, index, bufSize, length, size, type, name);} +void __stdcall _Lazy_glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj) {if (GLeeInit()) glGetAttachedShaders(program, maxCount, count, obj);} +GLint __stdcall _Lazy_glGetAttribLocation(GLuint program, const GLchar * name) {if (GLeeInit()) return glGetAttribLocation(program, name); return (GLint)0;} +void __stdcall _Lazy_glGetProgramiv(GLuint program, GLenum pname, GLint * params) {if (GLeeInit()) glGetProgramiv(program, pname, params);} +void __stdcall _Lazy_glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {if (GLeeInit()) glGetProgramInfoLog(program, bufSize, length, infoLog);} +void __stdcall _Lazy_glGetShaderiv(GLuint shader, GLenum pname, GLint * params) {if (GLeeInit()) glGetShaderiv(shader, pname, params);} +void __stdcall _Lazy_glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog) {if (GLeeInit()) glGetShaderInfoLog(shader, bufSize, length, infoLog);} +void __stdcall _Lazy_glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source) {if (GLeeInit()) glGetShaderSource(shader, bufSize, length, source);} +GLint __stdcall _Lazy_glGetUniformLocation(GLuint program, const GLchar * name) {if (GLeeInit()) return glGetUniformLocation(program, name); return (GLint)0;} +void __stdcall _Lazy_glGetUniformfv(GLuint program, GLint location, GLfloat * params) {if (GLeeInit()) glGetUniformfv(program, location, params);} +void __stdcall _Lazy_glGetUniformiv(GLuint program, GLint location, GLint * params) {if (GLeeInit()) glGetUniformiv(program, location, params);} +void __stdcall _Lazy_glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble * params) {if (GLeeInit()) glGetVertexAttribdv(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetVertexAttribfv(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribiv(GLuint index, GLenum pname, GLint * params) {if (GLeeInit()) glGetVertexAttribiv(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid* * pointer) {if (GLeeInit()) glGetVertexAttribPointerv(index, pname, pointer);} +GLboolean __stdcall _Lazy_glIsProgram(GLuint program) {if (GLeeInit()) return glIsProgram(program); return (GLboolean)0;} +GLboolean __stdcall _Lazy_glIsShader(GLuint shader) {if (GLeeInit()) return glIsShader(shader); return (GLboolean)0;} +void __stdcall _Lazy_glLinkProgram(GLuint program) {if (GLeeInit()) glLinkProgram(program);} +void __stdcall _Lazy_glShaderSource(GLuint shader, GLsizei count, const GLchar* * string, const GLint * length) {if (GLeeInit()) glShaderSource(shader, count, string, length);} +void __stdcall _Lazy_glUseProgram(GLuint program) {if (GLeeInit()) glUseProgram(program);} +void __stdcall _Lazy_glUniform1f(GLint location, GLfloat v0) {if (GLeeInit()) glUniform1f(location, v0);} +void __stdcall _Lazy_glUniform2f(GLint location, GLfloat v0, GLfloat v1) {if (GLeeInit()) glUniform2f(location, v0, v1);} +void __stdcall _Lazy_glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {if (GLeeInit()) glUniform3f(location, v0, v1, v2);} +void __stdcall _Lazy_glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) {if (GLeeInit()) glUniform4f(location, v0, v1, v2, v3);} +void __stdcall _Lazy_glUniform1i(GLint location, GLint v0) {if (GLeeInit()) glUniform1i(location, v0);} +void __stdcall _Lazy_glUniform2i(GLint location, GLint v0, GLint v1) {if (GLeeInit()) glUniform2i(location, v0, v1);} +void __stdcall _Lazy_glUniform3i(GLint location, GLint v0, GLint v1, GLint v2) {if (GLeeInit()) glUniform3i(location, v0, v1, v2);} +void __stdcall _Lazy_glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {if (GLeeInit()) glUniform4i(location, v0, v1, v2, v3);} +void __stdcall _Lazy_glUniform1fv(GLint location, GLsizei count, const GLfloat * value) {if (GLeeInit()) glUniform1fv(location, count, value);} +void __stdcall _Lazy_glUniform2fv(GLint location, GLsizei count, const GLfloat * value) {if (GLeeInit()) glUniform2fv(location, count, value);} +void __stdcall _Lazy_glUniform3fv(GLint location, GLsizei count, const GLfloat * value) {if (GLeeInit()) glUniform3fv(location, count, value);} +void __stdcall _Lazy_glUniform4fv(GLint location, GLsizei count, const GLfloat * value) {if (GLeeInit()) glUniform4fv(location, count, value);} +void __stdcall _Lazy_glUniform1iv(GLint location, GLsizei count, const GLint * value) {if (GLeeInit()) glUniform1iv(location, count, value);} +void __stdcall _Lazy_glUniform2iv(GLint location, GLsizei count, const GLint * value) {if (GLeeInit()) glUniform2iv(location, count, value);} +void __stdcall _Lazy_glUniform3iv(GLint location, GLsizei count, const GLint * value) {if (GLeeInit()) glUniform3iv(location, count, value);} +void __stdcall _Lazy_glUniform4iv(GLint location, GLsizei count, const GLint * value) {if (GLeeInit()) glUniform4iv(location, count, value);} +void __stdcall _Lazy_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix2fv(location, count, transpose, value);} +void __stdcall _Lazy_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix3fv(location, count, transpose, value);} +void __stdcall _Lazy_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix4fv(location, count, transpose, value);} +void __stdcall _Lazy_glValidateProgram(GLuint program) {if (GLeeInit()) glValidateProgram(program);} +void __stdcall _Lazy_glVertexAttrib1d(GLuint index, GLdouble x) {if (GLeeInit()) glVertexAttrib1d(index, x);} +void __stdcall _Lazy_glVertexAttrib1dv(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib1dv(index, v);} +void __stdcall _Lazy_glVertexAttrib1f(GLuint index, GLfloat x) {if (GLeeInit()) glVertexAttrib1f(index, x);} +void __stdcall _Lazy_glVertexAttrib1fv(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib1fv(index, v);} +void __stdcall _Lazy_glVertexAttrib1s(GLuint index, GLshort x) {if (GLeeInit()) glVertexAttrib1s(index, x);} +void __stdcall _Lazy_glVertexAttrib1sv(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib1sv(index, v);} +void __stdcall _Lazy_glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y) {if (GLeeInit()) glVertexAttrib2d(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2dv(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib2dv(index, v);} +void __stdcall _Lazy_glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) {if (GLeeInit()) glVertexAttrib2f(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2fv(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib2fv(index, v);} +void __stdcall _Lazy_glVertexAttrib2s(GLuint index, GLshort x, GLshort y) {if (GLeeInit()) glVertexAttrib2s(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2sv(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib2sv(index, v);} +void __stdcall _Lazy_glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z) {if (GLeeInit()) glVertexAttrib3d(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3dv(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib3dv(index, v);} +void __stdcall _Lazy_glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glVertexAttrib3f(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3fv(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib3fv(index, v);} +void __stdcall _Lazy_glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z) {if (GLeeInit()) glVertexAttrib3s(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3sv(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib3sv(index, v);} +void __stdcall _Lazy_glVertexAttrib4Nbv(GLuint index, const GLbyte * v) {if (GLeeInit()) glVertexAttrib4Nbv(index, v);} +void __stdcall _Lazy_glVertexAttrib4Niv(GLuint index, const GLint * v) {if (GLeeInit()) glVertexAttrib4Niv(index, v);} +void __stdcall _Lazy_glVertexAttrib4Nsv(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib4Nsv(index, v);} +void __stdcall _Lazy_glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) {if (GLeeInit()) glVertexAttrib4Nub(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4Nubv(GLuint index, const GLubyte * v) {if (GLeeInit()) glVertexAttrib4Nubv(index, v);} +void __stdcall _Lazy_glVertexAttrib4Nuiv(GLuint index, const GLuint * v) {if (GLeeInit()) glVertexAttrib4Nuiv(index, v);} +void __stdcall _Lazy_glVertexAttrib4Nusv(GLuint index, const GLushort * v) {if (GLeeInit()) glVertexAttrib4Nusv(index, v);} +void __stdcall _Lazy_glVertexAttrib4bv(GLuint index, const GLbyte * v) {if (GLeeInit()) glVertexAttrib4bv(index, v);} +void __stdcall _Lazy_glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) {if (GLeeInit()) glVertexAttrib4d(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4dv(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib4dv(index, v);} +void __stdcall _Lazy_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glVertexAttrib4f(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4fv(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib4fv(index, v);} +void __stdcall _Lazy_glVertexAttrib4iv(GLuint index, const GLint * v) {if (GLeeInit()) glVertexAttrib4iv(index, v);} +void __stdcall _Lazy_glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) {if (GLeeInit()) glVertexAttrib4s(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4sv(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib4sv(index, v);} +void __stdcall _Lazy_glVertexAttrib4ubv(GLuint index, const GLubyte * v) {if (GLeeInit()) glVertexAttrib4ubv(index, v);} +void __stdcall _Lazy_glVertexAttrib4uiv(GLuint index, const GLuint * v) {if (GLeeInit()) glVertexAttrib4uiv(index, v);} +void __stdcall _Lazy_glVertexAttrib4usv(GLuint index, const GLushort * v) {if (GLeeInit()) glVertexAttrib4usv(index, v);} +void __stdcall _Lazy_glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glVertexAttribPointer(index, size, type, normalized, stride, pointer);} +PFNGLBLENDEQUATIONSEPARATEPROC pglBlendEquationSeparate=_Lazy_glBlendEquationSeparate; +PFNGLDRAWBUFFERSPROC pglDrawBuffers=_Lazy_glDrawBuffers; +PFNGLSTENCILOPSEPARATEPROC pglStencilOpSeparate=_Lazy_glStencilOpSeparate; +PFNGLSTENCILFUNCSEPARATEPROC pglStencilFuncSeparate=_Lazy_glStencilFuncSeparate; +PFNGLSTENCILMASKSEPARATEPROC pglStencilMaskSeparate=_Lazy_glStencilMaskSeparate; +PFNGLATTACHSHADERPROC pglAttachShader=_Lazy_glAttachShader; +PFNGLBINDATTRIBLOCATIONPROC pglBindAttribLocation=_Lazy_glBindAttribLocation; +PFNGLCOMPILESHADERPROC pglCompileShader=_Lazy_glCompileShader; +PFNGLCREATEPROGRAMPROC pglCreateProgram=_Lazy_glCreateProgram; +PFNGLCREATESHADERPROC pglCreateShader=_Lazy_glCreateShader; +PFNGLDELETEPROGRAMPROC pglDeleteProgram=_Lazy_glDeleteProgram; +PFNGLDELETESHADERPROC pglDeleteShader=_Lazy_glDeleteShader; +PFNGLDETACHSHADERPROC pglDetachShader=_Lazy_glDetachShader; +PFNGLDISABLEVERTEXATTRIBARRAYPROC pglDisableVertexAttribArray=_Lazy_glDisableVertexAttribArray; +PFNGLENABLEVERTEXATTRIBARRAYPROC pglEnableVertexAttribArray=_Lazy_glEnableVertexAttribArray; +PFNGLGETACTIVEATTRIBPROC pglGetActiveAttrib=_Lazy_glGetActiveAttrib; +PFNGLGETACTIVEUNIFORMPROC pglGetActiveUniform=_Lazy_glGetActiveUniform; +PFNGLGETATTACHEDSHADERSPROC pglGetAttachedShaders=_Lazy_glGetAttachedShaders; +PFNGLGETATTRIBLOCATIONPROC pglGetAttribLocation=_Lazy_glGetAttribLocation; +PFNGLGETPROGRAMIVPROC pglGetProgramiv=_Lazy_glGetProgramiv; +PFNGLGETPROGRAMINFOLOGPROC pglGetProgramInfoLog=_Lazy_glGetProgramInfoLog; +PFNGLGETSHADERIVPROC pglGetShaderiv=_Lazy_glGetShaderiv; +PFNGLGETSHADERINFOLOGPROC pglGetShaderInfoLog=_Lazy_glGetShaderInfoLog; +PFNGLGETSHADERSOURCEPROC pglGetShaderSource=_Lazy_glGetShaderSource; +PFNGLGETUNIFORMLOCATIONPROC pglGetUniformLocation=_Lazy_glGetUniformLocation; +PFNGLGETUNIFORMFVPROC pglGetUniformfv=_Lazy_glGetUniformfv; +PFNGLGETUNIFORMIVPROC pglGetUniformiv=_Lazy_glGetUniformiv; +PFNGLGETVERTEXATTRIBDVPROC pglGetVertexAttribdv=_Lazy_glGetVertexAttribdv; +PFNGLGETVERTEXATTRIBFVPROC pglGetVertexAttribfv=_Lazy_glGetVertexAttribfv; +PFNGLGETVERTEXATTRIBIVPROC pglGetVertexAttribiv=_Lazy_glGetVertexAttribiv; +PFNGLGETVERTEXATTRIBPOINTERVPROC pglGetVertexAttribPointerv=_Lazy_glGetVertexAttribPointerv; +PFNGLISPROGRAMPROC pglIsProgram=_Lazy_glIsProgram; +PFNGLISSHADERPROC pglIsShader=_Lazy_glIsShader; +PFNGLLINKPROGRAMPROC pglLinkProgram=_Lazy_glLinkProgram; +PFNGLSHADERSOURCEPROC pglShaderSource=_Lazy_glShaderSource; +PFNGLUSEPROGRAMPROC pglUseProgram=_Lazy_glUseProgram; +PFNGLUNIFORM1FPROC pglUniform1f=_Lazy_glUniform1f; +PFNGLUNIFORM2FPROC pglUniform2f=_Lazy_glUniform2f; +PFNGLUNIFORM3FPROC pglUniform3f=_Lazy_glUniform3f; +PFNGLUNIFORM4FPROC pglUniform4f=_Lazy_glUniform4f; +PFNGLUNIFORM1IPROC pglUniform1i=_Lazy_glUniform1i; +PFNGLUNIFORM2IPROC pglUniform2i=_Lazy_glUniform2i; +PFNGLUNIFORM3IPROC pglUniform3i=_Lazy_glUniform3i; +PFNGLUNIFORM4IPROC pglUniform4i=_Lazy_glUniform4i; +PFNGLUNIFORM1FVPROC pglUniform1fv=_Lazy_glUniform1fv; +PFNGLUNIFORM2FVPROC pglUniform2fv=_Lazy_glUniform2fv; +PFNGLUNIFORM3FVPROC pglUniform3fv=_Lazy_glUniform3fv; +PFNGLUNIFORM4FVPROC pglUniform4fv=_Lazy_glUniform4fv; +PFNGLUNIFORM1IVPROC pglUniform1iv=_Lazy_glUniform1iv; +PFNGLUNIFORM2IVPROC pglUniform2iv=_Lazy_glUniform2iv; +PFNGLUNIFORM3IVPROC pglUniform3iv=_Lazy_glUniform3iv; +PFNGLUNIFORM4IVPROC pglUniform4iv=_Lazy_glUniform4iv; +PFNGLUNIFORMMATRIX2FVPROC pglUniformMatrix2fv=_Lazy_glUniformMatrix2fv; +PFNGLUNIFORMMATRIX3FVPROC pglUniformMatrix3fv=_Lazy_glUniformMatrix3fv; +PFNGLUNIFORMMATRIX4FVPROC pglUniformMatrix4fv=_Lazy_glUniformMatrix4fv; +PFNGLVALIDATEPROGRAMPROC pglValidateProgram=_Lazy_glValidateProgram; +PFNGLVERTEXATTRIB1DPROC pglVertexAttrib1d=_Lazy_glVertexAttrib1d; +PFNGLVERTEXATTRIB1DVPROC pglVertexAttrib1dv=_Lazy_glVertexAttrib1dv; +PFNGLVERTEXATTRIB1FPROC pglVertexAttrib1f=_Lazy_glVertexAttrib1f; +PFNGLVERTEXATTRIB1FVPROC pglVertexAttrib1fv=_Lazy_glVertexAttrib1fv; +PFNGLVERTEXATTRIB1SPROC pglVertexAttrib1s=_Lazy_glVertexAttrib1s; +PFNGLVERTEXATTRIB1SVPROC pglVertexAttrib1sv=_Lazy_glVertexAttrib1sv; +PFNGLVERTEXATTRIB2DPROC pglVertexAttrib2d=_Lazy_glVertexAttrib2d; +PFNGLVERTEXATTRIB2DVPROC pglVertexAttrib2dv=_Lazy_glVertexAttrib2dv; +PFNGLVERTEXATTRIB2FPROC pglVertexAttrib2f=_Lazy_glVertexAttrib2f; +PFNGLVERTEXATTRIB2FVPROC pglVertexAttrib2fv=_Lazy_glVertexAttrib2fv; +PFNGLVERTEXATTRIB2SPROC pglVertexAttrib2s=_Lazy_glVertexAttrib2s; +PFNGLVERTEXATTRIB2SVPROC pglVertexAttrib2sv=_Lazy_glVertexAttrib2sv; +PFNGLVERTEXATTRIB3DPROC pglVertexAttrib3d=_Lazy_glVertexAttrib3d; +PFNGLVERTEXATTRIB3DVPROC pglVertexAttrib3dv=_Lazy_glVertexAttrib3dv; +PFNGLVERTEXATTRIB3FPROC pglVertexAttrib3f=_Lazy_glVertexAttrib3f; +PFNGLVERTEXATTRIB3FVPROC pglVertexAttrib3fv=_Lazy_glVertexAttrib3fv; +PFNGLVERTEXATTRIB3SPROC pglVertexAttrib3s=_Lazy_glVertexAttrib3s; +PFNGLVERTEXATTRIB3SVPROC pglVertexAttrib3sv=_Lazy_glVertexAttrib3sv; +PFNGLVERTEXATTRIB4NBVPROC pglVertexAttrib4Nbv=_Lazy_glVertexAttrib4Nbv; +PFNGLVERTEXATTRIB4NIVPROC pglVertexAttrib4Niv=_Lazy_glVertexAttrib4Niv; +PFNGLVERTEXATTRIB4NSVPROC pglVertexAttrib4Nsv=_Lazy_glVertexAttrib4Nsv; +PFNGLVERTEXATTRIB4NUBPROC pglVertexAttrib4Nub=_Lazy_glVertexAttrib4Nub; +PFNGLVERTEXATTRIB4NUBVPROC pglVertexAttrib4Nubv=_Lazy_glVertexAttrib4Nubv; +PFNGLVERTEXATTRIB4NUIVPROC pglVertexAttrib4Nuiv=_Lazy_glVertexAttrib4Nuiv; +PFNGLVERTEXATTRIB4NUSVPROC pglVertexAttrib4Nusv=_Lazy_glVertexAttrib4Nusv; +PFNGLVERTEXATTRIB4BVPROC pglVertexAttrib4bv=_Lazy_glVertexAttrib4bv; +PFNGLVERTEXATTRIB4DPROC pglVertexAttrib4d=_Lazy_glVertexAttrib4d; +PFNGLVERTEXATTRIB4DVPROC pglVertexAttrib4dv=_Lazy_glVertexAttrib4dv; +PFNGLVERTEXATTRIB4FPROC pglVertexAttrib4f=_Lazy_glVertexAttrib4f; +PFNGLVERTEXATTRIB4FVPROC pglVertexAttrib4fv=_Lazy_glVertexAttrib4fv; +PFNGLVERTEXATTRIB4IVPROC pglVertexAttrib4iv=_Lazy_glVertexAttrib4iv; +PFNGLVERTEXATTRIB4SPROC pglVertexAttrib4s=_Lazy_glVertexAttrib4s; +PFNGLVERTEXATTRIB4SVPROC pglVertexAttrib4sv=_Lazy_glVertexAttrib4sv; +PFNGLVERTEXATTRIB4UBVPROC pglVertexAttrib4ubv=_Lazy_glVertexAttrib4ubv; +PFNGLVERTEXATTRIB4UIVPROC pglVertexAttrib4uiv=_Lazy_glVertexAttrib4uiv; +PFNGLVERTEXATTRIB4USVPROC pglVertexAttrib4usv=_Lazy_glVertexAttrib4usv; +PFNGLVERTEXATTRIBPOINTERPROC pglVertexAttribPointer=_Lazy_glVertexAttribPointer; +#endif + +/* GL_VERSION_2_1 */ + +#ifdef __GLEE_GL_VERSION_2_1 +void __stdcall _Lazy_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix2x3fv(location, count, transpose, value);} +void __stdcall _Lazy_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix3x2fv(location, count, transpose, value);} +void __stdcall _Lazy_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix2x4fv(location, count, transpose, value);} +void __stdcall _Lazy_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix4x2fv(location, count, transpose, value);} +void __stdcall _Lazy_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix3x4fv(location, count, transpose, value);} +void __stdcall _Lazy_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix4x3fv(location, count, transpose, value);} +PFNGLUNIFORMMATRIX2X3FVPROC pglUniformMatrix2x3fv=_Lazy_glUniformMatrix2x3fv; +PFNGLUNIFORMMATRIX3X2FVPROC pglUniformMatrix3x2fv=_Lazy_glUniformMatrix3x2fv; +PFNGLUNIFORMMATRIX2X4FVPROC pglUniformMatrix2x4fv=_Lazy_glUniformMatrix2x4fv; +PFNGLUNIFORMMATRIX4X2FVPROC pglUniformMatrix4x2fv=_Lazy_glUniformMatrix4x2fv; +PFNGLUNIFORMMATRIX3X4FVPROC pglUniformMatrix3x4fv=_Lazy_glUniformMatrix3x4fv; +PFNGLUNIFORMMATRIX4X3FVPROC pglUniformMatrix4x3fv=_Lazy_glUniformMatrix4x3fv; +#endif + +/* GL_ARB_multitexture */ + +#ifdef __GLEE_GL_ARB_multitexture +void __stdcall _Lazy_glActiveTextureARB(GLenum texture) {if (GLeeInit()) glActiveTextureARB(texture);} +void __stdcall _Lazy_glClientActiveTextureARB(GLenum texture) {if (GLeeInit()) glClientActiveTextureARB(texture);} +void __stdcall _Lazy_glMultiTexCoord1dARB(GLenum target, GLdouble s) {if (GLeeInit()) glMultiTexCoord1dARB(target, s);} +void __stdcall _Lazy_glMultiTexCoord1dvARB(GLenum target, const GLdouble * v) {if (GLeeInit()) glMultiTexCoord1dvARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord1fARB(GLenum target, GLfloat s) {if (GLeeInit()) glMultiTexCoord1fARB(target, s);} +void __stdcall _Lazy_glMultiTexCoord1fvARB(GLenum target, const GLfloat * v) {if (GLeeInit()) glMultiTexCoord1fvARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord1iARB(GLenum target, GLint s) {if (GLeeInit()) glMultiTexCoord1iARB(target, s);} +void __stdcall _Lazy_glMultiTexCoord1ivARB(GLenum target, const GLint * v) {if (GLeeInit()) glMultiTexCoord1ivARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord1sARB(GLenum target, GLshort s) {if (GLeeInit()) glMultiTexCoord1sARB(target, s);} +void __stdcall _Lazy_glMultiTexCoord1svARB(GLenum target, const GLshort * v) {if (GLeeInit()) glMultiTexCoord1svARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t) {if (GLeeInit()) glMultiTexCoord2dARB(target, s, t);} +void __stdcall _Lazy_glMultiTexCoord2dvARB(GLenum target, const GLdouble * v) {if (GLeeInit()) glMultiTexCoord2dvARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t) {if (GLeeInit()) glMultiTexCoord2fARB(target, s, t);} +void __stdcall _Lazy_glMultiTexCoord2fvARB(GLenum target, const GLfloat * v) {if (GLeeInit()) glMultiTexCoord2fvARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord2iARB(GLenum target, GLint s, GLint t) {if (GLeeInit()) glMultiTexCoord2iARB(target, s, t);} +void __stdcall _Lazy_glMultiTexCoord2ivARB(GLenum target, const GLint * v) {if (GLeeInit()) glMultiTexCoord2ivARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t) {if (GLeeInit()) glMultiTexCoord2sARB(target, s, t);} +void __stdcall _Lazy_glMultiTexCoord2svARB(GLenum target, const GLshort * v) {if (GLeeInit()) glMultiTexCoord2svARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r) {if (GLeeInit()) glMultiTexCoord3dARB(target, s, t, r);} +void __stdcall _Lazy_glMultiTexCoord3dvARB(GLenum target, const GLdouble * v) {if (GLeeInit()) glMultiTexCoord3dvARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r) {if (GLeeInit()) glMultiTexCoord3fARB(target, s, t, r);} +void __stdcall _Lazy_glMultiTexCoord3fvARB(GLenum target, const GLfloat * v) {if (GLeeInit()) glMultiTexCoord3fvARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r) {if (GLeeInit()) glMultiTexCoord3iARB(target, s, t, r);} +void __stdcall _Lazy_glMultiTexCoord3ivARB(GLenum target, const GLint * v) {if (GLeeInit()) glMultiTexCoord3ivARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r) {if (GLeeInit()) glMultiTexCoord3sARB(target, s, t, r);} +void __stdcall _Lazy_glMultiTexCoord3svARB(GLenum target, const GLshort * v) {if (GLeeInit()) glMultiTexCoord3svARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) {if (GLeeInit()) glMultiTexCoord4dARB(target, s, t, r, q);} +void __stdcall _Lazy_glMultiTexCoord4dvARB(GLenum target, const GLdouble * v) {if (GLeeInit()) glMultiTexCoord4dvARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {if (GLeeInit()) glMultiTexCoord4fARB(target, s, t, r, q);} +void __stdcall _Lazy_glMultiTexCoord4fvARB(GLenum target, const GLfloat * v) {if (GLeeInit()) glMultiTexCoord4fvARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q) {if (GLeeInit()) glMultiTexCoord4iARB(target, s, t, r, q);} +void __stdcall _Lazy_glMultiTexCoord4ivARB(GLenum target, const GLint * v) {if (GLeeInit()) glMultiTexCoord4ivARB(target, v);} +void __stdcall _Lazy_glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) {if (GLeeInit()) glMultiTexCoord4sARB(target, s, t, r, q);} +void __stdcall _Lazy_glMultiTexCoord4svARB(GLenum target, const GLshort * v) {if (GLeeInit()) glMultiTexCoord4svARB(target, v);} +PFNGLACTIVETEXTUREARBPROC pglActiveTextureARB=_Lazy_glActiveTextureARB; +PFNGLCLIENTACTIVETEXTUREARBPROC pglClientActiveTextureARB=_Lazy_glClientActiveTextureARB; +PFNGLMULTITEXCOORD1DARBPROC pglMultiTexCoord1dARB=_Lazy_glMultiTexCoord1dARB; +PFNGLMULTITEXCOORD1DVARBPROC pglMultiTexCoord1dvARB=_Lazy_glMultiTexCoord1dvARB; +PFNGLMULTITEXCOORD1FARBPROC pglMultiTexCoord1fARB=_Lazy_glMultiTexCoord1fARB; +PFNGLMULTITEXCOORD1FVARBPROC pglMultiTexCoord1fvARB=_Lazy_glMultiTexCoord1fvARB; +PFNGLMULTITEXCOORD1IARBPROC pglMultiTexCoord1iARB=_Lazy_glMultiTexCoord1iARB; +PFNGLMULTITEXCOORD1IVARBPROC pglMultiTexCoord1ivARB=_Lazy_glMultiTexCoord1ivARB; +PFNGLMULTITEXCOORD1SARBPROC pglMultiTexCoord1sARB=_Lazy_glMultiTexCoord1sARB; +PFNGLMULTITEXCOORD1SVARBPROC pglMultiTexCoord1svARB=_Lazy_glMultiTexCoord1svARB; +PFNGLMULTITEXCOORD2DARBPROC pglMultiTexCoord2dARB=_Lazy_glMultiTexCoord2dARB; +PFNGLMULTITEXCOORD2DVARBPROC pglMultiTexCoord2dvARB=_Lazy_glMultiTexCoord2dvARB; +PFNGLMULTITEXCOORD2FARBPROC pglMultiTexCoord2fARB=_Lazy_glMultiTexCoord2fARB; +PFNGLMULTITEXCOORD2FVARBPROC pglMultiTexCoord2fvARB=_Lazy_glMultiTexCoord2fvARB; +PFNGLMULTITEXCOORD2IARBPROC pglMultiTexCoord2iARB=_Lazy_glMultiTexCoord2iARB; +PFNGLMULTITEXCOORD2IVARBPROC pglMultiTexCoord2ivARB=_Lazy_glMultiTexCoord2ivARB; +PFNGLMULTITEXCOORD2SARBPROC pglMultiTexCoord2sARB=_Lazy_glMultiTexCoord2sARB; +PFNGLMULTITEXCOORD2SVARBPROC pglMultiTexCoord2svARB=_Lazy_glMultiTexCoord2svARB; +PFNGLMULTITEXCOORD3DARBPROC pglMultiTexCoord3dARB=_Lazy_glMultiTexCoord3dARB; +PFNGLMULTITEXCOORD3DVARBPROC pglMultiTexCoord3dvARB=_Lazy_glMultiTexCoord3dvARB; +PFNGLMULTITEXCOORD3FARBPROC pglMultiTexCoord3fARB=_Lazy_glMultiTexCoord3fARB; +PFNGLMULTITEXCOORD3FVARBPROC pglMultiTexCoord3fvARB=_Lazy_glMultiTexCoord3fvARB; +PFNGLMULTITEXCOORD3IARBPROC pglMultiTexCoord3iARB=_Lazy_glMultiTexCoord3iARB; +PFNGLMULTITEXCOORD3IVARBPROC pglMultiTexCoord3ivARB=_Lazy_glMultiTexCoord3ivARB; +PFNGLMULTITEXCOORD3SARBPROC pglMultiTexCoord3sARB=_Lazy_glMultiTexCoord3sARB; +PFNGLMULTITEXCOORD3SVARBPROC pglMultiTexCoord3svARB=_Lazy_glMultiTexCoord3svARB; +PFNGLMULTITEXCOORD4DARBPROC pglMultiTexCoord4dARB=_Lazy_glMultiTexCoord4dARB; +PFNGLMULTITEXCOORD4DVARBPROC pglMultiTexCoord4dvARB=_Lazy_glMultiTexCoord4dvARB; +PFNGLMULTITEXCOORD4FARBPROC pglMultiTexCoord4fARB=_Lazy_glMultiTexCoord4fARB; +PFNGLMULTITEXCOORD4FVARBPROC pglMultiTexCoord4fvARB=_Lazy_glMultiTexCoord4fvARB; +PFNGLMULTITEXCOORD4IARBPROC pglMultiTexCoord4iARB=_Lazy_glMultiTexCoord4iARB; +PFNGLMULTITEXCOORD4IVARBPROC pglMultiTexCoord4ivARB=_Lazy_glMultiTexCoord4ivARB; +PFNGLMULTITEXCOORD4SARBPROC pglMultiTexCoord4sARB=_Lazy_glMultiTexCoord4sARB; +PFNGLMULTITEXCOORD4SVARBPROC pglMultiTexCoord4svARB=_Lazy_glMultiTexCoord4svARB; +#endif + +/* GL_ARB_transpose_matrix */ + +#ifdef __GLEE_GL_ARB_transpose_matrix +void __stdcall _Lazy_glLoadTransposeMatrixfARB(const GLfloat * m) {if (GLeeInit()) glLoadTransposeMatrixfARB(m);} +void __stdcall _Lazy_glLoadTransposeMatrixdARB(const GLdouble * m) {if (GLeeInit()) glLoadTransposeMatrixdARB(m);} +void __stdcall _Lazy_glMultTransposeMatrixfARB(const GLfloat * m) {if (GLeeInit()) glMultTransposeMatrixfARB(m);} +void __stdcall _Lazy_glMultTransposeMatrixdARB(const GLdouble * m) {if (GLeeInit()) glMultTransposeMatrixdARB(m);} +PFNGLLOADTRANSPOSEMATRIXFARBPROC pglLoadTransposeMatrixfARB=_Lazy_glLoadTransposeMatrixfARB; +PFNGLLOADTRANSPOSEMATRIXDARBPROC pglLoadTransposeMatrixdARB=_Lazy_glLoadTransposeMatrixdARB; +PFNGLMULTTRANSPOSEMATRIXFARBPROC pglMultTransposeMatrixfARB=_Lazy_glMultTransposeMatrixfARB; +PFNGLMULTTRANSPOSEMATRIXDARBPROC pglMultTransposeMatrixdARB=_Lazy_glMultTransposeMatrixdARB; +#endif + +/* GL_ARB_multisample */ + +#ifdef __GLEE_GL_ARB_multisample +void __stdcall _Lazy_glSampleCoverageARB(GLclampf value, GLboolean invert) {if (GLeeInit()) glSampleCoverageARB(value, invert);} +PFNGLSAMPLECOVERAGEARBPROC pglSampleCoverageARB=_Lazy_glSampleCoverageARB; +#endif + +/* GL_ARB_texture_env_add */ + +#ifdef __GLEE_GL_ARB_texture_env_add +#endif + +/* GL_ARB_texture_cube_map */ + +#ifdef __GLEE_GL_ARB_texture_cube_map +#endif + +/* GL_ARB_texture_compression */ + +#ifdef __GLEE_GL_ARB_texture_compression +void __stdcall _Lazy_glCompressedTexImage3DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, data);} +void __stdcall _Lazy_glCompressedTexImage2DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, data);} +void __stdcall _Lazy_glCompressedTexImage1DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, data);} +void __stdcall _Lazy_glCompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);} +void __stdcall _Lazy_glCompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, data);} +void __stdcall _Lazy_glCompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data) {if (GLeeInit()) glCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, data);} +void __stdcall _Lazy_glGetCompressedTexImageARB(GLenum target, GLint level, GLvoid * img) {if (GLeeInit()) glGetCompressedTexImageARB(target, level, img);} +PFNGLCOMPRESSEDTEXIMAGE3DARBPROC pglCompressedTexImage3DARB=_Lazy_glCompressedTexImage3DARB; +PFNGLCOMPRESSEDTEXIMAGE2DARBPROC pglCompressedTexImage2DARB=_Lazy_glCompressedTexImage2DARB; +PFNGLCOMPRESSEDTEXIMAGE1DARBPROC pglCompressedTexImage1DARB=_Lazy_glCompressedTexImage1DARB; +PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC pglCompressedTexSubImage3DARB=_Lazy_glCompressedTexSubImage3DARB; +PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC pglCompressedTexSubImage2DARB=_Lazy_glCompressedTexSubImage2DARB; +PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC pglCompressedTexSubImage1DARB=_Lazy_glCompressedTexSubImage1DARB; +PFNGLGETCOMPRESSEDTEXIMAGEARBPROC pglGetCompressedTexImageARB=_Lazy_glGetCompressedTexImageARB; +#endif + +/* GL_ARB_texture_border_clamp */ + +#ifdef __GLEE_GL_ARB_texture_border_clamp +#endif + +/* GL_ARB_point_parameters */ + +#ifdef __GLEE_GL_ARB_point_parameters +void __stdcall _Lazy_glPointParameterfARB(GLenum pname, GLfloat param) {if (GLeeInit()) glPointParameterfARB(pname, param);} +void __stdcall _Lazy_glPointParameterfvARB(GLenum pname, const GLfloat * params) {if (GLeeInit()) glPointParameterfvARB(pname, params);} +PFNGLPOINTPARAMETERFARBPROC pglPointParameterfARB=_Lazy_glPointParameterfARB; +PFNGLPOINTPARAMETERFVARBPROC pglPointParameterfvARB=_Lazy_glPointParameterfvARB; +#endif + +/* GL_ARB_vertex_blend */ + +#ifdef __GLEE_GL_ARB_vertex_blend +void __stdcall _Lazy_glWeightbvARB(GLint size, const GLbyte * weights) {if (GLeeInit()) glWeightbvARB(size, weights);} +void __stdcall _Lazy_glWeightsvARB(GLint size, const GLshort * weights) {if (GLeeInit()) glWeightsvARB(size, weights);} +void __stdcall _Lazy_glWeightivARB(GLint size, const GLint * weights) {if (GLeeInit()) glWeightivARB(size, weights);} +void __stdcall _Lazy_glWeightfvARB(GLint size, const GLfloat * weights) {if (GLeeInit()) glWeightfvARB(size, weights);} +void __stdcall _Lazy_glWeightdvARB(GLint size, const GLdouble * weights) {if (GLeeInit()) glWeightdvARB(size, weights);} +void __stdcall _Lazy_glWeightubvARB(GLint size, const GLubyte * weights) {if (GLeeInit()) glWeightubvARB(size, weights);} +void __stdcall _Lazy_glWeightusvARB(GLint size, const GLushort * weights) {if (GLeeInit()) glWeightusvARB(size, weights);} +void __stdcall _Lazy_glWeightuivARB(GLint size, const GLuint * weights) {if (GLeeInit()) glWeightuivARB(size, weights);} +void __stdcall _Lazy_glWeightPointerARB(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glWeightPointerARB(size, type, stride, pointer);} +void __stdcall _Lazy_glVertexBlendARB(GLint count) {if (GLeeInit()) glVertexBlendARB(count);} +PFNGLWEIGHTBVARBPROC pglWeightbvARB=_Lazy_glWeightbvARB; +PFNGLWEIGHTSVARBPROC pglWeightsvARB=_Lazy_glWeightsvARB; +PFNGLWEIGHTIVARBPROC pglWeightivARB=_Lazy_glWeightivARB; +PFNGLWEIGHTFVARBPROC pglWeightfvARB=_Lazy_glWeightfvARB; +PFNGLWEIGHTDVARBPROC pglWeightdvARB=_Lazy_glWeightdvARB; +PFNGLWEIGHTUBVARBPROC pglWeightubvARB=_Lazy_glWeightubvARB; +PFNGLWEIGHTUSVARBPROC pglWeightusvARB=_Lazy_glWeightusvARB; +PFNGLWEIGHTUIVARBPROC pglWeightuivARB=_Lazy_glWeightuivARB; +PFNGLWEIGHTPOINTERARBPROC pglWeightPointerARB=_Lazy_glWeightPointerARB; +PFNGLVERTEXBLENDARBPROC pglVertexBlendARB=_Lazy_glVertexBlendARB; +#endif + +/* GL_ARB_matrix_palette */ + +#ifdef __GLEE_GL_ARB_matrix_palette +void __stdcall _Lazy_glCurrentPaletteMatrixARB(GLint index) {if (GLeeInit()) glCurrentPaletteMatrixARB(index);} +void __stdcall _Lazy_glMatrixIndexubvARB(GLint size, const GLubyte * indices) {if (GLeeInit()) glMatrixIndexubvARB(size, indices);} +void __stdcall _Lazy_glMatrixIndexusvARB(GLint size, const GLushort * indices) {if (GLeeInit()) glMatrixIndexusvARB(size, indices);} +void __stdcall _Lazy_glMatrixIndexuivARB(GLint size, const GLuint * indices) {if (GLeeInit()) glMatrixIndexuivARB(size, indices);} +void __stdcall _Lazy_glMatrixIndexPointerARB(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glMatrixIndexPointerARB(size, type, stride, pointer);} +PFNGLCURRENTPALETTEMATRIXARBPROC pglCurrentPaletteMatrixARB=_Lazy_glCurrentPaletteMatrixARB; +PFNGLMATRIXINDEXUBVARBPROC pglMatrixIndexubvARB=_Lazy_glMatrixIndexubvARB; +PFNGLMATRIXINDEXUSVARBPROC pglMatrixIndexusvARB=_Lazy_glMatrixIndexusvARB; +PFNGLMATRIXINDEXUIVARBPROC pglMatrixIndexuivARB=_Lazy_glMatrixIndexuivARB; +PFNGLMATRIXINDEXPOINTERARBPROC pglMatrixIndexPointerARB=_Lazy_glMatrixIndexPointerARB; +#endif + +/* GL_ARB_texture_env_combine */ + +#ifdef __GLEE_GL_ARB_texture_env_combine +#endif + +/* GL_ARB_texture_env_crossbar */ + +#ifdef __GLEE_GL_ARB_texture_env_crossbar +#endif + +/* GL_ARB_texture_env_dot3 */ + +#ifdef __GLEE_GL_ARB_texture_env_dot3 +#endif + +/* GL_ARB_texture_mirrored_repeat */ + +#ifdef __GLEE_GL_ARB_texture_mirrored_repeat +#endif + +/* GL_ARB_depth_texture */ + +#ifdef __GLEE_GL_ARB_depth_texture +#endif + +/* GL_ARB_shadow */ + +#ifdef __GLEE_GL_ARB_shadow +#endif + +/* GL_ARB_shadow_ambient */ + +#ifdef __GLEE_GL_ARB_shadow_ambient +#endif + +/* GL_ARB_window_pos */ + +#ifdef __GLEE_GL_ARB_window_pos +void __stdcall _Lazy_glWindowPos2dARB(GLdouble x, GLdouble y) {if (GLeeInit()) glWindowPos2dARB(x, y);} +void __stdcall _Lazy_glWindowPos2dvARB(const GLdouble * v) {if (GLeeInit()) glWindowPos2dvARB(v);} +void __stdcall _Lazy_glWindowPos2fARB(GLfloat x, GLfloat y) {if (GLeeInit()) glWindowPos2fARB(x, y);} +void __stdcall _Lazy_glWindowPos2fvARB(const GLfloat * v) {if (GLeeInit()) glWindowPos2fvARB(v);} +void __stdcall _Lazy_glWindowPos2iARB(GLint x, GLint y) {if (GLeeInit()) glWindowPos2iARB(x, y);} +void __stdcall _Lazy_glWindowPos2ivARB(const GLint * v) {if (GLeeInit()) glWindowPos2ivARB(v);} +void __stdcall _Lazy_glWindowPos2sARB(GLshort x, GLshort y) {if (GLeeInit()) glWindowPos2sARB(x, y);} +void __stdcall _Lazy_glWindowPos2svARB(const GLshort * v) {if (GLeeInit()) glWindowPos2svARB(v);} +void __stdcall _Lazy_glWindowPos3dARB(GLdouble x, GLdouble y, GLdouble z) {if (GLeeInit()) glWindowPos3dARB(x, y, z);} +void __stdcall _Lazy_glWindowPos3dvARB(const GLdouble * v) {if (GLeeInit()) glWindowPos3dvARB(v);} +void __stdcall _Lazy_glWindowPos3fARB(GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glWindowPos3fARB(x, y, z);} +void __stdcall _Lazy_glWindowPos3fvARB(const GLfloat * v) {if (GLeeInit()) glWindowPos3fvARB(v);} +void __stdcall _Lazy_glWindowPos3iARB(GLint x, GLint y, GLint z) {if (GLeeInit()) glWindowPos3iARB(x, y, z);} +void __stdcall _Lazy_glWindowPos3ivARB(const GLint * v) {if (GLeeInit()) glWindowPos3ivARB(v);} +void __stdcall _Lazy_glWindowPos3sARB(GLshort x, GLshort y, GLshort z) {if (GLeeInit()) glWindowPos3sARB(x, y, z);} +void __stdcall _Lazy_glWindowPos3svARB(const GLshort * v) {if (GLeeInit()) glWindowPos3svARB(v);} +PFNGLWINDOWPOS2DARBPROC pglWindowPos2dARB=_Lazy_glWindowPos2dARB; +PFNGLWINDOWPOS2DVARBPROC pglWindowPos2dvARB=_Lazy_glWindowPos2dvARB; +PFNGLWINDOWPOS2FARBPROC pglWindowPos2fARB=_Lazy_glWindowPos2fARB; +PFNGLWINDOWPOS2FVARBPROC pglWindowPos2fvARB=_Lazy_glWindowPos2fvARB; +PFNGLWINDOWPOS2IARBPROC pglWindowPos2iARB=_Lazy_glWindowPos2iARB; +PFNGLWINDOWPOS2IVARBPROC pglWindowPos2ivARB=_Lazy_glWindowPos2ivARB; +PFNGLWINDOWPOS2SARBPROC pglWindowPos2sARB=_Lazy_glWindowPos2sARB; +PFNGLWINDOWPOS2SVARBPROC pglWindowPos2svARB=_Lazy_glWindowPos2svARB; +PFNGLWINDOWPOS3DARBPROC pglWindowPos3dARB=_Lazy_glWindowPos3dARB; +PFNGLWINDOWPOS3DVARBPROC pglWindowPos3dvARB=_Lazy_glWindowPos3dvARB; +PFNGLWINDOWPOS3FARBPROC pglWindowPos3fARB=_Lazy_glWindowPos3fARB; +PFNGLWINDOWPOS3FVARBPROC pglWindowPos3fvARB=_Lazy_glWindowPos3fvARB; +PFNGLWINDOWPOS3IARBPROC pglWindowPos3iARB=_Lazy_glWindowPos3iARB; +PFNGLWINDOWPOS3IVARBPROC pglWindowPos3ivARB=_Lazy_glWindowPos3ivARB; +PFNGLWINDOWPOS3SARBPROC pglWindowPos3sARB=_Lazy_glWindowPos3sARB; +PFNGLWINDOWPOS3SVARBPROC pglWindowPos3svARB=_Lazy_glWindowPos3svARB; +#endif + +/* GL_ARB_vertex_program */ + +#ifdef __GLEE_GL_ARB_vertex_program +void __stdcall _Lazy_glVertexAttrib1dARB(GLuint index, GLdouble x) {if (GLeeInit()) glVertexAttrib1dARB(index, x);} +void __stdcall _Lazy_glVertexAttrib1dvARB(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib1dvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib1fARB(GLuint index, GLfloat x) {if (GLeeInit()) glVertexAttrib1fARB(index, x);} +void __stdcall _Lazy_glVertexAttrib1fvARB(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib1fvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib1sARB(GLuint index, GLshort x) {if (GLeeInit()) glVertexAttrib1sARB(index, x);} +void __stdcall _Lazy_glVertexAttrib1svARB(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib1svARB(index, v);} +void __stdcall _Lazy_glVertexAttrib2dARB(GLuint index, GLdouble x, GLdouble y) {if (GLeeInit()) glVertexAttrib2dARB(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2dvARB(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib2dvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y) {if (GLeeInit()) glVertexAttrib2fARB(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2fvARB(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib2fvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib2sARB(GLuint index, GLshort x, GLshort y) {if (GLeeInit()) glVertexAttrib2sARB(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2svARB(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib2svARB(index, v);} +void __stdcall _Lazy_glVertexAttrib3dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z) {if (GLeeInit()) glVertexAttrib3dARB(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3dvARB(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib3dvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glVertexAttrib3fARB(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3fvARB(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib3fvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib3sARB(GLuint index, GLshort x, GLshort y, GLshort z) {if (GLeeInit()) glVertexAttrib3sARB(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3svARB(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib3svARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4NbvARB(GLuint index, const GLbyte * v) {if (GLeeInit()) glVertexAttrib4NbvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4NivARB(GLuint index, const GLint * v) {if (GLeeInit()) glVertexAttrib4NivARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4NsvARB(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib4NsvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4NubARB(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) {if (GLeeInit()) glVertexAttrib4NubARB(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4NubvARB(GLuint index, const GLubyte * v) {if (GLeeInit()) glVertexAttrib4NubvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4NuivARB(GLuint index, const GLuint * v) {if (GLeeInit()) glVertexAttrib4NuivARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4NusvARB(GLuint index, const GLushort * v) {if (GLeeInit()) glVertexAttrib4NusvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4bvARB(GLuint index, const GLbyte * v) {if (GLeeInit()) glVertexAttrib4bvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4dARB(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) {if (GLeeInit()) glVertexAttrib4dARB(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4dvARB(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib4dvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glVertexAttrib4fARB(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4fvARB(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib4fvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4ivARB(GLuint index, const GLint * v) {if (GLeeInit()) glVertexAttrib4ivARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4sARB(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) {if (GLeeInit()) glVertexAttrib4sARB(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4svARB(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib4svARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4ubvARB(GLuint index, const GLubyte * v) {if (GLeeInit()) glVertexAttrib4ubvARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4uivARB(GLuint index, const GLuint * v) {if (GLeeInit()) glVertexAttrib4uivARB(index, v);} +void __stdcall _Lazy_glVertexAttrib4usvARB(GLuint index, const GLushort * v) {if (GLeeInit()) glVertexAttrib4usvARB(index, v);} +void __stdcall _Lazy_glVertexAttribPointerARB(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glVertexAttribPointerARB(index, size, type, normalized, stride, pointer);} +void __stdcall _Lazy_glEnableVertexAttribArrayARB(GLuint index) {if (GLeeInit()) glEnableVertexAttribArrayARB(index);} +void __stdcall _Lazy_glDisableVertexAttribArrayARB(GLuint index) {if (GLeeInit()) glDisableVertexAttribArrayARB(index);} +void __stdcall _Lazy_glProgramStringARB(GLenum target, GLenum format, GLsizei len, const GLvoid * string) {if (GLeeInit()) glProgramStringARB(target, format, len, string);} +void __stdcall _Lazy_glBindProgramARB(GLenum target, GLuint program) {if (GLeeInit()) glBindProgramARB(target, program);} +void __stdcall _Lazy_glDeleteProgramsARB(GLsizei n, const GLuint * programs) {if (GLeeInit()) glDeleteProgramsARB(n, programs);} +void __stdcall _Lazy_glGenProgramsARB(GLsizei n, GLuint * programs) {if (GLeeInit()) glGenProgramsARB(n, programs);} +void __stdcall _Lazy_glProgramEnvParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) {if (GLeeInit()) glProgramEnvParameter4dARB(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramEnvParameter4dvARB(GLenum target, GLuint index, const GLdouble * params) {if (GLeeInit()) glProgramEnvParameter4dvARB(target, index, params);} +void __stdcall _Lazy_glProgramEnvParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glProgramEnvParameter4fARB(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramEnvParameter4fvARB(GLenum target, GLuint index, const GLfloat * params) {if (GLeeInit()) glProgramEnvParameter4fvARB(target, index, params);} +void __stdcall _Lazy_glProgramLocalParameter4dARB(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) {if (GLeeInit()) glProgramLocalParameter4dARB(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramLocalParameter4dvARB(GLenum target, GLuint index, const GLdouble * params) {if (GLeeInit()) glProgramLocalParameter4dvARB(target, index, params);} +void __stdcall _Lazy_glProgramLocalParameter4fARB(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glProgramLocalParameter4fARB(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramLocalParameter4fvARB(GLenum target, GLuint index, const GLfloat * params) {if (GLeeInit()) glProgramLocalParameter4fvARB(target, index, params);} +void __stdcall _Lazy_glGetProgramEnvParameterdvARB(GLenum target, GLuint index, GLdouble * params) {if (GLeeInit()) glGetProgramEnvParameterdvARB(target, index, params);} +void __stdcall _Lazy_glGetProgramEnvParameterfvARB(GLenum target, GLuint index, GLfloat * params) {if (GLeeInit()) glGetProgramEnvParameterfvARB(target, index, params);} +void __stdcall _Lazy_glGetProgramLocalParameterdvARB(GLenum target, GLuint index, GLdouble * params) {if (GLeeInit()) glGetProgramLocalParameterdvARB(target, index, params);} +void __stdcall _Lazy_glGetProgramLocalParameterfvARB(GLenum target, GLuint index, GLfloat * params) {if (GLeeInit()) glGetProgramLocalParameterfvARB(target, index, params);} +void __stdcall _Lazy_glGetProgramivARB(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetProgramivARB(target, pname, params);} +void __stdcall _Lazy_glGetProgramStringARB(GLenum target, GLenum pname, GLvoid * string) {if (GLeeInit()) glGetProgramStringARB(target, pname, string);} +void __stdcall _Lazy_glGetVertexAttribdvARB(GLuint index, GLenum pname, GLdouble * params) {if (GLeeInit()) glGetVertexAttribdvARB(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribfvARB(GLuint index, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetVertexAttribfvARB(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribivARB(GLuint index, GLenum pname, GLint * params) {if (GLeeInit()) glGetVertexAttribivARB(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribPointervARB(GLuint index, GLenum pname, GLvoid* * pointer) {if (GLeeInit()) glGetVertexAttribPointervARB(index, pname, pointer);} +GLboolean __stdcall _Lazy_glIsProgramARB(GLuint program) {if (GLeeInit()) return glIsProgramARB(program); return (GLboolean)0;} +PFNGLVERTEXATTRIB1DARBPROC pglVertexAttrib1dARB=_Lazy_glVertexAttrib1dARB; +PFNGLVERTEXATTRIB1DVARBPROC pglVertexAttrib1dvARB=_Lazy_glVertexAttrib1dvARB; +PFNGLVERTEXATTRIB1FARBPROC pglVertexAttrib1fARB=_Lazy_glVertexAttrib1fARB; +PFNGLVERTEXATTRIB1FVARBPROC pglVertexAttrib1fvARB=_Lazy_glVertexAttrib1fvARB; +PFNGLVERTEXATTRIB1SARBPROC pglVertexAttrib1sARB=_Lazy_glVertexAttrib1sARB; +PFNGLVERTEXATTRIB1SVARBPROC pglVertexAttrib1svARB=_Lazy_glVertexAttrib1svARB; +PFNGLVERTEXATTRIB2DARBPROC pglVertexAttrib2dARB=_Lazy_glVertexAttrib2dARB; +PFNGLVERTEXATTRIB2DVARBPROC pglVertexAttrib2dvARB=_Lazy_glVertexAttrib2dvARB; +PFNGLVERTEXATTRIB2FARBPROC pglVertexAttrib2fARB=_Lazy_glVertexAttrib2fARB; +PFNGLVERTEXATTRIB2FVARBPROC pglVertexAttrib2fvARB=_Lazy_glVertexAttrib2fvARB; +PFNGLVERTEXATTRIB2SARBPROC pglVertexAttrib2sARB=_Lazy_glVertexAttrib2sARB; +PFNGLVERTEXATTRIB2SVARBPROC pglVertexAttrib2svARB=_Lazy_glVertexAttrib2svARB; +PFNGLVERTEXATTRIB3DARBPROC pglVertexAttrib3dARB=_Lazy_glVertexAttrib3dARB; +PFNGLVERTEXATTRIB3DVARBPROC pglVertexAttrib3dvARB=_Lazy_glVertexAttrib3dvARB; +PFNGLVERTEXATTRIB3FARBPROC pglVertexAttrib3fARB=_Lazy_glVertexAttrib3fARB; +PFNGLVERTEXATTRIB3FVARBPROC pglVertexAttrib3fvARB=_Lazy_glVertexAttrib3fvARB; +PFNGLVERTEXATTRIB3SARBPROC pglVertexAttrib3sARB=_Lazy_glVertexAttrib3sARB; +PFNGLVERTEXATTRIB3SVARBPROC pglVertexAttrib3svARB=_Lazy_glVertexAttrib3svARB; +PFNGLVERTEXATTRIB4NBVARBPROC pglVertexAttrib4NbvARB=_Lazy_glVertexAttrib4NbvARB; +PFNGLVERTEXATTRIB4NIVARBPROC pglVertexAttrib4NivARB=_Lazy_glVertexAttrib4NivARB; +PFNGLVERTEXATTRIB4NSVARBPROC pglVertexAttrib4NsvARB=_Lazy_glVertexAttrib4NsvARB; +PFNGLVERTEXATTRIB4NUBARBPROC pglVertexAttrib4NubARB=_Lazy_glVertexAttrib4NubARB; +PFNGLVERTEXATTRIB4NUBVARBPROC pglVertexAttrib4NubvARB=_Lazy_glVertexAttrib4NubvARB; +PFNGLVERTEXATTRIB4NUIVARBPROC pglVertexAttrib4NuivARB=_Lazy_glVertexAttrib4NuivARB; +PFNGLVERTEXATTRIB4NUSVARBPROC pglVertexAttrib4NusvARB=_Lazy_glVertexAttrib4NusvARB; +PFNGLVERTEXATTRIB4BVARBPROC pglVertexAttrib4bvARB=_Lazy_glVertexAttrib4bvARB; +PFNGLVERTEXATTRIB4DARBPROC pglVertexAttrib4dARB=_Lazy_glVertexAttrib4dARB; +PFNGLVERTEXATTRIB4DVARBPROC pglVertexAttrib4dvARB=_Lazy_glVertexAttrib4dvARB; +PFNGLVERTEXATTRIB4FARBPROC pglVertexAttrib4fARB=_Lazy_glVertexAttrib4fARB; +PFNGLVERTEXATTRIB4FVARBPROC pglVertexAttrib4fvARB=_Lazy_glVertexAttrib4fvARB; +PFNGLVERTEXATTRIB4IVARBPROC pglVertexAttrib4ivARB=_Lazy_glVertexAttrib4ivARB; +PFNGLVERTEXATTRIB4SARBPROC pglVertexAttrib4sARB=_Lazy_glVertexAttrib4sARB; +PFNGLVERTEXATTRIB4SVARBPROC pglVertexAttrib4svARB=_Lazy_glVertexAttrib4svARB; +PFNGLVERTEXATTRIB4UBVARBPROC pglVertexAttrib4ubvARB=_Lazy_glVertexAttrib4ubvARB; +PFNGLVERTEXATTRIB4UIVARBPROC pglVertexAttrib4uivARB=_Lazy_glVertexAttrib4uivARB; +PFNGLVERTEXATTRIB4USVARBPROC pglVertexAttrib4usvARB=_Lazy_glVertexAttrib4usvARB; +PFNGLVERTEXATTRIBPOINTERARBPROC pglVertexAttribPointerARB=_Lazy_glVertexAttribPointerARB; +PFNGLENABLEVERTEXATTRIBARRAYARBPROC pglEnableVertexAttribArrayARB=_Lazy_glEnableVertexAttribArrayARB; +PFNGLDISABLEVERTEXATTRIBARRAYARBPROC pglDisableVertexAttribArrayARB=_Lazy_glDisableVertexAttribArrayARB; +PFNGLPROGRAMSTRINGARBPROC pglProgramStringARB=_Lazy_glProgramStringARB; +PFNGLBINDPROGRAMARBPROC pglBindProgramARB=_Lazy_glBindProgramARB; +PFNGLDELETEPROGRAMSARBPROC pglDeleteProgramsARB=_Lazy_glDeleteProgramsARB; +PFNGLGENPROGRAMSARBPROC pglGenProgramsARB=_Lazy_glGenProgramsARB; +PFNGLPROGRAMENVPARAMETER4DARBPROC pglProgramEnvParameter4dARB=_Lazy_glProgramEnvParameter4dARB; +PFNGLPROGRAMENVPARAMETER4DVARBPROC pglProgramEnvParameter4dvARB=_Lazy_glProgramEnvParameter4dvARB; +PFNGLPROGRAMENVPARAMETER4FARBPROC pglProgramEnvParameter4fARB=_Lazy_glProgramEnvParameter4fARB; +PFNGLPROGRAMENVPARAMETER4FVARBPROC pglProgramEnvParameter4fvARB=_Lazy_glProgramEnvParameter4fvARB; +PFNGLPROGRAMLOCALPARAMETER4DARBPROC pglProgramLocalParameter4dARB=_Lazy_glProgramLocalParameter4dARB; +PFNGLPROGRAMLOCALPARAMETER4DVARBPROC pglProgramLocalParameter4dvARB=_Lazy_glProgramLocalParameter4dvARB; +PFNGLPROGRAMLOCALPARAMETER4FARBPROC pglProgramLocalParameter4fARB=_Lazy_glProgramLocalParameter4fARB; +PFNGLPROGRAMLOCALPARAMETER4FVARBPROC pglProgramLocalParameter4fvARB=_Lazy_glProgramLocalParameter4fvARB; +PFNGLGETPROGRAMENVPARAMETERDVARBPROC pglGetProgramEnvParameterdvARB=_Lazy_glGetProgramEnvParameterdvARB; +PFNGLGETPROGRAMENVPARAMETERFVARBPROC pglGetProgramEnvParameterfvARB=_Lazy_glGetProgramEnvParameterfvARB; +PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC pglGetProgramLocalParameterdvARB=_Lazy_glGetProgramLocalParameterdvARB; +PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC pglGetProgramLocalParameterfvARB=_Lazy_glGetProgramLocalParameterfvARB; +PFNGLGETPROGRAMIVARBPROC pglGetProgramivARB=_Lazy_glGetProgramivARB; +PFNGLGETPROGRAMSTRINGARBPROC pglGetProgramStringARB=_Lazy_glGetProgramStringARB; +PFNGLGETVERTEXATTRIBDVARBPROC pglGetVertexAttribdvARB=_Lazy_glGetVertexAttribdvARB; +PFNGLGETVERTEXATTRIBFVARBPROC pglGetVertexAttribfvARB=_Lazy_glGetVertexAttribfvARB; +PFNGLGETVERTEXATTRIBIVARBPROC pglGetVertexAttribivARB=_Lazy_glGetVertexAttribivARB; +PFNGLGETVERTEXATTRIBPOINTERVARBPROC pglGetVertexAttribPointervARB=_Lazy_glGetVertexAttribPointervARB; +PFNGLISPROGRAMARBPROC pglIsProgramARB=_Lazy_glIsProgramARB; +#endif + +/* GL_ARB_fragment_program */ + +#ifdef __GLEE_GL_ARB_fragment_program +#endif + +/* GL_ARB_vertex_buffer_object */ + +#ifdef __GLEE_GL_ARB_vertex_buffer_object +void __stdcall _Lazy_glBindBufferARB(GLenum target, GLuint buffer) {if (GLeeInit()) glBindBufferARB(target, buffer);} +void __stdcall _Lazy_glDeleteBuffersARB(GLsizei n, const GLuint * buffers) {if (GLeeInit()) glDeleteBuffersARB(n, buffers);} +void __stdcall _Lazy_glGenBuffersARB(GLsizei n, GLuint * buffers) {if (GLeeInit()) glGenBuffersARB(n, buffers);} +GLboolean __stdcall _Lazy_glIsBufferARB(GLuint buffer) {if (GLeeInit()) return glIsBufferARB(buffer); return (GLboolean)0;} +void __stdcall _Lazy_glBufferDataARB(GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage) {if (GLeeInit()) glBufferDataARB(target, size, data, usage);} +void __stdcall _Lazy_glBufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data) {if (GLeeInit()) glBufferSubDataARB(target, offset, size, data);} +void __stdcall _Lazy_glGetBufferSubDataARB(GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data) {if (GLeeInit()) glGetBufferSubDataARB(target, offset, size, data);} +GLvoid* __stdcall _Lazy_glMapBufferARB(GLenum target, GLenum access) {if (GLeeInit()) return glMapBufferARB(target, access); return (GLvoid*)0;} +GLboolean __stdcall _Lazy_glUnmapBufferARB(GLenum target) {if (GLeeInit()) return glUnmapBufferARB(target); return (GLboolean)0;} +void __stdcall _Lazy_glGetBufferParameterivARB(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetBufferParameterivARB(target, pname, params);} +void __stdcall _Lazy_glGetBufferPointervARB(GLenum target, GLenum pname, GLvoid* * params) {if (GLeeInit()) glGetBufferPointervARB(target, pname, params);} +PFNGLBINDBUFFERARBPROC pglBindBufferARB=_Lazy_glBindBufferARB; +PFNGLDELETEBUFFERSARBPROC pglDeleteBuffersARB=_Lazy_glDeleteBuffersARB; +PFNGLGENBUFFERSARBPROC pglGenBuffersARB=_Lazy_glGenBuffersARB; +PFNGLISBUFFERARBPROC pglIsBufferARB=_Lazy_glIsBufferARB; +PFNGLBUFFERDATAARBPROC pglBufferDataARB=_Lazy_glBufferDataARB; +PFNGLBUFFERSUBDATAARBPROC pglBufferSubDataARB=_Lazy_glBufferSubDataARB; +PFNGLGETBUFFERSUBDATAARBPROC pglGetBufferSubDataARB=_Lazy_glGetBufferSubDataARB; +PFNGLMAPBUFFERARBPROC pglMapBufferARB=_Lazy_glMapBufferARB; +PFNGLUNMAPBUFFERARBPROC pglUnmapBufferARB=_Lazy_glUnmapBufferARB; +PFNGLGETBUFFERPARAMETERIVARBPROC pglGetBufferParameterivARB=_Lazy_glGetBufferParameterivARB; +PFNGLGETBUFFERPOINTERVARBPROC pglGetBufferPointervARB=_Lazy_glGetBufferPointervARB; +#endif + +/* GL_ARB_occlusion_query */ + +#ifdef __GLEE_GL_ARB_occlusion_query +void __stdcall _Lazy_glGenQueriesARB(GLsizei n, GLuint * ids) {if (GLeeInit()) glGenQueriesARB(n, ids);} +void __stdcall _Lazy_glDeleteQueriesARB(GLsizei n, const GLuint * ids) {if (GLeeInit()) glDeleteQueriesARB(n, ids);} +GLboolean __stdcall _Lazy_glIsQueryARB(GLuint id) {if (GLeeInit()) return glIsQueryARB(id); return (GLboolean)0;} +void __stdcall _Lazy_glBeginQueryARB(GLenum target, GLuint id) {if (GLeeInit()) glBeginQueryARB(target, id);} +void __stdcall _Lazy_glEndQueryARB(GLenum target) {if (GLeeInit()) glEndQueryARB(target);} +void __stdcall _Lazy_glGetQueryivARB(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetQueryivARB(target, pname, params);} +void __stdcall _Lazy_glGetQueryObjectivARB(GLuint id, GLenum pname, GLint * params) {if (GLeeInit()) glGetQueryObjectivARB(id, pname, params);} +void __stdcall _Lazy_glGetQueryObjectuivARB(GLuint id, GLenum pname, GLuint * params) {if (GLeeInit()) glGetQueryObjectuivARB(id, pname, params);} +PFNGLGENQUERIESARBPROC pglGenQueriesARB=_Lazy_glGenQueriesARB; +PFNGLDELETEQUERIESARBPROC pglDeleteQueriesARB=_Lazy_glDeleteQueriesARB; +PFNGLISQUERYARBPROC pglIsQueryARB=_Lazy_glIsQueryARB; +PFNGLBEGINQUERYARBPROC pglBeginQueryARB=_Lazy_glBeginQueryARB; +PFNGLENDQUERYARBPROC pglEndQueryARB=_Lazy_glEndQueryARB; +PFNGLGETQUERYIVARBPROC pglGetQueryivARB=_Lazy_glGetQueryivARB; +PFNGLGETQUERYOBJECTIVARBPROC pglGetQueryObjectivARB=_Lazy_glGetQueryObjectivARB; +PFNGLGETQUERYOBJECTUIVARBPROC pglGetQueryObjectuivARB=_Lazy_glGetQueryObjectuivARB; +#endif + +/* GL_ARB_shader_objects */ + +#ifdef __GLEE_GL_ARB_shader_objects +void __stdcall _Lazy_glDeleteObjectARB(GLhandleARB obj) {if (GLeeInit()) glDeleteObjectARB(obj);} +GLhandleARB __stdcall _Lazy_glGetHandleARB(GLenum pname) {if (GLeeInit()) return glGetHandleARB(pname); return (GLhandleARB)0;} +void __stdcall _Lazy_glDetachObjectARB(GLhandleARB containerObj, GLhandleARB attachedObj) {if (GLeeInit()) glDetachObjectARB(containerObj, attachedObj);} +GLhandleARB __stdcall _Lazy_glCreateShaderObjectARB(GLenum shaderType) {if (GLeeInit()) return glCreateShaderObjectARB(shaderType); return (GLhandleARB)0;} +void __stdcall _Lazy_glShaderSourceARB(GLhandleARB shaderObj, GLsizei count, const GLcharARB* * string, const GLint * length) {if (GLeeInit()) glShaderSourceARB(shaderObj, count, string, length);} +void __stdcall _Lazy_glCompileShaderARB(GLhandleARB shaderObj) {if (GLeeInit()) glCompileShaderARB(shaderObj);} +GLhandleARB __stdcall _Lazy_glCreateProgramObjectARB(void) {if (GLeeInit()) return glCreateProgramObjectARB(); return (GLhandleARB)0;} +void __stdcall _Lazy_glAttachObjectARB(GLhandleARB containerObj, GLhandleARB obj) {if (GLeeInit()) glAttachObjectARB(containerObj, obj);} +void __stdcall _Lazy_glLinkProgramARB(GLhandleARB programObj) {if (GLeeInit()) glLinkProgramARB(programObj);} +void __stdcall _Lazy_glUseProgramObjectARB(GLhandleARB programObj) {if (GLeeInit()) glUseProgramObjectARB(programObj);} +void __stdcall _Lazy_glValidateProgramARB(GLhandleARB programObj) {if (GLeeInit()) glValidateProgramARB(programObj);} +void __stdcall _Lazy_glUniform1fARB(GLint location, GLfloat v0) {if (GLeeInit()) glUniform1fARB(location, v0);} +void __stdcall _Lazy_glUniform2fARB(GLint location, GLfloat v0, GLfloat v1) {if (GLeeInit()) glUniform2fARB(location, v0, v1);} +void __stdcall _Lazy_glUniform3fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {if (GLeeInit()) glUniform3fARB(location, v0, v1, v2);} +void __stdcall _Lazy_glUniform4fARB(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) {if (GLeeInit()) glUniform4fARB(location, v0, v1, v2, v3);} +void __stdcall _Lazy_glUniform1iARB(GLint location, GLint v0) {if (GLeeInit()) glUniform1iARB(location, v0);} +void __stdcall _Lazy_glUniform2iARB(GLint location, GLint v0, GLint v1) {if (GLeeInit()) glUniform2iARB(location, v0, v1);} +void __stdcall _Lazy_glUniform3iARB(GLint location, GLint v0, GLint v1, GLint v2) {if (GLeeInit()) glUniform3iARB(location, v0, v1, v2);} +void __stdcall _Lazy_glUniform4iARB(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {if (GLeeInit()) glUniform4iARB(location, v0, v1, v2, v3);} +void __stdcall _Lazy_glUniform1fvARB(GLint location, GLsizei count, const GLfloat * value) {if (GLeeInit()) glUniform1fvARB(location, count, value);} +void __stdcall _Lazy_glUniform2fvARB(GLint location, GLsizei count, const GLfloat * value) {if (GLeeInit()) glUniform2fvARB(location, count, value);} +void __stdcall _Lazy_glUniform3fvARB(GLint location, GLsizei count, const GLfloat * value) {if (GLeeInit()) glUniform3fvARB(location, count, value);} +void __stdcall _Lazy_glUniform4fvARB(GLint location, GLsizei count, const GLfloat * value) {if (GLeeInit()) glUniform4fvARB(location, count, value);} +void __stdcall _Lazy_glUniform1ivARB(GLint location, GLsizei count, const GLint * value) {if (GLeeInit()) glUniform1ivARB(location, count, value);} +void __stdcall _Lazy_glUniform2ivARB(GLint location, GLsizei count, const GLint * value) {if (GLeeInit()) glUniform2ivARB(location, count, value);} +void __stdcall _Lazy_glUniform3ivARB(GLint location, GLsizei count, const GLint * value) {if (GLeeInit()) glUniform3ivARB(location, count, value);} +void __stdcall _Lazy_glUniform4ivARB(GLint location, GLsizei count, const GLint * value) {if (GLeeInit()) glUniform4ivARB(location, count, value);} +void __stdcall _Lazy_glUniformMatrix2fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix2fvARB(location, count, transpose, value);} +void __stdcall _Lazy_glUniformMatrix3fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix3fvARB(location, count, transpose, value);} +void __stdcall _Lazy_glUniformMatrix4fvARB(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) {if (GLeeInit()) glUniformMatrix4fvARB(location, count, transpose, value);} +void __stdcall _Lazy_glGetObjectParameterfvARB(GLhandleARB obj, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetObjectParameterfvARB(obj, pname, params);} +void __stdcall _Lazy_glGetObjectParameterivARB(GLhandleARB obj, GLenum pname, GLint * params) {if (GLeeInit()) glGetObjectParameterivARB(obj, pname, params);} +void __stdcall _Lazy_glGetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog) {if (GLeeInit()) glGetInfoLogARB(obj, maxLength, length, infoLog);} +void __stdcall _Lazy_glGetAttachedObjectsARB(GLhandleARB containerObj, GLsizei maxCount, GLsizei * count, GLhandleARB * obj) {if (GLeeInit()) glGetAttachedObjectsARB(containerObj, maxCount, count, obj);} +GLint __stdcall _Lazy_glGetUniformLocationARB(GLhandleARB programObj, const GLcharARB * name) {if (GLeeInit()) return glGetUniformLocationARB(programObj, name); return (GLint)0;} +void __stdcall _Lazy_glGetActiveUniformARB(GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) {if (GLeeInit()) glGetActiveUniformARB(programObj, index, maxLength, length, size, type, name);} +void __stdcall _Lazy_glGetUniformfvARB(GLhandleARB programObj, GLint location, GLfloat * params) {if (GLeeInit()) glGetUniformfvARB(programObj, location, params);} +void __stdcall _Lazy_glGetUniformivARB(GLhandleARB programObj, GLint location, GLint * params) {if (GLeeInit()) glGetUniformivARB(programObj, location, params);} +void __stdcall _Lazy_glGetShaderSourceARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * source) {if (GLeeInit()) glGetShaderSourceARB(obj, maxLength, length, source);} +PFNGLDELETEOBJECTARBPROC pglDeleteObjectARB=_Lazy_glDeleteObjectARB; +PFNGLGETHANDLEARBPROC pglGetHandleARB=_Lazy_glGetHandleARB; +PFNGLDETACHOBJECTARBPROC pglDetachObjectARB=_Lazy_glDetachObjectARB; +PFNGLCREATESHADEROBJECTARBPROC pglCreateShaderObjectARB=_Lazy_glCreateShaderObjectARB; +PFNGLSHADERSOURCEARBPROC pglShaderSourceARB=_Lazy_glShaderSourceARB; +PFNGLCOMPILESHADERARBPROC pglCompileShaderARB=_Lazy_glCompileShaderARB; +PFNGLCREATEPROGRAMOBJECTARBPROC pglCreateProgramObjectARB=_Lazy_glCreateProgramObjectARB; +PFNGLATTACHOBJECTARBPROC pglAttachObjectARB=_Lazy_glAttachObjectARB; +PFNGLLINKPROGRAMARBPROC pglLinkProgramARB=_Lazy_glLinkProgramARB; +PFNGLUSEPROGRAMOBJECTARBPROC pglUseProgramObjectARB=_Lazy_glUseProgramObjectARB; +PFNGLVALIDATEPROGRAMARBPROC pglValidateProgramARB=_Lazy_glValidateProgramARB; +PFNGLUNIFORM1FARBPROC pglUniform1fARB=_Lazy_glUniform1fARB; +PFNGLUNIFORM2FARBPROC pglUniform2fARB=_Lazy_glUniform2fARB; +PFNGLUNIFORM3FARBPROC pglUniform3fARB=_Lazy_glUniform3fARB; +PFNGLUNIFORM4FARBPROC pglUniform4fARB=_Lazy_glUniform4fARB; +PFNGLUNIFORM1IARBPROC pglUniform1iARB=_Lazy_glUniform1iARB; +PFNGLUNIFORM2IARBPROC pglUniform2iARB=_Lazy_glUniform2iARB; +PFNGLUNIFORM3IARBPROC pglUniform3iARB=_Lazy_glUniform3iARB; +PFNGLUNIFORM4IARBPROC pglUniform4iARB=_Lazy_glUniform4iARB; +PFNGLUNIFORM1FVARBPROC pglUniform1fvARB=_Lazy_glUniform1fvARB; +PFNGLUNIFORM2FVARBPROC pglUniform2fvARB=_Lazy_glUniform2fvARB; +PFNGLUNIFORM3FVARBPROC pglUniform3fvARB=_Lazy_glUniform3fvARB; +PFNGLUNIFORM4FVARBPROC pglUniform4fvARB=_Lazy_glUniform4fvARB; +PFNGLUNIFORM1IVARBPROC pglUniform1ivARB=_Lazy_glUniform1ivARB; +PFNGLUNIFORM2IVARBPROC pglUniform2ivARB=_Lazy_glUniform2ivARB; +PFNGLUNIFORM3IVARBPROC pglUniform3ivARB=_Lazy_glUniform3ivARB; +PFNGLUNIFORM4IVARBPROC pglUniform4ivARB=_Lazy_glUniform4ivARB; +PFNGLUNIFORMMATRIX2FVARBPROC pglUniformMatrix2fvARB=_Lazy_glUniformMatrix2fvARB; +PFNGLUNIFORMMATRIX3FVARBPROC pglUniformMatrix3fvARB=_Lazy_glUniformMatrix3fvARB; +PFNGLUNIFORMMATRIX4FVARBPROC pglUniformMatrix4fvARB=_Lazy_glUniformMatrix4fvARB; +PFNGLGETOBJECTPARAMETERFVARBPROC pglGetObjectParameterfvARB=_Lazy_glGetObjectParameterfvARB; +PFNGLGETOBJECTPARAMETERIVARBPROC pglGetObjectParameterivARB=_Lazy_glGetObjectParameterivARB; +PFNGLGETINFOLOGARBPROC pglGetInfoLogARB=_Lazy_glGetInfoLogARB; +PFNGLGETATTACHEDOBJECTSARBPROC pglGetAttachedObjectsARB=_Lazy_glGetAttachedObjectsARB; +PFNGLGETUNIFORMLOCATIONARBPROC pglGetUniformLocationARB=_Lazy_glGetUniformLocationARB; +PFNGLGETACTIVEUNIFORMARBPROC pglGetActiveUniformARB=_Lazy_glGetActiveUniformARB; +PFNGLGETUNIFORMFVARBPROC pglGetUniformfvARB=_Lazy_glGetUniformfvARB; +PFNGLGETUNIFORMIVARBPROC pglGetUniformivARB=_Lazy_glGetUniformivARB; +PFNGLGETSHADERSOURCEARBPROC pglGetShaderSourceARB=_Lazy_glGetShaderSourceARB; +#endif + +/* GL_ARB_vertex_shader */ + +#ifdef __GLEE_GL_ARB_vertex_shader +void __stdcall _Lazy_glBindAttribLocationARB(GLhandleARB programObj, GLuint index, const GLcharARB * name) {if (GLeeInit()) glBindAttribLocationARB(programObj, index, name);} +void __stdcall _Lazy_glGetActiveAttribARB(GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name) {if (GLeeInit()) glGetActiveAttribARB(programObj, index, maxLength, length, size, type, name);} +GLint __stdcall _Lazy_glGetAttribLocationARB(GLhandleARB programObj, const GLcharARB * name) {if (GLeeInit()) return glGetAttribLocationARB(programObj, name); return (GLint)0;} +PFNGLBINDATTRIBLOCATIONARBPROC pglBindAttribLocationARB=_Lazy_glBindAttribLocationARB; +PFNGLGETACTIVEATTRIBARBPROC pglGetActiveAttribARB=_Lazy_glGetActiveAttribARB; +PFNGLGETATTRIBLOCATIONARBPROC pglGetAttribLocationARB=_Lazy_glGetAttribLocationARB; +#endif + +/* GL_ARB_fragment_shader */ + +#ifdef __GLEE_GL_ARB_fragment_shader +#endif + +/* GL_ARB_shading_language_100 */ + +#ifdef __GLEE_GL_ARB_shading_language_100 +#endif + +/* GL_ARB_texture_non_power_of_two */ + +#ifdef __GLEE_GL_ARB_texture_non_power_of_two +#endif + +/* GL_ARB_point_sprite */ + +#ifdef __GLEE_GL_ARB_point_sprite +#endif + +/* GL_ARB_fragment_program_shadow */ + +#ifdef __GLEE_GL_ARB_fragment_program_shadow +#endif + +/* GL_ARB_draw_buffers */ + +#ifdef __GLEE_GL_ARB_draw_buffers +void __stdcall _Lazy_glDrawBuffersARB(GLsizei n, const GLenum * bufs) {if (GLeeInit()) glDrawBuffersARB(n, bufs);} +PFNGLDRAWBUFFERSARBPROC pglDrawBuffersARB=_Lazy_glDrawBuffersARB; +#endif + +/* GL_ARB_texture_rectangle */ + +#ifdef __GLEE_GL_ARB_texture_rectangle +#endif + +/* GL_ARB_color_buffer_float */ + +#ifdef __GLEE_GL_ARB_color_buffer_float +void __stdcall _Lazy_glClampColorARB(GLenum target, GLenum clamp) {if (GLeeInit()) glClampColorARB(target, clamp);} +PFNGLCLAMPCOLORARBPROC pglClampColorARB=_Lazy_glClampColorARB; +#endif + +/* GL_ARB_half_float_pixel */ + +#ifdef __GLEE_GL_ARB_half_float_pixel +#endif + +/* GL_ARB_texture_float */ + +#ifdef __GLEE_GL_ARB_texture_float +#endif + +/* GL_ARB_pixel_buffer_object */ + +#ifdef __GLEE_GL_ARB_pixel_buffer_object +#endif + +/* GL_EXT_abgr */ + +#ifdef __GLEE_GL_EXT_abgr +#endif + +/* GL_EXT_blend_color */ + +#ifdef __GLEE_GL_EXT_blend_color +void __stdcall _Lazy_glBlendColorEXT(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {if (GLeeInit()) glBlendColorEXT(red, green, blue, alpha);} +PFNGLBLENDCOLOREXTPROC pglBlendColorEXT=_Lazy_glBlendColorEXT; +#endif + +/* GL_EXT_polygon_offset */ + +#ifdef __GLEE_GL_EXT_polygon_offset +void __stdcall _Lazy_glPolygonOffsetEXT(GLfloat factor, GLfloat bias) {if (GLeeInit()) glPolygonOffsetEXT(factor, bias);} +PFNGLPOLYGONOFFSETEXTPROC pglPolygonOffsetEXT=_Lazy_glPolygonOffsetEXT; +#endif + +/* GL_EXT_texture */ + +#ifdef __GLEE_GL_EXT_texture +#endif + +/* GL_EXT_texture3D */ + +#ifdef __GLEE_GL_EXT_texture3D +void __stdcall _Lazy_glTexImage3DEXT(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels) {if (GLeeInit()) glTexImage3DEXT(target, level, internalformat, width, height, depth, border, format, type, pixels);} +void __stdcall _Lazy_glTexSubImage3DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels) {if (GLeeInit()) glTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);} +PFNGLTEXIMAGE3DEXTPROC pglTexImage3DEXT=_Lazy_glTexImage3DEXT; +PFNGLTEXSUBIMAGE3DEXTPROC pglTexSubImage3DEXT=_Lazy_glTexSubImage3DEXT; +#endif + +/* GL_SGIS_texture_filter4 */ + +#ifdef __GLEE_GL_SGIS_texture_filter4 +void __stdcall _Lazy_glGetTexFilterFuncSGIS(GLenum target, GLenum filter, GLfloat * weights) {if (GLeeInit()) glGetTexFilterFuncSGIS(target, filter, weights);} +void __stdcall _Lazy_glTexFilterFuncSGIS(GLenum target, GLenum filter, GLsizei n, const GLfloat * weights) {if (GLeeInit()) glTexFilterFuncSGIS(target, filter, n, weights);} +PFNGLGETTEXFILTERFUNCSGISPROC pglGetTexFilterFuncSGIS=_Lazy_glGetTexFilterFuncSGIS; +PFNGLTEXFILTERFUNCSGISPROC pglTexFilterFuncSGIS=_Lazy_glTexFilterFuncSGIS; +#endif + +/* GL_EXT_subtexture */ + +#ifdef __GLEE_GL_EXT_subtexture +void __stdcall _Lazy_glTexSubImage1DEXT(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels) {if (GLeeInit()) glTexSubImage1DEXT(target, level, xoffset, width, format, type, pixels);} +void __stdcall _Lazy_glTexSubImage2DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels) {if (GLeeInit()) glTexSubImage2DEXT(target, level, xoffset, yoffset, width, height, format, type, pixels);} +PFNGLTEXSUBIMAGE1DEXTPROC pglTexSubImage1DEXT=_Lazy_glTexSubImage1DEXT; +PFNGLTEXSUBIMAGE2DEXTPROC pglTexSubImage2DEXT=_Lazy_glTexSubImage2DEXT; +#endif + +/* GL_EXT_copy_texture */ + +#ifdef __GLEE_GL_EXT_copy_texture +void __stdcall _Lazy_glCopyTexImage1DEXT(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) {if (GLeeInit()) glCopyTexImage1DEXT(target, level, internalformat, x, y, width, border);} +void __stdcall _Lazy_glCopyTexImage2DEXT(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {if (GLeeInit()) glCopyTexImage2DEXT(target, level, internalformat, x, y, width, height, border);} +void __stdcall _Lazy_glCopyTexSubImage1DEXT(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) {if (GLeeInit()) glCopyTexSubImage1DEXT(target, level, xoffset, x, y, width);} +void __stdcall _Lazy_glCopyTexSubImage2DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {if (GLeeInit()) glCopyTexSubImage2DEXT(target, level, xoffset, yoffset, x, y, width, height);} +void __stdcall _Lazy_glCopyTexSubImage3DEXT(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {if (GLeeInit()) glCopyTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, x, y, width, height);} +PFNGLCOPYTEXIMAGE1DEXTPROC pglCopyTexImage1DEXT=_Lazy_glCopyTexImage1DEXT; +PFNGLCOPYTEXIMAGE2DEXTPROC pglCopyTexImage2DEXT=_Lazy_glCopyTexImage2DEXT; +PFNGLCOPYTEXSUBIMAGE1DEXTPROC pglCopyTexSubImage1DEXT=_Lazy_glCopyTexSubImage1DEXT; +PFNGLCOPYTEXSUBIMAGE2DEXTPROC pglCopyTexSubImage2DEXT=_Lazy_glCopyTexSubImage2DEXT; +PFNGLCOPYTEXSUBIMAGE3DEXTPROC pglCopyTexSubImage3DEXT=_Lazy_glCopyTexSubImage3DEXT; +#endif + +/* GL_EXT_histogram */ + +#ifdef __GLEE_GL_EXT_histogram +void __stdcall _Lazy_glGetHistogramEXT(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) {if (GLeeInit()) glGetHistogramEXT(target, reset, format, type, values);} +void __stdcall _Lazy_glGetHistogramParameterfvEXT(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetHistogramParameterfvEXT(target, pname, params);} +void __stdcall _Lazy_glGetHistogramParameterivEXT(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetHistogramParameterivEXT(target, pname, params);} +void __stdcall _Lazy_glGetMinmaxEXT(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values) {if (GLeeInit()) glGetMinmaxEXT(target, reset, format, type, values);} +void __stdcall _Lazy_glGetMinmaxParameterfvEXT(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetMinmaxParameterfvEXT(target, pname, params);} +void __stdcall _Lazy_glGetMinmaxParameterivEXT(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetMinmaxParameterivEXT(target, pname, params);} +void __stdcall _Lazy_glHistogramEXT(GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) {if (GLeeInit()) glHistogramEXT(target, width, internalformat, sink);} +void __stdcall _Lazy_glMinmaxEXT(GLenum target, GLenum internalformat, GLboolean sink) {if (GLeeInit()) glMinmaxEXT(target, internalformat, sink);} +void __stdcall _Lazy_glResetHistogramEXT(GLenum target) {if (GLeeInit()) glResetHistogramEXT(target);} +void __stdcall _Lazy_glResetMinmaxEXT(GLenum target) {if (GLeeInit()) glResetMinmaxEXT(target);} +PFNGLGETHISTOGRAMEXTPROC pglGetHistogramEXT=_Lazy_glGetHistogramEXT; +PFNGLGETHISTOGRAMPARAMETERFVEXTPROC pglGetHistogramParameterfvEXT=_Lazy_glGetHistogramParameterfvEXT; +PFNGLGETHISTOGRAMPARAMETERIVEXTPROC pglGetHistogramParameterivEXT=_Lazy_glGetHistogramParameterivEXT; +PFNGLGETMINMAXEXTPROC pglGetMinmaxEXT=_Lazy_glGetMinmaxEXT; +PFNGLGETMINMAXPARAMETERFVEXTPROC pglGetMinmaxParameterfvEXT=_Lazy_glGetMinmaxParameterfvEXT; +PFNGLGETMINMAXPARAMETERIVEXTPROC pglGetMinmaxParameterivEXT=_Lazy_glGetMinmaxParameterivEXT; +PFNGLHISTOGRAMEXTPROC pglHistogramEXT=_Lazy_glHistogramEXT; +PFNGLMINMAXEXTPROC pglMinmaxEXT=_Lazy_glMinmaxEXT; +PFNGLRESETHISTOGRAMEXTPROC pglResetHistogramEXT=_Lazy_glResetHistogramEXT; +PFNGLRESETMINMAXEXTPROC pglResetMinmaxEXT=_Lazy_glResetMinmaxEXT; +#endif + +/* GL_EXT_convolution */ + +#ifdef __GLEE_GL_EXT_convolution +void __stdcall _Lazy_glConvolutionFilter1DEXT(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image) {if (GLeeInit()) glConvolutionFilter1DEXT(target, internalformat, width, format, type, image);} +void __stdcall _Lazy_glConvolutionFilter2DEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image) {if (GLeeInit()) glConvolutionFilter2DEXT(target, internalformat, width, height, format, type, image);} +void __stdcall _Lazy_glConvolutionParameterfEXT(GLenum target, GLenum pname, GLfloat params) {if (GLeeInit()) glConvolutionParameterfEXT(target, pname, params);} +void __stdcall _Lazy_glConvolutionParameterfvEXT(GLenum target, GLenum pname, const GLfloat * params) {if (GLeeInit()) glConvolutionParameterfvEXT(target, pname, params);} +void __stdcall _Lazy_glConvolutionParameteriEXT(GLenum target, GLenum pname, GLint params) {if (GLeeInit()) glConvolutionParameteriEXT(target, pname, params);} +void __stdcall _Lazy_glConvolutionParameterivEXT(GLenum target, GLenum pname, const GLint * params) {if (GLeeInit()) glConvolutionParameterivEXT(target, pname, params);} +void __stdcall _Lazy_glCopyConvolutionFilter1DEXT(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) {if (GLeeInit()) glCopyConvolutionFilter1DEXT(target, internalformat, x, y, width);} +void __stdcall _Lazy_glCopyConvolutionFilter2DEXT(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) {if (GLeeInit()) glCopyConvolutionFilter2DEXT(target, internalformat, x, y, width, height);} +void __stdcall _Lazy_glGetConvolutionFilterEXT(GLenum target, GLenum format, GLenum type, GLvoid * image) {if (GLeeInit()) glGetConvolutionFilterEXT(target, format, type, image);} +void __stdcall _Lazy_glGetConvolutionParameterfvEXT(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetConvolutionParameterfvEXT(target, pname, params);} +void __stdcall _Lazy_glGetConvolutionParameterivEXT(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetConvolutionParameterivEXT(target, pname, params);} +void __stdcall _Lazy_glGetSeparableFilterEXT(GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span) {if (GLeeInit()) glGetSeparableFilterEXT(target, format, type, row, column, span);} +void __stdcall _Lazy_glSeparableFilter2DEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column) {if (GLeeInit()) glSeparableFilter2DEXT(target, internalformat, width, height, format, type, row, column);} +PFNGLCONVOLUTIONFILTER1DEXTPROC pglConvolutionFilter1DEXT=_Lazy_glConvolutionFilter1DEXT; +PFNGLCONVOLUTIONFILTER2DEXTPROC pglConvolutionFilter2DEXT=_Lazy_glConvolutionFilter2DEXT; +PFNGLCONVOLUTIONPARAMETERFEXTPROC pglConvolutionParameterfEXT=_Lazy_glConvolutionParameterfEXT; +PFNGLCONVOLUTIONPARAMETERFVEXTPROC pglConvolutionParameterfvEXT=_Lazy_glConvolutionParameterfvEXT; +PFNGLCONVOLUTIONPARAMETERIEXTPROC pglConvolutionParameteriEXT=_Lazy_glConvolutionParameteriEXT; +PFNGLCONVOLUTIONPARAMETERIVEXTPROC pglConvolutionParameterivEXT=_Lazy_glConvolutionParameterivEXT; +PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC pglCopyConvolutionFilter1DEXT=_Lazy_glCopyConvolutionFilter1DEXT; +PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC pglCopyConvolutionFilter2DEXT=_Lazy_glCopyConvolutionFilter2DEXT; +PFNGLGETCONVOLUTIONFILTEREXTPROC pglGetConvolutionFilterEXT=_Lazy_glGetConvolutionFilterEXT; +PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC pglGetConvolutionParameterfvEXT=_Lazy_glGetConvolutionParameterfvEXT; +PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC pglGetConvolutionParameterivEXT=_Lazy_glGetConvolutionParameterivEXT; +PFNGLGETSEPARABLEFILTEREXTPROC pglGetSeparableFilterEXT=_Lazy_glGetSeparableFilterEXT; +PFNGLSEPARABLEFILTER2DEXTPROC pglSeparableFilter2DEXT=_Lazy_glSeparableFilter2DEXT; +#endif + +/* GL_SGI_color_matrix */ + +#ifdef __GLEE_GL_SGI_color_matrix +#endif + +/* GL_SGI_color_table */ + +#ifdef __GLEE_GL_SGI_color_table +void __stdcall _Lazy_glColorTableSGI(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) {if (GLeeInit()) glColorTableSGI(target, internalformat, width, format, type, table);} +void __stdcall _Lazy_glColorTableParameterfvSGI(GLenum target, GLenum pname, const GLfloat * params) {if (GLeeInit()) glColorTableParameterfvSGI(target, pname, params);} +void __stdcall _Lazy_glColorTableParameterivSGI(GLenum target, GLenum pname, const GLint * params) {if (GLeeInit()) glColorTableParameterivSGI(target, pname, params);} +void __stdcall _Lazy_glCopyColorTableSGI(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) {if (GLeeInit()) glCopyColorTableSGI(target, internalformat, x, y, width);} +void __stdcall _Lazy_glGetColorTableSGI(GLenum target, GLenum format, GLenum type, GLvoid * table) {if (GLeeInit()) glGetColorTableSGI(target, format, type, table);} +void __stdcall _Lazy_glGetColorTableParameterfvSGI(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetColorTableParameterfvSGI(target, pname, params);} +void __stdcall _Lazy_glGetColorTableParameterivSGI(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetColorTableParameterivSGI(target, pname, params);} +PFNGLCOLORTABLESGIPROC pglColorTableSGI=_Lazy_glColorTableSGI; +PFNGLCOLORTABLEPARAMETERFVSGIPROC pglColorTableParameterfvSGI=_Lazy_glColorTableParameterfvSGI; +PFNGLCOLORTABLEPARAMETERIVSGIPROC pglColorTableParameterivSGI=_Lazy_glColorTableParameterivSGI; +PFNGLCOPYCOLORTABLESGIPROC pglCopyColorTableSGI=_Lazy_glCopyColorTableSGI; +PFNGLGETCOLORTABLESGIPROC pglGetColorTableSGI=_Lazy_glGetColorTableSGI; +PFNGLGETCOLORTABLEPARAMETERFVSGIPROC pglGetColorTableParameterfvSGI=_Lazy_glGetColorTableParameterfvSGI; +PFNGLGETCOLORTABLEPARAMETERIVSGIPROC pglGetColorTableParameterivSGI=_Lazy_glGetColorTableParameterivSGI; +#endif + +/* GL_SGIS_pixel_texture */ + +#ifdef __GLEE_GL_SGIS_pixel_texture +void __stdcall _Lazy_glPixelTexGenParameteriSGIS(GLenum pname, GLint param) {if (GLeeInit()) glPixelTexGenParameteriSGIS(pname, param);} +void __stdcall _Lazy_glPixelTexGenParameterivSGIS(GLenum pname, const GLint * params) {if (GLeeInit()) glPixelTexGenParameterivSGIS(pname, params);} +void __stdcall _Lazy_glPixelTexGenParameterfSGIS(GLenum pname, GLfloat param) {if (GLeeInit()) glPixelTexGenParameterfSGIS(pname, param);} +void __stdcall _Lazy_glPixelTexGenParameterfvSGIS(GLenum pname, const GLfloat * params) {if (GLeeInit()) glPixelTexGenParameterfvSGIS(pname, params);} +void __stdcall _Lazy_glGetPixelTexGenParameterivSGIS(GLenum pname, GLint * params) {if (GLeeInit()) glGetPixelTexGenParameterivSGIS(pname, params);} +void __stdcall _Lazy_glGetPixelTexGenParameterfvSGIS(GLenum pname, GLfloat * params) {if (GLeeInit()) glGetPixelTexGenParameterfvSGIS(pname, params);} +PFNGLPIXELTEXGENPARAMETERISGISPROC pglPixelTexGenParameteriSGIS=_Lazy_glPixelTexGenParameteriSGIS; +PFNGLPIXELTEXGENPARAMETERIVSGISPROC pglPixelTexGenParameterivSGIS=_Lazy_glPixelTexGenParameterivSGIS; +PFNGLPIXELTEXGENPARAMETERFSGISPROC pglPixelTexGenParameterfSGIS=_Lazy_glPixelTexGenParameterfSGIS; +PFNGLPIXELTEXGENPARAMETERFVSGISPROC pglPixelTexGenParameterfvSGIS=_Lazy_glPixelTexGenParameterfvSGIS; +PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC pglGetPixelTexGenParameterivSGIS=_Lazy_glGetPixelTexGenParameterivSGIS; +PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC pglGetPixelTexGenParameterfvSGIS=_Lazy_glGetPixelTexGenParameterfvSGIS; +#endif + +/* GL_SGIX_pixel_texture */ + +#ifdef __GLEE_GL_SGIX_pixel_texture +void __stdcall _Lazy_glPixelTexGenSGIX(GLenum mode) {if (GLeeInit()) glPixelTexGenSGIX(mode);} +PFNGLPIXELTEXGENSGIXPROC pglPixelTexGenSGIX=_Lazy_glPixelTexGenSGIX; +#endif + +/* GL_SGIS_texture4D */ + +#ifdef __GLEE_GL_SGIS_texture4D +void __stdcall _Lazy_glTexImage4DSGIS(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels) {if (GLeeInit()) glTexImage4DSGIS(target, level, internalformat, width, height, depth, size4d, border, format, type, pixels);} +void __stdcall _Lazy_glTexSubImage4DSGIS(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid * pixels) {if (GLeeInit()) glTexSubImage4DSGIS(target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels);} +PFNGLTEXIMAGE4DSGISPROC pglTexImage4DSGIS=_Lazy_glTexImage4DSGIS; +PFNGLTEXSUBIMAGE4DSGISPROC pglTexSubImage4DSGIS=_Lazy_glTexSubImage4DSGIS; +#endif + +/* GL_SGI_texture_color_table */ + +#ifdef __GLEE_GL_SGI_texture_color_table +#endif + +/* GL_EXT_cmyka */ + +#ifdef __GLEE_GL_EXT_cmyka +#endif + +/* GL_EXT_texture_object */ + +#ifdef __GLEE_GL_EXT_texture_object +GLboolean __stdcall _Lazy_glAreTexturesResidentEXT(GLsizei n, const GLuint * textures, GLboolean * residences) {if (GLeeInit()) return glAreTexturesResidentEXT(n, textures, residences); return (GLboolean)0;} +void __stdcall _Lazy_glBindTextureEXT(GLenum target, GLuint texture) {if (GLeeInit()) glBindTextureEXT(target, texture);} +void __stdcall _Lazy_glDeleteTexturesEXT(GLsizei n, const GLuint * textures) {if (GLeeInit()) glDeleteTexturesEXT(n, textures);} +void __stdcall _Lazy_glGenTexturesEXT(GLsizei n, GLuint * textures) {if (GLeeInit()) glGenTexturesEXT(n, textures);} +GLboolean __stdcall _Lazy_glIsTextureEXT(GLuint texture) {if (GLeeInit()) return glIsTextureEXT(texture); return (GLboolean)0;} +void __stdcall _Lazy_glPrioritizeTexturesEXT(GLsizei n, const GLuint * textures, const GLclampf * priorities) {if (GLeeInit()) glPrioritizeTexturesEXT(n, textures, priorities);} +PFNGLARETEXTURESRESIDENTEXTPROC pglAreTexturesResidentEXT=_Lazy_glAreTexturesResidentEXT; +PFNGLBINDTEXTUREEXTPROC pglBindTextureEXT=_Lazy_glBindTextureEXT; +PFNGLDELETETEXTURESEXTPROC pglDeleteTexturesEXT=_Lazy_glDeleteTexturesEXT; +PFNGLGENTEXTURESEXTPROC pglGenTexturesEXT=_Lazy_glGenTexturesEXT; +PFNGLISTEXTUREEXTPROC pglIsTextureEXT=_Lazy_glIsTextureEXT; +PFNGLPRIORITIZETEXTURESEXTPROC pglPrioritizeTexturesEXT=_Lazy_glPrioritizeTexturesEXT; +#endif + +/* GL_SGIS_detail_texture */ + +#ifdef __GLEE_GL_SGIS_detail_texture +void __stdcall _Lazy_glDetailTexFuncSGIS(GLenum target, GLsizei n, const GLfloat * points) {if (GLeeInit()) glDetailTexFuncSGIS(target, n, points);} +void __stdcall _Lazy_glGetDetailTexFuncSGIS(GLenum target, GLfloat * points) {if (GLeeInit()) glGetDetailTexFuncSGIS(target, points);} +PFNGLDETAILTEXFUNCSGISPROC pglDetailTexFuncSGIS=_Lazy_glDetailTexFuncSGIS; +PFNGLGETDETAILTEXFUNCSGISPROC pglGetDetailTexFuncSGIS=_Lazy_glGetDetailTexFuncSGIS; +#endif + +/* GL_SGIS_sharpen_texture */ + +#ifdef __GLEE_GL_SGIS_sharpen_texture +void __stdcall _Lazy_glSharpenTexFuncSGIS(GLenum target, GLsizei n, const GLfloat * points) {if (GLeeInit()) glSharpenTexFuncSGIS(target, n, points);} +void __stdcall _Lazy_glGetSharpenTexFuncSGIS(GLenum target, GLfloat * points) {if (GLeeInit()) glGetSharpenTexFuncSGIS(target, points);} +PFNGLSHARPENTEXFUNCSGISPROC pglSharpenTexFuncSGIS=_Lazy_glSharpenTexFuncSGIS; +PFNGLGETSHARPENTEXFUNCSGISPROC pglGetSharpenTexFuncSGIS=_Lazy_glGetSharpenTexFuncSGIS; +#endif + +/* GL_EXT_packed_pixels */ + +#ifdef __GLEE_GL_EXT_packed_pixels +#endif + +/* GL_SGIS_texture_lod */ + +#ifdef __GLEE_GL_SGIS_texture_lod +#endif + +/* GL_SGIS_multisample */ + +#ifdef __GLEE_GL_SGIS_multisample +void __stdcall _Lazy_glSampleMaskSGIS(GLclampf value, GLboolean invert) {if (GLeeInit()) glSampleMaskSGIS(value, invert);} +void __stdcall _Lazy_glSamplePatternSGIS(GLenum pattern) {if (GLeeInit()) glSamplePatternSGIS(pattern);} +PFNGLSAMPLEMASKSGISPROC pglSampleMaskSGIS=_Lazy_glSampleMaskSGIS; +PFNGLSAMPLEPATTERNSGISPROC pglSamplePatternSGIS=_Lazy_glSamplePatternSGIS; +#endif + +/* GL_EXT_rescale_normal */ + +#ifdef __GLEE_GL_EXT_rescale_normal +#endif + +/* GL_EXT_vertex_array */ + +#ifdef __GLEE_GL_EXT_vertex_array +void __stdcall _Lazy_glArrayElementEXT(GLint i) {if (GLeeInit()) glArrayElementEXT(i);} +void __stdcall _Lazy_glColorPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) {if (GLeeInit()) glColorPointerEXT(size, type, stride, count, pointer);} +void __stdcall _Lazy_glDrawArraysEXT(GLenum mode, GLint first, GLsizei count) {if (GLeeInit()) glDrawArraysEXT(mode, first, count);} +void __stdcall _Lazy_glEdgeFlagPointerEXT(GLsizei stride, GLsizei count, const GLboolean * pointer) {if (GLeeInit()) glEdgeFlagPointerEXT(stride, count, pointer);} +void __stdcall _Lazy_glGetPointervEXT(GLenum pname, GLvoid* * params) {if (GLeeInit()) glGetPointervEXT(pname, params);} +void __stdcall _Lazy_glIndexPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) {if (GLeeInit()) glIndexPointerEXT(type, stride, count, pointer);} +void __stdcall _Lazy_glNormalPointerEXT(GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) {if (GLeeInit()) glNormalPointerEXT(type, stride, count, pointer);} +void __stdcall _Lazy_glTexCoordPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) {if (GLeeInit()) glTexCoordPointerEXT(size, type, stride, count, pointer);} +void __stdcall _Lazy_glVertexPointerEXT(GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer) {if (GLeeInit()) glVertexPointerEXT(size, type, stride, count, pointer);} +PFNGLARRAYELEMENTEXTPROC pglArrayElementEXT=_Lazy_glArrayElementEXT; +PFNGLCOLORPOINTEREXTPROC pglColorPointerEXT=_Lazy_glColorPointerEXT; +PFNGLDRAWARRAYSEXTPROC pglDrawArraysEXT=_Lazy_glDrawArraysEXT; +PFNGLEDGEFLAGPOINTEREXTPROC pglEdgeFlagPointerEXT=_Lazy_glEdgeFlagPointerEXT; +PFNGLGETPOINTERVEXTPROC pglGetPointervEXT=_Lazy_glGetPointervEXT; +PFNGLINDEXPOINTEREXTPROC pglIndexPointerEXT=_Lazy_glIndexPointerEXT; +PFNGLNORMALPOINTEREXTPROC pglNormalPointerEXT=_Lazy_glNormalPointerEXT; +PFNGLTEXCOORDPOINTEREXTPROC pglTexCoordPointerEXT=_Lazy_glTexCoordPointerEXT; +PFNGLVERTEXPOINTEREXTPROC pglVertexPointerEXT=_Lazy_glVertexPointerEXT; +#endif + +/* GL_EXT_misc_attribute */ + +#ifdef __GLEE_GL_EXT_misc_attribute +#endif + +/* GL_SGIS_generate_mipmap */ + +#ifdef __GLEE_GL_SGIS_generate_mipmap +#endif + +/* GL_SGIX_clipmap */ + +#ifdef __GLEE_GL_SGIX_clipmap +#endif + +/* GL_SGIX_shadow */ + +#ifdef __GLEE_GL_SGIX_shadow +#endif + +/* GL_SGIS_texture_edge_clamp */ + +#ifdef __GLEE_GL_SGIS_texture_edge_clamp +#endif + +/* GL_SGIS_texture_border_clamp */ + +#ifdef __GLEE_GL_SGIS_texture_border_clamp +#endif + +/* GL_EXT_blend_minmax */ + +#ifdef __GLEE_GL_EXT_blend_minmax +void __stdcall _Lazy_glBlendEquationEXT(GLenum mode) {if (GLeeInit()) glBlendEquationEXT(mode);} +PFNGLBLENDEQUATIONEXTPROC pglBlendEquationEXT=_Lazy_glBlendEquationEXT; +#endif + +/* GL_EXT_blend_subtract */ + +#ifdef __GLEE_GL_EXT_blend_subtract +#endif + +/* GL_EXT_blend_logic_op */ + +#ifdef __GLEE_GL_EXT_blend_logic_op +#endif + +/* GL_SGIX_interlace */ + +#ifdef __GLEE_GL_SGIX_interlace +#endif + +/* GL_SGIX_pixel_tiles */ + +#ifdef __GLEE_GL_SGIX_pixel_tiles +#endif + +/* GL_SGIS_texture_select */ + +#ifdef __GLEE_GL_SGIS_texture_select +#endif + +/* GL_SGIX_sprite */ + +#ifdef __GLEE_GL_SGIX_sprite +void __stdcall _Lazy_glSpriteParameterfSGIX(GLenum pname, GLfloat param) {if (GLeeInit()) glSpriteParameterfSGIX(pname, param);} +void __stdcall _Lazy_glSpriteParameterfvSGIX(GLenum pname, const GLfloat * params) {if (GLeeInit()) glSpriteParameterfvSGIX(pname, params);} +void __stdcall _Lazy_glSpriteParameteriSGIX(GLenum pname, GLint param) {if (GLeeInit()) glSpriteParameteriSGIX(pname, param);} +void __stdcall _Lazy_glSpriteParameterivSGIX(GLenum pname, const GLint * params) {if (GLeeInit()) glSpriteParameterivSGIX(pname, params);} +PFNGLSPRITEPARAMETERFSGIXPROC pglSpriteParameterfSGIX=_Lazy_glSpriteParameterfSGIX; +PFNGLSPRITEPARAMETERFVSGIXPROC pglSpriteParameterfvSGIX=_Lazy_glSpriteParameterfvSGIX; +PFNGLSPRITEPARAMETERISGIXPROC pglSpriteParameteriSGIX=_Lazy_glSpriteParameteriSGIX; +PFNGLSPRITEPARAMETERIVSGIXPROC pglSpriteParameterivSGIX=_Lazy_glSpriteParameterivSGIX; +#endif + +/* GL_SGIX_texture_multi_buffer */ + +#ifdef __GLEE_GL_SGIX_texture_multi_buffer +#endif + +/* GL_EXT_point_parameters */ + +#ifdef __GLEE_GL_EXT_point_parameters +void __stdcall _Lazy_glPointParameterfEXT(GLenum pname, GLfloat param) {if (GLeeInit()) glPointParameterfEXT(pname, param);} +void __stdcall _Lazy_glPointParameterfvEXT(GLenum pname, const GLfloat * params) {if (GLeeInit()) glPointParameterfvEXT(pname, params);} +PFNGLPOINTPARAMETERFEXTPROC pglPointParameterfEXT=_Lazy_glPointParameterfEXT; +PFNGLPOINTPARAMETERFVEXTPROC pglPointParameterfvEXT=_Lazy_glPointParameterfvEXT; +#endif + +/* GL_SGIS_point_parameters */ + +#ifdef __GLEE_GL_SGIS_point_parameters +void __stdcall _Lazy_glPointParameterfSGIS(GLenum pname, GLfloat param) {if (GLeeInit()) glPointParameterfSGIS(pname, param);} +void __stdcall _Lazy_glPointParameterfvSGIS(GLenum pname, const GLfloat * params) {if (GLeeInit()) glPointParameterfvSGIS(pname, params);} +PFNGLPOINTPARAMETERFSGISPROC pglPointParameterfSGIS=_Lazy_glPointParameterfSGIS; +PFNGLPOINTPARAMETERFVSGISPROC pglPointParameterfvSGIS=_Lazy_glPointParameterfvSGIS; +#endif + +/* GL_SGIX_instruments */ + +#ifdef __GLEE_GL_SGIX_instruments +GLint __stdcall _Lazy_glGetInstrumentsSGIX(void) {if (GLeeInit()) return glGetInstrumentsSGIX(); return (GLint)0;} +void __stdcall _Lazy_glInstrumentsBufferSGIX(GLsizei size, GLint * buffer) {if (GLeeInit()) glInstrumentsBufferSGIX(size, buffer);} +GLint __stdcall _Lazy_glPollInstrumentsSGIX(GLint * marker_p) {if (GLeeInit()) return glPollInstrumentsSGIX(marker_p); return (GLint)0;} +void __stdcall _Lazy_glReadInstrumentsSGIX(GLint marker) {if (GLeeInit()) glReadInstrumentsSGIX(marker);} +void __stdcall _Lazy_glStartInstrumentsSGIX(void) {if (GLeeInit()) glStartInstrumentsSGIX();} +void __stdcall _Lazy_glStopInstrumentsSGIX(GLint marker) {if (GLeeInit()) glStopInstrumentsSGIX(marker);} +PFNGLGETINSTRUMENTSSGIXPROC pglGetInstrumentsSGIX=_Lazy_glGetInstrumentsSGIX; +PFNGLINSTRUMENTSBUFFERSGIXPROC pglInstrumentsBufferSGIX=_Lazy_glInstrumentsBufferSGIX; +PFNGLPOLLINSTRUMENTSSGIXPROC pglPollInstrumentsSGIX=_Lazy_glPollInstrumentsSGIX; +PFNGLREADINSTRUMENTSSGIXPROC pglReadInstrumentsSGIX=_Lazy_glReadInstrumentsSGIX; +PFNGLSTARTINSTRUMENTSSGIXPROC pglStartInstrumentsSGIX=_Lazy_glStartInstrumentsSGIX; +PFNGLSTOPINSTRUMENTSSGIXPROC pglStopInstrumentsSGIX=_Lazy_glStopInstrumentsSGIX; +#endif + +/* GL_SGIX_texture_scale_bias */ + +#ifdef __GLEE_GL_SGIX_texture_scale_bias +#endif + +/* GL_SGIX_framezoom */ + +#ifdef __GLEE_GL_SGIX_framezoom +void __stdcall _Lazy_glFrameZoomSGIX(GLint factor) {if (GLeeInit()) glFrameZoomSGIX(factor);} +PFNGLFRAMEZOOMSGIXPROC pglFrameZoomSGIX=_Lazy_glFrameZoomSGIX; +#endif + +/* GL_SGIX_tag_sample_buffer */ + +#ifdef __GLEE_GL_SGIX_tag_sample_buffer +void __stdcall _Lazy_glTagSampleBufferSGIX(void) {if (GLeeInit()) glTagSampleBufferSGIX();} +PFNGLTAGSAMPLEBUFFERSGIXPROC pglTagSampleBufferSGIX=_Lazy_glTagSampleBufferSGIX; +#endif + +/* GL_FfdMaskSGIX */ + +#ifdef __GLEE_GL_FfdMaskSGIX +#endif + +/* GL_SGIX_polynomial_ffd */ + +#ifdef __GLEE_GL_SGIX_polynomial_ffd +void __stdcall _Lazy_glDeformationMap3dSGIX(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble * points) {if (GLeeInit()) glDeformationMap3dSGIX(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points);} +void __stdcall _Lazy_glDeformationMap3fSGIX(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat * points) {if (GLeeInit()) glDeformationMap3fSGIX(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points);} +void __stdcall _Lazy_glDeformSGIX(GLbitfield mask) {if (GLeeInit()) glDeformSGIX(mask);} +void __stdcall _Lazy_glLoadIdentityDeformationMapSGIX(GLbitfield mask) {if (GLeeInit()) glLoadIdentityDeformationMapSGIX(mask);} +PFNGLDEFORMATIONMAP3DSGIXPROC pglDeformationMap3dSGIX=_Lazy_glDeformationMap3dSGIX; +PFNGLDEFORMATIONMAP3FSGIXPROC pglDeformationMap3fSGIX=_Lazy_glDeformationMap3fSGIX; +PFNGLDEFORMSGIXPROC pglDeformSGIX=_Lazy_glDeformSGIX; +PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC pglLoadIdentityDeformationMapSGIX=_Lazy_glLoadIdentityDeformationMapSGIX; +#endif + +/* GL_SGIX_reference_plane */ + +#ifdef __GLEE_GL_SGIX_reference_plane +void __stdcall _Lazy_glReferencePlaneSGIX(const GLdouble * equation) {if (GLeeInit()) glReferencePlaneSGIX(equation);} +PFNGLREFERENCEPLANESGIXPROC pglReferencePlaneSGIX=_Lazy_glReferencePlaneSGIX; +#endif + +/* GL_SGIX_flush_raster */ + +#ifdef __GLEE_GL_SGIX_flush_raster +void __stdcall _Lazy_glFlushRasterSGIX(void) {if (GLeeInit()) glFlushRasterSGIX();} +PFNGLFLUSHRASTERSGIXPROC pglFlushRasterSGIX=_Lazy_glFlushRasterSGIX; +#endif + +/* GL_SGIX_depth_texture */ + +#ifdef __GLEE_GL_SGIX_depth_texture +#endif + +/* GL_SGIS_fog_function */ + +#ifdef __GLEE_GL_SGIS_fog_function +void __stdcall _Lazy_glFogFuncSGIS(GLsizei n, const GLfloat * points) {if (GLeeInit()) glFogFuncSGIS(n, points);} +void __stdcall _Lazy_glGetFogFuncSGIS(GLfloat * points) {if (GLeeInit()) glGetFogFuncSGIS(points);} +PFNGLFOGFUNCSGISPROC pglFogFuncSGIS=_Lazy_glFogFuncSGIS; +PFNGLGETFOGFUNCSGISPROC pglGetFogFuncSGIS=_Lazy_glGetFogFuncSGIS; +#endif + +/* GL_SGIX_fog_offset */ + +#ifdef __GLEE_GL_SGIX_fog_offset +#endif + +/* GL_HP_image_transform */ + +#ifdef __GLEE_GL_HP_image_transform +void __stdcall _Lazy_glImageTransformParameteriHP(GLenum target, GLenum pname, GLint param) {if (GLeeInit()) glImageTransformParameteriHP(target, pname, param);} +void __stdcall _Lazy_glImageTransformParameterfHP(GLenum target, GLenum pname, GLfloat param) {if (GLeeInit()) glImageTransformParameterfHP(target, pname, param);} +void __stdcall _Lazy_glImageTransformParameterivHP(GLenum target, GLenum pname, const GLint * params) {if (GLeeInit()) glImageTransformParameterivHP(target, pname, params);} +void __stdcall _Lazy_glImageTransformParameterfvHP(GLenum target, GLenum pname, const GLfloat * params) {if (GLeeInit()) glImageTransformParameterfvHP(target, pname, params);} +void __stdcall _Lazy_glGetImageTransformParameterivHP(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetImageTransformParameterivHP(target, pname, params);} +void __stdcall _Lazy_glGetImageTransformParameterfvHP(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetImageTransformParameterfvHP(target, pname, params);} +PFNGLIMAGETRANSFORMPARAMETERIHPPROC pglImageTransformParameteriHP=_Lazy_glImageTransformParameteriHP; +PFNGLIMAGETRANSFORMPARAMETERFHPPROC pglImageTransformParameterfHP=_Lazy_glImageTransformParameterfHP; +PFNGLIMAGETRANSFORMPARAMETERIVHPPROC pglImageTransformParameterivHP=_Lazy_glImageTransformParameterivHP; +PFNGLIMAGETRANSFORMPARAMETERFVHPPROC pglImageTransformParameterfvHP=_Lazy_glImageTransformParameterfvHP; +PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC pglGetImageTransformParameterivHP=_Lazy_glGetImageTransformParameterivHP; +PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC pglGetImageTransformParameterfvHP=_Lazy_glGetImageTransformParameterfvHP; +#endif + +/* GL_HP_convolution_border_modes */ + +#ifdef __GLEE_GL_HP_convolution_border_modes +#endif + +/* GL_INGR_palette_buffer */ + +#ifdef __GLEE_GL_INGR_palette_buffer +#endif + +/* GL_SGIX_texture_add_env */ + +#ifdef __GLEE_GL_SGIX_texture_add_env +#endif + +/* GL_EXT_color_subtable */ + +#ifdef __GLEE_GL_EXT_color_subtable +void __stdcall _Lazy_glColorSubTableEXT(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data) {if (GLeeInit()) glColorSubTableEXT(target, start, count, format, type, data);} +void __stdcall _Lazy_glCopyColorSubTableEXT(GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) {if (GLeeInit()) glCopyColorSubTableEXT(target, start, x, y, width);} +PFNGLCOLORSUBTABLEEXTPROC pglColorSubTableEXT=_Lazy_glColorSubTableEXT; +PFNGLCOPYCOLORSUBTABLEEXTPROC pglCopyColorSubTableEXT=_Lazy_glCopyColorSubTableEXT; +#endif + +/* GL_PGI_vertex_hints */ + +#ifdef __GLEE_GL_PGI_vertex_hints +#endif + +/* GL_PGI_misc_hints */ + +#ifdef __GLEE_GL_PGI_misc_hints +void __stdcall _Lazy_glHintPGI(GLenum target, GLint mode) {if (GLeeInit()) glHintPGI(target, mode);} +PFNGLHINTPGIPROC pglHintPGI=_Lazy_glHintPGI; +#endif + +/* GL_EXT_paletted_texture */ + +#ifdef __GLEE_GL_EXT_paletted_texture +void __stdcall _Lazy_glColorTableEXT(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid * table) {if (GLeeInit()) glColorTableEXT(target, internalFormat, width, format, type, table);} +void __stdcall _Lazy_glGetColorTableEXT(GLenum target, GLenum format, GLenum type, GLvoid * data) {if (GLeeInit()) glGetColorTableEXT(target, format, type, data);} +void __stdcall _Lazy_glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetColorTableParameterivEXT(target, pname, params);} +void __stdcall _Lazy_glGetColorTableParameterfvEXT(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetColorTableParameterfvEXT(target, pname, params);} +PFNGLCOLORTABLEEXTPROC pglColorTableEXT=_Lazy_glColorTableEXT; +PFNGLGETCOLORTABLEEXTPROC pglGetColorTableEXT=_Lazy_glGetColorTableEXT; +PFNGLGETCOLORTABLEPARAMETERIVEXTPROC pglGetColorTableParameterivEXT=_Lazy_glGetColorTableParameterivEXT; +PFNGLGETCOLORTABLEPARAMETERFVEXTPROC pglGetColorTableParameterfvEXT=_Lazy_glGetColorTableParameterfvEXT; +#endif + +/* GL_EXT_clip_volume_hint */ + +#ifdef __GLEE_GL_EXT_clip_volume_hint +#endif + +/* GL_SGIX_list_priority */ + +#ifdef __GLEE_GL_SGIX_list_priority +void __stdcall _Lazy_glGetListParameterfvSGIX(GLuint list, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetListParameterfvSGIX(list, pname, params);} +void __stdcall _Lazy_glGetListParameterivSGIX(GLuint list, GLenum pname, GLint * params) {if (GLeeInit()) glGetListParameterivSGIX(list, pname, params);} +void __stdcall _Lazy_glListParameterfSGIX(GLuint list, GLenum pname, GLfloat param) {if (GLeeInit()) glListParameterfSGIX(list, pname, param);} +void __stdcall _Lazy_glListParameterfvSGIX(GLuint list, GLenum pname, const GLfloat * params) {if (GLeeInit()) glListParameterfvSGIX(list, pname, params);} +void __stdcall _Lazy_glListParameteriSGIX(GLuint list, GLenum pname, GLint param) {if (GLeeInit()) glListParameteriSGIX(list, pname, param);} +void __stdcall _Lazy_glListParameterivSGIX(GLuint list, GLenum pname, const GLint * params) {if (GLeeInit()) glListParameterivSGIX(list, pname, params);} +PFNGLGETLISTPARAMETERFVSGIXPROC pglGetListParameterfvSGIX=_Lazy_glGetListParameterfvSGIX; +PFNGLGETLISTPARAMETERIVSGIXPROC pglGetListParameterivSGIX=_Lazy_glGetListParameterivSGIX; +PFNGLLISTPARAMETERFSGIXPROC pglListParameterfSGIX=_Lazy_glListParameterfSGIX; +PFNGLLISTPARAMETERFVSGIXPROC pglListParameterfvSGIX=_Lazy_glListParameterfvSGIX; +PFNGLLISTPARAMETERISGIXPROC pglListParameteriSGIX=_Lazy_glListParameteriSGIX; +PFNGLLISTPARAMETERIVSGIXPROC pglListParameterivSGIX=_Lazy_glListParameterivSGIX; +#endif + +/* GL_SGIX_ir_instrument1 */ + +#ifdef __GLEE_GL_SGIX_ir_instrument1 +#endif + +/* GL_SGIX_calligraphic_fragment */ + +#ifdef __GLEE_GL_SGIX_calligraphic_fragment +#endif + +/* GL_SGIX_texture_lod_bias */ + +#ifdef __GLEE_GL_SGIX_texture_lod_bias +#endif + +/* GL_SGIX_shadow_ambient */ + +#ifdef __GLEE_GL_SGIX_shadow_ambient +#endif + +/* GL_EXT_index_texture */ + +#ifdef __GLEE_GL_EXT_index_texture +#endif + +/* GL_EXT_index_material */ + +#ifdef __GLEE_GL_EXT_index_material +void __stdcall _Lazy_glIndexMaterialEXT(GLenum face, GLenum mode) {if (GLeeInit()) glIndexMaterialEXT(face, mode);} +PFNGLINDEXMATERIALEXTPROC pglIndexMaterialEXT=_Lazy_glIndexMaterialEXT; +#endif + +/* GL_EXT_index_func */ + +#ifdef __GLEE_GL_EXT_index_func +void __stdcall _Lazy_glIndexFuncEXT(GLenum func, GLclampf ref) {if (GLeeInit()) glIndexFuncEXT(func, ref);} +PFNGLINDEXFUNCEXTPROC pglIndexFuncEXT=_Lazy_glIndexFuncEXT; +#endif + +/* GL_EXT_index_array_formats */ + +#ifdef __GLEE_GL_EXT_index_array_formats +#endif + +/* GL_EXT_compiled_vertex_array */ + +#ifdef __GLEE_GL_EXT_compiled_vertex_array +void __stdcall _Lazy_glLockArraysEXT(GLint first, GLsizei count) {if (GLeeInit()) glLockArraysEXT(first, count);} +void __stdcall _Lazy_glUnlockArraysEXT(void) {if (GLeeInit()) glUnlockArraysEXT();} +PFNGLLOCKARRAYSEXTPROC pglLockArraysEXT=_Lazy_glLockArraysEXT; +PFNGLUNLOCKARRAYSEXTPROC pglUnlockArraysEXT=_Lazy_glUnlockArraysEXT; +#endif + +/* GL_EXT_cull_vertex */ + +#ifdef __GLEE_GL_EXT_cull_vertex +void __stdcall _Lazy_glCullParameterdvEXT(GLenum pname, GLdouble * params) {if (GLeeInit()) glCullParameterdvEXT(pname, params);} +void __stdcall _Lazy_glCullParameterfvEXT(GLenum pname, GLfloat * params) {if (GLeeInit()) glCullParameterfvEXT(pname, params);} +PFNGLCULLPARAMETERDVEXTPROC pglCullParameterdvEXT=_Lazy_glCullParameterdvEXT; +PFNGLCULLPARAMETERFVEXTPROC pglCullParameterfvEXT=_Lazy_glCullParameterfvEXT; +#endif + +/* GL_SGIX_ycrcb */ + +#ifdef __GLEE_GL_SGIX_ycrcb +#endif + +/* GL_SGIX_fragment_lighting */ + +#ifdef __GLEE_GL_SGIX_fragment_lighting +void __stdcall _Lazy_glFragmentColorMaterialSGIX(GLenum face, GLenum mode) {if (GLeeInit()) glFragmentColorMaterialSGIX(face, mode);} +void __stdcall _Lazy_glFragmentLightfSGIX(GLenum light, GLenum pname, GLfloat param) {if (GLeeInit()) glFragmentLightfSGIX(light, pname, param);} +void __stdcall _Lazy_glFragmentLightfvSGIX(GLenum light, GLenum pname, const GLfloat * params) {if (GLeeInit()) glFragmentLightfvSGIX(light, pname, params);} +void __stdcall _Lazy_glFragmentLightiSGIX(GLenum light, GLenum pname, GLint param) {if (GLeeInit()) glFragmentLightiSGIX(light, pname, param);} +void __stdcall _Lazy_glFragmentLightivSGIX(GLenum light, GLenum pname, const GLint * params) {if (GLeeInit()) glFragmentLightivSGIX(light, pname, params);} +void __stdcall _Lazy_glFragmentLightModelfSGIX(GLenum pname, GLfloat param) {if (GLeeInit()) glFragmentLightModelfSGIX(pname, param);} +void __stdcall _Lazy_glFragmentLightModelfvSGIX(GLenum pname, const GLfloat * params) {if (GLeeInit()) glFragmentLightModelfvSGIX(pname, params);} +void __stdcall _Lazy_glFragmentLightModeliSGIX(GLenum pname, GLint param) {if (GLeeInit()) glFragmentLightModeliSGIX(pname, param);} +void __stdcall _Lazy_glFragmentLightModelivSGIX(GLenum pname, const GLint * params) {if (GLeeInit()) glFragmentLightModelivSGIX(pname, params);} +void __stdcall _Lazy_glFragmentMaterialfSGIX(GLenum face, GLenum pname, GLfloat param) {if (GLeeInit()) glFragmentMaterialfSGIX(face, pname, param);} +void __stdcall _Lazy_glFragmentMaterialfvSGIX(GLenum face, GLenum pname, const GLfloat * params) {if (GLeeInit()) glFragmentMaterialfvSGIX(face, pname, params);} +void __stdcall _Lazy_glFragmentMaterialiSGIX(GLenum face, GLenum pname, GLint param) {if (GLeeInit()) glFragmentMaterialiSGIX(face, pname, param);} +void __stdcall _Lazy_glFragmentMaterialivSGIX(GLenum face, GLenum pname, const GLint * params) {if (GLeeInit()) glFragmentMaterialivSGIX(face, pname, params);} +void __stdcall _Lazy_glGetFragmentLightfvSGIX(GLenum light, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetFragmentLightfvSGIX(light, pname, params);} +void __stdcall _Lazy_glGetFragmentLightivSGIX(GLenum light, GLenum pname, GLint * params) {if (GLeeInit()) glGetFragmentLightivSGIX(light, pname, params);} +void __stdcall _Lazy_glGetFragmentMaterialfvSGIX(GLenum face, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetFragmentMaterialfvSGIX(face, pname, params);} +void __stdcall _Lazy_glGetFragmentMaterialivSGIX(GLenum face, GLenum pname, GLint * params) {if (GLeeInit()) glGetFragmentMaterialivSGIX(face, pname, params);} +void __stdcall _Lazy_glLightEnviSGIX(GLenum pname, GLint param) {if (GLeeInit()) glLightEnviSGIX(pname, param);} +PFNGLFRAGMENTCOLORMATERIALSGIXPROC pglFragmentColorMaterialSGIX=_Lazy_glFragmentColorMaterialSGIX; +PFNGLFRAGMENTLIGHTFSGIXPROC pglFragmentLightfSGIX=_Lazy_glFragmentLightfSGIX; +PFNGLFRAGMENTLIGHTFVSGIXPROC pglFragmentLightfvSGIX=_Lazy_glFragmentLightfvSGIX; +PFNGLFRAGMENTLIGHTISGIXPROC pglFragmentLightiSGIX=_Lazy_glFragmentLightiSGIX; +PFNGLFRAGMENTLIGHTIVSGIXPROC pglFragmentLightivSGIX=_Lazy_glFragmentLightivSGIX; +PFNGLFRAGMENTLIGHTMODELFSGIXPROC pglFragmentLightModelfSGIX=_Lazy_glFragmentLightModelfSGIX; +PFNGLFRAGMENTLIGHTMODELFVSGIXPROC pglFragmentLightModelfvSGIX=_Lazy_glFragmentLightModelfvSGIX; +PFNGLFRAGMENTLIGHTMODELISGIXPROC pglFragmentLightModeliSGIX=_Lazy_glFragmentLightModeliSGIX; +PFNGLFRAGMENTLIGHTMODELIVSGIXPROC pglFragmentLightModelivSGIX=_Lazy_glFragmentLightModelivSGIX; +PFNGLFRAGMENTMATERIALFSGIXPROC pglFragmentMaterialfSGIX=_Lazy_glFragmentMaterialfSGIX; +PFNGLFRAGMENTMATERIALFVSGIXPROC pglFragmentMaterialfvSGIX=_Lazy_glFragmentMaterialfvSGIX; +PFNGLFRAGMENTMATERIALISGIXPROC pglFragmentMaterialiSGIX=_Lazy_glFragmentMaterialiSGIX; +PFNGLFRAGMENTMATERIALIVSGIXPROC pglFragmentMaterialivSGIX=_Lazy_glFragmentMaterialivSGIX; +PFNGLGETFRAGMENTLIGHTFVSGIXPROC pglGetFragmentLightfvSGIX=_Lazy_glGetFragmentLightfvSGIX; +PFNGLGETFRAGMENTLIGHTIVSGIXPROC pglGetFragmentLightivSGIX=_Lazy_glGetFragmentLightivSGIX; +PFNGLGETFRAGMENTMATERIALFVSGIXPROC pglGetFragmentMaterialfvSGIX=_Lazy_glGetFragmentMaterialfvSGIX; +PFNGLGETFRAGMENTMATERIALIVSGIXPROC pglGetFragmentMaterialivSGIX=_Lazy_glGetFragmentMaterialivSGIX; +PFNGLLIGHTENVISGIXPROC pglLightEnviSGIX=_Lazy_glLightEnviSGIX; +#endif + +/* GL_IBM_rasterpos_clip */ + +#ifdef __GLEE_GL_IBM_rasterpos_clip +#endif + +/* GL_HP_texture_lighting */ + +#ifdef __GLEE_GL_HP_texture_lighting +#endif + +/* GL_EXT_draw_range_elements */ + +#ifdef __GLEE_GL_EXT_draw_range_elements +void __stdcall _Lazy_glDrawRangeElementsEXT(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices) {if (GLeeInit()) glDrawRangeElementsEXT(mode, start, end, count, type, indices);} +PFNGLDRAWRANGEELEMENTSEXTPROC pglDrawRangeElementsEXT=_Lazy_glDrawRangeElementsEXT; +#endif + +/* GL_WIN_phong_shading */ + +#ifdef __GLEE_GL_WIN_phong_shading +#endif + +/* GL_WIN_specular_fog */ + +#ifdef __GLEE_GL_WIN_specular_fog +#endif + +/* GL_EXT_light_texture */ + +#ifdef __GLEE_GL_EXT_light_texture +void __stdcall _Lazy_glApplyTextureEXT(GLenum mode) {if (GLeeInit()) glApplyTextureEXT(mode);} +void __stdcall _Lazy_glTextureLightEXT(GLenum pname) {if (GLeeInit()) glTextureLightEXT(pname);} +void __stdcall _Lazy_glTextureMaterialEXT(GLenum face, GLenum mode) {if (GLeeInit()) glTextureMaterialEXT(face, mode);} +PFNGLAPPLYTEXTUREEXTPROC pglApplyTextureEXT=_Lazy_glApplyTextureEXT; +PFNGLTEXTURELIGHTEXTPROC pglTextureLightEXT=_Lazy_glTextureLightEXT; +PFNGLTEXTUREMATERIALEXTPROC pglTextureMaterialEXT=_Lazy_glTextureMaterialEXT; +#endif + +/* GL_SGIX_blend_alpha_minmax */ + +#ifdef __GLEE_GL_SGIX_blend_alpha_minmax +#endif + +/* GL_SGIX_impact_pixel_texture */ + +#ifdef __GLEE_GL_SGIX_impact_pixel_texture +#endif + +/* GL_EXT_bgra */ + +#ifdef __GLEE_GL_EXT_bgra +#endif + +/* GL_SGIX_async */ + +#ifdef __GLEE_GL_SGIX_async +void __stdcall _Lazy_glAsyncMarkerSGIX(GLuint marker) {if (GLeeInit()) glAsyncMarkerSGIX(marker);} +GLint __stdcall _Lazy_glFinishAsyncSGIX(GLuint * markerp) {if (GLeeInit()) return glFinishAsyncSGIX(markerp); return (GLint)0;} +GLint __stdcall _Lazy_glPollAsyncSGIX(GLuint * markerp) {if (GLeeInit()) return glPollAsyncSGIX(markerp); return (GLint)0;} +GLuint __stdcall _Lazy_glGenAsyncMarkersSGIX(GLsizei range) {if (GLeeInit()) return glGenAsyncMarkersSGIX(range); return (GLuint)0;} +void __stdcall _Lazy_glDeleteAsyncMarkersSGIX(GLuint marker, GLsizei range) {if (GLeeInit()) glDeleteAsyncMarkersSGIX(marker, range);} +GLboolean __stdcall _Lazy_glIsAsyncMarkerSGIX(GLuint marker) {if (GLeeInit()) return glIsAsyncMarkerSGIX(marker); return (GLboolean)0;} +PFNGLASYNCMARKERSGIXPROC pglAsyncMarkerSGIX=_Lazy_glAsyncMarkerSGIX; +PFNGLFINISHASYNCSGIXPROC pglFinishAsyncSGIX=_Lazy_glFinishAsyncSGIX; +PFNGLPOLLASYNCSGIXPROC pglPollAsyncSGIX=_Lazy_glPollAsyncSGIX; +PFNGLGENASYNCMARKERSSGIXPROC pglGenAsyncMarkersSGIX=_Lazy_glGenAsyncMarkersSGIX; +PFNGLDELETEASYNCMARKERSSGIXPROC pglDeleteAsyncMarkersSGIX=_Lazy_glDeleteAsyncMarkersSGIX; +PFNGLISASYNCMARKERSGIXPROC pglIsAsyncMarkerSGIX=_Lazy_glIsAsyncMarkerSGIX; +#endif + +/* GL_SGIX_async_pixel */ + +#ifdef __GLEE_GL_SGIX_async_pixel +#endif + +/* GL_SGIX_async_histogram */ + +#ifdef __GLEE_GL_SGIX_async_histogram +#endif + +/* GL_INTEL_texture_scissor */ + +#ifdef __GLEE_GL_INTEL_texture_scissor +#endif + +/* GL_INTEL_parallel_arrays */ + +#ifdef __GLEE_GL_INTEL_parallel_arrays +void __stdcall _Lazy_glVertexPointervINTEL(GLint size, GLenum type, const GLvoid* * pointer) {if (GLeeInit()) glVertexPointervINTEL(size, type, pointer);} +void __stdcall _Lazy_glNormalPointervINTEL(GLenum type, const GLvoid* * pointer) {if (GLeeInit()) glNormalPointervINTEL(type, pointer);} +void __stdcall _Lazy_glColorPointervINTEL(GLint size, GLenum type, const GLvoid* * pointer) {if (GLeeInit()) glColorPointervINTEL(size, type, pointer);} +void __stdcall _Lazy_glTexCoordPointervINTEL(GLint size, GLenum type, const GLvoid* * pointer) {if (GLeeInit()) glTexCoordPointervINTEL(size, type, pointer);} +PFNGLVERTEXPOINTERVINTELPROC pglVertexPointervINTEL=_Lazy_glVertexPointervINTEL; +PFNGLNORMALPOINTERVINTELPROC pglNormalPointervINTEL=_Lazy_glNormalPointervINTEL; +PFNGLCOLORPOINTERVINTELPROC pglColorPointervINTEL=_Lazy_glColorPointervINTEL; +PFNGLTEXCOORDPOINTERVINTELPROC pglTexCoordPointervINTEL=_Lazy_glTexCoordPointervINTEL; +#endif + +/* GL_HP_occlusion_test */ + +#ifdef __GLEE_GL_HP_occlusion_test +#endif + +/* GL_EXT_pixel_transform */ + +#ifdef __GLEE_GL_EXT_pixel_transform +void __stdcall _Lazy_glPixelTransformParameteriEXT(GLenum target, GLenum pname, GLint param) {if (GLeeInit()) glPixelTransformParameteriEXT(target, pname, param);} +void __stdcall _Lazy_glPixelTransformParameterfEXT(GLenum target, GLenum pname, GLfloat param) {if (GLeeInit()) glPixelTransformParameterfEXT(target, pname, param);} +void __stdcall _Lazy_glPixelTransformParameterivEXT(GLenum target, GLenum pname, const GLint * params) {if (GLeeInit()) glPixelTransformParameterivEXT(target, pname, params);} +void __stdcall _Lazy_glPixelTransformParameterfvEXT(GLenum target, GLenum pname, const GLfloat * params) {if (GLeeInit()) glPixelTransformParameterfvEXT(target, pname, params);} +PFNGLPIXELTRANSFORMPARAMETERIEXTPROC pglPixelTransformParameteriEXT=_Lazy_glPixelTransformParameteriEXT; +PFNGLPIXELTRANSFORMPARAMETERFEXTPROC pglPixelTransformParameterfEXT=_Lazy_glPixelTransformParameterfEXT; +PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC pglPixelTransformParameterivEXT=_Lazy_glPixelTransformParameterivEXT; +PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC pglPixelTransformParameterfvEXT=_Lazy_glPixelTransformParameterfvEXT; +#endif + +/* GL_EXT_pixel_transform_color_table */ + +#ifdef __GLEE_GL_EXT_pixel_transform_color_table +#endif + +/* GL_EXT_shared_texture_palette */ + +#ifdef __GLEE_GL_EXT_shared_texture_palette +#endif + +/* GL_EXT_separate_specular_color */ + +#ifdef __GLEE_GL_EXT_separate_specular_color +#endif + +/* GL_EXT_secondary_color */ + +#ifdef __GLEE_GL_EXT_secondary_color +void __stdcall _Lazy_glSecondaryColor3bEXT(GLbyte red, GLbyte green, GLbyte blue) {if (GLeeInit()) glSecondaryColor3bEXT(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3bvEXT(const GLbyte * v) {if (GLeeInit()) glSecondaryColor3bvEXT(v);} +void __stdcall _Lazy_glSecondaryColor3dEXT(GLdouble red, GLdouble green, GLdouble blue) {if (GLeeInit()) glSecondaryColor3dEXT(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3dvEXT(const GLdouble * v) {if (GLeeInit()) glSecondaryColor3dvEXT(v);} +void __stdcall _Lazy_glSecondaryColor3fEXT(GLfloat red, GLfloat green, GLfloat blue) {if (GLeeInit()) glSecondaryColor3fEXT(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3fvEXT(const GLfloat * v) {if (GLeeInit()) glSecondaryColor3fvEXT(v);} +void __stdcall _Lazy_glSecondaryColor3iEXT(GLint red, GLint green, GLint blue) {if (GLeeInit()) glSecondaryColor3iEXT(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3ivEXT(const GLint * v) {if (GLeeInit()) glSecondaryColor3ivEXT(v);} +void __stdcall _Lazy_glSecondaryColor3sEXT(GLshort red, GLshort green, GLshort blue) {if (GLeeInit()) glSecondaryColor3sEXT(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3svEXT(const GLshort * v) {if (GLeeInit()) glSecondaryColor3svEXT(v);} +void __stdcall _Lazy_glSecondaryColor3ubEXT(GLubyte red, GLubyte green, GLubyte blue) {if (GLeeInit()) glSecondaryColor3ubEXT(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3ubvEXT(const GLubyte * v) {if (GLeeInit()) glSecondaryColor3ubvEXT(v);} +void __stdcall _Lazy_glSecondaryColor3uiEXT(GLuint red, GLuint green, GLuint blue) {if (GLeeInit()) glSecondaryColor3uiEXT(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3uivEXT(const GLuint * v) {if (GLeeInit()) glSecondaryColor3uivEXT(v);} +void __stdcall _Lazy_glSecondaryColor3usEXT(GLushort red, GLushort green, GLushort blue) {if (GLeeInit()) glSecondaryColor3usEXT(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3usvEXT(const GLushort * v) {if (GLeeInit()) glSecondaryColor3usvEXT(v);} +void __stdcall _Lazy_glSecondaryColorPointerEXT(GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glSecondaryColorPointerEXT(size, type, stride, pointer);} +PFNGLSECONDARYCOLOR3BEXTPROC pglSecondaryColor3bEXT=_Lazy_glSecondaryColor3bEXT; +PFNGLSECONDARYCOLOR3BVEXTPROC pglSecondaryColor3bvEXT=_Lazy_glSecondaryColor3bvEXT; +PFNGLSECONDARYCOLOR3DEXTPROC pglSecondaryColor3dEXT=_Lazy_glSecondaryColor3dEXT; +PFNGLSECONDARYCOLOR3DVEXTPROC pglSecondaryColor3dvEXT=_Lazy_glSecondaryColor3dvEXT; +PFNGLSECONDARYCOLOR3FEXTPROC pglSecondaryColor3fEXT=_Lazy_glSecondaryColor3fEXT; +PFNGLSECONDARYCOLOR3FVEXTPROC pglSecondaryColor3fvEXT=_Lazy_glSecondaryColor3fvEXT; +PFNGLSECONDARYCOLOR3IEXTPROC pglSecondaryColor3iEXT=_Lazy_glSecondaryColor3iEXT; +PFNGLSECONDARYCOLOR3IVEXTPROC pglSecondaryColor3ivEXT=_Lazy_glSecondaryColor3ivEXT; +PFNGLSECONDARYCOLOR3SEXTPROC pglSecondaryColor3sEXT=_Lazy_glSecondaryColor3sEXT; +PFNGLSECONDARYCOLOR3SVEXTPROC pglSecondaryColor3svEXT=_Lazy_glSecondaryColor3svEXT; +PFNGLSECONDARYCOLOR3UBEXTPROC pglSecondaryColor3ubEXT=_Lazy_glSecondaryColor3ubEXT; +PFNGLSECONDARYCOLOR3UBVEXTPROC pglSecondaryColor3ubvEXT=_Lazy_glSecondaryColor3ubvEXT; +PFNGLSECONDARYCOLOR3UIEXTPROC pglSecondaryColor3uiEXT=_Lazy_glSecondaryColor3uiEXT; +PFNGLSECONDARYCOLOR3UIVEXTPROC pglSecondaryColor3uivEXT=_Lazy_glSecondaryColor3uivEXT; +PFNGLSECONDARYCOLOR3USEXTPROC pglSecondaryColor3usEXT=_Lazy_glSecondaryColor3usEXT; +PFNGLSECONDARYCOLOR3USVEXTPROC pglSecondaryColor3usvEXT=_Lazy_glSecondaryColor3usvEXT; +PFNGLSECONDARYCOLORPOINTEREXTPROC pglSecondaryColorPointerEXT=_Lazy_glSecondaryColorPointerEXT; +#endif + +/* GL_EXT_texture_perturb_normal */ + +#ifdef __GLEE_GL_EXT_texture_perturb_normal +void __stdcall _Lazy_glTextureNormalEXT(GLenum mode) {if (GLeeInit()) glTextureNormalEXT(mode);} +PFNGLTEXTURENORMALEXTPROC pglTextureNormalEXT=_Lazy_glTextureNormalEXT; +#endif + +/* GL_EXT_multi_draw_arrays */ + +#ifdef __GLEE_GL_EXT_multi_draw_arrays +void __stdcall _Lazy_glMultiDrawArraysEXT(GLenum mode, GLint * first, GLsizei * count, GLsizei primcount) {if (GLeeInit()) glMultiDrawArraysEXT(mode, first, count, primcount);} +void __stdcall _Lazy_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const GLvoid* * indices, GLsizei primcount) {if (GLeeInit()) glMultiDrawElementsEXT(mode, count, type, indices, primcount);} +PFNGLMULTIDRAWARRAYSEXTPROC pglMultiDrawArraysEXT=_Lazy_glMultiDrawArraysEXT; +PFNGLMULTIDRAWELEMENTSEXTPROC pglMultiDrawElementsEXT=_Lazy_glMultiDrawElementsEXT; +#endif + +/* GL_EXT_fog_coord */ + +#ifdef __GLEE_GL_EXT_fog_coord +void __stdcall _Lazy_glFogCoordfEXT(GLfloat coord) {if (GLeeInit()) glFogCoordfEXT(coord);} +void __stdcall _Lazy_glFogCoordfvEXT(const GLfloat * coord) {if (GLeeInit()) glFogCoordfvEXT(coord);} +void __stdcall _Lazy_glFogCoorddEXT(GLdouble coord) {if (GLeeInit()) glFogCoorddEXT(coord);} +void __stdcall _Lazy_glFogCoorddvEXT(const GLdouble * coord) {if (GLeeInit()) glFogCoorddvEXT(coord);} +void __stdcall _Lazy_glFogCoordPointerEXT(GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glFogCoordPointerEXT(type, stride, pointer);} +PFNGLFOGCOORDFEXTPROC pglFogCoordfEXT=_Lazy_glFogCoordfEXT; +PFNGLFOGCOORDFVEXTPROC pglFogCoordfvEXT=_Lazy_glFogCoordfvEXT; +PFNGLFOGCOORDDEXTPROC pglFogCoorddEXT=_Lazy_glFogCoorddEXT; +PFNGLFOGCOORDDVEXTPROC pglFogCoorddvEXT=_Lazy_glFogCoorddvEXT; +PFNGLFOGCOORDPOINTEREXTPROC pglFogCoordPointerEXT=_Lazy_glFogCoordPointerEXT; +#endif + +/* GL_REND_screen_coordinates */ + +#ifdef __GLEE_GL_REND_screen_coordinates +#endif + +/* GL_EXT_coordinate_frame */ + +#ifdef __GLEE_GL_EXT_coordinate_frame +void __stdcall _Lazy_glTangent3bEXT(GLbyte tx, GLbyte ty, GLbyte tz) {if (GLeeInit()) glTangent3bEXT(tx, ty, tz);} +void __stdcall _Lazy_glTangent3bvEXT(const GLbyte * v) {if (GLeeInit()) glTangent3bvEXT(v);} +void __stdcall _Lazy_glTangent3dEXT(GLdouble tx, GLdouble ty, GLdouble tz) {if (GLeeInit()) glTangent3dEXT(tx, ty, tz);} +void __stdcall _Lazy_glTangent3dvEXT(const GLdouble * v) {if (GLeeInit()) glTangent3dvEXT(v);} +void __stdcall _Lazy_glTangent3fEXT(GLfloat tx, GLfloat ty, GLfloat tz) {if (GLeeInit()) glTangent3fEXT(tx, ty, tz);} +void __stdcall _Lazy_glTangent3fvEXT(const GLfloat * v) {if (GLeeInit()) glTangent3fvEXT(v);} +void __stdcall _Lazy_glTangent3iEXT(GLint tx, GLint ty, GLint tz) {if (GLeeInit()) glTangent3iEXT(tx, ty, tz);} +void __stdcall _Lazy_glTangent3ivEXT(const GLint * v) {if (GLeeInit()) glTangent3ivEXT(v);} +void __stdcall _Lazy_glTangent3sEXT(GLshort tx, GLshort ty, GLshort tz) {if (GLeeInit()) glTangent3sEXT(tx, ty, tz);} +void __stdcall _Lazy_glTangent3svEXT(const GLshort * v) {if (GLeeInit()) glTangent3svEXT(v);} +void __stdcall _Lazy_glBinormal3bEXT(GLbyte bx, GLbyte by, GLbyte bz) {if (GLeeInit()) glBinormal3bEXT(bx, by, bz);} +void __stdcall _Lazy_glBinormal3bvEXT(const GLbyte * v) {if (GLeeInit()) glBinormal3bvEXT(v);} +void __stdcall _Lazy_glBinormal3dEXT(GLdouble bx, GLdouble by, GLdouble bz) {if (GLeeInit()) glBinormal3dEXT(bx, by, bz);} +void __stdcall _Lazy_glBinormal3dvEXT(const GLdouble * v) {if (GLeeInit()) glBinormal3dvEXT(v);} +void __stdcall _Lazy_glBinormal3fEXT(GLfloat bx, GLfloat by, GLfloat bz) {if (GLeeInit()) glBinormal3fEXT(bx, by, bz);} +void __stdcall _Lazy_glBinormal3fvEXT(const GLfloat * v) {if (GLeeInit()) glBinormal3fvEXT(v);} +void __stdcall _Lazy_glBinormal3iEXT(GLint bx, GLint by, GLint bz) {if (GLeeInit()) glBinormal3iEXT(bx, by, bz);} +void __stdcall _Lazy_glBinormal3ivEXT(const GLint * v) {if (GLeeInit()) glBinormal3ivEXT(v);} +void __stdcall _Lazy_glBinormal3sEXT(GLshort bx, GLshort by, GLshort bz) {if (GLeeInit()) glBinormal3sEXT(bx, by, bz);} +void __stdcall _Lazy_glBinormal3svEXT(const GLshort * v) {if (GLeeInit()) glBinormal3svEXT(v);} +void __stdcall _Lazy_glTangentPointerEXT(GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glTangentPointerEXT(type, stride, pointer);} +void __stdcall _Lazy_glBinormalPointerEXT(GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glBinormalPointerEXT(type, stride, pointer);} +PFNGLTANGENT3BEXTPROC pglTangent3bEXT=_Lazy_glTangent3bEXT; +PFNGLTANGENT3BVEXTPROC pglTangent3bvEXT=_Lazy_glTangent3bvEXT; +PFNGLTANGENT3DEXTPROC pglTangent3dEXT=_Lazy_glTangent3dEXT; +PFNGLTANGENT3DVEXTPROC pglTangent3dvEXT=_Lazy_glTangent3dvEXT; +PFNGLTANGENT3FEXTPROC pglTangent3fEXT=_Lazy_glTangent3fEXT; +PFNGLTANGENT3FVEXTPROC pglTangent3fvEXT=_Lazy_glTangent3fvEXT; +PFNGLTANGENT3IEXTPROC pglTangent3iEXT=_Lazy_glTangent3iEXT; +PFNGLTANGENT3IVEXTPROC pglTangent3ivEXT=_Lazy_glTangent3ivEXT; +PFNGLTANGENT3SEXTPROC pglTangent3sEXT=_Lazy_glTangent3sEXT; +PFNGLTANGENT3SVEXTPROC pglTangent3svEXT=_Lazy_glTangent3svEXT; +PFNGLBINORMAL3BEXTPROC pglBinormal3bEXT=_Lazy_glBinormal3bEXT; +PFNGLBINORMAL3BVEXTPROC pglBinormal3bvEXT=_Lazy_glBinormal3bvEXT; +PFNGLBINORMAL3DEXTPROC pglBinormal3dEXT=_Lazy_glBinormal3dEXT; +PFNGLBINORMAL3DVEXTPROC pglBinormal3dvEXT=_Lazy_glBinormal3dvEXT; +PFNGLBINORMAL3FEXTPROC pglBinormal3fEXT=_Lazy_glBinormal3fEXT; +PFNGLBINORMAL3FVEXTPROC pglBinormal3fvEXT=_Lazy_glBinormal3fvEXT; +PFNGLBINORMAL3IEXTPROC pglBinormal3iEXT=_Lazy_glBinormal3iEXT; +PFNGLBINORMAL3IVEXTPROC pglBinormal3ivEXT=_Lazy_glBinormal3ivEXT; +PFNGLBINORMAL3SEXTPROC pglBinormal3sEXT=_Lazy_glBinormal3sEXT; +PFNGLBINORMAL3SVEXTPROC pglBinormal3svEXT=_Lazy_glBinormal3svEXT; +PFNGLTANGENTPOINTEREXTPROC pglTangentPointerEXT=_Lazy_glTangentPointerEXT; +PFNGLBINORMALPOINTEREXTPROC pglBinormalPointerEXT=_Lazy_glBinormalPointerEXT; +#endif + +/* GL_EXT_texture_env_combine */ + +#ifdef __GLEE_GL_EXT_texture_env_combine +#endif + +/* GL_APPLE_specular_vector */ + +#ifdef __GLEE_GL_APPLE_specular_vector +#endif + +/* GL_APPLE_transform_hint */ + +#ifdef __GLEE_GL_APPLE_transform_hint +#endif + +/* GL_SGIX_fog_scale */ + +#ifdef __GLEE_GL_SGIX_fog_scale +#endif + +/* GL_SUNX_constant_data */ + +#ifdef __GLEE_GL_SUNX_constant_data +void __stdcall _Lazy_glFinishTextureSUNX(void) {if (GLeeInit()) glFinishTextureSUNX();} +PFNGLFINISHTEXTURESUNXPROC pglFinishTextureSUNX=_Lazy_glFinishTextureSUNX; +#endif + +/* GL_SUN_global_alpha */ + +#ifdef __GLEE_GL_SUN_global_alpha +void __stdcall _Lazy_glGlobalAlphaFactorbSUN(GLbyte factor) {if (GLeeInit()) glGlobalAlphaFactorbSUN(factor);} +void __stdcall _Lazy_glGlobalAlphaFactorsSUN(GLshort factor) {if (GLeeInit()) glGlobalAlphaFactorsSUN(factor);} +void __stdcall _Lazy_glGlobalAlphaFactoriSUN(GLint factor) {if (GLeeInit()) glGlobalAlphaFactoriSUN(factor);} +void __stdcall _Lazy_glGlobalAlphaFactorfSUN(GLfloat factor) {if (GLeeInit()) glGlobalAlphaFactorfSUN(factor);} +void __stdcall _Lazy_glGlobalAlphaFactordSUN(GLdouble factor) {if (GLeeInit()) glGlobalAlphaFactordSUN(factor);} +void __stdcall _Lazy_glGlobalAlphaFactorubSUN(GLubyte factor) {if (GLeeInit()) glGlobalAlphaFactorubSUN(factor);} +void __stdcall _Lazy_glGlobalAlphaFactorusSUN(GLushort factor) {if (GLeeInit()) glGlobalAlphaFactorusSUN(factor);} +void __stdcall _Lazy_glGlobalAlphaFactoruiSUN(GLuint factor) {if (GLeeInit()) glGlobalAlphaFactoruiSUN(factor);} +PFNGLGLOBALALPHAFACTORBSUNPROC pglGlobalAlphaFactorbSUN=_Lazy_glGlobalAlphaFactorbSUN; +PFNGLGLOBALALPHAFACTORSSUNPROC pglGlobalAlphaFactorsSUN=_Lazy_glGlobalAlphaFactorsSUN; +PFNGLGLOBALALPHAFACTORISUNPROC pglGlobalAlphaFactoriSUN=_Lazy_glGlobalAlphaFactoriSUN; +PFNGLGLOBALALPHAFACTORFSUNPROC pglGlobalAlphaFactorfSUN=_Lazy_glGlobalAlphaFactorfSUN; +PFNGLGLOBALALPHAFACTORDSUNPROC pglGlobalAlphaFactordSUN=_Lazy_glGlobalAlphaFactordSUN; +PFNGLGLOBALALPHAFACTORUBSUNPROC pglGlobalAlphaFactorubSUN=_Lazy_glGlobalAlphaFactorubSUN; +PFNGLGLOBALALPHAFACTORUSSUNPROC pglGlobalAlphaFactorusSUN=_Lazy_glGlobalAlphaFactorusSUN; +PFNGLGLOBALALPHAFACTORUISUNPROC pglGlobalAlphaFactoruiSUN=_Lazy_glGlobalAlphaFactoruiSUN; +#endif + +/* GL_SUN_triangle_list */ + +#ifdef __GLEE_GL_SUN_triangle_list +void __stdcall _Lazy_glReplacementCodeuiSUN(GLuint code) {if (GLeeInit()) glReplacementCodeuiSUN(code);} +void __stdcall _Lazy_glReplacementCodeusSUN(GLushort code) {if (GLeeInit()) glReplacementCodeusSUN(code);} +void __stdcall _Lazy_glReplacementCodeubSUN(GLubyte code) {if (GLeeInit()) glReplacementCodeubSUN(code);} +void __stdcall _Lazy_glReplacementCodeuivSUN(const GLuint * code) {if (GLeeInit()) glReplacementCodeuivSUN(code);} +void __stdcall _Lazy_glReplacementCodeusvSUN(const GLushort * code) {if (GLeeInit()) glReplacementCodeusvSUN(code);} +void __stdcall _Lazy_glReplacementCodeubvSUN(const GLubyte * code) {if (GLeeInit()) glReplacementCodeubvSUN(code);} +void __stdcall _Lazy_glReplacementCodePointerSUN(GLenum type, GLsizei stride, const GLvoid* * pointer) {if (GLeeInit()) glReplacementCodePointerSUN(type, stride, pointer);} +PFNGLREPLACEMENTCODEUISUNPROC pglReplacementCodeuiSUN=_Lazy_glReplacementCodeuiSUN; +PFNGLREPLACEMENTCODEUSSUNPROC pglReplacementCodeusSUN=_Lazy_glReplacementCodeusSUN; +PFNGLREPLACEMENTCODEUBSUNPROC pglReplacementCodeubSUN=_Lazy_glReplacementCodeubSUN; +PFNGLREPLACEMENTCODEUIVSUNPROC pglReplacementCodeuivSUN=_Lazy_glReplacementCodeuivSUN; +PFNGLREPLACEMENTCODEUSVSUNPROC pglReplacementCodeusvSUN=_Lazy_glReplacementCodeusvSUN; +PFNGLREPLACEMENTCODEUBVSUNPROC pglReplacementCodeubvSUN=_Lazy_glReplacementCodeubvSUN; +PFNGLREPLACEMENTCODEPOINTERSUNPROC pglReplacementCodePointerSUN=_Lazy_glReplacementCodePointerSUN; +#endif + +/* GL_SUN_vertex */ + +#ifdef __GLEE_GL_SUN_vertex +void __stdcall _Lazy_glColor4ubVertex2fSUN(GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y) {if (GLeeInit()) glColor4ubVertex2fSUN(r, g, b, a, x, y);} +void __stdcall _Lazy_glColor4ubVertex2fvSUN(const GLubyte * c, const GLfloat * v) {if (GLeeInit()) glColor4ubVertex2fvSUN(c, v);} +void __stdcall _Lazy_glColor4ubVertex3fSUN(GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glColor4ubVertex3fSUN(r, g, b, a, x, y, z);} +void __stdcall _Lazy_glColor4ubVertex3fvSUN(const GLubyte * c, const GLfloat * v) {if (GLeeInit()) glColor4ubVertex3fvSUN(c, v);} +void __stdcall _Lazy_glColor3fVertex3fSUN(GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glColor3fVertex3fSUN(r, g, b, x, y, z);} +void __stdcall _Lazy_glColor3fVertex3fvSUN(const GLfloat * c, const GLfloat * v) {if (GLeeInit()) glColor3fVertex3fvSUN(c, v);} +void __stdcall _Lazy_glNormal3fVertex3fSUN(GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glNormal3fVertex3fSUN(nx, ny, nz, x, y, z);} +void __stdcall _Lazy_glNormal3fVertex3fvSUN(const GLfloat * n, const GLfloat * v) {if (GLeeInit()) glNormal3fVertex3fvSUN(n, v);} +void __stdcall _Lazy_glColor4fNormal3fVertex3fSUN(GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glColor4fNormal3fVertex3fSUN(r, g, b, a, nx, ny, nz, x, y, z);} +void __stdcall _Lazy_glColor4fNormal3fVertex3fvSUN(const GLfloat * c, const GLfloat * n, const GLfloat * v) {if (GLeeInit()) glColor4fNormal3fVertex3fvSUN(c, n, v);} +void __stdcall _Lazy_glTexCoord2fVertex3fSUN(GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glTexCoord2fVertex3fSUN(s, t, x, y, z);} +void __stdcall _Lazy_glTexCoord2fVertex3fvSUN(const GLfloat * tc, const GLfloat * v) {if (GLeeInit()) glTexCoord2fVertex3fvSUN(tc, v);} +void __stdcall _Lazy_glTexCoord4fVertex4fSUN(GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glTexCoord4fVertex4fSUN(s, t, p, q, x, y, z, w);} +void __stdcall _Lazy_glTexCoord4fVertex4fvSUN(const GLfloat * tc, const GLfloat * v) {if (GLeeInit()) glTexCoord4fVertex4fvSUN(tc, v);} +void __stdcall _Lazy_glTexCoord2fColor4ubVertex3fSUN(GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glTexCoord2fColor4ubVertex3fSUN(s, t, r, g, b, a, x, y, z);} +void __stdcall _Lazy_glTexCoord2fColor4ubVertex3fvSUN(const GLfloat * tc, const GLubyte * c, const GLfloat * v) {if (GLeeInit()) glTexCoord2fColor4ubVertex3fvSUN(tc, c, v);} +void __stdcall _Lazy_glTexCoord2fColor3fVertex3fSUN(GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glTexCoord2fColor3fVertex3fSUN(s, t, r, g, b, x, y, z);} +void __stdcall _Lazy_glTexCoord2fColor3fVertex3fvSUN(const GLfloat * tc, const GLfloat * c, const GLfloat * v) {if (GLeeInit()) glTexCoord2fColor3fVertex3fvSUN(tc, c, v);} +void __stdcall _Lazy_glTexCoord2fNormal3fVertex3fSUN(GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glTexCoord2fNormal3fVertex3fSUN(s, t, nx, ny, nz, x, y, z);} +void __stdcall _Lazy_glTexCoord2fNormal3fVertex3fvSUN(const GLfloat * tc, const GLfloat * n, const GLfloat * v) {if (GLeeInit()) glTexCoord2fNormal3fVertex3fvSUN(tc, n, v);} +void __stdcall _Lazy_glTexCoord2fColor4fNormal3fVertex3fSUN(GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glTexCoord2fColor4fNormal3fVertex3fSUN(s, t, r, g, b, a, nx, ny, nz, x, y, z);} +void __stdcall _Lazy_glTexCoord2fColor4fNormal3fVertex3fvSUN(const GLfloat * tc, const GLfloat * c, const GLfloat * n, const GLfloat * v) {if (GLeeInit()) glTexCoord2fColor4fNormal3fVertex3fvSUN(tc, c, n, v);} +void __stdcall _Lazy_glTexCoord4fColor4fNormal3fVertex4fSUN(GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glTexCoord4fColor4fNormal3fVertex4fSUN(s, t, p, q, r, g, b, a, nx, ny, nz, x, y, z, w);} +void __stdcall _Lazy_glTexCoord4fColor4fNormal3fVertex4fvSUN(const GLfloat * tc, const GLfloat * c, const GLfloat * n, const GLfloat * v) {if (GLeeInit()) glTexCoord4fColor4fNormal3fVertex4fvSUN(tc, c, n, v);} +void __stdcall _Lazy_glReplacementCodeuiVertex3fSUN(GLuint rc, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glReplacementCodeuiVertex3fSUN(rc, x, y, z);} +void __stdcall _Lazy_glReplacementCodeuiVertex3fvSUN(const GLuint * rc, const GLfloat * v) {if (GLeeInit()) glReplacementCodeuiVertex3fvSUN(rc, v);} +void __stdcall _Lazy_glReplacementCodeuiColor4ubVertex3fSUN(GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glReplacementCodeuiColor4ubVertex3fSUN(rc, r, g, b, a, x, y, z);} +void __stdcall _Lazy_glReplacementCodeuiColor4ubVertex3fvSUN(const GLuint * rc, const GLubyte * c, const GLfloat * v) {if (GLeeInit()) glReplacementCodeuiColor4ubVertex3fvSUN(rc, c, v);} +void __stdcall _Lazy_glReplacementCodeuiColor3fVertex3fSUN(GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glReplacementCodeuiColor3fVertex3fSUN(rc, r, g, b, x, y, z);} +void __stdcall _Lazy_glReplacementCodeuiColor3fVertex3fvSUN(const GLuint * rc, const GLfloat * c, const GLfloat * v) {if (GLeeInit()) glReplacementCodeuiColor3fVertex3fvSUN(rc, c, v);} +void __stdcall _Lazy_glReplacementCodeuiNormal3fVertex3fSUN(GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glReplacementCodeuiNormal3fVertex3fSUN(rc, nx, ny, nz, x, y, z);} +void __stdcall _Lazy_glReplacementCodeuiNormal3fVertex3fvSUN(const GLuint * rc, const GLfloat * n, const GLfloat * v) {if (GLeeInit()) glReplacementCodeuiNormal3fVertex3fvSUN(rc, n, v);} +void __stdcall _Lazy_glReplacementCodeuiColor4fNormal3fVertex3fSUN(GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glReplacementCodeuiColor4fNormal3fVertex3fSUN(rc, r, g, b, a, nx, ny, nz, x, y, z);} +void __stdcall _Lazy_glReplacementCodeuiColor4fNormal3fVertex3fvSUN(const GLuint * rc, const GLfloat * c, const GLfloat * n, const GLfloat * v) {if (GLeeInit()) glReplacementCodeuiColor4fNormal3fVertex3fvSUN(rc, c, n, v);} +void __stdcall _Lazy_glReplacementCodeuiTexCoord2fVertex3fSUN(GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glReplacementCodeuiTexCoord2fVertex3fSUN(rc, s, t, x, y, z);} +void __stdcall _Lazy_glReplacementCodeuiTexCoord2fVertex3fvSUN(const GLuint * rc, const GLfloat * tc, const GLfloat * v) {if (GLeeInit()) glReplacementCodeuiTexCoord2fVertex3fvSUN(rc, tc, v);} +void __stdcall _Lazy_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN(GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN(rc, s, t, nx, ny, nz, x, y, z);} +void __stdcall _Lazy_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN(const GLuint * rc, const GLfloat * tc, const GLfloat * n, const GLfloat * v) {if (GLeeInit()) glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN(rc, tc, n, v);} +void __stdcall _Lazy_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN(GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN(rc, s, t, r, g, b, a, nx, ny, nz, x, y, z);} +void __stdcall _Lazy_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN(const GLuint * rc, const GLfloat * tc, const GLfloat * c, const GLfloat * n, const GLfloat * v) {if (GLeeInit()) glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN(rc, tc, c, n, v);} +PFNGLCOLOR4UBVERTEX2FSUNPROC pglColor4ubVertex2fSUN=_Lazy_glColor4ubVertex2fSUN; +PFNGLCOLOR4UBVERTEX2FVSUNPROC pglColor4ubVertex2fvSUN=_Lazy_glColor4ubVertex2fvSUN; +PFNGLCOLOR4UBVERTEX3FSUNPROC pglColor4ubVertex3fSUN=_Lazy_glColor4ubVertex3fSUN; +PFNGLCOLOR4UBVERTEX3FVSUNPROC pglColor4ubVertex3fvSUN=_Lazy_glColor4ubVertex3fvSUN; +PFNGLCOLOR3FVERTEX3FSUNPROC pglColor3fVertex3fSUN=_Lazy_glColor3fVertex3fSUN; +PFNGLCOLOR3FVERTEX3FVSUNPROC pglColor3fVertex3fvSUN=_Lazy_glColor3fVertex3fvSUN; +PFNGLNORMAL3FVERTEX3FSUNPROC pglNormal3fVertex3fSUN=_Lazy_glNormal3fVertex3fSUN; +PFNGLNORMAL3FVERTEX3FVSUNPROC pglNormal3fVertex3fvSUN=_Lazy_glNormal3fVertex3fvSUN; +PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC pglColor4fNormal3fVertex3fSUN=_Lazy_glColor4fNormal3fVertex3fSUN; +PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC pglColor4fNormal3fVertex3fvSUN=_Lazy_glColor4fNormal3fVertex3fvSUN; +PFNGLTEXCOORD2FVERTEX3FSUNPROC pglTexCoord2fVertex3fSUN=_Lazy_glTexCoord2fVertex3fSUN; +PFNGLTEXCOORD2FVERTEX3FVSUNPROC pglTexCoord2fVertex3fvSUN=_Lazy_glTexCoord2fVertex3fvSUN; +PFNGLTEXCOORD4FVERTEX4FSUNPROC pglTexCoord4fVertex4fSUN=_Lazy_glTexCoord4fVertex4fSUN; +PFNGLTEXCOORD4FVERTEX4FVSUNPROC pglTexCoord4fVertex4fvSUN=_Lazy_glTexCoord4fVertex4fvSUN; +PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC pglTexCoord2fColor4ubVertex3fSUN=_Lazy_glTexCoord2fColor4ubVertex3fSUN; +PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC pglTexCoord2fColor4ubVertex3fvSUN=_Lazy_glTexCoord2fColor4ubVertex3fvSUN; +PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC pglTexCoord2fColor3fVertex3fSUN=_Lazy_glTexCoord2fColor3fVertex3fSUN; +PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC pglTexCoord2fColor3fVertex3fvSUN=_Lazy_glTexCoord2fColor3fVertex3fvSUN; +PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC pglTexCoord2fNormal3fVertex3fSUN=_Lazy_glTexCoord2fNormal3fVertex3fSUN; +PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC pglTexCoord2fNormal3fVertex3fvSUN=_Lazy_glTexCoord2fNormal3fVertex3fvSUN; +PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC pglTexCoord2fColor4fNormal3fVertex3fSUN=_Lazy_glTexCoord2fColor4fNormal3fVertex3fSUN; +PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC pglTexCoord2fColor4fNormal3fVertex3fvSUN=_Lazy_glTexCoord2fColor4fNormal3fVertex3fvSUN; +PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC pglTexCoord4fColor4fNormal3fVertex4fSUN=_Lazy_glTexCoord4fColor4fNormal3fVertex4fSUN; +PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC pglTexCoord4fColor4fNormal3fVertex4fvSUN=_Lazy_glTexCoord4fColor4fNormal3fVertex4fvSUN; +PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC pglReplacementCodeuiVertex3fSUN=_Lazy_glReplacementCodeuiVertex3fSUN; +PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC pglReplacementCodeuiVertex3fvSUN=_Lazy_glReplacementCodeuiVertex3fvSUN; +PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC pglReplacementCodeuiColor4ubVertex3fSUN=_Lazy_glReplacementCodeuiColor4ubVertex3fSUN; +PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC pglReplacementCodeuiColor4ubVertex3fvSUN=_Lazy_glReplacementCodeuiColor4ubVertex3fvSUN; +PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC pglReplacementCodeuiColor3fVertex3fSUN=_Lazy_glReplacementCodeuiColor3fVertex3fSUN; +PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC pglReplacementCodeuiColor3fVertex3fvSUN=_Lazy_glReplacementCodeuiColor3fVertex3fvSUN; +PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC pglReplacementCodeuiNormal3fVertex3fSUN=_Lazy_glReplacementCodeuiNormal3fVertex3fSUN; +PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC pglReplacementCodeuiNormal3fVertex3fvSUN=_Lazy_glReplacementCodeuiNormal3fVertex3fvSUN; +PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC pglReplacementCodeuiColor4fNormal3fVertex3fSUN=_Lazy_glReplacementCodeuiColor4fNormal3fVertex3fSUN; +PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC pglReplacementCodeuiColor4fNormal3fVertex3fvSUN=_Lazy_glReplacementCodeuiColor4fNormal3fVertex3fvSUN; +PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC pglReplacementCodeuiTexCoord2fVertex3fSUN=_Lazy_glReplacementCodeuiTexCoord2fVertex3fSUN; +PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC pglReplacementCodeuiTexCoord2fVertex3fvSUN=_Lazy_glReplacementCodeuiTexCoord2fVertex3fvSUN; +PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC pglReplacementCodeuiTexCoord2fNormal3fVertex3fSUN=_Lazy_glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN; +PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC pglReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN=_Lazy_glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN; +PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC pglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN=_Lazy_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN; +PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC pglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN=_Lazy_glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN; +#endif + +/* GL_EXT_blend_func_separate */ + +#ifdef __GLEE_GL_EXT_blend_func_separate +void __stdcall _Lazy_glBlendFuncSeparateEXT(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) {if (GLeeInit()) glBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);} +PFNGLBLENDFUNCSEPARATEEXTPROC pglBlendFuncSeparateEXT=_Lazy_glBlendFuncSeparateEXT; +#endif + +/* GL_INGR_color_clamp */ + +#ifdef __GLEE_GL_INGR_color_clamp +#endif + +/* GL_INGR_interlace_read */ + +#ifdef __GLEE_GL_INGR_interlace_read +#endif + +/* GL_EXT_stencil_wrap */ + +#ifdef __GLEE_GL_EXT_stencil_wrap +#endif + +/* GL_EXT_422_pixels */ + +#ifdef __GLEE_GL_EXT_422_pixels +#endif + +/* GL_NV_texgen_reflection */ + +#ifdef __GLEE_GL_NV_texgen_reflection +#endif + +/* GL_EXT_texture_cube_map */ + +#ifdef __GLEE_GL_EXT_texture_cube_map +#endif + +/* GL_SUN_convolution_border_modes */ + +#ifdef __GLEE_GL_SUN_convolution_border_modes +#endif + +/* GL_EXT_texture_env_add */ + +#ifdef __GLEE_GL_EXT_texture_env_add +#endif + +/* GL_EXT_texture_lod_bias */ + +#ifdef __GLEE_GL_EXT_texture_lod_bias +#endif + +/* GL_EXT_texture_filter_anisotropic */ + +#ifdef __GLEE_GL_EXT_texture_filter_anisotropic +#endif + +/* GL_EXT_vertex_weighting */ + +#ifdef __GLEE_GL_EXT_vertex_weighting +void __stdcall _Lazy_glVertexWeightfEXT(GLfloat weight) {if (GLeeInit()) glVertexWeightfEXT(weight);} +void __stdcall _Lazy_glVertexWeightfvEXT(const GLfloat * weight) {if (GLeeInit()) glVertexWeightfvEXT(weight);} +void __stdcall _Lazy_glVertexWeightPointerEXT(GLsizei size, GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glVertexWeightPointerEXT(size, type, stride, pointer);} +PFNGLVERTEXWEIGHTFEXTPROC pglVertexWeightfEXT=_Lazy_glVertexWeightfEXT; +PFNGLVERTEXWEIGHTFVEXTPROC pglVertexWeightfvEXT=_Lazy_glVertexWeightfvEXT; +PFNGLVERTEXWEIGHTPOINTEREXTPROC pglVertexWeightPointerEXT=_Lazy_glVertexWeightPointerEXT; +#endif + +/* GL_NV_light_max_exponent */ + +#ifdef __GLEE_GL_NV_light_max_exponent +#endif + +/* GL_NV_vertex_array_range */ + +#ifdef __GLEE_GL_NV_vertex_array_range +void __stdcall _Lazy_glFlushVertexArrayRangeNV(void) {if (GLeeInit()) glFlushVertexArrayRangeNV();} +void __stdcall _Lazy_glVertexArrayRangeNV(GLsizei length, const GLvoid * pointer) {if (GLeeInit()) glVertexArrayRangeNV(length, pointer);} +PFNGLFLUSHVERTEXARRAYRANGENVPROC pglFlushVertexArrayRangeNV=_Lazy_glFlushVertexArrayRangeNV; +PFNGLVERTEXARRAYRANGENVPROC pglVertexArrayRangeNV=_Lazy_glVertexArrayRangeNV; +#endif + +/* GL_NV_register_combiners */ + +#ifdef __GLEE_GL_NV_register_combiners +void __stdcall _Lazy_glCombinerParameterfvNV(GLenum pname, const GLfloat * params) {if (GLeeInit()) glCombinerParameterfvNV(pname, params);} +void __stdcall _Lazy_glCombinerParameterfNV(GLenum pname, GLfloat param) {if (GLeeInit()) glCombinerParameterfNV(pname, param);} +void __stdcall _Lazy_glCombinerParameterivNV(GLenum pname, const GLint * params) {if (GLeeInit()) glCombinerParameterivNV(pname, params);} +void __stdcall _Lazy_glCombinerParameteriNV(GLenum pname, GLint param) {if (GLeeInit()) glCombinerParameteriNV(pname, param);} +void __stdcall _Lazy_glCombinerInputNV(GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) {if (GLeeInit()) glCombinerInputNV(stage, portion, variable, input, mapping, componentUsage);} +void __stdcall _Lazy_glCombinerOutputNV(GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum) {if (GLeeInit()) glCombinerOutputNV(stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum);} +void __stdcall _Lazy_glFinalCombinerInputNV(GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) {if (GLeeInit()) glFinalCombinerInputNV(variable, input, mapping, componentUsage);} +void __stdcall _Lazy_glGetCombinerInputParameterfvNV(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetCombinerInputParameterfvNV(stage, portion, variable, pname, params);} +void __stdcall _Lazy_glGetCombinerInputParameterivNV(GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params) {if (GLeeInit()) glGetCombinerInputParameterivNV(stage, portion, variable, pname, params);} +void __stdcall _Lazy_glGetCombinerOutputParameterfvNV(GLenum stage, GLenum portion, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetCombinerOutputParameterfvNV(stage, portion, pname, params);} +void __stdcall _Lazy_glGetCombinerOutputParameterivNV(GLenum stage, GLenum portion, GLenum pname, GLint * params) {if (GLeeInit()) glGetCombinerOutputParameterivNV(stage, portion, pname, params);} +void __stdcall _Lazy_glGetFinalCombinerInputParameterfvNV(GLenum variable, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetFinalCombinerInputParameterfvNV(variable, pname, params);} +void __stdcall _Lazy_glGetFinalCombinerInputParameterivNV(GLenum variable, GLenum pname, GLint * params) {if (GLeeInit()) glGetFinalCombinerInputParameterivNV(variable, pname, params);} +PFNGLCOMBINERPARAMETERFVNVPROC pglCombinerParameterfvNV=_Lazy_glCombinerParameterfvNV; +PFNGLCOMBINERPARAMETERFNVPROC pglCombinerParameterfNV=_Lazy_glCombinerParameterfNV; +PFNGLCOMBINERPARAMETERIVNVPROC pglCombinerParameterivNV=_Lazy_glCombinerParameterivNV; +PFNGLCOMBINERPARAMETERINVPROC pglCombinerParameteriNV=_Lazy_glCombinerParameteriNV; +PFNGLCOMBINERINPUTNVPROC pglCombinerInputNV=_Lazy_glCombinerInputNV; +PFNGLCOMBINEROUTPUTNVPROC pglCombinerOutputNV=_Lazy_glCombinerOutputNV; +PFNGLFINALCOMBINERINPUTNVPROC pglFinalCombinerInputNV=_Lazy_glFinalCombinerInputNV; +PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC pglGetCombinerInputParameterfvNV=_Lazy_glGetCombinerInputParameterfvNV; +PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC pglGetCombinerInputParameterivNV=_Lazy_glGetCombinerInputParameterivNV; +PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC pglGetCombinerOutputParameterfvNV=_Lazy_glGetCombinerOutputParameterfvNV; +PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC pglGetCombinerOutputParameterivNV=_Lazy_glGetCombinerOutputParameterivNV; +PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC pglGetFinalCombinerInputParameterfvNV=_Lazy_glGetFinalCombinerInputParameterfvNV; +PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC pglGetFinalCombinerInputParameterivNV=_Lazy_glGetFinalCombinerInputParameterivNV; +#endif + +/* GL_NV_fog_distance */ + +#ifdef __GLEE_GL_NV_fog_distance +#endif + +/* GL_NV_texgen_emboss */ + +#ifdef __GLEE_GL_NV_texgen_emboss +#endif + +/* GL_NV_blend_square */ + +#ifdef __GLEE_GL_NV_blend_square +#endif + +/* GL_NV_texture_env_combine4 */ + +#ifdef __GLEE_GL_NV_texture_env_combine4 +#endif + +/* GL_MESA_resize_buffers */ + +#ifdef __GLEE_GL_MESA_resize_buffers +void __stdcall _Lazy_glResizeBuffersMESA(void) {if (GLeeInit()) glResizeBuffersMESA();} +PFNGLRESIZEBUFFERSMESAPROC pglResizeBuffersMESA=_Lazy_glResizeBuffersMESA; +#endif + +/* GL_MESA_window_pos */ + +#ifdef __GLEE_GL_MESA_window_pos +void __stdcall _Lazy_glWindowPos2dMESA(GLdouble x, GLdouble y) {if (GLeeInit()) glWindowPos2dMESA(x, y);} +void __stdcall _Lazy_glWindowPos2dvMESA(const GLdouble * v) {if (GLeeInit()) glWindowPos2dvMESA(v);} +void __stdcall _Lazy_glWindowPos2fMESA(GLfloat x, GLfloat y) {if (GLeeInit()) glWindowPos2fMESA(x, y);} +void __stdcall _Lazy_glWindowPos2fvMESA(const GLfloat * v) {if (GLeeInit()) glWindowPos2fvMESA(v);} +void __stdcall _Lazy_glWindowPos2iMESA(GLint x, GLint y) {if (GLeeInit()) glWindowPos2iMESA(x, y);} +void __stdcall _Lazy_glWindowPos2ivMESA(const GLint * v) {if (GLeeInit()) glWindowPos2ivMESA(v);} +void __stdcall _Lazy_glWindowPos2sMESA(GLshort x, GLshort y) {if (GLeeInit()) glWindowPos2sMESA(x, y);} +void __stdcall _Lazy_glWindowPos2svMESA(const GLshort * v) {if (GLeeInit()) glWindowPos2svMESA(v);} +void __stdcall _Lazy_glWindowPos3dMESA(GLdouble x, GLdouble y, GLdouble z) {if (GLeeInit()) glWindowPos3dMESA(x, y, z);} +void __stdcall _Lazy_glWindowPos3dvMESA(const GLdouble * v) {if (GLeeInit()) glWindowPos3dvMESA(v);} +void __stdcall _Lazy_glWindowPos3fMESA(GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glWindowPos3fMESA(x, y, z);} +void __stdcall _Lazy_glWindowPos3fvMESA(const GLfloat * v) {if (GLeeInit()) glWindowPos3fvMESA(v);} +void __stdcall _Lazy_glWindowPos3iMESA(GLint x, GLint y, GLint z) {if (GLeeInit()) glWindowPos3iMESA(x, y, z);} +void __stdcall _Lazy_glWindowPos3ivMESA(const GLint * v) {if (GLeeInit()) glWindowPos3ivMESA(v);} +void __stdcall _Lazy_glWindowPos3sMESA(GLshort x, GLshort y, GLshort z) {if (GLeeInit()) glWindowPos3sMESA(x, y, z);} +void __stdcall _Lazy_glWindowPos3svMESA(const GLshort * v) {if (GLeeInit()) glWindowPos3svMESA(v);} +void __stdcall _Lazy_glWindowPos4dMESA(GLdouble x, GLdouble y, GLdouble z, GLdouble w) {if (GLeeInit()) glWindowPos4dMESA(x, y, z, w);} +void __stdcall _Lazy_glWindowPos4dvMESA(const GLdouble * v) {if (GLeeInit()) glWindowPos4dvMESA(v);} +void __stdcall _Lazy_glWindowPos4fMESA(GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glWindowPos4fMESA(x, y, z, w);} +void __stdcall _Lazy_glWindowPos4fvMESA(const GLfloat * v) {if (GLeeInit()) glWindowPos4fvMESA(v);} +void __stdcall _Lazy_glWindowPos4iMESA(GLint x, GLint y, GLint z, GLint w) {if (GLeeInit()) glWindowPos4iMESA(x, y, z, w);} +void __stdcall _Lazy_glWindowPos4ivMESA(const GLint * v) {if (GLeeInit()) glWindowPos4ivMESA(v);} +void __stdcall _Lazy_glWindowPos4sMESA(GLshort x, GLshort y, GLshort z, GLshort w) {if (GLeeInit()) glWindowPos4sMESA(x, y, z, w);} +void __stdcall _Lazy_glWindowPos4svMESA(const GLshort * v) {if (GLeeInit()) glWindowPos4svMESA(v);} +PFNGLWINDOWPOS2DMESAPROC pglWindowPos2dMESA=_Lazy_glWindowPos2dMESA; +PFNGLWINDOWPOS2DVMESAPROC pglWindowPos2dvMESA=_Lazy_glWindowPos2dvMESA; +PFNGLWINDOWPOS2FMESAPROC pglWindowPos2fMESA=_Lazy_glWindowPos2fMESA; +PFNGLWINDOWPOS2FVMESAPROC pglWindowPos2fvMESA=_Lazy_glWindowPos2fvMESA; +PFNGLWINDOWPOS2IMESAPROC pglWindowPos2iMESA=_Lazy_glWindowPos2iMESA; +PFNGLWINDOWPOS2IVMESAPROC pglWindowPos2ivMESA=_Lazy_glWindowPos2ivMESA; +PFNGLWINDOWPOS2SMESAPROC pglWindowPos2sMESA=_Lazy_glWindowPos2sMESA; +PFNGLWINDOWPOS2SVMESAPROC pglWindowPos2svMESA=_Lazy_glWindowPos2svMESA; +PFNGLWINDOWPOS3DMESAPROC pglWindowPos3dMESA=_Lazy_glWindowPos3dMESA; +PFNGLWINDOWPOS3DVMESAPROC pglWindowPos3dvMESA=_Lazy_glWindowPos3dvMESA; +PFNGLWINDOWPOS3FMESAPROC pglWindowPos3fMESA=_Lazy_glWindowPos3fMESA; +PFNGLWINDOWPOS3FVMESAPROC pglWindowPos3fvMESA=_Lazy_glWindowPos3fvMESA; +PFNGLWINDOWPOS3IMESAPROC pglWindowPos3iMESA=_Lazy_glWindowPos3iMESA; +PFNGLWINDOWPOS3IVMESAPROC pglWindowPos3ivMESA=_Lazy_glWindowPos3ivMESA; +PFNGLWINDOWPOS3SMESAPROC pglWindowPos3sMESA=_Lazy_glWindowPos3sMESA; +PFNGLWINDOWPOS3SVMESAPROC pglWindowPos3svMESA=_Lazy_glWindowPos3svMESA; +PFNGLWINDOWPOS4DMESAPROC pglWindowPos4dMESA=_Lazy_glWindowPos4dMESA; +PFNGLWINDOWPOS4DVMESAPROC pglWindowPos4dvMESA=_Lazy_glWindowPos4dvMESA; +PFNGLWINDOWPOS4FMESAPROC pglWindowPos4fMESA=_Lazy_glWindowPos4fMESA; +PFNGLWINDOWPOS4FVMESAPROC pglWindowPos4fvMESA=_Lazy_glWindowPos4fvMESA; +PFNGLWINDOWPOS4IMESAPROC pglWindowPos4iMESA=_Lazy_glWindowPos4iMESA; +PFNGLWINDOWPOS4IVMESAPROC pglWindowPos4ivMESA=_Lazy_glWindowPos4ivMESA; +PFNGLWINDOWPOS4SMESAPROC pglWindowPos4sMESA=_Lazy_glWindowPos4sMESA; +PFNGLWINDOWPOS4SVMESAPROC pglWindowPos4svMESA=_Lazy_glWindowPos4svMESA; +#endif + +/* GL_EXT_texture_compression_s3tc */ + +#ifdef __GLEE_GL_EXT_texture_compression_s3tc +#endif + +/* GL_IBM_cull_vertex */ + +#ifdef __GLEE_GL_IBM_cull_vertex +#endif + +/* GL_IBM_multimode_draw_arrays */ + +#ifdef __GLEE_GL_IBM_multimode_draw_arrays +void __stdcall _Lazy_glMultiModeDrawArraysIBM(const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride) {if (GLeeInit()) glMultiModeDrawArraysIBM(mode, first, count, primcount, modestride);} +void __stdcall _Lazy_glMultiModeDrawElementsIBM(const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid* const * indices, GLsizei primcount, GLint modestride) {if (GLeeInit()) glMultiModeDrawElementsIBM(mode, count, type, indices, primcount, modestride);} +PFNGLMULTIMODEDRAWARRAYSIBMPROC pglMultiModeDrawArraysIBM=_Lazy_glMultiModeDrawArraysIBM; +PFNGLMULTIMODEDRAWELEMENTSIBMPROC pglMultiModeDrawElementsIBM=_Lazy_glMultiModeDrawElementsIBM; +#endif + +/* GL_IBM_vertex_array_lists */ + +#ifdef __GLEE_GL_IBM_vertex_array_lists +void __stdcall _Lazy_glColorPointerListIBM(GLint size, GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride) {if (GLeeInit()) glColorPointerListIBM(size, type, stride, pointer, ptrstride);} +void __stdcall _Lazy_glSecondaryColorPointerListIBM(GLint size, GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride) {if (GLeeInit()) glSecondaryColorPointerListIBM(size, type, stride, pointer, ptrstride);} +void __stdcall _Lazy_glEdgeFlagPointerListIBM(GLint stride, const GLboolean* * pointer, GLint ptrstride) {if (GLeeInit()) glEdgeFlagPointerListIBM(stride, pointer, ptrstride);} +void __stdcall _Lazy_glFogCoordPointerListIBM(GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride) {if (GLeeInit()) glFogCoordPointerListIBM(type, stride, pointer, ptrstride);} +void __stdcall _Lazy_glIndexPointerListIBM(GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride) {if (GLeeInit()) glIndexPointerListIBM(type, stride, pointer, ptrstride);} +void __stdcall _Lazy_glNormalPointerListIBM(GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride) {if (GLeeInit()) glNormalPointerListIBM(type, stride, pointer, ptrstride);} +void __stdcall _Lazy_glTexCoordPointerListIBM(GLint size, GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride) {if (GLeeInit()) glTexCoordPointerListIBM(size, type, stride, pointer, ptrstride);} +void __stdcall _Lazy_glVertexPointerListIBM(GLint size, GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride) {if (GLeeInit()) glVertexPointerListIBM(size, type, stride, pointer, ptrstride);} +PFNGLCOLORPOINTERLISTIBMPROC pglColorPointerListIBM=_Lazy_glColorPointerListIBM; +PFNGLSECONDARYCOLORPOINTERLISTIBMPROC pglSecondaryColorPointerListIBM=_Lazy_glSecondaryColorPointerListIBM; +PFNGLEDGEFLAGPOINTERLISTIBMPROC pglEdgeFlagPointerListIBM=_Lazy_glEdgeFlagPointerListIBM; +PFNGLFOGCOORDPOINTERLISTIBMPROC pglFogCoordPointerListIBM=_Lazy_glFogCoordPointerListIBM; +PFNGLINDEXPOINTERLISTIBMPROC pglIndexPointerListIBM=_Lazy_glIndexPointerListIBM; +PFNGLNORMALPOINTERLISTIBMPROC pglNormalPointerListIBM=_Lazy_glNormalPointerListIBM; +PFNGLTEXCOORDPOINTERLISTIBMPROC pglTexCoordPointerListIBM=_Lazy_glTexCoordPointerListIBM; +PFNGLVERTEXPOINTERLISTIBMPROC pglVertexPointerListIBM=_Lazy_glVertexPointerListIBM; +#endif + +/* GL_SGIX_subsample */ + +#ifdef __GLEE_GL_SGIX_subsample +#endif + +/* GL_SGIX_ycrcb_subsample */ + +#ifdef __GLEE_GL_SGIX_ycrcb_subsample +#endif + +/* GL_SGIX_ycrcba */ + +#ifdef __GLEE_GL_SGIX_ycrcba +#endif + +/* GL_SGI_depth_pass_instrument */ + +#ifdef __GLEE_GL_SGI_depth_pass_instrument +#endif + +/* GL_3DFX_texture_compression_FXT1 */ + +#ifdef __GLEE_GL_3DFX_texture_compression_FXT1 +#endif + +/* GL_3DFX_multisample */ + +#ifdef __GLEE_GL_3DFX_multisample +#endif + +/* GL_3DFX_tbuffer */ + +#ifdef __GLEE_GL_3DFX_tbuffer +void __stdcall _Lazy_glTbufferMask3DFX(GLuint mask) {if (GLeeInit()) glTbufferMask3DFX(mask);} +PFNGLTBUFFERMASK3DFXPROC pglTbufferMask3DFX=_Lazy_glTbufferMask3DFX; +#endif + +/* GL_EXT_multisample */ + +#ifdef __GLEE_GL_EXT_multisample +void __stdcall _Lazy_glSampleMaskEXT(GLclampf value, GLboolean invert) {if (GLeeInit()) glSampleMaskEXT(value, invert);} +void __stdcall _Lazy_glSamplePatternEXT(GLenum pattern) {if (GLeeInit()) glSamplePatternEXT(pattern);} +PFNGLSAMPLEMASKEXTPROC pglSampleMaskEXT=_Lazy_glSampleMaskEXT; +PFNGLSAMPLEPATTERNEXTPROC pglSamplePatternEXT=_Lazy_glSamplePatternEXT; +#endif + +/* GL_SGIX_vertex_preclip */ + +#ifdef __GLEE_GL_SGIX_vertex_preclip +#endif + +/* GL_SGIX_convolution_accuracy */ + +#ifdef __GLEE_GL_SGIX_convolution_accuracy +#endif + +/* GL_SGIX_resample */ + +#ifdef __GLEE_GL_SGIX_resample +#endif + +/* GL_SGIS_point_line_texgen */ + +#ifdef __GLEE_GL_SGIS_point_line_texgen +#endif + +/* GL_SGIS_texture_color_mask */ + +#ifdef __GLEE_GL_SGIS_texture_color_mask +void __stdcall _Lazy_glTextureColorMaskSGIS(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {if (GLeeInit()) glTextureColorMaskSGIS(red, green, blue, alpha);} +PFNGLTEXTURECOLORMASKSGISPROC pglTextureColorMaskSGIS=_Lazy_glTextureColorMaskSGIS; +#endif + +/* GL_EXT_texture_env_dot3 */ + +#ifdef __GLEE_GL_EXT_texture_env_dot3 +#endif + +/* GL_ATI_texture_mirror_once */ + +#ifdef __GLEE_GL_ATI_texture_mirror_once +#endif + +/* GL_NV_fence */ + +#ifdef __GLEE_GL_NV_fence +void __stdcall _Lazy_glDeleteFencesNV(GLsizei n, const GLuint * fences) {if (GLeeInit()) glDeleteFencesNV(n, fences);} +void __stdcall _Lazy_glGenFencesNV(GLsizei n, GLuint * fences) {if (GLeeInit()) glGenFencesNV(n, fences);} +GLboolean __stdcall _Lazy_glIsFenceNV(GLuint fence) {if (GLeeInit()) return glIsFenceNV(fence); return (GLboolean)0;} +GLboolean __stdcall _Lazy_glTestFenceNV(GLuint fence) {if (GLeeInit()) return glTestFenceNV(fence); return (GLboolean)0;} +void __stdcall _Lazy_glGetFenceivNV(GLuint fence, GLenum pname, GLint * params) {if (GLeeInit()) glGetFenceivNV(fence, pname, params);} +void __stdcall _Lazy_glFinishFenceNV(GLuint fence) {if (GLeeInit()) glFinishFenceNV(fence);} +void __stdcall _Lazy_glSetFenceNV(GLuint fence, GLenum condition) {if (GLeeInit()) glSetFenceNV(fence, condition);} +PFNGLDELETEFENCESNVPROC pglDeleteFencesNV=_Lazy_glDeleteFencesNV; +PFNGLGENFENCESNVPROC pglGenFencesNV=_Lazy_glGenFencesNV; +PFNGLISFENCENVPROC pglIsFenceNV=_Lazy_glIsFenceNV; +PFNGLTESTFENCENVPROC pglTestFenceNV=_Lazy_glTestFenceNV; +PFNGLGETFENCEIVNVPROC pglGetFenceivNV=_Lazy_glGetFenceivNV; +PFNGLFINISHFENCENVPROC pglFinishFenceNV=_Lazy_glFinishFenceNV; +PFNGLSETFENCENVPROC pglSetFenceNV=_Lazy_glSetFenceNV; +#endif + +/* GL_IBM_texture_mirrored_repeat */ + +#ifdef __GLEE_GL_IBM_texture_mirrored_repeat +#endif + +/* GL_NV_evaluators */ + +#ifdef __GLEE_GL_NV_evaluators +void __stdcall _Lazy_glMapControlPointsNV(GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid * points) {if (GLeeInit()) glMapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, points);} +void __stdcall _Lazy_glMapParameterivNV(GLenum target, GLenum pname, const GLint * params) {if (GLeeInit()) glMapParameterivNV(target, pname, params);} +void __stdcall _Lazy_glMapParameterfvNV(GLenum target, GLenum pname, const GLfloat * params) {if (GLeeInit()) glMapParameterfvNV(target, pname, params);} +void __stdcall _Lazy_glGetMapControlPointsNV(GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid * points) {if (GLeeInit()) glGetMapControlPointsNV(target, index, type, ustride, vstride, packed, points);} +void __stdcall _Lazy_glGetMapParameterivNV(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetMapParameterivNV(target, pname, params);} +void __stdcall _Lazy_glGetMapParameterfvNV(GLenum target, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetMapParameterfvNV(target, pname, params);} +void __stdcall _Lazy_glGetMapAttribParameterivNV(GLenum target, GLuint index, GLenum pname, GLint * params) {if (GLeeInit()) glGetMapAttribParameterivNV(target, index, pname, params);} +void __stdcall _Lazy_glGetMapAttribParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetMapAttribParameterfvNV(target, index, pname, params);} +void __stdcall _Lazy_glEvalMapsNV(GLenum target, GLenum mode) {if (GLeeInit()) glEvalMapsNV(target, mode);} +PFNGLMAPCONTROLPOINTSNVPROC pglMapControlPointsNV=_Lazy_glMapControlPointsNV; +PFNGLMAPPARAMETERIVNVPROC pglMapParameterivNV=_Lazy_glMapParameterivNV; +PFNGLMAPPARAMETERFVNVPROC pglMapParameterfvNV=_Lazy_glMapParameterfvNV; +PFNGLGETMAPCONTROLPOINTSNVPROC pglGetMapControlPointsNV=_Lazy_glGetMapControlPointsNV; +PFNGLGETMAPPARAMETERIVNVPROC pglGetMapParameterivNV=_Lazy_glGetMapParameterivNV; +PFNGLGETMAPPARAMETERFVNVPROC pglGetMapParameterfvNV=_Lazy_glGetMapParameterfvNV; +PFNGLGETMAPATTRIBPARAMETERIVNVPROC pglGetMapAttribParameterivNV=_Lazy_glGetMapAttribParameterivNV; +PFNGLGETMAPATTRIBPARAMETERFVNVPROC pglGetMapAttribParameterfvNV=_Lazy_glGetMapAttribParameterfvNV; +PFNGLEVALMAPSNVPROC pglEvalMapsNV=_Lazy_glEvalMapsNV; +#endif + +/* GL_NV_packed_depth_stencil */ + +#ifdef __GLEE_GL_NV_packed_depth_stencil +#endif + +/* GL_NV_register_combiners2 */ + +#ifdef __GLEE_GL_NV_register_combiners2 +void __stdcall _Lazy_glCombinerStageParameterfvNV(GLenum stage, GLenum pname, const GLfloat * params) {if (GLeeInit()) glCombinerStageParameterfvNV(stage, pname, params);} +void __stdcall _Lazy_glGetCombinerStageParameterfvNV(GLenum stage, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetCombinerStageParameterfvNV(stage, pname, params);} +PFNGLCOMBINERSTAGEPARAMETERFVNVPROC pglCombinerStageParameterfvNV=_Lazy_glCombinerStageParameterfvNV; +PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC pglGetCombinerStageParameterfvNV=_Lazy_glGetCombinerStageParameterfvNV; +#endif + +/* GL_NV_texture_compression_vtc */ + +#ifdef __GLEE_GL_NV_texture_compression_vtc +#endif + +/* GL_NV_texture_rectangle */ + +#ifdef __GLEE_GL_NV_texture_rectangle +#endif + +/* GL_NV_texture_shader */ + +#ifdef __GLEE_GL_NV_texture_shader +#endif + +/* GL_NV_texture_shader2 */ + +#ifdef __GLEE_GL_NV_texture_shader2 +#endif + +/* GL_NV_vertex_array_range2 */ + +#ifdef __GLEE_GL_NV_vertex_array_range2 +#endif + +/* GL_NV_vertex_program */ + +#ifdef __GLEE_GL_NV_vertex_program +GLboolean __stdcall _Lazy_glAreProgramsResidentNV(GLsizei n, const GLuint * programs, GLboolean * residences) {if (GLeeInit()) return glAreProgramsResidentNV(n, programs, residences); return (GLboolean)0;} +void __stdcall _Lazy_glBindProgramNV(GLenum target, GLuint id) {if (GLeeInit()) glBindProgramNV(target, id);} +void __stdcall _Lazy_glDeleteProgramsNV(GLsizei n, const GLuint * programs) {if (GLeeInit()) glDeleteProgramsNV(n, programs);} +void __stdcall _Lazy_glExecuteProgramNV(GLenum target, GLuint id, const GLfloat * params) {if (GLeeInit()) glExecuteProgramNV(target, id, params);} +void __stdcall _Lazy_glGenProgramsNV(GLsizei n, GLuint * programs) {if (GLeeInit()) glGenProgramsNV(n, programs);} +void __stdcall _Lazy_glGetProgramParameterdvNV(GLenum target, GLuint index, GLenum pname, GLdouble * params) {if (GLeeInit()) glGetProgramParameterdvNV(target, index, pname, params);} +void __stdcall _Lazy_glGetProgramParameterfvNV(GLenum target, GLuint index, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetProgramParameterfvNV(target, index, pname, params);} +void __stdcall _Lazy_glGetProgramivNV(GLuint id, GLenum pname, GLint * params) {if (GLeeInit()) glGetProgramivNV(id, pname, params);} +void __stdcall _Lazy_glGetProgramStringNV(GLuint id, GLenum pname, GLubyte * program) {if (GLeeInit()) glGetProgramStringNV(id, pname, program);} +void __stdcall _Lazy_glGetTrackMatrixivNV(GLenum target, GLuint address, GLenum pname, GLint * params) {if (GLeeInit()) glGetTrackMatrixivNV(target, address, pname, params);} +void __stdcall _Lazy_glGetVertexAttribdvNV(GLuint index, GLenum pname, GLdouble * params) {if (GLeeInit()) glGetVertexAttribdvNV(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribfvNV(GLuint index, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetVertexAttribfvNV(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribivNV(GLuint index, GLenum pname, GLint * params) {if (GLeeInit()) glGetVertexAttribivNV(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribPointervNV(GLuint index, GLenum pname, GLvoid* * pointer) {if (GLeeInit()) glGetVertexAttribPointervNV(index, pname, pointer);} +GLboolean __stdcall _Lazy_glIsProgramNV(GLuint id) {if (GLeeInit()) return glIsProgramNV(id); return (GLboolean)0;} +void __stdcall _Lazy_glLoadProgramNV(GLenum target, GLuint id, GLsizei len, const GLubyte * program) {if (GLeeInit()) glLoadProgramNV(target, id, len, program);} +void __stdcall _Lazy_glProgramParameter4dNV(GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) {if (GLeeInit()) glProgramParameter4dNV(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramParameter4dvNV(GLenum target, GLuint index, const GLdouble * v) {if (GLeeInit()) glProgramParameter4dvNV(target, index, v);} +void __stdcall _Lazy_glProgramParameter4fNV(GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glProgramParameter4fNV(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramParameter4fvNV(GLenum target, GLuint index, const GLfloat * v) {if (GLeeInit()) glProgramParameter4fvNV(target, index, v);} +void __stdcall _Lazy_glProgramParameters4dvNV(GLenum target, GLuint index, GLuint count, const GLdouble * v) {if (GLeeInit()) glProgramParameters4dvNV(target, index, count, v);} +void __stdcall _Lazy_glProgramParameters4fvNV(GLenum target, GLuint index, GLuint count, const GLfloat * v) {if (GLeeInit()) glProgramParameters4fvNV(target, index, count, v);} +void __stdcall _Lazy_glRequestResidentProgramsNV(GLsizei n, const GLuint * programs) {if (GLeeInit()) glRequestResidentProgramsNV(n, programs);} +void __stdcall _Lazy_glTrackMatrixNV(GLenum target, GLuint address, GLenum matrix, GLenum transform) {if (GLeeInit()) glTrackMatrixNV(target, address, matrix, transform);} +void __stdcall _Lazy_glVertexAttribPointerNV(GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glVertexAttribPointerNV(index, fsize, type, stride, pointer);} +void __stdcall _Lazy_glVertexAttrib1dNV(GLuint index, GLdouble x) {if (GLeeInit()) glVertexAttrib1dNV(index, x);} +void __stdcall _Lazy_glVertexAttrib1dvNV(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib1dvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib1fNV(GLuint index, GLfloat x) {if (GLeeInit()) glVertexAttrib1fNV(index, x);} +void __stdcall _Lazy_glVertexAttrib1fvNV(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib1fvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib1sNV(GLuint index, GLshort x) {if (GLeeInit()) glVertexAttrib1sNV(index, x);} +void __stdcall _Lazy_glVertexAttrib1svNV(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib1svNV(index, v);} +void __stdcall _Lazy_glVertexAttrib2dNV(GLuint index, GLdouble x, GLdouble y) {if (GLeeInit()) glVertexAttrib2dNV(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2dvNV(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib2dvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y) {if (GLeeInit()) glVertexAttrib2fNV(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2fvNV(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib2fvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib2sNV(GLuint index, GLshort x, GLshort y) {if (GLeeInit()) glVertexAttrib2sNV(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2svNV(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib2svNV(index, v);} +void __stdcall _Lazy_glVertexAttrib3dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z) {if (GLeeInit()) glVertexAttrib3dNV(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3dvNV(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib3dvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glVertexAttrib3fNV(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3fvNV(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib3fvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib3sNV(GLuint index, GLshort x, GLshort y, GLshort z) {if (GLeeInit()) glVertexAttrib3sNV(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3svNV(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib3svNV(index, v);} +void __stdcall _Lazy_glVertexAttrib4dNV(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) {if (GLeeInit()) glVertexAttrib4dNV(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4dvNV(GLuint index, const GLdouble * v) {if (GLeeInit()) glVertexAttrib4dvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glVertexAttrib4fNV(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4fvNV(GLuint index, const GLfloat * v) {if (GLeeInit()) glVertexAttrib4fvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib4sNV(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) {if (GLeeInit()) glVertexAttrib4sNV(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4svNV(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttrib4svNV(index, v);} +void __stdcall _Lazy_glVertexAttrib4ubNV(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) {if (GLeeInit()) glVertexAttrib4ubNV(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4ubvNV(GLuint index, const GLubyte * v) {if (GLeeInit()) glVertexAttrib4ubvNV(index, v);} +void __stdcall _Lazy_glVertexAttribs1dvNV(GLuint index, GLsizei count, const GLdouble * v) {if (GLeeInit()) glVertexAttribs1dvNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs1fvNV(GLuint index, GLsizei count, const GLfloat * v) {if (GLeeInit()) glVertexAttribs1fvNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs1svNV(GLuint index, GLsizei count, const GLshort * v) {if (GLeeInit()) glVertexAttribs1svNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs2dvNV(GLuint index, GLsizei count, const GLdouble * v) {if (GLeeInit()) glVertexAttribs2dvNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs2fvNV(GLuint index, GLsizei count, const GLfloat * v) {if (GLeeInit()) glVertexAttribs2fvNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs2svNV(GLuint index, GLsizei count, const GLshort * v) {if (GLeeInit()) glVertexAttribs2svNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs3dvNV(GLuint index, GLsizei count, const GLdouble * v) {if (GLeeInit()) glVertexAttribs3dvNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs3fvNV(GLuint index, GLsizei count, const GLfloat * v) {if (GLeeInit()) glVertexAttribs3fvNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs3svNV(GLuint index, GLsizei count, const GLshort * v) {if (GLeeInit()) glVertexAttribs3svNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs4dvNV(GLuint index, GLsizei count, const GLdouble * v) {if (GLeeInit()) glVertexAttribs4dvNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs4fvNV(GLuint index, GLsizei count, const GLfloat * v) {if (GLeeInit()) glVertexAttribs4fvNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs4svNV(GLuint index, GLsizei count, const GLshort * v) {if (GLeeInit()) glVertexAttribs4svNV(index, count, v);} +void __stdcall _Lazy_glVertexAttribs4ubvNV(GLuint index, GLsizei count, const GLubyte * v) {if (GLeeInit()) glVertexAttribs4ubvNV(index, count, v);} +PFNGLAREPROGRAMSRESIDENTNVPROC pglAreProgramsResidentNV=_Lazy_glAreProgramsResidentNV; +PFNGLBINDPROGRAMNVPROC pglBindProgramNV=_Lazy_glBindProgramNV; +PFNGLDELETEPROGRAMSNVPROC pglDeleteProgramsNV=_Lazy_glDeleteProgramsNV; +PFNGLEXECUTEPROGRAMNVPROC pglExecuteProgramNV=_Lazy_glExecuteProgramNV; +PFNGLGENPROGRAMSNVPROC pglGenProgramsNV=_Lazy_glGenProgramsNV; +PFNGLGETPROGRAMPARAMETERDVNVPROC pglGetProgramParameterdvNV=_Lazy_glGetProgramParameterdvNV; +PFNGLGETPROGRAMPARAMETERFVNVPROC pglGetProgramParameterfvNV=_Lazy_glGetProgramParameterfvNV; +PFNGLGETPROGRAMIVNVPROC pglGetProgramivNV=_Lazy_glGetProgramivNV; +PFNGLGETPROGRAMSTRINGNVPROC pglGetProgramStringNV=_Lazy_glGetProgramStringNV; +PFNGLGETTRACKMATRIXIVNVPROC pglGetTrackMatrixivNV=_Lazy_glGetTrackMatrixivNV; +PFNGLGETVERTEXATTRIBDVNVPROC pglGetVertexAttribdvNV=_Lazy_glGetVertexAttribdvNV; +PFNGLGETVERTEXATTRIBFVNVPROC pglGetVertexAttribfvNV=_Lazy_glGetVertexAttribfvNV; +PFNGLGETVERTEXATTRIBIVNVPROC pglGetVertexAttribivNV=_Lazy_glGetVertexAttribivNV; +PFNGLGETVERTEXATTRIBPOINTERVNVPROC pglGetVertexAttribPointervNV=_Lazy_glGetVertexAttribPointervNV; +PFNGLISPROGRAMNVPROC pglIsProgramNV=_Lazy_glIsProgramNV; +PFNGLLOADPROGRAMNVPROC pglLoadProgramNV=_Lazy_glLoadProgramNV; +PFNGLPROGRAMPARAMETER4DNVPROC pglProgramParameter4dNV=_Lazy_glProgramParameter4dNV; +PFNGLPROGRAMPARAMETER4DVNVPROC pglProgramParameter4dvNV=_Lazy_glProgramParameter4dvNV; +PFNGLPROGRAMPARAMETER4FNVPROC pglProgramParameter4fNV=_Lazy_glProgramParameter4fNV; +PFNGLPROGRAMPARAMETER4FVNVPROC pglProgramParameter4fvNV=_Lazy_glProgramParameter4fvNV; +PFNGLPROGRAMPARAMETERS4DVNVPROC pglProgramParameters4dvNV=_Lazy_glProgramParameters4dvNV; +PFNGLPROGRAMPARAMETERS4FVNVPROC pglProgramParameters4fvNV=_Lazy_glProgramParameters4fvNV; +PFNGLREQUESTRESIDENTPROGRAMSNVPROC pglRequestResidentProgramsNV=_Lazy_glRequestResidentProgramsNV; +PFNGLTRACKMATRIXNVPROC pglTrackMatrixNV=_Lazy_glTrackMatrixNV; +PFNGLVERTEXATTRIBPOINTERNVPROC pglVertexAttribPointerNV=_Lazy_glVertexAttribPointerNV; +PFNGLVERTEXATTRIB1DNVPROC pglVertexAttrib1dNV=_Lazy_glVertexAttrib1dNV; +PFNGLVERTEXATTRIB1DVNVPROC pglVertexAttrib1dvNV=_Lazy_glVertexAttrib1dvNV; +PFNGLVERTEXATTRIB1FNVPROC pglVertexAttrib1fNV=_Lazy_glVertexAttrib1fNV; +PFNGLVERTEXATTRIB1FVNVPROC pglVertexAttrib1fvNV=_Lazy_glVertexAttrib1fvNV; +PFNGLVERTEXATTRIB1SNVPROC pglVertexAttrib1sNV=_Lazy_glVertexAttrib1sNV; +PFNGLVERTEXATTRIB1SVNVPROC pglVertexAttrib1svNV=_Lazy_glVertexAttrib1svNV; +PFNGLVERTEXATTRIB2DNVPROC pglVertexAttrib2dNV=_Lazy_glVertexAttrib2dNV; +PFNGLVERTEXATTRIB2DVNVPROC pglVertexAttrib2dvNV=_Lazy_glVertexAttrib2dvNV; +PFNGLVERTEXATTRIB2FNVPROC pglVertexAttrib2fNV=_Lazy_glVertexAttrib2fNV; +PFNGLVERTEXATTRIB2FVNVPROC pglVertexAttrib2fvNV=_Lazy_glVertexAttrib2fvNV; +PFNGLVERTEXATTRIB2SNVPROC pglVertexAttrib2sNV=_Lazy_glVertexAttrib2sNV; +PFNGLVERTEXATTRIB2SVNVPROC pglVertexAttrib2svNV=_Lazy_glVertexAttrib2svNV; +PFNGLVERTEXATTRIB3DNVPROC pglVertexAttrib3dNV=_Lazy_glVertexAttrib3dNV; +PFNGLVERTEXATTRIB3DVNVPROC pglVertexAttrib3dvNV=_Lazy_glVertexAttrib3dvNV; +PFNGLVERTEXATTRIB3FNVPROC pglVertexAttrib3fNV=_Lazy_glVertexAttrib3fNV; +PFNGLVERTEXATTRIB3FVNVPROC pglVertexAttrib3fvNV=_Lazy_glVertexAttrib3fvNV; +PFNGLVERTEXATTRIB3SNVPROC pglVertexAttrib3sNV=_Lazy_glVertexAttrib3sNV; +PFNGLVERTEXATTRIB3SVNVPROC pglVertexAttrib3svNV=_Lazy_glVertexAttrib3svNV; +PFNGLVERTEXATTRIB4DNVPROC pglVertexAttrib4dNV=_Lazy_glVertexAttrib4dNV; +PFNGLVERTEXATTRIB4DVNVPROC pglVertexAttrib4dvNV=_Lazy_glVertexAttrib4dvNV; +PFNGLVERTEXATTRIB4FNVPROC pglVertexAttrib4fNV=_Lazy_glVertexAttrib4fNV; +PFNGLVERTEXATTRIB4FVNVPROC pglVertexAttrib4fvNV=_Lazy_glVertexAttrib4fvNV; +PFNGLVERTEXATTRIB4SNVPROC pglVertexAttrib4sNV=_Lazy_glVertexAttrib4sNV; +PFNGLVERTEXATTRIB4SVNVPROC pglVertexAttrib4svNV=_Lazy_glVertexAttrib4svNV; +PFNGLVERTEXATTRIB4UBNVPROC pglVertexAttrib4ubNV=_Lazy_glVertexAttrib4ubNV; +PFNGLVERTEXATTRIB4UBVNVPROC pglVertexAttrib4ubvNV=_Lazy_glVertexAttrib4ubvNV; +PFNGLVERTEXATTRIBS1DVNVPROC pglVertexAttribs1dvNV=_Lazy_glVertexAttribs1dvNV; +PFNGLVERTEXATTRIBS1FVNVPROC pglVertexAttribs1fvNV=_Lazy_glVertexAttribs1fvNV; +PFNGLVERTEXATTRIBS1SVNVPROC pglVertexAttribs1svNV=_Lazy_glVertexAttribs1svNV; +PFNGLVERTEXATTRIBS2DVNVPROC pglVertexAttribs2dvNV=_Lazy_glVertexAttribs2dvNV; +PFNGLVERTEXATTRIBS2FVNVPROC pglVertexAttribs2fvNV=_Lazy_glVertexAttribs2fvNV; +PFNGLVERTEXATTRIBS2SVNVPROC pglVertexAttribs2svNV=_Lazy_glVertexAttribs2svNV; +PFNGLVERTEXATTRIBS3DVNVPROC pglVertexAttribs3dvNV=_Lazy_glVertexAttribs3dvNV; +PFNGLVERTEXATTRIBS3FVNVPROC pglVertexAttribs3fvNV=_Lazy_glVertexAttribs3fvNV; +PFNGLVERTEXATTRIBS3SVNVPROC pglVertexAttribs3svNV=_Lazy_glVertexAttribs3svNV; +PFNGLVERTEXATTRIBS4DVNVPROC pglVertexAttribs4dvNV=_Lazy_glVertexAttribs4dvNV; +PFNGLVERTEXATTRIBS4FVNVPROC pglVertexAttribs4fvNV=_Lazy_glVertexAttribs4fvNV; +PFNGLVERTEXATTRIBS4SVNVPROC pglVertexAttribs4svNV=_Lazy_glVertexAttribs4svNV; +PFNGLVERTEXATTRIBS4UBVNVPROC pglVertexAttribs4ubvNV=_Lazy_glVertexAttribs4ubvNV; +#endif + +/* GL_SGIX_texture_coordinate_clamp */ + +#ifdef __GLEE_GL_SGIX_texture_coordinate_clamp +#endif + +/* GL_SGIX_scalebias_hint */ + +#ifdef __GLEE_GL_SGIX_scalebias_hint +#endif + +/* GL_OML_interlace */ + +#ifdef __GLEE_GL_OML_interlace +#endif + +/* GL_OML_subsample */ + +#ifdef __GLEE_GL_OML_subsample +#endif + +/* GL_OML_resample */ + +#ifdef __GLEE_GL_OML_resample +#endif + +/* GL_NV_copy_depth_to_color */ + +#ifdef __GLEE_GL_NV_copy_depth_to_color +#endif + +/* GL_ATI_envmap_bumpmap */ + +#ifdef __GLEE_GL_ATI_envmap_bumpmap +void __stdcall _Lazy_glTexBumpParameterivATI(GLenum pname, const GLint * param) {if (GLeeInit()) glTexBumpParameterivATI(pname, param);} +void __stdcall _Lazy_glTexBumpParameterfvATI(GLenum pname, const GLfloat * param) {if (GLeeInit()) glTexBumpParameterfvATI(pname, param);} +void __stdcall _Lazy_glGetTexBumpParameterivATI(GLenum pname, GLint * param) {if (GLeeInit()) glGetTexBumpParameterivATI(pname, param);} +void __stdcall _Lazy_glGetTexBumpParameterfvATI(GLenum pname, GLfloat * param) {if (GLeeInit()) glGetTexBumpParameterfvATI(pname, param);} +PFNGLTEXBUMPPARAMETERIVATIPROC pglTexBumpParameterivATI=_Lazy_glTexBumpParameterivATI; +PFNGLTEXBUMPPARAMETERFVATIPROC pglTexBumpParameterfvATI=_Lazy_glTexBumpParameterfvATI; +PFNGLGETTEXBUMPPARAMETERIVATIPROC pglGetTexBumpParameterivATI=_Lazy_glGetTexBumpParameterivATI; +PFNGLGETTEXBUMPPARAMETERFVATIPROC pglGetTexBumpParameterfvATI=_Lazy_glGetTexBumpParameterfvATI; +#endif + +/* GL_ATI_fragment_shader */ + +#ifdef __GLEE_GL_ATI_fragment_shader +GLuint __stdcall _Lazy_glGenFragmentShadersATI(GLuint range) {if (GLeeInit()) return glGenFragmentShadersATI(range); return (GLuint)0;} +void __stdcall _Lazy_glBindFragmentShaderATI(GLuint id) {if (GLeeInit()) glBindFragmentShaderATI(id);} +void __stdcall _Lazy_glDeleteFragmentShaderATI(GLuint id) {if (GLeeInit()) glDeleteFragmentShaderATI(id);} +void __stdcall _Lazy_glBeginFragmentShaderATI(void) {if (GLeeInit()) glBeginFragmentShaderATI();} +void __stdcall _Lazy_glEndFragmentShaderATI(void) {if (GLeeInit()) glEndFragmentShaderATI();} +void __stdcall _Lazy_glPassTexCoordATI(GLuint dst, GLuint coord, GLenum swizzle) {if (GLeeInit()) glPassTexCoordATI(dst, coord, swizzle);} +void __stdcall _Lazy_glSampleMapATI(GLuint dst, GLuint interp, GLenum swizzle) {if (GLeeInit()) glSampleMapATI(dst, interp, swizzle);} +void __stdcall _Lazy_glColorFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) {if (GLeeInit()) glColorFragmentOp1ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod);} +void __stdcall _Lazy_glColorFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) {if (GLeeInit()) glColorFragmentOp2ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod);} +void __stdcall _Lazy_glColorFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) {if (GLeeInit()) glColorFragmentOp3ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod);} +void __stdcall _Lazy_glAlphaFragmentOp1ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) {if (GLeeInit()) glAlphaFragmentOp1ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod);} +void __stdcall _Lazy_glAlphaFragmentOp2ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) {if (GLeeInit()) glAlphaFragmentOp2ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod);} +void __stdcall _Lazy_glAlphaFragmentOp3ATI(GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) {if (GLeeInit()) glAlphaFragmentOp3ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod);} +void __stdcall _Lazy_glSetFragmentShaderConstantATI(GLuint dst, const GLfloat * value) {if (GLeeInit()) glSetFragmentShaderConstantATI(dst, value);} +PFNGLGENFRAGMENTSHADERSATIPROC pglGenFragmentShadersATI=_Lazy_glGenFragmentShadersATI; +PFNGLBINDFRAGMENTSHADERATIPROC pglBindFragmentShaderATI=_Lazy_glBindFragmentShaderATI; +PFNGLDELETEFRAGMENTSHADERATIPROC pglDeleteFragmentShaderATI=_Lazy_glDeleteFragmentShaderATI; +PFNGLBEGINFRAGMENTSHADERATIPROC pglBeginFragmentShaderATI=_Lazy_glBeginFragmentShaderATI; +PFNGLENDFRAGMENTSHADERATIPROC pglEndFragmentShaderATI=_Lazy_glEndFragmentShaderATI; +PFNGLPASSTEXCOORDATIPROC pglPassTexCoordATI=_Lazy_glPassTexCoordATI; +PFNGLSAMPLEMAPATIPROC pglSampleMapATI=_Lazy_glSampleMapATI; +PFNGLCOLORFRAGMENTOP1ATIPROC pglColorFragmentOp1ATI=_Lazy_glColorFragmentOp1ATI; +PFNGLCOLORFRAGMENTOP2ATIPROC pglColorFragmentOp2ATI=_Lazy_glColorFragmentOp2ATI; +PFNGLCOLORFRAGMENTOP3ATIPROC pglColorFragmentOp3ATI=_Lazy_glColorFragmentOp3ATI; +PFNGLALPHAFRAGMENTOP1ATIPROC pglAlphaFragmentOp1ATI=_Lazy_glAlphaFragmentOp1ATI; +PFNGLALPHAFRAGMENTOP2ATIPROC pglAlphaFragmentOp2ATI=_Lazy_glAlphaFragmentOp2ATI; +PFNGLALPHAFRAGMENTOP3ATIPROC pglAlphaFragmentOp3ATI=_Lazy_glAlphaFragmentOp3ATI; +PFNGLSETFRAGMENTSHADERCONSTANTATIPROC pglSetFragmentShaderConstantATI=_Lazy_glSetFragmentShaderConstantATI; +#endif + +/* GL_ATI_pn_triangles */ + +#ifdef __GLEE_GL_ATI_pn_triangles +void __stdcall _Lazy_glPNTrianglesiATI(GLenum pname, GLint param) {if (GLeeInit()) glPNTrianglesiATI(pname, param);} +void __stdcall _Lazy_glPNTrianglesfATI(GLenum pname, GLfloat param) {if (GLeeInit()) glPNTrianglesfATI(pname, param);} +PFNGLPNTRIANGLESIATIPROC pglPNTrianglesiATI=_Lazy_glPNTrianglesiATI; +PFNGLPNTRIANGLESFATIPROC pglPNTrianglesfATI=_Lazy_glPNTrianglesfATI; +#endif + +/* GL_ATI_vertex_array_object */ + +#ifdef __GLEE_GL_ATI_vertex_array_object +GLuint __stdcall _Lazy_glNewObjectBufferATI(GLsizei size, const GLvoid * pointer, GLenum usage) {if (GLeeInit()) return glNewObjectBufferATI(size, pointer, usage); return (GLuint)0;} +GLboolean __stdcall _Lazy_glIsObjectBufferATI(GLuint buffer) {if (GLeeInit()) return glIsObjectBufferATI(buffer); return (GLboolean)0;} +void __stdcall _Lazy_glUpdateObjectBufferATI(GLuint buffer, GLuint offset, GLsizei size, const GLvoid * pointer, GLenum preserve) {if (GLeeInit()) glUpdateObjectBufferATI(buffer, offset, size, pointer, preserve);} +void __stdcall _Lazy_glGetObjectBufferfvATI(GLuint buffer, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetObjectBufferfvATI(buffer, pname, params);} +void __stdcall _Lazy_glGetObjectBufferivATI(GLuint buffer, GLenum pname, GLint * params) {if (GLeeInit()) glGetObjectBufferivATI(buffer, pname, params);} +void __stdcall _Lazy_glFreeObjectBufferATI(GLuint buffer) {if (GLeeInit()) glFreeObjectBufferATI(buffer);} +void __stdcall _Lazy_glArrayObjectATI(GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset) {if (GLeeInit()) glArrayObjectATI(array, size, type, stride, buffer, offset);} +void __stdcall _Lazy_glGetArrayObjectfvATI(GLenum array, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetArrayObjectfvATI(array, pname, params);} +void __stdcall _Lazy_glGetArrayObjectivATI(GLenum array, GLenum pname, GLint * params) {if (GLeeInit()) glGetArrayObjectivATI(array, pname, params);} +void __stdcall _Lazy_glVariantArrayObjectATI(GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset) {if (GLeeInit()) glVariantArrayObjectATI(id, type, stride, buffer, offset);} +void __stdcall _Lazy_glGetVariantArrayObjectfvATI(GLuint id, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetVariantArrayObjectfvATI(id, pname, params);} +void __stdcall _Lazy_glGetVariantArrayObjectivATI(GLuint id, GLenum pname, GLint * params) {if (GLeeInit()) glGetVariantArrayObjectivATI(id, pname, params);} +PFNGLNEWOBJECTBUFFERATIPROC pglNewObjectBufferATI=_Lazy_glNewObjectBufferATI; +PFNGLISOBJECTBUFFERATIPROC pglIsObjectBufferATI=_Lazy_glIsObjectBufferATI; +PFNGLUPDATEOBJECTBUFFERATIPROC pglUpdateObjectBufferATI=_Lazy_glUpdateObjectBufferATI; +PFNGLGETOBJECTBUFFERFVATIPROC pglGetObjectBufferfvATI=_Lazy_glGetObjectBufferfvATI; +PFNGLGETOBJECTBUFFERIVATIPROC pglGetObjectBufferivATI=_Lazy_glGetObjectBufferivATI; +PFNGLFREEOBJECTBUFFERATIPROC pglFreeObjectBufferATI=_Lazy_glFreeObjectBufferATI; +PFNGLARRAYOBJECTATIPROC pglArrayObjectATI=_Lazy_glArrayObjectATI; +PFNGLGETARRAYOBJECTFVATIPROC pglGetArrayObjectfvATI=_Lazy_glGetArrayObjectfvATI; +PFNGLGETARRAYOBJECTIVATIPROC pglGetArrayObjectivATI=_Lazy_glGetArrayObjectivATI; +PFNGLVARIANTARRAYOBJECTATIPROC pglVariantArrayObjectATI=_Lazy_glVariantArrayObjectATI; +PFNGLGETVARIANTARRAYOBJECTFVATIPROC pglGetVariantArrayObjectfvATI=_Lazy_glGetVariantArrayObjectfvATI; +PFNGLGETVARIANTARRAYOBJECTIVATIPROC pglGetVariantArrayObjectivATI=_Lazy_glGetVariantArrayObjectivATI; +#endif + +/* GL_EXT_vertex_shader */ + +#ifdef __GLEE_GL_EXT_vertex_shader +void __stdcall _Lazy_glBeginVertexShaderEXT(void) {if (GLeeInit()) glBeginVertexShaderEXT();} +void __stdcall _Lazy_glEndVertexShaderEXT(void) {if (GLeeInit()) glEndVertexShaderEXT();} +void __stdcall _Lazy_glBindVertexShaderEXT(GLuint id) {if (GLeeInit()) glBindVertexShaderEXT(id);} +GLuint __stdcall _Lazy_glGenVertexShadersEXT(GLuint range) {if (GLeeInit()) return glGenVertexShadersEXT(range); return (GLuint)0;} +void __stdcall _Lazy_glDeleteVertexShaderEXT(GLuint id) {if (GLeeInit()) glDeleteVertexShaderEXT(id);} +void __stdcall _Lazy_glShaderOp1EXT(GLenum op, GLuint res, GLuint arg1) {if (GLeeInit()) glShaderOp1EXT(op, res, arg1);} +void __stdcall _Lazy_glShaderOp2EXT(GLenum op, GLuint res, GLuint arg1, GLuint arg2) {if (GLeeInit()) glShaderOp2EXT(op, res, arg1, arg2);} +void __stdcall _Lazy_glShaderOp3EXT(GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3) {if (GLeeInit()) glShaderOp3EXT(op, res, arg1, arg2, arg3);} +void __stdcall _Lazy_glSwizzleEXT(GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW) {if (GLeeInit()) glSwizzleEXT(res, in, outX, outY, outZ, outW);} +void __stdcall _Lazy_glWriteMaskEXT(GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW) {if (GLeeInit()) glWriteMaskEXT(res, in, outX, outY, outZ, outW);} +void __stdcall _Lazy_glInsertComponentEXT(GLuint res, GLuint src, GLuint num) {if (GLeeInit()) glInsertComponentEXT(res, src, num);} +void __stdcall _Lazy_glExtractComponentEXT(GLuint res, GLuint src, GLuint num) {if (GLeeInit()) glExtractComponentEXT(res, src, num);} +GLuint __stdcall _Lazy_glGenSymbolsEXT(GLenum datatype, GLenum storagetype, GLenum range, GLuint components) {if (GLeeInit()) return glGenSymbolsEXT(datatype, storagetype, range, components); return (GLuint)0;} +void __stdcall _Lazy_glSetInvariantEXT(GLuint id, GLenum type, const GLvoid * addr) {if (GLeeInit()) glSetInvariantEXT(id, type, addr);} +void __stdcall _Lazy_glSetLocalConstantEXT(GLuint id, GLenum type, const GLvoid * addr) {if (GLeeInit()) glSetLocalConstantEXT(id, type, addr);} +void __stdcall _Lazy_glVariantbvEXT(GLuint id, const GLbyte * addr) {if (GLeeInit()) glVariantbvEXT(id, addr);} +void __stdcall _Lazy_glVariantsvEXT(GLuint id, const GLshort * addr) {if (GLeeInit()) glVariantsvEXT(id, addr);} +void __stdcall _Lazy_glVariantivEXT(GLuint id, const GLint * addr) {if (GLeeInit()) glVariantivEXT(id, addr);} +void __stdcall _Lazy_glVariantfvEXT(GLuint id, const GLfloat * addr) {if (GLeeInit()) glVariantfvEXT(id, addr);} +void __stdcall _Lazy_glVariantdvEXT(GLuint id, const GLdouble * addr) {if (GLeeInit()) glVariantdvEXT(id, addr);} +void __stdcall _Lazy_glVariantubvEXT(GLuint id, const GLubyte * addr) {if (GLeeInit()) glVariantubvEXT(id, addr);} +void __stdcall _Lazy_glVariantusvEXT(GLuint id, const GLushort * addr) {if (GLeeInit()) glVariantusvEXT(id, addr);} +void __stdcall _Lazy_glVariantuivEXT(GLuint id, const GLuint * addr) {if (GLeeInit()) glVariantuivEXT(id, addr);} +void __stdcall _Lazy_glVariantPointerEXT(GLuint id, GLenum type, GLuint stride, const GLvoid * addr) {if (GLeeInit()) glVariantPointerEXT(id, type, stride, addr);} +void __stdcall _Lazy_glEnableVariantClientStateEXT(GLuint id) {if (GLeeInit()) glEnableVariantClientStateEXT(id);} +void __stdcall _Lazy_glDisableVariantClientStateEXT(GLuint id) {if (GLeeInit()) glDisableVariantClientStateEXT(id);} +GLuint __stdcall _Lazy_glBindLightParameterEXT(GLenum light, GLenum value) {if (GLeeInit()) return glBindLightParameterEXT(light, value); return (GLuint)0;} +GLuint __stdcall _Lazy_glBindMaterialParameterEXT(GLenum face, GLenum value) {if (GLeeInit()) return glBindMaterialParameterEXT(face, value); return (GLuint)0;} +GLuint __stdcall _Lazy_glBindTexGenParameterEXT(GLenum unit, GLenum coord, GLenum value) {if (GLeeInit()) return glBindTexGenParameterEXT(unit, coord, value); return (GLuint)0;} +GLuint __stdcall _Lazy_glBindTextureUnitParameterEXT(GLenum unit, GLenum value) {if (GLeeInit()) return glBindTextureUnitParameterEXT(unit, value); return (GLuint)0;} +GLuint __stdcall _Lazy_glBindParameterEXT(GLenum value) {if (GLeeInit()) return glBindParameterEXT(value); return (GLuint)0;} +GLboolean __stdcall _Lazy_glIsVariantEnabledEXT(GLuint id, GLenum cap) {if (GLeeInit()) return glIsVariantEnabledEXT(id, cap); return (GLboolean)0;} +void __stdcall _Lazy_glGetVariantBooleanvEXT(GLuint id, GLenum value, GLboolean * data) {if (GLeeInit()) glGetVariantBooleanvEXT(id, value, data);} +void __stdcall _Lazy_glGetVariantIntegervEXT(GLuint id, GLenum value, GLint * data) {if (GLeeInit()) glGetVariantIntegervEXT(id, value, data);} +void __stdcall _Lazy_glGetVariantFloatvEXT(GLuint id, GLenum value, GLfloat * data) {if (GLeeInit()) glGetVariantFloatvEXT(id, value, data);} +void __stdcall _Lazy_glGetVariantPointervEXT(GLuint id, GLenum value, GLvoid* * data) {if (GLeeInit()) glGetVariantPointervEXT(id, value, data);} +void __stdcall _Lazy_glGetInvariantBooleanvEXT(GLuint id, GLenum value, GLboolean * data) {if (GLeeInit()) glGetInvariantBooleanvEXT(id, value, data);} +void __stdcall _Lazy_glGetInvariantIntegervEXT(GLuint id, GLenum value, GLint * data) {if (GLeeInit()) glGetInvariantIntegervEXT(id, value, data);} +void __stdcall _Lazy_glGetInvariantFloatvEXT(GLuint id, GLenum value, GLfloat * data) {if (GLeeInit()) glGetInvariantFloatvEXT(id, value, data);} +void __stdcall _Lazy_glGetLocalConstantBooleanvEXT(GLuint id, GLenum value, GLboolean * data) {if (GLeeInit()) glGetLocalConstantBooleanvEXT(id, value, data);} +void __stdcall _Lazy_glGetLocalConstantIntegervEXT(GLuint id, GLenum value, GLint * data) {if (GLeeInit()) glGetLocalConstantIntegervEXT(id, value, data);} +void __stdcall _Lazy_glGetLocalConstantFloatvEXT(GLuint id, GLenum value, GLfloat * data) {if (GLeeInit()) glGetLocalConstantFloatvEXT(id, value, data);} +PFNGLBEGINVERTEXSHADEREXTPROC pglBeginVertexShaderEXT=_Lazy_glBeginVertexShaderEXT; +PFNGLENDVERTEXSHADEREXTPROC pglEndVertexShaderEXT=_Lazy_glEndVertexShaderEXT; +PFNGLBINDVERTEXSHADEREXTPROC pglBindVertexShaderEXT=_Lazy_glBindVertexShaderEXT; +PFNGLGENVERTEXSHADERSEXTPROC pglGenVertexShadersEXT=_Lazy_glGenVertexShadersEXT; +PFNGLDELETEVERTEXSHADEREXTPROC pglDeleteVertexShaderEXT=_Lazy_glDeleteVertexShaderEXT; +PFNGLSHADEROP1EXTPROC pglShaderOp1EXT=_Lazy_glShaderOp1EXT; +PFNGLSHADEROP2EXTPROC pglShaderOp2EXT=_Lazy_glShaderOp2EXT; +PFNGLSHADEROP3EXTPROC pglShaderOp3EXT=_Lazy_glShaderOp3EXT; +PFNGLSWIZZLEEXTPROC pglSwizzleEXT=_Lazy_glSwizzleEXT; +PFNGLWRITEMASKEXTPROC pglWriteMaskEXT=_Lazy_glWriteMaskEXT; +PFNGLINSERTCOMPONENTEXTPROC pglInsertComponentEXT=_Lazy_glInsertComponentEXT; +PFNGLEXTRACTCOMPONENTEXTPROC pglExtractComponentEXT=_Lazy_glExtractComponentEXT; +PFNGLGENSYMBOLSEXTPROC pglGenSymbolsEXT=_Lazy_glGenSymbolsEXT; +PFNGLSETINVARIANTEXTPROC pglSetInvariantEXT=_Lazy_glSetInvariantEXT; +PFNGLSETLOCALCONSTANTEXTPROC pglSetLocalConstantEXT=_Lazy_glSetLocalConstantEXT; +PFNGLVARIANTBVEXTPROC pglVariantbvEXT=_Lazy_glVariantbvEXT; +PFNGLVARIANTSVEXTPROC pglVariantsvEXT=_Lazy_glVariantsvEXT; +PFNGLVARIANTIVEXTPROC pglVariantivEXT=_Lazy_glVariantivEXT; +PFNGLVARIANTFVEXTPROC pglVariantfvEXT=_Lazy_glVariantfvEXT; +PFNGLVARIANTDVEXTPROC pglVariantdvEXT=_Lazy_glVariantdvEXT; +PFNGLVARIANTUBVEXTPROC pglVariantubvEXT=_Lazy_glVariantubvEXT; +PFNGLVARIANTUSVEXTPROC pglVariantusvEXT=_Lazy_glVariantusvEXT; +PFNGLVARIANTUIVEXTPROC pglVariantuivEXT=_Lazy_glVariantuivEXT; +PFNGLVARIANTPOINTEREXTPROC pglVariantPointerEXT=_Lazy_glVariantPointerEXT; +PFNGLENABLEVARIANTCLIENTSTATEEXTPROC pglEnableVariantClientStateEXT=_Lazy_glEnableVariantClientStateEXT; +PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC pglDisableVariantClientStateEXT=_Lazy_glDisableVariantClientStateEXT; +PFNGLBINDLIGHTPARAMETEREXTPROC pglBindLightParameterEXT=_Lazy_glBindLightParameterEXT; +PFNGLBINDMATERIALPARAMETEREXTPROC pglBindMaterialParameterEXT=_Lazy_glBindMaterialParameterEXT; +PFNGLBINDTEXGENPARAMETEREXTPROC pglBindTexGenParameterEXT=_Lazy_glBindTexGenParameterEXT; +PFNGLBINDTEXTUREUNITPARAMETEREXTPROC pglBindTextureUnitParameterEXT=_Lazy_glBindTextureUnitParameterEXT; +PFNGLBINDPARAMETEREXTPROC pglBindParameterEXT=_Lazy_glBindParameterEXT; +PFNGLISVARIANTENABLEDEXTPROC pglIsVariantEnabledEXT=_Lazy_glIsVariantEnabledEXT; +PFNGLGETVARIANTBOOLEANVEXTPROC pglGetVariantBooleanvEXT=_Lazy_glGetVariantBooleanvEXT; +PFNGLGETVARIANTINTEGERVEXTPROC pglGetVariantIntegervEXT=_Lazy_glGetVariantIntegervEXT; +PFNGLGETVARIANTFLOATVEXTPROC pglGetVariantFloatvEXT=_Lazy_glGetVariantFloatvEXT; +PFNGLGETVARIANTPOINTERVEXTPROC pglGetVariantPointervEXT=_Lazy_glGetVariantPointervEXT; +PFNGLGETINVARIANTBOOLEANVEXTPROC pglGetInvariantBooleanvEXT=_Lazy_glGetInvariantBooleanvEXT; +PFNGLGETINVARIANTINTEGERVEXTPROC pglGetInvariantIntegervEXT=_Lazy_glGetInvariantIntegervEXT; +PFNGLGETINVARIANTFLOATVEXTPROC pglGetInvariantFloatvEXT=_Lazy_glGetInvariantFloatvEXT; +PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC pglGetLocalConstantBooleanvEXT=_Lazy_glGetLocalConstantBooleanvEXT; +PFNGLGETLOCALCONSTANTINTEGERVEXTPROC pglGetLocalConstantIntegervEXT=_Lazy_glGetLocalConstantIntegervEXT; +PFNGLGETLOCALCONSTANTFLOATVEXTPROC pglGetLocalConstantFloatvEXT=_Lazy_glGetLocalConstantFloatvEXT; +#endif + +/* GL_ATI_vertex_streams */ + +#ifdef __GLEE_GL_ATI_vertex_streams +void __stdcall _Lazy_glVertexStream1sATI(GLenum stream, GLshort x) {if (GLeeInit()) glVertexStream1sATI(stream, x);} +void __stdcall _Lazy_glVertexStream1svATI(GLenum stream, const GLshort * coords) {if (GLeeInit()) glVertexStream1svATI(stream, coords);} +void __stdcall _Lazy_glVertexStream1iATI(GLenum stream, GLint x) {if (GLeeInit()) glVertexStream1iATI(stream, x);} +void __stdcall _Lazy_glVertexStream1ivATI(GLenum stream, const GLint * coords) {if (GLeeInit()) glVertexStream1ivATI(stream, coords);} +void __stdcall _Lazy_glVertexStream1fATI(GLenum stream, GLfloat x) {if (GLeeInit()) glVertexStream1fATI(stream, x);} +void __stdcall _Lazy_glVertexStream1fvATI(GLenum stream, const GLfloat * coords) {if (GLeeInit()) glVertexStream1fvATI(stream, coords);} +void __stdcall _Lazy_glVertexStream1dATI(GLenum stream, GLdouble x) {if (GLeeInit()) glVertexStream1dATI(stream, x);} +void __stdcall _Lazy_glVertexStream1dvATI(GLenum stream, const GLdouble * coords) {if (GLeeInit()) glVertexStream1dvATI(stream, coords);} +void __stdcall _Lazy_glVertexStream2sATI(GLenum stream, GLshort x, GLshort y) {if (GLeeInit()) glVertexStream2sATI(stream, x, y);} +void __stdcall _Lazy_glVertexStream2svATI(GLenum stream, const GLshort * coords) {if (GLeeInit()) glVertexStream2svATI(stream, coords);} +void __stdcall _Lazy_glVertexStream2iATI(GLenum stream, GLint x, GLint y) {if (GLeeInit()) glVertexStream2iATI(stream, x, y);} +void __stdcall _Lazy_glVertexStream2ivATI(GLenum stream, const GLint * coords) {if (GLeeInit()) glVertexStream2ivATI(stream, coords);} +void __stdcall _Lazy_glVertexStream2fATI(GLenum stream, GLfloat x, GLfloat y) {if (GLeeInit()) glVertexStream2fATI(stream, x, y);} +void __stdcall _Lazy_glVertexStream2fvATI(GLenum stream, const GLfloat * coords) {if (GLeeInit()) glVertexStream2fvATI(stream, coords);} +void __stdcall _Lazy_glVertexStream2dATI(GLenum stream, GLdouble x, GLdouble y) {if (GLeeInit()) glVertexStream2dATI(stream, x, y);} +void __stdcall _Lazy_glVertexStream2dvATI(GLenum stream, const GLdouble * coords) {if (GLeeInit()) glVertexStream2dvATI(stream, coords);} +void __stdcall _Lazy_glVertexStream3sATI(GLenum stream, GLshort x, GLshort y, GLshort z) {if (GLeeInit()) glVertexStream3sATI(stream, x, y, z);} +void __stdcall _Lazy_glVertexStream3svATI(GLenum stream, const GLshort * coords) {if (GLeeInit()) glVertexStream3svATI(stream, coords);} +void __stdcall _Lazy_glVertexStream3iATI(GLenum stream, GLint x, GLint y, GLint z) {if (GLeeInit()) glVertexStream3iATI(stream, x, y, z);} +void __stdcall _Lazy_glVertexStream3ivATI(GLenum stream, const GLint * coords) {if (GLeeInit()) glVertexStream3ivATI(stream, coords);} +void __stdcall _Lazy_glVertexStream3fATI(GLenum stream, GLfloat x, GLfloat y, GLfloat z) {if (GLeeInit()) glVertexStream3fATI(stream, x, y, z);} +void __stdcall _Lazy_glVertexStream3fvATI(GLenum stream, const GLfloat * coords) {if (GLeeInit()) glVertexStream3fvATI(stream, coords);} +void __stdcall _Lazy_glVertexStream3dATI(GLenum stream, GLdouble x, GLdouble y, GLdouble z) {if (GLeeInit()) glVertexStream3dATI(stream, x, y, z);} +void __stdcall _Lazy_glVertexStream3dvATI(GLenum stream, const GLdouble * coords) {if (GLeeInit()) glVertexStream3dvATI(stream, coords);} +void __stdcall _Lazy_glVertexStream4sATI(GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w) {if (GLeeInit()) glVertexStream4sATI(stream, x, y, z, w);} +void __stdcall _Lazy_glVertexStream4svATI(GLenum stream, const GLshort * coords) {if (GLeeInit()) glVertexStream4svATI(stream, coords);} +void __stdcall _Lazy_glVertexStream4iATI(GLenum stream, GLint x, GLint y, GLint z, GLint w) {if (GLeeInit()) glVertexStream4iATI(stream, x, y, z, w);} +void __stdcall _Lazy_glVertexStream4ivATI(GLenum stream, const GLint * coords) {if (GLeeInit()) glVertexStream4ivATI(stream, coords);} +void __stdcall _Lazy_glVertexStream4fATI(GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glVertexStream4fATI(stream, x, y, z, w);} +void __stdcall _Lazy_glVertexStream4fvATI(GLenum stream, const GLfloat * coords) {if (GLeeInit()) glVertexStream4fvATI(stream, coords);} +void __stdcall _Lazy_glVertexStream4dATI(GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w) {if (GLeeInit()) glVertexStream4dATI(stream, x, y, z, w);} +void __stdcall _Lazy_glVertexStream4dvATI(GLenum stream, const GLdouble * coords) {if (GLeeInit()) glVertexStream4dvATI(stream, coords);} +void __stdcall _Lazy_glNormalStream3bATI(GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz) {if (GLeeInit()) glNormalStream3bATI(stream, nx, ny, nz);} +void __stdcall _Lazy_glNormalStream3bvATI(GLenum stream, const GLbyte * coords) {if (GLeeInit()) glNormalStream3bvATI(stream, coords);} +void __stdcall _Lazy_glNormalStream3sATI(GLenum stream, GLshort nx, GLshort ny, GLshort nz) {if (GLeeInit()) glNormalStream3sATI(stream, nx, ny, nz);} +void __stdcall _Lazy_glNormalStream3svATI(GLenum stream, const GLshort * coords) {if (GLeeInit()) glNormalStream3svATI(stream, coords);} +void __stdcall _Lazy_glNormalStream3iATI(GLenum stream, GLint nx, GLint ny, GLint nz) {if (GLeeInit()) glNormalStream3iATI(stream, nx, ny, nz);} +void __stdcall _Lazy_glNormalStream3ivATI(GLenum stream, const GLint * coords) {if (GLeeInit()) glNormalStream3ivATI(stream, coords);} +void __stdcall _Lazy_glNormalStream3fATI(GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz) {if (GLeeInit()) glNormalStream3fATI(stream, nx, ny, nz);} +void __stdcall _Lazy_glNormalStream3fvATI(GLenum stream, const GLfloat * coords) {if (GLeeInit()) glNormalStream3fvATI(stream, coords);} +void __stdcall _Lazy_glNormalStream3dATI(GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz) {if (GLeeInit()) glNormalStream3dATI(stream, nx, ny, nz);} +void __stdcall _Lazy_glNormalStream3dvATI(GLenum stream, const GLdouble * coords) {if (GLeeInit()) glNormalStream3dvATI(stream, coords);} +void __stdcall _Lazy_glClientActiveVertexStreamATI(GLenum stream) {if (GLeeInit()) glClientActiveVertexStreamATI(stream);} +void __stdcall _Lazy_glVertexBlendEnviATI(GLenum pname, GLint param) {if (GLeeInit()) glVertexBlendEnviATI(pname, param);} +void __stdcall _Lazy_glVertexBlendEnvfATI(GLenum pname, GLfloat param) {if (GLeeInit()) glVertexBlendEnvfATI(pname, param);} +PFNGLVERTEXSTREAM1SATIPROC pglVertexStream1sATI=_Lazy_glVertexStream1sATI; +PFNGLVERTEXSTREAM1SVATIPROC pglVertexStream1svATI=_Lazy_glVertexStream1svATI; +PFNGLVERTEXSTREAM1IATIPROC pglVertexStream1iATI=_Lazy_glVertexStream1iATI; +PFNGLVERTEXSTREAM1IVATIPROC pglVertexStream1ivATI=_Lazy_glVertexStream1ivATI; +PFNGLVERTEXSTREAM1FATIPROC pglVertexStream1fATI=_Lazy_glVertexStream1fATI; +PFNGLVERTEXSTREAM1FVATIPROC pglVertexStream1fvATI=_Lazy_glVertexStream1fvATI; +PFNGLVERTEXSTREAM1DATIPROC pglVertexStream1dATI=_Lazy_glVertexStream1dATI; +PFNGLVERTEXSTREAM1DVATIPROC pglVertexStream1dvATI=_Lazy_glVertexStream1dvATI; +PFNGLVERTEXSTREAM2SATIPROC pglVertexStream2sATI=_Lazy_glVertexStream2sATI; +PFNGLVERTEXSTREAM2SVATIPROC pglVertexStream2svATI=_Lazy_glVertexStream2svATI; +PFNGLVERTEXSTREAM2IATIPROC pglVertexStream2iATI=_Lazy_glVertexStream2iATI; +PFNGLVERTEXSTREAM2IVATIPROC pglVertexStream2ivATI=_Lazy_glVertexStream2ivATI; +PFNGLVERTEXSTREAM2FATIPROC pglVertexStream2fATI=_Lazy_glVertexStream2fATI; +PFNGLVERTEXSTREAM2FVATIPROC pglVertexStream2fvATI=_Lazy_glVertexStream2fvATI; +PFNGLVERTEXSTREAM2DATIPROC pglVertexStream2dATI=_Lazy_glVertexStream2dATI; +PFNGLVERTEXSTREAM2DVATIPROC pglVertexStream2dvATI=_Lazy_glVertexStream2dvATI; +PFNGLVERTEXSTREAM3SATIPROC pglVertexStream3sATI=_Lazy_glVertexStream3sATI; +PFNGLVERTEXSTREAM3SVATIPROC pglVertexStream3svATI=_Lazy_glVertexStream3svATI; +PFNGLVERTEXSTREAM3IATIPROC pglVertexStream3iATI=_Lazy_glVertexStream3iATI; +PFNGLVERTEXSTREAM3IVATIPROC pglVertexStream3ivATI=_Lazy_glVertexStream3ivATI; +PFNGLVERTEXSTREAM3FATIPROC pglVertexStream3fATI=_Lazy_glVertexStream3fATI; +PFNGLVERTEXSTREAM3FVATIPROC pglVertexStream3fvATI=_Lazy_glVertexStream3fvATI; +PFNGLVERTEXSTREAM3DATIPROC pglVertexStream3dATI=_Lazy_glVertexStream3dATI; +PFNGLVERTEXSTREAM3DVATIPROC pglVertexStream3dvATI=_Lazy_glVertexStream3dvATI; +PFNGLVERTEXSTREAM4SATIPROC pglVertexStream4sATI=_Lazy_glVertexStream4sATI; +PFNGLVERTEXSTREAM4SVATIPROC pglVertexStream4svATI=_Lazy_glVertexStream4svATI; +PFNGLVERTEXSTREAM4IATIPROC pglVertexStream4iATI=_Lazy_glVertexStream4iATI; +PFNGLVERTEXSTREAM4IVATIPROC pglVertexStream4ivATI=_Lazy_glVertexStream4ivATI; +PFNGLVERTEXSTREAM4FATIPROC pglVertexStream4fATI=_Lazy_glVertexStream4fATI; +PFNGLVERTEXSTREAM4FVATIPROC pglVertexStream4fvATI=_Lazy_glVertexStream4fvATI; +PFNGLVERTEXSTREAM4DATIPROC pglVertexStream4dATI=_Lazy_glVertexStream4dATI; +PFNGLVERTEXSTREAM4DVATIPROC pglVertexStream4dvATI=_Lazy_glVertexStream4dvATI; +PFNGLNORMALSTREAM3BATIPROC pglNormalStream3bATI=_Lazy_glNormalStream3bATI; +PFNGLNORMALSTREAM3BVATIPROC pglNormalStream3bvATI=_Lazy_glNormalStream3bvATI; +PFNGLNORMALSTREAM3SATIPROC pglNormalStream3sATI=_Lazy_glNormalStream3sATI; +PFNGLNORMALSTREAM3SVATIPROC pglNormalStream3svATI=_Lazy_glNormalStream3svATI; +PFNGLNORMALSTREAM3IATIPROC pglNormalStream3iATI=_Lazy_glNormalStream3iATI; +PFNGLNORMALSTREAM3IVATIPROC pglNormalStream3ivATI=_Lazy_glNormalStream3ivATI; +PFNGLNORMALSTREAM3FATIPROC pglNormalStream3fATI=_Lazy_glNormalStream3fATI; +PFNGLNORMALSTREAM3FVATIPROC pglNormalStream3fvATI=_Lazy_glNormalStream3fvATI; +PFNGLNORMALSTREAM3DATIPROC pglNormalStream3dATI=_Lazy_glNormalStream3dATI; +PFNGLNORMALSTREAM3DVATIPROC pglNormalStream3dvATI=_Lazy_glNormalStream3dvATI; +PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC pglClientActiveVertexStreamATI=_Lazy_glClientActiveVertexStreamATI; +PFNGLVERTEXBLENDENVIATIPROC pglVertexBlendEnviATI=_Lazy_glVertexBlendEnviATI; +PFNGLVERTEXBLENDENVFATIPROC pglVertexBlendEnvfATI=_Lazy_glVertexBlendEnvfATI; +#endif + +/* GL_ATI_element_array */ + +#ifdef __GLEE_GL_ATI_element_array +void __stdcall _Lazy_glElementPointerATI(GLenum type, const GLvoid * pointer) {if (GLeeInit()) glElementPointerATI(type, pointer);} +void __stdcall _Lazy_glDrawElementArrayATI(GLenum mode, GLsizei count) {if (GLeeInit()) glDrawElementArrayATI(mode, count);} +void __stdcall _Lazy_glDrawRangeElementArrayATI(GLenum mode, GLuint start, GLuint end, GLsizei count) {if (GLeeInit()) glDrawRangeElementArrayATI(mode, start, end, count);} +PFNGLELEMENTPOINTERATIPROC pglElementPointerATI=_Lazy_glElementPointerATI; +PFNGLDRAWELEMENTARRAYATIPROC pglDrawElementArrayATI=_Lazy_glDrawElementArrayATI; +PFNGLDRAWRANGEELEMENTARRAYATIPROC pglDrawRangeElementArrayATI=_Lazy_glDrawRangeElementArrayATI; +#endif + +/* GL_SUN_mesh_array */ + +#ifdef __GLEE_GL_SUN_mesh_array +void __stdcall _Lazy_glDrawMeshArraysSUN(GLenum mode, GLint first, GLsizei count, GLsizei width) {if (GLeeInit()) glDrawMeshArraysSUN(mode, first, count, width);} +PFNGLDRAWMESHARRAYSSUNPROC pglDrawMeshArraysSUN=_Lazy_glDrawMeshArraysSUN; +#endif + +/* GL_SUN_slice_accum */ + +#ifdef __GLEE_GL_SUN_slice_accum +#endif + +/* GL_NV_multisample_filter_hint */ + +#ifdef __GLEE_GL_NV_multisample_filter_hint +#endif + +/* GL_NV_depth_clamp */ + +#ifdef __GLEE_GL_NV_depth_clamp +#endif + +/* GL_NV_occlusion_query */ + +#ifdef __GLEE_GL_NV_occlusion_query +void __stdcall _Lazy_glGenOcclusionQueriesNV(GLsizei n, GLuint * ids) {if (GLeeInit()) glGenOcclusionQueriesNV(n, ids);} +void __stdcall _Lazy_glDeleteOcclusionQueriesNV(GLsizei n, const GLuint * ids) {if (GLeeInit()) glDeleteOcclusionQueriesNV(n, ids);} +GLboolean __stdcall _Lazy_glIsOcclusionQueryNV(GLuint id) {if (GLeeInit()) return glIsOcclusionQueryNV(id); return (GLboolean)0;} +void __stdcall _Lazy_glBeginOcclusionQueryNV(GLuint id) {if (GLeeInit()) glBeginOcclusionQueryNV(id);} +void __stdcall _Lazy_glEndOcclusionQueryNV(void) {if (GLeeInit()) glEndOcclusionQueryNV();} +void __stdcall _Lazy_glGetOcclusionQueryivNV(GLuint id, GLenum pname, GLint * params) {if (GLeeInit()) glGetOcclusionQueryivNV(id, pname, params);} +void __stdcall _Lazy_glGetOcclusionQueryuivNV(GLuint id, GLenum pname, GLuint * params) {if (GLeeInit()) glGetOcclusionQueryuivNV(id, pname, params);} +PFNGLGENOCCLUSIONQUERIESNVPROC pglGenOcclusionQueriesNV=_Lazy_glGenOcclusionQueriesNV; +PFNGLDELETEOCCLUSIONQUERIESNVPROC pglDeleteOcclusionQueriesNV=_Lazy_glDeleteOcclusionQueriesNV; +PFNGLISOCCLUSIONQUERYNVPROC pglIsOcclusionQueryNV=_Lazy_glIsOcclusionQueryNV; +PFNGLBEGINOCCLUSIONQUERYNVPROC pglBeginOcclusionQueryNV=_Lazy_glBeginOcclusionQueryNV; +PFNGLENDOCCLUSIONQUERYNVPROC pglEndOcclusionQueryNV=_Lazy_glEndOcclusionQueryNV; +PFNGLGETOCCLUSIONQUERYIVNVPROC pglGetOcclusionQueryivNV=_Lazy_glGetOcclusionQueryivNV; +PFNGLGETOCCLUSIONQUERYUIVNVPROC pglGetOcclusionQueryuivNV=_Lazy_glGetOcclusionQueryuivNV; +#endif + +/* GL_NV_point_sprite */ + +#ifdef __GLEE_GL_NV_point_sprite +void __stdcall _Lazy_glPointParameteriNV(GLenum pname, GLint param) {if (GLeeInit()) glPointParameteriNV(pname, param);} +void __stdcall _Lazy_glPointParameterivNV(GLenum pname, const GLint * params) {if (GLeeInit()) glPointParameterivNV(pname, params);} +PFNGLPOINTPARAMETERINVPROC pglPointParameteriNV=_Lazy_glPointParameteriNV; +PFNGLPOINTPARAMETERIVNVPROC pglPointParameterivNV=_Lazy_glPointParameterivNV; +#endif + +/* GL_NV_texture_shader3 */ + +#ifdef __GLEE_GL_NV_texture_shader3 +#endif + +/* GL_NV_vertex_program1_1 */ + +#ifdef __GLEE_GL_NV_vertex_program1_1 +#endif + +/* GL_EXT_shadow_funcs */ + +#ifdef __GLEE_GL_EXT_shadow_funcs +#endif + +/* GL_EXT_stencil_two_side */ + +#ifdef __GLEE_GL_EXT_stencil_two_side +void __stdcall _Lazy_glActiveStencilFaceEXT(GLenum face) {if (GLeeInit()) glActiveStencilFaceEXT(face);} +PFNGLACTIVESTENCILFACEEXTPROC pglActiveStencilFaceEXT=_Lazy_glActiveStencilFaceEXT; +#endif + +/* GL_ATI_text_fragment_shader */ + +#ifdef __GLEE_GL_ATI_text_fragment_shader +#endif + +/* GL_APPLE_client_storage */ + +#ifdef __GLEE_GL_APPLE_client_storage +#endif + +/* GL_APPLE_element_array */ + +#ifdef __GLEE_GL_APPLE_element_array +void __stdcall _Lazy_glElementPointerAPPLE(GLenum type, const GLvoid * pointer) {if (GLeeInit()) glElementPointerAPPLE(type, pointer);} +void __stdcall _Lazy_glDrawElementArrayAPPLE(GLenum mode, GLint first, GLsizei count) {if (GLeeInit()) glDrawElementArrayAPPLE(mode, first, count);} +void __stdcall _Lazy_glDrawRangeElementArrayAPPLE(GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count) {if (GLeeInit()) glDrawRangeElementArrayAPPLE(mode, start, end, first, count);} +void __stdcall _Lazy_glMultiDrawElementArrayAPPLE(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) {if (GLeeInit()) glMultiDrawElementArrayAPPLE(mode, first, count, primcount);} +void __stdcall _Lazy_glMultiDrawRangeElementArrayAPPLE(GLenum mode, GLuint start, GLuint end, const GLint * first, const GLsizei * count, GLsizei primcount) {if (GLeeInit()) glMultiDrawRangeElementArrayAPPLE(mode, start, end, first, count, primcount);} +PFNGLELEMENTPOINTERAPPLEPROC pglElementPointerAPPLE=_Lazy_glElementPointerAPPLE; +PFNGLDRAWELEMENTARRAYAPPLEPROC pglDrawElementArrayAPPLE=_Lazy_glDrawElementArrayAPPLE; +PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC pglDrawRangeElementArrayAPPLE=_Lazy_glDrawRangeElementArrayAPPLE; +PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC pglMultiDrawElementArrayAPPLE=_Lazy_glMultiDrawElementArrayAPPLE; +PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC pglMultiDrawRangeElementArrayAPPLE=_Lazy_glMultiDrawRangeElementArrayAPPLE; +#endif + +/* GL_APPLE_fence */ + +#ifdef __GLEE_GL_APPLE_fence +void __stdcall _Lazy_glGenFencesAPPLE(GLsizei n, GLuint * fences) {if (GLeeInit()) glGenFencesAPPLE(n, fences);} +void __stdcall _Lazy_glDeleteFencesAPPLE(GLsizei n, const GLuint * fences) {if (GLeeInit()) glDeleteFencesAPPLE(n, fences);} +void __stdcall _Lazy_glSetFenceAPPLE(GLuint fence) {if (GLeeInit()) glSetFenceAPPLE(fence);} +GLboolean __stdcall _Lazy_glIsFenceAPPLE(GLuint fence) {if (GLeeInit()) return glIsFenceAPPLE(fence); return (GLboolean)0;} +GLboolean __stdcall _Lazy_glTestFenceAPPLE(GLuint fence) {if (GLeeInit()) return glTestFenceAPPLE(fence); return (GLboolean)0;} +void __stdcall _Lazy_glFinishFenceAPPLE(GLuint fence) {if (GLeeInit()) glFinishFenceAPPLE(fence);} +GLboolean __stdcall _Lazy_glTestObjectAPPLE(GLenum object, GLuint name) {if (GLeeInit()) return glTestObjectAPPLE(object, name); return (GLboolean)0;} +void __stdcall _Lazy_glFinishObjectAPPLE(GLenum object, GLint name) {if (GLeeInit()) glFinishObjectAPPLE(object, name);} +PFNGLGENFENCESAPPLEPROC pglGenFencesAPPLE=_Lazy_glGenFencesAPPLE; +PFNGLDELETEFENCESAPPLEPROC pglDeleteFencesAPPLE=_Lazy_glDeleteFencesAPPLE; +PFNGLSETFENCEAPPLEPROC pglSetFenceAPPLE=_Lazy_glSetFenceAPPLE; +PFNGLISFENCEAPPLEPROC pglIsFenceAPPLE=_Lazy_glIsFenceAPPLE; +PFNGLTESTFENCEAPPLEPROC pglTestFenceAPPLE=_Lazy_glTestFenceAPPLE; +PFNGLFINISHFENCEAPPLEPROC pglFinishFenceAPPLE=_Lazy_glFinishFenceAPPLE; +PFNGLTESTOBJECTAPPLEPROC pglTestObjectAPPLE=_Lazy_glTestObjectAPPLE; +PFNGLFINISHOBJECTAPPLEPROC pglFinishObjectAPPLE=_Lazy_glFinishObjectAPPLE; +#endif + +/* GL_APPLE_vertex_array_object */ + +#ifdef __GLEE_GL_APPLE_vertex_array_object +void __stdcall _Lazy_glBindVertexArrayAPPLE(GLuint array) {if (GLeeInit()) glBindVertexArrayAPPLE(array);} +void __stdcall _Lazy_glDeleteVertexArraysAPPLE(GLsizei n, const GLuint * arrays) {if (GLeeInit()) glDeleteVertexArraysAPPLE(n, arrays);} +void __stdcall _Lazy_glGenVertexArraysAPPLE(GLsizei n, const GLuint * arrays) {if (GLeeInit()) glGenVertexArraysAPPLE(n, arrays);} +GLboolean __stdcall _Lazy_glIsVertexArrayAPPLE(GLuint array) {if (GLeeInit()) return glIsVertexArrayAPPLE(array); return (GLboolean)0;} +PFNGLBINDVERTEXARRAYAPPLEPROC pglBindVertexArrayAPPLE=_Lazy_glBindVertexArrayAPPLE; +PFNGLDELETEVERTEXARRAYSAPPLEPROC pglDeleteVertexArraysAPPLE=_Lazy_glDeleteVertexArraysAPPLE; +PFNGLGENVERTEXARRAYSAPPLEPROC pglGenVertexArraysAPPLE=_Lazy_glGenVertexArraysAPPLE; +PFNGLISVERTEXARRAYAPPLEPROC pglIsVertexArrayAPPLE=_Lazy_glIsVertexArrayAPPLE; +#endif + +/* GL_APPLE_vertex_array_range */ + +#ifdef __GLEE_GL_APPLE_vertex_array_range +void __stdcall _Lazy_glVertexArrayRangeAPPLE(GLsizei length, GLvoid * pointer) {if (GLeeInit()) glVertexArrayRangeAPPLE(length, pointer);} +void __stdcall _Lazy_glFlushVertexArrayRangeAPPLE(GLsizei length, GLvoid * pointer) {if (GLeeInit()) glFlushVertexArrayRangeAPPLE(length, pointer);} +void __stdcall _Lazy_glVertexArrayParameteriAPPLE(GLenum pname, GLint param) {if (GLeeInit()) glVertexArrayParameteriAPPLE(pname, param);} +PFNGLVERTEXARRAYRANGEAPPLEPROC pglVertexArrayRangeAPPLE=_Lazy_glVertexArrayRangeAPPLE; +PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC pglFlushVertexArrayRangeAPPLE=_Lazy_glFlushVertexArrayRangeAPPLE; +PFNGLVERTEXARRAYPARAMETERIAPPLEPROC pglVertexArrayParameteriAPPLE=_Lazy_glVertexArrayParameteriAPPLE; +#endif + +/* GL_APPLE_ycbcr_422 */ + +#ifdef __GLEE_GL_APPLE_ycbcr_422 +#endif + +/* GL_S3_s3tc */ + +#ifdef __GLEE_GL_S3_s3tc +#endif + +/* GL_ATI_draw_buffers */ + +#ifdef __GLEE_GL_ATI_draw_buffers +void __stdcall _Lazy_glDrawBuffersATI(GLsizei n, const GLenum * bufs) {if (GLeeInit()) glDrawBuffersATI(n, bufs);} +PFNGLDRAWBUFFERSATIPROC pglDrawBuffersATI=_Lazy_glDrawBuffersATI; +#endif + +/* GL_ATI_pixel_format_float */ + +#ifdef __GLEE_GL_ATI_pixel_format_float +#endif + +/* GL_ATI_texture_env_combine3 */ + +#ifdef __GLEE_GL_ATI_texture_env_combine3 +#endif + +/* GL_ATI_texture_float */ + +#ifdef __GLEE_GL_ATI_texture_float +#endif + +/* GL_NV_float_buffer */ + +#ifdef __GLEE_GL_NV_float_buffer +#endif + +/* GL_NV_fragment_program */ + +#ifdef __GLEE_GL_NV_fragment_program +void __stdcall _Lazy_glProgramNamedParameter4fNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {if (GLeeInit()) glProgramNamedParameter4fNV(id, len, name, x, y, z, w);} +void __stdcall _Lazy_glProgramNamedParameter4dNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w) {if (GLeeInit()) glProgramNamedParameter4dNV(id, len, name, x, y, z, w);} +void __stdcall _Lazy_glProgramNamedParameter4fvNV(GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v) {if (GLeeInit()) glProgramNamedParameter4fvNV(id, len, name, v);} +void __stdcall _Lazy_glProgramNamedParameter4dvNV(GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v) {if (GLeeInit()) glProgramNamedParameter4dvNV(id, len, name, v);} +void __stdcall _Lazy_glGetProgramNamedParameterfvNV(GLuint id, GLsizei len, const GLubyte * name, GLfloat * params) {if (GLeeInit()) glGetProgramNamedParameterfvNV(id, len, name, params);} +void __stdcall _Lazy_glGetProgramNamedParameterdvNV(GLuint id, GLsizei len, const GLubyte * name, GLdouble * params) {if (GLeeInit()) glGetProgramNamedParameterdvNV(id, len, name, params);} +PFNGLPROGRAMNAMEDPARAMETER4FNVPROC pglProgramNamedParameter4fNV=_Lazy_glProgramNamedParameter4fNV; +PFNGLPROGRAMNAMEDPARAMETER4DNVPROC pglProgramNamedParameter4dNV=_Lazy_glProgramNamedParameter4dNV; +PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC pglProgramNamedParameter4fvNV=_Lazy_glProgramNamedParameter4fvNV; +PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC pglProgramNamedParameter4dvNV=_Lazy_glProgramNamedParameter4dvNV; +PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC pglGetProgramNamedParameterfvNV=_Lazy_glGetProgramNamedParameterfvNV; +PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC pglGetProgramNamedParameterdvNV=_Lazy_glGetProgramNamedParameterdvNV; +#endif + +/* GL_NV_half_float */ + +#ifdef __GLEE_GL_NV_half_float +void __stdcall _Lazy_glVertex2hNV(GLhalfNV x, GLhalfNV y) {if (GLeeInit()) glVertex2hNV(x, y);} +void __stdcall _Lazy_glVertex2hvNV(const GLhalfNV * v) {if (GLeeInit()) glVertex2hvNV(v);} +void __stdcall _Lazy_glVertex3hNV(GLhalfNV x, GLhalfNV y, GLhalfNV z) {if (GLeeInit()) glVertex3hNV(x, y, z);} +void __stdcall _Lazy_glVertex3hvNV(const GLhalfNV * v) {if (GLeeInit()) glVertex3hvNV(v);} +void __stdcall _Lazy_glVertex4hNV(GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w) {if (GLeeInit()) glVertex4hNV(x, y, z, w);} +void __stdcall _Lazy_glVertex4hvNV(const GLhalfNV * v) {if (GLeeInit()) glVertex4hvNV(v);} +void __stdcall _Lazy_glNormal3hNV(GLhalfNV nx, GLhalfNV ny, GLhalfNV nz) {if (GLeeInit()) glNormal3hNV(nx, ny, nz);} +void __stdcall _Lazy_glNormal3hvNV(const GLhalfNV * v) {if (GLeeInit()) glNormal3hvNV(v);} +void __stdcall _Lazy_glColor3hNV(GLhalfNV red, GLhalfNV green, GLhalfNV blue) {if (GLeeInit()) glColor3hNV(red, green, blue);} +void __stdcall _Lazy_glColor3hvNV(const GLhalfNV * v) {if (GLeeInit()) glColor3hvNV(v);} +void __stdcall _Lazy_glColor4hNV(GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha) {if (GLeeInit()) glColor4hNV(red, green, blue, alpha);} +void __stdcall _Lazy_glColor4hvNV(const GLhalfNV * v) {if (GLeeInit()) glColor4hvNV(v);} +void __stdcall _Lazy_glTexCoord1hNV(GLhalfNV s) {if (GLeeInit()) glTexCoord1hNV(s);} +void __stdcall _Lazy_glTexCoord1hvNV(const GLhalfNV * v) {if (GLeeInit()) glTexCoord1hvNV(v);} +void __stdcall _Lazy_glTexCoord2hNV(GLhalfNV s, GLhalfNV t) {if (GLeeInit()) glTexCoord2hNV(s, t);} +void __stdcall _Lazy_glTexCoord2hvNV(const GLhalfNV * v) {if (GLeeInit()) glTexCoord2hvNV(v);} +void __stdcall _Lazy_glTexCoord3hNV(GLhalfNV s, GLhalfNV t, GLhalfNV r) {if (GLeeInit()) glTexCoord3hNV(s, t, r);} +void __stdcall _Lazy_glTexCoord3hvNV(const GLhalfNV * v) {if (GLeeInit()) glTexCoord3hvNV(v);} +void __stdcall _Lazy_glTexCoord4hNV(GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q) {if (GLeeInit()) glTexCoord4hNV(s, t, r, q);} +void __stdcall _Lazy_glTexCoord4hvNV(const GLhalfNV * v) {if (GLeeInit()) glTexCoord4hvNV(v);} +void __stdcall _Lazy_glMultiTexCoord1hNV(GLenum target, GLhalfNV s) {if (GLeeInit()) glMultiTexCoord1hNV(target, s);} +void __stdcall _Lazy_glMultiTexCoord1hvNV(GLenum target, const GLhalfNV * v) {if (GLeeInit()) glMultiTexCoord1hvNV(target, v);} +void __stdcall _Lazy_glMultiTexCoord2hNV(GLenum target, GLhalfNV s, GLhalfNV t) {if (GLeeInit()) glMultiTexCoord2hNV(target, s, t);} +void __stdcall _Lazy_glMultiTexCoord2hvNV(GLenum target, const GLhalfNV * v) {if (GLeeInit()) glMultiTexCoord2hvNV(target, v);} +void __stdcall _Lazy_glMultiTexCoord3hNV(GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r) {if (GLeeInit()) glMultiTexCoord3hNV(target, s, t, r);} +void __stdcall _Lazy_glMultiTexCoord3hvNV(GLenum target, const GLhalfNV * v) {if (GLeeInit()) glMultiTexCoord3hvNV(target, v);} +void __stdcall _Lazy_glMultiTexCoord4hNV(GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q) {if (GLeeInit()) glMultiTexCoord4hNV(target, s, t, r, q);} +void __stdcall _Lazy_glMultiTexCoord4hvNV(GLenum target, const GLhalfNV * v) {if (GLeeInit()) glMultiTexCoord4hvNV(target, v);} +void __stdcall _Lazy_glFogCoordhNV(GLhalfNV fog) {if (GLeeInit()) glFogCoordhNV(fog);} +void __stdcall _Lazy_glFogCoordhvNV(const GLhalfNV * fog) {if (GLeeInit()) glFogCoordhvNV(fog);} +void __stdcall _Lazy_glSecondaryColor3hNV(GLhalfNV red, GLhalfNV green, GLhalfNV blue) {if (GLeeInit()) glSecondaryColor3hNV(red, green, blue);} +void __stdcall _Lazy_glSecondaryColor3hvNV(const GLhalfNV * v) {if (GLeeInit()) glSecondaryColor3hvNV(v);} +void __stdcall _Lazy_glVertexWeighthNV(GLhalfNV weight) {if (GLeeInit()) glVertexWeighthNV(weight);} +void __stdcall _Lazy_glVertexWeighthvNV(const GLhalfNV * weight) {if (GLeeInit()) glVertexWeighthvNV(weight);} +void __stdcall _Lazy_glVertexAttrib1hNV(GLuint index, GLhalfNV x) {if (GLeeInit()) glVertexAttrib1hNV(index, x);} +void __stdcall _Lazy_glVertexAttrib1hvNV(GLuint index, const GLhalfNV * v) {if (GLeeInit()) glVertexAttrib1hvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib2hNV(GLuint index, GLhalfNV x, GLhalfNV y) {if (GLeeInit()) glVertexAttrib2hNV(index, x, y);} +void __stdcall _Lazy_glVertexAttrib2hvNV(GLuint index, const GLhalfNV * v) {if (GLeeInit()) glVertexAttrib2hvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib3hNV(GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z) {if (GLeeInit()) glVertexAttrib3hNV(index, x, y, z);} +void __stdcall _Lazy_glVertexAttrib3hvNV(GLuint index, const GLhalfNV * v) {if (GLeeInit()) glVertexAttrib3hvNV(index, v);} +void __stdcall _Lazy_glVertexAttrib4hNV(GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w) {if (GLeeInit()) glVertexAttrib4hNV(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttrib4hvNV(GLuint index, const GLhalfNV * v) {if (GLeeInit()) glVertexAttrib4hvNV(index, v);} +void __stdcall _Lazy_glVertexAttribs1hvNV(GLuint index, GLsizei n, const GLhalfNV * v) {if (GLeeInit()) glVertexAttribs1hvNV(index, n, v);} +void __stdcall _Lazy_glVertexAttribs2hvNV(GLuint index, GLsizei n, const GLhalfNV * v) {if (GLeeInit()) glVertexAttribs2hvNV(index, n, v);} +void __stdcall _Lazy_glVertexAttribs3hvNV(GLuint index, GLsizei n, const GLhalfNV * v) {if (GLeeInit()) glVertexAttribs3hvNV(index, n, v);} +void __stdcall _Lazy_glVertexAttribs4hvNV(GLuint index, GLsizei n, const GLhalfNV * v) {if (GLeeInit()) glVertexAttribs4hvNV(index, n, v);} +PFNGLVERTEX2HNVPROC pglVertex2hNV=_Lazy_glVertex2hNV; +PFNGLVERTEX2HVNVPROC pglVertex2hvNV=_Lazy_glVertex2hvNV; +PFNGLVERTEX3HNVPROC pglVertex3hNV=_Lazy_glVertex3hNV; +PFNGLVERTEX3HVNVPROC pglVertex3hvNV=_Lazy_glVertex3hvNV; +PFNGLVERTEX4HNVPROC pglVertex4hNV=_Lazy_glVertex4hNV; +PFNGLVERTEX4HVNVPROC pglVertex4hvNV=_Lazy_glVertex4hvNV; +PFNGLNORMAL3HNVPROC pglNormal3hNV=_Lazy_glNormal3hNV; +PFNGLNORMAL3HVNVPROC pglNormal3hvNV=_Lazy_glNormal3hvNV; +PFNGLCOLOR3HNVPROC pglColor3hNV=_Lazy_glColor3hNV; +PFNGLCOLOR3HVNVPROC pglColor3hvNV=_Lazy_glColor3hvNV; +PFNGLCOLOR4HNVPROC pglColor4hNV=_Lazy_glColor4hNV; +PFNGLCOLOR4HVNVPROC pglColor4hvNV=_Lazy_glColor4hvNV; +PFNGLTEXCOORD1HNVPROC pglTexCoord1hNV=_Lazy_glTexCoord1hNV; +PFNGLTEXCOORD1HVNVPROC pglTexCoord1hvNV=_Lazy_glTexCoord1hvNV; +PFNGLTEXCOORD2HNVPROC pglTexCoord2hNV=_Lazy_glTexCoord2hNV; +PFNGLTEXCOORD2HVNVPROC pglTexCoord2hvNV=_Lazy_glTexCoord2hvNV; +PFNGLTEXCOORD3HNVPROC pglTexCoord3hNV=_Lazy_glTexCoord3hNV; +PFNGLTEXCOORD3HVNVPROC pglTexCoord3hvNV=_Lazy_glTexCoord3hvNV; +PFNGLTEXCOORD4HNVPROC pglTexCoord4hNV=_Lazy_glTexCoord4hNV; +PFNGLTEXCOORD4HVNVPROC pglTexCoord4hvNV=_Lazy_glTexCoord4hvNV; +PFNGLMULTITEXCOORD1HNVPROC pglMultiTexCoord1hNV=_Lazy_glMultiTexCoord1hNV; +PFNGLMULTITEXCOORD1HVNVPROC pglMultiTexCoord1hvNV=_Lazy_glMultiTexCoord1hvNV; +PFNGLMULTITEXCOORD2HNVPROC pglMultiTexCoord2hNV=_Lazy_glMultiTexCoord2hNV; +PFNGLMULTITEXCOORD2HVNVPROC pglMultiTexCoord2hvNV=_Lazy_glMultiTexCoord2hvNV; +PFNGLMULTITEXCOORD3HNVPROC pglMultiTexCoord3hNV=_Lazy_glMultiTexCoord3hNV; +PFNGLMULTITEXCOORD3HVNVPROC pglMultiTexCoord3hvNV=_Lazy_glMultiTexCoord3hvNV; +PFNGLMULTITEXCOORD4HNVPROC pglMultiTexCoord4hNV=_Lazy_glMultiTexCoord4hNV; +PFNGLMULTITEXCOORD4HVNVPROC pglMultiTexCoord4hvNV=_Lazy_glMultiTexCoord4hvNV; +PFNGLFOGCOORDHNVPROC pglFogCoordhNV=_Lazy_glFogCoordhNV; +PFNGLFOGCOORDHVNVPROC pglFogCoordhvNV=_Lazy_glFogCoordhvNV; +PFNGLSECONDARYCOLOR3HNVPROC pglSecondaryColor3hNV=_Lazy_glSecondaryColor3hNV; +PFNGLSECONDARYCOLOR3HVNVPROC pglSecondaryColor3hvNV=_Lazy_glSecondaryColor3hvNV; +PFNGLVERTEXWEIGHTHNVPROC pglVertexWeighthNV=_Lazy_glVertexWeighthNV; +PFNGLVERTEXWEIGHTHVNVPROC pglVertexWeighthvNV=_Lazy_glVertexWeighthvNV; +PFNGLVERTEXATTRIB1HNVPROC pglVertexAttrib1hNV=_Lazy_glVertexAttrib1hNV; +PFNGLVERTEXATTRIB1HVNVPROC pglVertexAttrib1hvNV=_Lazy_glVertexAttrib1hvNV; +PFNGLVERTEXATTRIB2HNVPROC pglVertexAttrib2hNV=_Lazy_glVertexAttrib2hNV; +PFNGLVERTEXATTRIB2HVNVPROC pglVertexAttrib2hvNV=_Lazy_glVertexAttrib2hvNV; +PFNGLVERTEXATTRIB3HNVPROC pglVertexAttrib3hNV=_Lazy_glVertexAttrib3hNV; +PFNGLVERTEXATTRIB3HVNVPROC pglVertexAttrib3hvNV=_Lazy_glVertexAttrib3hvNV; +PFNGLVERTEXATTRIB4HNVPROC pglVertexAttrib4hNV=_Lazy_glVertexAttrib4hNV; +PFNGLVERTEXATTRIB4HVNVPROC pglVertexAttrib4hvNV=_Lazy_glVertexAttrib4hvNV; +PFNGLVERTEXATTRIBS1HVNVPROC pglVertexAttribs1hvNV=_Lazy_glVertexAttribs1hvNV; +PFNGLVERTEXATTRIBS2HVNVPROC pglVertexAttribs2hvNV=_Lazy_glVertexAttribs2hvNV; +PFNGLVERTEXATTRIBS3HVNVPROC pglVertexAttribs3hvNV=_Lazy_glVertexAttribs3hvNV; +PFNGLVERTEXATTRIBS4HVNVPROC pglVertexAttribs4hvNV=_Lazy_glVertexAttribs4hvNV; +#endif + +/* GL_NV_pixel_data_range */ + +#ifdef __GLEE_GL_NV_pixel_data_range +void __stdcall _Lazy_glPixelDataRangeNV(GLenum target, GLsizei length, GLvoid * pointer) {if (GLeeInit()) glPixelDataRangeNV(target, length, pointer);} +void __stdcall _Lazy_glFlushPixelDataRangeNV(GLenum target) {if (GLeeInit()) glFlushPixelDataRangeNV(target);} +PFNGLPIXELDATARANGENVPROC pglPixelDataRangeNV=_Lazy_glPixelDataRangeNV; +PFNGLFLUSHPIXELDATARANGENVPROC pglFlushPixelDataRangeNV=_Lazy_glFlushPixelDataRangeNV; +#endif + +/* GL_NV_primitive_restart */ + +#ifdef __GLEE_GL_NV_primitive_restart +void __stdcall _Lazy_glPrimitiveRestartNV(void) {if (GLeeInit()) glPrimitiveRestartNV();} +void __stdcall _Lazy_glPrimitiveRestartIndexNV(GLuint index) {if (GLeeInit()) glPrimitiveRestartIndexNV(index);} +PFNGLPRIMITIVERESTARTNVPROC pglPrimitiveRestartNV=_Lazy_glPrimitiveRestartNV; +PFNGLPRIMITIVERESTARTINDEXNVPROC pglPrimitiveRestartIndexNV=_Lazy_glPrimitiveRestartIndexNV; +#endif + +/* GL_NV_texture_expand_normal */ + +#ifdef __GLEE_GL_NV_texture_expand_normal +#endif + +/* GL_NV_vertex_program2 */ + +#ifdef __GLEE_GL_NV_vertex_program2 +#endif + +/* GL_ATI_map_object_buffer */ + +#ifdef __GLEE_GL_ATI_map_object_buffer +GLvoid* __stdcall _Lazy_glMapObjectBufferATI(GLuint buffer) {if (GLeeInit()) return glMapObjectBufferATI(buffer); return (GLvoid*)0;} +void __stdcall _Lazy_glUnmapObjectBufferATI(GLuint buffer) {if (GLeeInit()) glUnmapObjectBufferATI(buffer);} +PFNGLMAPOBJECTBUFFERATIPROC pglMapObjectBufferATI=_Lazy_glMapObjectBufferATI; +PFNGLUNMAPOBJECTBUFFERATIPROC pglUnmapObjectBufferATI=_Lazy_glUnmapObjectBufferATI; +#endif + +/* GL_ATI_separate_stencil */ + +#ifdef __GLEE_GL_ATI_separate_stencil +void __stdcall _Lazy_glStencilOpSeparateATI(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) {if (GLeeInit()) glStencilOpSeparateATI(face, sfail, dpfail, dppass);} +void __stdcall _Lazy_glStencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) {if (GLeeInit()) glStencilFuncSeparateATI(frontfunc, backfunc, ref, mask);} +PFNGLSTENCILOPSEPARATEATIPROC pglStencilOpSeparateATI=_Lazy_glStencilOpSeparateATI; +PFNGLSTENCILFUNCSEPARATEATIPROC pglStencilFuncSeparateATI=_Lazy_glStencilFuncSeparateATI; +#endif + +/* GL_ATI_vertex_attrib_array_object */ + +#ifdef __GLEE_GL_ATI_vertex_attrib_array_object +void __stdcall _Lazy_glVertexAttribArrayObjectATI(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset) {if (GLeeInit()) glVertexAttribArrayObjectATI(index, size, type, normalized, stride, buffer, offset);} +void __stdcall _Lazy_glGetVertexAttribArrayObjectfvATI(GLuint index, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetVertexAttribArrayObjectfvATI(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribArrayObjectivATI(GLuint index, GLenum pname, GLint * params) {if (GLeeInit()) glGetVertexAttribArrayObjectivATI(index, pname, params);} +PFNGLVERTEXATTRIBARRAYOBJECTATIPROC pglVertexAttribArrayObjectATI=_Lazy_glVertexAttribArrayObjectATI; +PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC pglGetVertexAttribArrayObjectfvATI=_Lazy_glGetVertexAttribArrayObjectfvATI; +PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC pglGetVertexAttribArrayObjectivATI=_Lazy_glGetVertexAttribArrayObjectivATI; +#endif + +/* GL_OES_read_format */ + +#ifdef __GLEE_GL_OES_read_format +#endif + +/* GL_EXT_depth_bounds_test */ + +#ifdef __GLEE_GL_EXT_depth_bounds_test +void __stdcall _Lazy_glDepthBoundsEXT(GLclampd zmin, GLclampd zmax) {if (GLeeInit()) glDepthBoundsEXT(zmin, zmax);} +PFNGLDEPTHBOUNDSEXTPROC pglDepthBoundsEXT=_Lazy_glDepthBoundsEXT; +#endif + +/* GL_EXT_texture_mirror_clamp */ + +#ifdef __GLEE_GL_EXT_texture_mirror_clamp +#endif + +/* GL_EXT_blend_equation_separate */ + +#ifdef __GLEE_GL_EXT_blend_equation_separate +void __stdcall _Lazy_glBlendEquationSeparateEXT(GLenum modeRGB, GLenum modeAlpha) {if (GLeeInit()) glBlendEquationSeparateEXT(modeRGB, modeAlpha);} +PFNGLBLENDEQUATIONSEPARATEEXTPROC pglBlendEquationSeparateEXT=_Lazy_glBlendEquationSeparateEXT; +#endif + +/* GL_MESA_pack_invert */ + +#ifdef __GLEE_GL_MESA_pack_invert +#endif + +/* GL_MESA_ycbcr_texture */ + +#ifdef __GLEE_GL_MESA_ycbcr_texture +#endif + +/* GL_EXT_pixel_buffer_object */ + +#ifdef __GLEE_GL_EXT_pixel_buffer_object +#endif + +/* GL_NV_fragment_program_option */ + +#ifdef __GLEE_GL_NV_fragment_program_option +#endif + +/* GL_NV_fragment_program2 */ + +#ifdef __GLEE_GL_NV_fragment_program2 +#endif + +/* GL_NV_vertex_program2_option */ + +#ifdef __GLEE_GL_NV_vertex_program2_option +#endif + +/* GL_NV_vertex_program3 */ + +#ifdef __GLEE_GL_NV_vertex_program3 +#endif + +/* GL_EXT_framebuffer_object */ + +#ifdef __GLEE_GL_EXT_framebuffer_object +GLboolean __stdcall _Lazy_glIsRenderbufferEXT(GLuint renderbuffer) {if (GLeeInit()) return glIsRenderbufferEXT(renderbuffer); return (GLboolean)0;} +void __stdcall _Lazy_glBindRenderbufferEXT(GLenum target, GLuint renderbuffer) {if (GLeeInit()) glBindRenderbufferEXT(target, renderbuffer);} +void __stdcall _Lazy_glDeleteRenderbuffersEXT(GLsizei n, const GLuint * renderbuffers) {if (GLeeInit()) glDeleteRenderbuffersEXT(n, renderbuffers);} +void __stdcall _Lazy_glGenRenderbuffersEXT(GLsizei n, GLuint * renderbuffers) {if (GLeeInit()) glGenRenderbuffersEXT(n, renderbuffers);} +void __stdcall _Lazy_glRenderbufferStorageEXT(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {if (GLeeInit()) glRenderbufferStorageEXT(target, internalformat, width, height);} +void __stdcall _Lazy_glGetRenderbufferParameterivEXT(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetRenderbufferParameterivEXT(target, pname, params);} +GLboolean __stdcall _Lazy_glIsFramebufferEXT(GLuint framebuffer) {if (GLeeInit()) return glIsFramebufferEXT(framebuffer); return (GLboolean)0;} +void __stdcall _Lazy_glBindFramebufferEXT(GLenum target, GLuint framebuffer) {if (GLeeInit()) glBindFramebufferEXT(target, framebuffer);} +void __stdcall _Lazy_glDeleteFramebuffersEXT(GLsizei n, const GLuint * framebuffers) {if (GLeeInit()) glDeleteFramebuffersEXT(n, framebuffers);} +void __stdcall _Lazy_glGenFramebuffersEXT(GLsizei n, GLuint * framebuffers) {if (GLeeInit()) glGenFramebuffersEXT(n, framebuffers);} +GLenum __stdcall _Lazy_glCheckFramebufferStatusEXT(GLenum target) {if (GLeeInit()) return glCheckFramebufferStatusEXT(target); return (GLenum)0;} +void __stdcall _Lazy_glFramebufferTexture1DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {if (GLeeInit()) glFramebufferTexture1DEXT(target, attachment, textarget, texture, level);} +void __stdcall _Lazy_glFramebufferTexture2DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {if (GLeeInit()) glFramebufferTexture2DEXT(target, attachment, textarget, texture, level);} +void __stdcall _Lazy_glFramebufferTexture3DEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) {if (GLeeInit()) glFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset);} +void __stdcall _Lazy_glFramebufferRenderbufferEXT(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {if (GLeeInit()) glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer);} +void __stdcall _Lazy_glGetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment, GLenum pname, GLint * params) {if (GLeeInit()) glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params);} +void __stdcall _Lazy_glGenerateMipmapEXT(GLenum target) {if (GLeeInit()) glGenerateMipmapEXT(target);} +PFNGLISRENDERBUFFEREXTPROC pglIsRenderbufferEXT=_Lazy_glIsRenderbufferEXT; +PFNGLBINDRENDERBUFFEREXTPROC pglBindRenderbufferEXT=_Lazy_glBindRenderbufferEXT; +PFNGLDELETERENDERBUFFERSEXTPROC pglDeleteRenderbuffersEXT=_Lazy_glDeleteRenderbuffersEXT; +PFNGLGENRENDERBUFFERSEXTPROC pglGenRenderbuffersEXT=_Lazy_glGenRenderbuffersEXT; +PFNGLRENDERBUFFERSTORAGEEXTPROC pglRenderbufferStorageEXT=_Lazy_glRenderbufferStorageEXT; +PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC pglGetRenderbufferParameterivEXT=_Lazy_glGetRenderbufferParameterivEXT; +PFNGLISFRAMEBUFFEREXTPROC pglIsFramebufferEXT=_Lazy_glIsFramebufferEXT; +PFNGLBINDFRAMEBUFFEREXTPROC pglBindFramebufferEXT=_Lazy_glBindFramebufferEXT; +PFNGLDELETEFRAMEBUFFERSEXTPROC pglDeleteFramebuffersEXT=_Lazy_glDeleteFramebuffersEXT; +PFNGLGENFRAMEBUFFERSEXTPROC pglGenFramebuffersEXT=_Lazy_glGenFramebuffersEXT; +PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC pglCheckFramebufferStatusEXT=_Lazy_glCheckFramebufferStatusEXT; +PFNGLFRAMEBUFFERTEXTURE1DEXTPROC pglFramebufferTexture1DEXT=_Lazy_glFramebufferTexture1DEXT; +PFNGLFRAMEBUFFERTEXTURE2DEXTPROC pglFramebufferTexture2DEXT=_Lazy_glFramebufferTexture2DEXT; +PFNGLFRAMEBUFFERTEXTURE3DEXTPROC pglFramebufferTexture3DEXT=_Lazy_glFramebufferTexture3DEXT; +PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC pglFramebufferRenderbufferEXT=_Lazy_glFramebufferRenderbufferEXT; +PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC pglGetFramebufferAttachmentParameterivEXT=_Lazy_glGetFramebufferAttachmentParameterivEXT; +PFNGLGENERATEMIPMAPEXTPROC pglGenerateMipmapEXT=_Lazy_glGenerateMipmapEXT; +#endif + +/* GL_GREMEDY_string_marker */ + +#ifdef __GLEE_GL_GREMEDY_string_marker +void __stdcall _Lazy_glStringMarkerGREMEDY(GLsizei len, const GLvoid * string) {if (GLeeInit()) glStringMarkerGREMEDY(len, string);} +PFNGLSTRINGMARKERGREMEDYPROC pglStringMarkerGREMEDY=_Lazy_glStringMarkerGREMEDY; +#endif + +/* GL_EXT_Cg_shader */ + +#ifdef __GLEE_GL_EXT_Cg_shader +#endif + +/* GL_EXT_timer_query */ + +#ifdef __GLEE_GL_EXT_timer_query +void __stdcall _Lazy_glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64EXT * params) {if (GLeeInit()) glGetQueryObjecti64vEXT(id, pname, params);} +void __stdcall _Lazy_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64EXT * params) {if (GLeeInit()) glGetQueryObjectui64vEXT(id, pname, params);} +PFNGLGETQUERYOBJECTI64VEXTPROC pglGetQueryObjecti64vEXT=_Lazy_glGetQueryObjecti64vEXT; +PFNGLGETQUERYOBJECTUI64VEXTPROC pglGetQueryObjectui64vEXT=_Lazy_glGetQueryObjectui64vEXT; +#endif + +/* GL_EXT_texture_buffer_object */ + +#ifdef __GLEE_GL_EXT_texture_buffer_object +void __stdcall _Lazy_glTexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer) {if (GLeeInit()) glTexBufferEXT(target, internalformat, buffer);} +PFNGLTEXBUFFEREXTPROC pglTexBufferEXT=_Lazy_glTexBufferEXT; +#endif + +/* GL_EXT_gpu_shader4 */ + +#ifdef __GLEE_GL_EXT_gpu_shader4 +void __stdcall _Lazy_glGetUniformuivEXT(GLuint program, GLint location, GLuint * params) {if (GLeeInit()) glGetUniformuivEXT(program, location, params);} +void __stdcall _Lazy_glBindFragDataLocationEXT(GLuint program, GLuint color, const GLchar * name) {if (GLeeInit()) glBindFragDataLocationEXT(program, color, name);} +GLint __stdcall _Lazy_glGetFragDataLocationEXT(GLuint program, const GLchar * name) {if (GLeeInit()) return glGetFragDataLocationEXT(program, name); return (GLint)0;} +void __stdcall _Lazy_glUniform1uiEXT(GLint location, GLuint v0) {if (GLeeInit()) glUniform1uiEXT(location, v0);} +void __stdcall _Lazy_glUniform2uiEXT(GLint location, GLuint v0, GLuint v1) {if (GLeeInit()) glUniform2uiEXT(location, v0, v1);} +void __stdcall _Lazy_glUniform3uiEXT(GLint location, GLuint v0, GLuint v1, GLuint v2) {if (GLeeInit()) glUniform3uiEXT(location, v0, v1, v2);} +void __stdcall _Lazy_glUniform4uiEXT(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) {if (GLeeInit()) glUniform4uiEXT(location, v0, v1, v2, v3);} +void __stdcall _Lazy_glUniform1uivEXT(GLint location, GLsizei count, const GLuint * value) {if (GLeeInit()) glUniform1uivEXT(location, count, value);} +void __stdcall _Lazy_glUniform2uivEXT(GLint location, GLsizei count, const GLuint * value) {if (GLeeInit()) glUniform2uivEXT(location, count, value);} +void __stdcall _Lazy_glUniform3uivEXT(GLint location, GLsizei count, const GLuint * value) {if (GLeeInit()) glUniform3uivEXT(location, count, value);} +void __stdcall _Lazy_glUniform4uivEXT(GLint location, GLsizei count, const GLuint * value) {if (GLeeInit()) glUniform4uivEXT(location, count, value);} +void __stdcall _Lazy_glVertexAttribI1iEXT(GLuint index, GLint x) {if (GLeeInit()) glVertexAttribI1iEXT(index, x);} +void __stdcall _Lazy_glVertexAttribI2iEXT(GLuint index, GLint x, GLint y) {if (GLeeInit()) glVertexAttribI2iEXT(index, x, y);} +void __stdcall _Lazy_glVertexAttribI3iEXT(GLuint index, GLint x, GLint y, GLint z) {if (GLeeInit()) glVertexAttribI3iEXT(index, x, y, z);} +void __stdcall _Lazy_glVertexAttribI4iEXT(GLuint index, GLint x, GLint y, GLint z, GLint w) {if (GLeeInit()) glVertexAttribI4iEXT(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttribI1uiEXT(GLuint index, GLuint x) {if (GLeeInit()) glVertexAttribI1uiEXT(index, x);} +void __stdcall _Lazy_glVertexAttribI2uiEXT(GLuint index, GLuint x, GLuint y) {if (GLeeInit()) glVertexAttribI2uiEXT(index, x, y);} +void __stdcall _Lazy_glVertexAttribI3uiEXT(GLuint index, GLuint x, GLuint y, GLuint z) {if (GLeeInit()) glVertexAttribI3uiEXT(index, x, y, z);} +void __stdcall _Lazy_glVertexAttribI4uiEXT(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) {if (GLeeInit()) glVertexAttribI4uiEXT(index, x, y, z, w);} +void __stdcall _Lazy_glVertexAttribI1ivEXT(GLuint index, const GLint * v) {if (GLeeInit()) glVertexAttribI1ivEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI2ivEXT(GLuint index, const GLint * v) {if (GLeeInit()) glVertexAttribI2ivEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI3ivEXT(GLuint index, const GLint * v) {if (GLeeInit()) glVertexAttribI3ivEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI4ivEXT(GLuint index, const GLint * v) {if (GLeeInit()) glVertexAttribI4ivEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI1uivEXT(GLuint index, const GLuint * v) {if (GLeeInit()) glVertexAttribI1uivEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI2uivEXT(GLuint index, const GLuint * v) {if (GLeeInit()) glVertexAttribI2uivEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI3uivEXT(GLuint index, const GLuint * v) {if (GLeeInit()) glVertexAttribI3uivEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI4uivEXT(GLuint index, const GLuint * v) {if (GLeeInit()) glVertexAttribI4uivEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI4bvEXT(GLuint index, const GLbyte * v) {if (GLeeInit()) glVertexAttribI4bvEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI4svEXT(GLuint index, const GLshort * v) {if (GLeeInit()) glVertexAttribI4svEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI4ubvEXT(GLuint index, const GLubyte * v) {if (GLeeInit()) glVertexAttribI4ubvEXT(index, v);} +void __stdcall _Lazy_glVertexAttribI4usvEXT(GLuint index, const GLushort * v) {if (GLeeInit()) glVertexAttribI4usvEXT(index, v);} +void __stdcall _Lazy_glVertexAttribIPointerEXT(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer) {if (GLeeInit()) glVertexAttribIPointerEXT(index, size, type, stride, pointer);} +void __stdcall _Lazy_glGetVertexAttribIivEXT(GLuint index, GLenum pname, GLint * params) {if (GLeeInit()) glGetVertexAttribIivEXT(index, pname, params);} +void __stdcall _Lazy_glGetVertexAttribIuivEXT(GLuint index, GLenum pname, GLuint * params) {if (GLeeInit()) glGetVertexAttribIuivEXT(index, pname, params);} +PFNGLGETUNIFORMUIVEXTPROC pglGetUniformuivEXT=_Lazy_glGetUniformuivEXT; +PFNGLBINDFRAGDATALOCATIONEXTPROC pglBindFragDataLocationEXT=_Lazy_glBindFragDataLocationEXT; +PFNGLGETFRAGDATALOCATIONEXTPROC pglGetFragDataLocationEXT=_Lazy_glGetFragDataLocationEXT; +PFNGLUNIFORM1UIEXTPROC pglUniform1uiEXT=_Lazy_glUniform1uiEXT; +PFNGLUNIFORM2UIEXTPROC pglUniform2uiEXT=_Lazy_glUniform2uiEXT; +PFNGLUNIFORM3UIEXTPROC pglUniform3uiEXT=_Lazy_glUniform3uiEXT; +PFNGLUNIFORM4UIEXTPROC pglUniform4uiEXT=_Lazy_glUniform4uiEXT; +PFNGLUNIFORM1UIVEXTPROC pglUniform1uivEXT=_Lazy_glUniform1uivEXT; +PFNGLUNIFORM2UIVEXTPROC pglUniform2uivEXT=_Lazy_glUniform2uivEXT; +PFNGLUNIFORM3UIVEXTPROC pglUniform3uivEXT=_Lazy_glUniform3uivEXT; +PFNGLUNIFORM4UIVEXTPROC pglUniform4uivEXT=_Lazy_glUniform4uivEXT; +PFNGLVERTEXATTRIBI1IEXTPROC pglVertexAttribI1iEXT=_Lazy_glVertexAttribI1iEXT; +PFNGLVERTEXATTRIBI2IEXTPROC pglVertexAttribI2iEXT=_Lazy_glVertexAttribI2iEXT; +PFNGLVERTEXATTRIBI3IEXTPROC pglVertexAttribI3iEXT=_Lazy_glVertexAttribI3iEXT; +PFNGLVERTEXATTRIBI4IEXTPROC pglVertexAttribI4iEXT=_Lazy_glVertexAttribI4iEXT; +PFNGLVERTEXATTRIBI1UIEXTPROC pglVertexAttribI1uiEXT=_Lazy_glVertexAttribI1uiEXT; +PFNGLVERTEXATTRIBI2UIEXTPROC pglVertexAttribI2uiEXT=_Lazy_glVertexAttribI2uiEXT; +PFNGLVERTEXATTRIBI3UIEXTPROC pglVertexAttribI3uiEXT=_Lazy_glVertexAttribI3uiEXT; +PFNGLVERTEXATTRIBI4UIEXTPROC pglVertexAttribI4uiEXT=_Lazy_glVertexAttribI4uiEXT; +PFNGLVERTEXATTRIBI1IVEXTPROC pglVertexAttribI1ivEXT=_Lazy_glVertexAttribI1ivEXT; +PFNGLVERTEXATTRIBI2IVEXTPROC pglVertexAttribI2ivEXT=_Lazy_glVertexAttribI2ivEXT; +PFNGLVERTEXATTRIBI3IVEXTPROC pglVertexAttribI3ivEXT=_Lazy_glVertexAttribI3ivEXT; +PFNGLVERTEXATTRIBI4IVEXTPROC pglVertexAttribI4ivEXT=_Lazy_glVertexAttribI4ivEXT; +PFNGLVERTEXATTRIBI1UIVEXTPROC pglVertexAttribI1uivEXT=_Lazy_glVertexAttribI1uivEXT; +PFNGLVERTEXATTRIBI2UIVEXTPROC pglVertexAttribI2uivEXT=_Lazy_glVertexAttribI2uivEXT; +PFNGLVERTEXATTRIBI3UIVEXTPROC pglVertexAttribI3uivEXT=_Lazy_glVertexAttribI3uivEXT; +PFNGLVERTEXATTRIBI4UIVEXTPROC pglVertexAttribI4uivEXT=_Lazy_glVertexAttribI4uivEXT; +PFNGLVERTEXATTRIBI4BVEXTPROC pglVertexAttribI4bvEXT=_Lazy_glVertexAttribI4bvEXT; +PFNGLVERTEXATTRIBI4SVEXTPROC pglVertexAttribI4svEXT=_Lazy_glVertexAttribI4svEXT; +PFNGLVERTEXATTRIBI4UBVEXTPROC pglVertexAttribI4ubvEXT=_Lazy_glVertexAttribI4ubvEXT; +PFNGLVERTEXATTRIBI4USVEXTPROC pglVertexAttribI4usvEXT=_Lazy_glVertexAttribI4usvEXT; +PFNGLVERTEXATTRIBIPOINTEREXTPROC pglVertexAttribIPointerEXT=_Lazy_glVertexAttribIPointerEXT; +PFNGLGETVERTEXATTRIBIIVEXTPROC pglGetVertexAttribIivEXT=_Lazy_glGetVertexAttribIivEXT; +PFNGLGETVERTEXATTRIBIUIVEXTPROC pglGetVertexAttribIuivEXT=_Lazy_glGetVertexAttribIuivEXT; +#endif + +/* GL_EXT_geometry_shader4 */ + +#ifdef __GLEE_GL_EXT_geometry_shader4 +void __stdcall _Lazy_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) {if (GLeeInit()) glProgramParameteriEXT(program, pname, value);} +void __stdcall _Lazy_glFramebufferTextureEXT(GLenum target, GLenum attachment, GLuint texture, GLint level) {if (GLeeInit()) glFramebufferTextureEXT(target, attachment, texture, level);} +void __stdcall _Lazy_glFramebufferTextureLayerEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) {if (GLeeInit()) glFramebufferTextureLayerEXT(target, attachment, texture, level, layer);} +void __stdcall _Lazy_glFramebufferTextureFaceEXT(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face) {if (GLeeInit()) glFramebufferTextureFaceEXT(target, attachment, texture, level, face);} +PFNGLPROGRAMPARAMETERIEXTPROC pglProgramParameteriEXT=_Lazy_glProgramParameteriEXT; +PFNGLFRAMEBUFFERTEXTUREEXTPROC pglFramebufferTextureEXT=_Lazy_glFramebufferTextureEXT; +PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC pglFramebufferTextureLayerEXT=_Lazy_glFramebufferTextureLayerEXT; +PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC pglFramebufferTextureFaceEXT=_Lazy_glFramebufferTextureFaceEXT; +#endif + +/* GL_EXT_bindable_uniform */ + +#ifdef __GLEE_GL_EXT_bindable_uniform +void __stdcall _Lazy_glUniformBufferEXT(GLuint program, GLint location, GLuint buffer) {if (GLeeInit()) glUniformBufferEXT(program, location, buffer);} +GLint __stdcall _Lazy_glGetUniformBufferSizeEXT(GLuint program, GLint location) {if (GLeeInit()) return glGetUniformBufferSizeEXT(program, location); return (GLint)0;} +GLintptr __stdcall _Lazy_glGetUniformOffsetEXT(GLuint program, GLint location) {if (GLeeInit()) return glGetUniformOffsetEXT(program, location); return (GLintptr)0;} +PFNGLUNIFORMBUFFEREXTPROC pglUniformBufferEXT=_Lazy_glUniformBufferEXT; +PFNGLGETUNIFORMBUFFERSIZEEXTPROC pglGetUniformBufferSizeEXT=_Lazy_glGetUniformBufferSizeEXT; +PFNGLGETUNIFORMOFFSETEXTPROC pglGetUniformOffsetEXT=_Lazy_glGetUniformOffsetEXT; +#endif + +/* GL_EXT_framebuffer_sRGB */ + +#ifdef __GLEE_GL_EXT_framebuffer_sRGB +#endif + +/* GL_EXT_texture_shared_exponent */ + +#ifdef __GLEE_GL_EXT_texture_shared_exponent +#endif + +/* GL_EXT_packed_float */ + +#ifdef __GLEE_GL_EXT_packed_float +#endif + +/* GL_EXT_texture_array */ + +#ifdef __GLEE_GL_EXT_texture_array +#endif + +/* GL_EXT_texture_integer */ + +#ifdef __GLEE_GL_EXT_texture_integer +void __stdcall _Lazy_glTexParameterIivEXT(GLenum target, GLenum pname, const GLint * params) {if (GLeeInit()) glTexParameterIivEXT(target, pname, params);} +void __stdcall _Lazy_glTexParameterIuivEXT(GLenum target, GLenum pname, const GLuint * params) {if (GLeeInit()) glTexParameterIuivEXT(target, pname, params);} +void __stdcall _Lazy_glGetTexParameterIivEXT(GLenum target, GLenum pname, GLint * params) {if (GLeeInit()) glGetTexParameterIivEXT(target, pname, params);} +void __stdcall _Lazy_glGetTexParameterIuivEXT(GLenum target, GLenum pname, GLuint * params) {if (GLeeInit()) glGetTexParameterIuivEXT(target, pname, params);} +void __stdcall _Lazy_glClearColorIiEXT(GLint red, GLint green, GLint blue, GLint alpha) {if (GLeeInit()) glClearColorIiEXT(red, green, blue, alpha);} +void __stdcall _Lazy_glClearColorIuiEXT(GLuint red, GLuint green, GLuint blue, GLuint alpha) {if (GLeeInit()) glClearColorIuiEXT(red, green, blue, alpha);} +PFNGLTEXPARAMETERIIVEXTPROC pglTexParameterIivEXT=_Lazy_glTexParameterIivEXT; +PFNGLTEXPARAMETERIUIVEXTPROC pglTexParameterIuivEXT=_Lazy_glTexParameterIuivEXT; +PFNGLGETTEXPARAMETERIIVEXTPROC pglGetTexParameterIivEXT=_Lazy_glGetTexParameterIivEXT; +PFNGLGETTEXPARAMETERIUIVEXTPROC pglGetTexParameterIuivEXT=_Lazy_glGetTexParameterIuivEXT; +PFNGLCLEARCOLORIIEXTPROC pglClearColorIiEXT=_Lazy_glClearColorIiEXT; +PFNGLCLEARCOLORIUIEXTPROC pglClearColorIuiEXT=_Lazy_glClearColorIuiEXT; +#endif + +/* GL_NV_depth_buffer_float */ + +#ifdef __GLEE_GL_NV_depth_buffer_float +void __stdcall _Lazy_glDepthRangedNV(GLdouble zNear, GLdouble zFar) {if (GLeeInit()) glDepthRangedNV(zNear, zFar);} +void __stdcall _Lazy_glClearDepthdNV(GLdouble depth) {if (GLeeInit()) glClearDepthdNV(depth);} +void __stdcall _Lazy_glDepthBoundsdNV(GLdouble zmin, GLdouble zmax) {if (GLeeInit()) glDepthBoundsdNV(zmin, zmax);} +PFNGLDEPTHRANGEDNVPROC pglDepthRangedNV=_Lazy_glDepthRangedNV; +PFNGLCLEARDEPTHDNVPROC pglClearDepthdNV=_Lazy_glClearDepthdNV; +PFNGLDEPTHBOUNDSDNVPROC pglDepthBoundsdNV=_Lazy_glDepthBoundsdNV; +#endif + +/* GL_EXT_texture_compression_latc */ + +#ifdef __GLEE_GL_EXT_texture_compression_latc +#endif + +/* GL_NV_transform_feedback */ + +#ifdef __GLEE_GL_NV_transform_feedback +void __stdcall _Lazy_glBeginTransformFeedbackNV(GLenum primitiveMode) {if (GLeeInit()) glBeginTransformFeedbackNV(primitiveMode);} +void __stdcall _Lazy_glEndTransformFeedbackNV(void) {if (GLeeInit()) glEndTransformFeedbackNV();} +void __stdcall _Lazy_glTransformFeedbackAttribsNV(GLuint count, const GLint * attribs, GLenum bufferMode) {if (GLeeInit()) glTransformFeedbackAttribsNV(count, attribs, bufferMode);} +void __stdcall _Lazy_glBindBufferRangeNV(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) {if (GLeeInit()) glBindBufferRangeNV(target, index, buffer, offset, size);} +void __stdcall _Lazy_glBindBufferOffsetNV(GLenum target, GLuint index, GLuint buffer, GLintptr offset) {if (GLeeInit()) glBindBufferOffsetNV(target, index, buffer, offset);} +void __stdcall _Lazy_glBindBufferBaseNV(GLenum target, GLuint index, GLuint buffer) {if (GLeeInit()) glBindBufferBaseNV(target, index, buffer);} +void __stdcall _Lazy_glTransformFeedbackVaryingsNV(GLuint program, GLsizei count, const GLint * locations, GLenum bufferMode) {if (GLeeInit()) glTransformFeedbackVaryingsNV(program, count, locations, bufferMode);} +void __stdcall _Lazy_glActiveVaryingNV(GLuint program, const GLchar * name) {if (GLeeInit()) glActiveVaryingNV(program, name);} +GLint __stdcall _Lazy_glGetVaryingLocationNV(GLuint program, const GLchar * name) {if (GLeeInit()) return glGetVaryingLocationNV(program, name); return (GLint)0;} +void __stdcall _Lazy_glGetActiveVaryingNV(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name) {if (GLeeInit()) glGetActiveVaryingNV(program, index, bufSize, length, size, type, name);} +void __stdcall _Lazy_glGetTransformFeedbackVaryingNV(GLuint program, GLuint index, GLint * location) {if (GLeeInit()) glGetTransformFeedbackVaryingNV(program, index, location);} +PFNGLBEGINTRANSFORMFEEDBACKNVPROC pglBeginTransformFeedbackNV=_Lazy_glBeginTransformFeedbackNV; +PFNGLENDTRANSFORMFEEDBACKNVPROC pglEndTransformFeedbackNV=_Lazy_glEndTransformFeedbackNV; +PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC pglTransformFeedbackAttribsNV=_Lazy_glTransformFeedbackAttribsNV; +PFNGLBINDBUFFERRANGENVPROC pglBindBufferRangeNV=_Lazy_glBindBufferRangeNV; +PFNGLBINDBUFFEROFFSETNVPROC pglBindBufferOffsetNV=_Lazy_glBindBufferOffsetNV; +PFNGLBINDBUFFERBASENVPROC pglBindBufferBaseNV=_Lazy_glBindBufferBaseNV; +PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC pglTransformFeedbackVaryingsNV=_Lazy_glTransformFeedbackVaryingsNV; +PFNGLACTIVEVARYINGNVPROC pglActiveVaryingNV=_Lazy_glActiveVaryingNV; +PFNGLGETVARYINGLOCATIONNVPROC pglGetVaryingLocationNV=_Lazy_glGetVaryingLocationNV; +PFNGLGETACTIVEVARYINGNVPROC pglGetActiveVaryingNV=_Lazy_glGetActiveVaryingNV; +PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC pglGetTransformFeedbackVaryingNV=_Lazy_glGetTransformFeedbackVaryingNV; +#endif + +/* GL_NV_geometry_program4 */ + +#ifdef __GLEE_GL_NV_geometry_program4 +void __stdcall _Lazy_glProgramVertexLimitNV(GLenum target, GLint limit) {if (GLeeInit()) glProgramVertexLimitNV(target, limit);} +PFNGLPROGRAMVERTEXLIMITNVPROC pglProgramVertexLimitNV=_Lazy_glProgramVertexLimitNV; +#endif + +/* GL_NV_gpu_program4 */ + +#ifdef __GLEE_GL_NV_gpu_program4 +void __stdcall _Lazy_glProgramLocalParameterI4iNV(GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w) {if (GLeeInit()) glProgramLocalParameterI4iNV(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramLocalParameterI4ivNV(GLenum target, GLuint index, const GLint * params) {if (GLeeInit()) glProgramLocalParameterI4ivNV(target, index, params);} +void __stdcall _Lazy_glProgramLocalParametersI4ivNV(GLenum target, GLuint index, GLsizei count, const GLint * params) {if (GLeeInit()) glProgramLocalParametersI4ivNV(target, index, count, params);} +void __stdcall _Lazy_glProgramLocalParameterI4uiNV(GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) {if (GLeeInit()) glProgramLocalParameterI4uiNV(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramLocalParameterI4uivNV(GLenum target, GLuint index, const GLuint * params) {if (GLeeInit()) glProgramLocalParameterI4uivNV(target, index, params);} +void __stdcall _Lazy_glProgramLocalParametersI4uivNV(GLenum target, GLuint index, GLsizei count, const GLuint * params) {if (GLeeInit()) glProgramLocalParametersI4uivNV(target, index, count, params);} +void __stdcall _Lazy_glProgramEnvParameterI4iNV(GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w) {if (GLeeInit()) glProgramEnvParameterI4iNV(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramEnvParameterI4ivNV(GLenum target, GLuint index, const GLint * params) {if (GLeeInit()) glProgramEnvParameterI4ivNV(target, index, params);} +void __stdcall _Lazy_glProgramEnvParametersI4ivNV(GLenum target, GLuint index, GLsizei count, const GLint * params) {if (GLeeInit()) glProgramEnvParametersI4ivNV(target, index, count, params);} +void __stdcall _Lazy_glProgramEnvParameterI4uiNV(GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) {if (GLeeInit()) glProgramEnvParameterI4uiNV(target, index, x, y, z, w);} +void __stdcall _Lazy_glProgramEnvParameterI4uivNV(GLenum target, GLuint index, const GLuint * params) {if (GLeeInit()) glProgramEnvParameterI4uivNV(target, index, params);} +void __stdcall _Lazy_glProgramEnvParametersI4uivNV(GLenum target, GLuint index, GLsizei count, const GLuint * params) {if (GLeeInit()) glProgramEnvParametersI4uivNV(target, index, count, params);} +void __stdcall _Lazy_glGetProgramLocalParameterIivNV(GLenum target, GLuint index, GLint * params) {if (GLeeInit()) glGetProgramLocalParameterIivNV(target, index, params);} +void __stdcall _Lazy_glGetProgramLocalParameterIuivNV(GLenum target, GLuint index, GLuint * params) {if (GLeeInit()) glGetProgramLocalParameterIuivNV(target, index, params);} +void __stdcall _Lazy_glGetProgramEnvParameterIivNV(GLenum target, GLuint index, GLint * params) {if (GLeeInit()) glGetProgramEnvParameterIivNV(target, index, params);} +void __stdcall _Lazy_glGetProgramEnvParameterIuivNV(GLenum target, GLuint index, GLuint * params) {if (GLeeInit()) glGetProgramEnvParameterIuivNV(target, index, params);} +PFNGLPROGRAMLOCALPARAMETERI4INVPROC pglProgramLocalParameterI4iNV=_Lazy_glProgramLocalParameterI4iNV; +PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC pglProgramLocalParameterI4ivNV=_Lazy_glProgramLocalParameterI4ivNV; +PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC pglProgramLocalParametersI4ivNV=_Lazy_glProgramLocalParametersI4ivNV; +PFNGLPROGRAMLOCALPARAMETERI4UINVPROC pglProgramLocalParameterI4uiNV=_Lazy_glProgramLocalParameterI4uiNV; +PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC pglProgramLocalParameterI4uivNV=_Lazy_glProgramLocalParameterI4uivNV; +PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC pglProgramLocalParametersI4uivNV=_Lazy_glProgramLocalParametersI4uivNV; +PFNGLPROGRAMENVPARAMETERI4INVPROC pglProgramEnvParameterI4iNV=_Lazy_glProgramEnvParameterI4iNV; +PFNGLPROGRAMENVPARAMETERI4IVNVPROC pglProgramEnvParameterI4ivNV=_Lazy_glProgramEnvParameterI4ivNV; +PFNGLPROGRAMENVPARAMETERSI4IVNVPROC pglProgramEnvParametersI4ivNV=_Lazy_glProgramEnvParametersI4ivNV; +PFNGLPROGRAMENVPARAMETERI4UINVPROC pglProgramEnvParameterI4uiNV=_Lazy_glProgramEnvParameterI4uiNV; +PFNGLPROGRAMENVPARAMETERI4UIVNVPROC pglProgramEnvParameterI4uivNV=_Lazy_glProgramEnvParameterI4uivNV; +PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC pglProgramEnvParametersI4uivNV=_Lazy_glProgramEnvParametersI4uivNV; +PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC pglGetProgramLocalParameterIivNV=_Lazy_glGetProgramLocalParameterIivNV; +PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC pglGetProgramLocalParameterIuivNV=_Lazy_glGetProgramLocalParameterIuivNV; +PFNGLGETPROGRAMENVPARAMETERIIVNVPROC pglGetProgramEnvParameterIivNV=_Lazy_glGetProgramEnvParameterIivNV; +PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC pglGetProgramEnvParameterIuivNV=_Lazy_glGetProgramEnvParameterIuivNV; +#endif + +/* GL_NV_framebuffer_multisample_coverage */ + +#ifdef __GLEE_GL_NV_framebuffer_multisample_coverage +void __stdcall _Lazy_glRenderbufferStorageMultisampleCoverageNV(GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height) {if (GLeeInit()) glRenderbufferStorageMultisampleCoverageNV(target, coverageSamples, colorSamples, internalformat, width, height);} +PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC pglRenderbufferStorageMultisampleCoverageNV=_Lazy_glRenderbufferStorageMultisampleCoverageNV; +#endif + +/* GL_EXT_framebuffer_multisample */ + +#ifdef __GLEE_GL_EXT_framebuffer_multisample +void __stdcall _Lazy_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {if (GLeeInit()) glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height);} +PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC pglRenderbufferStorageMultisampleEXT=_Lazy_glRenderbufferStorageMultisampleEXT; +#endif + +/* GL_EXT_framebuffer_blit */ + +#ifdef __GLEE_GL_EXT_framebuffer_blit +void __stdcall _Lazy_glBlitFramebufferEXT(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {if (GLeeInit()) glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);} +PFNGLBLITFRAMEBUFFEREXTPROC pglBlitFramebufferEXT=_Lazy_glBlitFramebufferEXT; +#endif + +/* GL_EXT_texture_compression_rgtc */ + +#ifdef __GLEE_GL_EXT_texture_compression_rgtc +#endif + +/* GL_EXT_color_matrix */ + +#ifdef __GLEE_GL_EXT_color_matrix +#endif + +/* GL_SGIX_texture_select */ + +#ifdef __GLEE_GL_SGIX_texture_select +#endif + +/* GL_INGR_blend_func_separate */ + +#ifdef __GLEE_GL_INGR_blend_func_separate +void __stdcall _Lazy_glBlendFuncSeparateINGR(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) {if (GLeeInit()) glBlendFuncSeparateINGR(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);} +PFNGLBLENDFUNCSEPARATEINGRPROC pglBlendFuncSeparateINGR=_Lazy_glBlendFuncSeparateINGR; +#endif + +/* GL_SGIX_depth_pass_instrument */ + +#ifdef __GLEE_GL_SGIX_depth_pass_instrument +#endif + +/* GL_SGIX_igloo_interface */ + +#ifdef __GLEE_GL_SGIX_igloo_interface +void __stdcall _Lazy_glIglooInterfaceSGIX(GLenum pname, const GLvoid * params) {if (GLeeInit()) glIglooInterfaceSGIX(pname, params);} +PFNGLIGLOOINTERFACESGIXPROC pglIglooInterfaceSGIX=_Lazy_glIglooInterfaceSGIX; +#endif + +/* GL_EXT_draw_buffers2 */ + +#ifdef __GLEE_GL_EXT_draw_buffers2 +void __stdcall _Lazy_glColorMaskIndexedEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) {if (GLeeInit()) glColorMaskIndexedEXT(index, r, g, b, a);} +void __stdcall _Lazy_glGetBooleanIndexedvEXT(GLenum target, GLuint index, GLboolean * data) {if (GLeeInit()) glGetBooleanIndexedvEXT(target, index, data);} +void __stdcall _Lazy_glGetIntegerIndexedvEXT(GLenum target, GLuint index, GLint * data) {if (GLeeInit()) glGetIntegerIndexedvEXT(target, index, data);} +void __stdcall _Lazy_glEnableIndexedEXT(GLenum target, GLuint index) {if (GLeeInit()) glEnableIndexedEXT(target, index);} +void __stdcall _Lazy_glDisableIndexedEXT(GLenum target, GLuint index) {if (GLeeInit()) glDisableIndexedEXT(target, index);} +GLboolean __stdcall _Lazy_glIsEnabledIndexedEXT(GLenum target, GLuint index) {if (GLeeInit()) return glIsEnabledIndexedEXT(target, index); return (GLboolean)0;} +PFNGLCOLORMASKINDEXEDEXTPROC pglColorMaskIndexedEXT=_Lazy_glColorMaskIndexedEXT; +PFNGLGETBOOLEANINDEXEDVEXTPROC pglGetBooleanIndexedvEXT=_Lazy_glGetBooleanIndexedvEXT; +PFNGLGETINTEGERINDEXEDVEXTPROC pglGetIntegerIndexedvEXT=_Lazy_glGetIntegerIndexedvEXT; +PFNGLENABLEINDEXEDEXTPROC pglEnableIndexedEXT=_Lazy_glEnableIndexedEXT; +PFNGLDISABLEINDEXEDEXTPROC pglDisableIndexedEXT=_Lazy_glDisableIndexedEXT; +PFNGLISENABLEDINDEXEDEXTPROC pglIsEnabledIndexedEXT=_Lazy_glIsEnabledIndexedEXT; +#endif + +/* GL_NV_parameter_buffer_object */ + +#ifdef __GLEE_GL_NV_parameter_buffer_object +void __stdcall _Lazy_glProgramBufferParametersfvNV(GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat * params) {if (GLeeInit()) glProgramBufferParametersfvNV(target, buffer, index, count, params);} +void __stdcall _Lazy_glProgramBufferParametersIivNV(GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint * params) {if (GLeeInit()) glProgramBufferParametersIivNV(target, buffer, index, count, params);} +void __stdcall _Lazy_glProgramBufferParametersIuivNV(GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint * params) {if (GLeeInit()) glProgramBufferParametersIuivNV(target, buffer, index, count, params);} +PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC pglProgramBufferParametersfvNV=_Lazy_glProgramBufferParametersfvNV; +PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC pglProgramBufferParametersIivNV=_Lazy_glProgramBufferParametersIivNV; +PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC pglProgramBufferParametersIuivNV=_Lazy_glProgramBufferParametersIuivNV; +#endif + +/* GL_EXT_draw_instanced */ + +#ifdef __GLEE_GL_EXT_draw_instanced +void __stdcall _Lazy_glDrawArraysInstancedEXT(GLenum mode, GLint start, GLsizei count, GLsizei primcount) {if (GLeeInit()) glDrawArraysInstancedEXT(mode, start, count, primcount);} +void __stdcall _Lazy_glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount) {if (GLeeInit()) glDrawElementsInstancedEXT(mode, count, type, indices, primcount);} +PFNGLDRAWARRAYSINSTANCEDEXTPROC pglDrawArraysInstancedEXT=_Lazy_glDrawArraysInstancedEXT; +PFNGLDRAWELEMENTSINSTANCEDEXTPROC pglDrawElementsInstancedEXT=_Lazy_glDrawElementsInstancedEXT; +#endif + +/* GL_EXT_fragment_lighting */ + +#ifdef __GLEE_GL_EXT_fragment_lighting +GLvoid __stdcall _Lazy_glFragmentLightModeliEXT(GLenum pname, GLint param) {if (GLeeInit()) glFragmentLightModeliEXT(pname, param);} +GLvoid __stdcall _Lazy_glFragmentLightModelfEXT(GLenum pname, GLfloat param) {if (GLeeInit()) glFragmentLightModelfEXT(pname, param);} +GLvoid __stdcall _Lazy_glFragmentLightModelivEXT(GLenum pname, GLint * params) {if (GLeeInit()) glFragmentLightModelivEXT(pname, params);} +GLvoid __stdcall _Lazy_glFragmentLightModelfvEXT(GLenum pname, GLfloat * params) {if (GLeeInit()) glFragmentLightModelfvEXT(pname, params);} +GLvoid __stdcall _Lazy_glFragmentLightiEXT(GLenum light, GLenum pname, GLint param) {if (GLeeInit()) glFragmentLightiEXT(light, pname, param);} +GLvoid __stdcall _Lazy_glFragmentLightfEXT(GLenum light, GLenum pname, GLfloat param) {if (GLeeInit()) glFragmentLightfEXT(light, pname, param);} +GLvoid __stdcall _Lazy_glFragmentLightivEXT(GLenum light, GLenum pname, GLint * params) {if (GLeeInit()) glFragmentLightivEXT(light, pname, params);} +GLvoid __stdcall _Lazy_glFragmentLightfvEXT(GLenum light, GLenum pname, GLfloat * params) {if (GLeeInit()) glFragmentLightfvEXT(light, pname, params);} +GLvoid __stdcall _Lazy_glGetFragmentLightivEXT(GLenum light, GLenum pname, GLint * params) {if (GLeeInit()) glGetFragmentLightivEXT(light, pname, params);} +GLvoid __stdcall _Lazy_glGetFragmentLightfvEXT(GLenum light, GLenum pname, GLfloat * params) {if (GLeeInit()) glGetFragmentLightfvEXT(light, pname, params);} +GLvoid __stdcall _Lazy_glFragmentMaterialfEXT(GLenum face, GLenum pname, const GLfloat param) {if (GLeeInit()) glFragmentMaterialfEXT(face, pname, param);} +GLvoid __stdcall _Lazy_glFragmentMaterialiEXT(GLenum face, GLenum pname, const GLint param) {if (GLeeInit()) glFragmentMaterialiEXT(face, pname, param);} +GLvoid __stdcall _Lazy_glFragmentMaterialfvEXT(GLenum face, GLenum pname, const GLfloat * params) {if (GLeeInit()) glFragmentMaterialfvEXT(face, pname, params);} +GLvoid __stdcall _Lazy_glFragmentMaterialivEXT(GLenum face, GLenum pname, const GLint * params) {if (GLeeInit()) glFragmentMaterialivEXT(face, pname, params);} +GLvoid __stdcall _Lazy_glFragmentColorMaterialEXT(GLenum face, GLenum mode) {if (GLeeInit()) glFragmentColorMaterialEXT(face, mode);} +GLvoid __stdcall _Lazy_glGetFragmentMaterialfvEXT(GLenum face, GLenum pname, const GLfloat * params) {if (GLeeInit()) glGetFragmentMaterialfvEXT(face, pname, params);} +GLvoid __stdcall _Lazy_glGetFragmentMaterialivEXT(GLenum face, GLenum pname, const GLint * params) {if (GLeeInit()) glGetFragmentMaterialivEXT(face, pname, params);} +GLvoid __stdcall _Lazy_glLightEnviEXT(GLenum pname, GLint param) {if (GLeeInit()) glLightEnviEXT(pname, param);} +PFNGLFRAGMENTLIGHTMODELIEXTPROC pglFragmentLightModeliEXT=_Lazy_glFragmentLightModeliEXT; +PFNGLFRAGMENTLIGHTMODELFEXTPROC pglFragmentLightModelfEXT=_Lazy_glFragmentLightModelfEXT; +PFNGLFRAGMENTLIGHTMODELIVEXTPROC pglFragmentLightModelivEXT=_Lazy_glFragmentLightModelivEXT; +PFNGLFRAGMENTLIGHTMODELFVEXTPROC pglFragmentLightModelfvEXT=_Lazy_glFragmentLightModelfvEXT; +PFNGLFRAGMENTLIGHTIEXTPROC pglFragmentLightiEXT=_Lazy_glFragmentLightiEXT; +PFNGLFRAGMENTLIGHTFEXTPROC pglFragmentLightfEXT=_Lazy_glFragmentLightfEXT; +PFNGLFRAGMENTLIGHTIVEXTPROC pglFragmentLightivEXT=_Lazy_glFragmentLightivEXT; +PFNGLFRAGMENTLIGHTFVEXTPROC pglFragmentLightfvEXT=_Lazy_glFragmentLightfvEXT; +PFNGLGETFRAGMENTLIGHTIVEXTPROC pglGetFragmentLightivEXT=_Lazy_glGetFragmentLightivEXT; +PFNGLGETFRAGMENTLIGHTFVEXTPROC pglGetFragmentLightfvEXT=_Lazy_glGetFragmentLightfvEXT; +PFNGLFRAGMENTMATERIALFEXTPROC pglFragmentMaterialfEXT=_Lazy_glFragmentMaterialfEXT; +PFNGLFRAGMENTMATERIALIEXTPROC pglFragmentMaterialiEXT=_Lazy_glFragmentMaterialiEXT; +PFNGLFRAGMENTMATERIALFVEXTPROC pglFragmentMaterialfvEXT=_Lazy_glFragmentMaterialfvEXT; +PFNGLFRAGMENTMATERIALIVEXTPROC pglFragmentMaterialivEXT=_Lazy_glFragmentMaterialivEXT; +PFNGLFRAGMENTCOLORMATERIALEXTPROC pglFragmentColorMaterialEXT=_Lazy_glFragmentColorMaterialEXT; +PFNGLGETFRAGMENTMATERIALFVEXTPROC pglGetFragmentMaterialfvEXT=_Lazy_glGetFragmentMaterialfvEXT; +PFNGLGETFRAGMENTMATERIALIVEXTPROC pglGetFragmentMaterialivEXT=_Lazy_glGetFragmentMaterialivEXT; +PFNGLLIGHTENVIEXTPROC pglLightEnviEXT=_Lazy_glLightEnviEXT; +#endif + +/* GL_EXT_packed_depth_stencil */ + +#ifdef __GLEE_GL_EXT_packed_depth_stencil +#endif + +/* GL_EXT_scene_marker */ + +#ifdef __GLEE_GL_EXT_scene_marker +GLvoid __stdcall _Lazy_glBeginSceneEXT(void) {if (GLeeInit()) glBeginSceneEXT();} +GLvoid __stdcall _Lazy_glEndSceneEXT(void) {if (GLeeInit()) glEndSceneEXT();} +PFNGLBEGINSCENEEXTPROC pglBeginSceneEXT=_Lazy_glBeginSceneEXT; +PFNGLENDSCENEEXTPROC pglEndSceneEXT=_Lazy_glEndSceneEXT; +#endif + +/* GL_EXT_stencil_clear_tag */ + +#ifdef __GLEE_GL_EXT_stencil_clear_tag +#endif + +/* GL_EXT_texture_compression_dxt1 */ + +#ifdef __GLEE_GL_EXT_texture_compression_dxt1 +#endif + +/* GL_EXT_texture_env */ + +#ifdef __GLEE_GL_EXT_texture_env +#endif + +/* GL_EXT_texture_sRGB */ + +#ifdef __GLEE_GL_EXT_texture_sRGB +#endif + +/* GL_IBM_static_data */ + +#ifdef __GLEE_GL_IBM_static_data +#endif + +/* GL_MESAX_texture_stack */ + +#ifdef __GLEE_GL_MESAX_texture_stack +#endif + +/* GL_OES_byte_coordinates */ + +#ifdef __GLEE_GL_OES_byte_coordinates +#endif + +/* GL_OES_compressed_paletted_texture */ + +#ifdef __GLEE_GL_OES_compressed_paletted_texture +#endif + +/* GL_OES_single_precision */ + +#ifdef __GLEE_GL_OES_single_precision +GLvoid __stdcall _Lazy_glDepthRangefOES(GLclampf n, GLclampf f) {if (GLeeInit()) glDepthRangefOES(n, f);} +GLvoid __stdcall _Lazy_glFrustumfOES(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {if (GLeeInit()) glFrustumfOES(l, r, b, t, n, f);} +GLvoid __stdcall _Lazy_glOrthofOES(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f) {if (GLeeInit()) glOrthofOES(l, r, b, t, n, f);} +GLvoid __stdcall _Lazy_glClipPlanefOES(GLenum plane, const GLfloat* equation) {if (GLeeInit()) glClipPlanefOES(plane, equation);} +GLvoid __stdcall _Lazy_glGetClipPlanefOES(GLenum plane, GLfloat* equation) {if (GLeeInit()) glGetClipPlanefOES(plane, equation);} +GLvoid __stdcall _Lazy_glClearDepthfOES(GLclampd depth) {if (GLeeInit()) glClearDepthfOES(depth);} +PFNGLDEPTHRANGEFOESPROC pglDepthRangefOES=_Lazy_glDepthRangefOES; +PFNGLFRUSTUMFOESPROC pglFrustumfOES=_Lazy_glFrustumfOES; +PFNGLORTHOFOESPROC pglOrthofOES=_Lazy_glOrthofOES; +PFNGLCLIPPLANEFOESPROC pglClipPlanefOES=_Lazy_glClipPlanefOES; +PFNGLGETCLIPPLANEFOESPROC pglGetClipPlanefOES=_Lazy_glGetClipPlanefOES; +PFNGLCLEARDEPTHFOESPROC pglClearDepthfOES=_Lazy_glClearDepthfOES; +#endif + +/* GL_SGIX_pixel_texture_bits */ + +#ifdef __GLEE_GL_SGIX_pixel_texture_bits +#endif + +/* GL_SGIX_texture_range */ + +#ifdef __GLEE_GL_SGIX_texture_range +#endif + +/* WGL */ + +#ifdef WIN32 + +/* Extension querying variables */ + +GLboolean _GLEE_WGL_ARB_buffer_region = GL_FALSE; +GLboolean _GLEE_WGL_ARB_multisample = GL_FALSE; +GLboolean _GLEE_WGL_ARB_extensions_string = GL_FALSE; +GLboolean _GLEE_WGL_ARB_pixel_format = GL_FALSE; +GLboolean _GLEE_WGL_ARB_make_current_read = GL_FALSE; +GLboolean _GLEE_WGL_ARB_pbuffer = GL_FALSE; +GLboolean _GLEE_WGL_ARB_render_texture = GL_FALSE; +GLboolean _GLEE_WGL_ARB_pixel_format_float = GL_FALSE; +GLboolean _GLEE_WGL_EXT_make_current_read = GL_FALSE; +GLboolean _GLEE_WGL_EXT_pixel_format = GL_FALSE; +GLboolean _GLEE_WGL_EXT_pbuffer = GL_FALSE; +GLboolean _GLEE_WGL_EXT_depth_float = GL_FALSE; +GLboolean _GLEE_WGL_3DFX_multisample = GL_FALSE; +GLboolean _GLEE_WGL_EXT_multisample = GL_FALSE; +GLboolean _GLEE_WGL_I3D_digital_video_control = GL_FALSE; +GLboolean _GLEE_WGL_I3D_gamma = GL_FALSE; +GLboolean _GLEE_WGL_I3D_genlock = GL_FALSE; +GLboolean _GLEE_WGL_I3D_image_buffer = GL_FALSE; +GLboolean _GLEE_WGL_I3D_swap_frame_lock = GL_FALSE; +GLboolean _GLEE_WGL_NV_render_depth_texture = GL_FALSE; +GLboolean _GLEE_WGL_NV_render_texture_rectangle = GL_FALSE; +GLboolean _GLEE_WGL_ATI_pixel_format_float = GL_FALSE; +GLboolean _GLEE_WGL_NV_float_buffer = GL_FALSE; +GLboolean _GLEE_WGL_EXT_display_color_table = GL_FALSE; +GLboolean _GLEE_WGL_EXT_extensions_string = GL_FALSE; +GLboolean _GLEE_WGL_EXT_swap_control = GL_FALSE; +GLboolean _GLEE_WGL_NV_vertex_array_range = GL_FALSE; +GLboolean _GLEE_WGL_OML_sync_control = GL_FALSE; +GLboolean _GLEE_WGL_I3D_swap_frame_usage = GL_FALSE; +GLboolean _GLEE_WGL_3DL_stereo_control = GL_FALSE; + +/* WGL Extension names */ + +char __GLeeWGLExtensionNames[30][32]={ + "WGL_ARB_buffer_region", + "WGL_ARB_multisample", + "WGL_ARB_extensions_string", + "WGL_ARB_pixel_format", + "WGL_ARB_make_current_read", + "WGL_ARB_pbuffer", + "WGL_ARB_render_texture", + "WGL_ARB_pixel_format_float", + "WGL_EXT_make_current_read", + "WGL_EXT_pixel_format", + "WGL_EXT_pbuffer", + "WGL_EXT_depth_float", + "WGL_3DFX_multisample", + "WGL_EXT_multisample", + "WGL_I3D_digital_video_control", + "WGL_I3D_gamma", + "WGL_I3D_genlock", + "WGL_I3D_image_buffer", + "WGL_I3D_swap_frame_lock", + "WGL_NV_render_depth_texture", + "WGL_NV_render_texture_rectangle", + "WGL_ATI_pixel_format_float", + "WGL_NV_float_buffer", + "WGL_EXT_display_color_table", + "WGL_EXT_extensions_string", + "WGL_EXT_swap_control", + "WGL_NV_vertex_array_range", + "WGL_OML_sync_control", + "WGL_I3D_swap_frame_usage", + "WGL_3DL_stereo_control" +}; +int __GLeeWGLNumExtensions=30; + +/* WGL_ARB_buffer_region */ + +#ifdef __GLEE_WGL_ARB_buffer_region +HANDLE __stdcall _Lazy_wglCreateBufferRegionARB(HDC hDC, int iLayerPlane, UINT uType) {if (GLeeInit()) return wglCreateBufferRegionARB(hDC, iLayerPlane, uType); return (HANDLE)0;} +VOID __stdcall _Lazy_wglDeleteBufferRegionARB(HANDLE hRegion) {if (GLeeInit()) wglDeleteBufferRegionARB(hRegion);} +BOOL __stdcall _Lazy_wglSaveBufferRegionARB(HANDLE hRegion, int x, int y, int width, int height) {if (GLeeInit()) return wglSaveBufferRegionARB(hRegion, x, y, width, height); return (BOOL)0;} +BOOL __stdcall _Lazy_wglRestoreBufferRegionARB(HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc) {if (GLeeInit()) return wglRestoreBufferRegionARB(hRegion, x, y, width, height, xSrc, ySrc); return (BOOL)0;} +PFNWGLCREATEBUFFERREGIONARBPROC pwglCreateBufferRegionARB=_Lazy_wglCreateBufferRegionARB; +PFNWGLDELETEBUFFERREGIONARBPROC pwglDeleteBufferRegionARB=_Lazy_wglDeleteBufferRegionARB; +PFNWGLSAVEBUFFERREGIONARBPROC pwglSaveBufferRegionARB=_Lazy_wglSaveBufferRegionARB; +PFNWGLRESTOREBUFFERREGIONARBPROC pwglRestoreBufferRegionARB=_Lazy_wglRestoreBufferRegionARB; +#endif + +/* WGL_ARB_multisample */ + +#ifdef __GLEE_WGL_ARB_multisample +#endif + +/* WGL_ARB_extensions_string */ + +#ifdef __GLEE_WGL_ARB_extensions_string +const char * __stdcall _Lazy_wglGetExtensionsStringARB(HDC hdc) {if (GLeeInit()) return wglGetExtensionsStringARB(hdc); return (const char *)0;} +PFNWGLGETEXTENSIONSSTRINGARBPROC pwglGetExtensionsStringARB=_Lazy_wglGetExtensionsStringARB; +#endif + +/* WGL_ARB_pixel_format */ + +#ifdef __GLEE_WGL_ARB_pixel_format +BOOL __stdcall _Lazy_wglGetPixelFormatAttribivARB(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int * piAttributes, int * piValues) {if (GLeeInit()) return wglGetPixelFormatAttribivARB(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int * piAttributes, FLOAT * pfValues) {if (GLeeInit()) return wglGetPixelFormatAttribfvARB(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues); return (BOOL)0;} +BOOL __stdcall _Lazy_wglChoosePixelFormatARB(HDC hdc, const int * piAttribIList, const FLOAT * pfAttribFList, UINT nMaxFormats, int * piFormats, UINT * nNumFormats) {if (GLeeInit()) return wglChoosePixelFormatARB(hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats); return (BOOL)0;} +PFNWGLGETPIXELFORMATATTRIBIVARBPROC pwglGetPixelFormatAttribivARB=_Lazy_wglGetPixelFormatAttribivARB; +PFNWGLGETPIXELFORMATATTRIBFVARBPROC pwglGetPixelFormatAttribfvARB=_Lazy_wglGetPixelFormatAttribfvARB; +PFNWGLCHOOSEPIXELFORMATARBPROC pwglChoosePixelFormatARB=_Lazy_wglChoosePixelFormatARB; +#endif + +/* WGL_ARB_make_current_read */ + +#ifdef __GLEE_WGL_ARB_make_current_read +BOOL __stdcall _Lazy_wglMakeContextCurrentARB(HDC hDrawDC, HDC hReadDC, HGLRC hglrc) {if (GLeeInit()) return wglMakeContextCurrentARB(hDrawDC, hReadDC, hglrc); return (BOOL)0;} +HDC __stdcall _Lazy_wglGetCurrentReadDCARB(void) {if (GLeeInit()) return wglGetCurrentReadDCARB(); return (HDC)0;} +PFNWGLMAKECONTEXTCURRENTARBPROC pwglMakeContextCurrentARB=_Lazy_wglMakeContextCurrentARB; +PFNWGLGETCURRENTREADDCARBPROC pwglGetCurrentReadDCARB=_Lazy_wglGetCurrentReadDCARB; +#endif + +/* WGL_ARB_pbuffer */ + +#ifdef __GLEE_WGL_ARB_pbuffer +HPBUFFERARB __stdcall _Lazy_wglCreatePbufferARB(HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int * piAttribList) {if (GLeeInit()) return wglCreatePbufferARB(hDC, iPixelFormat, iWidth, iHeight, piAttribList); return (HPBUFFERARB)0;} +HDC __stdcall _Lazy_wglGetPbufferDCARB(HPBUFFERARB hPbuffer) {if (GLeeInit()) return wglGetPbufferDCARB(hPbuffer); return (HDC)0;} +int __stdcall _Lazy_wglReleasePbufferDCARB(HPBUFFERARB hPbuffer, HDC hDC) {if (GLeeInit()) return wglReleasePbufferDCARB(hPbuffer, hDC); return (int)0;} +BOOL __stdcall _Lazy_wglDestroyPbufferARB(HPBUFFERARB hPbuffer) {if (GLeeInit()) return wglDestroyPbufferARB(hPbuffer); return (BOOL)0;} +BOOL __stdcall _Lazy_wglQueryPbufferARB(HPBUFFERARB hPbuffer, int iAttribute, int * piValue) {if (GLeeInit()) return wglQueryPbufferARB(hPbuffer, iAttribute, piValue); return (BOOL)0;} +PFNWGLCREATEPBUFFERARBPROC pwglCreatePbufferARB=_Lazy_wglCreatePbufferARB; +PFNWGLGETPBUFFERDCARBPROC pwglGetPbufferDCARB=_Lazy_wglGetPbufferDCARB; +PFNWGLRELEASEPBUFFERDCARBPROC pwglReleasePbufferDCARB=_Lazy_wglReleasePbufferDCARB; +PFNWGLDESTROYPBUFFERARBPROC pwglDestroyPbufferARB=_Lazy_wglDestroyPbufferARB; +PFNWGLQUERYPBUFFERARBPROC pwglQueryPbufferARB=_Lazy_wglQueryPbufferARB; +#endif + +/* WGL_ARB_render_texture */ + +#ifdef __GLEE_WGL_ARB_render_texture +BOOL __stdcall _Lazy_wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuffer) {if (GLeeInit()) return wglBindTexImageARB(hPbuffer, iBuffer); return (BOOL)0;} +BOOL __stdcall _Lazy_wglReleaseTexImageARB(HPBUFFERARB hPbuffer, int iBuffer) {if (GLeeInit()) return wglReleaseTexImageARB(hPbuffer, iBuffer); return (BOOL)0;} +BOOL __stdcall _Lazy_wglSetPbufferAttribARB(HPBUFFERARB hPbuffer, const int * piAttribList) {if (GLeeInit()) return wglSetPbufferAttribARB(hPbuffer, piAttribList); return (BOOL)0;} +PFNWGLBINDTEXIMAGEARBPROC pwglBindTexImageARB=_Lazy_wglBindTexImageARB; +PFNWGLRELEASETEXIMAGEARBPROC pwglReleaseTexImageARB=_Lazy_wglReleaseTexImageARB; +PFNWGLSETPBUFFERATTRIBARBPROC pwglSetPbufferAttribARB=_Lazy_wglSetPbufferAttribARB; +#endif + +/* WGL_ARB_pixel_format_float */ + +#ifdef __GLEE_WGL_ARB_pixel_format_float +#endif + +/* WGL_EXT_make_current_read */ + +#ifdef __GLEE_WGL_EXT_make_current_read +BOOL __stdcall _Lazy_wglMakeContextCurrentEXT(HDC hDrawDC, HDC hReadDC, HGLRC hglrc) {if (GLeeInit()) return wglMakeContextCurrentEXT(hDrawDC, hReadDC, hglrc); return (BOOL)0;} +HDC __stdcall _Lazy_wglGetCurrentReadDCEXT(void) {if (GLeeInit()) return wglGetCurrentReadDCEXT(); return (HDC)0;} +PFNWGLMAKECONTEXTCURRENTEXTPROC pwglMakeContextCurrentEXT=_Lazy_wglMakeContextCurrentEXT; +PFNWGLGETCURRENTREADDCEXTPROC pwglGetCurrentReadDCEXT=_Lazy_wglGetCurrentReadDCEXT; +#endif + +/* WGL_EXT_pixel_format */ + +#ifdef __GLEE_WGL_EXT_pixel_format +BOOL __stdcall _Lazy_wglGetPixelFormatAttribivEXT(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int * piAttributes, int * piValues) {if (GLeeInit()) return wglGetPixelFormatAttribivEXT(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGetPixelFormatAttribfvEXT(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int * piAttributes, FLOAT * pfValues) {if (GLeeInit()) return wglGetPixelFormatAttribfvEXT(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues); return (BOOL)0;} +BOOL __stdcall _Lazy_wglChoosePixelFormatEXT(HDC hdc, const int * piAttribIList, const FLOAT * pfAttribFList, UINT nMaxFormats, int * piFormats, UINT * nNumFormats) {if (GLeeInit()) return wglChoosePixelFormatEXT(hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats); return (BOOL)0;} +PFNWGLGETPIXELFORMATATTRIBIVEXTPROC pwglGetPixelFormatAttribivEXT=_Lazy_wglGetPixelFormatAttribivEXT; +PFNWGLGETPIXELFORMATATTRIBFVEXTPROC pwglGetPixelFormatAttribfvEXT=_Lazy_wglGetPixelFormatAttribfvEXT; +PFNWGLCHOOSEPIXELFORMATEXTPROC pwglChoosePixelFormatEXT=_Lazy_wglChoosePixelFormatEXT; +#endif + +/* WGL_EXT_pbuffer */ + +#ifdef __GLEE_WGL_EXT_pbuffer +HPBUFFEREXT __stdcall _Lazy_wglCreatePbufferEXT(HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int * piAttribList) {if (GLeeInit()) return wglCreatePbufferEXT(hDC, iPixelFormat, iWidth, iHeight, piAttribList); return (HPBUFFEREXT)0;} +HDC __stdcall _Lazy_wglGetPbufferDCEXT(HPBUFFEREXT hPbuffer) {if (GLeeInit()) return wglGetPbufferDCEXT(hPbuffer); return (HDC)0;} +int __stdcall _Lazy_wglReleasePbufferDCEXT(HPBUFFEREXT hPbuffer, HDC hDC) {if (GLeeInit()) return wglReleasePbufferDCEXT(hPbuffer, hDC); return (int)0;} +BOOL __stdcall _Lazy_wglDestroyPbufferEXT(HPBUFFEREXT hPbuffer) {if (GLeeInit()) return wglDestroyPbufferEXT(hPbuffer); return (BOOL)0;} +BOOL __stdcall _Lazy_wglQueryPbufferEXT(HPBUFFEREXT hPbuffer, int iAttribute, int * piValue) {if (GLeeInit()) return wglQueryPbufferEXT(hPbuffer, iAttribute, piValue); return (BOOL)0;} +PFNWGLCREATEPBUFFEREXTPROC pwglCreatePbufferEXT=_Lazy_wglCreatePbufferEXT; +PFNWGLGETPBUFFERDCEXTPROC pwglGetPbufferDCEXT=_Lazy_wglGetPbufferDCEXT; +PFNWGLRELEASEPBUFFERDCEXTPROC pwglReleasePbufferDCEXT=_Lazy_wglReleasePbufferDCEXT; +PFNWGLDESTROYPBUFFEREXTPROC pwglDestroyPbufferEXT=_Lazy_wglDestroyPbufferEXT; +PFNWGLQUERYPBUFFEREXTPROC pwglQueryPbufferEXT=_Lazy_wglQueryPbufferEXT; +#endif + +/* WGL_EXT_depth_float */ + +#ifdef __GLEE_WGL_EXT_depth_float +#endif + +/* WGL_3DFX_multisample */ + +#ifdef __GLEE_WGL_3DFX_multisample +#endif + +/* WGL_EXT_multisample */ + +#ifdef __GLEE_WGL_EXT_multisample +#endif + +/* WGL_I3D_digital_video_control */ + +#ifdef __GLEE_WGL_I3D_digital_video_control +BOOL __stdcall _Lazy_wglGetDigitalVideoParametersI3D(HDC hDC, int iAttribute, int * piValue) {if (GLeeInit()) return wglGetDigitalVideoParametersI3D(hDC, iAttribute, piValue); return (BOOL)0;} +BOOL __stdcall _Lazy_wglSetDigitalVideoParametersI3D(HDC hDC, int iAttribute, const int * piValue) {if (GLeeInit()) return wglSetDigitalVideoParametersI3D(hDC, iAttribute, piValue); return (BOOL)0;} +PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC pwglGetDigitalVideoParametersI3D=_Lazy_wglGetDigitalVideoParametersI3D; +PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC pwglSetDigitalVideoParametersI3D=_Lazy_wglSetDigitalVideoParametersI3D; +#endif + +/* WGL_I3D_gamma */ + +#ifdef __GLEE_WGL_I3D_gamma +BOOL __stdcall _Lazy_wglGetGammaTableParametersI3D(HDC hDC, int iAttribute, int * piValue) {if (GLeeInit()) return wglGetGammaTableParametersI3D(hDC, iAttribute, piValue); return (BOOL)0;} +BOOL __stdcall _Lazy_wglSetGammaTableParametersI3D(HDC hDC, int iAttribute, const int * piValue) {if (GLeeInit()) return wglSetGammaTableParametersI3D(hDC, iAttribute, piValue); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGetGammaTableI3D(HDC hDC, int iEntries, USHORT * puRed, USHORT * puGreen, USHORT * puBlue) {if (GLeeInit()) return wglGetGammaTableI3D(hDC, iEntries, puRed, puGreen, puBlue); return (BOOL)0;} +BOOL __stdcall _Lazy_wglSetGammaTableI3D(HDC hDC, int iEntries, const USHORT * puRed, const USHORT * puGreen, const USHORT * puBlue) {if (GLeeInit()) return wglSetGammaTableI3D(hDC, iEntries, puRed, puGreen, puBlue); return (BOOL)0;} +PFNWGLGETGAMMATABLEPARAMETERSI3DPROC pwglGetGammaTableParametersI3D=_Lazy_wglGetGammaTableParametersI3D; +PFNWGLSETGAMMATABLEPARAMETERSI3DPROC pwglSetGammaTableParametersI3D=_Lazy_wglSetGammaTableParametersI3D; +PFNWGLGETGAMMATABLEI3DPROC pwglGetGammaTableI3D=_Lazy_wglGetGammaTableI3D; +PFNWGLSETGAMMATABLEI3DPROC pwglSetGammaTableI3D=_Lazy_wglSetGammaTableI3D; +#endif + +/* WGL_I3D_genlock */ + +#ifdef __GLEE_WGL_I3D_genlock +BOOL __stdcall _Lazy_wglEnableGenlockI3D(HDC hDC) {if (GLeeInit()) return wglEnableGenlockI3D(hDC); return (BOOL)0;} +BOOL __stdcall _Lazy_wglDisableGenlockI3D(HDC hDC) {if (GLeeInit()) return wglDisableGenlockI3D(hDC); return (BOOL)0;} +BOOL __stdcall _Lazy_wglIsEnabledGenlockI3D(HDC hDC, BOOL * pFlag) {if (GLeeInit()) return wglIsEnabledGenlockI3D(hDC, pFlag); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGenlockSourceI3D(HDC hDC, UINT uSource) {if (GLeeInit()) return wglGenlockSourceI3D(hDC, uSource); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGetGenlockSourceI3D(HDC hDC, UINT * uSource) {if (GLeeInit()) return wglGetGenlockSourceI3D(hDC, uSource); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGenlockSourceEdgeI3D(HDC hDC, UINT uEdge) {if (GLeeInit()) return wglGenlockSourceEdgeI3D(hDC, uEdge); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGetGenlockSourceEdgeI3D(HDC hDC, UINT * uEdge) {if (GLeeInit()) return wglGetGenlockSourceEdgeI3D(hDC, uEdge); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGenlockSampleRateI3D(HDC hDC, UINT uRate) {if (GLeeInit()) return wglGenlockSampleRateI3D(hDC, uRate); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGetGenlockSampleRateI3D(HDC hDC, UINT * uRate) {if (GLeeInit()) return wglGetGenlockSampleRateI3D(hDC, uRate); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGenlockSourceDelayI3D(HDC hDC, UINT uDelay) {if (GLeeInit()) return wglGenlockSourceDelayI3D(hDC, uDelay); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGetGenlockSourceDelayI3D(HDC hDC, UINT * uDelay) {if (GLeeInit()) return wglGetGenlockSourceDelayI3D(hDC, uDelay); return (BOOL)0;} +BOOL __stdcall _Lazy_wglQueryGenlockMaxSourceDelayI3D(HDC hDC, UINT * uMaxLineDelay, UINT * uMaxPixelDelay) {if (GLeeInit()) return wglQueryGenlockMaxSourceDelayI3D(hDC, uMaxLineDelay, uMaxPixelDelay); return (BOOL)0;} +PFNWGLENABLEGENLOCKI3DPROC pwglEnableGenlockI3D=_Lazy_wglEnableGenlockI3D; +PFNWGLDISABLEGENLOCKI3DPROC pwglDisableGenlockI3D=_Lazy_wglDisableGenlockI3D; +PFNWGLISENABLEDGENLOCKI3DPROC pwglIsEnabledGenlockI3D=_Lazy_wglIsEnabledGenlockI3D; +PFNWGLGENLOCKSOURCEI3DPROC pwglGenlockSourceI3D=_Lazy_wglGenlockSourceI3D; +PFNWGLGETGENLOCKSOURCEI3DPROC pwglGetGenlockSourceI3D=_Lazy_wglGetGenlockSourceI3D; +PFNWGLGENLOCKSOURCEEDGEI3DPROC pwglGenlockSourceEdgeI3D=_Lazy_wglGenlockSourceEdgeI3D; +PFNWGLGETGENLOCKSOURCEEDGEI3DPROC pwglGetGenlockSourceEdgeI3D=_Lazy_wglGetGenlockSourceEdgeI3D; +PFNWGLGENLOCKSAMPLERATEI3DPROC pwglGenlockSampleRateI3D=_Lazy_wglGenlockSampleRateI3D; +PFNWGLGETGENLOCKSAMPLERATEI3DPROC pwglGetGenlockSampleRateI3D=_Lazy_wglGetGenlockSampleRateI3D; +PFNWGLGENLOCKSOURCEDELAYI3DPROC pwglGenlockSourceDelayI3D=_Lazy_wglGenlockSourceDelayI3D; +PFNWGLGETGENLOCKSOURCEDELAYI3DPROC pwglGetGenlockSourceDelayI3D=_Lazy_wglGetGenlockSourceDelayI3D; +PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC pwglQueryGenlockMaxSourceDelayI3D=_Lazy_wglQueryGenlockMaxSourceDelayI3D; +#endif + +/* WGL_I3D_image_buffer */ + +#ifdef __GLEE_WGL_I3D_image_buffer +LPVOID __stdcall _Lazy_wglCreateImageBufferI3D(HDC hDC, DWORD dwSize, UINT uFlags) {if (GLeeInit()) return wglCreateImageBufferI3D(hDC, dwSize, uFlags); return (LPVOID)0;} +BOOL __stdcall _Lazy_wglDestroyImageBufferI3D(HDC hDC, LPVOID pAddress) {if (GLeeInit()) return wglDestroyImageBufferI3D(hDC, pAddress); return (BOOL)0;} +BOOL __stdcall _Lazy_wglAssociateImageBufferEventsI3D(HDC hDC, const HANDLE * pEvent, const LPVOID * pAddress, const DWORD * pSize, UINT count) {if (GLeeInit()) return wglAssociateImageBufferEventsI3D(hDC, pEvent, pAddress, pSize, count); return (BOOL)0;} +BOOL __stdcall _Lazy_wglReleaseImageBufferEventsI3D(HDC hDC, const LPVOID * pAddress, UINT count) {if (GLeeInit()) return wglReleaseImageBufferEventsI3D(hDC, pAddress, count); return (BOOL)0;} +PFNWGLCREATEIMAGEBUFFERI3DPROC pwglCreateImageBufferI3D=_Lazy_wglCreateImageBufferI3D; +PFNWGLDESTROYIMAGEBUFFERI3DPROC pwglDestroyImageBufferI3D=_Lazy_wglDestroyImageBufferI3D; +PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC pwglAssociateImageBufferEventsI3D=_Lazy_wglAssociateImageBufferEventsI3D; +PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC pwglReleaseImageBufferEventsI3D=_Lazy_wglReleaseImageBufferEventsI3D; +#endif + +/* WGL_I3D_swap_frame_lock */ + +#ifdef __GLEE_WGL_I3D_swap_frame_lock +BOOL __stdcall _Lazy_wglEnableFrameLockI3D(void) {if (GLeeInit()) return wglEnableFrameLockI3D(); return (BOOL)0;} +BOOL __stdcall _Lazy_wglDisableFrameLockI3D(void) {if (GLeeInit()) return wglDisableFrameLockI3D(); return (BOOL)0;} +BOOL __stdcall _Lazy_wglIsEnabledFrameLockI3D(BOOL * pFlag) {if (GLeeInit()) return wglIsEnabledFrameLockI3D(pFlag); return (BOOL)0;} +BOOL __stdcall _Lazy_wglQueryFrameLockMasterI3D(BOOL * pFlag) {if (GLeeInit()) return wglQueryFrameLockMasterI3D(pFlag); return (BOOL)0;} +PFNWGLENABLEFRAMELOCKI3DPROC pwglEnableFrameLockI3D=_Lazy_wglEnableFrameLockI3D; +PFNWGLDISABLEFRAMELOCKI3DPROC pwglDisableFrameLockI3D=_Lazy_wglDisableFrameLockI3D; +PFNWGLISENABLEDFRAMELOCKI3DPROC pwglIsEnabledFrameLockI3D=_Lazy_wglIsEnabledFrameLockI3D; +PFNWGLQUERYFRAMELOCKMASTERI3DPROC pwglQueryFrameLockMasterI3D=_Lazy_wglQueryFrameLockMasterI3D; +#endif + +/* WGL_NV_render_depth_texture */ + +#ifdef __GLEE_WGL_NV_render_depth_texture +#endif + +/* WGL_NV_render_texture_rectangle */ + +#ifdef __GLEE_WGL_NV_render_texture_rectangle +#endif + +/* WGL_ATI_pixel_format_float */ + +#ifdef __GLEE_WGL_ATI_pixel_format_float +#endif + +/* WGL_NV_float_buffer */ + +#ifdef __GLEE_WGL_NV_float_buffer +#endif + +/* WGL_EXT_display_color_table */ + +#ifdef __GLEE_WGL_EXT_display_color_table +GLboolean __stdcall _Lazy_wglCreateDisplayColorTableEXT(GLushort id) {if (GLeeInit()) return wglCreateDisplayColorTableEXT(id); return (GLboolean)0;} +GLboolean __stdcall _Lazy_wglLoadDisplayColorTableEXT(const GLushort * table, GLuint length) {if (GLeeInit()) return wglLoadDisplayColorTableEXT(table, length); return (GLboolean)0;} +GLboolean __stdcall _Lazy_wglBindDisplayColorTableEXT(GLushort id) {if (GLeeInit()) return wglBindDisplayColorTableEXT(id); return (GLboolean)0;} +VOID __stdcall _Lazy_wglDestroyDisplayColorTableEXT(GLushort id) {if (GLeeInit()) wglDestroyDisplayColorTableEXT(id);} +PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC pwglCreateDisplayColorTableEXT=_Lazy_wglCreateDisplayColorTableEXT; +PFNWGLLOADDISPLAYCOLORTABLEEXTPROC pwglLoadDisplayColorTableEXT=_Lazy_wglLoadDisplayColorTableEXT; +PFNWGLBINDDISPLAYCOLORTABLEEXTPROC pwglBindDisplayColorTableEXT=_Lazy_wglBindDisplayColorTableEXT; +PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC pwglDestroyDisplayColorTableEXT=_Lazy_wglDestroyDisplayColorTableEXT; +#endif + +/* WGL_EXT_extensions_string */ + +#ifdef __GLEE_WGL_EXT_extensions_string +const char * __stdcall _Lazy_wglGetExtensionsStringEXT(void) {if (GLeeInit()) return wglGetExtensionsStringEXT(); return (const char *)0;} +PFNWGLGETEXTENSIONSSTRINGEXTPROC pwglGetExtensionsStringEXT=_Lazy_wglGetExtensionsStringEXT; +#endif + +/* WGL_EXT_swap_control */ + +#ifdef __GLEE_WGL_EXT_swap_control +BOOL __stdcall _Lazy_wglSwapIntervalEXT(int interval) {if (GLeeInit()) return wglSwapIntervalEXT(interval); return (BOOL)0;} +int __stdcall _Lazy_wglGetSwapIntervalEXT(void) {if (GLeeInit()) return wglGetSwapIntervalEXT(); return (int)0;} +PFNWGLSWAPINTERVALEXTPROC pwglSwapIntervalEXT=_Lazy_wglSwapIntervalEXT; +PFNWGLGETSWAPINTERVALEXTPROC pwglGetSwapIntervalEXT=_Lazy_wglGetSwapIntervalEXT; +#endif + +/* WGL_NV_vertex_array_range */ + +#ifdef __GLEE_WGL_NV_vertex_array_range +void* __stdcall _Lazy_wglAllocateMemoryNV(GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority) {if (GLeeInit()) return wglAllocateMemoryNV(size, readfreq, writefreq, priority); return (void*)0;} +void __stdcall _Lazy_wglFreeMemoryNV(void * pointer) {if (GLeeInit()) wglFreeMemoryNV(pointer);} +PFNWGLALLOCATEMEMORYNVPROC pwglAllocateMemoryNV=_Lazy_wglAllocateMemoryNV; +PFNWGLFREEMEMORYNVPROC pwglFreeMemoryNV=_Lazy_wglFreeMemoryNV; +#endif + +/* WGL_OML_sync_control */ + +#ifdef __GLEE_WGL_OML_sync_control +BOOL __stdcall _Lazy_wglGetSyncValuesOML(HDC hdc, INT64 * ust, INT64 * msc, INT64 * sbc) {if (GLeeInit()) return wglGetSyncValuesOML(hdc, ust, msc, sbc); return (BOOL)0;} +BOOL __stdcall _Lazy_wglGetMscRateOML(HDC hdc, INT32 * numerator, INT32 * denominator) {if (GLeeInit()) return wglGetMscRateOML(hdc, numerator, denominator); return (BOOL)0;} +INT64 __stdcall _Lazy_wglSwapBuffersMscOML(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder) {if (GLeeInit()) return wglSwapBuffersMscOML(hdc, target_msc, divisor, remainder); return (INT64)0;} +INT64 __stdcall _Lazy_wglSwapLayerBuffersMscOML(HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder) {if (GLeeInit()) return wglSwapLayerBuffersMscOML(hdc, fuPlanes, target_msc, divisor, remainder); return (INT64)0;} +BOOL __stdcall _Lazy_wglWaitForMscOML(HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 * ust, INT64 * msc, INT64 * sbc) {if (GLeeInit()) return wglWaitForMscOML(hdc, target_msc, divisor, remainder, ust, msc, sbc); return (BOOL)0;} +BOOL __stdcall _Lazy_wglWaitForSbcOML(HDC hdc, INT64 target_sbc, INT64 * ust, INT64 * msc, INT64 * sbc) {if (GLeeInit()) return wglWaitForSbcOML(hdc, target_sbc, ust, msc, sbc); return (BOOL)0;} +PFNWGLGETSYNCVALUESOMLPROC pwglGetSyncValuesOML=_Lazy_wglGetSyncValuesOML; +PFNWGLGETMSCRATEOMLPROC pwglGetMscRateOML=_Lazy_wglGetMscRateOML; +PFNWGLSWAPBUFFERSMSCOMLPROC pwglSwapBuffersMscOML=_Lazy_wglSwapBuffersMscOML; +PFNWGLSWAPLAYERBUFFERSMSCOMLPROC pwglSwapLayerBuffersMscOML=_Lazy_wglSwapLayerBuffersMscOML; +PFNWGLWAITFORMSCOMLPROC pwglWaitForMscOML=_Lazy_wglWaitForMscOML; +PFNWGLWAITFORSBCOMLPROC pwglWaitForSbcOML=_Lazy_wglWaitForSbcOML; +#endif + +/* WGL_I3D_swap_frame_usage */ + +#ifdef __GLEE_WGL_I3D_swap_frame_usage +BOOL __stdcall _Lazy_wglGetFrameUsageI3D(float * pUsage) {if (GLeeInit()) return wglGetFrameUsageI3D(pUsage); return (BOOL)0;} +BOOL __stdcall _Lazy_wglBeginFrameTrackingI3D(void) {if (GLeeInit()) return wglBeginFrameTrackingI3D(); return (BOOL)0;} +BOOL __stdcall _Lazy_wglEndFrameTrackingI3D(void) {if (GLeeInit()) return wglEndFrameTrackingI3D(); return (BOOL)0;} +BOOL __stdcall _Lazy_wglQueryFrameTrackingI3D(DWORD * pFrameCount, DWORD * pMissedFrames, float * pLastMissedUsage) {if (GLeeInit()) return wglQueryFrameTrackingI3D(pFrameCount, pMissedFrames, pLastMissedUsage); return (BOOL)0;} +PFNWGLGETFRAMEUSAGEI3DPROC pwglGetFrameUsageI3D=_Lazy_wglGetFrameUsageI3D; +PFNWGLBEGINFRAMETRACKINGI3DPROC pwglBeginFrameTrackingI3D=_Lazy_wglBeginFrameTrackingI3D; +PFNWGLENDFRAMETRACKINGI3DPROC pwglEndFrameTrackingI3D=_Lazy_wglEndFrameTrackingI3D; +PFNWGLQUERYFRAMETRACKINGI3DPROC pwglQueryFrameTrackingI3D=_Lazy_wglQueryFrameTrackingI3D; +#endif + +/* WGL_3DL_stereo_control */ + +#ifdef __GLEE_WGL_3DL_stereo_control +BOOL __stdcall _Lazy_wglSetStereoEmitterState3DL(HDC hDC, UINT uState) {if (GLeeInit()) return wglSetStereoEmitterState3DL(hDC, uState); return (BOOL)0;} +PFNWGLSETSTEREOEMITTERSTATE3DLPROC pwglSetStereoEmitterState3DL=_Lazy_wglSetStereoEmitterState3DL; +#endif +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else /* GLX */ + +/* Extension querying variables */ + +GLboolean _GLEE_GLX_VERSION_1_3 = GL_FALSE; +GLboolean _GLEE_GLX_VERSION_1_4 = GL_FALSE; +GLboolean _GLEE_GLX_ARB_multisample = GL_FALSE; +GLboolean _GLEE_GLX_ARB_fbconfig_float = GL_FALSE; +GLboolean _GLEE_GLX_SGIS_multisample = GL_FALSE; +GLboolean _GLEE_GLX_EXT_visual_info = GL_FALSE; +GLboolean _GLEE_GLX_SGI_swap_control = GL_FALSE; +GLboolean _GLEE_GLX_SGI_video_sync = GL_FALSE; +GLboolean _GLEE_GLX_SGI_make_current_read = GL_FALSE; +GLboolean _GLEE_GLX_EXT_visual_rating = GL_FALSE; +GLboolean _GLEE_GLX_EXT_import_context = GL_FALSE; +GLboolean _GLEE_GLX_SGIX_fbconfig = GL_FALSE; +GLboolean _GLEE_GLX_SGIX_pbuffer = GL_FALSE; +GLboolean _GLEE_GLX_SGI_cushion = GL_FALSE; +GLboolean _GLEE_GLX_SGIX_video_resize = GL_FALSE; +GLboolean _GLEE_GLX_SGIX_swap_group = GL_FALSE; +GLboolean _GLEE_GLX_SGIX_swap_barrier = GL_FALSE; +GLboolean _GLEE_GLX_SGIS_blended_overlay = GL_FALSE; +GLboolean _GLEE_GLX_SGIS_shared_multisample = GL_FALSE; +GLboolean _GLEE_GLX_SUN_get_transparent_index = GL_FALSE; +GLboolean _GLEE_GLX_3DFX_multisample = GL_FALSE; +GLboolean _GLEE_GLX_MESA_copy_sub_buffer = GL_FALSE; +GLboolean _GLEE_GLX_MESA_pixmap_colormap = GL_FALSE; +GLboolean _GLEE_GLX_MESA_release_buffers = GL_FALSE; +GLboolean _GLEE_GLX_MESA_set_3dfx_mode = GL_FALSE; +GLboolean _GLEE_GLX_SGIX_visual_select_group = GL_FALSE; +GLboolean _GLEE_GLX_OML_swap_method = GL_FALSE; +GLboolean _GLEE_GLX_OML_sync_control = GL_FALSE; +GLboolean _GLEE_GLX_NV_float_buffer = GL_FALSE; +GLboolean _GLEE_GLX_SGIX_hyperpipe = GL_FALSE; +GLboolean _GLEE_GLX_MESA_agp_offset = GL_FALSE; +GLboolean _GLEE_GLX_EXT_scene_marker = GL_FALSE; + +/* GLX Extension names */ + +char __GLeeGLXExtensionNames[32][30]={ + "GLX_VERSION_1_3", + "GLX_VERSION_1_4", + "GLX_ARB_multisample", + "GLX_ARB_fbconfig_float", + "GLX_SGIS_multisample", + "GLX_EXT_visual_info", + "GLX_SGI_swap_control", + "GLX_SGI_video_sync", + "GLX_SGI_make_current_read", + "GLX_EXT_visual_rating", + "GLX_EXT_import_context", + "GLX_SGIX_fbconfig", + "GLX_SGIX_pbuffer", + "GLX_SGI_cushion", + "GLX_SGIX_video_resize", + "GLX_SGIX_swap_group", + "GLX_SGIX_swap_barrier", + "GLX_SGIS_blended_overlay", + "GLX_SGIS_shared_multisample", + "GLX_SUN_get_transparent_index", + "GLX_3DFX_multisample", + "GLX_MESA_copy_sub_buffer", + "GLX_MESA_pixmap_colormap", + "GLX_MESA_release_buffers", + "GLX_MESA_set_3dfx_mode", + "GLX_SGIX_visual_select_group", + "GLX_OML_swap_method", + "GLX_OML_sync_control", + "GLX_NV_float_buffer", + "GLX_SGIX_hyperpipe", + "GLX_MESA_agp_offset", + "GLX_EXT_scene_marker" +}; +int __GLeeGLXNumExtensions=32; + +/* GLX_VERSION_1_3 */ + +#ifdef __GLEE_GLX_VERSION_1_3 +GLXFBConfig * __stdcall _Lazy_glXGetFBConfigs(Display * dpy, int screen, int * nelements) {if (GLeeInit()) return glXGetFBConfigs(dpy, screen, nelements); return (GLXFBConfig *)0;} +GLXFBConfig * __stdcall _Lazy_glXChooseFBConfig(Display * dpy, int screen, const int * attrib_list, int * nelements) {if (GLeeInit()) return glXChooseFBConfig(dpy, screen, attrib_list, nelements); return (GLXFBConfig *)0;} +int __stdcall _Lazy_glXGetFBConfigAttrib(Display * dpy, GLXFBConfig config, int attribute, int * value) {if (GLeeInit()) return glXGetFBConfigAttrib(dpy, config, attribute, value); return (int)0;} +XVisualInfo * __stdcall _Lazy_glXGetVisualFromFBConfig(Display * dpy, GLXFBConfig config) {if (GLeeInit()) return glXGetVisualFromFBConfig(dpy, config); return (XVisualInfo *)0;} +GLXWindow __stdcall _Lazy_glXCreateWindow(Display * dpy, GLXFBConfig config, Window win, const int * attrib_list) {if (GLeeInit()) return glXCreateWindow(dpy, config, win, attrib_list); return (GLXWindow)0;} +void __stdcall _Lazy_glXDestroyWindow(Display * dpy, GLXWindow win) {if (GLeeInit()) glXDestroyWindow(dpy, win);} +GLXPixmap __stdcall _Lazy_glXCreatePixmap(Display * dpy, GLXFBConfig config, Pixmap pixmap, const int * attrib_list) {if (GLeeInit()) return glXCreatePixmap(dpy, config, pixmap, attrib_list); return (GLXPixmap)0;} +void __stdcall _Lazy_glXDestroyPixmap(Display * dpy, GLXPixmap pixmap) {if (GLeeInit()) glXDestroyPixmap(dpy, pixmap);} +GLXPbuffer __stdcall _Lazy_glXCreatePbuffer(Display * dpy, GLXFBConfig config, const int * attrib_list) {if (GLeeInit()) return glXCreatePbuffer(dpy, config, attrib_list); return (GLXPbuffer)0;} +void __stdcall _Lazy_glXDestroyPbuffer(Display * dpy, GLXPbuffer pbuf) {if (GLeeInit()) glXDestroyPbuffer(dpy, pbuf);} +void __stdcall _Lazy_glXQueryDrawable(Display * dpy, GLXDrawable draw, int attribute, unsigned int * value) {if (GLeeInit()) glXQueryDrawable(dpy, draw, attribute, value);} +GLXContext __stdcall _Lazy_glXCreateNewContext(Display * dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct) {if (GLeeInit()) return glXCreateNewContext(dpy, config, render_type, share_list, direct); return (GLXContext)0;} +Bool __stdcall _Lazy_glXMakeContextCurrent(Display * dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) {if (GLeeInit()) return glXMakeContextCurrent(dpy, draw, read, ctx); return (Bool)0;} +GLXDrawable __stdcall _Lazy_glXGetCurrentReadDrawable(void) {if (GLeeInit()) return glXGetCurrentReadDrawable(); return (GLXDrawable)0;} +Display * __stdcall _Lazy_glXGetCurrentDisplay(void) {if (GLeeInit()) return glXGetCurrentDisplay(); return (Display *)0;} +int __stdcall _Lazy_glXQueryContext(Display * dpy, GLXContext ctx, int attribute, int * value) {if (GLeeInit()) return glXQueryContext(dpy, ctx, attribute, value); return (int)0;} +void __stdcall _Lazy_glXSelectEvent(Display * dpy, GLXDrawable draw, unsigned long event_mask) {if (GLeeInit()) glXSelectEvent(dpy, draw, event_mask);} +void __stdcall _Lazy_glXGetSelectedEvent(Display * dpy, GLXDrawable draw, unsigned long * event_mask) {if (GLeeInit()) glXGetSelectedEvent(dpy, draw, event_mask);} +PFNGLXGETFBCONFIGSPROC pglXGetFBConfigs=_Lazy_glXGetFBConfigs; +PFNGLXCHOOSEFBCONFIGPROC pglXChooseFBConfig=_Lazy_glXChooseFBConfig; +PFNGLXGETFBCONFIGATTRIBPROC pglXGetFBConfigAttrib=_Lazy_glXGetFBConfigAttrib; +PFNGLXGETVISUALFROMFBCONFIGPROC pglXGetVisualFromFBConfig=_Lazy_glXGetVisualFromFBConfig; +PFNGLXCREATEWINDOWPROC pglXCreateWindow=_Lazy_glXCreateWindow; +PFNGLXDESTROYWINDOWPROC pglXDestroyWindow=_Lazy_glXDestroyWindow; +PFNGLXCREATEPIXMAPPROC pglXCreatePixmap=_Lazy_glXCreatePixmap; +PFNGLXDESTROYPIXMAPPROC pglXDestroyPixmap=_Lazy_glXDestroyPixmap; +PFNGLXCREATEPBUFFERPROC pglXCreatePbuffer=_Lazy_glXCreatePbuffer; +PFNGLXDESTROYPBUFFERPROC pglXDestroyPbuffer=_Lazy_glXDestroyPbuffer; +PFNGLXQUERYDRAWABLEPROC pglXQueryDrawable=_Lazy_glXQueryDrawable; +PFNGLXCREATENEWCONTEXTPROC pglXCreateNewContext=_Lazy_glXCreateNewContext; +PFNGLXMAKECONTEXTCURRENTPROC pglXMakeContextCurrent=_Lazy_glXMakeContextCurrent; +PFNGLXGETCURRENTREADDRAWABLEPROC pglXGetCurrentReadDrawable=_Lazy_glXGetCurrentReadDrawable; +PFNGLXGETCURRENTDISPLAYPROC pglXGetCurrentDisplay=_Lazy_glXGetCurrentDisplay; +PFNGLXQUERYCONTEXTPROC pglXQueryContext=_Lazy_glXQueryContext; +PFNGLXSELECTEVENTPROC pglXSelectEvent=_Lazy_glXSelectEvent; +PFNGLXGETSELECTEDEVENTPROC pglXGetSelectedEvent=_Lazy_glXGetSelectedEvent; +#endif + +/* GLX_VERSION_1_4 */ + +#ifdef __GLEE_GLX_VERSION_1_4 +__GLXextFuncPtr __stdcall _Lazy_glXGetProcAddress(const GLubyte * procName) {if (GLeeInit()) return glXGetProcAddress(procName); return (__GLXextFuncPtr)0;} +PFNGLXGETPROCADDRESSPROC pglXGetProcAddress=_Lazy_glXGetProcAddress; +#endif + +/* GLX_ARB_multisample */ + +#ifdef __GLEE_GLX_ARB_multisample +#endif + +/* GLX_ARB_fbconfig_float */ + +#ifdef __GLEE_GLX_ARB_fbconfig_float +#endif + +/* GLX_SGIS_multisample */ + +#ifdef __GLEE_GLX_SGIS_multisample +#endif + +/* GLX_EXT_visual_info */ + +#ifdef __GLEE_GLX_EXT_visual_info +#endif + +/* GLX_SGI_swap_control */ + +#ifdef __GLEE_GLX_SGI_swap_control +int __stdcall _Lazy_glXSwapIntervalSGI(int interval) {if (GLeeInit()) return glXSwapIntervalSGI(interval); return (int)0;} +PFNGLXSWAPINTERVALSGIPROC pglXSwapIntervalSGI=_Lazy_glXSwapIntervalSGI; +#endif + +/* GLX_SGI_video_sync */ + +#ifdef __GLEE_GLX_SGI_video_sync +int __stdcall _Lazy_glXGetVideoSyncSGI(unsigned int * count) {if (GLeeInit()) return glXGetVideoSyncSGI(count); return (int)0;} +int __stdcall _Lazy_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int * count) {if (GLeeInit()) return glXWaitVideoSyncSGI(divisor, remainder, count); return (int)0;} +PFNGLXGETVIDEOSYNCSGIPROC pglXGetVideoSyncSGI=_Lazy_glXGetVideoSyncSGI; +PFNGLXWAITVIDEOSYNCSGIPROC pglXWaitVideoSyncSGI=_Lazy_glXWaitVideoSyncSGI; +#endif + +/* GLX_SGI_make_current_read */ + +#ifdef __GLEE_GLX_SGI_make_current_read +Bool __stdcall _Lazy_glXMakeCurrentReadSGI(Display * dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx) {if (GLeeInit()) return glXMakeCurrentReadSGI(dpy, draw, read, ctx); return (Bool)0;} +GLXDrawable __stdcall _Lazy_glXGetCurrentReadDrawableSGI(void) {if (GLeeInit()) return glXGetCurrentReadDrawableSGI(); return (GLXDrawable)0;} +PFNGLXMAKECURRENTREADSGIPROC pglXMakeCurrentReadSGI=_Lazy_glXMakeCurrentReadSGI; +PFNGLXGETCURRENTREADDRAWABLESGIPROC pglXGetCurrentReadDrawableSGI=_Lazy_glXGetCurrentReadDrawableSGI; +#endif + +/* GLX_EXT_visual_rating */ + +#ifdef __GLEE_GLX_EXT_visual_rating +#endif + +/* GLX_EXT_import_context */ + +#ifdef __GLEE_GLX_EXT_import_context +Display * __stdcall _Lazy_glXGetCurrentDisplayEXT(void) {if (GLeeInit()) return glXGetCurrentDisplayEXT(); return (Display *)0;} +int __stdcall _Lazy_glXQueryContextInfoEXT(Display * dpy, GLXContext context, int attribute, int * value) {if (GLeeInit()) return glXQueryContextInfoEXT(dpy, context, attribute, value); return (int)0;} +GLXContextID __stdcall _Lazy_glXGetContextIDEXT(const GLXContext context) {if (GLeeInit()) return glXGetContextIDEXT(context); return (GLXContextID)0;} +GLXContext __stdcall _Lazy_glXImportContextEXT(Display * dpy, GLXContextID contextID) {if (GLeeInit()) return glXImportContextEXT(dpy, contextID); return (GLXContext)0;} +void __stdcall _Lazy_glXFreeContextEXT(Display * dpy, GLXContext context) {if (GLeeInit()) glXFreeContextEXT(dpy, context);} +PFNGLXGETCURRENTDISPLAYEXTPROC pglXGetCurrentDisplayEXT=_Lazy_glXGetCurrentDisplayEXT; +PFNGLXQUERYCONTEXTINFOEXTPROC pglXQueryContextInfoEXT=_Lazy_glXQueryContextInfoEXT; +PFNGLXGETCONTEXTIDEXTPROC pglXGetContextIDEXT=_Lazy_glXGetContextIDEXT; +PFNGLXIMPORTCONTEXTEXTPROC pglXImportContextEXT=_Lazy_glXImportContextEXT; +PFNGLXFREECONTEXTEXTPROC pglXFreeContextEXT=_Lazy_glXFreeContextEXT; +#endif + +/* GLX_SGIX_fbconfig */ + +#ifdef __GLEE_GLX_SGIX_fbconfig +int __stdcall _Lazy_glXGetFBConfigAttribSGIX(Display * dpy, GLXFBConfigSGIX config, int attribute, int * value) {if (GLeeInit()) return glXGetFBConfigAttribSGIX(dpy, config, attribute, value); return (int)0;} +GLXFBConfigSGIX * __stdcall _Lazy_glXChooseFBConfigSGIX(Display * dpy, int screen, int * attrib_list, int * nelements) {if (GLeeInit()) return glXChooseFBConfigSGIX(dpy, screen, attrib_list, nelements); return (GLXFBConfigSGIX *)0;} +GLXPixmap __stdcall _Lazy_glXCreateGLXPixmapWithConfigSGIX(Display * dpy, GLXFBConfigSGIX config, Pixmap pixmap) {if (GLeeInit()) return glXCreateGLXPixmapWithConfigSGIX(dpy, config, pixmap); return (GLXPixmap)0;} +GLXContext __stdcall _Lazy_glXCreateContextWithConfigSGIX(Display * dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct) {if (GLeeInit()) return glXCreateContextWithConfigSGIX(dpy, config, render_type, share_list, direct); return (GLXContext)0;} +XVisualInfo * __stdcall _Lazy_glXGetVisualFromFBConfigSGIX(Display * dpy, GLXFBConfigSGIX config) {if (GLeeInit()) return glXGetVisualFromFBConfigSGIX(dpy, config); return (XVisualInfo *)0;} +GLXFBConfigSGIX __stdcall _Lazy_glXGetFBConfigFromVisualSGIX(Display * dpy, XVisualInfo * vis) {if (GLeeInit()) return glXGetFBConfigFromVisualSGIX(dpy, vis); return (GLXFBConfigSGIX)0;} +PFNGLXGETFBCONFIGATTRIBSGIXPROC pglXGetFBConfigAttribSGIX=_Lazy_glXGetFBConfigAttribSGIX; +PFNGLXCHOOSEFBCONFIGSGIXPROC pglXChooseFBConfigSGIX=_Lazy_glXChooseFBConfigSGIX; +PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC pglXCreateGLXPixmapWithConfigSGIX=_Lazy_glXCreateGLXPixmapWithConfigSGIX; +PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC pglXCreateContextWithConfigSGIX=_Lazy_glXCreateContextWithConfigSGIX; +PFNGLXGETVISUALFROMFBCONFIGSGIXPROC pglXGetVisualFromFBConfigSGIX=_Lazy_glXGetVisualFromFBConfigSGIX; +PFNGLXGETFBCONFIGFROMVISUALSGIXPROC pglXGetFBConfigFromVisualSGIX=_Lazy_glXGetFBConfigFromVisualSGIX; +#endif + +/* GLX_SGIX_pbuffer */ + +#ifdef __GLEE_GLX_SGIX_pbuffer +GLXPbufferSGIX __stdcall _Lazy_glXCreateGLXPbufferSGIX(Display * dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int * attrib_list) {if (GLeeInit()) return glXCreateGLXPbufferSGIX(dpy, config, width, height, attrib_list); return (GLXPbufferSGIX)0;} +void __stdcall _Lazy_glXDestroyGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX pbuf) {if (GLeeInit()) glXDestroyGLXPbufferSGIX(dpy, pbuf);} +int __stdcall _Lazy_glXQueryGLXPbufferSGIX(Display * dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int * value) {if (GLeeInit()) return glXQueryGLXPbufferSGIX(dpy, pbuf, attribute, value); return (int)0;} +void __stdcall _Lazy_glXSelectEventSGIX(Display * dpy, GLXDrawable drawable, unsigned long mask) {if (GLeeInit()) glXSelectEventSGIX(dpy, drawable, mask);} +void __stdcall _Lazy_glXGetSelectedEventSGIX(Display * dpy, GLXDrawable drawable, unsigned long * mask) {if (GLeeInit()) glXGetSelectedEventSGIX(dpy, drawable, mask);} +PFNGLXCREATEGLXPBUFFERSGIXPROC pglXCreateGLXPbufferSGIX=_Lazy_glXCreateGLXPbufferSGIX; +PFNGLXDESTROYGLXPBUFFERSGIXPROC pglXDestroyGLXPbufferSGIX=_Lazy_glXDestroyGLXPbufferSGIX; +PFNGLXQUERYGLXPBUFFERSGIXPROC pglXQueryGLXPbufferSGIX=_Lazy_glXQueryGLXPbufferSGIX; +PFNGLXSELECTEVENTSGIXPROC pglXSelectEventSGIX=_Lazy_glXSelectEventSGIX; +PFNGLXGETSELECTEDEVENTSGIXPROC pglXGetSelectedEventSGIX=_Lazy_glXGetSelectedEventSGIX; +#endif + +/* GLX_SGI_cushion */ + +#ifdef __GLEE_GLX_SGI_cushion +void __stdcall _Lazy_glXCushionSGI(Display * dpy, Window window, float cushion) {if (GLeeInit()) glXCushionSGI(dpy, window, cushion);} +PFNGLXCUSHIONSGIPROC pglXCushionSGI=_Lazy_glXCushionSGI; +#endif + +/* GLX_SGIX_video_resize */ + +#ifdef __GLEE_GLX_SGIX_video_resize +int __stdcall _Lazy_glXBindChannelToWindowSGIX(Display * display, int screen, int channel, Window window) {if (GLeeInit()) return glXBindChannelToWindowSGIX(display, screen, channel, window); return (int)0;} +int __stdcall _Lazy_glXChannelRectSGIX(Display * display, int screen, int channel, int x, int y, int w, int h) {if (GLeeInit()) return glXChannelRectSGIX(display, screen, channel, x, y, w, h); return (int)0;} +int __stdcall _Lazy_glXQueryChannelRectSGIX(Display * display, int screen, int channel, int * dx, int * dy, int * dw, int * dh) {if (GLeeInit()) return glXQueryChannelRectSGIX(display, screen, channel, dx, dy, dw, dh); return (int)0;} +int __stdcall _Lazy_glXQueryChannelDeltasSGIX(Display * display, int screen, int channel, int * x, int * y, int * w, int * h) {if (GLeeInit()) return glXQueryChannelDeltasSGIX(display, screen, channel, x, y, w, h); return (int)0;} +int __stdcall _Lazy_glXChannelRectSyncSGIX(Display * display, int screen, int channel, GLenum synctype) {if (GLeeInit()) return glXChannelRectSyncSGIX(display, screen, channel, synctype); return (int)0;} +PFNGLXBINDCHANNELTOWINDOWSGIXPROC pglXBindChannelToWindowSGIX=_Lazy_glXBindChannelToWindowSGIX; +PFNGLXCHANNELRECTSGIXPROC pglXChannelRectSGIX=_Lazy_glXChannelRectSGIX; +PFNGLXQUERYCHANNELRECTSGIXPROC pglXQueryChannelRectSGIX=_Lazy_glXQueryChannelRectSGIX; +PFNGLXQUERYCHANNELDELTASSGIXPROC pglXQueryChannelDeltasSGIX=_Lazy_glXQueryChannelDeltasSGIX; +PFNGLXCHANNELRECTSYNCSGIXPROC pglXChannelRectSyncSGIX=_Lazy_glXChannelRectSyncSGIX; +#endif + +/* GLX_SGIX_swap_group */ + +#ifdef __GLEE_GLX_SGIX_swap_group +void __stdcall _Lazy_glXJoinSwapGroupSGIX(Display * dpy, GLXDrawable drawable, GLXDrawable member) {if (GLeeInit()) glXJoinSwapGroupSGIX(dpy, drawable, member);} +PFNGLXJOINSWAPGROUPSGIXPROC pglXJoinSwapGroupSGIX=_Lazy_glXJoinSwapGroupSGIX; +#endif + +/* GLX_SGIX_swap_barrier */ + +#ifdef __GLEE_GLX_SGIX_swap_barrier +void __stdcall _Lazy_glXBindSwapBarrierSGIX(Display * dpy, GLXDrawable drawable, int barrier) {if (GLeeInit()) glXBindSwapBarrierSGIX(dpy, drawable, barrier);} +Bool __stdcall _Lazy_glXQueryMaxSwapBarriersSGIX(Display * dpy, int screen, int * max) {if (GLeeInit()) return glXQueryMaxSwapBarriersSGIX(dpy, screen, max); return (Bool)0;} +PFNGLXBINDSWAPBARRIERSGIXPROC pglXBindSwapBarrierSGIX=_Lazy_glXBindSwapBarrierSGIX; +PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC pglXQueryMaxSwapBarriersSGIX=_Lazy_glXQueryMaxSwapBarriersSGIX; +#endif + +/* GLX_SGIS_blended_overlay */ + +#ifdef __GLEE_GLX_SGIS_blended_overlay +#endif + +/* GLX_SGIS_shared_multisample */ + +#ifdef __GLEE_GLX_SGIS_shared_multisample +#endif + +/* GLX_SUN_get_transparent_index */ + +#ifdef __GLEE_GLX_SUN_get_transparent_index +Status __stdcall _Lazy_glXGetTransparentIndexSUN(Display * dpy, Window overlay, Window underlay, long * pTransparentIndex) {if (GLeeInit()) return glXGetTransparentIndexSUN(dpy, overlay, underlay, pTransparentIndex); return (Status)0;} +PFNGLXGETTRANSPARENTINDEXSUNPROC pglXGetTransparentIndexSUN=_Lazy_glXGetTransparentIndexSUN; +#endif + +/* GLX_3DFX_multisample */ + +#ifdef __GLEE_GLX_3DFX_multisample +#endif + +/* GLX_MESA_copy_sub_buffer */ + +#ifdef __GLEE_GLX_MESA_copy_sub_buffer +void __stdcall _Lazy_glXCopySubBufferMESA(Display * dpy, GLXDrawable drawable, int x, int y, int width, int height) {if (GLeeInit()) glXCopySubBufferMESA(dpy, drawable, x, y, width, height);} +PFNGLXCOPYSUBBUFFERMESAPROC pglXCopySubBufferMESA=_Lazy_glXCopySubBufferMESA; +#endif + +/* GLX_MESA_pixmap_colormap */ + +#ifdef __GLEE_GLX_MESA_pixmap_colormap +GLXPixmap __stdcall _Lazy_glXCreateGLXPixmapMESA(Display * dpy, XVisualInfo * visual, Pixmap pixmap, Colormap cmap) {if (GLeeInit()) return glXCreateGLXPixmapMESA(dpy, visual, pixmap, cmap); return (GLXPixmap)0;} +PFNGLXCREATEGLXPIXMAPMESAPROC pglXCreateGLXPixmapMESA=_Lazy_glXCreateGLXPixmapMESA; +#endif + +/* GLX_MESA_release_buffers */ + +#ifdef __GLEE_GLX_MESA_release_buffers +Bool __stdcall _Lazy_glXReleaseBuffersMESA(Display * dpy, GLXDrawable drawable) {if (GLeeInit()) return glXReleaseBuffersMESA(dpy, drawable); return (Bool)0;} +PFNGLXRELEASEBUFFERSMESAPROC pglXReleaseBuffersMESA=_Lazy_glXReleaseBuffersMESA; +#endif + +/* GLX_MESA_set_3dfx_mode */ + +#ifdef __GLEE_GLX_MESA_set_3dfx_mode +Bool __stdcall _Lazy_glXSet3DfxModeMESA(int mode) {if (GLeeInit()) return glXSet3DfxModeMESA(mode); return (Bool)0;} +PFNGLXSET3DFXMODEMESAPROC pglXSet3DfxModeMESA=_Lazy_glXSet3DfxModeMESA; +#endif + +/* GLX_SGIX_visual_select_group */ + +#ifdef __GLEE_GLX_SGIX_visual_select_group +#endif + +/* GLX_OML_swap_method */ + +#ifdef __GLEE_GLX_OML_swap_method +#endif + +/* GLX_OML_sync_control */ + +#ifdef __GLEE_GLX_OML_sync_control +Bool __stdcall _Lazy_glXGetSyncValuesOML(Display * dpy, GLXDrawable drawable, int64_t * ust, int64_t * msc, int64_t * sbc) {if (GLeeInit()) return glXGetSyncValuesOML(dpy, drawable, ust, msc, sbc); return (Bool)0;} +Bool __stdcall _Lazy_glXGetMscRateOML(Display * dpy, GLXDrawable drawable, int32_t * numerator, int32_t * denominator) {if (GLeeInit()) return glXGetMscRateOML(dpy, drawable, numerator, denominator); return (Bool)0;} +int64_t __stdcall _Lazy_glXSwapBuffersMscOML(Display * dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder) {if (GLeeInit()) return glXSwapBuffersMscOML(dpy, drawable, target_msc, divisor, remainder); return (int64_t)0;} +Bool __stdcall _Lazy_glXWaitForMscOML(Display * dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * ust, int64_t * msc, int64_t * sbc) {if (GLeeInit()) return glXWaitForMscOML(dpy, drawable, target_msc, divisor, remainder, ust, msc, sbc); return (Bool)0;} +Bool __stdcall _Lazy_glXWaitForSbcOML(Display * dpy, GLXDrawable drawable, int64_t target_sbc, int64_t * ust, int64_t * msc, int64_t * sbc) {if (GLeeInit()) return glXWaitForSbcOML(dpy, drawable, target_sbc, ust, msc, sbc); return (Bool)0;} +PFNGLXGETSYNCVALUESOMLPROC pglXGetSyncValuesOML=_Lazy_glXGetSyncValuesOML; +PFNGLXGETMSCRATEOMLPROC pglXGetMscRateOML=_Lazy_glXGetMscRateOML; +PFNGLXSWAPBUFFERSMSCOMLPROC pglXSwapBuffersMscOML=_Lazy_glXSwapBuffersMscOML; +PFNGLXWAITFORMSCOMLPROC pglXWaitForMscOML=_Lazy_glXWaitForMscOML; +PFNGLXWAITFORSBCOMLPROC pglXWaitForSbcOML=_Lazy_glXWaitForSbcOML; +#endif + +/* GLX_NV_float_buffer */ + +#ifdef __GLEE_GLX_NV_float_buffer +#endif + +/* GLX_SGIX_hyperpipe */ + +#ifdef __GLEE_GLX_SGIX_hyperpipe +GLXHyperpipeNetworkSGIX * __stdcall _Lazy_glXQueryHyperpipeNetworkSGIX(Display * dpy, int * npipes) {if (GLeeInit()) return glXQueryHyperpipeNetworkSGIX(dpy, npipes); return (GLXHyperpipeNetworkSGIX *)0;} +int __stdcall _Lazy_glXHyperpipeConfigSGIX(Display * dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX * cfg, int * hpId) {if (GLeeInit()) return glXHyperpipeConfigSGIX(dpy, networkId, npipes, cfg, hpId); return (int)0;} +GLXHyperpipeConfigSGIX * __stdcall _Lazy_glXQueryHyperpipeConfigSGIX(Display * dpy, int hpId, int * npipes) {if (GLeeInit()) return glXQueryHyperpipeConfigSGIX(dpy, hpId, npipes); return (GLXHyperpipeConfigSGIX *)0;} +int __stdcall _Lazy_glXDestroyHyperpipeConfigSGIX(Display * dpy, int hpId) {if (GLeeInit()) return glXDestroyHyperpipeConfigSGIX(dpy, hpId); return (int)0;} +int __stdcall _Lazy_glXBindHyperpipeSGIX(Display * dpy, int hpId) {if (GLeeInit()) return glXBindHyperpipeSGIX(dpy, hpId); return (int)0;} +int __stdcall _Lazy_glXQueryHyperpipeBestAttribSGIX(Display * dpy, int timeSlice, int attrib, int size, void * attribList, void * returnAttribList) {if (GLeeInit()) return glXQueryHyperpipeBestAttribSGIX(dpy, timeSlice, attrib, size, attribList, returnAttribList); return (int)0;} +int __stdcall _Lazy_glXHyperpipeAttribSGIX(Display * dpy, int timeSlice, int attrib, int size, void * attribList) {if (GLeeInit()) return glXHyperpipeAttribSGIX(dpy, timeSlice, attrib, size, attribList); return (int)0;} +int __stdcall _Lazy_glXQueryHyperpipeAttribSGIX(Display * dpy, int timeSlice, int attrib, int size, void * returnAttribList) {if (GLeeInit()) return glXQueryHyperpipeAttribSGIX(dpy, timeSlice, attrib, size, returnAttribList); return (int)0;} +PFNGLXQUERYHYPERPIPENETWORKSGIXPROC pglXQueryHyperpipeNetworkSGIX=_Lazy_glXQueryHyperpipeNetworkSGIX; +PFNGLXHYPERPIPECONFIGSGIXPROC pglXHyperpipeConfigSGIX=_Lazy_glXHyperpipeConfigSGIX; +PFNGLXQUERYHYPERPIPECONFIGSGIXPROC pglXQueryHyperpipeConfigSGIX=_Lazy_glXQueryHyperpipeConfigSGIX; +PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC pglXDestroyHyperpipeConfigSGIX=_Lazy_glXDestroyHyperpipeConfigSGIX; +PFNGLXBINDHYPERPIPESGIXPROC pglXBindHyperpipeSGIX=_Lazy_glXBindHyperpipeSGIX; +PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC pglXQueryHyperpipeBestAttribSGIX=_Lazy_glXQueryHyperpipeBestAttribSGIX; +PFNGLXHYPERPIPEATTRIBSGIXPROC pglXHyperpipeAttribSGIX=_Lazy_glXHyperpipeAttribSGIX; +PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC pglXQueryHyperpipeAttribSGIX=_Lazy_glXQueryHyperpipeAttribSGIX; +#endif + +/* GLX_MESA_agp_offset */ + +#ifdef __GLEE_GLX_MESA_agp_offset +unsigned int __stdcall _Lazy_glXGetAGPOffsetMESA(const void * pointer) {if (GLeeInit()) return glXGetAGPOffsetMESA(pointer); return (unsigned int)0;} +PFNGLXGETAGPOFFSETMESAPROC pglXGetAGPOffsetMESA=_Lazy_glXGetAGPOffsetMESA; +#endif + +/* GLX_EXT_scene_marker */ + +#ifdef __GLEE_GLX_EXT_scene_marker +#endif +#endif /* end GLX */ +/***************************************************************** +* Extension link functions +*****************************************************************/ + +GLuint __GLeeLink_GL_VERSION_1_2(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_VERSION_1_2 + if ((pglBlendColor = (PFNGLBLENDCOLORPROC) __GLeeGetProcAddress("glBlendColor"))!=0) nLinked++; + if ((pglBlendEquation = (PFNGLBLENDEQUATIONPROC) __GLeeGetProcAddress("glBlendEquation"))!=0) nLinked++; + if ((pglDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC) __GLeeGetProcAddress("glDrawRangeElements"))!=0) nLinked++; + if ((pglColorTable = (PFNGLCOLORTABLEPROC) __GLeeGetProcAddress("glColorTable"))!=0) nLinked++; + if ((pglColorTableParameterfv = (PFNGLCOLORTABLEPARAMETERFVPROC) __GLeeGetProcAddress("glColorTableParameterfv"))!=0) nLinked++; + if ((pglColorTableParameteriv = (PFNGLCOLORTABLEPARAMETERIVPROC) __GLeeGetProcAddress("glColorTableParameteriv"))!=0) nLinked++; + if ((pglCopyColorTable = (PFNGLCOPYCOLORTABLEPROC) __GLeeGetProcAddress("glCopyColorTable"))!=0) nLinked++; + if ((pglGetColorTable = (PFNGLGETCOLORTABLEPROC) __GLeeGetProcAddress("glGetColorTable"))!=0) nLinked++; + if ((pglGetColorTableParameterfv = (PFNGLGETCOLORTABLEPARAMETERFVPROC) __GLeeGetProcAddress("glGetColorTableParameterfv"))!=0) nLinked++; + if ((pglGetColorTableParameteriv = (PFNGLGETCOLORTABLEPARAMETERIVPROC) __GLeeGetProcAddress("glGetColorTableParameteriv"))!=0) nLinked++; + if ((pglColorSubTable = (PFNGLCOLORSUBTABLEPROC) __GLeeGetProcAddress("glColorSubTable"))!=0) nLinked++; + if ((pglCopyColorSubTable = (PFNGLCOPYCOLORSUBTABLEPROC) __GLeeGetProcAddress("glCopyColorSubTable"))!=0) nLinked++; + if ((pglConvolutionFilter1D = (PFNGLCONVOLUTIONFILTER1DPROC) __GLeeGetProcAddress("glConvolutionFilter1D"))!=0) nLinked++; + if ((pglConvolutionFilter2D = (PFNGLCONVOLUTIONFILTER2DPROC) __GLeeGetProcAddress("glConvolutionFilter2D"))!=0) nLinked++; + if ((pglConvolutionParameterf = (PFNGLCONVOLUTIONPARAMETERFPROC) __GLeeGetProcAddress("glConvolutionParameterf"))!=0) nLinked++; + if ((pglConvolutionParameterfv = (PFNGLCONVOLUTIONPARAMETERFVPROC) __GLeeGetProcAddress("glConvolutionParameterfv"))!=0) nLinked++; + if ((pglConvolutionParameteri = (PFNGLCONVOLUTIONPARAMETERIPROC) __GLeeGetProcAddress("glConvolutionParameteri"))!=0) nLinked++; + if ((pglConvolutionParameteriv = (PFNGLCONVOLUTIONPARAMETERIVPROC) __GLeeGetProcAddress("glConvolutionParameteriv"))!=0) nLinked++; + if ((pglCopyConvolutionFilter1D = (PFNGLCOPYCONVOLUTIONFILTER1DPROC) __GLeeGetProcAddress("glCopyConvolutionFilter1D"))!=0) nLinked++; + if ((pglCopyConvolutionFilter2D = (PFNGLCOPYCONVOLUTIONFILTER2DPROC) __GLeeGetProcAddress("glCopyConvolutionFilter2D"))!=0) nLinked++; + if ((pglGetConvolutionFilter = (PFNGLGETCONVOLUTIONFILTERPROC) __GLeeGetProcAddress("glGetConvolutionFilter"))!=0) nLinked++; + if ((pglGetConvolutionParameterfv = (PFNGLGETCONVOLUTIONPARAMETERFVPROC) __GLeeGetProcAddress("glGetConvolutionParameterfv"))!=0) nLinked++; + if ((pglGetConvolutionParameteriv = (PFNGLGETCONVOLUTIONPARAMETERIVPROC) __GLeeGetProcAddress("glGetConvolutionParameteriv"))!=0) nLinked++; + if ((pglGetSeparableFilter = (PFNGLGETSEPARABLEFILTERPROC) __GLeeGetProcAddress("glGetSeparableFilter"))!=0) nLinked++; + if ((pglSeparableFilter2D = (PFNGLSEPARABLEFILTER2DPROC) __GLeeGetProcAddress("glSeparableFilter2D"))!=0) nLinked++; + if ((pglGetHistogram = (PFNGLGETHISTOGRAMPROC) __GLeeGetProcAddress("glGetHistogram"))!=0) nLinked++; + if ((pglGetHistogramParameterfv = (PFNGLGETHISTOGRAMPARAMETERFVPROC) __GLeeGetProcAddress("glGetHistogramParameterfv"))!=0) nLinked++; + if ((pglGetHistogramParameteriv = (PFNGLGETHISTOGRAMPARAMETERIVPROC) __GLeeGetProcAddress("glGetHistogramParameteriv"))!=0) nLinked++; + if ((pglGetMinmax = (PFNGLGETMINMAXPROC) __GLeeGetProcAddress("glGetMinmax"))!=0) nLinked++; + if ((pglGetMinmaxParameterfv = (PFNGLGETMINMAXPARAMETERFVPROC) __GLeeGetProcAddress("glGetMinmaxParameterfv"))!=0) nLinked++; + if ((pglGetMinmaxParameteriv = (PFNGLGETMINMAXPARAMETERIVPROC) __GLeeGetProcAddress("glGetMinmaxParameteriv"))!=0) nLinked++; + if ((pglHistogram = (PFNGLHISTOGRAMPROC) __GLeeGetProcAddress("glHistogram"))!=0) nLinked++; + if ((pglMinmax = (PFNGLMINMAXPROC) __GLeeGetProcAddress("glMinmax"))!=0) nLinked++; + if ((pglResetHistogram = (PFNGLRESETHISTOGRAMPROC) __GLeeGetProcAddress("glResetHistogram"))!=0) nLinked++; + if ((pglResetMinmax = (PFNGLRESETMINMAXPROC) __GLeeGetProcAddress("glResetMinmax"))!=0) nLinked++; + if ((pglTexImage3D = (PFNGLTEXIMAGE3DPROC) __GLeeGetProcAddress("glTexImage3D"))!=0) nLinked++; + if ((pglTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC) __GLeeGetProcAddress("glTexSubImage3D"))!=0) nLinked++; + if ((pglCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC) __GLeeGetProcAddress("glCopyTexSubImage3D"))!=0) nLinked++; +#endif + if (nLinked==38) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_imaging(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_VERSION_1_3(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_VERSION_1_3 + if ((pglActiveTexture = (PFNGLACTIVETEXTUREPROC) __GLeeGetProcAddress("glActiveTexture"))!=0) nLinked++; + if ((pglClientActiveTexture = (PFNGLCLIENTACTIVETEXTUREPROC) __GLeeGetProcAddress("glClientActiveTexture"))!=0) nLinked++; + if ((pglMultiTexCoord1d = (PFNGLMULTITEXCOORD1DPROC) __GLeeGetProcAddress("glMultiTexCoord1d"))!=0) nLinked++; + if ((pglMultiTexCoord1dv = (PFNGLMULTITEXCOORD1DVPROC) __GLeeGetProcAddress("glMultiTexCoord1dv"))!=0) nLinked++; + if ((pglMultiTexCoord1f = (PFNGLMULTITEXCOORD1FPROC) __GLeeGetProcAddress("glMultiTexCoord1f"))!=0) nLinked++; + if ((pglMultiTexCoord1fv = (PFNGLMULTITEXCOORD1FVPROC) __GLeeGetProcAddress("glMultiTexCoord1fv"))!=0) nLinked++; + if ((pglMultiTexCoord1i = (PFNGLMULTITEXCOORD1IPROC) __GLeeGetProcAddress("glMultiTexCoord1i"))!=0) nLinked++; + if ((pglMultiTexCoord1iv = (PFNGLMULTITEXCOORD1IVPROC) __GLeeGetProcAddress("glMultiTexCoord1iv"))!=0) nLinked++; + if ((pglMultiTexCoord1s = (PFNGLMULTITEXCOORD1SPROC) __GLeeGetProcAddress("glMultiTexCoord1s"))!=0) nLinked++; + if ((pglMultiTexCoord1sv = (PFNGLMULTITEXCOORD1SVPROC) __GLeeGetProcAddress("glMultiTexCoord1sv"))!=0) nLinked++; + if ((pglMultiTexCoord2d = (PFNGLMULTITEXCOORD2DPROC) __GLeeGetProcAddress("glMultiTexCoord2d"))!=0) nLinked++; + if ((pglMultiTexCoord2dv = (PFNGLMULTITEXCOORD2DVPROC) __GLeeGetProcAddress("glMultiTexCoord2dv"))!=0) nLinked++; + if ((pglMultiTexCoord2f = (PFNGLMULTITEXCOORD2FPROC) __GLeeGetProcAddress("glMultiTexCoord2f"))!=0) nLinked++; + if ((pglMultiTexCoord2fv = (PFNGLMULTITEXCOORD2FVPROC) __GLeeGetProcAddress("glMultiTexCoord2fv"))!=0) nLinked++; + if ((pglMultiTexCoord2i = (PFNGLMULTITEXCOORD2IPROC) __GLeeGetProcAddress("glMultiTexCoord2i"))!=0) nLinked++; + if ((pglMultiTexCoord2iv = (PFNGLMULTITEXCOORD2IVPROC) __GLeeGetProcAddress("glMultiTexCoord2iv"))!=0) nLinked++; + if ((pglMultiTexCoord2s = (PFNGLMULTITEXCOORD2SPROC) __GLeeGetProcAddress("glMultiTexCoord2s"))!=0) nLinked++; + if ((pglMultiTexCoord2sv = (PFNGLMULTITEXCOORD2SVPROC) __GLeeGetProcAddress("glMultiTexCoord2sv"))!=0) nLinked++; + if ((pglMultiTexCoord3d = (PFNGLMULTITEXCOORD3DPROC) __GLeeGetProcAddress("glMultiTexCoord3d"))!=0) nLinked++; + if ((pglMultiTexCoord3dv = (PFNGLMULTITEXCOORD3DVPROC) __GLeeGetProcAddress("glMultiTexCoord3dv"))!=0) nLinked++; + if ((pglMultiTexCoord3f = (PFNGLMULTITEXCOORD3FPROC) __GLeeGetProcAddress("glMultiTexCoord3f"))!=0) nLinked++; + if ((pglMultiTexCoord3fv = (PFNGLMULTITEXCOORD3FVPROC) __GLeeGetProcAddress("glMultiTexCoord3fv"))!=0) nLinked++; + if ((pglMultiTexCoord3i = (PFNGLMULTITEXCOORD3IPROC) __GLeeGetProcAddress("glMultiTexCoord3i"))!=0) nLinked++; + if ((pglMultiTexCoord3iv = (PFNGLMULTITEXCOORD3IVPROC) __GLeeGetProcAddress("glMultiTexCoord3iv"))!=0) nLinked++; + if ((pglMultiTexCoord3s = (PFNGLMULTITEXCOORD3SPROC) __GLeeGetProcAddress("glMultiTexCoord3s"))!=0) nLinked++; + if ((pglMultiTexCoord3sv = (PFNGLMULTITEXCOORD3SVPROC) __GLeeGetProcAddress("glMultiTexCoord3sv"))!=0) nLinked++; + if ((pglMultiTexCoord4d = (PFNGLMULTITEXCOORD4DPROC) __GLeeGetProcAddress("glMultiTexCoord4d"))!=0) nLinked++; + if ((pglMultiTexCoord4dv = (PFNGLMULTITEXCOORD4DVPROC) __GLeeGetProcAddress("glMultiTexCoord4dv"))!=0) nLinked++; + if ((pglMultiTexCoord4f = (PFNGLMULTITEXCOORD4FPROC) __GLeeGetProcAddress("glMultiTexCoord4f"))!=0) nLinked++; + if ((pglMultiTexCoord4fv = (PFNGLMULTITEXCOORD4FVPROC) __GLeeGetProcAddress("glMultiTexCoord4fv"))!=0) nLinked++; + if ((pglMultiTexCoord4i = (PFNGLMULTITEXCOORD4IPROC) __GLeeGetProcAddress("glMultiTexCoord4i"))!=0) nLinked++; + if ((pglMultiTexCoord4iv = (PFNGLMULTITEXCOORD4IVPROC) __GLeeGetProcAddress("glMultiTexCoord4iv"))!=0) nLinked++; + if ((pglMultiTexCoord4s = (PFNGLMULTITEXCOORD4SPROC) __GLeeGetProcAddress("glMultiTexCoord4s"))!=0) nLinked++; + if ((pglMultiTexCoord4sv = (PFNGLMULTITEXCOORD4SVPROC) __GLeeGetProcAddress("glMultiTexCoord4sv"))!=0) nLinked++; + if ((pglLoadTransposeMatrixf = (PFNGLLOADTRANSPOSEMATRIXFPROC) __GLeeGetProcAddress("glLoadTransposeMatrixf"))!=0) nLinked++; + if ((pglLoadTransposeMatrixd = (PFNGLLOADTRANSPOSEMATRIXDPROC) __GLeeGetProcAddress("glLoadTransposeMatrixd"))!=0) nLinked++; + if ((pglMultTransposeMatrixf = (PFNGLMULTTRANSPOSEMATRIXFPROC) __GLeeGetProcAddress("glMultTransposeMatrixf"))!=0) nLinked++; + if ((pglMultTransposeMatrixd = (PFNGLMULTTRANSPOSEMATRIXDPROC) __GLeeGetProcAddress("glMultTransposeMatrixd"))!=0) nLinked++; + if ((pglSampleCoverage = (PFNGLSAMPLECOVERAGEPROC) __GLeeGetProcAddress("glSampleCoverage"))!=0) nLinked++; + if ((pglCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC) __GLeeGetProcAddress("glCompressedTexImage3D"))!=0) nLinked++; + if ((pglCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC) __GLeeGetProcAddress("glCompressedTexImage2D"))!=0) nLinked++; + if ((pglCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC) __GLeeGetProcAddress("glCompressedTexImage1D"))!=0) nLinked++; + if ((pglCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) __GLeeGetProcAddress("glCompressedTexSubImage3D"))!=0) nLinked++; + if ((pglCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) __GLeeGetProcAddress("glCompressedTexSubImage2D"))!=0) nLinked++; + if ((pglCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) __GLeeGetProcAddress("glCompressedTexSubImage1D"))!=0) nLinked++; + if ((pglGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC) __GLeeGetProcAddress("glGetCompressedTexImage"))!=0) nLinked++; +#endif + if (nLinked==46) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_VERSION_1_4(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_VERSION_1_4 + if ((pglBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) __GLeeGetProcAddress("glBlendFuncSeparate"))!=0) nLinked++; + if ((pglFogCoordf = (PFNGLFOGCOORDFPROC) __GLeeGetProcAddress("glFogCoordf"))!=0) nLinked++; + if ((pglFogCoordfv = (PFNGLFOGCOORDFVPROC) __GLeeGetProcAddress("glFogCoordfv"))!=0) nLinked++; + if ((pglFogCoordd = (PFNGLFOGCOORDDPROC) __GLeeGetProcAddress("glFogCoordd"))!=0) nLinked++; + if ((pglFogCoorddv = (PFNGLFOGCOORDDVPROC) __GLeeGetProcAddress("glFogCoorddv"))!=0) nLinked++; + if ((pglFogCoordPointer = (PFNGLFOGCOORDPOINTERPROC) __GLeeGetProcAddress("glFogCoordPointer"))!=0) nLinked++; + if ((pglMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC) __GLeeGetProcAddress("glMultiDrawArrays"))!=0) nLinked++; + if ((pglMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC) __GLeeGetProcAddress("glMultiDrawElements"))!=0) nLinked++; + if ((pglPointParameterf = (PFNGLPOINTPARAMETERFPROC) __GLeeGetProcAddress("glPointParameterf"))!=0) nLinked++; + if ((pglPointParameterfv = (PFNGLPOINTPARAMETERFVPROC) __GLeeGetProcAddress("glPointParameterfv"))!=0) nLinked++; + if ((pglPointParameteri = (PFNGLPOINTPARAMETERIPROC) __GLeeGetProcAddress("glPointParameteri"))!=0) nLinked++; + if ((pglPointParameteriv = (PFNGLPOINTPARAMETERIVPROC) __GLeeGetProcAddress("glPointParameteriv"))!=0) nLinked++; + if ((pglSecondaryColor3b = (PFNGLSECONDARYCOLOR3BPROC) __GLeeGetProcAddress("glSecondaryColor3b"))!=0) nLinked++; + if ((pglSecondaryColor3bv = (PFNGLSECONDARYCOLOR3BVPROC) __GLeeGetProcAddress("glSecondaryColor3bv"))!=0) nLinked++; + if ((pglSecondaryColor3d = (PFNGLSECONDARYCOLOR3DPROC) __GLeeGetProcAddress("glSecondaryColor3d"))!=0) nLinked++; + if ((pglSecondaryColor3dv = (PFNGLSECONDARYCOLOR3DVPROC) __GLeeGetProcAddress("glSecondaryColor3dv"))!=0) nLinked++; + if ((pglSecondaryColor3f = (PFNGLSECONDARYCOLOR3FPROC) __GLeeGetProcAddress("glSecondaryColor3f"))!=0) nLinked++; + if ((pglSecondaryColor3fv = (PFNGLSECONDARYCOLOR3FVPROC) __GLeeGetProcAddress("glSecondaryColor3fv"))!=0) nLinked++; + if ((pglSecondaryColor3i = (PFNGLSECONDARYCOLOR3IPROC) __GLeeGetProcAddress("glSecondaryColor3i"))!=0) nLinked++; + if ((pglSecondaryColor3iv = (PFNGLSECONDARYCOLOR3IVPROC) __GLeeGetProcAddress("glSecondaryColor3iv"))!=0) nLinked++; + if ((pglSecondaryColor3s = (PFNGLSECONDARYCOLOR3SPROC) __GLeeGetProcAddress("glSecondaryColor3s"))!=0) nLinked++; + if ((pglSecondaryColor3sv = (PFNGLSECONDARYCOLOR3SVPROC) __GLeeGetProcAddress("glSecondaryColor3sv"))!=0) nLinked++; + if ((pglSecondaryColor3ub = (PFNGLSECONDARYCOLOR3UBPROC) __GLeeGetProcAddress("glSecondaryColor3ub"))!=0) nLinked++; + if ((pglSecondaryColor3ubv = (PFNGLSECONDARYCOLOR3UBVPROC) __GLeeGetProcAddress("glSecondaryColor3ubv"))!=0) nLinked++; + if ((pglSecondaryColor3ui = (PFNGLSECONDARYCOLOR3UIPROC) __GLeeGetProcAddress("glSecondaryColor3ui"))!=0) nLinked++; + if ((pglSecondaryColor3uiv = (PFNGLSECONDARYCOLOR3UIVPROC) __GLeeGetProcAddress("glSecondaryColor3uiv"))!=0) nLinked++; + if ((pglSecondaryColor3us = (PFNGLSECONDARYCOLOR3USPROC) __GLeeGetProcAddress("glSecondaryColor3us"))!=0) nLinked++; + if ((pglSecondaryColor3usv = (PFNGLSECONDARYCOLOR3USVPROC) __GLeeGetProcAddress("glSecondaryColor3usv"))!=0) nLinked++; + if ((pglSecondaryColorPointer = (PFNGLSECONDARYCOLORPOINTERPROC) __GLeeGetProcAddress("glSecondaryColorPointer"))!=0) nLinked++; + if ((pglWindowPos2d = (PFNGLWINDOWPOS2DPROC) __GLeeGetProcAddress("glWindowPos2d"))!=0) nLinked++; + if ((pglWindowPos2dv = (PFNGLWINDOWPOS2DVPROC) __GLeeGetProcAddress("glWindowPos2dv"))!=0) nLinked++; + if ((pglWindowPos2f = (PFNGLWINDOWPOS2FPROC) __GLeeGetProcAddress("glWindowPos2f"))!=0) nLinked++; + if ((pglWindowPos2fv = (PFNGLWINDOWPOS2FVPROC) __GLeeGetProcAddress("glWindowPos2fv"))!=0) nLinked++; + if ((pglWindowPos2i = (PFNGLWINDOWPOS2IPROC) __GLeeGetProcAddress("glWindowPos2i"))!=0) nLinked++; + if ((pglWindowPos2iv = (PFNGLWINDOWPOS2IVPROC) __GLeeGetProcAddress("glWindowPos2iv"))!=0) nLinked++; + if ((pglWindowPos2s = (PFNGLWINDOWPOS2SPROC) __GLeeGetProcAddress("glWindowPos2s"))!=0) nLinked++; + if ((pglWindowPos2sv = (PFNGLWINDOWPOS2SVPROC) __GLeeGetProcAddress("glWindowPos2sv"))!=0) nLinked++; + if ((pglWindowPos3d = (PFNGLWINDOWPOS3DPROC) __GLeeGetProcAddress("glWindowPos3d"))!=0) nLinked++; + if ((pglWindowPos3dv = (PFNGLWINDOWPOS3DVPROC) __GLeeGetProcAddress("glWindowPos3dv"))!=0) nLinked++; + if ((pglWindowPos3f = (PFNGLWINDOWPOS3FPROC) __GLeeGetProcAddress("glWindowPos3f"))!=0) nLinked++; + if ((pglWindowPos3fv = (PFNGLWINDOWPOS3FVPROC) __GLeeGetProcAddress("glWindowPos3fv"))!=0) nLinked++; + if ((pglWindowPos3i = (PFNGLWINDOWPOS3IPROC) __GLeeGetProcAddress("glWindowPos3i"))!=0) nLinked++; + if ((pglWindowPos3iv = (PFNGLWINDOWPOS3IVPROC) __GLeeGetProcAddress("glWindowPos3iv"))!=0) nLinked++; + if ((pglWindowPos3s = (PFNGLWINDOWPOS3SPROC) __GLeeGetProcAddress("glWindowPos3s"))!=0) nLinked++; + if ((pglWindowPos3sv = (PFNGLWINDOWPOS3SVPROC) __GLeeGetProcAddress("glWindowPos3sv"))!=0) nLinked++; +#endif + if (nLinked==45) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_VERSION_1_5(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_VERSION_1_5 + if ((pglGenQueries = (PFNGLGENQUERIESPROC) __GLeeGetProcAddress("glGenQueries"))!=0) nLinked++; + if ((pglDeleteQueries = (PFNGLDELETEQUERIESPROC) __GLeeGetProcAddress("glDeleteQueries"))!=0) nLinked++; + if ((pglIsQuery = (PFNGLISQUERYPROC) __GLeeGetProcAddress("glIsQuery"))!=0) nLinked++; + if ((pglBeginQuery = (PFNGLBEGINQUERYPROC) __GLeeGetProcAddress("glBeginQuery"))!=0) nLinked++; + if ((pglEndQuery = (PFNGLENDQUERYPROC) __GLeeGetProcAddress("glEndQuery"))!=0) nLinked++; + if ((pglGetQueryiv = (PFNGLGETQUERYIVPROC) __GLeeGetProcAddress("glGetQueryiv"))!=0) nLinked++; + if ((pglGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC) __GLeeGetProcAddress("glGetQueryObjectiv"))!=0) nLinked++; + if ((pglGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC) __GLeeGetProcAddress("glGetQueryObjectuiv"))!=0) nLinked++; + if ((pglBindBuffer = (PFNGLBINDBUFFERPROC) __GLeeGetProcAddress("glBindBuffer"))!=0) nLinked++; + if ((pglDeleteBuffers = (PFNGLDELETEBUFFERSPROC) __GLeeGetProcAddress("glDeleteBuffers"))!=0) nLinked++; + if ((pglGenBuffers = (PFNGLGENBUFFERSPROC) __GLeeGetProcAddress("glGenBuffers"))!=0) nLinked++; + if ((pglIsBuffer = (PFNGLISBUFFERPROC) __GLeeGetProcAddress("glIsBuffer"))!=0) nLinked++; + if ((pglBufferData = (PFNGLBUFFERDATAPROC) __GLeeGetProcAddress("glBufferData"))!=0) nLinked++; + if ((pglBufferSubData = (PFNGLBUFFERSUBDATAPROC) __GLeeGetProcAddress("glBufferSubData"))!=0) nLinked++; + if ((pglGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC) __GLeeGetProcAddress("glGetBufferSubData"))!=0) nLinked++; + if ((pglMapBuffer = (PFNGLMAPBUFFERPROC) __GLeeGetProcAddress("glMapBuffer"))!=0) nLinked++; + if ((pglUnmapBuffer = (PFNGLUNMAPBUFFERPROC) __GLeeGetProcAddress("glUnmapBuffer"))!=0) nLinked++; + if ((pglGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC) __GLeeGetProcAddress("glGetBufferParameteriv"))!=0) nLinked++; + if ((pglGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC) __GLeeGetProcAddress("glGetBufferPointerv"))!=0) nLinked++; +#endif + if (nLinked==19) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_VERSION_2_0(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_VERSION_2_0 + if ((pglBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC) __GLeeGetProcAddress("glBlendEquationSeparate"))!=0) nLinked++; + if ((pglDrawBuffers = (PFNGLDRAWBUFFERSPROC) __GLeeGetProcAddress("glDrawBuffers"))!=0) nLinked++; + if ((pglStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) __GLeeGetProcAddress("glStencilOpSeparate"))!=0) nLinked++; + if ((pglStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) __GLeeGetProcAddress("glStencilFuncSeparate"))!=0) nLinked++; + if ((pglStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) __GLeeGetProcAddress("glStencilMaskSeparate"))!=0) nLinked++; + if ((pglAttachShader = (PFNGLATTACHSHADERPROC) __GLeeGetProcAddress("glAttachShader"))!=0) nLinked++; + if ((pglBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC) __GLeeGetProcAddress("glBindAttribLocation"))!=0) nLinked++; + if ((pglCompileShader = (PFNGLCOMPILESHADERPROC) __GLeeGetProcAddress("glCompileShader"))!=0) nLinked++; + if ((pglCreateProgram = (PFNGLCREATEPROGRAMPROC) __GLeeGetProcAddress("glCreateProgram"))!=0) nLinked++; + if ((pglCreateShader = (PFNGLCREATESHADERPROC) __GLeeGetProcAddress("glCreateShader"))!=0) nLinked++; + if ((pglDeleteProgram = (PFNGLDELETEPROGRAMPROC) __GLeeGetProcAddress("glDeleteProgram"))!=0) nLinked++; + if ((pglDeleteShader = (PFNGLDELETESHADERPROC) __GLeeGetProcAddress("glDeleteShader"))!=0) nLinked++; + if ((pglDetachShader = (PFNGLDETACHSHADERPROC) __GLeeGetProcAddress("glDetachShader"))!=0) nLinked++; + if ((pglDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) __GLeeGetProcAddress("glDisableVertexAttribArray"))!=0) nLinked++; + if ((pglEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) __GLeeGetProcAddress("glEnableVertexAttribArray"))!=0) nLinked++; + if ((pglGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC) __GLeeGetProcAddress("glGetActiveAttrib"))!=0) nLinked++; + if ((pglGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) __GLeeGetProcAddress("glGetActiveUniform"))!=0) nLinked++; + if ((pglGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC) __GLeeGetProcAddress("glGetAttachedShaders"))!=0) nLinked++; + if ((pglGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) __GLeeGetProcAddress("glGetAttribLocation"))!=0) nLinked++; + if ((pglGetProgramiv = (PFNGLGETPROGRAMIVPROC) __GLeeGetProcAddress("glGetProgramiv"))!=0) nLinked++; + if ((pglGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) __GLeeGetProcAddress("glGetProgramInfoLog"))!=0) nLinked++; + if ((pglGetShaderiv = (PFNGLGETSHADERIVPROC) __GLeeGetProcAddress("glGetShaderiv"))!=0) nLinked++; + if ((pglGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) __GLeeGetProcAddress("glGetShaderInfoLog"))!=0) nLinked++; + if ((pglGetShaderSource = (PFNGLGETSHADERSOURCEPROC) __GLeeGetProcAddress("glGetShaderSource"))!=0) nLinked++; + if ((pglGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) __GLeeGetProcAddress("glGetUniformLocation"))!=0) nLinked++; + if ((pglGetUniformfv = (PFNGLGETUNIFORMFVPROC) __GLeeGetProcAddress("glGetUniformfv"))!=0) nLinked++; + if ((pglGetUniformiv = (PFNGLGETUNIFORMIVPROC) __GLeeGetProcAddress("glGetUniformiv"))!=0) nLinked++; + if ((pglGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC) __GLeeGetProcAddress("glGetVertexAttribdv"))!=0) nLinked++; + if ((pglGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC) __GLeeGetProcAddress("glGetVertexAttribfv"))!=0) nLinked++; + if ((pglGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC) __GLeeGetProcAddress("glGetVertexAttribiv"))!=0) nLinked++; + if ((pglGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC) __GLeeGetProcAddress("glGetVertexAttribPointerv"))!=0) nLinked++; + if ((pglIsProgram = (PFNGLISPROGRAMPROC) __GLeeGetProcAddress("glIsProgram"))!=0) nLinked++; + if ((pglIsShader = (PFNGLISSHADERPROC) __GLeeGetProcAddress("glIsShader"))!=0) nLinked++; + if ((pglLinkProgram = (PFNGLLINKPROGRAMPROC) __GLeeGetProcAddress("glLinkProgram"))!=0) nLinked++; + if ((pglShaderSource = (PFNGLSHADERSOURCEPROC) __GLeeGetProcAddress("glShaderSource"))!=0) nLinked++; + if ((pglUseProgram = (PFNGLUSEPROGRAMPROC) __GLeeGetProcAddress("glUseProgram"))!=0) nLinked++; + if ((pglUniform1f = (PFNGLUNIFORM1FPROC) __GLeeGetProcAddress("glUniform1f"))!=0) nLinked++; + if ((pglUniform2f = (PFNGLUNIFORM2FPROC) __GLeeGetProcAddress("glUniform2f"))!=0) nLinked++; + if ((pglUniform3f = (PFNGLUNIFORM3FPROC) __GLeeGetProcAddress("glUniform3f"))!=0) nLinked++; + if ((pglUniform4f = (PFNGLUNIFORM4FPROC) __GLeeGetProcAddress("glUniform4f"))!=0) nLinked++; + if ((pglUniform1i = (PFNGLUNIFORM1IPROC) __GLeeGetProcAddress("glUniform1i"))!=0) nLinked++; + if ((pglUniform2i = (PFNGLUNIFORM2IPROC) __GLeeGetProcAddress("glUniform2i"))!=0) nLinked++; + if ((pglUniform3i = (PFNGLUNIFORM3IPROC) __GLeeGetProcAddress("glUniform3i"))!=0) nLinked++; + if ((pglUniform4i = (PFNGLUNIFORM4IPROC) __GLeeGetProcAddress("glUniform4i"))!=0) nLinked++; + if ((pglUniform1fv = (PFNGLUNIFORM1FVPROC) __GLeeGetProcAddress("glUniform1fv"))!=0) nLinked++; + if ((pglUniform2fv = (PFNGLUNIFORM2FVPROC) __GLeeGetProcAddress("glUniform2fv"))!=0) nLinked++; + if ((pglUniform3fv = (PFNGLUNIFORM3FVPROC) __GLeeGetProcAddress("glUniform3fv"))!=0) nLinked++; + if ((pglUniform4fv = (PFNGLUNIFORM4FVPROC) __GLeeGetProcAddress("glUniform4fv"))!=0) nLinked++; + if ((pglUniform1iv = (PFNGLUNIFORM1IVPROC) __GLeeGetProcAddress("glUniform1iv"))!=0) nLinked++; + if ((pglUniform2iv = (PFNGLUNIFORM2IVPROC) __GLeeGetProcAddress("glUniform2iv"))!=0) nLinked++; + if ((pglUniform3iv = (PFNGLUNIFORM3IVPROC) __GLeeGetProcAddress("glUniform3iv"))!=0) nLinked++; + if ((pglUniform4iv = (PFNGLUNIFORM4IVPROC) __GLeeGetProcAddress("glUniform4iv"))!=0) nLinked++; + if ((pglUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC) __GLeeGetProcAddress("glUniformMatrix2fv"))!=0) nLinked++; + if ((pglUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC) __GLeeGetProcAddress("glUniformMatrix3fv"))!=0) nLinked++; + if ((pglUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) __GLeeGetProcAddress("glUniformMatrix4fv"))!=0) nLinked++; + if ((pglValidateProgram = (PFNGLVALIDATEPROGRAMPROC) __GLeeGetProcAddress("glValidateProgram"))!=0) nLinked++; + if ((pglVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC) __GLeeGetProcAddress("glVertexAttrib1d"))!=0) nLinked++; + if ((pglVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC) __GLeeGetProcAddress("glVertexAttrib1dv"))!=0) nLinked++; + if ((pglVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC) __GLeeGetProcAddress("glVertexAttrib1f"))!=0) nLinked++; + if ((pglVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC) __GLeeGetProcAddress("glVertexAttrib1fv"))!=0) nLinked++; + if ((pglVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC) __GLeeGetProcAddress("glVertexAttrib1s"))!=0) nLinked++; + if ((pglVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC) __GLeeGetProcAddress("glVertexAttrib1sv"))!=0) nLinked++; + if ((pglVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC) __GLeeGetProcAddress("glVertexAttrib2d"))!=0) nLinked++; + if ((pglVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC) __GLeeGetProcAddress("glVertexAttrib2dv"))!=0) nLinked++; + if ((pglVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC) __GLeeGetProcAddress("glVertexAttrib2f"))!=0) nLinked++; + if ((pglVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC) __GLeeGetProcAddress("glVertexAttrib2fv"))!=0) nLinked++; + if ((pglVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC) __GLeeGetProcAddress("glVertexAttrib2s"))!=0) nLinked++; + if ((pglVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC) __GLeeGetProcAddress("glVertexAttrib2sv"))!=0) nLinked++; + if ((pglVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC) __GLeeGetProcAddress("glVertexAttrib3d"))!=0) nLinked++; + if ((pglVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC) __GLeeGetProcAddress("glVertexAttrib3dv"))!=0) nLinked++; + if ((pglVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC) __GLeeGetProcAddress("glVertexAttrib3f"))!=0) nLinked++; + if ((pglVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC) __GLeeGetProcAddress("glVertexAttrib3fv"))!=0) nLinked++; + if ((pglVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC) __GLeeGetProcAddress("glVertexAttrib3s"))!=0) nLinked++; + if ((pglVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC) __GLeeGetProcAddress("glVertexAttrib3sv"))!=0) nLinked++; + if ((pglVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC) __GLeeGetProcAddress("glVertexAttrib4Nbv"))!=0) nLinked++; + if ((pglVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC) __GLeeGetProcAddress("glVertexAttrib4Niv"))!=0) nLinked++; + if ((pglVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC) __GLeeGetProcAddress("glVertexAttrib4Nsv"))!=0) nLinked++; + if ((pglVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC) __GLeeGetProcAddress("glVertexAttrib4Nub"))!=0) nLinked++; + if ((pglVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC) __GLeeGetProcAddress("glVertexAttrib4Nubv"))!=0) nLinked++; + if ((pglVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC) __GLeeGetProcAddress("glVertexAttrib4Nuiv"))!=0) nLinked++; + if ((pglVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC) __GLeeGetProcAddress("glVertexAttrib4Nusv"))!=0) nLinked++; + if ((pglVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC) __GLeeGetProcAddress("glVertexAttrib4bv"))!=0) nLinked++; + if ((pglVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC) __GLeeGetProcAddress("glVertexAttrib4d"))!=0) nLinked++; + if ((pglVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC) __GLeeGetProcAddress("glVertexAttrib4dv"))!=0) nLinked++; + if ((pglVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC) __GLeeGetProcAddress("glVertexAttrib4f"))!=0) nLinked++; + if ((pglVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC) __GLeeGetProcAddress("glVertexAttrib4fv"))!=0) nLinked++; + if ((pglVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC) __GLeeGetProcAddress("glVertexAttrib4iv"))!=0) nLinked++; + if ((pglVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC) __GLeeGetProcAddress("glVertexAttrib4s"))!=0) nLinked++; + if ((pglVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC) __GLeeGetProcAddress("glVertexAttrib4sv"))!=0) nLinked++; + if ((pglVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC) __GLeeGetProcAddress("glVertexAttrib4ubv"))!=0) nLinked++; + if ((pglVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC) __GLeeGetProcAddress("glVertexAttrib4uiv"))!=0) nLinked++; + if ((pglVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC) __GLeeGetProcAddress("glVertexAttrib4usv"))!=0) nLinked++; + if ((pglVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) __GLeeGetProcAddress("glVertexAttribPointer"))!=0) nLinked++; +#endif + if (nLinked==93) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_VERSION_2_1(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_VERSION_2_1 + if ((pglUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC) __GLeeGetProcAddress("glUniformMatrix2x3fv"))!=0) nLinked++; + if ((pglUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC) __GLeeGetProcAddress("glUniformMatrix3x2fv"))!=0) nLinked++; + if ((pglUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC) __GLeeGetProcAddress("glUniformMatrix2x4fv"))!=0) nLinked++; + if ((pglUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC) __GLeeGetProcAddress("glUniformMatrix4x2fv"))!=0) nLinked++; + if ((pglUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) __GLeeGetProcAddress("glUniformMatrix3x4fv"))!=0) nLinked++; + if ((pglUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC) __GLeeGetProcAddress("glUniformMatrix4x3fv"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_multitexture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_multitexture + if ((pglActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) __GLeeGetProcAddress("glActiveTextureARB"))!=0) nLinked++; + if ((pglClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC) __GLeeGetProcAddress("glClientActiveTextureARB"))!=0) nLinked++; + if ((pglMultiTexCoord1dARB = (PFNGLMULTITEXCOORD1DARBPROC) __GLeeGetProcAddress("glMultiTexCoord1dARB"))!=0) nLinked++; + if ((pglMultiTexCoord1dvARB = (PFNGLMULTITEXCOORD1DVARBPROC) __GLeeGetProcAddress("glMultiTexCoord1dvARB"))!=0) nLinked++; + if ((pglMultiTexCoord1fARB = (PFNGLMULTITEXCOORD1FARBPROC) __GLeeGetProcAddress("glMultiTexCoord1fARB"))!=0) nLinked++; + if ((pglMultiTexCoord1fvARB = (PFNGLMULTITEXCOORD1FVARBPROC) __GLeeGetProcAddress("glMultiTexCoord1fvARB"))!=0) nLinked++; + if ((pglMultiTexCoord1iARB = (PFNGLMULTITEXCOORD1IARBPROC) __GLeeGetProcAddress("glMultiTexCoord1iARB"))!=0) nLinked++; + if ((pglMultiTexCoord1ivARB = (PFNGLMULTITEXCOORD1IVARBPROC) __GLeeGetProcAddress("glMultiTexCoord1ivARB"))!=0) nLinked++; + if ((pglMultiTexCoord1sARB = (PFNGLMULTITEXCOORD1SARBPROC) __GLeeGetProcAddress("glMultiTexCoord1sARB"))!=0) nLinked++; + if ((pglMultiTexCoord1svARB = (PFNGLMULTITEXCOORD1SVARBPROC) __GLeeGetProcAddress("glMultiTexCoord1svARB"))!=0) nLinked++; + if ((pglMultiTexCoord2dARB = (PFNGLMULTITEXCOORD2DARBPROC) __GLeeGetProcAddress("glMultiTexCoord2dARB"))!=0) nLinked++; + if ((pglMultiTexCoord2dvARB = (PFNGLMULTITEXCOORD2DVARBPROC) __GLeeGetProcAddress("glMultiTexCoord2dvARB"))!=0) nLinked++; + if ((pglMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC) __GLeeGetProcAddress("glMultiTexCoord2fARB"))!=0) nLinked++; + if ((pglMultiTexCoord2fvARB = (PFNGLMULTITEXCOORD2FVARBPROC) __GLeeGetProcAddress("glMultiTexCoord2fvARB"))!=0) nLinked++; + if ((pglMultiTexCoord2iARB = (PFNGLMULTITEXCOORD2IARBPROC) __GLeeGetProcAddress("glMultiTexCoord2iARB"))!=0) nLinked++; + if ((pglMultiTexCoord2ivARB = (PFNGLMULTITEXCOORD2IVARBPROC) __GLeeGetProcAddress("glMultiTexCoord2ivARB"))!=0) nLinked++; + if ((pglMultiTexCoord2sARB = (PFNGLMULTITEXCOORD2SARBPROC) __GLeeGetProcAddress("glMultiTexCoord2sARB"))!=0) nLinked++; + if ((pglMultiTexCoord2svARB = (PFNGLMULTITEXCOORD2SVARBPROC) __GLeeGetProcAddress("glMultiTexCoord2svARB"))!=0) nLinked++; + if ((pglMultiTexCoord3dARB = (PFNGLMULTITEXCOORD3DARBPROC) __GLeeGetProcAddress("glMultiTexCoord3dARB"))!=0) nLinked++; + if ((pglMultiTexCoord3dvARB = (PFNGLMULTITEXCOORD3DVARBPROC) __GLeeGetProcAddress("glMultiTexCoord3dvARB"))!=0) nLinked++; + if ((pglMultiTexCoord3fARB = (PFNGLMULTITEXCOORD3FARBPROC) __GLeeGetProcAddress("glMultiTexCoord3fARB"))!=0) nLinked++; + if ((pglMultiTexCoord3fvARB = (PFNGLMULTITEXCOORD3FVARBPROC) __GLeeGetProcAddress("glMultiTexCoord3fvARB"))!=0) nLinked++; + if ((pglMultiTexCoord3iARB = (PFNGLMULTITEXCOORD3IARBPROC) __GLeeGetProcAddress("glMultiTexCoord3iARB"))!=0) nLinked++; + if ((pglMultiTexCoord3ivARB = (PFNGLMULTITEXCOORD3IVARBPROC) __GLeeGetProcAddress("glMultiTexCoord3ivARB"))!=0) nLinked++; + if ((pglMultiTexCoord3sARB = (PFNGLMULTITEXCOORD3SARBPROC) __GLeeGetProcAddress("glMultiTexCoord3sARB"))!=0) nLinked++; + if ((pglMultiTexCoord3svARB = (PFNGLMULTITEXCOORD3SVARBPROC) __GLeeGetProcAddress("glMultiTexCoord3svARB"))!=0) nLinked++; + if ((pglMultiTexCoord4dARB = (PFNGLMULTITEXCOORD4DARBPROC) __GLeeGetProcAddress("glMultiTexCoord4dARB"))!=0) nLinked++; + if ((pglMultiTexCoord4dvARB = (PFNGLMULTITEXCOORD4DVARBPROC) __GLeeGetProcAddress("glMultiTexCoord4dvARB"))!=0) nLinked++; + if ((pglMultiTexCoord4fARB = (PFNGLMULTITEXCOORD4FARBPROC) __GLeeGetProcAddress("glMultiTexCoord4fARB"))!=0) nLinked++; + if ((pglMultiTexCoord4fvARB = (PFNGLMULTITEXCOORD4FVARBPROC) __GLeeGetProcAddress("glMultiTexCoord4fvARB"))!=0) nLinked++; + if ((pglMultiTexCoord4iARB = (PFNGLMULTITEXCOORD4IARBPROC) __GLeeGetProcAddress("glMultiTexCoord4iARB"))!=0) nLinked++; + if ((pglMultiTexCoord4ivARB = (PFNGLMULTITEXCOORD4IVARBPROC) __GLeeGetProcAddress("glMultiTexCoord4ivARB"))!=0) nLinked++; + if ((pglMultiTexCoord4sARB = (PFNGLMULTITEXCOORD4SARBPROC) __GLeeGetProcAddress("glMultiTexCoord4sARB"))!=0) nLinked++; + if ((pglMultiTexCoord4svARB = (PFNGLMULTITEXCOORD4SVARBPROC) __GLeeGetProcAddress("glMultiTexCoord4svARB"))!=0) nLinked++; +#endif + if (nLinked==34) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_transpose_matrix(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_transpose_matrix + if ((pglLoadTransposeMatrixfARB = (PFNGLLOADTRANSPOSEMATRIXFARBPROC) __GLeeGetProcAddress("glLoadTransposeMatrixfARB"))!=0) nLinked++; + if ((pglLoadTransposeMatrixdARB = (PFNGLLOADTRANSPOSEMATRIXDARBPROC) __GLeeGetProcAddress("glLoadTransposeMatrixdARB"))!=0) nLinked++; + if ((pglMultTransposeMatrixfARB = (PFNGLMULTTRANSPOSEMATRIXFARBPROC) __GLeeGetProcAddress("glMultTransposeMatrixfARB"))!=0) nLinked++; + if ((pglMultTransposeMatrixdARB = (PFNGLMULTTRANSPOSEMATRIXDARBPROC) __GLeeGetProcAddress("glMultTransposeMatrixdARB"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_multisample(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_multisample + if ((pglSampleCoverageARB = (PFNGLSAMPLECOVERAGEARBPROC) __GLeeGetProcAddress("glSampleCoverageARB"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_texture_env_add(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_texture_cube_map(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_texture_compression(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_texture_compression + if ((pglCompressedTexImage3DARB = (PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) __GLeeGetProcAddress("glCompressedTexImage3DARB"))!=0) nLinked++; + if ((pglCompressedTexImage2DARB = (PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) __GLeeGetProcAddress("glCompressedTexImage2DARB"))!=0) nLinked++; + if ((pglCompressedTexImage1DARB = (PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) __GLeeGetProcAddress("glCompressedTexImage1DARB"))!=0) nLinked++; + if ((pglCompressedTexSubImage3DARB = (PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) __GLeeGetProcAddress("glCompressedTexSubImage3DARB"))!=0) nLinked++; + if ((pglCompressedTexSubImage2DARB = (PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) __GLeeGetProcAddress("glCompressedTexSubImage2DARB"))!=0) nLinked++; + if ((pglCompressedTexSubImage1DARB = (PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) __GLeeGetProcAddress("glCompressedTexSubImage1DARB"))!=0) nLinked++; + if ((pglGetCompressedTexImageARB = (PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) __GLeeGetProcAddress("glGetCompressedTexImageARB"))!=0) nLinked++; +#endif + if (nLinked==7) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_texture_border_clamp(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_point_parameters(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_point_parameters + if ((pglPointParameterfARB = (PFNGLPOINTPARAMETERFARBPROC) __GLeeGetProcAddress("glPointParameterfARB"))!=0) nLinked++; + if ((pglPointParameterfvARB = (PFNGLPOINTPARAMETERFVARBPROC) __GLeeGetProcAddress("glPointParameterfvARB"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_vertex_blend(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_vertex_blend + if ((pglWeightbvARB = (PFNGLWEIGHTBVARBPROC) __GLeeGetProcAddress("glWeightbvARB"))!=0) nLinked++; + if ((pglWeightsvARB = (PFNGLWEIGHTSVARBPROC) __GLeeGetProcAddress("glWeightsvARB"))!=0) nLinked++; + if ((pglWeightivARB = (PFNGLWEIGHTIVARBPROC) __GLeeGetProcAddress("glWeightivARB"))!=0) nLinked++; + if ((pglWeightfvARB = (PFNGLWEIGHTFVARBPROC) __GLeeGetProcAddress("glWeightfvARB"))!=0) nLinked++; + if ((pglWeightdvARB = (PFNGLWEIGHTDVARBPROC) __GLeeGetProcAddress("glWeightdvARB"))!=0) nLinked++; + if ((pglWeightubvARB = (PFNGLWEIGHTUBVARBPROC) __GLeeGetProcAddress("glWeightubvARB"))!=0) nLinked++; + if ((pglWeightusvARB = (PFNGLWEIGHTUSVARBPROC) __GLeeGetProcAddress("glWeightusvARB"))!=0) nLinked++; + if ((pglWeightuivARB = (PFNGLWEIGHTUIVARBPROC) __GLeeGetProcAddress("glWeightuivARB"))!=0) nLinked++; + if ((pglWeightPointerARB = (PFNGLWEIGHTPOINTERARBPROC) __GLeeGetProcAddress("glWeightPointerARB"))!=0) nLinked++; + if ((pglVertexBlendARB = (PFNGLVERTEXBLENDARBPROC) __GLeeGetProcAddress("glVertexBlendARB"))!=0) nLinked++; +#endif + if (nLinked==10) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_matrix_palette(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_matrix_palette + if ((pglCurrentPaletteMatrixARB = (PFNGLCURRENTPALETTEMATRIXARBPROC) __GLeeGetProcAddress("glCurrentPaletteMatrixARB"))!=0) nLinked++; + if ((pglMatrixIndexubvARB = (PFNGLMATRIXINDEXUBVARBPROC) __GLeeGetProcAddress("glMatrixIndexubvARB"))!=0) nLinked++; + if ((pglMatrixIndexusvARB = (PFNGLMATRIXINDEXUSVARBPROC) __GLeeGetProcAddress("glMatrixIndexusvARB"))!=0) nLinked++; + if ((pglMatrixIndexuivARB = (PFNGLMATRIXINDEXUIVARBPROC) __GLeeGetProcAddress("glMatrixIndexuivARB"))!=0) nLinked++; + if ((pglMatrixIndexPointerARB = (PFNGLMATRIXINDEXPOINTERARBPROC) __GLeeGetProcAddress("glMatrixIndexPointerARB"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_texture_env_combine(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_texture_env_crossbar(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_texture_env_dot3(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_texture_mirrored_repeat(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_depth_texture(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_shadow(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_shadow_ambient(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_window_pos(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_window_pos + if ((pglWindowPos2dARB = (PFNGLWINDOWPOS2DARBPROC) __GLeeGetProcAddress("glWindowPos2dARB"))!=0) nLinked++; + if ((pglWindowPos2dvARB = (PFNGLWINDOWPOS2DVARBPROC) __GLeeGetProcAddress("glWindowPos2dvARB"))!=0) nLinked++; + if ((pglWindowPos2fARB = (PFNGLWINDOWPOS2FARBPROC) __GLeeGetProcAddress("glWindowPos2fARB"))!=0) nLinked++; + if ((pglWindowPos2fvARB = (PFNGLWINDOWPOS2FVARBPROC) __GLeeGetProcAddress("glWindowPos2fvARB"))!=0) nLinked++; + if ((pglWindowPos2iARB = (PFNGLWINDOWPOS2IARBPROC) __GLeeGetProcAddress("glWindowPos2iARB"))!=0) nLinked++; + if ((pglWindowPos2ivARB = (PFNGLWINDOWPOS2IVARBPROC) __GLeeGetProcAddress("glWindowPos2ivARB"))!=0) nLinked++; + if ((pglWindowPos2sARB = (PFNGLWINDOWPOS2SARBPROC) __GLeeGetProcAddress("glWindowPos2sARB"))!=0) nLinked++; + if ((pglWindowPos2svARB = (PFNGLWINDOWPOS2SVARBPROC) __GLeeGetProcAddress("glWindowPos2svARB"))!=0) nLinked++; + if ((pglWindowPos3dARB = (PFNGLWINDOWPOS3DARBPROC) __GLeeGetProcAddress("glWindowPos3dARB"))!=0) nLinked++; + if ((pglWindowPos3dvARB = (PFNGLWINDOWPOS3DVARBPROC) __GLeeGetProcAddress("glWindowPos3dvARB"))!=0) nLinked++; + if ((pglWindowPos3fARB = (PFNGLWINDOWPOS3FARBPROC) __GLeeGetProcAddress("glWindowPos3fARB"))!=0) nLinked++; + if ((pglWindowPos3fvARB = (PFNGLWINDOWPOS3FVARBPROC) __GLeeGetProcAddress("glWindowPos3fvARB"))!=0) nLinked++; + if ((pglWindowPos3iARB = (PFNGLWINDOWPOS3IARBPROC) __GLeeGetProcAddress("glWindowPos3iARB"))!=0) nLinked++; + if ((pglWindowPos3ivARB = (PFNGLWINDOWPOS3IVARBPROC) __GLeeGetProcAddress("glWindowPos3ivARB"))!=0) nLinked++; + if ((pglWindowPos3sARB = (PFNGLWINDOWPOS3SARBPROC) __GLeeGetProcAddress("glWindowPos3sARB"))!=0) nLinked++; + if ((pglWindowPos3svARB = (PFNGLWINDOWPOS3SVARBPROC) __GLeeGetProcAddress("glWindowPos3svARB"))!=0) nLinked++; +#endif + if (nLinked==16) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_vertex_program(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_vertex_program + if ((pglVertexAttrib1dARB = (PFNGLVERTEXATTRIB1DARBPROC) __GLeeGetProcAddress("glVertexAttrib1dARB"))!=0) nLinked++; + if ((pglVertexAttrib1dvARB = (PFNGLVERTEXATTRIB1DVARBPROC) __GLeeGetProcAddress("glVertexAttrib1dvARB"))!=0) nLinked++; + if ((pglVertexAttrib1fARB = (PFNGLVERTEXATTRIB1FARBPROC) __GLeeGetProcAddress("glVertexAttrib1fARB"))!=0) nLinked++; + if ((pglVertexAttrib1fvARB = (PFNGLVERTEXATTRIB1FVARBPROC) __GLeeGetProcAddress("glVertexAttrib1fvARB"))!=0) nLinked++; + if ((pglVertexAttrib1sARB = (PFNGLVERTEXATTRIB1SARBPROC) __GLeeGetProcAddress("glVertexAttrib1sARB"))!=0) nLinked++; + if ((pglVertexAttrib1svARB = (PFNGLVERTEXATTRIB1SVARBPROC) __GLeeGetProcAddress("glVertexAttrib1svARB"))!=0) nLinked++; + if ((pglVertexAttrib2dARB = (PFNGLVERTEXATTRIB2DARBPROC) __GLeeGetProcAddress("glVertexAttrib2dARB"))!=0) nLinked++; + if ((pglVertexAttrib2dvARB = (PFNGLVERTEXATTRIB2DVARBPROC) __GLeeGetProcAddress("glVertexAttrib2dvARB"))!=0) nLinked++; + if ((pglVertexAttrib2fARB = (PFNGLVERTEXATTRIB2FARBPROC) __GLeeGetProcAddress("glVertexAttrib2fARB"))!=0) nLinked++; + if ((pglVertexAttrib2fvARB = (PFNGLVERTEXATTRIB2FVARBPROC) __GLeeGetProcAddress("glVertexAttrib2fvARB"))!=0) nLinked++; + if ((pglVertexAttrib2sARB = (PFNGLVERTEXATTRIB2SARBPROC) __GLeeGetProcAddress("glVertexAttrib2sARB"))!=0) nLinked++; + if ((pglVertexAttrib2svARB = (PFNGLVERTEXATTRIB2SVARBPROC) __GLeeGetProcAddress("glVertexAttrib2svARB"))!=0) nLinked++; + if ((pglVertexAttrib3dARB = (PFNGLVERTEXATTRIB3DARBPROC) __GLeeGetProcAddress("glVertexAttrib3dARB"))!=0) nLinked++; + if ((pglVertexAttrib3dvARB = (PFNGLVERTEXATTRIB3DVARBPROC) __GLeeGetProcAddress("glVertexAttrib3dvARB"))!=0) nLinked++; + if ((pglVertexAttrib3fARB = (PFNGLVERTEXATTRIB3FARBPROC) __GLeeGetProcAddress("glVertexAttrib3fARB"))!=0) nLinked++; + if ((pglVertexAttrib3fvARB = (PFNGLVERTEXATTRIB3FVARBPROC) __GLeeGetProcAddress("glVertexAttrib3fvARB"))!=0) nLinked++; + if ((pglVertexAttrib3sARB = (PFNGLVERTEXATTRIB3SARBPROC) __GLeeGetProcAddress("glVertexAttrib3sARB"))!=0) nLinked++; + if ((pglVertexAttrib3svARB = (PFNGLVERTEXATTRIB3SVARBPROC) __GLeeGetProcAddress("glVertexAttrib3svARB"))!=0) nLinked++; + if ((pglVertexAttrib4NbvARB = (PFNGLVERTEXATTRIB4NBVARBPROC) __GLeeGetProcAddress("glVertexAttrib4NbvARB"))!=0) nLinked++; + if ((pglVertexAttrib4NivARB = (PFNGLVERTEXATTRIB4NIVARBPROC) __GLeeGetProcAddress("glVertexAttrib4NivARB"))!=0) nLinked++; + if ((pglVertexAttrib4NsvARB = (PFNGLVERTEXATTRIB4NSVARBPROC) __GLeeGetProcAddress("glVertexAttrib4NsvARB"))!=0) nLinked++; + if ((pglVertexAttrib4NubARB = (PFNGLVERTEXATTRIB4NUBARBPROC) __GLeeGetProcAddress("glVertexAttrib4NubARB"))!=0) nLinked++; + if ((pglVertexAttrib4NubvARB = (PFNGLVERTEXATTRIB4NUBVARBPROC) __GLeeGetProcAddress("glVertexAttrib4NubvARB"))!=0) nLinked++; + if ((pglVertexAttrib4NuivARB = (PFNGLVERTEXATTRIB4NUIVARBPROC) __GLeeGetProcAddress("glVertexAttrib4NuivARB"))!=0) nLinked++; + if ((pglVertexAttrib4NusvARB = (PFNGLVERTEXATTRIB4NUSVARBPROC) __GLeeGetProcAddress("glVertexAttrib4NusvARB"))!=0) nLinked++; + if ((pglVertexAttrib4bvARB = (PFNGLVERTEXATTRIB4BVARBPROC) __GLeeGetProcAddress("glVertexAttrib4bvARB"))!=0) nLinked++; + if ((pglVertexAttrib4dARB = (PFNGLVERTEXATTRIB4DARBPROC) __GLeeGetProcAddress("glVertexAttrib4dARB"))!=0) nLinked++; + if ((pglVertexAttrib4dvARB = (PFNGLVERTEXATTRIB4DVARBPROC) __GLeeGetProcAddress("glVertexAttrib4dvARB"))!=0) nLinked++; + if ((pglVertexAttrib4fARB = (PFNGLVERTEXATTRIB4FARBPROC) __GLeeGetProcAddress("glVertexAttrib4fARB"))!=0) nLinked++; + if ((pglVertexAttrib4fvARB = (PFNGLVERTEXATTRIB4FVARBPROC) __GLeeGetProcAddress("glVertexAttrib4fvARB"))!=0) nLinked++; + if ((pglVertexAttrib4ivARB = (PFNGLVERTEXATTRIB4IVARBPROC) __GLeeGetProcAddress("glVertexAttrib4ivARB"))!=0) nLinked++; + if ((pglVertexAttrib4sARB = (PFNGLVERTEXATTRIB4SARBPROC) __GLeeGetProcAddress("glVertexAttrib4sARB"))!=0) nLinked++; + if ((pglVertexAttrib4svARB = (PFNGLVERTEXATTRIB4SVARBPROC) __GLeeGetProcAddress("glVertexAttrib4svARB"))!=0) nLinked++; + if ((pglVertexAttrib4ubvARB = (PFNGLVERTEXATTRIB4UBVARBPROC) __GLeeGetProcAddress("glVertexAttrib4ubvARB"))!=0) nLinked++; + if ((pglVertexAttrib4uivARB = (PFNGLVERTEXATTRIB4UIVARBPROC) __GLeeGetProcAddress("glVertexAttrib4uivARB"))!=0) nLinked++; + if ((pglVertexAttrib4usvARB = (PFNGLVERTEXATTRIB4USVARBPROC) __GLeeGetProcAddress("glVertexAttrib4usvARB"))!=0) nLinked++; + if ((pglVertexAttribPointerARB = (PFNGLVERTEXATTRIBPOINTERARBPROC) __GLeeGetProcAddress("glVertexAttribPointerARB"))!=0) nLinked++; + if ((pglEnableVertexAttribArrayARB = (PFNGLENABLEVERTEXATTRIBARRAYARBPROC) __GLeeGetProcAddress("glEnableVertexAttribArrayARB"))!=0) nLinked++; + if ((pglDisableVertexAttribArrayARB = (PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) __GLeeGetProcAddress("glDisableVertexAttribArrayARB"))!=0) nLinked++; + if ((pglProgramStringARB = (PFNGLPROGRAMSTRINGARBPROC) __GLeeGetProcAddress("glProgramStringARB"))!=0) nLinked++; + if ((pglBindProgramARB = (PFNGLBINDPROGRAMARBPROC) __GLeeGetProcAddress("glBindProgramARB"))!=0) nLinked++; + if ((pglDeleteProgramsARB = (PFNGLDELETEPROGRAMSARBPROC) __GLeeGetProcAddress("glDeleteProgramsARB"))!=0) nLinked++; + if ((pglGenProgramsARB = (PFNGLGENPROGRAMSARBPROC) __GLeeGetProcAddress("glGenProgramsARB"))!=0) nLinked++; + if ((pglProgramEnvParameter4dARB = (PFNGLPROGRAMENVPARAMETER4DARBPROC) __GLeeGetProcAddress("glProgramEnvParameter4dARB"))!=0) nLinked++; + if ((pglProgramEnvParameter4dvARB = (PFNGLPROGRAMENVPARAMETER4DVARBPROC) __GLeeGetProcAddress("glProgramEnvParameter4dvARB"))!=0) nLinked++; + if ((pglProgramEnvParameter4fARB = (PFNGLPROGRAMENVPARAMETER4FARBPROC) __GLeeGetProcAddress("glProgramEnvParameter4fARB"))!=0) nLinked++; + if ((pglProgramEnvParameter4fvARB = (PFNGLPROGRAMENVPARAMETER4FVARBPROC) __GLeeGetProcAddress("glProgramEnvParameter4fvARB"))!=0) nLinked++; + if ((pglProgramLocalParameter4dARB = (PFNGLPROGRAMLOCALPARAMETER4DARBPROC) __GLeeGetProcAddress("glProgramLocalParameter4dARB"))!=0) nLinked++; + if ((pglProgramLocalParameter4dvARB = (PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) __GLeeGetProcAddress("glProgramLocalParameter4dvARB"))!=0) nLinked++; + if ((pglProgramLocalParameter4fARB = (PFNGLPROGRAMLOCALPARAMETER4FARBPROC) __GLeeGetProcAddress("glProgramLocalParameter4fARB"))!=0) nLinked++; + if ((pglProgramLocalParameter4fvARB = (PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) __GLeeGetProcAddress("glProgramLocalParameter4fvARB"))!=0) nLinked++; + if ((pglGetProgramEnvParameterdvARB = (PFNGLGETPROGRAMENVPARAMETERDVARBPROC) __GLeeGetProcAddress("glGetProgramEnvParameterdvARB"))!=0) nLinked++; + if ((pglGetProgramEnvParameterfvARB = (PFNGLGETPROGRAMENVPARAMETERFVARBPROC) __GLeeGetProcAddress("glGetProgramEnvParameterfvARB"))!=0) nLinked++; + if ((pglGetProgramLocalParameterdvARB = (PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) __GLeeGetProcAddress("glGetProgramLocalParameterdvARB"))!=0) nLinked++; + if ((pglGetProgramLocalParameterfvARB = (PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) __GLeeGetProcAddress("glGetProgramLocalParameterfvARB"))!=0) nLinked++; + if ((pglGetProgramivARB = (PFNGLGETPROGRAMIVARBPROC) __GLeeGetProcAddress("glGetProgramivARB"))!=0) nLinked++; + if ((pglGetProgramStringARB = (PFNGLGETPROGRAMSTRINGARBPROC) __GLeeGetProcAddress("glGetProgramStringARB"))!=0) nLinked++; + if ((pglGetVertexAttribdvARB = (PFNGLGETVERTEXATTRIBDVARBPROC) __GLeeGetProcAddress("glGetVertexAttribdvARB"))!=0) nLinked++; + if ((pglGetVertexAttribfvARB = (PFNGLGETVERTEXATTRIBFVARBPROC) __GLeeGetProcAddress("glGetVertexAttribfvARB"))!=0) nLinked++; + if ((pglGetVertexAttribivARB = (PFNGLGETVERTEXATTRIBIVARBPROC) __GLeeGetProcAddress("glGetVertexAttribivARB"))!=0) nLinked++; + if ((pglGetVertexAttribPointervARB = (PFNGLGETVERTEXATTRIBPOINTERVARBPROC) __GLeeGetProcAddress("glGetVertexAttribPointervARB"))!=0) nLinked++; + if ((pglIsProgramARB = (PFNGLISPROGRAMARBPROC) __GLeeGetProcAddress("glIsProgramARB"))!=0) nLinked++; +#endif + if (nLinked==62) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_fragment_program(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_vertex_buffer_object(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_vertex_buffer_object + if ((pglBindBufferARB = (PFNGLBINDBUFFERARBPROC) __GLeeGetProcAddress("glBindBufferARB"))!=0) nLinked++; + if ((pglDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC) __GLeeGetProcAddress("glDeleteBuffersARB"))!=0) nLinked++; + if ((pglGenBuffersARB = (PFNGLGENBUFFERSARBPROC) __GLeeGetProcAddress("glGenBuffersARB"))!=0) nLinked++; + if ((pglIsBufferARB = (PFNGLISBUFFERARBPROC) __GLeeGetProcAddress("glIsBufferARB"))!=0) nLinked++; + if ((pglBufferDataARB = (PFNGLBUFFERDATAARBPROC) __GLeeGetProcAddress("glBufferDataARB"))!=0) nLinked++; + if ((pglBufferSubDataARB = (PFNGLBUFFERSUBDATAARBPROC) __GLeeGetProcAddress("glBufferSubDataARB"))!=0) nLinked++; + if ((pglGetBufferSubDataARB = (PFNGLGETBUFFERSUBDATAARBPROC) __GLeeGetProcAddress("glGetBufferSubDataARB"))!=0) nLinked++; + if ((pglMapBufferARB = (PFNGLMAPBUFFERARBPROC) __GLeeGetProcAddress("glMapBufferARB"))!=0) nLinked++; + if ((pglUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC) __GLeeGetProcAddress("glUnmapBufferARB"))!=0) nLinked++; + if ((pglGetBufferParameterivARB = (PFNGLGETBUFFERPARAMETERIVARBPROC) __GLeeGetProcAddress("glGetBufferParameterivARB"))!=0) nLinked++; + if ((pglGetBufferPointervARB = (PFNGLGETBUFFERPOINTERVARBPROC) __GLeeGetProcAddress("glGetBufferPointervARB"))!=0) nLinked++; +#endif + if (nLinked==11) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_occlusion_query(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_occlusion_query + if ((pglGenQueriesARB = (PFNGLGENQUERIESARBPROC) __GLeeGetProcAddress("glGenQueriesARB"))!=0) nLinked++; + if ((pglDeleteQueriesARB = (PFNGLDELETEQUERIESARBPROC) __GLeeGetProcAddress("glDeleteQueriesARB"))!=0) nLinked++; + if ((pglIsQueryARB = (PFNGLISQUERYARBPROC) __GLeeGetProcAddress("glIsQueryARB"))!=0) nLinked++; + if ((pglBeginQueryARB = (PFNGLBEGINQUERYARBPROC) __GLeeGetProcAddress("glBeginQueryARB"))!=0) nLinked++; + if ((pglEndQueryARB = (PFNGLENDQUERYARBPROC) __GLeeGetProcAddress("glEndQueryARB"))!=0) nLinked++; + if ((pglGetQueryivARB = (PFNGLGETQUERYIVARBPROC) __GLeeGetProcAddress("glGetQueryivARB"))!=0) nLinked++; + if ((pglGetQueryObjectivARB = (PFNGLGETQUERYOBJECTIVARBPROC) __GLeeGetProcAddress("glGetQueryObjectivARB"))!=0) nLinked++; + if ((pglGetQueryObjectuivARB = (PFNGLGETQUERYOBJECTUIVARBPROC) __GLeeGetProcAddress("glGetQueryObjectuivARB"))!=0) nLinked++; +#endif + if (nLinked==8) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_shader_objects(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_shader_objects + if ((pglDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC) __GLeeGetProcAddress("glDeleteObjectARB"))!=0) nLinked++; + if ((pglGetHandleARB = (PFNGLGETHANDLEARBPROC) __GLeeGetProcAddress("glGetHandleARB"))!=0) nLinked++; + if ((pglDetachObjectARB = (PFNGLDETACHOBJECTARBPROC) __GLeeGetProcAddress("glDetachObjectARB"))!=0) nLinked++; + if ((pglCreateShaderObjectARB = (PFNGLCREATESHADEROBJECTARBPROC) __GLeeGetProcAddress("glCreateShaderObjectARB"))!=0) nLinked++; + if ((pglShaderSourceARB = (PFNGLSHADERSOURCEARBPROC) __GLeeGetProcAddress("glShaderSourceARB"))!=0) nLinked++; + if ((pglCompileShaderARB = (PFNGLCOMPILESHADERARBPROC) __GLeeGetProcAddress("glCompileShaderARB"))!=0) nLinked++; + if ((pglCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC) __GLeeGetProcAddress("glCreateProgramObjectARB"))!=0) nLinked++; + if ((pglAttachObjectARB = (PFNGLATTACHOBJECTARBPROC) __GLeeGetProcAddress("glAttachObjectARB"))!=0) nLinked++; + if ((pglLinkProgramARB = (PFNGLLINKPROGRAMARBPROC) __GLeeGetProcAddress("glLinkProgramARB"))!=0) nLinked++; + if ((pglUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC) __GLeeGetProcAddress("glUseProgramObjectARB"))!=0) nLinked++; + if ((pglValidateProgramARB = (PFNGLVALIDATEPROGRAMARBPROC) __GLeeGetProcAddress("glValidateProgramARB"))!=0) nLinked++; + if ((pglUniform1fARB = (PFNGLUNIFORM1FARBPROC) __GLeeGetProcAddress("glUniform1fARB"))!=0) nLinked++; + if ((pglUniform2fARB = (PFNGLUNIFORM2FARBPROC) __GLeeGetProcAddress("glUniform2fARB"))!=0) nLinked++; + if ((pglUniform3fARB = (PFNGLUNIFORM3FARBPROC) __GLeeGetProcAddress("glUniform3fARB"))!=0) nLinked++; + if ((pglUniform4fARB = (PFNGLUNIFORM4FARBPROC) __GLeeGetProcAddress("glUniform4fARB"))!=0) nLinked++; + if ((pglUniform1iARB = (PFNGLUNIFORM1IARBPROC) __GLeeGetProcAddress("glUniform1iARB"))!=0) nLinked++; + if ((pglUniform2iARB = (PFNGLUNIFORM2IARBPROC) __GLeeGetProcAddress("glUniform2iARB"))!=0) nLinked++; + if ((pglUniform3iARB = (PFNGLUNIFORM3IARBPROC) __GLeeGetProcAddress("glUniform3iARB"))!=0) nLinked++; + if ((pglUniform4iARB = (PFNGLUNIFORM4IARBPROC) __GLeeGetProcAddress("glUniform4iARB"))!=0) nLinked++; + if ((pglUniform1fvARB = (PFNGLUNIFORM1FVARBPROC) __GLeeGetProcAddress("glUniform1fvARB"))!=0) nLinked++; + if ((pglUniform2fvARB = (PFNGLUNIFORM2FVARBPROC) __GLeeGetProcAddress("glUniform2fvARB"))!=0) nLinked++; + if ((pglUniform3fvARB = (PFNGLUNIFORM3FVARBPROC) __GLeeGetProcAddress("glUniform3fvARB"))!=0) nLinked++; + if ((pglUniform4fvARB = (PFNGLUNIFORM4FVARBPROC) __GLeeGetProcAddress("glUniform4fvARB"))!=0) nLinked++; + if ((pglUniform1ivARB = (PFNGLUNIFORM1IVARBPROC) __GLeeGetProcAddress("glUniform1ivARB"))!=0) nLinked++; + if ((pglUniform2ivARB = (PFNGLUNIFORM2IVARBPROC) __GLeeGetProcAddress("glUniform2ivARB"))!=0) nLinked++; + if ((pglUniform3ivARB = (PFNGLUNIFORM3IVARBPROC) __GLeeGetProcAddress("glUniform3ivARB"))!=0) nLinked++; + if ((pglUniform4ivARB = (PFNGLUNIFORM4IVARBPROC) __GLeeGetProcAddress("glUniform4ivARB"))!=0) nLinked++; + if ((pglUniformMatrix2fvARB = (PFNGLUNIFORMMATRIX2FVARBPROC) __GLeeGetProcAddress("glUniformMatrix2fvARB"))!=0) nLinked++; + if ((pglUniformMatrix3fvARB = (PFNGLUNIFORMMATRIX3FVARBPROC) __GLeeGetProcAddress("glUniformMatrix3fvARB"))!=0) nLinked++; + if ((pglUniformMatrix4fvARB = (PFNGLUNIFORMMATRIX4FVARBPROC) __GLeeGetProcAddress("glUniformMatrix4fvARB"))!=0) nLinked++; + if ((pglGetObjectParameterfvARB = (PFNGLGETOBJECTPARAMETERFVARBPROC) __GLeeGetProcAddress("glGetObjectParameterfvARB"))!=0) nLinked++; + if ((pglGetObjectParameterivARB = (PFNGLGETOBJECTPARAMETERIVARBPROC) __GLeeGetProcAddress("glGetObjectParameterivARB"))!=0) nLinked++; + if ((pglGetInfoLogARB = (PFNGLGETINFOLOGARBPROC) __GLeeGetProcAddress("glGetInfoLogARB"))!=0) nLinked++; + if ((pglGetAttachedObjectsARB = (PFNGLGETATTACHEDOBJECTSARBPROC) __GLeeGetProcAddress("glGetAttachedObjectsARB"))!=0) nLinked++; + if ((pglGetUniformLocationARB = (PFNGLGETUNIFORMLOCATIONARBPROC) __GLeeGetProcAddress("glGetUniformLocationARB"))!=0) nLinked++; + if ((pglGetActiveUniformARB = (PFNGLGETACTIVEUNIFORMARBPROC) __GLeeGetProcAddress("glGetActiveUniformARB"))!=0) nLinked++; + if ((pglGetUniformfvARB = (PFNGLGETUNIFORMFVARBPROC) __GLeeGetProcAddress("glGetUniformfvARB"))!=0) nLinked++; + if ((pglGetUniformivARB = (PFNGLGETUNIFORMIVARBPROC) __GLeeGetProcAddress("glGetUniformivARB"))!=0) nLinked++; + if ((pglGetShaderSourceARB = (PFNGLGETSHADERSOURCEARBPROC) __GLeeGetProcAddress("glGetShaderSourceARB"))!=0) nLinked++; +#endif + if (nLinked==39) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_vertex_shader(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_vertex_shader + if ((pglBindAttribLocationARB = (PFNGLBINDATTRIBLOCATIONARBPROC) __GLeeGetProcAddress("glBindAttribLocationARB"))!=0) nLinked++; + if ((pglGetActiveAttribARB = (PFNGLGETACTIVEATTRIBARBPROC) __GLeeGetProcAddress("glGetActiveAttribARB"))!=0) nLinked++; + if ((pglGetAttribLocationARB = (PFNGLGETATTRIBLOCATIONARBPROC) __GLeeGetProcAddress("glGetAttribLocationARB"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_fragment_shader(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_shading_language_100(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_texture_non_power_of_two(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_point_sprite(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_fragment_program_shadow(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_draw_buffers(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_draw_buffers + if ((pglDrawBuffersARB = (PFNGLDRAWBUFFERSARBPROC) __GLeeGetProcAddress("glDrawBuffersARB"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_texture_rectangle(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_color_buffer_float(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ARB_color_buffer_float + if ((pglClampColorARB = (PFNGLCLAMPCOLORARBPROC) __GLeeGetProcAddress("glClampColorARB"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ARB_half_float_pixel(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_texture_float(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ARB_pixel_buffer_object(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_abgr(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_blend_color(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_blend_color + if ((pglBlendColorEXT = (PFNGLBLENDCOLOREXTPROC) __GLeeGetProcAddress("glBlendColorEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_polygon_offset(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_polygon_offset + if ((pglPolygonOffsetEXT = (PFNGLPOLYGONOFFSETEXTPROC) __GLeeGetProcAddress("glPolygonOffsetEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_texture(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture3D(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_texture3D + if ((pglTexImage3DEXT = (PFNGLTEXIMAGE3DEXTPROC) __GLeeGetProcAddress("glTexImage3DEXT"))!=0) nLinked++; + if ((pglTexSubImage3DEXT = (PFNGLTEXSUBIMAGE3DEXTPROC) __GLeeGetProcAddress("glTexSubImage3DEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIS_texture_filter4(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIS_texture_filter4 + if ((pglGetTexFilterFuncSGIS = (PFNGLGETTEXFILTERFUNCSGISPROC) __GLeeGetProcAddress("glGetTexFilterFuncSGIS"))!=0) nLinked++; + if ((pglTexFilterFuncSGIS = (PFNGLTEXFILTERFUNCSGISPROC) __GLeeGetProcAddress("glTexFilterFuncSGIS"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_subtexture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_subtexture + if ((pglTexSubImage1DEXT = (PFNGLTEXSUBIMAGE1DEXTPROC) __GLeeGetProcAddress("glTexSubImage1DEXT"))!=0) nLinked++; + if ((pglTexSubImage2DEXT = (PFNGLTEXSUBIMAGE2DEXTPROC) __GLeeGetProcAddress("glTexSubImage2DEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_copy_texture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_copy_texture + if ((pglCopyTexImage1DEXT = (PFNGLCOPYTEXIMAGE1DEXTPROC) __GLeeGetProcAddress("glCopyTexImage1DEXT"))!=0) nLinked++; + if ((pglCopyTexImage2DEXT = (PFNGLCOPYTEXIMAGE2DEXTPROC) __GLeeGetProcAddress("glCopyTexImage2DEXT"))!=0) nLinked++; + if ((pglCopyTexSubImage1DEXT = (PFNGLCOPYTEXSUBIMAGE1DEXTPROC) __GLeeGetProcAddress("glCopyTexSubImage1DEXT"))!=0) nLinked++; + if ((pglCopyTexSubImage2DEXT = (PFNGLCOPYTEXSUBIMAGE2DEXTPROC) __GLeeGetProcAddress("glCopyTexSubImage2DEXT"))!=0) nLinked++; + if ((pglCopyTexSubImage3DEXT = (PFNGLCOPYTEXSUBIMAGE3DEXTPROC) __GLeeGetProcAddress("glCopyTexSubImage3DEXT"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_histogram(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_histogram + if ((pglGetHistogramEXT = (PFNGLGETHISTOGRAMEXTPROC) __GLeeGetProcAddress("glGetHistogramEXT"))!=0) nLinked++; + if ((pglGetHistogramParameterfvEXT = (PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) __GLeeGetProcAddress("glGetHistogramParameterfvEXT"))!=0) nLinked++; + if ((pglGetHistogramParameterivEXT = (PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) __GLeeGetProcAddress("glGetHistogramParameterivEXT"))!=0) nLinked++; + if ((pglGetMinmaxEXT = (PFNGLGETMINMAXEXTPROC) __GLeeGetProcAddress("glGetMinmaxEXT"))!=0) nLinked++; + if ((pglGetMinmaxParameterfvEXT = (PFNGLGETMINMAXPARAMETERFVEXTPROC) __GLeeGetProcAddress("glGetMinmaxParameterfvEXT"))!=0) nLinked++; + if ((pglGetMinmaxParameterivEXT = (PFNGLGETMINMAXPARAMETERIVEXTPROC) __GLeeGetProcAddress("glGetMinmaxParameterivEXT"))!=0) nLinked++; + if ((pglHistogramEXT = (PFNGLHISTOGRAMEXTPROC) __GLeeGetProcAddress("glHistogramEXT"))!=0) nLinked++; + if ((pglMinmaxEXT = (PFNGLMINMAXEXTPROC) __GLeeGetProcAddress("glMinmaxEXT"))!=0) nLinked++; + if ((pglResetHistogramEXT = (PFNGLRESETHISTOGRAMEXTPROC) __GLeeGetProcAddress("glResetHistogramEXT"))!=0) nLinked++; + if ((pglResetMinmaxEXT = (PFNGLRESETMINMAXEXTPROC) __GLeeGetProcAddress("glResetMinmaxEXT"))!=0) nLinked++; +#endif + if (nLinked==10) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_convolution(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_convolution + if ((pglConvolutionFilter1DEXT = (PFNGLCONVOLUTIONFILTER1DEXTPROC) __GLeeGetProcAddress("glConvolutionFilter1DEXT"))!=0) nLinked++; + if ((pglConvolutionFilter2DEXT = (PFNGLCONVOLUTIONFILTER2DEXTPROC) __GLeeGetProcAddress("glConvolutionFilter2DEXT"))!=0) nLinked++; + if ((pglConvolutionParameterfEXT = (PFNGLCONVOLUTIONPARAMETERFEXTPROC) __GLeeGetProcAddress("glConvolutionParameterfEXT"))!=0) nLinked++; + if ((pglConvolutionParameterfvEXT = (PFNGLCONVOLUTIONPARAMETERFVEXTPROC) __GLeeGetProcAddress("glConvolutionParameterfvEXT"))!=0) nLinked++; + if ((pglConvolutionParameteriEXT = (PFNGLCONVOLUTIONPARAMETERIEXTPROC) __GLeeGetProcAddress("glConvolutionParameteriEXT"))!=0) nLinked++; + if ((pglConvolutionParameterivEXT = (PFNGLCONVOLUTIONPARAMETERIVEXTPROC) __GLeeGetProcAddress("glConvolutionParameterivEXT"))!=0) nLinked++; + if ((pglCopyConvolutionFilter1DEXT = (PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) __GLeeGetProcAddress("glCopyConvolutionFilter1DEXT"))!=0) nLinked++; + if ((pglCopyConvolutionFilter2DEXT = (PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) __GLeeGetProcAddress("glCopyConvolutionFilter2DEXT"))!=0) nLinked++; + if ((pglGetConvolutionFilterEXT = (PFNGLGETCONVOLUTIONFILTEREXTPROC) __GLeeGetProcAddress("glGetConvolutionFilterEXT"))!=0) nLinked++; + if ((pglGetConvolutionParameterfvEXT = (PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) __GLeeGetProcAddress("glGetConvolutionParameterfvEXT"))!=0) nLinked++; + if ((pglGetConvolutionParameterivEXT = (PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) __GLeeGetProcAddress("glGetConvolutionParameterivEXT"))!=0) nLinked++; + if ((pglGetSeparableFilterEXT = (PFNGLGETSEPARABLEFILTEREXTPROC) __GLeeGetProcAddress("glGetSeparableFilterEXT"))!=0) nLinked++; + if ((pglSeparableFilter2DEXT = (PFNGLSEPARABLEFILTER2DEXTPROC) __GLeeGetProcAddress("glSeparableFilter2DEXT"))!=0) nLinked++; +#endif + if (nLinked==13) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGI_color_matrix(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGI_color_table(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGI_color_table + if ((pglColorTableSGI = (PFNGLCOLORTABLESGIPROC) __GLeeGetProcAddress("glColorTableSGI"))!=0) nLinked++; + if ((pglColorTableParameterfvSGI = (PFNGLCOLORTABLEPARAMETERFVSGIPROC) __GLeeGetProcAddress("glColorTableParameterfvSGI"))!=0) nLinked++; + if ((pglColorTableParameterivSGI = (PFNGLCOLORTABLEPARAMETERIVSGIPROC) __GLeeGetProcAddress("glColorTableParameterivSGI"))!=0) nLinked++; + if ((pglCopyColorTableSGI = (PFNGLCOPYCOLORTABLESGIPROC) __GLeeGetProcAddress("glCopyColorTableSGI"))!=0) nLinked++; + if ((pglGetColorTableSGI = (PFNGLGETCOLORTABLESGIPROC) __GLeeGetProcAddress("glGetColorTableSGI"))!=0) nLinked++; + if ((pglGetColorTableParameterfvSGI = (PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) __GLeeGetProcAddress("glGetColorTableParameterfvSGI"))!=0) nLinked++; + if ((pglGetColorTableParameterivSGI = (PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) __GLeeGetProcAddress("glGetColorTableParameterivSGI"))!=0) nLinked++; +#endif + if (nLinked==7) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIS_pixel_texture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIS_pixel_texture + if ((pglPixelTexGenParameteriSGIS = (PFNGLPIXELTEXGENPARAMETERISGISPROC) __GLeeGetProcAddress("glPixelTexGenParameteriSGIS"))!=0) nLinked++; + if ((pglPixelTexGenParameterivSGIS = (PFNGLPIXELTEXGENPARAMETERIVSGISPROC) __GLeeGetProcAddress("glPixelTexGenParameterivSGIS"))!=0) nLinked++; + if ((pglPixelTexGenParameterfSGIS = (PFNGLPIXELTEXGENPARAMETERFSGISPROC) __GLeeGetProcAddress("glPixelTexGenParameterfSGIS"))!=0) nLinked++; + if ((pglPixelTexGenParameterfvSGIS = (PFNGLPIXELTEXGENPARAMETERFVSGISPROC) __GLeeGetProcAddress("glPixelTexGenParameterfvSGIS"))!=0) nLinked++; + if ((pglGetPixelTexGenParameterivSGIS = (PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) __GLeeGetProcAddress("glGetPixelTexGenParameterivSGIS"))!=0) nLinked++; + if ((pglGetPixelTexGenParameterfvSGIS = (PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) __GLeeGetProcAddress("glGetPixelTexGenParameterfvSGIS"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_pixel_texture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_pixel_texture + if ((pglPixelTexGenSGIX = (PFNGLPIXELTEXGENSGIXPROC) __GLeeGetProcAddress("glPixelTexGenSGIX"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIS_texture4D(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIS_texture4D + if ((pglTexImage4DSGIS = (PFNGLTEXIMAGE4DSGISPROC) __GLeeGetProcAddress("glTexImage4DSGIS"))!=0) nLinked++; + if ((pglTexSubImage4DSGIS = (PFNGLTEXSUBIMAGE4DSGISPROC) __GLeeGetProcAddress("glTexSubImage4DSGIS"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGI_texture_color_table(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_cmyka(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_object(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_texture_object + if ((pglAreTexturesResidentEXT = (PFNGLARETEXTURESRESIDENTEXTPROC) __GLeeGetProcAddress("glAreTexturesResidentEXT"))!=0) nLinked++; + if ((pglBindTextureEXT = (PFNGLBINDTEXTUREEXTPROC) __GLeeGetProcAddress("glBindTextureEXT"))!=0) nLinked++; + if ((pglDeleteTexturesEXT = (PFNGLDELETETEXTURESEXTPROC) __GLeeGetProcAddress("glDeleteTexturesEXT"))!=0) nLinked++; + if ((pglGenTexturesEXT = (PFNGLGENTEXTURESEXTPROC) __GLeeGetProcAddress("glGenTexturesEXT"))!=0) nLinked++; + if ((pglIsTextureEXT = (PFNGLISTEXTUREEXTPROC) __GLeeGetProcAddress("glIsTextureEXT"))!=0) nLinked++; + if ((pglPrioritizeTexturesEXT = (PFNGLPRIORITIZETEXTURESEXTPROC) __GLeeGetProcAddress("glPrioritizeTexturesEXT"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIS_detail_texture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIS_detail_texture + if ((pglDetailTexFuncSGIS = (PFNGLDETAILTEXFUNCSGISPROC) __GLeeGetProcAddress("glDetailTexFuncSGIS"))!=0) nLinked++; + if ((pglGetDetailTexFuncSGIS = (PFNGLGETDETAILTEXFUNCSGISPROC) __GLeeGetProcAddress("glGetDetailTexFuncSGIS"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIS_sharpen_texture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIS_sharpen_texture + if ((pglSharpenTexFuncSGIS = (PFNGLSHARPENTEXFUNCSGISPROC) __GLeeGetProcAddress("glSharpenTexFuncSGIS"))!=0) nLinked++; + if ((pglGetSharpenTexFuncSGIS = (PFNGLGETSHARPENTEXFUNCSGISPROC) __GLeeGetProcAddress("glGetSharpenTexFuncSGIS"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_packed_pixels(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIS_texture_lod(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIS_multisample(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIS_multisample + if ((pglSampleMaskSGIS = (PFNGLSAMPLEMASKSGISPROC) __GLeeGetProcAddress("glSampleMaskSGIS"))!=0) nLinked++; + if ((pglSamplePatternSGIS = (PFNGLSAMPLEPATTERNSGISPROC) __GLeeGetProcAddress("glSamplePatternSGIS"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_rescale_normal(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_vertex_array(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_vertex_array + if ((pglArrayElementEXT = (PFNGLARRAYELEMENTEXTPROC) __GLeeGetProcAddress("glArrayElementEXT"))!=0) nLinked++; + if ((pglColorPointerEXT = (PFNGLCOLORPOINTEREXTPROC) __GLeeGetProcAddress("glColorPointerEXT"))!=0) nLinked++; + if ((pglDrawArraysEXT = (PFNGLDRAWARRAYSEXTPROC) __GLeeGetProcAddress("glDrawArraysEXT"))!=0) nLinked++; + if ((pglEdgeFlagPointerEXT = (PFNGLEDGEFLAGPOINTEREXTPROC) __GLeeGetProcAddress("glEdgeFlagPointerEXT"))!=0) nLinked++; + if ((pglGetPointervEXT = (PFNGLGETPOINTERVEXTPROC) __GLeeGetProcAddress("glGetPointervEXT"))!=0) nLinked++; + if ((pglIndexPointerEXT = (PFNGLINDEXPOINTEREXTPROC) __GLeeGetProcAddress("glIndexPointerEXT"))!=0) nLinked++; + if ((pglNormalPointerEXT = (PFNGLNORMALPOINTEREXTPROC) __GLeeGetProcAddress("glNormalPointerEXT"))!=0) nLinked++; + if ((pglTexCoordPointerEXT = (PFNGLTEXCOORDPOINTEREXTPROC) __GLeeGetProcAddress("glTexCoordPointerEXT"))!=0) nLinked++; + if ((pglVertexPointerEXT = (PFNGLVERTEXPOINTEREXTPROC) __GLeeGetProcAddress("glVertexPointerEXT"))!=0) nLinked++; +#endif + if (nLinked==9) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_misc_attribute(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIS_generate_mipmap(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_clipmap(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_shadow(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIS_texture_edge_clamp(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIS_texture_border_clamp(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_blend_minmax(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_blend_minmax + if ((pglBlendEquationEXT = (PFNGLBLENDEQUATIONEXTPROC) __GLeeGetProcAddress("glBlendEquationEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_blend_subtract(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_blend_logic_op(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_interlace(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_pixel_tiles(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIS_texture_select(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_sprite(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_sprite + if ((pglSpriteParameterfSGIX = (PFNGLSPRITEPARAMETERFSGIXPROC) __GLeeGetProcAddress("glSpriteParameterfSGIX"))!=0) nLinked++; + if ((pglSpriteParameterfvSGIX = (PFNGLSPRITEPARAMETERFVSGIXPROC) __GLeeGetProcAddress("glSpriteParameterfvSGIX"))!=0) nLinked++; + if ((pglSpriteParameteriSGIX = (PFNGLSPRITEPARAMETERISGIXPROC) __GLeeGetProcAddress("glSpriteParameteriSGIX"))!=0) nLinked++; + if ((pglSpriteParameterivSGIX = (PFNGLSPRITEPARAMETERIVSGIXPROC) __GLeeGetProcAddress("glSpriteParameterivSGIX"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_texture_multi_buffer(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_point_parameters(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_point_parameters + if ((pglPointParameterfEXT = (PFNGLPOINTPARAMETERFEXTPROC) __GLeeGetProcAddress("glPointParameterfEXT"))!=0) nLinked++; + if ((pglPointParameterfvEXT = (PFNGLPOINTPARAMETERFVEXTPROC) __GLeeGetProcAddress("glPointParameterfvEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIS_point_parameters(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIS_point_parameters + if ((pglPointParameterfSGIS = (PFNGLPOINTPARAMETERFSGISPROC) __GLeeGetProcAddress("glPointParameterfSGIS"))!=0) nLinked++; + if ((pglPointParameterfvSGIS = (PFNGLPOINTPARAMETERFVSGISPROC) __GLeeGetProcAddress("glPointParameterfvSGIS"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_instruments(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_instruments + if ((pglGetInstrumentsSGIX = (PFNGLGETINSTRUMENTSSGIXPROC) __GLeeGetProcAddress("glGetInstrumentsSGIX"))!=0) nLinked++; + if ((pglInstrumentsBufferSGIX = (PFNGLINSTRUMENTSBUFFERSGIXPROC) __GLeeGetProcAddress("glInstrumentsBufferSGIX"))!=0) nLinked++; + if ((pglPollInstrumentsSGIX = (PFNGLPOLLINSTRUMENTSSGIXPROC) __GLeeGetProcAddress("glPollInstrumentsSGIX"))!=0) nLinked++; + if ((pglReadInstrumentsSGIX = (PFNGLREADINSTRUMENTSSGIXPROC) __GLeeGetProcAddress("glReadInstrumentsSGIX"))!=0) nLinked++; + if ((pglStartInstrumentsSGIX = (PFNGLSTARTINSTRUMENTSSGIXPROC) __GLeeGetProcAddress("glStartInstrumentsSGIX"))!=0) nLinked++; + if ((pglStopInstrumentsSGIX = (PFNGLSTOPINSTRUMENTSSGIXPROC) __GLeeGetProcAddress("glStopInstrumentsSGIX"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_texture_scale_bias(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_framezoom(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_framezoom + if ((pglFrameZoomSGIX = (PFNGLFRAMEZOOMSGIXPROC) __GLeeGetProcAddress("glFrameZoomSGIX"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_tag_sample_buffer(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_tag_sample_buffer + if ((pglTagSampleBufferSGIX = (PFNGLTAGSAMPLEBUFFERSGIXPROC) __GLeeGetProcAddress("glTagSampleBufferSGIX"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_FfdMaskSGIX(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_polynomial_ffd(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_polynomial_ffd + if ((pglDeformationMap3dSGIX = (PFNGLDEFORMATIONMAP3DSGIXPROC) __GLeeGetProcAddress("glDeformationMap3dSGIX"))!=0) nLinked++; + if ((pglDeformationMap3fSGIX = (PFNGLDEFORMATIONMAP3FSGIXPROC) __GLeeGetProcAddress("glDeformationMap3fSGIX"))!=0) nLinked++; + if ((pglDeformSGIX = (PFNGLDEFORMSGIXPROC) __GLeeGetProcAddress("glDeformSGIX"))!=0) nLinked++; + if ((pglLoadIdentityDeformationMapSGIX = (PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) __GLeeGetProcAddress("glLoadIdentityDeformationMapSGIX"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_reference_plane(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_reference_plane + if ((pglReferencePlaneSGIX = (PFNGLREFERENCEPLANESGIXPROC) __GLeeGetProcAddress("glReferencePlaneSGIX"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_flush_raster(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_flush_raster + if ((pglFlushRasterSGIX = (PFNGLFLUSHRASTERSGIXPROC) __GLeeGetProcAddress("glFlushRasterSGIX"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_depth_texture(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIS_fog_function(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIS_fog_function + if ((pglFogFuncSGIS = (PFNGLFOGFUNCSGISPROC) __GLeeGetProcAddress("glFogFuncSGIS"))!=0) nLinked++; + if ((pglGetFogFuncSGIS = (PFNGLGETFOGFUNCSGISPROC) __GLeeGetProcAddress("glGetFogFuncSGIS"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_fog_offset(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_HP_image_transform(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_HP_image_transform + if ((pglImageTransformParameteriHP = (PFNGLIMAGETRANSFORMPARAMETERIHPPROC) __GLeeGetProcAddress("glImageTransformParameteriHP"))!=0) nLinked++; + if ((pglImageTransformParameterfHP = (PFNGLIMAGETRANSFORMPARAMETERFHPPROC) __GLeeGetProcAddress("glImageTransformParameterfHP"))!=0) nLinked++; + if ((pglImageTransformParameterivHP = (PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) __GLeeGetProcAddress("glImageTransformParameterivHP"))!=0) nLinked++; + if ((pglImageTransformParameterfvHP = (PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) __GLeeGetProcAddress("glImageTransformParameterfvHP"))!=0) nLinked++; + if ((pglGetImageTransformParameterivHP = (PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) __GLeeGetProcAddress("glGetImageTransformParameterivHP"))!=0) nLinked++; + if ((pglGetImageTransformParameterfvHP = (PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) __GLeeGetProcAddress("glGetImageTransformParameterfvHP"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_HP_convolution_border_modes(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_INGR_palette_buffer(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_texture_add_env(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_color_subtable(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_color_subtable + if ((pglColorSubTableEXT = (PFNGLCOLORSUBTABLEEXTPROC) __GLeeGetProcAddress("glColorSubTableEXT"))!=0) nLinked++; + if ((pglCopyColorSubTableEXT = (PFNGLCOPYCOLORSUBTABLEEXTPROC) __GLeeGetProcAddress("glCopyColorSubTableEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_PGI_vertex_hints(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_PGI_misc_hints(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_PGI_misc_hints + if ((pglHintPGI = (PFNGLHINTPGIPROC) __GLeeGetProcAddress("glHintPGI"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_paletted_texture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_paletted_texture + if ((pglColorTableEXT = (PFNGLCOLORTABLEEXTPROC) __GLeeGetProcAddress("glColorTableEXT"))!=0) nLinked++; + if ((pglGetColorTableEXT = (PFNGLGETCOLORTABLEEXTPROC) __GLeeGetProcAddress("glGetColorTableEXT"))!=0) nLinked++; + if ((pglGetColorTableParameterivEXT = (PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) __GLeeGetProcAddress("glGetColorTableParameterivEXT"))!=0) nLinked++; + if ((pglGetColorTableParameterfvEXT = (PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) __GLeeGetProcAddress("glGetColorTableParameterfvEXT"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_clip_volume_hint(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_list_priority(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_list_priority + if ((pglGetListParameterfvSGIX = (PFNGLGETLISTPARAMETERFVSGIXPROC) __GLeeGetProcAddress("glGetListParameterfvSGIX"))!=0) nLinked++; + if ((pglGetListParameterivSGIX = (PFNGLGETLISTPARAMETERIVSGIXPROC) __GLeeGetProcAddress("glGetListParameterivSGIX"))!=0) nLinked++; + if ((pglListParameterfSGIX = (PFNGLLISTPARAMETERFSGIXPROC) __GLeeGetProcAddress("glListParameterfSGIX"))!=0) nLinked++; + if ((pglListParameterfvSGIX = (PFNGLLISTPARAMETERFVSGIXPROC) __GLeeGetProcAddress("glListParameterfvSGIX"))!=0) nLinked++; + if ((pglListParameteriSGIX = (PFNGLLISTPARAMETERISGIXPROC) __GLeeGetProcAddress("glListParameteriSGIX"))!=0) nLinked++; + if ((pglListParameterivSGIX = (PFNGLLISTPARAMETERIVSGIXPROC) __GLeeGetProcAddress("glListParameterivSGIX"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_ir_instrument1(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_calligraphic_fragment(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_texture_lod_bias(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_shadow_ambient(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_index_texture(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_index_material(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_index_material + if ((pglIndexMaterialEXT = (PFNGLINDEXMATERIALEXTPROC) __GLeeGetProcAddress("glIndexMaterialEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_index_func(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_index_func + if ((pglIndexFuncEXT = (PFNGLINDEXFUNCEXTPROC) __GLeeGetProcAddress("glIndexFuncEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_index_array_formats(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_compiled_vertex_array(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_compiled_vertex_array + if ((pglLockArraysEXT = (PFNGLLOCKARRAYSEXTPROC) __GLeeGetProcAddress("glLockArraysEXT"))!=0) nLinked++; + if ((pglUnlockArraysEXT = (PFNGLUNLOCKARRAYSEXTPROC) __GLeeGetProcAddress("glUnlockArraysEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_cull_vertex(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_cull_vertex + if ((pglCullParameterdvEXT = (PFNGLCULLPARAMETERDVEXTPROC) __GLeeGetProcAddress("glCullParameterdvEXT"))!=0) nLinked++; + if ((pglCullParameterfvEXT = (PFNGLCULLPARAMETERFVEXTPROC) __GLeeGetProcAddress("glCullParameterfvEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_ycrcb(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_fragment_lighting(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_fragment_lighting + if ((pglFragmentColorMaterialSGIX = (PFNGLFRAGMENTCOLORMATERIALSGIXPROC) __GLeeGetProcAddress("glFragmentColorMaterialSGIX"))!=0) nLinked++; + if ((pglFragmentLightfSGIX = (PFNGLFRAGMENTLIGHTFSGIXPROC) __GLeeGetProcAddress("glFragmentLightfSGIX"))!=0) nLinked++; + if ((pglFragmentLightfvSGIX = (PFNGLFRAGMENTLIGHTFVSGIXPROC) __GLeeGetProcAddress("glFragmentLightfvSGIX"))!=0) nLinked++; + if ((pglFragmentLightiSGIX = (PFNGLFRAGMENTLIGHTISGIXPROC) __GLeeGetProcAddress("glFragmentLightiSGIX"))!=0) nLinked++; + if ((pglFragmentLightivSGIX = (PFNGLFRAGMENTLIGHTIVSGIXPROC) __GLeeGetProcAddress("glFragmentLightivSGIX"))!=0) nLinked++; + if ((pglFragmentLightModelfSGIX = (PFNGLFRAGMENTLIGHTMODELFSGIXPROC) __GLeeGetProcAddress("glFragmentLightModelfSGIX"))!=0) nLinked++; + if ((pglFragmentLightModelfvSGIX = (PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) __GLeeGetProcAddress("glFragmentLightModelfvSGIX"))!=0) nLinked++; + if ((pglFragmentLightModeliSGIX = (PFNGLFRAGMENTLIGHTMODELISGIXPROC) __GLeeGetProcAddress("glFragmentLightModeliSGIX"))!=0) nLinked++; + if ((pglFragmentLightModelivSGIX = (PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) __GLeeGetProcAddress("glFragmentLightModelivSGIX"))!=0) nLinked++; + if ((pglFragmentMaterialfSGIX = (PFNGLFRAGMENTMATERIALFSGIXPROC) __GLeeGetProcAddress("glFragmentMaterialfSGIX"))!=0) nLinked++; + if ((pglFragmentMaterialfvSGIX = (PFNGLFRAGMENTMATERIALFVSGIXPROC) __GLeeGetProcAddress("glFragmentMaterialfvSGIX"))!=0) nLinked++; + if ((pglFragmentMaterialiSGIX = (PFNGLFRAGMENTMATERIALISGIXPROC) __GLeeGetProcAddress("glFragmentMaterialiSGIX"))!=0) nLinked++; + if ((pglFragmentMaterialivSGIX = (PFNGLFRAGMENTMATERIALIVSGIXPROC) __GLeeGetProcAddress("glFragmentMaterialivSGIX"))!=0) nLinked++; + if ((pglGetFragmentLightfvSGIX = (PFNGLGETFRAGMENTLIGHTFVSGIXPROC) __GLeeGetProcAddress("glGetFragmentLightfvSGIX"))!=0) nLinked++; + if ((pglGetFragmentLightivSGIX = (PFNGLGETFRAGMENTLIGHTIVSGIXPROC) __GLeeGetProcAddress("glGetFragmentLightivSGIX"))!=0) nLinked++; + if ((pglGetFragmentMaterialfvSGIX = (PFNGLGETFRAGMENTMATERIALFVSGIXPROC) __GLeeGetProcAddress("glGetFragmentMaterialfvSGIX"))!=0) nLinked++; + if ((pglGetFragmentMaterialivSGIX = (PFNGLGETFRAGMENTMATERIALIVSGIXPROC) __GLeeGetProcAddress("glGetFragmentMaterialivSGIX"))!=0) nLinked++; + if ((pglLightEnviSGIX = (PFNGLLIGHTENVISGIXPROC) __GLeeGetProcAddress("glLightEnviSGIX"))!=0) nLinked++; +#endif + if (nLinked==18) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_IBM_rasterpos_clip(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_HP_texture_lighting(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_draw_range_elements(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_draw_range_elements + if ((pglDrawRangeElementsEXT = (PFNGLDRAWRANGEELEMENTSEXTPROC) __GLeeGetProcAddress("glDrawRangeElementsEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_WIN_phong_shading(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_WIN_specular_fog(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_light_texture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_light_texture + if ((pglApplyTextureEXT = (PFNGLAPPLYTEXTUREEXTPROC) __GLeeGetProcAddress("glApplyTextureEXT"))!=0) nLinked++; + if ((pglTextureLightEXT = (PFNGLTEXTURELIGHTEXTPROC) __GLeeGetProcAddress("glTextureLightEXT"))!=0) nLinked++; + if ((pglTextureMaterialEXT = (PFNGLTEXTUREMATERIALEXTPROC) __GLeeGetProcAddress("glTextureMaterialEXT"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_blend_alpha_minmax(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_impact_pixel_texture(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_bgra(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_async(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_async + if ((pglAsyncMarkerSGIX = (PFNGLASYNCMARKERSGIXPROC) __GLeeGetProcAddress("glAsyncMarkerSGIX"))!=0) nLinked++; + if ((pglFinishAsyncSGIX = (PFNGLFINISHASYNCSGIXPROC) __GLeeGetProcAddress("glFinishAsyncSGIX"))!=0) nLinked++; + if ((pglPollAsyncSGIX = (PFNGLPOLLASYNCSGIXPROC) __GLeeGetProcAddress("glPollAsyncSGIX"))!=0) nLinked++; + if ((pglGenAsyncMarkersSGIX = (PFNGLGENASYNCMARKERSSGIXPROC) __GLeeGetProcAddress("glGenAsyncMarkersSGIX"))!=0) nLinked++; + if ((pglDeleteAsyncMarkersSGIX = (PFNGLDELETEASYNCMARKERSSGIXPROC) __GLeeGetProcAddress("glDeleteAsyncMarkersSGIX"))!=0) nLinked++; + if ((pglIsAsyncMarkerSGIX = (PFNGLISASYNCMARKERSGIXPROC) __GLeeGetProcAddress("glIsAsyncMarkerSGIX"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_async_pixel(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_async_histogram(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_INTEL_texture_scissor(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_INTEL_parallel_arrays(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_INTEL_parallel_arrays + if ((pglVertexPointervINTEL = (PFNGLVERTEXPOINTERVINTELPROC) __GLeeGetProcAddress("glVertexPointervINTEL"))!=0) nLinked++; + if ((pglNormalPointervINTEL = (PFNGLNORMALPOINTERVINTELPROC) __GLeeGetProcAddress("glNormalPointervINTEL"))!=0) nLinked++; + if ((pglColorPointervINTEL = (PFNGLCOLORPOINTERVINTELPROC) __GLeeGetProcAddress("glColorPointervINTEL"))!=0) nLinked++; + if ((pglTexCoordPointervINTEL = (PFNGLTEXCOORDPOINTERVINTELPROC) __GLeeGetProcAddress("glTexCoordPointervINTEL"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_HP_occlusion_test(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_pixel_transform(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_pixel_transform + if ((pglPixelTransformParameteriEXT = (PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) __GLeeGetProcAddress("glPixelTransformParameteriEXT"))!=0) nLinked++; + if ((pglPixelTransformParameterfEXT = (PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) __GLeeGetProcAddress("glPixelTransformParameterfEXT"))!=0) nLinked++; + if ((pglPixelTransformParameterivEXT = (PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) __GLeeGetProcAddress("glPixelTransformParameterivEXT"))!=0) nLinked++; + if ((pglPixelTransformParameterfvEXT = (PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) __GLeeGetProcAddress("glPixelTransformParameterfvEXT"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_pixel_transform_color_table(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_shared_texture_palette(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_separate_specular_color(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_secondary_color(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_secondary_color + if ((pglSecondaryColor3bEXT = (PFNGLSECONDARYCOLOR3BEXTPROC) __GLeeGetProcAddress("glSecondaryColor3bEXT"))!=0) nLinked++; + if ((pglSecondaryColor3bvEXT = (PFNGLSECONDARYCOLOR3BVEXTPROC) __GLeeGetProcAddress("glSecondaryColor3bvEXT"))!=0) nLinked++; + if ((pglSecondaryColor3dEXT = (PFNGLSECONDARYCOLOR3DEXTPROC) __GLeeGetProcAddress("glSecondaryColor3dEXT"))!=0) nLinked++; + if ((pglSecondaryColor3dvEXT = (PFNGLSECONDARYCOLOR3DVEXTPROC) __GLeeGetProcAddress("glSecondaryColor3dvEXT"))!=0) nLinked++; + if ((pglSecondaryColor3fEXT = (PFNGLSECONDARYCOLOR3FEXTPROC) __GLeeGetProcAddress("glSecondaryColor3fEXT"))!=0) nLinked++; + if ((pglSecondaryColor3fvEXT = (PFNGLSECONDARYCOLOR3FVEXTPROC) __GLeeGetProcAddress("glSecondaryColor3fvEXT"))!=0) nLinked++; + if ((pglSecondaryColor3iEXT = (PFNGLSECONDARYCOLOR3IEXTPROC) __GLeeGetProcAddress("glSecondaryColor3iEXT"))!=0) nLinked++; + if ((pglSecondaryColor3ivEXT = (PFNGLSECONDARYCOLOR3IVEXTPROC) __GLeeGetProcAddress("glSecondaryColor3ivEXT"))!=0) nLinked++; + if ((pglSecondaryColor3sEXT = (PFNGLSECONDARYCOLOR3SEXTPROC) __GLeeGetProcAddress("glSecondaryColor3sEXT"))!=0) nLinked++; + if ((pglSecondaryColor3svEXT = (PFNGLSECONDARYCOLOR3SVEXTPROC) __GLeeGetProcAddress("glSecondaryColor3svEXT"))!=0) nLinked++; + if ((pglSecondaryColor3ubEXT = (PFNGLSECONDARYCOLOR3UBEXTPROC) __GLeeGetProcAddress("glSecondaryColor3ubEXT"))!=0) nLinked++; + if ((pglSecondaryColor3ubvEXT = (PFNGLSECONDARYCOLOR3UBVEXTPROC) __GLeeGetProcAddress("glSecondaryColor3ubvEXT"))!=0) nLinked++; + if ((pglSecondaryColor3uiEXT = (PFNGLSECONDARYCOLOR3UIEXTPROC) __GLeeGetProcAddress("glSecondaryColor3uiEXT"))!=0) nLinked++; + if ((pglSecondaryColor3uivEXT = (PFNGLSECONDARYCOLOR3UIVEXTPROC) __GLeeGetProcAddress("glSecondaryColor3uivEXT"))!=0) nLinked++; + if ((pglSecondaryColor3usEXT = (PFNGLSECONDARYCOLOR3USEXTPROC) __GLeeGetProcAddress("glSecondaryColor3usEXT"))!=0) nLinked++; + if ((pglSecondaryColor3usvEXT = (PFNGLSECONDARYCOLOR3USVEXTPROC) __GLeeGetProcAddress("glSecondaryColor3usvEXT"))!=0) nLinked++; + if ((pglSecondaryColorPointerEXT = (PFNGLSECONDARYCOLORPOINTEREXTPROC) __GLeeGetProcAddress("glSecondaryColorPointerEXT"))!=0) nLinked++; +#endif + if (nLinked==17) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_texture_perturb_normal(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_texture_perturb_normal + if ((pglTextureNormalEXT = (PFNGLTEXTURENORMALEXTPROC) __GLeeGetProcAddress("glTextureNormalEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_multi_draw_arrays(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_multi_draw_arrays + if ((pglMultiDrawArraysEXT = (PFNGLMULTIDRAWARRAYSEXTPROC) __GLeeGetProcAddress("glMultiDrawArraysEXT"))!=0) nLinked++; + if ((pglMultiDrawElementsEXT = (PFNGLMULTIDRAWELEMENTSEXTPROC) __GLeeGetProcAddress("glMultiDrawElementsEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_fog_coord(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_fog_coord + if ((pglFogCoordfEXT = (PFNGLFOGCOORDFEXTPROC) __GLeeGetProcAddress("glFogCoordfEXT"))!=0) nLinked++; + if ((pglFogCoordfvEXT = (PFNGLFOGCOORDFVEXTPROC) __GLeeGetProcAddress("glFogCoordfvEXT"))!=0) nLinked++; + if ((pglFogCoorddEXT = (PFNGLFOGCOORDDEXTPROC) __GLeeGetProcAddress("glFogCoorddEXT"))!=0) nLinked++; + if ((pglFogCoorddvEXT = (PFNGLFOGCOORDDVEXTPROC) __GLeeGetProcAddress("glFogCoorddvEXT"))!=0) nLinked++; + if ((pglFogCoordPointerEXT = (PFNGLFOGCOORDPOINTEREXTPROC) __GLeeGetProcAddress("glFogCoordPointerEXT"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_REND_screen_coordinates(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_coordinate_frame(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_coordinate_frame + if ((pglTangent3bEXT = (PFNGLTANGENT3BEXTPROC) __GLeeGetProcAddress("glTangent3bEXT"))!=0) nLinked++; + if ((pglTangent3bvEXT = (PFNGLTANGENT3BVEXTPROC) __GLeeGetProcAddress("glTangent3bvEXT"))!=0) nLinked++; + if ((pglTangent3dEXT = (PFNGLTANGENT3DEXTPROC) __GLeeGetProcAddress("glTangent3dEXT"))!=0) nLinked++; + if ((pglTangent3dvEXT = (PFNGLTANGENT3DVEXTPROC) __GLeeGetProcAddress("glTangent3dvEXT"))!=0) nLinked++; + if ((pglTangent3fEXT = (PFNGLTANGENT3FEXTPROC) __GLeeGetProcAddress("glTangent3fEXT"))!=0) nLinked++; + if ((pglTangent3fvEXT = (PFNGLTANGENT3FVEXTPROC) __GLeeGetProcAddress("glTangent3fvEXT"))!=0) nLinked++; + if ((pglTangent3iEXT = (PFNGLTANGENT3IEXTPROC) __GLeeGetProcAddress("glTangent3iEXT"))!=0) nLinked++; + if ((pglTangent3ivEXT = (PFNGLTANGENT3IVEXTPROC) __GLeeGetProcAddress("glTangent3ivEXT"))!=0) nLinked++; + if ((pglTangent3sEXT = (PFNGLTANGENT3SEXTPROC) __GLeeGetProcAddress("glTangent3sEXT"))!=0) nLinked++; + if ((pglTangent3svEXT = (PFNGLTANGENT3SVEXTPROC) __GLeeGetProcAddress("glTangent3svEXT"))!=0) nLinked++; + if ((pglBinormal3bEXT = (PFNGLBINORMAL3BEXTPROC) __GLeeGetProcAddress("glBinormal3bEXT"))!=0) nLinked++; + if ((pglBinormal3bvEXT = (PFNGLBINORMAL3BVEXTPROC) __GLeeGetProcAddress("glBinormal3bvEXT"))!=0) nLinked++; + if ((pglBinormal3dEXT = (PFNGLBINORMAL3DEXTPROC) __GLeeGetProcAddress("glBinormal3dEXT"))!=0) nLinked++; + if ((pglBinormal3dvEXT = (PFNGLBINORMAL3DVEXTPROC) __GLeeGetProcAddress("glBinormal3dvEXT"))!=0) nLinked++; + if ((pglBinormal3fEXT = (PFNGLBINORMAL3FEXTPROC) __GLeeGetProcAddress("glBinormal3fEXT"))!=0) nLinked++; + if ((pglBinormal3fvEXT = (PFNGLBINORMAL3FVEXTPROC) __GLeeGetProcAddress("glBinormal3fvEXT"))!=0) nLinked++; + if ((pglBinormal3iEXT = (PFNGLBINORMAL3IEXTPROC) __GLeeGetProcAddress("glBinormal3iEXT"))!=0) nLinked++; + if ((pglBinormal3ivEXT = (PFNGLBINORMAL3IVEXTPROC) __GLeeGetProcAddress("glBinormal3ivEXT"))!=0) nLinked++; + if ((pglBinormal3sEXT = (PFNGLBINORMAL3SEXTPROC) __GLeeGetProcAddress("glBinormal3sEXT"))!=0) nLinked++; + if ((pglBinormal3svEXT = (PFNGLBINORMAL3SVEXTPROC) __GLeeGetProcAddress("glBinormal3svEXT"))!=0) nLinked++; + if ((pglTangentPointerEXT = (PFNGLTANGENTPOINTEREXTPROC) __GLeeGetProcAddress("glTangentPointerEXT"))!=0) nLinked++; + if ((pglBinormalPointerEXT = (PFNGLBINORMALPOINTEREXTPROC) __GLeeGetProcAddress("glBinormalPointerEXT"))!=0) nLinked++; +#endif + if (nLinked==22) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_texture_env_combine(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_APPLE_specular_vector(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_APPLE_transform_hint(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_fog_scale(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SUNX_constant_data(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SUNX_constant_data + if ((pglFinishTextureSUNX = (PFNGLFINISHTEXTURESUNXPROC) __GLeeGetProcAddress("glFinishTextureSUNX"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SUN_global_alpha(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SUN_global_alpha + if ((pglGlobalAlphaFactorbSUN = (PFNGLGLOBALALPHAFACTORBSUNPROC) __GLeeGetProcAddress("glGlobalAlphaFactorbSUN"))!=0) nLinked++; + if ((pglGlobalAlphaFactorsSUN = (PFNGLGLOBALALPHAFACTORSSUNPROC) __GLeeGetProcAddress("glGlobalAlphaFactorsSUN"))!=0) nLinked++; + if ((pglGlobalAlphaFactoriSUN = (PFNGLGLOBALALPHAFACTORISUNPROC) __GLeeGetProcAddress("glGlobalAlphaFactoriSUN"))!=0) nLinked++; + if ((pglGlobalAlphaFactorfSUN = (PFNGLGLOBALALPHAFACTORFSUNPROC) __GLeeGetProcAddress("glGlobalAlphaFactorfSUN"))!=0) nLinked++; + if ((pglGlobalAlphaFactordSUN = (PFNGLGLOBALALPHAFACTORDSUNPROC) __GLeeGetProcAddress("glGlobalAlphaFactordSUN"))!=0) nLinked++; + if ((pglGlobalAlphaFactorubSUN = (PFNGLGLOBALALPHAFACTORUBSUNPROC) __GLeeGetProcAddress("glGlobalAlphaFactorubSUN"))!=0) nLinked++; + if ((pglGlobalAlphaFactorusSUN = (PFNGLGLOBALALPHAFACTORUSSUNPROC) __GLeeGetProcAddress("glGlobalAlphaFactorusSUN"))!=0) nLinked++; + if ((pglGlobalAlphaFactoruiSUN = (PFNGLGLOBALALPHAFACTORUISUNPROC) __GLeeGetProcAddress("glGlobalAlphaFactoruiSUN"))!=0) nLinked++; +#endif + if (nLinked==8) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SUN_triangle_list(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SUN_triangle_list + if ((pglReplacementCodeuiSUN = (PFNGLREPLACEMENTCODEUISUNPROC) __GLeeGetProcAddress("glReplacementCodeuiSUN"))!=0) nLinked++; + if ((pglReplacementCodeusSUN = (PFNGLREPLACEMENTCODEUSSUNPROC) __GLeeGetProcAddress("glReplacementCodeusSUN"))!=0) nLinked++; + if ((pglReplacementCodeubSUN = (PFNGLREPLACEMENTCODEUBSUNPROC) __GLeeGetProcAddress("glReplacementCodeubSUN"))!=0) nLinked++; + if ((pglReplacementCodeuivSUN = (PFNGLREPLACEMENTCODEUIVSUNPROC) __GLeeGetProcAddress("glReplacementCodeuivSUN"))!=0) nLinked++; + if ((pglReplacementCodeusvSUN = (PFNGLREPLACEMENTCODEUSVSUNPROC) __GLeeGetProcAddress("glReplacementCodeusvSUN"))!=0) nLinked++; + if ((pglReplacementCodeubvSUN = (PFNGLREPLACEMENTCODEUBVSUNPROC) __GLeeGetProcAddress("glReplacementCodeubvSUN"))!=0) nLinked++; + if ((pglReplacementCodePointerSUN = (PFNGLREPLACEMENTCODEPOINTERSUNPROC) __GLeeGetProcAddress("glReplacementCodePointerSUN"))!=0) nLinked++; +#endif + if (nLinked==7) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SUN_vertex(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SUN_vertex + if ((pglColor4ubVertex2fSUN = (PFNGLCOLOR4UBVERTEX2FSUNPROC) __GLeeGetProcAddress("glColor4ubVertex2fSUN"))!=0) nLinked++; + if ((pglColor4ubVertex2fvSUN = (PFNGLCOLOR4UBVERTEX2FVSUNPROC) __GLeeGetProcAddress("glColor4ubVertex2fvSUN"))!=0) nLinked++; + if ((pglColor4ubVertex3fSUN = (PFNGLCOLOR4UBVERTEX3FSUNPROC) __GLeeGetProcAddress("glColor4ubVertex3fSUN"))!=0) nLinked++; + if ((pglColor4ubVertex3fvSUN = (PFNGLCOLOR4UBVERTEX3FVSUNPROC) __GLeeGetProcAddress("glColor4ubVertex3fvSUN"))!=0) nLinked++; + if ((pglColor3fVertex3fSUN = (PFNGLCOLOR3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glColor3fVertex3fSUN"))!=0) nLinked++; + if ((pglColor3fVertex3fvSUN = (PFNGLCOLOR3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glColor3fVertex3fvSUN"))!=0) nLinked++; + if ((pglNormal3fVertex3fSUN = (PFNGLNORMAL3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glNormal3fVertex3fSUN"))!=0) nLinked++; + if ((pglNormal3fVertex3fvSUN = (PFNGLNORMAL3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glNormal3fVertex3fvSUN"))!=0) nLinked++; + if ((pglColor4fNormal3fVertex3fSUN = (PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glColor4fNormal3fVertex3fSUN"))!=0) nLinked++; + if ((pglColor4fNormal3fVertex3fvSUN = (PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glColor4fNormal3fVertex3fvSUN"))!=0) nLinked++; + if ((pglTexCoord2fVertex3fSUN = (PFNGLTEXCOORD2FVERTEX3FSUNPROC) __GLeeGetProcAddress("glTexCoord2fVertex3fSUN"))!=0) nLinked++; + if ((pglTexCoord2fVertex3fvSUN = (PFNGLTEXCOORD2FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glTexCoord2fVertex3fvSUN"))!=0) nLinked++; + if ((pglTexCoord4fVertex4fSUN = (PFNGLTEXCOORD4FVERTEX4FSUNPROC) __GLeeGetProcAddress("glTexCoord4fVertex4fSUN"))!=0) nLinked++; + if ((pglTexCoord4fVertex4fvSUN = (PFNGLTEXCOORD4FVERTEX4FVSUNPROC) __GLeeGetProcAddress("glTexCoord4fVertex4fvSUN"))!=0) nLinked++; + if ((pglTexCoord2fColor4ubVertex3fSUN = (PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) __GLeeGetProcAddress("glTexCoord2fColor4ubVertex3fSUN"))!=0) nLinked++; + if ((pglTexCoord2fColor4ubVertex3fvSUN = (PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) __GLeeGetProcAddress("glTexCoord2fColor4ubVertex3fvSUN"))!=0) nLinked++; + if ((pglTexCoord2fColor3fVertex3fSUN = (PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glTexCoord2fColor3fVertex3fSUN"))!=0) nLinked++; + if ((pglTexCoord2fColor3fVertex3fvSUN = (PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glTexCoord2fColor3fVertex3fvSUN"))!=0) nLinked++; + if ((pglTexCoord2fNormal3fVertex3fSUN = (PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glTexCoord2fNormal3fVertex3fSUN"))!=0) nLinked++; + if ((pglTexCoord2fNormal3fVertex3fvSUN = (PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glTexCoord2fNormal3fVertex3fvSUN"))!=0) nLinked++; + if ((pglTexCoord2fColor4fNormal3fVertex3fSUN = (PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glTexCoord2fColor4fNormal3fVertex3fSUN"))!=0) nLinked++; + if ((pglTexCoord2fColor4fNormal3fVertex3fvSUN = (PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glTexCoord2fColor4fNormal3fVertex3fvSUN"))!=0) nLinked++; + if ((pglTexCoord4fColor4fNormal3fVertex4fSUN = (PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) __GLeeGetProcAddress("glTexCoord4fColor4fNormal3fVertex4fSUN"))!=0) nLinked++; + if ((pglTexCoord4fColor4fNormal3fVertex4fvSUN = (PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) __GLeeGetProcAddress("glTexCoord4fColor4fNormal3fVertex4fvSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiVertex3fSUN = (PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiVertex3fSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiVertex3fvSUN = (PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiVertex3fvSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiColor4ubVertex3fSUN = (PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiColor4ubVertex3fSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiColor4ubVertex3fvSUN = (PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiColor4ubVertex3fvSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiColor3fVertex3fSUN = (PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiColor3fVertex3fSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiColor3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiColor3fVertex3fvSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiNormal3fVertex3fSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiNormal3fVertex3fvSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiColor4fNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiColor4fNormal3fVertex3fSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiColor4fNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiColor4fNormal3fVertex3fvSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiTexCoord2fVertex3fSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiTexCoord2fVertex3fSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiTexCoord2fVertex3fvSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiTexCoord2fVertex3fvSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiTexCoord2fNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN"))!=0) nLinked++; + if ((pglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN = (PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) __GLeeGetProcAddress("glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN"))!=0) nLinked++; +#endif + if (nLinked==40) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_blend_func_separate(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_blend_func_separate + if ((pglBlendFuncSeparateEXT = (PFNGLBLENDFUNCSEPARATEEXTPROC) __GLeeGetProcAddress("glBlendFuncSeparateEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_INGR_color_clamp(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_INGR_interlace_read(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_stencil_wrap(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_422_pixels(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_texgen_reflection(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_cube_map(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SUN_convolution_border_modes(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_env_add(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_lod_bias(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_filter_anisotropic(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_vertex_weighting(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_vertex_weighting + if ((pglVertexWeightfEXT = (PFNGLVERTEXWEIGHTFEXTPROC) __GLeeGetProcAddress("glVertexWeightfEXT"))!=0) nLinked++; + if ((pglVertexWeightfvEXT = (PFNGLVERTEXWEIGHTFVEXTPROC) __GLeeGetProcAddress("glVertexWeightfvEXT"))!=0) nLinked++; + if ((pglVertexWeightPointerEXT = (PFNGLVERTEXWEIGHTPOINTEREXTPROC) __GLeeGetProcAddress("glVertexWeightPointerEXT"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_light_max_exponent(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_vertex_array_range(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_vertex_array_range + if ((pglFlushVertexArrayRangeNV = (PFNGLFLUSHVERTEXARRAYRANGENVPROC) __GLeeGetProcAddress("glFlushVertexArrayRangeNV"))!=0) nLinked++; + if ((pglVertexArrayRangeNV = (PFNGLVERTEXARRAYRANGENVPROC) __GLeeGetProcAddress("glVertexArrayRangeNV"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_register_combiners(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_register_combiners + if ((pglCombinerParameterfvNV = (PFNGLCOMBINERPARAMETERFVNVPROC) __GLeeGetProcAddress("glCombinerParameterfvNV"))!=0) nLinked++; + if ((pglCombinerParameterfNV = (PFNGLCOMBINERPARAMETERFNVPROC) __GLeeGetProcAddress("glCombinerParameterfNV"))!=0) nLinked++; + if ((pglCombinerParameterivNV = (PFNGLCOMBINERPARAMETERIVNVPROC) __GLeeGetProcAddress("glCombinerParameterivNV"))!=0) nLinked++; + if ((pglCombinerParameteriNV = (PFNGLCOMBINERPARAMETERINVPROC) __GLeeGetProcAddress("glCombinerParameteriNV"))!=0) nLinked++; + if ((pglCombinerInputNV = (PFNGLCOMBINERINPUTNVPROC) __GLeeGetProcAddress("glCombinerInputNV"))!=0) nLinked++; + if ((pglCombinerOutputNV = (PFNGLCOMBINEROUTPUTNVPROC) __GLeeGetProcAddress("glCombinerOutputNV"))!=0) nLinked++; + if ((pglFinalCombinerInputNV = (PFNGLFINALCOMBINERINPUTNVPROC) __GLeeGetProcAddress("glFinalCombinerInputNV"))!=0) nLinked++; + if ((pglGetCombinerInputParameterfvNV = (PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) __GLeeGetProcAddress("glGetCombinerInputParameterfvNV"))!=0) nLinked++; + if ((pglGetCombinerInputParameterivNV = (PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) __GLeeGetProcAddress("glGetCombinerInputParameterivNV"))!=0) nLinked++; + if ((pglGetCombinerOutputParameterfvNV = (PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) __GLeeGetProcAddress("glGetCombinerOutputParameterfvNV"))!=0) nLinked++; + if ((pglGetCombinerOutputParameterivNV = (PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) __GLeeGetProcAddress("glGetCombinerOutputParameterivNV"))!=0) nLinked++; + if ((pglGetFinalCombinerInputParameterfvNV = (PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) __GLeeGetProcAddress("glGetFinalCombinerInputParameterfvNV"))!=0) nLinked++; + if ((pglGetFinalCombinerInputParameterivNV = (PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) __GLeeGetProcAddress("glGetFinalCombinerInputParameterivNV"))!=0) nLinked++; +#endif + if (nLinked==13) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_fog_distance(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_texgen_emboss(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_blend_square(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_texture_env_combine4(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_MESA_resize_buffers(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_MESA_resize_buffers + if ((pglResizeBuffersMESA = (PFNGLRESIZEBUFFERSMESAPROC) __GLeeGetProcAddress("glResizeBuffersMESA"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_MESA_window_pos(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_MESA_window_pos + if ((pglWindowPos2dMESA = (PFNGLWINDOWPOS2DMESAPROC) __GLeeGetProcAddress("glWindowPos2dMESA"))!=0) nLinked++; + if ((pglWindowPos2dvMESA = (PFNGLWINDOWPOS2DVMESAPROC) __GLeeGetProcAddress("glWindowPos2dvMESA"))!=0) nLinked++; + if ((pglWindowPos2fMESA = (PFNGLWINDOWPOS2FMESAPROC) __GLeeGetProcAddress("glWindowPos2fMESA"))!=0) nLinked++; + if ((pglWindowPos2fvMESA = (PFNGLWINDOWPOS2FVMESAPROC) __GLeeGetProcAddress("glWindowPos2fvMESA"))!=0) nLinked++; + if ((pglWindowPos2iMESA = (PFNGLWINDOWPOS2IMESAPROC) __GLeeGetProcAddress("glWindowPos2iMESA"))!=0) nLinked++; + if ((pglWindowPos2ivMESA = (PFNGLWINDOWPOS2IVMESAPROC) __GLeeGetProcAddress("glWindowPos2ivMESA"))!=0) nLinked++; + if ((pglWindowPos2sMESA = (PFNGLWINDOWPOS2SMESAPROC) __GLeeGetProcAddress("glWindowPos2sMESA"))!=0) nLinked++; + if ((pglWindowPos2svMESA = (PFNGLWINDOWPOS2SVMESAPROC) __GLeeGetProcAddress("glWindowPos2svMESA"))!=0) nLinked++; + if ((pglWindowPos3dMESA = (PFNGLWINDOWPOS3DMESAPROC) __GLeeGetProcAddress("glWindowPos3dMESA"))!=0) nLinked++; + if ((pglWindowPos3dvMESA = (PFNGLWINDOWPOS3DVMESAPROC) __GLeeGetProcAddress("glWindowPos3dvMESA"))!=0) nLinked++; + if ((pglWindowPos3fMESA = (PFNGLWINDOWPOS3FMESAPROC) __GLeeGetProcAddress("glWindowPos3fMESA"))!=0) nLinked++; + if ((pglWindowPos3fvMESA = (PFNGLWINDOWPOS3FVMESAPROC) __GLeeGetProcAddress("glWindowPos3fvMESA"))!=0) nLinked++; + if ((pglWindowPos3iMESA = (PFNGLWINDOWPOS3IMESAPROC) __GLeeGetProcAddress("glWindowPos3iMESA"))!=0) nLinked++; + if ((pglWindowPos3ivMESA = (PFNGLWINDOWPOS3IVMESAPROC) __GLeeGetProcAddress("glWindowPos3ivMESA"))!=0) nLinked++; + if ((pglWindowPos3sMESA = (PFNGLWINDOWPOS3SMESAPROC) __GLeeGetProcAddress("glWindowPos3sMESA"))!=0) nLinked++; + if ((pglWindowPos3svMESA = (PFNGLWINDOWPOS3SVMESAPROC) __GLeeGetProcAddress("glWindowPos3svMESA"))!=0) nLinked++; + if ((pglWindowPos4dMESA = (PFNGLWINDOWPOS4DMESAPROC) __GLeeGetProcAddress("glWindowPos4dMESA"))!=0) nLinked++; + if ((pglWindowPos4dvMESA = (PFNGLWINDOWPOS4DVMESAPROC) __GLeeGetProcAddress("glWindowPos4dvMESA"))!=0) nLinked++; + if ((pglWindowPos4fMESA = (PFNGLWINDOWPOS4FMESAPROC) __GLeeGetProcAddress("glWindowPos4fMESA"))!=0) nLinked++; + if ((pglWindowPos4fvMESA = (PFNGLWINDOWPOS4FVMESAPROC) __GLeeGetProcAddress("glWindowPos4fvMESA"))!=0) nLinked++; + if ((pglWindowPos4iMESA = (PFNGLWINDOWPOS4IMESAPROC) __GLeeGetProcAddress("glWindowPos4iMESA"))!=0) nLinked++; + if ((pglWindowPos4ivMESA = (PFNGLWINDOWPOS4IVMESAPROC) __GLeeGetProcAddress("glWindowPos4ivMESA"))!=0) nLinked++; + if ((pglWindowPos4sMESA = (PFNGLWINDOWPOS4SMESAPROC) __GLeeGetProcAddress("glWindowPos4sMESA"))!=0) nLinked++; + if ((pglWindowPos4svMESA = (PFNGLWINDOWPOS4SVMESAPROC) __GLeeGetProcAddress("glWindowPos4svMESA"))!=0) nLinked++; +#endif + if (nLinked==24) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_texture_compression_s3tc(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_IBM_cull_vertex(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_IBM_multimode_draw_arrays(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_IBM_multimode_draw_arrays + if ((pglMultiModeDrawArraysIBM = (PFNGLMULTIMODEDRAWARRAYSIBMPROC) __GLeeGetProcAddress("glMultiModeDrawArraysIBM"))!=0) nLinked++; + if ((pglMultiModeDrawElementsIBM = (PFNGLMULTIMODEDRAWELEMENTSIBMPROC) __GLeeGetProcAddress("glMultiModeDrawElementsIBM"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_IBM_vertex_array_lists(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_IBM_vertex_array_lists + if ((pglColorPointerListIBM = (PFNGLCOLORPOINTERLISTIBMPROC) __GLeeGetProcAddress("glColorPointerListIBM"))!=0) nLinked++; + if ((pglSecondaryColorPointerListIBM = (PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) __GLeeGetProcAddress("glSecondaryColorPointerListIBM"))!=0) nLinked++; + if ((pglEdgeFlagPointerListIBM = (PFNGLEDGEFLAGPOINTERLISTIBMPROC) __GLeeGetProcAddress("glEdgeFlagPointerListIBM"))!=0) nLinked++; + if ((pglFogCoordPointerListIBM = (PFNGLFOGCOORDPOINTERLISTIBMPROC) __GLeeGetProcAddress("glFogCoordPointerListIBM"))!=0) nLinked++; + if ((pglIndexPointerListIBM = (PFNGLINDEXPOINTERLISTIBMPROC) __GLeeGetProcAddress("glIndexPointerListIBM"))!=0) nLinked++; + if ((pglNormalPointerListIBM = (PFNGLNORMALPOINTERLISTIBMPROC) __GLeeGetProcAddress("glNormalPointerListIBM"))!=0) nLinked++; + if ((pglTexCoordPointerListIBM = (PFNGLTEXCOORDPOINTERLISTIBMPROC) __GLeeGetProcAddress("glTexCoordPointerListIBM"))!=0) nLinked++; + if ((pglVertexPointerListIBM = (PFNGLVERTEXPOINTERLISTIBMPROC) __GLeeGetProcAddress("glVertexPointerListIBM"))!=0) nLinked++; +#endif + if (nLinked==8) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_subsample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_ycrcb_subsample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_ycrcba(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGI_depth_pass_instrument(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_3DFX_texture_compression_FXT1(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_3DFX_multisample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_3DFX_tbuffer(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_3DFX_tbuffer + if ((pglTbufferMask3DFX = (PFNGLTBUFFERMASK3DFXPROC) __GLeeGetProcAddress("glTbufferMask3DFX"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_multisample(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_multisample + if ((pglSampleMaskEXT = (PFNGLSAMPLEMASKEXTPROC) __GLeeGetProcAddress("glSampleMaskEXT"))!=0) nLinked++; + if ((pglSamplePatternEXT = (PFNGLSAMPLEPATTERNEXTPROC) __GLeeGetProcAddress("glSamplePatternEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_vertex_preclip(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_convolution_accuracy(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_resample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIS_point_line_texgen(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIS_texture_color_mask(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIS_texture_color_mask + if ((pglTextureColorMaskSGIS = (PFNGLTEXTURECOLORMASKSGISPROC) __GLeeGetProcAddress("glTextureColorMaskSGIS"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_texture_env_dot3(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ATI_texture_mirror_once(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_fence(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_fence + if ((pglDeleteFencesNV = (PFNGLDELETEFENCESNVPROC) __GLeeGetProcAddress("glDeleteFencesNV"))!=0) nLinked++; + if ((pglGenFencesNV = (PFNGLGENFENCESNVPROC) __GLeeGetProcAddress("glGenFencesNV"))!=0) nLinked++; + if ((pglIsFenceNV = (PFNGLISFENCENVPROC) __GLeeGetProcAddress("glIsFenceNV"))!=0) nLinked++; + if ((pglTestFenceNV = (PFNGLTESTFENCENVPROC) __GLeeGetProcAddress("glTestFenceNV"))!=0) nLinked++; + if ((pglGetFenceivNV = (PFNGLGETFENCEIVNVPROC) __GLeeGetProcAddress("glGetFenceivNV"))!=0) nLinked++; + if ((pglFinishFenceNV = (PFNGLFINISHFENCENVPROC) __GLeeGetProcAddress("glFinishFenceNV"))!=0) nLinked++; + if ((pglSetFenceNV = (PFNGLSETFENCENVPROC) __GLeeGetProcAddress("glSetFenceNV"))!=0) nLinked++; +#endif + if (nLinked==7) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_IBM_texture_mirrored_repeat(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_evaluators(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_evaluators + if ((pglMapControlPointsNV = (PFNGLMAPCONTROLPOINTSNVPROC) __GLeeGetProcAddress("glMapControlPointsNV"))!=0) nLinked++; + if ((pglMapParameterivNV = (PFNGLMAPPARAMETERIVNVPROC) __GLeeGetProcAddress("glMapParameterivNV"))!=0) nLinked++; + if ((pglMapParameterfvNV = (PFNGLMAPPARAMETERFVNVPROC) __GLeeGetProcAddress("glMapParameterfvNV"))!=0) nLinked++; + if ((pglGetMapControlPointsNV = (PFNGLGETMAPCONTROLPOINTSNVPROC) __GLeeGetProcAddress("glGetMapControlPointsNV"))!=0) nLinked++; + if ((pglGetMapParameterivNV = (PFNGLGETMAPPARAMETERIVNVPROC) __GLeeGetProcAddress("glGetMapParameterivNV"))!=0) nLinked++; + if ((pglGetMapParameterfvNV = (PFNGLGETMAPPARAMETERFVNVPROC) __GLeeGetProcAddress("glGetMapParameterfvNV"))!=0) nLinked++; + if ((pglGetMapAttribParameterivNV = (PFNGLGETMAPATTRIBPARAMETERIVNVPROC) __GLeeGetProcAddress("glGetMapAttribParameterivNV"))!=0) nLinked++; + if ((pglGetMapAttribParameterfvNV = (PFNGLGETMAPATTRIBPARAMETERFVNVPROC) __GLeeGetProcAddress("glGetMapAttribParameterfvNV"))!=0) nLinked++; + if ((pglEvalMapsNV = (PFNGLEVALMAPSNVPROC) __GLeeGetProcAddress("glEvalMapsNV"))!=0) nLinked++; +#endif + if (nLinked==9) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_packed_depth_stencil(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_register_combiners2(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_register_combiners2 + if ((pglCombinerStageParameterfvNV = (PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) __GLeeGetProcAddress("glCombinerStageParameterfvNV"))!=0) nLinked++; + if ((pglGetCombinerStageParameterfvNV = (PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) __GLeeGetProcAddress("glGetCombinerStageParameterfvNV"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_texture_compression_vtc(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_texture_rectangle(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_texture_shader(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_texture_shader2(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_vertex_array_range2(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_vertex_program(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_vertex_program + if ((pglAreProgramsResidentNV = (PFNGLAREPROGRAMSRESIDENTNVPROC) __GLeeGetProcAddress("glAreProgramsResidentNV"))!=0) nLinked++; + if ((pglBindProgramNV = (PFNGLBINDPROGRAMNVPROC) __GLeeGetProcAddress("glBindProgramNV"))!=0) nLinked++; + if ((pglDeleteProgramsNV = (PFNGLDELETEPROGRAMSNVPROC) __GLeeGetProcAddress("glDeleteProgramsNV"))!=0) nLinked++; + if ((pglExecuteProgramNV = (PFNGLEXECUTEPROGRAMNVPROC) __GLeeGetProcAddress("glExecuteProgramNV"))!=0) nLinked++; + if ((pglGenProgramsNV = (PFNGLGENPROGRAMSNVPROC) __GLeeGetProcAddress("glGenProgramsNV"))!=0) nLinked++; + if ((pglGetProgramParameterdvNV = (PFNGLGETPROGRAMPARAMETERDVNVPROC) __GLeeGetProcAddress("glGetProgramParameterdvNV"))!=0) nLinked++; + if ((pglGetProgramParameterfvNV = (PFNGLGETPROGRAMPARAMETERFVNVPROC) __GLeeGetProcAddress("glGetProgramParameterfvNV"))!=0) nLinked++; + if ((pglGetProgramivNV = (PFNGLGETPROGRAMIVNVPROC) __GLeeGetProcAddress("glGetProgramivNV"))!=0) nLinked++; + if ((pglGetProgramStringNV = (PFNGLGETPROGRAMSTRINGNVPROC) __GLeeGetProcAddress("glGetProgramStringNV"))!=0) nLinked++; + if ((pglGetTrackMatrixivNV = (PFNGLGETTRACKMATRIXIVNVPROC) __GLeeGetProcAddress("glGetTrackMatrixivNV"))!=0) nLinked++; + if ((pglGetVertexAttribdvNV = (PFNGLGETVERTEXATTRIBDVNVPROC) __GLeeGetProcAddress("glGetVertexAttribdvNV"))!=0) nLinked++; + if ((pglGetVertexAttribfvNV = (PFNGLGETVERTEXATTRIBFVNVPROC) __GLeeGetProcAddress("glGetVertexAttribfvNV"))!=0) nLinked++; + if ((pglGetVertexAttribivNV = (PFNGLGETVERTEXATTRIBIVNVPROC) __GLeeGetProcAddress("glGetVertexAttribivNV"))!=0) nLinked++; + if ((pglGetVertexAttribPointervNV = (PFNGLGETVERTEXATTRIBPOINTERVNVPROC) __GLeeGetProcAddress("glGetVertexAttribPointervNV"))!=0) nLinked++; + if ((pglIsProgramNV = (PFNGLISPROGRAMNVPROC) __GLeeGetProcAddress("glIsProgramNV"))!=0) nLinked++; + if ((pglLoadProgramNV = (PFNGLLOADPROGRAMNVPROC) __GLeeGetProcAddress("glLoadProgramNV"))!=0) nLinked++; + if ((pglProgramParameter4dNV = (PFNGLPROGRAMPARAMETER4DNVPROC) __GLeeGetProcAddress("glProgramParameter4dNV"))!=0) nLinked++; + if ((pglProgramParameter4dvNV = (PFNGLPROGRAMPARAMETER4DVNVPROC) __GLeeGetProcAddress("glProgramParameter4dvNV"))!=0) nLinked++; + if ((pglProgramParameter4fNV = (PFNGLPROGRAMPARAMETER4FNVPROC) __GLeeGetProcAddress("glProgramParameter4fNV"))!=0) nLinked++; + if ((pglProgramParameter4fvNV = (PFNGLPROGRAMPARAMETER4FVNVPROC) __GLeeGetProcAddress("glProgramParameter4fvNV"))!=0) nLinked++; + if ((pglProgramParameters4dvNV = (PFNGLPROGRAMPARAMETERS4DVNVPROC) __GLeeGetProcAddress("glProgramParameters4dvNV"))!=0) nLinked++; + if ((pglProgramParameters4fvNV = (PFNGLPROGRAMPARAMETERS4FVNVPROC) __GLeeGetProcAddress("glProgramParameters4fvNV"))!=0) nLinked++; + if ((pglRequestResidentProgramsNV = (PFNGLREQUESTRESIDENTPROGRAMSNVPROC) __GLeeGetProcAddress("glRequestResidentProgramsNV"))!=0) nLinked++; + if ((pglTrackMatrixNV = (PFNGLTRACKMATRIXNVPROC) __GLeeGetProcAddress("glTrackMatrixNV"))!=0) nLinked++; + if ((pglVertexAttribPointerNV = (PFNGLVERTEXATTRIBPOINTERNVPROC) __GLeeGetProcAddress("glVertexAttribPointerNV"))!=0) nLinked++; + if ((pglVertexAttrib1dNV = (PFNGLVERTEXATTRIB1DNVPROC) __GLeeGetProcAddress("glVertexAttrib1dNV"))!=0) nLinked++; + if ((pglVertexAttrib1dvNV = (PFNGLVERTEXATTRIB1DVNVPROC) __GLeeGetProcAddress("glVertexAttrib1dvNV"))!=0) nLinked++; + if ((pglVertexAttrib1fNV = (PFNGLVERTEXATTRIB1FNVPROC) __GLeeGetProcAddress("glVertexAttrib1fNV"))!=0) nLinked++; + if ((pglVertexAttrib1fvNV = (PFNGLVERTEXATTRIB1FVNVPROC) __GLeeGetProcAddress("glVertexAttrib1fvNV"))!=0) nLinked++; + if ((pglVertexAttrib1sNV = (PFNGLVERTEXATTRIB1SNVPROC) __GLeeGetProcAddress("glVertexAttrib1sNV"))!=0) nLinked++; + if ((pglVertexAttrib1svNV = (PFNGLVERTEXATTRIB1SVNVPROC) __GLeeGetProcAddress("glVertexAttrib1svNV"))!=0) nLinked++; + if ((pglVertexAttrib2dNV = (PFNGLVERTEXATTRIB2DNVPROC) __GLeeGetProcAddress("glVertexAttrib2dNV"))!=0) nLinked++; + if ((pglVertexAttrib2dvNV = (PFNGLVERTEXATTRIB2DVNVPROC) __GLeeGetProcAddress("glVertexAttrib2dvNV"))!=0) nLinked++; + if ((pglVertexAttrib2fNV = (PFNGLVERTEXATTRIB2FNVPROC) __GLeeGetProcAddress("glVertexAttrib2fNV"))!=0) nLinked++; + if ((pglVertexAttrib2fvNV = (PFNGLVERTEXATTRIB2FVNVPROC) __GLeeGetProcAddress("glVertexAttrib2fvNV"))!=0) nLinked++; + if ((pglVertexAttrib2sNV = (PFNGLVERTEXATTRIB2SNVPROC) __GLeeGetProcAddress("glVertexAttrib2sNV"))!=0) nLinked++; + if ((pglVertexAttrib2svNV = (PFNGLVERTEXATTRIB2SVNVPROC) __GLeeGetProcAddress("glVertexAttrib2svNV"))!=0) nLinked++; + if ((pglVertexAttrib3dNV = (PFNGLVERTEXATTRIB3DNVPROC) __GLeeGetProcAddress("glVertexAttrib3dNV"))!=0) nLinked++; + if ((pglVertexAttrib3dvNV = (PFNGLVERTEXATTRIB3DVNVPROC) __GLeeGetProcAddress("glVertexAttrib3dvNV"))!=0) nLinked++; + if ((pglVertexAttrib3fNV = (PFNGLVERTEXATTRIB3FNVPROC) __GLeeGetProcAddress("glVertexAttrib3fNV"))!=0) nLinked++; + if ((pglVertexAttrib3fvNV = (PFNGLVERTEXATTRIB3FVNVPROC) __GLeeGetProcAddress("glVertexAttrib3fvNV"))!=0) nLinked++; + if ((pglVertexAttrib3sNV = (PFNGLVERTEXATTRIB3SNVPROC) __GLeeGetProcAddress("glVertexAttrib3sNV"))!=0) nLinked++; + if ((pglVertexAttrib3svNV = (PFNGLVERTEXATTRIB3SVNVPROC) __GLeeGetProcAddress("glVertexAttrib3svNV"))!=0) nLinked++; + if ((pglVertexAttrib4dNV = (PFNGLVERTEXATTRIB4DNVPROC) __GLeeGetProcAddress("glVertexAttrib4dNV"))!=0) nLinked++; + if ((pglVertexAttrib4dvNV = (PFNGLVERTEXATTRIB4DVNVPROC) __GLeeGetProcAddress("glVertexAttrib4dvNV"))!=0) nLinked++; + if ((pglVertexAttrib4fNV = (PFNGLVERTEXATTRIB4FNVPROC) __GLeeGetProcAddress("glVertexAttrib4fNV"))!=0) nLinked++; + if ((pglVertexAttrib4fvNV = (PFNGLVERTEXATTRIB4FVNVPROC) __GLeeGetProcAddress("glVertexAttrib4fvNV"))!=0) nLinked++; + if ((pglVertexAttrib4sNV = (PFNGLVERTEXATTRIB4SNVPROC) __GLeeGetProcAddress("glVertexAttrib4sNV"))!=0) nLinked++; + if ((pglVertexAttrib4svNV = (PFNGLVERTEXATTRIB4SVNVPROC) __GLeeGetProcAddress("glVertexAttrib4svNV"))!=0) nLinked++; + if ((pglVertexAttrib4ubNV = (PFNGLVERTEXATTRIB4UBNVPROC) __GLeeGetProcAddress("glVertexAttrib4ubNV"))!=0) nLinked++; + if ((pglVertexAttrib4ubvNV = (PFNGLVERTEXATTRIB4UBVNVPROC) __GLeeGetProcAddress("glVertexAttrib4ubvNV"))!=0) nLinked++; + if ((pglVertexAttribs1dvNV = (PFNGLVERTEXATTRIBS1DVNVPROC) __GLeeGetProcAddress("glVertexAttribs1dvNV"))!=0) nLinked++; + if ((pglVertexAttribs1fvNV = (PFNGLVERTEXATTRIBS1FVNVPROC) __GLeeGetProcAddress("glVertexAttribs1fvNV"))!=0) nLinked++; + if ((pglVertexAttribs1svNV = (PFNGLVERTEXATTRIBS1SVNVPROC) __GLeeGetProcAddress("glVertexAttribs1svNV"))!=0) nLinked++; + if ((pglVertexAttribs2dvNV = (PFNGLVERTEXATTRIBS2DVNVPROC) __GLeeGetProcAddress("glVertexAttribs2dvNV"))!=0) nLinked++; + if ((pglVertexAttribs2fvNV = (PFNGLVERTEXATTRIBS2FVNVPROC) __GLeeGetProcAddress("glVertexAttribs2fvNV"))!=0) nLinked++; + if ((pglVertexAttribs2svNV = (PFNGLVERTEXATTRIBS2SVNVPROC) __GLeeGetProcAddress("glVertexAttribs2svNV"))!=0) nLinked++; + if ((pglVertexAttribs3dvNV = (PFNGLVERTEXATTRIBS3DVNVPROC) __GLeeGetProcAddress("glVertexAttribs3dvNV"))!=0) nLinked++; + if ((pglVertexAttribs3fvNV = (PFNGLVERTEXATTRIBS3FVNVPROC) __GLeeGetProcAddress("glVertexAttribs3fvNV"))!=0) nLinked++; + if ((pglVertexAttribs3svNV = (PFNGLVERTEXATTRIBS3SVNVPROC) __GLeeGetProcAddress("glVertexAttribs3svNV"))!=0) nLinked++; + if ((pglVertexAttribs4dvNV = (PFNGLVERTEXATTRIBS4DVNVPROC) __GLeeGetProcAddress("glVertexAttribs4dvNV"))!=0) nLinked++; + if ((pglVertexAttribs4fvNV = (PFNGLVERTEXATTRIBS4FVNVPROC) __GLeeGetProcAddress("glVertexAttribs4fvNV"))!=0) nLinked++; + if ((pglVertexAttribs4svNV = (PFNGLVERTEXATTRIBS4SVNVPROC) __GLeeGetProcAddress("glVertexAttribs4svNV"))!=0) nLinked++; + if ((pglVertexAttribs4ubvNV = (PFNGLVERTEXATTRIBS4UBVNVPROC) __GLeeGetProcAddress("glVertexAttribs4ubvNV"))!=0) nLinked++; +#endif + if (nLinked==64) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_texture_coordinate_clamp(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_scalebias_hint(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_OML_interlace(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_OML_subsample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_OML_resample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_copy_depth_to_color(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ATI_envmap_bumpmap(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_envmap_bumpmap + if ((pglTexBumpParameterivATI = (PFNGLTEXBUMPPARAMETERIVATIPROC) __GLeeGetProcAddress("glTexBumpParameterivATI"))!=0) nLinked++; + if ((pglTexBumpParameterfvATI = (PFNGLTEXBUMPPARAMETERFVATIPROC) __GLeeGetProcAddress("glTexBumpParameterfvATI"))!=0) nLinked++; + if ((pglGetTexBumpParameterivATI = (PFNGLGETTEXBUMPPARAMETERIVATIPROC) __GLeeGetProcAddress("glGetTexBumpParameterivATI"))!=0) nLinked++; + if ((pglGetTexBumpParameterfvATI = (PFNGLGETTEXBUMPPARAMETERFVATIPROC) __GLeeGetProcAddress("glGetTexBumpParameterfvATI"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ATI_fragment_shader(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_fragment_shader + if ((pglGenFragmentShadersATI = (PFNGLGENFRAGMENTSHADERSATIPROC) __GLeeGetProcAddress("glGenFragmentShadersATI"))!=0) nLinked++; + if ((pglBindFragmentShaderATI = (PFNGLBINDFRAGMENTSHADERATIPROC) __GLeeGetProcAddress("glBindFragmentShaderATI"))!=0) nLinked++; + if ((pglDeleteFragmentShaderATI = (PFNGLDELETEFRAGMENTSHADERATIPROC) __GLeeGetProcAddress("glDeleteFragmentShaderATI"))!=0) nLinked++; + if ((pglBeginFragmentShaderATI = (PFNGLBEGINFRAGMENTSHADERATIPROC) __GLeeGetProcAddress("glBeginFragmentShaderATI"))!=0) nLinked++; + if ((pglEndFragmentShaderATI = (PFNGLENDFRAGMENTSHADERATIPROC) __GLeeGetProcAddress("glEndFragmentShaderATI"))!=0) nLinked++; + if ((pglPassTexCoordATI = (PFNGLPASSTEXCOORDATIPROC) __GLeeGetProcAddress("glPassTexCoordATI"))!=0) nLinked++; + if ((pglSampleMapATI = (PFNGLSAMPLEMAPATIPROC) __GLeeGetProcAddress("glSampleMapATI"))!=0) nLinked++; + if ((pglColorFragmentOp1ATI = (PFNGLCOLORFRAGMENTOP1ATIPROC) __GLeeGetProcAddress("glColorFragmentOp1ATI"))!=0) nLinked++; + if ((pglColorFragmentOp2ATI = (PFNGLCOLORFRAGMENTOP2ATIPROC) __GLeeGetProcAddress("glColorFragmentOp2ATI"))!=0) nLinked++; + if ((pglColorFragmentOp3ATI = (PFNGLCOLORFRAGMENTOP3ATIPROC) __GLeeGetProcAddress("glColorFragmentOp3ATI"))!=0) nLinked++; + if ((pglAlphaFragmentOp1ATI = (PFNGLALPHAFRAGMENTOP1ATIPROC) __GLeeGetProcAddress("glAlphaFragmentOp1ATI"))!=0) nLinked++; + if ((pglAlphaFragmentOp2ATI = (PFNGLALPHAFRAGMENTOP2ATIPROC) __GLeeGetProcAddress("glAlphaFragmentOp2ATI"))!=0) nLinked++; + if ((pglAlphaFragmentOp3ATI = (PFNGLALPHAFRAGMENTOP3ATIPROC) __GLeeGetProcAddress("glAlphaFragmentOp3ATI"))!=0) nLinked++; + if ((pglSetFragmentShaderConstantATI = (PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) __GLeeGetProcAddress("glSetFragmentShaderConstantATI"))!=0) nLinked++; +#endif + if (nLinked==14) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ATI_pn_triangles(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_pn_triangles + if ((pglPNTrianglesiATI = (PFNGLPNTRIANGLESIATIPROC) __GLeeGetProcAddress("glPNTrianglesiATI"))!=0) nLinked++; + if ((pglPNTrianglesfATI = (PFNGLPNTRIANGLESFATIPROC) __GLeeGetProcAddress("glPNTrianglesfATI"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ATI_vertex_array_object(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_vertex_array_object + if ((pglNewObjectBufferATI = (PFNGLNEWOBJECTBUFFERATIPROC) __GLeeGetProcAddress("glNewObjectBufferATI"))!=0) nLinked++; + if ((pglIsObjectBufferATI = (PFNGLISOBJECTBUFFERATIPROC) __GLeeGetProcAddress("glIsObjectBufferATI"))!=0) nLinked++; + if ((pglUpdateObjectBufferATI = (PFNGLUPDATEOBJECTBUFFERATIPROC) __GLeeGetProcAddress("glUpdateObjectBufferATI"))!=0) nLinked++; + if ((pglGetObjectBufferfvATI = (PFNGLGETOBJECTBUFFERFVATIPROC) __GLeeGetProcAddress("glGetObjectBufferfvATI"))!=0) nLinked++; + if ((pglGetObjectBufferivATI = (PFNGLGETOBJECTBUFFERIVATIPROC) __GLeeGetProcAddress("glGetObjectBufferivATI"))!=0) nLinked++; + if ((pglFreeObjectBufferATI = (PFNGLFREEOBJECTBUFFERATIPROC) __GLeeGetProcAddress("glFreeObjectBufferATI"))!=0) nLinked++; + if ((pglArrayObjectATI = (PFNGLARRAYOBJECTATIPROC) __GLeeGetProcAddress("glArrayObjectATI"))!=0) nLinked++; + if ((pglGetArrayObjectfvATI = (PFNGLGETARRAYOBJECTFVATIPROC) __GLeeGetProcAddress("glGetArrayObjectfvATI"))!=0) nLinked++; + if ((pglGetArrayObjectivATI = (PFNGLGETARRAYOBJECTIVATIPROC) __GLeeGetProcAddress("glGetArrayObjectivATI"))!=0) nLinked++; + if ((pglVariantArrayObjectATI = (PFNGLVARIANTARRAYOBJECTATIPROC) __GLeeGetProcAddress("glVariantArrayObjectATI"))!=0) nLinked++; + if ((pglGetVariantArrayObjectfvATI = (PFNGLGETVARIANTARRAYOBJECTFVATIPROC) __GLeeGetProcAddress("glGetVariantArrayObjectfvATI"))!=0) nLinked++; + if ((pglGetVariantArrayObjectivATI = (PFNGLGETVARIANTARRAYOBJECTIVATIPROC) __GLeeGetProcAddress("glGetVariantArrayObjectivATI"))!=0) nLinked++; +#endif + if (nLinked==12) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_vertex_shader(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_vertex_shader + if ((pglBeginVertexShaderEXT = (PFNGLBEGINVERTEXSHADEREXTPROC) __GLeeGetProcAddress("glBeginVertexShaderEXT"))!=0) nLinked++; + if ((pglEndVertexShaderEXT = (PFNGLENDVERTEXSHADEREXTPROC) __GLeeGetProcAddress("glEndVertexShaderEXT"))!=0) nLinked++; + if ((pglBindVertexShaderEXT = (PFNGLBINDVERTEXSHADEREXTPROC) __GLeeGetProcAddress("glBindVertexShaderEXT"))!=0) nLinked++; + if ((pglGenVertexShadersEXT = (PFNGLGENVERTEXSHADERSEXTPROC) __GLeeGetProcAddress("glGenVertexShadersEXT"))!=0) nLinked++; + if ((pglDeleteVertexShaderEXT = (PFNGLDELETEVERTEXSHADEREXTPROC) __GLeeGetProcAddress("glDeleteVertexShaderEXT"))!=0) nLinked++; + if ((pglShaderOp1EXT = (PFNGLSHADEROP1EXTPROC) __GLeeGetProcAddress("glShaderOp1EXT"))!=0) nLinked++; + if ((pglShaderOp2EXT = (PFNGLSHADEROP2EXTPROC) __GLeeGetProcAddress("glShaderOp2EXT"))!=0) nLinked++; + if ((pglShaderOp3EXT = (PFNGLSHADEROP3EXTPROC) __GLeeGetProcAddress("glShaderOp3EXT"))!=0) nLinked++; + if ((pglSwizzleEXT = (PFNGLSWIZZLEEXTPROC) __GLeeGetProcAddress("glSwizzleEXT"))!=0) nLinked++; + if ((pglWriteMaskEXT = (PFNGLWRITEMASKEXTPROC) __GLeeGetProcAddress("glWriteMaskEXT"))!=0) nLinked++; + if ((pglInsertComponentEXT = (PFNGLINSERTCOMPONENTEXTPROC) __GLeeGetProcAddress("glInsertComponentEXT"))!=0) nLinked++; + if ((pglExtractComponentEXT = (PFNGLEXTRACTCOMPONENTEXTPROC) __GLeeGetProcAddress("glExtractComponentEXT"))!=0) nLinked++; + if ((pglGenSymbolsEXT = (PFNGLGENSYMBOLSEXTPROC) __GLeeGetProcAddress("glGenSymbolsEXT"))!=0) nLinked++; + if ((pglSetInvariantEXT = (PFNGLSETINVARIANTEXTPROC) __GLeeGetProcAddress("glSetInvariantEXT"))!=0) nLinked++; + if ((pglSetLocalConstantEXT = (PFNGLSETLOCALCONSTANTEXTPROC) __GLeeGetProcAddress("glSetLocalConstantEXT"))!=0) nLinked++; + if ((pglVariantbvEXT = (PFNGLVARIANTBVEXTPROC) __GLeeGetProcAddress("glVariantbvEXT"))!=0) nLinked++; + if ((pglVariantsvEXT = (PFNGLVARIANTSVEXTPROC) __GLeeGetProcAddress("glVariantsvEXT"))!=0) nLinked++; + if ((pglVariantivEXT = (PFNGLVARIANTIVEXTPROC) __GLeeGetProcAddress("glVariantivEXT"))!=0) nLinked++; + if ((pglVariantfvEXT = (PFNGLVARIANTFVEXTPROC) __GLeeGetProcAddress("glVariantfvEXT"))!=0) nLinked++; + if ((pglVariantdvEXT = (PFNGLVARIANTDVEXTPROC) __GLeeGetProcAddress("glVariantdvEXT"))!=0) nLinked++; + if ((pglVariantubvEXT = (PFNGLVARIANTUBVEXTPROC) __GLeeGetProcAddress("glVariantubvEXT"))!=0) nLinked++; + if ((pglVariantusvEXT = (PFNGLVARIANTUSVEXTPROC) __GLeeGetProcAddress("glVariantusvEXT"))!=0) nLinked++; + if ((pglVariantuivEXT = (PFNGLVARIANTUIVEXTPROC) __GLeeGetProcAddress("glVariantuivEXT"))!=0) nLinked++; + if ((pglVariantPointerEXT = (PFNGLVARIANTPOINTEREXTPROC) __GLeeGetProcAddress("glVariantPointerEXT"))!=0) nLinked++; + if ((pglEnableVariantClientStateEXT = (PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) __GLeeGetProcAddress("glEnableVariantClientStateEXT"))!=0) nLinked++; + if ((pglDisableVariantClientStateEXT = (PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) __GLeeGetProcAddress("glDisableVariantClientStateEXT"))!=0) nLinked++; + if ((pglBindLightParameterEXT = (PFNGLBINDLIGHTPARAMETEREXTPROC) __GLeeGetProcAddress("glBindLightParameterEXT"))!=0) nLinked++; + if ((pglBindMaterialParameterEXT = (PFNGLBINDMATERIALPARAMETEREXTPROC) __GLeeGetProcAddress("glBindMaterialParameterEXT"))!=0) nLinked++; + if ((pglBindTexGenParameterEXT = (PFNGLBINDTEXGENPARAMETEREXTPROC) __GLeeGetProcAddress("glBindTexGenParameterEXT"))!=0) nLinked++; + if ((pglBindTextureUnitParameterEXT = (PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) __GLeeGetProcAddress("glBindTextureUnitParameterEXT"))!=0) nLinked++; + if ((pglBindParameterEXT = (PFNGLBINDPARAMETEREXTPROC) __GLeeGetProcAddress("glBindParameterEXT"))!=0) nLinked++; + if ((pglIsVariantEnabledEXT = (PFNGLISVARIANTENABLEDEXTPROC) __GLeeGetProcAddress("glIsVariantEnabledEXT"))!=0) nLinked++; + if ((pglGetVariantBooleanvEXT = (PFNGLGETVARIANTBOOLEANVEXTPROC) __GLeeGetProcAddress("glGetVariantBooleanvEXT"))!=0) nLinked++; + if ((pglGetVariantIntegervEXT = (PFNGLGETVARIANTINTEGERVEXTPROC) __GLeeGetProcAddress("glGetVariantIntegervEXT"))!=0) nLinked++; + if ((pglGetVariantFloatvEXT = (PFNGLGETVARIANTFLOATVEXTPROC) __GLeeGetProcAddress("glGetVariantFloatvEXT"))!=0) nLinked++; + if ((pglGetVariantPointervEXT = (PFNGLGETVARIANTPOINTERVEXTPROC) __GLeeGetProcAddress("glGetVariantPointervEXT"))!=0) nLinked++; + if ((pglGetInvariantBooleanvEXT = (PFNGLGETINVARIANTBOOLEANVEXTPROC) __GLeeGetProcAddress("glGetInvariantBooleanvEXT"))!=0) nLinked++; + if ((pglGetInvariantIntegervEXT = (PFNGLGETINVARIANTINTEGERVEXTPROC) __GLeeGetProcAddress("glGetInvariantIntegervEXT"))!=0) nLinked++; + if ((pglGetInvariantFloatvEXT = (PFNGLGETINVARIANTFLOATVEXTPROC) __GLeeGetProcAddress("glGetInvariantFloatvEXT"))!=0) nLinked++; + if ((pglGetLocalConstantBooleanvEXT = (PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) __GLeeGetProcAddress("glGetLocalConstantBooleanvEXT"))!=0) nLinked++; + if ((pglGetLocalConstantIntegervEXT = (PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) __GLeeGetProcAddress("glGetLocalConstantIntegervEXT"))!=0) nLinked++; + if ((pglGetLocalConstantFloatvEXT = (PFNGLGETLOCALCONSTANTFLOATVEXTPROC) __GLeeGetProcAddress("glGetLocalConstantFloatvEXT"))!=0) nLinked++; +#endif + if (nLinked==42) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ATI_vertex_streams(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_vertex_streams + if ((pglVertexStream1sATI = (PFNGLVERTEXSTREAM1SATIPROC) __GLeeGetProcAddress("glVertexStream1sATI"))!=0) nLinked++; + if ((pglVertexStream1svATI = (PFNGLVERTEXSTREAM1SVATIPROC) __GLeeGetProcAddress("glVertexStream1svATI"))!=0) nLinked++; + if ((pglVertexStream1iATI = (PFNGLVERTEXSTREAM1IATIPROC) __GLeeGetProcAddress("glVertexStream1iATI"))!=0) nLinked++; + if ((pglVertexStream1ivATI = (PFNGLVERTEXSTREAM1IVATIPROC) __GLeeGetProcAddress("glVertexStream1ivATI"))!=0) nLinked++; + if ((pglVertexStream1fATI = (PFNGLVERTEXSTREAM1FATIPROC) __GLeeGetProcAddress("glVertexStream1fATI"))!=0) nLinked++; + if ((pglVertexStream1fvATI = (PFNGLVERTEXSTREAM1FVATIPROC) __GLeeGetProcAddress("glVertexStream1fvATI"))!=0) nLinked++; + if ((pglVertexStream1dATI = (PFNGLVERTEXSTREAM1DATIPROC) __GLeeGetProcAddress("glVertexStream1dATI"))!=0) nLinked++; + if ((pglVertexStream1dvATI = (PFNGLVERTEXSTREAM1DVATIPROC) __GLeeGetProcAddress("glVertexStream1dvATI"))!=0) nLinked++; + if ((pglVertexStream2sATI = (PFNGLVERTEXSTREAM2SATIPROC) __GLeeGetProcAddress("glVertexStream2sATI"))!=0) nLinked++; + if ((pglVertexStream2svATI = (PFNGLVERTEXSTREAM2SVATIPROC) __GLeeGetProcAddress("glVertexStream2svATI"))!=0) nLinked++; + if ((pglVertexStream2iATI = (PFNGLVERTEXSTREAM2IATIPROC) __GLeeGetProcAddress("glVertexStream2iATI"))!=0) nLinked++; + if ((pglVertexStream2ivATI = (PFNGLVERTEXSTREAM2IVATIPROC) __GLeeGetProcAddress("glVertexStream2ivATI"))!=0) nLinked++; + if ((pglVertexStream2fATI = (PFNGLVERTEXSTREAM2FATIPROC) __GLeeGetProcAddress("glVertexStream2fATI"))!=0) nLinked++; + if ((pglVertexStream2fvATI = (PFNGLVERTEXSTREAM2FVATIPROC) __GLeeGetProcAddress("glVertexStream2fvATI"))!=0) nLinked++; + if ((pglVertexStream2dATI = (PFNGLVERTEXSTREAM2DATIPROC) __GLeeGetProcAddress("glVertexStream2dATI"))!=0) nLinked++; + if ((pglVertexStream2dvATI = (PFNGLVERTEXSTREAM2DVATIPROC) __GLeeGetProcAddress("glVertexStream2dvATI"))!=0) nLinked++; + if ((pglVertexStream3sATI = (PFNGLVERTEXSTREAM3SATIPROC) __GLeeGetProcAddress("glVertexStream3sATI"))!=0) nLinked++; + if ((pglVertexStream3svATI = (PFNGLVERTEXSTREAM3SVATIPROC) __GLeeGetProcAddress("glVertexStream3svATI"))!=0) nLinked++; + if ((pglVertexStream3iATI = (PFNGLVERTEXSTREAM3IATIPROC) __GLeeGetProcAddress("glVertexStream3iATI"))!=0) nLinked++; + if ((pglVertexStream3ivATI = (PFNGLVERTEXSTREAM3IVATIPROC) __GLeeGetProcAddress("glVertexStream3ivATI"))!=0) nLinked++; + if ((pglVertexStream3fATI = (PFNGLVERTEXSTREAM3FATIPROC) __GLeeGetProcAddress("glVertexStream3fATI"))!=0) nLinked++; + if ((pglVertexStream3fvATI = (PFNGLVERTEXSTREAM3FVATIPROC) __GLeeGetProcAddress("glVertexStream3fvATI"))!=0) nLinked++; + if ((pglVertexStream3dATI = (PFNGLVERTEXSTREAM3DATIPROC) __GLeeGetProcAddress("glVertexStream3dATI"))!=0) nLinked++; + if ((pglVertexStream3dvATI = (PFNGLVERTEXSTREAM3DVATIPROC) __GLeeGetProcAddress("glVertexStream3dvATI"))!=0) nLinked++; + if ((pglVertexStream4sATI = (PFNGLVERTEXSTREAM4SATIPROC) __GLeeGetProcAddress("glVertexStream4sATI"))!=0) nLinked++; + if ((pglVertexStream4svATI = (PFNGLVERTEXSTREAM4SVATIPROC) __GLeeGetProcAddress("glVertexStream4svATI"))!=0) nLinked++; + if ((pglVertexStream4iATI = (PFNGLVERTEXSTREAM4IATIPROC) __GLeeGetProcAddress("glVertexStream4iATI"))!=0) nLinked++; + if ((pglVertexStream4ivATI = (PFNGLVERTEXSTREAM4IVATIPROC) __GLeeGetProcAddress("glVertexStream4ivATI"))!=0) nLinked++; + if ((pglVertexStream4fATI = (PFNGLVERTEXSTREAM4FATIPROC) __GLeeGetProcAddress("glVertexStream4fATI"))!=0) nLinked++; + if ((pglVertexStream4fvATI = (PFNGLVERTEXSTREAM4FVATIPROC) __GLeeGetProcAddress("glVertexStream4fvATI"))!=0) nLinked++; + if ((pglVertexStream4dATI = (PFNGLVERTEXSTREAM4DATIPROC) __GLeeGetProcAddress("glVertexStream4dATI"))!=0) nLinked++; + if ((pglVertexStream4dvATI = (PFNGLVERTEXSTREAM4DVATIPROC) __GLeeGetProcAddress("glVertexStream4dvATI"))!=0) nLinked++; + if ((pglNormalStream3bATI = (PFNGLNORMALSTREAM3BATIPROC) __GLeeGetProcAddress("glNormalStream3bATI"))!=0) nLinked++; + if ((pglNormalStream3bvATI = (PFNGLNORMALSTREAM3BVATIPROC) __GLeeGetProcAddress("glNormalStream3bvATI"))!=0) nLinked++; + if ((pglNormalStream3sATI = (PFNGLNORMALSTREAM3SATIPROC) __GLeeGetProcAddress("glNormalStream3sATI"))!=0) nLinked++; + if ((pglNormalStream3svATI = (PFNGLNORMALSTREAM3SVATIPROC) __GLeeGetProcAddress("glNormalStream3svATI"))!=0) nLinked++; + if ((pglNormalStream3iATI = (PFNGLNORMALSTREAM3IATIPROC) __GLeeGetProcAddress("glNormalStream3iATI"))!=0) nLinked++; + if ((pglNormalStream3ivATI = (PFNGLNORMALSTREAM3IVATIPROC) __GLeeGetProcAddress("glNormalStream3ivATI"))!=0) nLinked++; + if ((pglNormalStream3fATI = (PFNGLNORMALSTREAM3FATIPROC) __GLeeGetProcAddress("glNormalStream3fATI"))!=0) nLinked++; + if ((pglNormalStream3fvATI = (PFNGLNORMALSTREAM3FVATIPROC) __GLeeGetProcAddress("glNormalStream3fvATI"))!=0) nLinked++; + if ((pglNormalStream3dATI = (PFNGLNORMALSTREAM3DATIPROC) __GLeeGetProcAddress("glNormalStream3dATI"))!=0) nLinked++; + if ((pglNormalStream3dvATI = (PFNGLNORMALSTREAM3DVATIPROC) __GLeeGetProcAddress("glNormalStream3dvATI"))!=0) nLinked++; + if ((pglClientActiveVertexStreamATI = (PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) __GLeeGetProcAddress("glClientActiveVertexStreamATI"))!=0) nLinked++; + if ((pglVertexBlendEnviATI = (PFNGLVERTEXBLENDENVIATIPROC) __GLeeGetProcAddress("glVertexBlendEnviATI"))!=0) nLinked++; + if ((pglVertexBlendEnvfATI = (PFNGLVERTEXBLENDENVFATIPROC) __GLeeGetProcAddress("glVertexBlendEnvfATI"))!=0) nLinked++; +#endif + if (nLinked==45) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ATI_element_array(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_element_array + if ((pglElementPointerATI = (PFNGLELEMENTPOINTERATIPROC) __GLeeGetProcAddress("glElementPointerATI"))!=0) nLinked++; + if ((pglDrawElementArrayATI = (PFNGLDRAWELEMENTARRAYATIPROC) __GLeeGetProcAddress("glDrawElementArrayATI"))!=0) nLinked++; + if ((pglDrawRangeElementArrayATI = (PFNGLDRAWRANGEELEMENTARRAYATIPROC) __GLeeGetProcAddress("glDrawRangeElementArrayATI"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SUN_mesh_array(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SUN_mesh_array + if ((pglDrawMeshArraysSUN = (PFNGLDRAWMESHARRAYSSUNPROC) __GLeeGetProcAddress("glDrawMeshArraysSUN"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SUN_slice_accum(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_multisample_filter_hint(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_depth_clamp(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_occlusion_query(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_occlusion_query + if ((pglGenOcclusionQueriesNV = (PFNGLGENOCCLUSIONQUERIESNVPROC) __GLeeGetProcAddress("glGenOcclusionQueriesNV"))!=0) nLinked++; + if ((pglDeleteOcclusionQueriesNV = (PFNGLDELETEOCCLUSIONQUERIESNVPROC) __GLeeGetProcAddress("glDeleteOcclusionQueriesNV"))!=0) nLinked++; + if ((pglIsOcclusionQueryNV = (PFNGLISOCCLUSIONQUERYNVPROC) __GLeeGetProcAddress("glIsOcclusionQueryNV"))!=0) nLinked++; + if ((pglBeginOcclusionQueryNV = (PFNGLBEGINOCCLUSIONQUERYNVPROC) __GLeeGetProcAddress("glBeginOcclusionQueryNV"))!=0) nLinked++; + if ((pglEndOcclusionQueryNV = (PFNGLENDOCCLUSIONQUERYNVPROC) __GLeeGetProcAddress("glEndOcclusionQueryNV"))!=0) nLinked++; + if ((pglGetOcclusionQueryivNV = (PFNGLGETOCCLUSIONQUERYIVNVPROC) __GLeeGetProcAddress("glGetOcclusionQueryivNV"))!=0) nLinked++; + if ((pglGetOcclusionQueryuivNV = (PFNGLGETOCCLUSIONQUERYUIVNVPROC) __GLeeGetProcAddress("glGetOcclusionQueryuivNV"))!=0) nLinked++; +#endif + if (nLinked==7) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_point_sprite(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_point_sprite + if ((pglPointParameteriNV = (PFNGLPOINTPARAMETERINVPROC) __GLeeGetProcAddress("glPointParameteriNV"))!=0) nLinked++; + if ((pglPointParameterivNV = (PFNGLPOINTPARAMETERIVNVPROC) __GLeeGetProcAddress("glPointParameterivNV"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_texture_shader3(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_vertex_program1_1(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_shadow_funcs(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_stencil_two_side(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_stencil_two_side + if ((pglActiveStencilFaceEXT = (PFNGLACTIVESTENCILFACEEXTPROC) __GLeeGetProcAddress("glActiveStencilFaceEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ATI_text_fragment_shader(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_APPLE_client_storage(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_APPLE_element_array(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_APPLE_element_array + if ((pglElementPointerAPPLE = (PFNGLELEMENTPOINTERAPPLEPROC) __GLeeGetProcAddress("glElementPointerAPPLE"))!=0) nLinked++; + if ((pglDrawElementArrayAPPLE = (PFNGLDRAWELEMENTARRAYAPPLEPROC) __GLeeGetProcAddress("glDrawElementArrayAPPLE"))!=0) nLinked++; + if ((pglDrawRangeElementArrayAPPLE = (PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) __GLeeGetProcAddress("glDrawRangeElementArrayAPPLE"))!=0) nLinked++; + if ((pglMultiDrawElementArrayAPPLE = (PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) __GLeeGetProcAddress("glMultiDrawElementArrayAPPLE"))!=0) nLinked++; + if ((pglMultiDrawRangeElementArrayAPPLE = (PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) __GLeeGetProcAddress("glMultiDrawRangeElementArrayAPPLE"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_APPLE_fence(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_APPLE_fence + if ((pglGenFencesAPPLE = (PFNGLGENFENCESAPPLEPROC) __GLeeGetProcAddress("glGenFencesAPPLE"))!=0) nLinked++; + if ((pglDeleteFencesAPPLE = (PFNGLDELETEFENCESAPPLEPROC) __GLeeGetProcAddress("glDeleteFencesAPPLE"))!=0) nLinked++; + if ((pglSetFenceAPPLE = (PFNGLSETFENCEAPPLEPROC) __GLeeGetProcAddress("glSetFenceAPPLE"))!=0) nLinked++; + if ((pglIsFenceAPPLE = (PFNGLISFENCEAPPLEPROC) __GLeeGetProcAddress("glIsFenceAPPLE"))!=0) nLinked++; + if ((pglTestFenceAPPLE = (PFNGLTESTFENCEAPPLEPROC) __GLeeGetProcAddress("glTestFenceAPPLE"))!=0) nLinked++; + if ((pglFinishFenceAPPLE = (PFNGLFINISHFENCEAPPLEPROC) __GLeeGetProcAddress("glFinishFenceAPPLE"))!=0) nLinked++; + if ((pglTestObjectAPPLE = (PFNGLTESTOBJECTAPPLEPROC) __GLeeGetProcAddress("glTestObjectAPPLE"))!=0) nLinked++; + if ((pglFinishObjectAPPLE = (PFNGLFINISHOBJECTAPPLEPROC) __GLeeGetProcAddress("glFinishObjectAPPLE"))!=0) nLinked++; +#endif + if (nLinked==8) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_APPLE_vertex_array_object(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_APPLE_vertex_array_object + if ((pglBindVertexArrayAPPLE = (PFNGLBINDVERTEXARRAYAPPLEPROC) __GLeeGetProcAddress("glBindVertexArrayAPPLE"))!=0) nLinked++; + if ((pglDeleteVertexArraysAPPLE = (PFNGLDELETEVERTEXARRAYSAPPLEPROC) __GLeeGetProcAddress("glDeleteVertexArraysAPPLE"))!=0) nLinked++; + if ((pglGenVertexArraysAPPLE = (PFNGLGENVERTEXARRAYSAPPLEPROC) __GLeeGetProcAddress("glGenVertexArraysAPPLE"))!=0) nLinked++; + if ((pglIsVertexArrayAPPLE = (PFNGLISVERTEXARRAYAPPLEPROC) __GLeeGetProcAddress("glIsVertexArrayAPPLE"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_APPLE_vertex_array_range(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_APPLE_vertex_array_range + if ((pglVertexArrayRangeAPPLE = (PFNGLVERTEXARRAYRANGEAPPLEPROC) __GLeeGetProcAddress("glVertexArrayRangeAPPLE"))!=0) nLinked++; + if ((pglFlushVertexArrayRangeAPPLE = (PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) __GLeeGetProcAddress("glFlushVertexArrayRangeAPPLE"))!=0) nLinked++; + if ((pglVertexArrayParameteriAPPLE = (PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) __GLeeGetProcAddress("glVertexArrayParameteriAPPLE"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_APPLE_ycbcr_422(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_S3_s3tc(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ATI_draw_buffers(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_draw_buffers + if ((pglDrawBuffersATI = (PFNGLDRAWBUFFERSATIPROC) __GLeeGetProcAddress("glDrawBuffersATI"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ATI_pixel_format_float(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ATI_texture_env_combine3(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ATI_texture_float(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_float_buffer(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_fragment_program(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_fragment_program + if ((pglProgramNamedParameter4fNV = (PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) __GLeeGetProcAddress("glProgramNamedParameter4fNV"))!=0) nLinked++; + if ((pglProgramNamedParameter4dNV = (PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) __GLeeGetProcAddress("glProgramNamedParameter4dNV"))!=0) nLinked++; + if ((pglProgramNamedParameter4fvNV = (PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) __GLeeGetProcAddress("glProgramNamedParameter4fvNV"))!=0) nLinked++; + if ((pglProgramNamedParameter4dvNV = (PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) __GLeeGetProcAddress("glProgramNamedParameter4dvNV"))!=0) nLinked++; + if ((pglGetProgramNamedParameterfvNV = (PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) __GLeeGetProcAddress("glGetProgramNamedParameterfvNV"))!=0) nLinked++; + if ((pglGetProgramNamedParameterdvNV = (PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) __GLeeGetProcAddress("glGetProgramNamedParameterdvNV"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_half_float(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_half_float + if ((pglVertex2hNV = (PFNGLVERTEX2HNVPROC) __GLeeGetProcAddress("glVertex2hNV"))!=0) nLinked++; + if ((pglVertex2hvNV = (PFNGLVERTEX2HVNVPROC) __GLeeGetProcAddress("glVertex2hvNV"))!=0) nLinked++; + if ((pglVertex3hNV = (PFNGLVERTEX3HNVPROC) __GLeeGetProcAddress("glVertex3hNV"))!=0) nLinked++; + if ((pglVertex3hvNV = (PFNGLVERTEX3HVNVPROC) __GLeeGetProcAddress("glVertex3hvNV"))!=0) nLinked++; + if ((pglVertex4hNV = (PFNGLVERTEX4HNVPROC) __GLeeGetProcAddress("glVertex4hNV"))!=0) nLinked++; + if ((pglVertex4hvNV = (PFNGLVERTEX4HVNVPROC) __GLeeGetProcAddress("glVertex4hvNV"))!=0) nLinked++; + if ((pglNormal3hNV = (PFNGLNORMAL3HNVPROC) __GLeeGetProcAddress("glNormal3hNV"))!=0) nLinked++; + if ((pglNormal3hvNV = (PFNGLNORMAL3HVNVPROC) __GLeeGetProcAddress("glNormal3hvNV"))!=0) nLinked++; + if ((pglColor3hNV = (PFNGLCOLOR3HNVPROC) __GLeeGetProcAddress("glColor3hNV"))!=0) nLinked++; + if ((pglColor3hvNV = (PFNGLCOLOR3HVNVPROC) __GLeeGetProcAddress("glColor3hvNV"))!=0) nLinked++; + if ((pglColor4hNV = (PFNGLCOLOR4HNVPROC) __GLeeGetProcAddress("glColor4hNV"))!=0) nLinked++; + if ((pglColor4hvNV = (PFNGLCOLOR4HVNVPROC) __GLeeGetProcAddress("glColor4hvNV"))!=0) nLinked++; + if ((pglTexCoord1hNV = (PFNGLTEXCOORD1HNVPROC) __GLeeGetProcAddress("glTexCoord1hNV"))!=0) nLinked++; + if ((pglTexCoord1hvNV = (PFNGLTEXCOORD1HVNVPROC) __GLeeGetProcAddress("glTexCoord1hvNV"))!=0) nLinked++; + if ((pglTexCoord2hNV = (PFNGLTEXCOORD2HNVPROC) __GLeeGetProcAddress("glTexCoord2hNV"))!=0) nLinked++; + if ((pglTexCoord2hvNV = (PFNGLTEXCOORD2HVNVPROC) __GLeeGetProcAddress("glTexCoord2hvNV"))!=0) nLinked++; + if ((pglTexCoord3hNV = (PFNGLTEXCOORD3HNVPROC) __GLeeGetProcAddress("glTexCoord3hNV"))!=0) nLinked++; + if ((pglTexCoord3hvNV = (PFNGLTEXCOORD3HVNVPROC) __GLeeGetProcAddress("glTexCoord3hvNV"))!=0) nLinked++; + if ((pglTexCoord4hNV = (PFNGLTEXCOORD4HNVPROC) __GLeeGetProcAddress("glTexCoord4hNV"))!=0) nLinked++; + if ((pglTexCoord4hvNV = (PFNGLTEXCOORD4HVNVPROC) __GLeeGetProcAddress("glTexCoord4hvNV"))!=0) nLinked++; + if ((pglMultiTexCoord1hNV = (PFNGLMULTITEXCOORD1HNVPROC) __GLeeGetProcAddress("glMultiTexCoord1hNV"))!=0) nLinked++; + if ((pglMultiTexCoord1hvNV = (PFNGLMULTITEXCOORD1HVNVPROC) __GLeeGetProcAddress("glMultiTexCoord1hvNV"))!=0) nLinked++; + if ((pglMultiTexCoord2hNV = (PFNGLMULTITEXCOORD2HNVPROC) __GLeeGetProcAddress("glMultiTexCoord2hNV"))!=0) nLinked++; + if ((pglMultiTexCoord2hvNV = (PFNGLMULTITEXCOORD2HVNVPROC) __GLeeGetProcAddress("glMultiTexCoord2hvNV"))!=0) nLinked++; + if ((pglMultiTexCoord3hNV = (PFNGLMULTITEXCOORD3HNVPROC) __GLeeGetProcAddress("glMultiTexCoord3hNV"))!=0) nLinked++; + if ((pglMultiTexCoord3hvNV = (PFNGLMULTITEXCOORD3HVNVPROC) __GLeeGetProcAddress("glMultiTexCoord3hvNV"))!=0) nLinked++; + if ((pglMultiTexCoord4hNV = (PFNGLMULTITEXCOORD4HNVPROC) __GLeeGetProcAddress("glMultiTexCoord4hNV"))!=0) nLinked++; + if ((pglMultiTexCoord4hvNV = (PFNGLMULTITEXCOORD4HVNVPROC) __GLeeGetProcAddress("glMultiTexCoord4hvNV"))!=0) nLinked++; + if ((pglFogCoordhNV = (PFNGLFOGCOORDHNVPROC) __GLeeGetProcAddress("glFogCoordhNV"))!=0) nLinked++; + if ((pglFogCoordhvNV = (PFNGLFOGCOORDHVNVPROC) __GLeeGetProcAddress("glFogCoordhvNV"))!=0) nLinked++; + if ((pglSecondaryColor3hNV = (PFNGLSECONDARYCOLOR3HNVPROC) __GLeeGetProcAddress("glSecondaryColor3hNV"))!=0) nLinked++; + if ((pglSecondaryColor3hvNV = (PFNGLSECONDARYCOLOR3HVNVPROC) __GLeeGetProcAddress("glSecondaryColor3hvNV"))!=0) nLinked++; + if ((pglVertexWeighthNV = (PFNGLVERTEXWEIGHTHNVPROC) __GLeeGetProcAddress("glVertexWeighthNV"))!=0) nLinked++; + if ((pglVertexWeighthvNV = (PFNGLVERTEXWEIGHTHVNVPROC) __GLeeGetProcAddress("glVertexWeighthvNV"))!=0) nLinked++; + if ((pglVertexAttrib1hNV = (PFNGLVERTEXATTRIB1HNVPROC) __GLeeGetProcAddress("glVertexAttrib1hNV"))!=0) nLinked++; + if ((pglVertexAttrib1hvNV = (PFNGLVERTEXATTRIB1HVNVPROC) __GLeeGetProcAddress("glVertexAttrib1hvNV"))!=0) nLinked++; + if ((pglVertexAttrib2hNV = (PFNGLVERTEXATTRIB2HNVPROC) __GLeeGetProcAddress("glVertexAttrib2hNV"))!=0) nLinked++; + if ((pglVertexAttrib2hvNV = (PFNGLVERTEXATTRIB2HVNVPROC) __GLeeGetProcAddress("glVertexAttrib2hvNV"))!=0) nLinked++; + if ((pglVertexAttrib3hNV = (PFNGLVERTEXATTRIB3HNVPROC) __GLeeGetProcAddress("glVertexAttrib3hNV"))!=0) nLinked++; + if ((pglVertexAttrib3hvNV = (PFNGLVERTEXATTRIB3HVNVPROC) __GLeeGetProcAddress("glVertexAttrib3hvNV"))!=0) nLinked++; + if ((pglVertexAttrib4hNV = (PFNGLVERTEXATTRIB4HNVPROC) __GLeeGetProcAddress("glVertexAttrib4hNV"))!=0) nLinked++; + if ((pglVertexAttrib4hvNV = (PFNGLVERTEXATTRIB4HVNVPROC) __GLeeGetProcAddress("glVertexAttrib4hvNV"))!=0) nLinked++; + if ((pglVertexAttribs1hvNV = (PFNGLVERTEXATTRIBS1HVNVPROC) __GLeeGetProcAddress("glVertexAttribs1hvNV"))!=0) nLinked++; + if ((pglVertexAttribs2hvNV = (PFNGLVERTEXATTRIBS2HVNVPROC) __GLeeGetProcAddress("glVertexAttribs2hvNV"))!=0) nLinked++; + if ((pglVertexAttribs3hvNV = (PFNGLVERTEXATTRIBS3HVNVPROC) __GLeeGetProcAddress("glVertexAttribs3hvNV"))!=0) nLinked++; + if ((pglVertexAttribs4hvNV = (PFNGLVERTEXATTRIBS4HVNVPROC) __GLeeGetProcAddress("glVertexAttribs4hvNV"))!=0) nLinked++; +#endif + if (nLinked==46) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_pixel_data_range(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_pixel_data_range + if ((pglPixelDataRangeNV = (PFNGLPIXELDATARANGENVPROC) __GLeeGetProcAddress("glPixelDataRangeNV"))!=0) nLinked++; + if ((pglFlushPixelDataRangeNV = (PFNGLFLUSHPIXELDATARANGENVPROC) __GLeeGetProcAddress("glFlushPixelDataRangeNV"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_primitive_restart(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_primitive_restart + if ((pglPrimitiveRestartNV = (PFNGLPRIMITIVERESTARTNVPROC) __GLeeGetProcAddress("glPrimitiveRestartNV"))!=0) nLinked++; + if ((pglPrimitiveRestartIndexNV = (PFNGLPRIMITIVERESTARTINDEXNVPROC) __GLeeGetProcAddress("glPrimitiveRestartIndexNV"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_texture_expand_normal(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_vertex_program2(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_ATI_map_object_buffer(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_map_object_buffer + if ((pglMapObjectBufferATI = (PFNGLMAPOBJECTBUFFERATIPROC) __GLeeGetProcAddress("glMapObjectBufferATI"))!=0) nLinked++; + if ((pglUnmapObjectBufferATI = (PFNGLUNMAPOBJECTBUFFERATIPROC) __GLeeGetProcAddress("glUnmapObjectBufferATI"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ATI_separate_stencil(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_separate_stencil + if ((pglStencilOpSeparateATI = (PFNGLSTENCILOPSEPARATEATIPROC) __GLeeGetProcAddress("glStencilOpSeparateATI"))!=0) nLinked++; + if ((pglStencilFuncSeparateATI = (PFNGLSTENCILFUNCSEPARATEATIPROC) __GLeeGetProcAddress("glStencilFuncSeparateATI"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_ATI_vertex_attrib_array_object(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_ATI_vertex_attrib_array_object + if ((pglVertexAttribArrayObjectATI = (PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) __GLeeGetProcAddress("glVertexAttribArrayObjectATI"))!=0) nLinked++; + if ((pglGetVertexAttribArrayObjectfvATI = (PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) __GLeeGetProcAddress("glGetVertexAttribArrayObjectfvATI"))!=0) nLinked++; + if ((pglGetVertexAttribArrayObjectivATI = (PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) __GLeeGetProcAddress("glGetVertexAttribArrayObjectivATI"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_OES_read_format(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_depth_bounds_test(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_depth_bounds_test + if ((pglDepthBoundsEXT = (PFNGLDEPTHBOUNDSEXTPROC) __GLeeGetProcAddress("glDepthBoundsEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_texture_mirror_clamp(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_blend_equation_separate(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_blend_equation_separate + if ((pglBlendEquationSeparateEXT = (PFNGLBLENDEQUATIONSEPARATEEXTPROC) __GLeeGetProcAddress("glBlendEquationSeparateEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_MESA_pack_invert(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_MESA_ycbcr_texture(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_pixel_buffer_object(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_fragment_program_option(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_fragment_program2(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_vertex_program2_option(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_vertex_program3(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_framebuffer_object(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_framebuffer_object + if ((pglIsRenderbufferEXT = (PFNGLISRENDERBUFFEREXTPROC) __GLeeGetProcAddress("glIsRenderbufferEXT"))!=0) nLinked++; + if ((pglBindRenderbufferEXT = (PFNGLBINDRENDERBUFFEREXTPROC) __GLeeGetProcAddress("glBindRenderbufferEXT"))!=0) nLinked++; + if ((pglDeleteRenderbuffersEXT = (PFNGLDELETERENDERBUFFERSEXTPROC) __GLeeGetProcAddress("glDeleteRenderbuffersEXT"))!=0) nLinked++; + if ((pglGenRenderbuffersEXT = (PFNGLGENRENDERBUFFERSEXTPROC) __GLeeGetProcAddress("glGenRenderbuffersEXT"))!=0) nLinked++; + if ((pglRenderbufferStorageEXT = (PFNGLRENDERBUFFERSTORAGEEXTPROC) __GLeeGetProcAddress("glRenderbufferStorageEXT"))!=0) nLinked++; + if ((pglGetRenderbufferParameterivEXT = (PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) __GLeeGetProcAddress("glGetRenderbufferParameterivEXT"))!=0) nLinked++; + if ((pglIsFramebufferEXT = (PFNGLISFRAMEBUFFEREXTPROC) __GLeeGetProcAddress("glIsFramebufferEXT"))!=0) nLinked++; + if ((pglBindFramebufferEXT = (PFNGLBINDFRAMEBUFFEREXTPROC) __GLeeGetProcAddress("glBindFramebufferEXT"))!=0) nLinked++; + if ((pglDeleteFramebuffersEXT = (PFNGLDELETEFRAMEBUFFERSEXTPROC) __GLeeGetProcAddress("glDeleteFramebuffersEXT"))!=0) nLinked++; + if ((pglGenFramebuffersEXT = (PFNGLGENFRAMEBUFFERSEXTPROC) __GLeeGetProcAddress("glGenFramebuffersEXT"))!=0) nLinked++; + if ((pglCheckFramebufferStatusEXT = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) __GLeeGetProcAddress("glCheckFramebufferStatusEXT"))!=0) nLinked++; + if ((pglFramebufferTexture1DEXT = (PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) __GLeeGetProcAddress("glFramebufferTexture1DEXT"))!=0) nLinked++; + if ((pglFramebufferTexture2DEXT = (PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) __GLeeGetProcAddress("glFramebufferTexture2DEXT"))!=0) nLinked++; + if ((pglFramebufferTexture3DEXT = (PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) __GLeeGetProcAddress("glFramebufferTexture3DEXT"))!=0) nLinked++; + if ((pglFramebufferRenderbufferEXT = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) __GLeeGetProcAddress("glFramebufferRenderbufferEXT"))!=0) nLinked++; + if ((pglGetFramebufferAttachmentParameterivEXT = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) __GLeeGetProcAddress("glGetFramebufferAttachmentParameterivEXT"))!=0) nLinked++; + if ((pglGenerateMipmapEXT = (PFNGLGENERATEMIPMAPEXTPROC) __GLeeGetProcAddress("glGenerateMipmapEXT"))!=0) nLinked++; +#endif + if (nLinked==17) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_GREMEDY_string_marker(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_GREMEDY_string_marker + if ((pglStringMarkerGREMEDY = (PFNGLSTRINGMARKERGREMEDYPROC) __GLeeGetProcAddress("glStringMarkerGREMEDY"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_Cg_shader(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_timer_query(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_timer_query + if ((pglGetQueryObjecti64vEXT = (PFNGLGETQUERYOBJECTI64VEXTPROC) __GLeeGetProcAddress("glGetQueryObjecti64vEXT"))!=0) nLinked++; + if ((pglGetQueryObjectui64vEXT = (PFNGLGETQUERYOBJECTUI64VEXTPROC) __GLeeGetProcAddress("glGetQueryObjectui64vEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_texture_buffer_object(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_texture_buffer_object + if ((pglTexBufferEXT = (PFNGLTEXBUFFEREXTPROC) __GLeeGetProcAddress("glTexBufferEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_gpu_shader4(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_gpu_shader4 + if ((pglGetUniformuivEXT = (PFNGLGETUNIFORMUIVEXTPROC) __GLeeGetProcAddress("glGetUniformuivEXT"))!=0) nLinked++; + if ((pglBindFragDataLocationEXT = (PFNGLBINDFRAGDATALOCATIONEXTPROC) __GLeeGetProcAddress("glBindFragDataLocationEXT"))!=0) nLinked++; + if ((pglGetFragDataLocationEXT = (PFNGLGETFRAGDATALOCATIONEXTPROC) __GLeeGetProcAddress("glGetFragDataLocationEXT"))!=0) nLinked++; + if ((pglUniform1uiEXT = (PFNGLUNIFORM1UIEXTPROC) __GLeeGetProcAddress("glUniform1uiEXT"))!=0) nLinked++; + if ((pglUniform2uiEXT = (PFNGLUNIFORM2UIEXTPROC) __GLeeGetProcAddress("glUniform2uiEXT"))!=0) nLinked++; + if ((pglUniform3uiEXT = (PFNGLUNIFORM3UIEXTPROC) __GLeeGetProcAddress("glUniform3uiEXT"))!=0) nLinked++; + if ((pglUniform4uiEXT = (PFNGLUNIFORM4UIEXTPROC) __GLeeGetProcAddress("glUniform4uiEXT"))!=0) nLinked++; + if ((pglUniform1uivEXT = (PFNGLUNIFORM1UIVEXTPROC) __GLeeGetProcAddress("glUniform1uivEXT"))!=0) nLinked++; + if ((pglUniform2uivEXT = (PFNGLUNIFORM2UIVEXTPROC) __GLeeGetProcAddress("glUniform2uivEXT"))!=0) nLinked++; + if ((pglUniform3uivEXT = (PFNGLUNIFORM3UIVEXTPROC) __GLeeGetProcAddress("glUniform3uivEXT"))!=0) nLinked++; + if ((pglUniform4uivEXT = (PFNGLUNIFORM4UIVEXTPROC) __GLeeGetProcAddress("glUniform4uivEXT"))!=0) nLinked++; + if ((pglVertexAttribI1iEXT = (PFNGLVERTEXATTRIBI1IEXTPROC) __GLeeGetProcAddress("glVertexAttribI1iEXT"))!=0) nLinked++; + if ((pglVertexAttribI2iEXT = (PFNGLVERTEXATTRIBI2IEXTPROC) __GLeeGetProcAddress("glVertexAttribI2iEXT"))!=0) nLinked++; + if ((pglVertexAttribI3iEXT = (PFNGLVERTEXATTRIBI3IEXTPROC) __GLeeGetProcAddress("glVertexAttribI3iEXT"))!=0) nLinked++; + if ((pglVertexAttribI4iEXT = (PFNGLVERTEXATTRIBI4IEXTPROC) __GLeeGetProcAddress("glVertexAttribI4iEXT"))!=0) nLinked++; + if ((pglVertexAttribI1uiEXT = (PFNGLVERTEXATTRIBI1UIEXTPROC) __GLeeGetProcAddress("glVertexAttribI1uiEXT"))!=0) nLinked++; + if ((pglVertexAttribI2uiEXT = (PFNGLVERTEXATTRIBI2UIEXTPROC) __GLeeGetProcAddress("glVertexAttribI2uiEXT"))!=0) nLinked++; + if ((pglVertexAttribI3uiEXT = (PFNGLVERTEXATTRIBI3UIEXTPROC) __GLeeGetProcAddress("glVertexAttribI3uiEXT"))!=0) nLinked++; + if ((pglVertexAttribI4uiEXT = (PFNGLVERTEXATTRIBI4UIEXTPROC) __GLeeGetProcAddress("glVertexAttribI4uiEXT"))!=0) nLinked++; + if ((pglVertexAttribI1ivEXT = (PFNGLVERTEXATTRIBI1IVEXTPROC) __GLeeGetProcAddress("glVertexAttribI1ivEXT"))!=0) nLinked++; + if ((pglVertexAttribI2ivEXT = (PFNGLVERTEXATTRIBI2IVEXTPROC) __GLeeGetProcAddress("glVertexAttribI2ivEXT"))!=0) nLinked++; + if ((pglVertexAttribI3ivEXT = (PFNGLVERTEXATTRIBI3IVEXTPROC) __GLeeGetProcAddress("glVertexAttribI3ivEXT"))!=0) nLinked++; + if ((pglVertexAttribI4ivEXT = (PFNGLVERTEXATTRIBI4IVEXTPROC) __GLeeGetProcAddress("glVertexAttribI4ivEXT"))!=0) nLinked++; + if ((pglVertexAttribI1uivEXT = (PFNGLVERTEXATTRIBI1UIVEXTPROC) __GLeeGetProcAddress("glVertexAttribI1uivEXT"))!=0) nLinked++; + if ((pglVertexAttribI2uivEXT = (PFNGLVERTEXATTRIBI2UIVEXTPROC) __GLeeGetProcAddress("glVertexAttribI2uivEXT"))!=0) nLinked++; + if ((pglVertexAttribI3uivEXT = (PFNGLVERTEXATTRIBI3UIVEXTPROC) __GLeeGetProcAddress("glVertexAttribI3uivEXT"))!=0) nLinked++; + if ((pglVertexAttribI4uivEXT = (PFNGLVERTEXATTRIBI4UIVEXTPROC) __GLeeGetProcAddress("glVertexAttribI4uivEXT"))!=0) nLinked++; + if ((pglVertexAttribI4bvEXT = (PFNGLVERTEXATTRIBI4BVEXTPROC) __GLeeGetProcAddress("glVertexAttribI4bvEXT"))!=0) nLinked++; + if ((pglVertexAttribI4svEXT = (PFNGLVERTEXATTRIBI4SVEXTPROC) __GLeeGetProcAddress("glVertexAttribI4svEXT"))!=0) nLinked++; + if ((pglVertexAttribI4ubvEXT = (PFNGLVERTEXATTRIBI4UBVEXTPROC) __GLeeGetProcAddress("glVertexAttribI4ubvEXT"))!=0) nLinked++; + if ((pglVertexAttribI4usvEXT = (PFNGLVERTEXATTRIBI4USVEXTPROC) __GLeeGetProcAddress("glVertexAttribI4usvEXT"))!=0) nLinked++; + if ((pglVertexAttribIPointerEXT = (PFNGLVERTEXATTRIBIPOINTEREXTPROC) __GLeeGetProcAddress("glVertexAttribIPointerEXT"))!=0) nLinked++; + if ((pglGetVertexAttribIivEXT = (PFNGLGETVERTEXATTRIBIIVEXTPROC) __GLeeGetProcAddress("glGetVertexAttribIivEXT"))!=0) nLinked++; + if ((pglGetVertexAttribIuivEXT = (PFNGLGETVERTEXATTRIBIUIVEXTPROC) __GLeeGetProcAddress("glGetVertexAttribIuivEXT"))!=0) nLinked++; +#endif + if (nLinked==34) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_geometry_shader4(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_geometry_shader4 + if ((pglProgramParameteriEXT = (PFNGLPROGRAMPARAMETERIEXTPROC) __GLeeGetProcAddress("glProgramParameteriEXT"))!=0) nLinked++; + if ((pglFramebufferTextureEXT = (PFNGLFRAMEBUFFERTEXTUREEXTPROC) __GLeeGetProcAddress("glFramebufferTextureEXT"))!=0) nLinked++; + if ((pglFramebufferTextureLayerEXT = (PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) __GLeeGetProcAddress("glFramebufferTextureLayerEXT"))!=0) nLinked++; + if ((pglFramebufferTextureFaceEXT = (PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) __GLeeGetProcAddress("glFramebufferTextureFaceEXT"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_bindable_uniform(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_bindable_uniform + if ((pglUniformBufferEXT = (PFNGLUNIFORMBUFFEREXTPROC) __GLeeGetProcAddress("glUniformBufferEXT"))!=0) nLinked++; + if ((pglGetUniformBufferSizeEXT = (PFNGLGETUNIFORMBUFFERSIZEEXTPROC) __GLeeGetProcAddress("glGetUniformBufferSizeEXT"))!=0) nLinked++; + if ((pglGetUniformOffsetEXT = (PFNGLGETUNIFORMOFFSETEXTPROC) __GLeeGetProcAddress("glGetUniformOffsetEXT"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_framebuffer_sRGB(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_shared_exponent(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_packed_float(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_array(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_integer(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_texture_integer + if ((pglTexParameterIivEXT = (PFNGLTEXPARAMETERIIVEXTPROC) __GLeeGetProcAddress("glTexParameterIivEXT"))!=0) nLinked++; + if ((pglTexParameterIuivEXT = (PFNGLTEXPARAMETERIUIVEXTPROC) __GLeeGetProcAddress("glTexParameterIuivEXT"))!=0) nLinked++; + if ((pglGetTexParameterIivEXT = (PFNGLGETTEXPARAMETERIIVEXTPROC) __GLeeGetProcAddress("glGetTexParameterIivEXT"))!=0) nLinked++; + if ((pglGetTexParameterIuivEXT = (PFNGLGETTEXPARAMETERIUIVEXTPROC) __GLeeGetProcAddress("glGetTexParameterIuivEXT"))!=0) nLinked++; + if ((pglClearColorIiEXT = (PFNGLCLEARCOLORIIEXTPROC) __GLeeGetProcAddress("glClearColorIiEXT"))!=0) nLinked++; + if ((pglClearColorIuiEXT = (PFNGLCLEARCOLORIUIEXTPROC) __GLeeGetProcAddress("glClearColorIuiEXT"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_depth_buffer_float(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_depth_buffer_float + if ((pglDepthRangedNV = (PFNGLDEPTHRANGEDNVPROC) __GLeeGetProcAddress("glDepthRangedNV"))!=0) nLinked++; + if ((pglClearDepthdNV = (PFNGLCLEARDEPTHDNVPROC) __GLeeGetProcAddress("glClearDepthdNV"))!=0) nLinked++; + if ((pglDepthBoundsdNV = (PFNGLDEPTHBOUNDSDNVPROC) __GLeeGetProcAddress("glDepthBoundsdNV"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_texture_compression_latc(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_NV_transform_feedback(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_transform_feedback + if ((pglBeginTransformFeedbackNV = (PFNGLBEGINTRANSFORMFEEDBACKNVPROC) __GLeeGetProcAddress("glBeginTransformFeedbackNV"))!=0) nLinked++; + if ((pglEndTransformFeedbackNV = (PFNGLENDTRANSFORMFEEDBACKNVPROC) __GLeeGetProcAddress("glEndTransformFeedbackNV"))!=0) nLinked++; + if ((pglTransformFeedbackAttribsNV = (PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) __GLeeGetProcAddress("glTransformFeedbackAttribsNV"))!=0) nLinked++; + if ((pglBindBufferRangeNV = (PFNGLBINDBUFFERRANGENVPROC) __GLeeGetProcAddress("glBindBufferRangeNV"))!=0) nLinked++; + if ((pglBindBufferOffsetNV = (PFNGLBINDBUFFEROFFSETNVPROC) __GLeeGetProcAddress("glBindBufferOffsetNV"))!=0) nLinked++; + if ((pglBindBufferBaseNV = (PFNGLBINDBUFFERBASENVPROC) __GLeeGetProcAddress("glBindBufferBaseNV"))!=0) nLinked++; + if ((pglTransformFeedbackVaryingsNV = (PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) __GLeeGetProcAddress("glTransformFeedbackVaryingsNV"))!=0) nLinked++; + if ((pglActiveVaryingNV = (PFNGLACTIVEVARYINGNVPROC) __GLeeGetProcAddress("glActiveVaryingNV"))!=0) nLinked++; + if ((pglGetVaryingLocationNV = (PFNGLGETVARYINGLOCATIONNVPROC) __GLeeGetProcAddress("glGetVaryingLocationNV"))!=0) nLinked++; + if ((pglGetActiveVaryingNV = (PFNGLGETACTIVEVARYINGNVPROC) __GLeeGetProcAddress("glGetActiveVaryingNV"))!=0) nLinked++; + if ((pglGetTransformFeedbackVaryingNV = (PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) __GLeeGetProcAddress("glGetTransformFeedbackVaryingNV"))!=0) nLinked++; +#endif + if (nLinked==11) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_geometry_program4(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_geometry_program4 + if ((pglProgramVertexLimitNV = (PFNGLPROGRAMVERTEXLIMITNVPROC) __GLeeGetProcAddress("glProgramVertexLimitNV"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_gpu_program4(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_gpu_program4 + if ((pglProgramLocalParameterI4iNV = (PFNGLPROGRAMLOCALPARAMETERI4INVPROC) __GLeeGetProcAddress("glProgramLocalParameterI4iNV"))!=0) nLinked++; + if ((pglProgramLocalParameterI4ivNV = (PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) __GLeeGetProcAddress("glProgramLocalParameterI4ivNV"))!=0) nLinked++; + if ((pglProgramLocalParametersI4ivNV = (PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) __GLeeGetProcAddress("glProgramLocalParametersI4ivNV"))!=0) nLinked++; + if ((pglProgramLocalParameterI4uiNV = (PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) __GLeeGetProcAddress("glProgramLocalParameterI4uiNV"))!=0) nLinked++; + if ((pglProgramLocalParameterI4uivNV = (PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) __GLeeGetProcAddress("glProgramLocalParameterI4uivNV"))!=0) nLinked++; + if ((pglProgramLocalParametersI4uivNV = (PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) __GLeeGetProcAddress("glProgramLocalParametersI4uivNV"))!=0) nLinked++; + if ((pglProgramEnvParameterI4iNV = (PFNGLPROGRAMENVPARAMETERI4INVPROC) __GLeeGetProcAddress("glProgramEnvParameterI4iNV"))!=0) nLinked++; + if ((pglProgramEnvParameterI4ivNV = (PFNGLPROGRAMENVPARAMETERI4IVNVPROC) __GLeeGetProcAddress("glProgramEnvParameterI4ivNV"))!=0) nLinked++; + if ((pglProgramEnvParametersI4ivNV = (PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) __GLeeGetProcAddress("glProgramEnvParametersI4ivNV"))!=0) nLinked++; + if ((pglProgramEnvParameterI4uiNV = (PFNGLPROGRAMENVPARAMETERI4UINVPROC) __GLeeGetProcAddress("glProgramEnvParameterI4uiNV"))!=0) nLinked++; + if ((pglProgramEnvParameterI4uivNV = (PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) __GLeeGetProcAddress("glProgramEnvParameterI4uivNV"))!=0) nLinked++; + if ((pglProgramEnvParametersI4uivNV = (PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) __GLeeGetProcAddress("glProgramEnvParametersI4uivNV"))!=0) nLinked++; + if ((pglGetProgramLocalParameterIivNV = (PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) __GLeeGetProcAddress("glGetProgramLocalParameterIivNV"))!=0) nLinked++; + if ((pglGetProgramLocalParameterIuivNV = (PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) __GLeeGetProcAddress("glGetProgramLocalParameterIuivNV"))!=0) nLinked++; + if ((pglGetProgramEnvParameterIivNV = (PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) __GLeeGetProcAddress("glGetProgramEnvParameterIivNV"))!=0) nLinked++; + if ((pglGetProgramEnvParameterIuivNV = (PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) __GLeeGetProcAddress("glGetProgramEnvParameterIuivNV"))!=0) nLinked++; +#endif + if (nLinked==16) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_framebuffer_multisample_coverage(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_framebuffer_multisample_coverage + if ((pglRenderbufferStorageMultisampleCoverageNV = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) __GLeeGetProcAddress("glRenderbufferStorageMultisampleCoverageNV"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_framebuffer_multisample(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_framebuffer_multisample + if ((pglRenderbufferStorageMultisampleEXT = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) __GLeeGetProcAddress("glRenderbufferStorageMultisampleEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_framebuffer_blit(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_framebuffer_blit + if ((pglBlitFramebufferEXT = (PFNGLBLITFRAMEBUFFEREXTPROC) __GLeeGetProcAddress("glBlitFramebufferEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_texture_compression_rgtc(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_color_matrix(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_texture_select(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_INGR_blend_func_separate(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_INGR_blend_func_separate + if ((pglBlendFuncSeparateINGR = (PFNGLBLENDFUNCSEPARATEINGRPROC) __GLeeGetProcAddress("glBlendFuncSeparateINGR"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_depth_pass_instrument(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_igloo_interface(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_SGIX_igloo_interface + if ((pglIglooInterfaceSGIX = (PFNGLIGLOOINTERFACESGIXPROC) __GLeeGetProcAddress("glIglooInterfaceSGIX"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_draw_buffers2(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_draw_buffers2 + if ((pglColorMaskIndexedEXT = (PFNGLCOLORMASKINDEXEDEXTPROC) __GLeeGetProcAddress("glColorMaskIndexedEXT"))!=0) nLinked++; + if ((pglGetBooleanIndexedvEXT = (PFNGLGETBOOLEANINDEXEDVEXTPROC) __GLeeGetProcAddress("glGetBooleanIndexedvEXT"))!=0) nLinked++; + if ((pglGetIntegerIndexedvEXT = (PFNGLGETINTEGERINDEXEDVEXTPROC) __GLeeGetProcAddress("glGetIntegerIndexedvEXT"))!=0) nLinked++; + if ((pglEnableIndexedEXT = (PFNGLENABLEINDEXEDEXTPROC) __GLeeGetProcAddress("glEnableIndexedEXT"))!=0) nLinked++; + if ((pglDisableIndexedEXT = (PFNGLDISABLEINDEXEDEXTPROC) __GLeeGetProcAddress("glDisableIndexedEXT"))!=0) nLinked++; + if ((pglIsEnabledIndexedEXT = (PFNGLISENABLEDINDEXEDEXTPROC) __GLeeGetProcAddress("glIsEnabledIndexedEXT"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_NV_parameter_buffer_object(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_NV_parameter_buffer_object + if ((pglProgramBufferParametersfvNV = (PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) __GLeeGetProcAddress("glProgramBufferParametersfvNV"))!=0) nLinked++; + if ((pglProgramBufferParametersIivNV = (PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) __GLeeGetProcAddress("glProgramBufferParametersIivNV"))!=0) nLinked++; + if ((pglProgramBufferParametersIuivNV = (PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) __GLeeGetProcAddress("glProgramBufferParametersIuivNV"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_draw_instanced(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_draw_instanced + if ((pglDrawArraysInstancedEXT = (PFNGLDRAWARRAYSINSTANCEDEXTPROC) __GLeeGetProcAddress("glDrawArraysInstancedEXT"))!=0) nLinked++; + if ((pglDrawElementsInstancedEXT = (PFNGLDRAWELEMENTSINSTANCEDEXTPROC) __GLeeGetProcAddress("glDrawElementsInstancedEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_fragment_lighting(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_fragment_lighting + if ((pglFragmentLightModeliEXT = (PFNGLFRAGMENTLIGHTMODELIEXTPROC) __GLeeGetProcAddress("glFragmentLightModeliEXT"))!=0) nLinked++; + if ((pglFragmentLightModelfEXT = (PFNGLFRAGMENTLIGHTMODELFEXTPROC) __GLeeGetProcAddress("glFragmentLightModelfEXT"))!=0) nLinked++; + if ((pglFragmentLightModelivEXT = (PFNGLFRAGMENTLIGHTMODELIVEXTPROC) __GLeeGetProcAddress("glFragmentLightModelivEXT"))!=0) nLinked++; + if ((pglFragmentLightModelfvEXT = (PFNGLFRAGMENTLIGHTMODELFVEXTPROC) __GLeeGetProcAddress("glFragmentLightModelfvEXT"))!=0) nLinked++; + if ((pglFragmentLightiEXT = (PFNGLFRAGMENTLIGHTIEXTPROC) __GLeeGetProcAddress("glFragmentLightiEXT"))!=0) nLinked++; + if ((pglFragmentLightfEXT = (PFNGLFRAGMENTLIGHTFEXTPROC) __GLeeGetProcAddress("glFragmentLightfEXT"))!=0) nLinked++; + if ((pglFragmentLightivEXT = (PFNGLFRAGMENTLIGHTIVEXTPROC) __GLeeGetProcAddress("glFragmentLightivEXT"))!=0) nLinked++; + if ((pglFragmentLightfvEXT = (PFNGLFRAGMENTLIGHTFVEXTPROC) __GLeeGetProcAddress("glFragmentLightfvEXT"))!=0) nLinked++; + if ((pglGetFragmentLightivEXT = (PFNGLGETFRAGMENTLIGHTIVEXTPROC) __GLeeGetProcAddress("glGetFragmentLightivEXT"))!=0) nLinked++; + if ((pglGetFragmentLightfvEXT = (PFNGLGETFRAGMENTLIGHTFVEXTPROC) __GLeeGetProcAddress("glGetFragmentLightfvEXT"))!=0) nLinked++; + if ((pglFragmentMaterialfEXT = (PFNGLFRAGMENTMATERIALFEXTPROC) __GLeeGetProcAddress("glFragmentMaterialfEXT"))!=0) nLinked++; + if ((pglFragmentMaterialiEXT = (PFNGLFRAGMENTMATERIALIEXTPROC) __GLeeGetProcAddress("glFragmentMaterialiEXT"))!=0) nLinked++; + if ((pglFragmentMaterialfvEXT = (PFNGLFRAGMENTMATERIALFVEXTPROC) __GLeeGetProcAddress("glFragmentMaterialfvEXT"))!=0) nLinked++; + if ((pglFragmentMaterialivEXT = (PFNGLFRAGMENTMATERIALIVEXTPROC) __GLeeGetProcAddress("glFragmentMaterialivEXT"))!=0) nLinked++; + if ((pglFragmentColorMaterialEXT = (PFNGLFRAGMENTCOLORMATERIALEXTPROC) __GLeeGetProcAddress("glFragmentColorMaterialEXT"))!=0) nLinked++; + if ((pglGetFragmentMaterialfvEXT = (PFNGLGETFRAGMENTMATERIALFVEXTPROC) __GLeeGetProcAddress("glGetFragmentMaterialfvEXT"))!=0) nLinked++; + if ((pglGetFragmentMaterialivEXT = (PFNGLGETFRAGMENTMATERIALIVEXTPROC) __GLeeGetProcAddress("glGetFragmentMaterialivEXT"))!=0) nLinked++; + if ((pglLightEnviEXT = (PFNGLLIGHTENVIEXTPROC) __GLeeGetProcAddress("glLightEnviEXT"))!=0) nLinked++; +#endif + if (nLinked==18) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_packed_depth_stencil(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_scene_marker(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_EXT_scene_marker + if ((pglBeginSceneEXT = (PFNGLBEGINSCENEEXTPROC) __GLeeGetProcAddress("glBeginSceneEXT"))!=0) nLinked++; + if ((pglEndSceneEXT = (PFNGLENDSCENEEXTPROC) __GLeeGetProcAddress("glEndSceneEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_EXT_stencil_clear_tag(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_compression_dxt1(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_env(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_EXT_texture_sRGB(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_IBM_static_data(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_MESAX_texture_stack(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_OES_byte_coordinates(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_OES_compressed_paletted_texture(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_OES_single_precision(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GL_OES_single_precision + if ((pglDepthRangefOES = (PFNGLDEPTHRANGEFOESPROC) __GLeeGetProcAddress("glDepthRangefOES"))!=0) nLinked++; + if ((pglFrustumfOES = (PFNGLFRUSTUMFOESPROC) __GLeeGetProcAddress("glFrustumfOES"))!=0) nLinked++; + if ((pglOrthofOES = (PFNGLORTHOFOESPROC) __GLeeGetProcAddress("glOrthofOES"))!=0) nLinked++; + if ((pglClipPlanefOES = (PFNGLCLIPPLANEFOESPROC) __GLeeGetProcAddress("glClipPlanefOES"))!=0) nLinked++; + if ((pglGetClipPlanefOES = (PFNGLGETCLIPPLANEFOESPROC) __GLeeGetProcAddress("glGetClipPlanefOES"))!=0) nLinked++; + if ((pglClearDepthfOES = (PFNGLCLEARDEPTHFOESPROC) __GLeeGetProcAddress("glClearDepthfOES"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GL_SGIX_pixel_texture_bits(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GL_SGIX_texture_range(void) {return GLEE_LINK_COMPLETE;} + +GLEE_LINK_FUNCTION __GLeeGLLoadFunction[300]; + +void initGLLoadFunctions(void) +{ + __GLeeGLLoadFunction[0]=__GLeeLink_GL_VERSION_1_2; + __GLeeGLLoadFunction[1]=__GLeeLink_GL_ARB_imaging; + __GLeeGLLoadFunction[2]=__GLeeLink_GL_VERSION_1_3; + __GLeeGLLoadFunction[3]=__GLeeLink_GL_VERSION_1_4; + __GLeeGLLoadFunction[4]=__GLeeLink_GL_VERSION_1_5; + __GLeeGLLoadFunction[5]=__GLeeLink_GL_VERSION_2_0; + __GLeeGLLoadFunction[6]=__GLeeLink_GL_VERSION_2_1; + __GLeeGLLoadFunction[7]=__GLeeLink_GL_ARB_multitexture; + __GLeeGLLoadFunction[8]=__GLeeLink_GL_ARB_transpose_matrix; + __GLeeGLLoadFunction[9]=__GLeeLink_GL_ARB_multisample; + __GLeeGLLoadFunction[10]=__GLeeLink_GL_ARB_texture_env_add; + __GLeeGLLoadFunction[11]=__GLeeLink_GL_ARB_texture_cube_map; + __GLeeGLLoadFunction[12]=__GLeeLink_GL_ARB_texture_compression; + __GLeeGLLoadFunction[13]=__GLeeLink_GL_ARB_texture_border_clamp; + __GLeeGLLoadFunction[14]=__GLeeLink_GL_ARB_point_parameters; + __GLeeGLLoadFunction[15]=__GLeeLink_GL_ARB_vertex_blend; + __GLeeGLLoadFunction[16]=__GLeeLink_GL_ARB_matrix_palette; + __GLeeGLLoadFunction[17]=__GLeeLink_GL_ARB_texture_env_combine; + __GLeeGLLoadFunction[18]=__GLeeLink_GL_ARB_texture_env_crossbar; + __GLeeGLLoadFunction[19]=__GLeeLink_GL_ARB_texture_env_dot3; + __GLeeGLLoadFunction[20]=__GLeeLink_GL_ARB_texture_mirrored_repeat; + __GLeeGLLoadFunction[21]=__GLeeLink_GL_ARB_depth_texture; + __GLeeGLLoadFunction[22]=__GLeeLink_GL_ARB_shadow; + __GLeeGLLoadFunction[23]=__GLeeLink_GL_ARB_shadow_ambient; + __GLeeGLLoadFunction[24]=__GLeeLink_GL_ARB_window_pos; + __GLeeGLLoadFunction[25]=__GLeeLink_GL_ARB_vertex_program; + __GLeeGLLoadFunction[26]=__GLeeLink_GL_ARB_fragment_program; + __GLeeGLLoadFunction[27]=__GLeeLink_GL_ARB_vertex_buffer_object; + __GLeeGLLoadFunction[28]=__GLeeLink_GL_ARB_occlusion_query; + __GLeeGLLoadFunction[29]=__GLeeLink_GL_ARB_shader_objects; + __GLeeGLLoadFunction[30]=__GLeeLink_GL_ARB_vertex_shader; + __GLeeGLLoadFunction[31]=__GLeeLink_GL_ARB_fragment_shader; + __GLeeGLLoadFunction[32]=__GLeeLink_GL_ARB_shading_language_100; + __GLeeGLLoadFunction[33]=__GLeeLink_GL_ARB_texture_non_power_of_two; + __GLeeGLLoadFunction[34]=__GLeeLink_GL_ARB_point_sprite; + __GLeeGLLoadFunction[35]=__GLeeLink_GL_ARB_fragment_program_shadow; + __GLeeGLLoadFunction[36]=__GLeeLink_GL_ARB_draw_buffers; + __GLeeGLLoadFunction[37]=__GLeeLink_GL_ARB_texture_rectangle; + __GLeeGLLoadFunction[38]=__GLeeLink_GL_ARB_color_buffer_float; + __GLeeGLLoadFunction[39]=__GLeeLink_GL_ARB_half_float_pixel; + __GLeeGLLoadFunction[40]=__GLeeLink_GL_ARB_texture_float; + __GLeeGLLoadFunction[41]=__GLeeLink_GL_ARB_pixel_buffer_object; + __GLeeGLLoadFunction[42]=__GLeeLink_GL_EXT_abgr; + __GLeeGLLoadFunction[43]=__GLeeLink_GL_EXT_blend_color; + __GLeeGLLoadFunction[44]=__GLeeLink_GL_EXT_polygon_offset; + __GLeeGLLoadFunction[45]=__GLeeLink_GL_EXT_texture; + __GLeeGLLoadFunction[46]=__GLeeLink_GL_EXT_texture3D; + __GLeeGLLoadFunction[47]=__GLeeLink_GL_SGIS_texture_filter4; + __GLeeGLLoadFunction[48]=__GLeeLink_GL_EXT_subtexture; + __GLeeGLLoadFunction[49]=__GLeeLink_GL_EXT_copy_texture; + __GLeeGLLoadFunction[50]=__GLeeLink_GL_EXT_histogram; + __GLeeGLLoadFunction[51]=__GLeeLink_GL_EXT_convolution; + __GLeeGLLoadFunction[52]=__GLeeLink_GL_SGI_color_matrix; + __GLeeGLLoadFunction[53]=__GLeeLink_GL_SGI_color_table; + __GLeeGLLoadFunction[54]=__GLeeLink_GL_SGIS_pixel_texture; + __GLeeGLLoadFunction[55]=__GLeeLink_GL_SGIX_pixel_texture; + __GLeeGLLoadFunction[56]=__GLeeLink_GL_SGIS_texture4D; + __GLeeGLLoadFunction[57]=__GLeeLink_GL_SGI_texture_color_table; + __GLeeGLLoadFunction[58]=__GLeeLink_GL_EXT_cmyka; + __GLeeGLLoadFunction[59]=__GLeeLink_GL_EXT_texture_object; + __GLeeGLLoadFunction[60]=__GLeeLink_GL_SGIS_detail_texture; + __GLeeGLLoadFunction[61]=__GLeeLink_GL_SGIS_sharpen_texture; + __GLeeGLLoadFunction[62]=__GLeeLink_GL_EXT_packed_pixels; + __GLeeGLLoadFunction[63]=__GLeeLink_GL_SGIS_texture_lod; + __GLeeGLLoadFunction[64]=__GLeeLink_GL_SGIS_multisample; + __GLeeGLLoadFunction[65]=__GLeeLink_GL_EXT_rescale_normal; + __GLeeGLLoadFunction[66]=__GLeeLink_GL_EXT_vertex_array; + __GLeeGLLoadFunction[67]=__GLeeLink_GL_EXT_misc_attribute; + __GLeeGLLoadFunction[68]=__GLeeLink_GL_SGIS_generate_mipmap; + __GLeeGLLoadFunction[69]=__GLeeLink_GL_SGIX_clipmap; + __GLeeGLLoadFunction[70]=__GLeeLink_GL_SGIX_shadow; + __GLeeGLLoadFunction[71]=__GLeeLink_GL_SGIS_texture_edge_clamp; + __GLeeGLLoadFunction[72]=__GLeeLink_GL_SGIS_texture_border_clamp; + __GLeeGLLoadFunction[73]=__GLeeLink_GL_EXT_blend_minmax; + __GLeeGLLoadFunction[74]=__GLeeLink_GL_EXT_blend_subtract; + __GLeeGLLoadFunction[75]=__GLeeLink_GL_EXT_blend_logic_op; + __GLeeGLLoadFunction[76]=__GLeeLink_GL_SGIX_interlace; + __GLeeGLLoadFunction[77]=__GLeeLink_GL_SGIX_pixel_tiles; + __GLeeGLLoadFunction[78]=__GLeeLink_GL_SGIS_texture_select; + __GLeeGLLoadFunction[79]=__GLeeLink_GL_SGIX_sprite; + __GLeeGLLoadFunction[80]=__GLeeLink_GL_SGIX_texture_multi_buffer; + __GLeeGLLoadFunction[81]=__GLeeLink_GL_EXT_point_parameters; + __GLeeGLLoadFunction[82]=__GLeeLink_GL_SGIS_point_parameters; + __GLeeGLLoadFunction[83]=__GLeeLink_GL_SGIX_instruments; + __GLeeGLLoadFunction[84]=__GLeeLink_GL_SGIX_texture_scale_bias; + __GLeeGLLoadFunction[85]=__GLeeLink_GL_SGIX_framezoom; + __GLeeGLLoadFunction[86]=__GLeeLink_GL_SGIX_tag_sample_buffer; + __GLeeGLLoadFunction[87]=__GLeeLink_GL_FfdMaskSGIX; + __GLeeGLLoadFunction[88]=__GLeeLink_GL_SGIX_polynomial_ffd; + __GLeeGLLoadFunction[89]=__GLeeLink_GL_SGIX_reference_plane; + __GLeeGLLoadFunction[90]=__GLeeLink_GL_SGIX_flush_raster; + __GLeeGLLoadFunction[91]=__GLeeLink_GL_SGIX_depth_texture; + __GLeeGLLoadFunction[92]=__GLeeLink_GL_SGIS_fog_function; + __GLeeGLLoadFunction[93]=__GLeeLink_GL_SGIX_fog_offset; + __GLeeGLLoadFunction[94]=__GLeeLink_GL_HP_image_transform; + __GLeeGLLoadFunction[95]=__GLeeLink_GL_HP_convolution_border_modes; + __GLeeGLLoadFunction[96]=__GLeeLink_GL_INGR_palette_buffer; + __GLeeGLLoadFunction[97]=__GLeeLink_GL_SGIX_texture_add_env; + __GLeeGLLoadFunction[98]=__GLeeLink_GL_EXT_color_subtable; + __GLeeGLLoadFunction[99]=__GLeeLink_GL_PGI_vertex_hints; + __GLeeGLLoadFunction[100]=__GLeeLink_GL_PGI_misc_hints; + __GLeeGLLoadFunction[101]=__GLeeLink_GL_EXT_paletted_texture; + __GLeeGLLoadFunction[102]=__GLeeLink_GL_EXT_clip_volume_hint; + __GLeeGLLoadFunction[103]=__GLeeLink_GL_SGIX_list_priority; + __GLeeGLLoadFunction[104]=__GLeeLink_GL_SGIX_ir_instrument1; + __GLeeGLLoadFunction[105]=__GLeeLink_GL_SGIX_calligraphic_fragment; + __GLeeGLLoadFunction[106]=__GLeeLink_GL_SGIX_texture_lod_bias; + __GLeeGLLoadFunction[107]=__GLeeLink_GL_SGIX_shadow_ambient; + __GLeeGLLoadFunction[108]=__GLeeLink_GL_EXT_index_texture; + __GLeeGLLoadFunction[109]=__GLeeLink_GL_EXT_index_material; + __GLeeGLLoadFunction[110]=__GLeeLink_GL_EXT_index_func; + __GLeeGLLoadFunction[111]=__GLeeLink_GL_EXT_index_array_formats; + __GLeeGLLoadFunction[112]=__GLeeLink_GL_EXT_compiled_vertex_array; + __GLeeGLLoadFunction[113]=__GLeeLink_GL_EXT_cull_vertex; + __GLeeGLLoadFunction[114]=__GLeeLink_GL_SGIX_ycrcb; + __GLeeGLLoadFunction[115]=__GLeeLink_GL_SGIX_fragment_lighting; + __GLeeGLLoadFunction[116]=__GLeeLink_GL_IBM_rasterpos_clip; + __GLeeGLLoadFunction[117]=__GLeeLink_GL_HP_texture_lighting; + __GLeeGLLoadFunction[118]=__GLeeLink_GL_EXT_draw_range_elements; + __GLeeGLLoadFunction[119]=__GLeeLink_GL_WIN_phong_shading; + __GLeeGLLoadFunction[120]=__GLeeLink_GL_WIN_specular_fog; + __GLeeGLLoadFunction[121]=__GLeeLink_GL_EXT_light_texture; + __GLeeGLLoadFunction[122]=__GLeeLink_GL_SGIX_blend_alpha_minmax; + __GLeeGLLoadFunction[123]=__GLeeLink_GL_SGIX_impact_pixel_texture; + __GLeeGLLoadFunction[124]=__GLeeLink_GL_EXT_bgra; + __GLeeGLLoadFunction[125]=__GLeeLink_GL_SGIX_async; + __GLeeGLLoadFunction[126]=__GLeeLink_GL_SGIX_async_pixel; + __GLeeGLLoadFunction[127]=__GLeeLink_GL_SGIX_async_histogram; + __GLeeGLLoadFunction[128]=__GLeeLink_GL_INTEL_texture_scissor; + __GLeeGLLoadFunction[129]=__GLeeLink_GL_INTEL_parallel_arrays; + __GLeeGLLoadFunction[130]=__GLeeLink_GL_HP_occlusion_test; + __GLeeGLLoadFunction[131]=__GLeeLink_GL_EXT_pixel_transform; + __GLeeGLLoadFunction[132]=__GLeeLink_GL_EXT_pixel_transform_color_table; + __GLeeGLLoadFunction[133]=__GLeeLink_GL_EXT_shared_texture_palette; + __GLeeGLLoadFunction[134]=__GLeeLink_GL_EXT_separate_specular_color; + __GLeeGLLoadFunction[135]=__GLeeLink_GL_EXT_secondary_color; + __GLeeGLLoadFunction[136]=__GLeeLink_GL_EXT_texture_perturb_normal; + __GLeeGLLoadFunction[137]=__GLeeLink_GL_EXT_multi_draw_arrays; + __GLeeGLLoadFunction[138]=__GLeeLink_GL_EXT_fog_coord; + __GLeeGLLoadFunction[139]=__GLeeLink_GL_REND_screen_coordinates; + __GLeeGLLoadFunction[140]=__GLeeLink_GL_EXT_coordinate_frame; + __GLeeGLLoadFunction[141]=__GLeeLink_GL_EXT_texture_env_combine; + __GLeeGLLoadFunction[142]=__GLeeLink_GL_APPLE_specular_vector; + __GLeeGLLoadFunction[143]=__GLeeLink_GL_APPLE_transform_hint; + __GLeeGLLoadFunction[144]=__GLeeLink_GL_SGIX_fog_scale; + __GLeeGLLoadFunction[145]=__GLeeLink_GL_SUNX_constant_data; + __GLeeGLLoadFunction[146]=__GLeeLink_GL_SUN_global_alpha; + __GLeeGLLoadFunction[147]=__GLeeLink_GL_SUN_triangle_list; + __GLeeGLLoadFunction[148]=__GLeeLink_GL_SUN_vertex; + __GLeeGLLoadFunction[149]=__GLeeLink_GL_EXT_blend_func_separate; + __GLeeGLLoadFunction[150]=__GLeeLink_GL_INGR_color_clamp; + __GLeeGLLoadFunction[151]=__GLeeLink_GL_INGR_interlace_read; + __GLeeGLLoadFunction[152]=__GLeeLink_GL_EXT_stencil_wrap; + __GLeeGLLoadFunction[153]=__GLeeLink_GL_EXT_422_pixels; + __GLeeGLLoadFunction[154]=__GLeeLink_GL_NV_texgen_reflection; + __GLeeGLLoadFunction[155]=__GLeeLink_GL_EXT_texture_cube_map; + __GLeeGLLoadFunction[156]=__GLeeLink_GL_SUN_convolution_border_modes; + __GLeeGLLoadFunction[157]=__GLeeLink_GL_EXT_texture_env_add; + __GLeeGLLoadFunction[158]=__GLeeLink_GL_EXT_texture_lod_bias; + __GLeeGLLoadFunction[159]=__GLeeLink_GL_EXT_texture_filter_anisotropic; + __GLeeGLLoadFunction[160]=__GLeeLink_GL_EXT_vertex_weighting; + __GLeeGLLoadFunction[161]=__GLeeLink_GL_NV_light_max_exponent; + __GLeeGLLoadFunction[162]=__GLeeLink_GL_NV_vertex_array_range; + __GLeeGLLoadFunction[163]=__GLeeLink_GL_NV_register_combiners; + __GLeeGLLoadFunction[164]=__GLeeLink_GL_NV_fog_distance; + __GLeeGLLoadFunction[165]=__GLeeLink_GL_NV_texgen_emboss; + __GLeeGLLoadFunction[166]=__GLeeLink_GL_NV_blend_square; + __GLeeGLLoadFunction[167]=__GLeeLink_GL_NV_texture_env_combine4; + __GLeeGLLoadFunction[168]=__GLeeLink_GL_MESA_resize_buffers; + __GLeeGLLoadFunction[169]=__GLeeLink_GL_MESA_window_pos; + __GLeeGLLoadFunction[170]=__GLeeLink_GL_EXT_texture_compression_s3tc; + __GLeeGLLoadFunction[171]=__GLeeLink_GL_IBM_cull_vertex; + __GLeeGLLoadFunction[172]=__GLeeLink_GL_IBM_multimode_draw_arrays; + __GLeeGLLoadFunction[173]=__GLeeLink_GL_IBM_vertex_array_lists; + __GLeeGLLoadFunction[174]=__GLeeLink_GL_SGIX_subsample; + __GLeeGLLoadFunction[175]=__GLeeLink_GL_SGIX_ycrcb_subsample; + __GLeeGLLoadFunction[176]=__GLeeLink_GL_SGIX_ycrcba; + __GLeeGLLoadFunction[177]=__GLeeLink_GL_SGI_depth_pass_instrument; + __GLeeGLLoadFunction[178]=__GLeeLink_GL_3DFX_texture_compression_FXT1; + __GLeeGLLoadFunction[179]=__GLeeLink_GL_3DFX_multisample; + __GLeeGLLoadFunction[180]=__GLeeLink_GL_3DFX_tbuffer; + __GLeeGLLoadFunction[181]=__GLeeLink_GL_EXT_multisample; + __GLeeGLLoadFunction[182]=__GLeeLink_GL_SGIX_vertex_preclip; + __GLeeGLLoadFunction[183]=__GLeeLink_GL_SGIX_convolution_accuracy; + __GLeeGLLoadFunction[184]=__GLeeLink_GL_SGIX_resample; + __GLeeGLLoadFunction[185]=__GLeeLink_GL_SGIS_point_line_texgen; + __GLeeGLLoadFunction[186]=__GLeeLink_GL_SGIS_texture_color_mask; + __GLeeGLLoadFunction[187]=__GLeeLink_GL_EXT_texture_env_dot3; + __GLeeGLLoadFunction[188]=__GLeeLink_GL_ATI_texture_mirror_once; + __GLeeGLLoadFunction[189]=__GLeeLink_GL_NV_fence; + __GLeeGLLoadFunction[190]=__GLeeLink_GL_IBM_texture_mirrored_repeat; + __GLeeGLLoadFunction[191]=__GLeeLink_GL_NV_evaluators; + __GLeeGLLoadFunction[192]=__GLeeLink_GL_NV_packed_depth_stencil; + __GLeeGLLoadFunction[193]=__GLeeLink_GL_NV_register_combiners2; + __GLeeGLLoadFunction[194]=__GLeeLink_GL_NV_texture_compression_vtc; + __GLeeGLLoadFunction[195]=__GLeeLink_GL_NV_texture_rectangle; + __GLeeGLLoadFunction[196]=__GLeeLink_GL_NV_texture_shader; + __GLeeGLLoadFunction[197]=__GLeeLink_GL_NV_texture_shader2; + __GLeeGLLoadFunction[198]=__GLeeLink_GL_NV_vertex_array_range2; + __GLeeGLLoadFunction[199]=__GLeeLink_GL_NV_vertex_program; + __GLeeGLLoadFunction[200]=__GLeeLink_GL_SGIX_texture_coordinate_clamp; + __GLeeGLLoadFunction[201]=__GLeeLink_GL_SGIX_scalebias_hint; + __GLeeGLLoadFunction[202]=__GLeeLink_GL_OML_interlace; + __GLeeGLLoadFunction[203]=__GLeeLink_GL_OML_subsample; + __GLeeGLLoadFunction[204]=__GLeeLink_GL_OML_resample; + __GLeeGLLoadFunction[205]=__GLeeLink_GL_NV_copy_depth_to_color; + __GLeeGLLoadFunction[206]=__GLeeLink_GL_ATI_envmap_bumpmap; + __GLeeGLLoadFunction[207]=__GLeeLink_GL_ATI_fragment_shader; + __GLeeGLLoadFunction[208]=__GLeeLink_GL_ATI_pn_triangles; + __GLeeGLLoadFunction[209]=__GLeeLink_GL_ATI_vertex_array_object; + __GLeeGLLoadFunction[210]=__GLeeLink_GL_EXT_vertex_shader; + __GLeeGLLoadFunction[211]=__GLeeLink_GL_ATI_vertex_streams; + __GLeeGLLoadFunction[212]=__GLeeLink_GL_ATI_element_array; + __GLeeGLLoadFunction[213]=__GLeeLink_GL_SUN_mesh_array; + __GLeeGLLoadFunction[214]=__GLeeLink_GL_SUN_slice_accum; + __GLeeGLLoadFunction[215]=__GLeeLink_GL_NV_multisample_filter_hint; + __GLeeGLLoadFunction[216]=__GLeeLink_GL_NV_depth_clamp; + __GLeeGLLoadFunction[217]=__GLeeLink_GL_NV_occlusion_query; + __GLeeGLLoadFunction[218]=__GLeeLink_GL_NV_point_sprite; + __GLeeGLLoadFunction[219]=__GLeeLink_GL_NV_texture_shader3; + __GLeeGLLoadFunction[220]=__GLeeLink_GL_NV_vertex_program1_1; + __GLeeGLLoadFunction[221]=__GLeeLink_GL_EXT_shadow_funcs; + __GLeeGLLoadFunction[222]=__GLeeLink_GL_EXT_stencil_two_side; + __GLeeGLLoadFunction[223]=__GLeeLink_GL_ATI_text_fragment_shader; + __GLeeGLLoadFunction[224]=__GLeeLink_GL_APPLE_client_storage; + __GLeeGLLoadFunction[225]=__GLeeLink_GL_APPLE_element_array; + __GLeeGLLoadFunction[226]=__GLeeLink_GL_APPLE_fence; + __GLeeGLLoadFunction[227]=__GLeeLink_GL_APPLE_vertex_array_object; + __GLeeGLLoadFunction[228]=__GLeeLink_GL_APPLE_vertex_array_range; + __GLeeGLLoadFunction[229]=__GLeeLink_GL_APPLE_ycbcr_422; + __GLeeGLLoadFunction[230]=__GLeeLink_GL_S3_s3tc; + __GLeeGLLoadFunction[231]=__GLeeLink_GL_ATI_draw_buffers; + __GLeeGLLoadFunction[232]=__GLeeLink_GL_ATI_pixel_format_float; + __GLeeGLLoadFunction[233]=__GLeeLink_GL_ATI_texture_env_combine3; + __GLeeGLLoadFunction[234]=__GLeeLink_GL_ATI_texture_float; + __GLeeGLLoadFunction[235]=__GLeeLink_GL_NV_float_buffer; + __GLeeGLLoadFunction[236]=__GLeeLink_GL_NV_fragment_program; + __GLeeGLLoadFunction[237]=__GLeeLink_GL_NV_half_float; + __GLeeGLLoadFunction[238]=__GLeeLink_GL_NV_pixel_data_range; + __GLeeGLLoadFunction[239]=__GLeeLink_GL_NV_primitive_restart; + __GLeeGLLoadFunction[240]=__GLeeLink_GL_NV_texture_expand_normal; + __GLeeGLLoadFunction[241]=__GLeeLink_GL_NV_vertex_program2; + __GLeeGLLoadFunction[242]=__GLeeLink_GL_ATI_map_object_buffer; + __GLeeGLLoadFunction[243]=__GLeeLink_GL_ATI_separate_stencil; + __GLeeGLLoadFunction[244]=__GLeeLink_GL_ATI_vertex_attrib_array_object; + __GLeeGLLoadFunction[245]=__GLeeLink_GL_OES_read_format; + __GLeeGLLoadFunction[246]=__GLeeLink_GL_EXT_depth_bounds_test; + __GLeeGLLoadFunction[247]=__GLeeLink_GL_EXT_texture_mirror_clamp; + __GLeeGLLoadFunction[248]=__GLeeLink_GL_EXT_blend_equation_separate; + __GLeeGLLoadFunction[249]=__GLeeLink_GL_MESA_pack_invert; + __GLeeGLLoadFunction[250]=__GLeeLink_GL_MESA_ycbcr_texture; + __GLeeGLLoadFunction[251]=__GLeeLink_GL_EXT_pixel_buffer_object; + __GLeeGLLoadFunction[252]=__GLeeLink_GL_NV_fragment_program_option; + __GLeeGLLoadFunction[253]=__GLeeLink_GL_NV_fragment_program2; + __GLeeGLLoadFunction[254]=__GLeeLink_GL_NV_vertex_program2_option; + __GLeeGLLoadFunction[255]=__GLeeLink_GL_NV_vertex_program3; + __GLeeGLLoadFunction[256]=__GLeeLink_GL_EXT_framebuffer_object; + __GLeeGLLoadFunction[257]=__GLeeLink_GL_GREMEDY_string_marker; + __GLeeGLLoadFunction[258]=__GLeeLink_GL_EXT_Cg_shader; + __GLeeGLLoadFunction[259]=__GLeeLink_GL_EXT_timer_query; + __GLeeGLLoadFunction[260]=__GLeeLink_GL_EXT_texture_buffer_object; + __GLeeGLLoadFunction[261]=__GLeeLink_GL_EXT_gpu_shader4; + __GLeeGLLoadFunction[262]=__GLeeLink_GL_EXT_geometry_shader4; + __GLeeGLLoadFunction[263]=__GLeeLink_GL_EXT_bindable_uniform; + __GLeeGLLoadFunction[264]=__GLeeLink_GL_EXT_framebuffer_sRGB; + __GLeeGLLoadFunction[265]=__GLeeLink_GL_EXT_texture_shared_exponent; + __GLeeGLLoadFunction[266]=__GLeeLink_GL_EXT_packed_float; + __GLeeGLLoadFunction[267]=__GLeeLink_GL_EXT_texture_array; + __GLeeGLLoadFunction[268]=__GLeeLink_GL_EXT_texture_integer; + __GLeeGLLoadFunction[269]=__GLeeLink_GL_NV_depth_buffer_float; + __GLeeGLLoadFunction[270]=__GLeeLink_GL_EXT_texture_compression_latc; + __GLeeGLLoadFunction[271]=__GLeeLink_GL_NV_transform_feedback; + __GLeeGLLoadFunction[272]=__GLeeLink_GL_NV_geometry_program4; + __GLeeGLLoadFunction[273]=__GLeeLink_GL_NV_gpu_program4; + __GLeeGLLoadFunction[274]=__GLeeLink_GL_NV_framebuffer_multisample_coverage; + __GLeeGLLoadFunction[275]=__GLeeLink_GL_EXT_framebuffer_multisample; + __GLeeGLLoadFunction[276]=__GLeeLink_GL_EXT_framebuffer_blit; + __GLeeGLLoadFunction[277]=__GLeeLink_GL_EXT_texture_compression_rgtc; + __GLeeGLLoadFunction[278]=__GLeeLink_GL_EXT_color_matrix; + __GLeeGLLoadFunction[279]=__GLeeLink_GL_SGIX_texture_select; + __GLeeGLLoadFunction[280]=__GLeeLink_GL_INGR_blend_func_separate; + __GLeeGLLoadFunction[281]=__GLeeLink_GL_SGIX_depth_pass_instrument; + __GLeeGLLoadFunction[282]=__GLeeLink_GL_SGIX_igloo_interface; + __GLeeGLLoadFunction[283]=__GLeeLink_GL_EXT_draw_buffers2; + __GLeeGLLoadFunction[284]=__GLeeLink_GL_NV_parameter_buffer_object; + __GLeeGLLoadFunction[285]=__GLeeLink_GL_EXT_draw_instanced; + __GLeeGLLoadFunction[286]=__GLeeLink_GL_EXT_fragment_lighting; + __GLeeGLLoadFunction[287]=__GLeeLink_GL_EXT_packed_depth_stencil; + __GLeeGLLoadFunction[288]=__GLeeLink_GL_EXT_scene_marker; + __GLeeGLLoadFunction[289]=__GLeeLink_GL_EXT_stencil_clear_tag; + __GLeeGLLoadFunction[290]=__GLeeLink_GL_EXT_texture_compression_dxt1; + __GLeeGLLoadFunction[291]=__GLeeLink_GL_EXT_texture_env; + __GLeeGLLoadFunction[292]=__GLeeLink_GL_EXT_texture_sRGB; + __GLeeGLLoadFunction[293]=__GLeeLink_GL_IBM_static_data; + __GLeeGLLoadFunction[294]=__GLeeLink_GL_MESAX_texture_stack; + __GLeeGLLoadFunction[295]=__GLeeLink_GL_OES_byte_coordinates; + __GLeeGLLoadFunction[296]=__GLeeLink_GL_OES_compressed_paletted_texture; + __GLeeGLLoadFunction[297]=__GLeeLink_GL_OES_single_precision; + __GLeeGLLoadFunction[298]=__GLeeLink_GL_SGIX_pixel_texture_bits; + __GLeeGLLoadFunction[299]=__GLeeLink_GL_SGIX_texture_range; +} + +#ifdef WIN32 +GLuint __GLeeLink_WGL_ARB_buffer_region(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_ARB_buffer_region + if ((pwglCreateBufferRegionARB = (PFNWGLCREATEBUFFERREGIONARBPROC) __GLeeGetProcAddress("wglCreateBufferRegionARB"))!=0) nLinked++; + if ((pwglDeleteBufferRegionARB = (PFNWGLDELETEBUFFERREGIONARBPROC) __GLeeGetProcAddress("wglDeleteBufferRegionARB"))!=0) nLinked++; + if ((pwglSaveBufferRegionARB = (PFNWGLSAVEBUFFERREGIONARBPROC) __GLeeGetProcAddress("wglSaveBufferRegionARB"))!=0) nLinked++; + if ((pwglRestoreBufferRegionARB = (PFNWGLRESTOREBUFFERREGIONARBPROC) __GLeeGetProcAddress("wglRestoreBufferRegionARB"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_ARB_multisample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_WGL_ARB_extensions_string(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_ARB_extensions_string + if ((pwglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC) __GLeeGetProcAddress("wglGetExtensionsStringARB"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_ARB_pixel_format(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_ARB_pixel_format + if ((pwglGetPixelFormatAttribivARB = (PFNWGLGETPIXELFORMATATTRIBIVARBPROC) __GLeeGetProcAddress("wglGetPixelFormatAttribivARB"))!=0) nLinked++; + if ((pwglGetPixelFormatAttribfvARB = (PFNWGLGETPIXELFORMATATTRIBFVARBPROC) __GLeeGetProcAddress("wglGetPixelFormatAttribfvARB"))!=0) nLinked++; + if ((pwglChoosePixelFormatARB = (PFNWGLCHOOSEPIXELFORMATARBPROC) __GLeeGetProcAddress("wglChoosePixelFormatARB"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_ARB_make_current_read(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_ARB_make_current_read + if ((pwglMakeContextCurrentARB = (PFNWGLMAKECONTEXTCURRENTARBPROC) __GLeeGetProcAddress("wglMakeContextCurrentARB"))!=0) nLinked++; + if ((pwglGetCurrentReadDCARB = (PFNWGLGETCURRENTREADDCARBPROC) __GLeeGetProcAddress("wglGetCurrentReadDCARB"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_ARB_pbuffer(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_ARB_pbuffer + if ((pwglCreatePbufferARB = (PFNWGLCREATEPBUFFERARBPROC) __GLeeGetProcAddress("wglCreatePbufferARB"))!=0) nLinked++; + if ((pwglGetPbufferDCARB = (PFNWGLGETPBUFFERDCARBPROC) __GLeeGetProcAddress("wglGetPbufferDCARB"))!=0) nLinked++; + if ((pwglReleasePbufferDCARB = (PFNWGLRELEASEPBUFFERDCARBPROC) __GLeeGetProcAddress("wglReleasePbufferDCARB"))!=0) nLinked++; + if ((pwglDestroyPbufferARB = (PFNWGLDESTROYPBUFFERARBPROC) __GLeeGetProcAddress("wglDestroyPbufferARB"))!=0) nLinked++; + if ((pwglQueryPbufferARB = (PFNWGLQUERYPBUFFERARBPROC) __GLeeGetProcAddress("wglQueryPbufferARB"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_ARB_render_texture(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_ARB_render_texture + if ((pwglBindTexImageARB = (PFNWGLBINDTEXIMAGEARBPROC) __GLeeGetProcAddress("wglBindTexImageARB"))!=0) nLinked++; + if ((pwglReleaseTexImageARB = (PFNWGLRELEASETEXIMAGEARBPROC) __GLeeGetProcAddress("wglReleaseTexImageARB"))!=0) nLinked++; + if ((pwglSetPbufferAttribARB = (PFNWGLSETPBUFFERATTRIBARBPROC) __GLeeGetProcAddress("wglSetPbufferAttribARB"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_ARB_pixel_format_float(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_WGL_EXT_make_current_read(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_EXT_make_current_read + if ((pwglMakeContextCurrentEXT = (PFNWGLMAKECONTEXTCURRENTEXTPROC) __GLeeGetProcAddress("wglMakeContextCurrentEXT"))!=0) nLinked++; + if ((pwglGetCurrentReadDCEXT = (PFNWGLGETCURRENTREADDCEXTPROC) __GLeeGetProcAddress("wglGetCurrentReadDCEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_EXT_pixel_format(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_EXT_pixel_format + if ((pwglGetPixelFormatAttribivEXT = (PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) __GLeeGetProcAddress("wglGetPixelFormatAttribivEXT"))!=0) nLinked++; + if ((pwglGetPixelFormatAttribfvEXT = (PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) __GLeeGetProcAddress("wglGetPixelFormatAttribfvEXT"))!=0) nLinked++; + if ((pwglChoosePixelFormatEXT = (PFNWGLCHOOSEPIXELFORMATEXTPROC) __GLeeGetProcAddress("wglChoosePixelFormatEXT"))!=0) nLinked++; +#endif + if (nLinked==3) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_EXT_pbuffer(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_EXT_pbuffer + if ((pwglCreatePbufferEXT = (PFNWGLCREATEPBUFFEREXTPROC) __GLeeGetProcAddress("wglCreatePbufferEXT"))!=0) nLinked++; + if ((pwglGetPbufferDCEXT = (PFNWGLGETPBUFFERDCEXTPROC) __GLeeGetProcAddress("wglGetPbufferDCEXT"))!=0) nLinked++; + if ((pwglReleasePbufferDCEXT = (PFNWGLRELEASEPBUFFERDCEXTPROC) __GLeeGetProcAddress("wglReleasePbufferDCEXT"))!=0) nLinked++; + if ((pwglDestroyPbufferEXT = (PFNWGLDESTROYPBUFFEREXTPROC) __GLeeGetProcAddress("wglDestroyPbufferEXT"))!=0) nLinked++; + if ((pwglQueryPbufferEXT = (PFNWGLQUERYPBUFFEREXTPROC) __GLeeGetProcAddress("wglQueryPbufferEXT"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_EXT_depth_float(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_WGL_3DFX_multisample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_WGL_EXT_multisample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_WGL_I3D_digital_video_control(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_I3D_digital_video_control + if ((pwglGetDigitalVideoParametersI3D = (PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) __GLeeGetProcAddress("wglGetDigitalVideoParametersI3D"))!=0) nLinked++; + if ((pwglSetDigitalVideoParametersI3D = (PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) __GLeeGetProcAddress("wglSetDigitalVideoParametersI3D"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_I3D_gamma(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_I3D_gamma + if ((pwglGetGammaTableParametersI3D = (PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) __GLeeGetProcAddress("wglGetGammaTableParametersI3D"))!=0) nLinked++; + if ((pwglSetGammaTableParametersI3D = (PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) __GLeeGetProcAddress("wglSetGammaTableParametersI3D"))!=0) nLinked++; + if ((pwglGetGammaTableI3D = (PFNWGLGETGAMMATABLEI3DPROC) __GLeeGetProcAddress("wglGetGammaTableI3D"))!=0) nLinked++; + if ((pwglSetGammaTableI3D = (PFNWGLSETGAMMATABLEI3DPROC) __GLeeGetProcAddress("wglSetGammaTableI3D"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_I3D_genlock(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_I3D_genlock + if ((pwglEnableGenlockI3D = (PFNWGLENABLEGENLOCKI3DPROC) __GLeeGetProcAddress("wglEnableGenlockI3D"))!=0) nLinked++; + if ((pwglDisableGenlockI3D = (PFNWGLDISABLEGENLOCKI3DPROC) __GLeeGetProcAddress("wglDisableGenlockI3D"))!=0) nLinked++; + if ((pwglIsEnabledGenlockI3D = (PFNWGLISENABLEDGENLOCKI3DPROC) __GLeeGetProcAddress("wglIsEnabledGenlockI3D"))!=0) nLinked++; + if ((pwglGenlockSourceI3D = (PFNWGLGENLOCKSOURCEI3DPROC) __GLeeGetProcAddress("wglGenlockSourceI3D"))!=0) nLinked++; + if ((pwglGetGenlockSourceI3D = (PFNWGLGETGENLOCKSOURCEI3DPROC) __GLeeGetProcAddress("wglGetGenlockSourceI3D"))!=0) nLinked++; + if ((pwglGenlockSourceEdgeI3D = (PFNWGLGENLOCKSOURCEEDGEI3DPROC) __GLeeGetProcAddress("wglGenlockSourceEdgeI3D"))!=0) nLinked++; + if ((pwglGetGenlockSourceEdgeI3D = (PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) __GLeeGetProcAddress("wglGetGenlockSourceEdgeI3D"))!=0) nLinked++; + if ((pwglGenlockSampleRateI3D = (PFNWGLGENLOCKSAMPLERATEI3DPROC) __GLeeGetProcAddress("wglGenlockSampleRateI3D"))!=0) nLinked++; + if ((pwglGetGenlockSampleRateI3D = (PFNWGLGETGENLOCKSAMPLERATEI3DPROC) __GLeeGetProcAddress("wglGetGenlockSampleRateI3D"))!=0) nLinked++; + if ((pwglGenlockSourceDelayI3D = (PFNWGLGENLOCKSOURCEDELAYI3DPROC) __GLeeGetProcAddress("wglGenlockSourceDelayI3D"))!=0) nLinked++; + if ((pwglGetGenlockSourceDelayI3D = (PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) __GLeeGetProcAddress("wglGetGenlockSourceDelayI3D"))!=0) nLinked++; + if ((pwglQueryGenlockMaxSourceDelayI3D = (PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) __GLeeGetProcAddress("wglQueryGenlockMaxSourceDelayI3D"))!=0) nLinked++; +#endif + if (nLinked==12) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_I3D_image_buffer(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_I3D_image_buffer + if ((pwglCreateImageBufferI3D = (PFNWGLCREATEIMAGEBUFFERI3DPROC) __GLeeGetProcAddress("wglCreateImageBufferI3D"))!=0) nLinked++; + if ((pwglDestroyImageBufferI3D = (PFNWGLDESTROYIMAGEBUFFERI3DPROC) __GLeeGetProcAddress("wglDestroyImageBufferI3D"))!=0) nLinked++; + if ((pwglAssociateImageBufferEventsI3D = (PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) __GLeeGetProcAddress("wglAssociateImageBufferEventsI3D"))!=0) nLinked++; + if ((pwglReleaseImageBufferEventsI3D = (PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) __GLeeGetProcAddress("wglReleaseImageBufferEventsI3D"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_I3D_swap_frame_lock(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_I3D_swap_frame_lock + if ((pwglEnableFrameLockI3D = (PFNWGLENABLEFRAMELOCKI3DPROC) __GLeeGetProcAddress("wglEnableFrameLockI3D"))!=0) nLinked++; + if ((pwglDisableFrameLockI3D = (PFNWGLDISABLEFRAMELOCKI3DPROC) __GLeeGetProcAddress("wglDisableFrameLockI3D"))!=0) nLinked++; + if ((pwglIsEnabledFrameLockI3D = (PFNWGLISENABLEDFRAMELOCKI3DPROC) __GLeeGetProcAddress("wglIsEnabledFrameLockI3D"))!=0) nLinked++; + if ((pwglQueryFrameLockMasterI3D = (PFNWGLQUERYFRAMELOCKMASTERI3DPROC) __GLeeGetProcAddress("wglQueryFrameLockMasterI3D"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_NV_render_depth_texture(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_WGL_NV_render_texture_rectangle(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_WGL_ATI_pixel_format_float(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_WGL_NV_float_buffer(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_WGL_EXT_display_color_table(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_EXT_display_color_table + if ((pwglCreateDisplayColorTableEXT = (PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) __GLeeGetProcAddress("wglCreateDisplayColorTableEXT"))!=0) nLinked++; + if ((pwglLoadDisplayColorTableEXT = (PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) __GLeeGetProcAddress("wglLoadDisplayColorTableEXT"))!=0) nLinked++; + if ((pwglBindDisplayColorTableEXT = (PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) __GLeeGetProcAddress("wglBindDisplayColorTableEXT"))!=0) nLinked++; + if ((pwglDestroyDisplayColorTableEXT = (PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) __GLeeGetProcAddress("wglDestroyDisplayColorTableEXT"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_EXT_extensions_string(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_EXT_extensions_string + if ((pwglGetExtensionsStringEXT = (PFNWGLGETEXTENSIONSSTRINGEXTPROC) __GLeeGetProcAddress("wglGetExtensionsStringEXT"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_EXT_swap_control(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_EXT_swap_control + if ((pwglSwapIntervalEXT = (PFNWGLSWAPINTERVALEXTPROC) __GLeeGetProcAddress("wglSwapIntervalEXT"))!=0) nLinked++; + if ((pwglGetSwapIntervalEXT = (PFNWGLGETSWAPINTERVALEXTPROC) __GLeeGetProcAddress("wglGetSwapIntervalEXT"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_NV_vertex_array_range(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_NV_vertex_array_range + if ((pwglAllocateMemoryNV = (PFNWGLALLOCATEMEMORYNVPROC) __GLeeGetProcAddress("wglAllocateMemoryNV"))!=0) nLinked++; + if ((pwglFreeMemoryNV = (PFNWGLFREEMEMORYNVPROC) __GLeeGetProcAddress("wglFreeMemoryNV"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_OML_sync_control(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_OML_sync_control + if ((pwglGetSyncValuesOML = (PFNWGLGETSYNCVALUESOMLPROC) __GLeeGetProcAddress("wglGetSyncValuesOML"))!=0) nLinked++; + if ((pwglGetMscRateOML = (PFNWGLGETMSCRATEOMLPROC) __GLeeGetProcAddress("wglGetMscRateOML"))!=0) nLinked++; + if ((pwglSwapBuffersMscOML = (PFNWGLSWAPBUFFERSMSCOMLPROC) __GLeeGetProcAddress("wglSwapBuffersMscOML"))!=0) nLinked++; + if ((pwglSwapLayerBuffersMscOML = (PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) __GLeeGetProcAddress("wglSwapLayerBuffersMscOML"))!=0) nLinked++; + if ((pwglWaitForMscOML = (PFNWGLWAITFORMSCOMLPROC) __GLeeGetProcAddress("wglWaitForMscOML"))!=0) nLinked++; + if ((pwglWaitForSbcOML = (PFNWGLWAITFORSBCOMLPROC) __GLeeGetProcAddress("wglWaitForSbcOML"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_I3D_swap_frame_usage(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_I3D_swap_frame_usage + if ((pwglGetFrameUsageI3D = (PFNWGLGETFRAMEUSAGEI3DPROC) __GLeeGetProcAddress("wglGetFrameUsageI3D"))!=0) nLinked++; + if ((pwglBeginFrameTrackingI3D = (PFNWGLBEGINFRAMETRACKINGI3DPROC) __GLeeGetProcAddress("wglBeginFrameTrackingI3D"))!=0) nLinked++; + if ((pwglEndFrameTrackingI3D = (PFNWGLENDFRAMETRACKINGI3DPROC) __GLeeGetProcAddress("wglEndFrameTrackingI3D"))!=0) nLinked++; + if ((pwglQueryFrameTrackingI3D = (PFNWGLQUERYFRAMETRACKINGI3DPROC) __GLeeGetProcAddress("wglQueryFrameTrackingI3D"))!=0) nLinked++; +#endif + if (nLinked==4) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_WGL_3DL_stereo_control(void) +{ + GLint nLinked=0; +#ifdef __GLEE_WGL_3DL_stereo_control + if ((pwglSetStereoEmitterState3DL = (PFNWGLSETSTEREOEMITTERSTATE3DLPROC) __GLeeGetProcAddress("wglSetStereoEmitterState3DL"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLEE_LINK_FUNCTION __GLeeWGLLoadFunction[30]; + +void initWGLLoadFunctions(void) +{ + __GLeeWGLLoadFunction[0]=__GLeeLink_WGL_ARB_buffer_region; + __GLeeWGLLoadFunction[1]=__GLeeLink_WGL_ARB_multisample; + __GLeeWGLLoadFunction[2]=__GLeeLink_WGL_ARB_extensions_string; + __GLeeWGLLoadFunction[3]=__GLeeLink_WGL_ARB_pixel_format; + __GLeeWGLLoadFunction[4]=__GLeeLink_WGL_ARB_make_current_read; + __GLeeWGLLoadFunction[5]=__GLeeLink_WGL_ARB_pbuffer; + __GLeeWGLLoadFunction[6]=__GLeeLink_WGL_ARB_render_texture; + __GLeeWGLLoadFunction[7]=__GLeeLink_WGL_ARB_pixel_format_float; + __GLeeWGLLoadFunction[8]=__GLeeLink_WGL_EXT_make_current_read; + __GLeeWGLLoadFunction[9]=__GLeeLink_WGL_EXT_pixel_format; + __GLeeWGLLoadFunction[10]=__GLeeLink_WGL_EXT_pbuffer; + __GLeeWGLLoadFunction[11]=__GLeeLink_WGL_EXT_depth_float; + __GLeeWGLLoadFunction[12]=__GLeeLink_WGL_3DFX_multisample; + __GLeeWGLLoadFunction[13]=__GLeeLink_WGL_EXT_multisample; + __GLeeWGLLoadFunction[14]=__GLeeLink_WGL_I3D_digital_video_control; + __GLeeWGLLoadFunction[15]=__GLeeLink_WGL_I3D_gamma; + __GLeeWGLLoadFunction[16]=__GLeeLink_WGL_I3D_genlock; + __GLeeWGLLoadFunction[17]=__GLeeLink_WGL_I3D_image_buffer; + __GLeeWGLLoadFunction[18]=__GLeeLink_WGL_I3D_swap_frame_lock; + __GLeeWGLLoadFunction[19]=__GLeeLink_WGL_NV_render_depth_texture; + __GLeeWGLLoadFunction[20]=__GLeeLink_WGL_NV_render_texture_rectangle; + __GLeeWGLLoadFunction[21]=__GLeeLink_WGL_ATI_pixel_format_float; + __GLeeWGLLoadFunction[22]=__GLeeLink_WGL_NV_float_buffer; + __GLeeWGLLoadFunction[23]=__GLeeLink_WGL_EXT_display_color_table; + __GLeeWGLLoadFunction[24]=__GLeeLink_WGL_EXT_extensions_string; + __GLeeWGLLoadFunction[25]=__GLeeLink_WGL_EXT_swap_control; + __GLeeWGLLoadFunction[26]=__GLeeLink_WGL_NV_vertex_array_range; + __GLeeWGLLoadFunction[27]=__GLeeLink_WGL_OML_sync_control; + __GLeeWGLLoadFunction[28]=__GLeeLink_WGL_I3D_swap_frame_usage; + __GLeeWGLLoadFunction[29]=__GLeeLink_WGL_3DL_stereo_control; +} + +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else /* Linux */ +GLuint __GLeeLink_GLX_VERSION_1_3(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_VERSION_1_3 + if ((pglXGetFBConfigs = (PFNGLXGETFBCONFIGSPROC) __GLeeGetProcAddress("glXGetFBConfigs"))!=0) nLinked++; + if ((pglXChooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) __GLeeGetProcAddress("glXChooseFBConfig"))!=0) nLinked++; + if ((pglXGetFBConfigAttrib = (PFNGLXGETFBCONFIGATTRIBPROC) __GLeeGetProcAddress("glXGetFBConfigAttrib"))!=0) nLinked++; + if ((pglXGetVisualFromFBConfig = (PFNGLXGETVISUALFROMFBCONFIGPROC) __GLeeGetProcAddress("glXGetVisualFromFBConfig"))!=0) nLinked++; + if ((pglXCreateWindow = (PFNGLXCREATEWINDOWPROC) __GLeeGetProcAddress("glXCreateWindow"))!=0) nLinked++; + if ((pglXDestroyWindow = (PFNGLXDESTROYWINDOWPROC) __GLeeGetProcAddress("glXDestroyWindow"))!=0) nLinked++; + if ((pglXCreatePixmap = (PFNGLXCREATEPIXMAPPROC) __GLeeGetProcAddress("glXCreatePixmap"))!=0) nLinked++; + if ((pglXDestroyPixmap = (PFNGLXDESTROYPIXMAPPROC) __GLeeGetProcAddress("glXDestroyPixmap"))!=0) nLinked++; + if ((pglXCreatePbuffer = (PFNGLXCREATEPBUFFERPROC) __GLeeGetProcAddress("glXCreatePbuffer"))!=0) nLinked++; + if ((pglXDestroyPbuffer = (PFNGLXDESTROYPBUFFERPROC) __GLeeGetProcAddress("glXDestroyPbuffer"))!=0) nLinked++; + if ((pglXQueryDrawable = (PFNGLXQUERYDRAWABLEPROC) __GLeeGetProcAddress("glXQueryDrawable"))!=0) nLinked++; + if ((pglXCreateNewContext = (PFNGLXCREATENEWCONTEXTPROC) __GLeeGetProcAddress("glXCreateNewContext"))!=0) nLinked++; + if ((pglXMakeContextCurrent = (PFNGLXMAKECONTEXTCURRENTPROC) __GLeeGetProcAddress("glXMakeContextCurrent"))!=0) nLinked++; + if ((pglXGetCurrentReadDrawable = (PFNGLXGETCURRENTREADDRAWABLEPROC) __GLeeGetProcAddress("glXGetCurrentReadDrawable"))!=0) nLinked++; + if ((pglXGetCurrentDisplay = (PFNGLXGETCURRENTDISPLAYPROC) __GLeeGetProcAddress("glXGetCurrentDisplay"))!=0) nLinked++; + if ((pglXQueryContext = (PFNGLXQUERYCONTEXTPROC) __GLeeGetProcAddress("glXQueryContext"))!=0) nLinked++; + if ((pglXSelectEvent = (PFNGLXSELECTEVENTPROC) __GLeeGetProcAddress("glXSelectEvent"))!=0) nLinked++; + if ((pglXGetSelectedEvent = (PFNGLXGETSELECTEDEVENTPROC) __GLeeGetProcAddress("glXGetSelectedEvent"))!=0) nLinked++; +#endif + if (nLinked==18) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_VERSION_1_4(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_VERSION_1_4 + if ((pglXGetProcAddress = (PFNGLXGETPROCADDRESSPROC) __GLeeGetProcAddress("glXGetProcAddress"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_ARB_multisample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_ARB_fbconfig_float(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_SGIS_multisample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_EXT_visual_info(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_SGI_swap_control(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGI_swap_control + if ((pglXSwapIntervalSGI = (PFNGLXSWAPINTERVALSGIPROC) __GLeeGetProcAddress("glXSwapIntervalSGI"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGI_video_sync(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGI_video_sync + if ((pglXGetVideoSyncSGI = (PFNGLXGETVIDEOSYNCSGIPROC) __GLeeGetProcAddress("glXGetVideoSyncSGI"))!=0) nLinked++; + if ((pglXWaitVideoSyncSGI = (PFNGLXWAITVIDEOSYNCSGIPROC) __GLeeGetProcAddress("glXWaitVideoSyncSGI"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGI_make_current_read(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGI_make_current_read + if ((pglXMakeCurrentReadSGI = (PFNGLXMAKECURRENTREADSGIPROC) __GLeeGetProcAddress("glXMakeCurrentReadSGI"))!=0) nLinked++; + if ((pglXGetCurrentReadDrawableSGI = (PFNGLXGETCURRENTREADDRAWABLESGIPROC) __GLeeGetProcAddress("glXGetCurrentReadDrawableSGI"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_EXT_visual_rating(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_EXT_import_context(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_EXT_import_context + if ((pglXGetCurrentDisplayEXT = (PFNGLXGETCURRENTDISPLAYEXTPROC) __GLeeGetProcAddress("glXGetCurrentDisplayEXT"))!=0) nLinked++; + if ((pglXQueryContextInfoEXT = (PFNGLXQUERYCONTEXTINFOEXTPROC) __GLeeGetProcAddress("glXQueryContextInfoEXT"))!=0) nLinked++; + if ((pglXGetContextIDEXT = (PFNGLXGETCONTEXTIDEXTPROC) __GLeeGetProcAddress("glXGetContextIDEXT"))!=0) nLinked++; + if ((pglXImportContextEXT = (PFNGLXIMPORTCONTEXTEXTPROC) __GLeeGetProcAddress("glXImportContextEXT"))!=0) nLinked++; + if ((pglXFreeContextEXT = (PFNGLXFREECONTEXTEXTPROC) __GLeeGetProcAddress("glXFreeContextEXT"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGIX_fbconfig(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGIX_fbconfig + if ((pglXGetFBConfigAttribSGIX = (PFNGLXGETFBCONFIGATTRIBSGIXPROC) __GLeeGetProcAddress("glXGetFBConfigAttribSGIX"))!=0) nLinked++; + if ((pglXChooseFBConfigSGIX = (PFNGLXCHOOSEFBCONFIGSGIXPROC) __GLeeGetProcAddress("glXChooseFBConfigSGIX"))!=0) nLinked++; + if ((pglXCreateGLXPixmapWithConfigSGIX = (PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) __GLeeGetProcAddress("glXCreateGLXPixmapWithConfigSGIX"))!=0) nLinked++; + if ((pglXCreateContextWithConfigSGIX = (PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) __GLeeGetProcAddress("glXCreateContextWithConfigSGIX"))!=0) nLinked++; + if ((pglXGetVisualFromFBConfigSGIX = (PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) __GLeeGetProcAddress("glXGetVisualFromFBConfigSGIX"))!=0) nLinked++; + if ((pglXGetFBConfigFromVisualSGIX = (PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) __GLeeGetProcAddress("glXGetFBConfigFromVisualSGIX"))!=0) nLinked++; +#endif + if (nLinked==6) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGIX_pbuffer(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGIX_pbuffer + if ((pglXCreateGLXPbufferSGIX = (PFNGLXCREATEGLXPBUFFERSGIXPROC) __GLeeGetProcAddress("glXCreateGLXPbufferSGIX"))!=0) nLinked++; + if ((pglXDestroyGLXPbufferSGIX = (PFNGLXDESTROYGLXPBUFFERSGIXPROC) __GLeeGetProcAddress("glXDestroyGLXPbufferSGIX"))!=0) nLinked++; + if ((pglXQueryGLXPbufferSGIX = (PFNGLXQUERYGLXPBUFFERSGIXPROC) __GLeeGetProcAddress("glXQueryGLXPbufferSGIX"))!=0) nLinked++; + if ((pglXSelectEventSGIX = (PFNGLXSELECTEVENTSGIXPROC) __GLeeGetProcAddress("glXSelectEventSGIX"))!=0) nLinked++; + if ((pglXGetSelectedEventSGIX = (PFNGLXGETSELECTEDEVENTSGIXPROC) __GLeeGetProcAddress("glXGetSelectedEventSGIX"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGI_cushion(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGI_cushion + if ((pglXCushionSGI = (PFNGLXCUSHIONSGIPROC) __GLeeGetProcAddress("glXCushionSGI"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGIX_video_resize(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGIX_video_resize + if ((pglXBindChannelToWindowSGIX = (PFNGLXBINDCHANNELTOWINDOWSGIXPROC) __GLeeGetProcAddress("glXBindChannelToWindowSGIX"))!=0) nLinked++; + if ((pglXChannelRectSGIX = (PFNGLXCHANNELRECTSGIXPROC) __GLeeGetProcAddress("glXChannelRectSGIX"))!=0) nLinked++; + if ((pglXQueryChannelRectSGIX = (PFNGLXQUERYCHANNELRECTSGIXPROC) __GLeeGetProcAddress("glXQueryChannelRectSGIX"))!=0) nLinked++; + if ((pglXQueryChannelDeltasSGIX = (PFNGLXQUERYCHANNELDELTASSGIXPROC) __GLeeGetProcAddress("glXQueryChannelDeltasSGIX"))!=0) nLinked++; + if ((pglXChannelRectSyncSGIX = (PFNGLXCHANNELRECTSYNCSGIXPROC) __GLeeGetProcAddress("glXChannelRectSyncSGIX"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGIX_swap_group(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGIX_swap_group + if ((pglXJoinSwapGroupSGIX = (PFNGLXJOINSWAPGROUPSGIXPROC) __GLeeGetProcAddress("glXJoinSwapGroupSGIX"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGIX_swap_barrier(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGIX_swap_barrier + if ((pglXBindSwapBarrierSGIX = (PFNGLXBINDSWAPBARRIERSGIXPROC) __GLeeGetProcAddress("glXBindSwapBarrierSGIX"))!=0) nLinked++; + if ((pglXQueryMaxSwapBarriersSGIX = (PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) __GLeeGetProcAddress("glXQueryMaxSwapBarriersSGIX"))!=0) nLinked++; +#endif + if (nLinked==2) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGIS_blended_overlay(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_SGIS_shared_multisample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_SUN_get_transparent_index(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SUN_get_transparent_index + if ((pglXGetTransparentIndexSUN = (PFNGLXGETTRANSPARENTINDEXSUNPROC) __GLeeGetProcAddress("glXGetTransparentIndexSUN"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_3DFX_multisample(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_MESA_copy_sub_buffer(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_MESA_copy_sub_buffer + if ((pglXCopySubBufferMESA = (PFNGLXCOPYSUBBUFFERMESAPROC) __GLeeGetProcAddress("glXCopySubBufferMESA"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_MESA_pixmap_colormap(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_MESA_pixmap_colormap + if ((pglXCreateGLXPixmapMESA = (PFNGLXCREATEGLXPIXMAPMESAPROC) __GLeeGetProcAddress("glXCreateGLXPixmapMESA"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_MESA_release_buffers(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_MESA_release_buffers + if ((pglXReleaseBuffersMESA = (PFNGLXRELEASEBUFFERSMESAPROC) __GLeeGetProcAddress("glXReleaseBuffersMESA"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_MESA_set_3dfx_mode(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_MESA_set_3dfx_mode + if ((pglXSet3DfxModeMESA = (PFNGLXSET3DFXMODEMESAPROC) __GLeeGetProcAddress("glXSet3DfxModeMESA"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_SGIX_visual_select_group(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_OML_swap_method(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_OML_sync_control(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_OML_sync_control + if ((pglXGetSyncValuesOML = (PFNGLXGETSYNCVALUESOMLPROC) __GLeeGetProcAddress("glXGetSyncValuesOML"))!=0) nLinked++; + if ((pglXGetMscRateOML = (PFNGLXGETMSCRATEOMLPROC) __GLeeGetProcAddress("glXGetMscRateOML"))!=0) nLinked++; + if ((pglXSwapBuffersMscOML = (PFNGLXSWAPBUFFERSMSCOMLPROC) __GLeeGetProcAddress("glXSwapBuffersMscOML"))!=0) nLinked++; + if ((pglXWaitForMscOML = (PFNGLXWAITFORMSCOMLPROC) __GLeeGetProcAddress("glXWaitForMscOML"))!=0) nLinked++; + if ((pglXWaitForSbcOML = (PFNGLXWAITFORSBCOMLPROC) __GLeeGetProcAddress("glXWaitForSbcOML"))!=0) nLinked++; +#endif + if (nLinked==5) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_NV_float_buffer(void) {return GLEE_LINK_COMPLETE;} + +GLuint __GLeeLink_GLX_SGIX_hyperpipe(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_SGIX_hyperpipe + if ((pglXQueryHyperpipeNetworkSGIX = (PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) __GLeeGetProcAddress("glXQueryHyperpipeNetworkSGIX"))!=0) nLinked++; + if ((pglXHyperpipeConfigSGIX = (PFNGLXHYPERPIPECONFIGSGIXPROC) __GLeeGetProcAddress("glXHyperpipeConfigSGIX"))!=0) nLinked++; + if ((pglXQueryHyperpipeConfigSGIX = (PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) __GLeeGetProcAddress("glXQueryHyperpipeConfigSGIX"))!=0) nLinked++; + if ((pglXDestroyHyperpipeConfigSGIX = (PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) __GLeeGetProcAddress("glXDestroyHyperpipeConfigSGIX"))!=0) nLinked++; + if ((pglXBindHyperpipeSGIX = (PFNGLXBINDHYPERPIPESGIXPROC) __GLeeGetProcAddress("glXBindHyperpipeSGIX"))!=0) nLinked++; + if ((pglXQueryHyperpipeBestAttribSGIX = (PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) __GLeeGetProcAddress("glXQueryHyperpipeBestAttribSGIX"))!=0) nLinked++; + if ((pglXHyperpipeAttribSGIX = (PFNGLXHYPERPIPEATTRIBSGIXPROC) __GLeeGetProcAddress("glXHyperpipeAttribSGIX"))!=0) nLinked++; + if ((pglXQueryHyperpipeAttribSGIX = (PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) __GLeeGetProcAddress("glXQueryHyperpipeAttribSGIX"))!=0) nLinked++; +#endif + if (nLinked==8) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_MESA_agp_offset(void) +{ + GLint nLinked=0; +#ifdef __GLEE_GLX_MESA_agp_offset + if ((pglXGetAGPOffsetMESA = (PFNGLXGETAGPOFFSETMESAPROC) __GLeeGetProcAddress("glXGetAGPOffsetMESA"))!=0) nLinked++; +#endif + if (nLinked==1) return GLEE_LINK_COMPLETE; + if (nLinked==0) return GLEE_LINK_FAIL; + return GLEE_LINK_PARTIAL; +} + +GLuint __GLeeLink_GLX_EXT_scene_marker(void) {return GLEE_LINK_COMPLETE;} + +GLEE_LINK_FUNCTION __GLeeGLXLoadFunction[32]; + +void initGLXLoadFunctions(void) +{ + __GLeeGLXLoadFunction[0]=__GLeeLink_GLX_VERSION_1_3; + __GLeeGLXLoadFunction[1]=__GLeeLink_GLX_VERSION_1_4; + __GLeeGLXLoadFunction[2]=__GLeeLink_GLX_ARB_multisample; + __GLeeGLXLoadFunction[3]=__GLeeLink_GLX_ARB_fbconfig_float; + __GLeeGLXLoadFunction[4]=__GLeeLink_GLX_SGIS_multisample; + __GLeeGLXLoadFunction[5]=__GLeeLink_GLX_EXT_visual_info; + __GLeeGLXLoadFunction[6]=__GLeeLink_GLX_SGI_swap_control; + __GLeeGLXLoadFunction[7]=__GLeeLink_GLX_SGI_video_sync; + __GLeeGLXLoadFunction[8]=__GLeeLink_GLX_SGI_make_current_read; + __GLeeGLXLoadFunction[9]=__GLeeLink_GLX_EXT_visual_rating; + __GLeeGLXLoadFunction[10]=__GLeeLink_GLX_EXT_import_context; + __GLeeGLXLoadFunction[11]=__GLeeLink_GLX_SGIX_fbconfig; + __GLeeGLXLoadFunction[12]=__GLeeLink_GLX_SGIX_pbuffer; + __GLeeGLXLoadFunction[13]=__GLeeLink_GLX_SGI_cushion; + __GLeeGLXLoadFunction[14]=__GLeeLink_GLX_SGIX_video_resize; + __GLeeGLXLoadFunction[15]=__GLeeLink_GLX_SGIX_swap_group; + __GLeeGLXLoadFunction[16]=__GLeeLink_GLX_SGIX_swap_barrier; + __GLeeGLXLoadFunction[17]=__GLeeLink_GLX_SGIS_blended_overlay; + __GLeeGLXLoadFunction[18]=__GLeeLink_GLX_SGIS_shared_multisample; + __GLeeGLXLoadFunction[19]=__GLeeLink_GLX_SUN_get_transparent_index; + __GLeeGLXLoadFunction[20]=__GLeeLink_GLX_3DFX_multisample; + __GLeeGLXLoadFunction[21]=__GLeeLink_GLX_MESA_copy_sub_buffer; + __GLeeGLXLoadFunction[22]=__GLeeLink_GLX_MESA_pixmap_colormap; + __GLeeGLXLoadFunction[23]=__GLeeLink_GLX_MESA_release_buffers; + __GLeeGLXLoadFunction[24]=__GLeeLink_GLX_MESA_set_3dfx_mode; + __GLeeGLXLoadFunction[25]=__GLeeLink_GLX_SGIX_visual_select_group; + __GLeeGLXLoadFunction[26]=__GLeeLink_GLX_OML_swap_method; + __GLeeGLXLoadFunction[27]=__GLeeLink_GLX_OML_sync_control; + __GLeeGLXLoadFunction[28]=__GLeeLink_GLX_NV_float_buffer; + __GLeeGLXLoadFunction[29]=__GLeeLink_GLX_SGIX_hyperpipe; + __GLeeGLXLoadFunction[30]=__GLeeLink_GLX_MESA_agp_offset; + __GLeeGLXLoadFunction[31]=__GLeeLink_GLX_EXT_scene_marker; +} + +#endif /* end Linux */ + + +/***************************************************************** + * GLee internal types + *****************************************************************/ +typedef struct +{ + char ** names; + int * lengths; + int numNames; +}ExtensionList; + + +/***************************************************************** + * GLee internal variables + *****************************************************************/ +char GLeeErrorString[256]=""; + + +/***************************************************************** + * GLee internal functions + *****************************************************************/ + +void __GLeeExtList_init(ExtensionList *extList) +{ + extList->names=0; + extList->lengths=0; + extList->numNames=0; +} + +void __GLeeExtList_clean(ExtensionList *extList) +{ + int a; + for (a=0;anumNames;a++) + { + if (extList->names[a]!=0) free((void *)extList->names[a]); + } + if (extList->names!=0) free((void *)extList->names); + if (extList->lengths!=0) free((void *)extList->lengths); + extList->names=0; + extList->lengths=0; + extList->numNames=0; +} + +void __GLeeExtList_add(ExtensionList *extList, const char * extName) +{ + size_t length=strlen(extName)+1; + size_t i=(size_t)extList->numNames; + size_t n=i+1; + if (i==0) + { + extList->lengths=(int *)malloc(sizeof(int)); + extList->names=(char **)malloc(sizeof(char *)); + }else + { + extList->lengths=(int *)realloc((void *)extList->lengths, n*sizeof(int)); + extList->names=(char **)realloc((void *)extList->names, n*sizeof(char *)); + } + extList->names[i]=(char *)malloc(length*sizeof(char)); + strcpy(extList->names[i],extName); + extList->lengths[i]=(int)length; + extList->numNames++; +} + +const char *__GLeeGetExtStrPlat() +{ +#ifdef WIN32 + if (!_GLEE_WGL_ARB_extensions_string) + pwglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB"); + + if (pwglGetExtensionsStringARB) + return (const char *)pwglGetExtensionsStringARB(wglGetCurrentDC()); +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else + Display *dpy=glXGetCurrentDisplay(); + if(dpy) + { + int dpynr=DefaultScreen(dpy); + return (const char*)glXQueryExtensionsString(dpy,dpynr); + } +#endif + return 0; +} + +void __GLeeWriteError(const char * errorStr) +{ + int a=0; + for (a=0;a<256;a++) + { + GLeeErrorString[a]=errorStr[a]; + } + GLeeErrorString[255]='\0'; +} + +int __GLeeGetVersionNumber(char *versionStr) +{ + int major=(int)versionStr[0]-(int)'0'; + int minor=(int)versionStr[2]-(int)'0'; + return major<<8 | minor; +} + +GLboolean __GLeeGetExtensions(ExtensionList* extList) +{ + const char * platExtStr; + const char * glExtStr; + char * extStr; + char emptyString[1]=""; + char extensionName[1024]; + int a,b; + int numExtensions; + int eNum; + + /* read the platform specific extension string */ + platExtStr=__GLeeGetExtStrPlat(); + if (!platExtStr) platExtStr=emptyString; + + glExtStr=(const char *)glGetString(GL_EXTENSIONS); + if (glExtStr==0) + { + __GLeeWriteError("glGetString(GL_EXTENSIONS) failed."); + return GL_FALSE; + } + + /* allocate the extension string */ + extStr=(char *)malloc( (strlen(platExtStr)+strlen(glExtStr)+1) * sizeof(char) ); + + /* concatenate the two extension strings */ + sprintf(extStr,"%s%s",platExtStr,glExtStr); + + /* count the extensions */ + numExtensions=0; + for (a=0;extStr[a]!='\0';++a) + { + if (extStr[a]==' ') ++numExtensions; + } + + /* extract the extensions */ + eNum=0; + a=0; + while (extStr[a]!='\0') + { + b=0; + while (extStr[a]!=' ' && extStr[a]!='\0' && b<1022) + { + extensionName[b]=extStr[a]; + b++; a++; + } + if (b==1023) + { + __GLeeWriteError("Extension name exceeds 1023 characters."); + free((void *)extStr); + return GL_FALSE; + } + + extensionName[b]='\0'; + + /* add the extension */ + __GLeeExtList_add(extList,extensionName); + + eNum++; a++; + } + free((void *)extStr); + return GL_TRUE; +} + +GLboolean __GLeeCheckExtension(const char * name, ExtensionList *extensionNames) +{ + int n=extensionNames->numNames; + int a; + for (a=0;anames[a],name)==0) + return GL_TRUE; + } + return GL_FALSE; +} + +GLEE_EXTERN GLint __GLeeGetExtensionNumber(const char *extensionName, int type) +{ + int a; + switch (type) + { + case 0: + for (a=0;a<__GLeeGLNumExtensions;a++) + if (strcmp(extensionName,__GLeeGLExtensionNames[a])==0) return a; + return -1; +#ifdef WIN32 + case 1: + for (a=0;a<__GLeeWGLNumExtensions;a++) + if (strcmp(extensionName,__GLeeWGLExtensionNames[a])==0) return a; + return -1; +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else + case 2: + for (a=0;a<__GLeeGLXNumExtensions;a++) + if (strcmp(extensionName,__GLeeGLXExtensionNames[a])==0) return a; + return -1; +#endif + } + return -1; +} + +/***************************************************************** + * GLee external functions + *****************************************************************/ + +#ifdef WIN32 +GLEE_EXTERN const char * GLeeGetExtStrWGL() +{ + return __GLeeGetExtStrPlat(); +} +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else +GLEE_EXTERN const char * GLeeGetExtStrGLX() +{ + return __GLeeGetExtStrPlat(); +} +#endif + +GLEE_EXTERN const char * GLeeGetExtStrGL() +{ + return (const char *)glGetString(GL_EXTENSIONS); +} + +GLEE_EXTERN const char * GLeeGetErrorString() +{ + return GLeeErrorString; +} + +GLboolean __GLeeInitedLoadFunctions=GL_FALSE; + +GLEE_EXTERN GLint GLeeForceLink(const char * extensionName) +{ + int type=0; + int extNum; + size_t len=strlen(extensionName); + if (len<5) return GLEE_LINK_FAIL; + if (!__GLeeInitedLoadFunctions) + { + if (!__GLeeInited) GLeeInit(); + initGLLoadFunctions(); +#ifdef WIN32 + initWGLLoadFunctions(); +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else + initGLXLoadFunctions(); +#endif + __GLeeInitedLoadFunctions=GL_TRUE; + } + if (extensionName[0]=='W') type=1; + else if (extensionName[2]=='X') type=2; + extNum=__GLeeGetExtensionNumber(extensionName,type); + if (extNum==-1) return GLEE_LINK_FAIL; + if (type==0) return (GLint)__GLeeGLLoadFunction[extNum](); +#ifdef WIN32 + if (type==1) return __GLeeWGLLoadFunction[extNum](); +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else + if (type==2) return __GLeeGLXLoadFunction[extNum](); +#endif + return GLEE_LINK_FAIL; +} + +GLEE_EXTERN GLboolean GLeeEnabled(GLboolean * extensionQueryingVariable) +{ + if (!__GLeeInited) GLeeInit(); + return *extensionQueryingVariable; +} + +GLEE_EXTERN GLboolean GLeeInit() +{ + int version; + ExtensionList extensionNames; + + if (__GLeeInited) + { + return GL_FALSE; + } + + __GLeeExtList_init(&extensionNames); + if (!__GLeeGetExtensions(&extensionNames)) + { + __GLeeWriteError("GL extension querying failed."); + __GLeeExtList_clean(&extensionNames); + return GL_FALSE; + } + + version=__GLeeGetVersionNumber((char *)glGetString(GL_VERSION)); + + __GLeeInited = GL_TRUE; + + +/***************************************************************** + * Autogenerated linking functions + *****************************************************************/ + if (version>=258) + { + _GLEE_VERSION_1_2 = GL_TRUE; + __GLeeLink_GL_VERSION_1_2(); + } + if (__GLeeCheckExtension("GL_ARB_imaging", &extensionNames) ) + { + _GLEE_ARB_imaging = GL_TRUE; + __GLeeLink_GL_ARB_imaging(); + } + if (version>=259) + { + _GLEE_VERSION_1_3 = GL_TRUE; + __GLeeLink_GL_VERSION_1_3(); + } + if (version>=260) + { + _GLEE_VERSION_1_4 = GL_TRUE; + __GLeeLink_GL_VERSION_1_4(); + } + if (version>=261) + { + _GLEE_VERSION_1_5 = GL_TRUE; + __GLeeLink_GL_VERSION_1_5(); + } + if (version>=512) + { + _GLEE_VERSION_2_0 = GL_TRUE; + __GLeeLink_GL_VERSION_2_0(); + } + if (version>=513) + { + _GLEE_VERSION_2_1 = GL_TRUE; + __GLeeLink_GL_VERSION_2_1(); + } + if (__GLeeCheckExtension("GL_ARB_multitexture", &extensionNames) ) + { + _GLEE_ARB_multitexture = GL_TRUE; + __GLeeLink_GL_ARB_multitexture(); + } + if (__GLeeCheckExtension("GL_ARB_transpose_matrix", &extensionNames) ) + { + _GLEE_ARB_transpose_matrix = GL_TRUE; + __GLeeLink_GL_ARB_transpose_matrix(); + } + if (__GLeeCheckExtension("GL_ARB_multisample", &extensionNames) ) + { + _GLEE_ARB_multisample = GL_TRUE; + __GLeeLink_GL_ARB_multisample(); + } + if (__GLeeCheckExtension("GL_ARB_texture_env_add", &extensionNames) ) + { + _GLEE_ARB_texture_env_add = GL_TRUE; + __GLeeLink_GL_ARB_texture_env_add(); + } + if (__GLeeCheckExtension("GL_ARB_texture_cube_map", &extensionNames) ) + { + _GLEE_ARB_texture_cube_map = GL_TRUE; + __GLeeLink_GL_ARB_texture_cube_map(); + } + if (__GLeeCheckExtension("GL_ARB_texture_compression", &extensionNames) ) + { + _GLEE_ARB_texture_compression = GL_TRUE; + __GLeeLink_GL_ARB_texture_compression(); + } + if (__GLeeCheckExtension("GL_ARB_texture_border_clamp", &extensionNames) ) + { + _GLEE_ARB_texture_border_clamp = GL_TRUE; + __GLeeLink_GL_ARB_texture_border_clamp(); + } + if (__GLeeCheckExtension("GL_ARB_point_parameters", &extensionNames) ) + { + _GLEE_ARB_point_parameters = GL_TRUE; + __GLeeLink_GL_ARB_point_parameters(); + } + if (__GLeeCheckExtension("GL_ARB_vertex_blend", &extensionNames) ) + { + _GLEE_ARB_vertex_blend = GL_TRUE; + __GLeeLink_GL_ARB_vertex_blend(); + } + if (__GLeeCheckExtension("GL_ARB_matrix_palette", &extensionNames) ) + { + _GLEE_ARB_matrix_palette = GL_TRUE; + __GLeeLink_GL_ARB_matrix_palette(); + } + if (__GLeeCheckExtension("GL_ARB_texture_env_combine", &extensionNames) ) + { + _GLEE_ARB_texture_env_combine = GL_TRUE; + __GLeeLink_GL_ARB_texture_env_combine(); + } + if (__GLeeCheckExtension("GL_ARB_texture_env_crossbar", &extensionNames) ) + { + _GLEE_ARB_texture_env_crossbar = GL_TRUE; + __GLeeLink_GL_ARB_texture_env_crossbar(); + } + if (__GLeeCheckExtension("GL_ARB_texture_env_dot3", &extensionNames) ) + { + _GLEE_ARB_texture_env_dot3 = GL_TRUE; + __GLeeLink_GL_ARB_texture_env_dot3(); + } + if (__GLeeCheckExtension("GL_ARB_texture_mirrored_repeat", &extensionNames) ) + { + _GLEE_ARB_texture_mirrored_repeat = GL_TRUE; + __GLeeLink_GL_ARB_texture_mirrored_repeat(); + } + if (__GLeeCheckExtension("GL_ARB_depth_texture", &extensionNames) ) + { + _GLEE_ARB_depth_texture = GL_TRUE; + __GLeeLink_GL_ARB_depth_texture(); + } + if (__GLeeCheckExtension("GL_ARB_shadow", &extensionNames) ) + { + _GLEE_ARB_shadow = GL_TRUE; + __GLeeLink_GL_ARB_shadow(); + } + if (__GLeeCheckExtension("GL_ARB_shadow_ambient", &extensionNames) ) + { + _GLEE_ARB_shadow_ambient = GL_TRUE; + __GLeeLink_GL_ARB_shadow_ambient(); + } + if (__GLeeCheckExtension("GL_ARB_window_pos", &extensionNames) ) + { + _GLEE_ARB_window_pos = GL_TRUE; + __GLeeLink_GL_ARB_window_pos(); + } + if (__GLeeCheckExtension("GL_ARB_vertex_program", &extensionNames) ) + { + _GLEE_ARB_vertex_program = GL_TRUE; + __GLeeLink_GL_ARB_vertex_program(); + } + if (__GLeeCheckExtension("GL_ARB_fragment_program", &extensionNames) ) + { + _GLEE_ARB_fragment_program = GL_TRUE; + __GLeeLink_GL_ARB_fragment_program(); + } + if (__GLeeCheckExtension("GL_ARB_vertex_buffer_object", &extensionNames) ) + { + _GLEE_ARB_vertex_buffer_object = GL_TRUE; + __GLeeLink_GL_ARB_vertex_buffer_object(); + } + if (__GLeeCheckExtension("GL_ARB_occlusion_query", &extensionNames) ) + { + _GLEE_ARB_occlusion_query = GL_TRUE; + __GLeeLink_GL_ARB_occlusion_query(); + } + if (__GLeeCheckExtension("GL_ARB_shader_objects", &extensionNames) ) + { + _GLEE_ARB_shader_objects = GL_TRUE; + __GLeeLink_GL_ARB_shader_objects(); + } + if (__GLeeCheckExtension("GL_ARB_vertex_shader", &extensionNames) ) + { + _GLEE_ARB_vertex_shader = GL_TRUE; + __GLeeLink_GL_ARB_vertex_shader(); + } + if (__GLeeCheckExtension("GL_ARB_fragment_shader", &extensionNames) ) + { + _GLEE_ARB_fragment_shader = GL_TRUE; + __GLeeLink_GL_ARB_fragment_shader(); + } + if (__GLeeCheckExtension("GL_ARB_shading_language_100", &extensionNames) ) + { + _GLEE_ARB_shading_language_100 = GL_TRUE; + __GLeeLink_GL_ARB_shading_language_100(); + } + if (__GLeeCheckExtension("GL_ARB_texture_non_power_of_two", &extensionNames) ) + { + _GLEE_ARB_texture_non_power_of_two = GL_TRUE; + __GLeeLink_GL_ARB_texture_non_power_of_two(); + } + if (__GLeeCheckExtension("GL_ARB_point_sprite", &extensionNames) ) + { + _GLEE_ARB_point_sprite = GL_TRUE; + __GLeeLink_GL_ARB_point_sprite(); + } + if (__GLeeCheckExtension("GL_ARB_fragment_program_shadow", &extensionNames) ) + { + _GLEE_ARB_fragment_program_shadow = GL_TRUE; + __GLeeLink_GL_ARB_fragment_program_shadow(); + } + if (__GLeeCheckExtension("GL_ARB_draw_buffers", &extensionNames) ) + { + _GLEE_ARB_draw_buffers = GL_TRUE; + __GLeeLink_GL_ARB_draw_buffers(); + } + if (__GLeeCheckExtension("GL_ARB_texture_rectangle", &extensionNames) ) + { + _GLEE_ARB_texture_rectangle = GL_TRUE; + __GLeeLink_GL_ARB_texture_rectangle(); + } + if (__GLeeCheckExtension("GL_ARB_color_buffer_float", &extensionNames) ) + { + _GLEE_ARB_color_buffer_float = GL_TRUE; + __GLeeLink_GL_ARB_color_buffer_float(); + } + if (__GLeeCheckExtension("GL_ARB_half_float_pixel", &extensionNames) ) + { + _GLEE_ARB_half_float_pixel = GL_TRUE; + __GLeeLink_GL_ARB_half_float_pixel(); + } + if (__GLeeCheckExtension("GL_ARB_texture_float", &extensionNames) ) + { + _GLEE_ARB_texture_float = GL_TRUE; + __GLeeLink_GL_ARB_texture_float(); + } + if (__GLeeCheckExtension("GL_ARB_pixel_buffer_object", &extensionNames) ) + { + _GLEE_ARB_pixel_buffer_object = GL_TRUE; + __GLeeLink_GL_ARB_pixel_buffer_object(); + } + if (__GLeeCheckExtension("GL_EXT_abgr", &extensionNames) ) + { + _GLEE_EXT_abgr = GL_TRUE; + __GLeeLink_GL_EXT_abgr(); + } + if (__GLeeCheckExtension("GL_EXT_blend_color", &extensionNames) ) + { + _GLEE_EXT_blend_color = GL_TRUE; + __GLeeLink_GL_EXT_blend_color(); + } + if (__GLeeCheckExtension("GL_EXT_polygon_offset", &extensionNames) ) + { + _GLEE_EXT_polygon_offset = GL_TRUE; + __GLeeLink_GL_EXT_polygon_offset(); + } + if (__GLeeCheckExtension("GL_EXT_texture", &extensionNames) ) + { + _GLEE_EXT_texture = GL_TRUE; + __GLeeLink_GL_EXT_texture(); + } + if (__GLeeCheckExtension("GL_EXT_texture3D", &extensionNames) ) + { + _GLEE_EXT_texture3D = GL_TRUE; + __GLeeLink_GL_EXT_texture3D(); + } + if (__GLeeCheckExtension("GL_SGIS_texture_filter4", &extensionNames) ) + { + _GLEE_SGIS_texture_filter4 = GL_TRUE; + __GLeeLink_GL_SGIS_texture_filter4(); + } + if (__GLeeCheckExtension("GL_EXT_subtexture", &extensionNames) ) + { + _GLEE_EXT_subtexture = GL_TRUE; + __GLeeLink_GL_EXT_subtexture(); + } + if (__GLeeCheckExtension("GL_EXT_copy_texture", &extensionNames) ) + { + _GLEE_EXT_copy_texture = GL_TRUE; + __GLeeLink_GL_EXT_copy_texture(); + } + if (__GLeeCheckExtension("GL_EXT_histogram", &extensionNames) ) + { + _GLEE_EXT_histogram = GL_TRUE; + __GLeeLink_GL_EXT_histogram(); + } + if (__GLeeCheckExtension("GL_EXT_convolution", &extensionNames) ) + { + _GLEE_EXT_convolution = GL_TRUE; + __GLeeLink_GL_EXT_convolution(); + } + if (__GLeeCheckExtension("GL_SGI_color_matrix", &extensionNames) ) + { + _GLEE_SGI_color_matrix = GL_TRUE; + __GLeeLink_GL_SGI_color_matrix(); + } + if (__GLeeCheckExtension("GL_SGI_color_table", &extensionNames) ) + { + _GLEE_SGI_color_table = GL_TRUE; + __GLeeLink_GL_SGI_color_table(); + } + if (__GLeeCheckExtension("GL_SGIS_pixel_texture", &extensionNames) ) + { + _GLEE_SGIS_pixel_texture = GL_TRUE; + __GLeeLink_GL_SGIS_pixel_texture(); + } + if (__GLeeCheckExtension("GL_SGIX_pixel_texture", &extensionNames) ) + { + _GLEE_SGIX_pixel_texture = GL_TRUE; + __GLeeLink_GL_SGIX_pixel_texture(); + } + if (__GLeeCheckExtension("GL_SGIS_texture4D", &extensionNames) ) + { + _GLEE_SGIS_texture4D = GL_TRUE; + __GLeeLink_GL_SGIS_texture4D(); + } + if (__GLeeCheckExtension("GL_SGI_texture_color_table", &extensionNames) ) + { + _GLEE_SGI_texture_color_table = GL_TRUE; + __GLeeLink_GL_SGI_texture_color_table(); + } + if (__GLeeCheckExtension("GL_EXT_cmyka", &extensionNames) ) + { + _GLEE_EXT_cmyka = GL_TRUE; + __GLeeLink_GL_EXT_cmyka(); + } + if (__GLeeCheckExtension("GL_EXT_texture_object", &extensionNames) ) + { + _GLEE_EXT_texture_object = GL_TRUE; + __GLeeLink_GL_EXT_texture_object(); + } + if (__GLeeCheckExtension("GL_SGIS_detail_texture", &extensionNames) ) + { + _GLEE_SGIS_detail_texture = GL_TRUE; + __GLeeLink_GL_SGIS_detail_texture(); + } + if (__GLeeCheckExtension("GL_SGIS_sharpen_texture", &extensionNames) ) + { + _GLEE_SGIS_sharpen_texture = GL_TRUE; + __GLeeLink_GL_SGIS_sharpen_texture(); + } + if (__GLeeCheckExtension("GL_EXT_packed_pixels", &extensionNames) ) + { + _GLEE_EXT_packed_pixels = GL_TRUE; + __GLeeLink_GL_EXT_packed_pixels(); + } + if (__GLeeCheckExtension("GL_SGIS_texture_lod", &extensionNames) ) + { + _GLEE_SGIS_texture_lod = GL_TRUE; + __GLeeLink_GL_SGIS_texture_lod(); + } + if (__GLeeCheckExtension("GL_SGIS_multisample", &extensionNames) ) + { + _GLEE_SGIS_multisample = GL_TRUE; + __GLeeLink_GL_SGIS_multisample(); + } + if (__GLeeCheckExtension("GL_EXT_rescale_normal", &extensionNames) ) + { + _GLEE_EXT_rescale_normal = GL_TRUE; + __GLeeLink_GL_EXT_rescale_normal(); + } + if (__GLeeCheckExtension("GL_EXT_vertex_array", &extensionNames) ) + { + _GLEE_EXT_vertex_array = GL_TRUE; + __GLeeLink_GL_EXT_vertex_array(); + } + if (__GLeeCheckExtension("GL_EXT_misc_attribute", &extensionNames) ) + { + _GLEE_EXT_misc_attribute = GL_TRUE; + __GLeeLink_GL_EXT_misc_attribute(); + } + if (__GLeeCheckExtension("GL_SGIS_generate_mipmap", &extensionNames) ) + { + _GLEE_SGIS_generate_mipmap = GL_TRUE; + __GLeeLink_GL_SGIS_generate_mipmap(); + } + if (__GLeeCheckExtension("GL_SGIX_clipmap", &extensionNames) ) + { + _GLEE_SGIX_clipmap = GL_TRUE; + __GLeeLink_GL_SGIX_clipmap(); + } + if (__GLeeCheckExtension("GL_SGIX_shadow", &extensionNames) ) + { + _GLEE_SGIX_shadow = GL_TRUE; + __GLeeLink_GL_SGIX_shadow(); + } + if (__GLeeCheckExtension("GL_SGIS_texture_edge_clamp", &extensionNames) ) + { + _GLEE_SGIS_texture_edge_clamp = GL_TRUE; + __GLeeLink_GL_SGIS_texture_edge_clamp(); + } + if (__GLeeCheckExtension("GL_SGIS_texture_border_clamp", &extensionNames) ) + { + _GLEE_SGIS_texture_border_clamp = GL_TRUE; + __GLeeLink_GL_SGIS_texture_border_clamp(); + } + if (__GLeeCheckExtension("GL_EXT_blend_minmax", &extensionNames) ) + { + _GLEE_EXT_blend_minmax = GL_TRUE; + __GLeeLink_GL_EXT_blend_minmax(); + } + if (__GLeeCheckExtension("GL_EXT_blend_subtract", &extensionNames) ) + { + _GLEE_EXT_blend_subtract = GL_TRUE; + __GLeeLink_GL_EXT_blend_subtract(); + } + if (__GLeeCheckExtension("GL_EXT_blend_logic_op", &extensionNames) ) + { + _GLEE_EXT_blend_logic_op = GL_TRUE; + __GLeeLink_GL_EXT_blend_logic_op(); + } + if (__GLeeCheckExtension("GL_SGIX_interlace", &extensionNames) ) + { + _GLEE_SGIX_interlace = GL_TRUE; + __GLeeLink_GL_SGIX_interlace(); + } + if (__GLeeCheckExtension("GL_SGIX_pixel_tiles", &extensionNames) ) + { + _GLEE_SGIX_pixel_tiles = GL_TRUE; + __GLeeLink_GL_SGIX_pixel_tiles(); + } + if (__GLeeCheckExtension("GL_SGIS_texture_select", &extensionNames) ) + { + _GLEE_SGIS_texture_select = GL_TRUE; + __GLeeLink_GL_SGIS_texture_select(); + } + if (__GLeeCheckExtension("GL_SGIX_sprite", &extensionNames) ) + { + _GLEE_SGIX_sprite = GL_TRUE; + __GLeeLink_GL_SGIX_sprite(); + } + if (__GLeeCheckExtension("GL_SGIX_texture_multi_buffer", &extensionNames) ) + { + _GLEE_SGIX_texture_multi_buffer = GL_TRUE; + __GLeeLink_GL_SGIX_texture_multi_buffer(); + } + if (__GLeeCheckExtension("GL_EXT_point_parameters", &extensionNames) ) + { + _GLEE_EXT_point_parameters = GL_TRUE; + __GLeeLink_GL_EXT_point_parameters(); + } + if (__GLeeCheckExtension("GL_SGIS_point_parameters", &extensionNames) ) + { + _GLEE_SGIS_point_parameters = GL_TRUE; + __GLeeLink_GL_SGIS_point_parameters(); + } + if (__GLeeCheckExtension("GL_SGIX_instruments", &extensionNames) ) + { + _GLEE_SGIX_instruments = GL_TRUE; + __GLeeLink_GL_SGIX_instruments(); + } + if (__GLeeCheckExtension("GL_SGIX_texture_scale_bias", &extensionNames) ) + { + _GLEE_SGIX_texture_scale_bias = GL_TRUE; + __GLeeLink_GL_SGIX_texture_scale_bias(); + } + if (__GLeeCheckExtension("GL_SGIX_framezoom", &extensionNames) ) + { + _GLEE_SGIX_framezoom = GL_TRUE; + __GLeeLink_GL_SGIX_framezoom(); + } + if (__GLeeCheckExtension("GL_SGIX_tag_sample_buffer", &extensionNames) ) + { + _GLEE_SGIX_tag_sample_buffer = GL_TRUE; + __GLeeLink_GL_SGIX_tag_sample_buffer(); + } + if (__GLeeCheckExtension("GL_FfdMaskSGIX", &extensionNames) ) + { + _GLEE_FfdMaskSGIX = GL_TRUE; + __GLeeLink_GL_FfdMaskSGIX(); + } + if (__GLeeCheckExtension("GL_SGIX_polynomial_ffd", &extensionNames) ) + { + _GLEE_SGIX_polynomial_ffd = GL_TRUE; + __GLeeLink_GL_SGIX_polynomial_ffd(); + } + if (__GLeeCheckExtension("GL_SGIX_reference_plane", &extensionNames) ) + { + _GLEE_SGIX_reference_plane = GL_TRUE; + __GLeeLink_GL_SGIX_reference_plane(); + } + if (__GLeeCheckExtension("GL_SGIX_flush_raster", &extensionNames) ) + { + _GLEE_SGIX_flush_raster = GL_TRUE; + __GLeeLink_GL_SGIX_flush_raster(); + } + if (__GLeeCheckExtension("GL_SGIX_depth_texture", &extensionNames) ) + { + _GLEE_SGIX_depth_texture = GL_TRUE; + __GLeeLink_GL_SGIX_depth_texture(); + } + if (__GLeeCheckExtension("GL_SGIS_fog_function", &extensionNames) ) + { + _GLEE_SGIS_fog_function = GL_TRUE; + __GLeeLink_GL_SGIS_fog_function(); + } + if (__GLeeCheckExtension("GL_SGIX_fog_offset", &extensionNames) ) + { + _GLEE_SGIX_fog_offset = GL_TRUE; + __GLeeLink_GL_SGIX_fog_offset(); + } + if (__GLeeCheckExtension("GL_HP_image_transform", &extensionNames) ) + { + _GLEE_HP_image_transform = GL_TRUE; + __GLeeLink_GL_HP_image_transform(); + } + if (__GLeeCheckExtension("GL_HP_convolution_border_modes", &extensionNames) ) + { + _GLEE_HP_convolution_border_modes = GL_TRUE; + __GLeeLink_GL_HP_convolution_border_modes(); + } + if (__GLeeCheckExtension("GL_INGR_palette_buffer", &extensionNames) ) + { + _GLEE_INGR_palette_buffer = GL_TRUE; + __GLeeLink_GL_INGR_palette_buffer(); + } + if (__GLeeCheckExtension("GL_SGIX_texture_add_env", &extensionNames) ) + { + _GLEE_SGIX_texture_add_env = GL_TRUE; + __GLeeLink_GL_SGIX_texture_add_env(); + } + if (__GLeeCheckExtension("GL_EXT_color_subtable", &extensionNames) ) + { + _GLEE_EXT_color_subtable = GL_TRUE; + __GLeeLink_GL_EXT_color_subtable(); + } + if (__GLeeCheckExtension("GL_PGI_vertex_hints", &extensionNames) ) + { + _GLEE_PGI_vertex_hints = GL_TRUE; + __GLeeLink_GL_PGI_vertex_hints(); + } + if (__GLeeCheckExtension("GL_PGI_misc_hints", &extensionNames) ) + { + _GLEE_PGI_misc_hints = GL_TRUE; + __GLeeLink_GL_PGI_misc_hints(); + } + if (__GLeeCheckExtension("GL_EXT_paletted_texture", &extensionNames) ) + { + _GLEE_EXT_paletted_texture = GL_TRUE; + __GLeeLink_GL_EXT_paletted_texture(); + } + if (__GLeeCheckExtension("GL_EXT_clip_volume_hint", &extensionNames) ) + { + _GLEE_EXT_clip_volume_hint = GL_TRUE; + __GLeeLink_GL_EXT_clip_volume_hint(); + } + if (__GLeeCheckExtension("GL_SGIX_list_priority", &extensionNames) ) + { + _GLEE_SGIX_list_priority = GL_TRUE; + __GLeeLink_GL_SGIX_list_priority(); + } + if (__GLeeCheckExtension("GL_SGIX_ir_instrument1", &extensionNames) ) + { + _GLEE_SGIX_ir_instrument1 = GL_TRUE; + __GLeeLink_GL_SGIX_ir_instrument1(); + } + if (__GLeeCheckExtension("GL_SGIX_calligraphic_fragment", &extensionNames) ) + { + _GLEE_SGIX_calligraphic_fragment = GL_TRUE; + __GLeeLink_GL_SGIX_calligraphic_fragment(); + } + if (__GLeeCheckExtension("GL_SGIX_texture_lod_bias", &extensionNames) ) + { + _GLEE_SGIX_texture_lod_bias = GL_TRUE; + __GLeeLink_GL_SGIX_texture_lod_bias(); + } + if (__GLeeCheckExtension("GL_SGIX_shadow_ambient", &extensionNames) ) + { + _GLEE_SGIX_shadow_ambient = GL_TRUE; + __GLeeLink_GL_SGIX_shadow_ambient(); + } + if (__GLeeCheckExtension("GL_EXT_index_texture", &extensionNames) ) + { + _GLEE_EXT_index_texture = GL_TRUE; + __GLeeLink_GL_EXT_index_texture(); + } + if (__GLeeCheckExtension("GL_EXT_index_material", &extensionNames) ) + { + _GLEE_EXT_index_material = GL_TRUE; + __GLeeLink_GL_EXT_index_material(); + } + if (__GLeeCheckExtension("GL_EXT_index_func", &extensionNames) ) + { + _GLEE_EXT_index_func = GL_TRUE; + __GLeeLink_GL_EXT_index_func(); + } + if (__GLeeCheckExtension("GL_EXT_index_array_formats", &extensionNames) ) + { + _GLEE_EXT_index_array_formats = GL_TRUE; + __GLeeLink_GL_EXT_index_array_formats(); + } + if (__GLeeCheckExtension("GL_EXT_compiled_vertex_array", &extensionNames) ) + { + _GLEE_EXT_compiled_vertex_array = GL_TRUE; + __GLeeLink_GL_EXT_compiled_vertex_array(); + } + if (__GLeeCheckExtension("GL_EXT_cull_vertex", &extensionNames) ) + { + _GLEE_EXT_cull_vertex = GL_TRUE; + __GLeeLink_GL_EXT_cull_vertex(); + } + if (__GLeeCheckExtension("GL_SGIX_ycrcb", &extensionNames) ) + { + _GLEE_SGIX_ycrcb = GL_TRUE; + __GLeeLink_GL_SGIX_ycrcb(); + } + if (__GLeeCheckExtension("GL_SGIX_fragment_lighting", &extensionNames) ) + { + _GLEE_SGIX_fragment_lighting = GL_TRUE; + __GLeeLink_GL_SGIX_fragment_lighting(); + } + if (__GLeeCheckExtension("GL_IBM_rasterpos_clip", &extensionNames) ) + { + _GLEE_IBM_rasterpos_clip = GL_TRUE; + __GLeeLink_GL_IBM_rasterpos_clip(); + } + if (__GLeeCheckExtension("GL_HP_texture_lighting", &extensionNames) ) + { + _GLEE_HP_texture_lighting = GL_TRUE; + __GLeeLink_GL_HP_texture_lighting(); + } + if (__GLeeCheckExtension("GL_EXT_draw_range_elements", &extensionNames) ) + { + _GLEE_EXT_draw_range_elements = GL_TRUE; + __GLeeLink_GL_EXT_draw_range_elements(); + } + if (__GLeeCheckExtension("GL_WIN_phong_shading", &extensionNames) ) + { + _GLEE_WIN_phong_shading = GL_TRUE; + __GLeeLink_GL_WIN_phong_shading(); + } + if (__GLeeCheckExtension("GL_WIN_specular_fog", &extensionNames) ) + { + _GLEE_WIN_specular_fog = GL_TRUE; + __GLeeLink_GL_WIN_specular_fog(); + } + if (__GLeeCheckExtension("GL_EXT_light_texture", &extensionNames) ) + { + _GLEE_EXT_light_texture = GL_TRUE; + __GLeeLink_GL_EXT_light_texture(); + } + if (__GLeeCheckExtension("GL_SGIX_blend_alpha_minmax", &extensionNames) ) + { + _GLEE_SGIX_blend_alpha_minmax = GL_TRUE; + __GLeeLink_GL_SGIX_blend_alpha_minmax(); + } + if (__GLeeCheckExtension("GL_SGIX_impact_pixel_texture", &extensionNames) ) + { + _GLEE_SGIX_impact_pixel_texture = GL_TRUE; + __GLeeLink_GL_SGIX_impact_pixel_texture(); + } + if (__GLeeCheckExtension("GL_EXT_bgra", &extensionNames) ) + { + _GLEE_EXT_bgra = GL_TRUE; + __GLeeLink_GL_EXT_bgra(); + } + if (__GLeeCheckExtension("GL_SGIX_async", &extensionNames) ) + { + _GLEE_SGIX_async = GL_TRUE; + __GLeeLink_GL_SGIX_async(); + } + if (__GLeeCheckExtension("GL_SGIX_async_pixel", &extensionNames) ) + { + _GLEE_SGIX_async_pixel = GL_TRUE; + __GLeeLink_GL_SGIX_async_pixel(); + } + if (__GLeeCheckExtension("GL_SGIX_async_histogram", &extensionNames) ) + { + _GLEE_SGIX_async_histogram = GL_TRUE; + __GLeeLink_GL_SGIX_async_histogram(); + } + if (__GLeeCheckExtension("GL_INTEL_texture_scissor", &extensionNames) ) + { + _GLEE_INTEL_texture_scissor = GL_TRUE; + __GLeeLink_GL_INTEL_texture_scissor(); + } + if (__GLeeCheckExtension("GL_INTEL_parallel_arrays", &extensionNames) ) + { + _GLEE_INTEL_parallel_arrays = GL_TRUE; + __GLeeLink_GL_INTEL_parallel_arrays(); + } + if (__GLeeCheckExtension("GL_HP_occlusion_test", &extensionNames) ) + { + _GLEE_HP_occlusion_test = GL_TRUE; + __GLeeLink_GL_HP_occlusion_test(); + } + if (__GLeeCheckExtension("GL_EXT_pixel_transform", &extensionNames) ) + { + _GLEE_EXT_pixel_transform = GL_TRUE; + __GLeeLink_GL_EXT_pixel_transform(); + } + if (__GLeeCheckExtension("GL_EXT_pixel_transform_color_table", &extensionNames) ) + { + _GLEE_EXT_pixel_transform_color_table = GL_TRUE; + __GLeeLink_GL_EXT_pixel_transform_color_table(); + } + if (__GLeeCheckExtension("GL_EXT_shared_texture_palette", &extensionNames) ) + { + _GLEE_EXT_shared_texture_palette = GL_TRUE; + __GLeeLink_GL_EXT_shared_texture_palette(); + } + if (__GLeeCheckExtension("GL_EXT_separate_specular_color", &extensionNames) ) + { + _GLEE_EXT_separate_specular_color = GL_TRUE; + __GLeeLink_GL_EXT_separate_specular_color(); + } + if (__GLeeCheckExtension("GL_EXT_secondary_color", &extensionNames) ) + { + _GLEE_EXT_secondary_color = GL_TRUE; + __GLeeLink_GL_EXT_secondary_color(); + } + if (__GLeeCheckExtension("GL_EXT_texture_perturb_normal", &extensionNames) ) + { + _GLEE_EXT_texture_perturb_normal = GL_TRUE; + __GLeeLink_GL_EXT_texture_perturb_normal(); + } + if (__GLeeCheckExtension("GL_EXT_multi_draw_arrays", &extensionNames) ) + { + _GLEE_EXT_multi_draw_arrays = GL_TRUE; + __GLeeLink_GL_EXT_multi_draw_arrays(); + } + if (__GLeeCheckExtension("GL_EXT_fog_coord", &extensionNames) ) + { + _GLEE_EXT_fog_coord = GL_TRUE; + __GLeeLink_GL_EXT_fog_coord(); + } + if (__GLeeCheckExtension("GL_REND_screen_coordinates", &extensionNames) ) + { + _GLEE_REND_screen_coordinates = GL_TRUE; + __GLeeLink_GL_REND_screen_coordinates(); + } + if (__GLeeCheckExtension("GL_EXT_coordinate_frame", &extensionNames) ) + { + _GLEE_EXT_coordinate_frame = GL_TRUE; + __GLeeLink_GL_EXT_coordinate_frame(); + } + if (__GLeeCheckExtension("GL_EXT_texture_env_combine", &extensionNames) ) + { + _GLEE_EXT_texture_env_combine = GL_TRUE; + __GLeeLink_GL_EXT_texture_env_combine(); + } + if (__GLeeCheckExtension("GL_APPLE_specular_vector", &extensionNames) ) + { + _GLEE_APPLE_specular_vector = GL_TRUE; + __GLeeLink_GL_APPLE_specular_vector(); + } + if (__GLeeCheckExtension("GL_APPLE_transform_hint", &extensionNames) ) + { + _GLEE_APPLE_transform_hint = GL_TRUE; + __GLeeLink_GL_APPLE_transform_hint(); + } + if (__GLeeCheckExtension("GL_SGIX_fog_scale", &extensionNames) ) + { + _GLEE_SGIX_fog_scale = GL_TRUE; + __GLeeLink_GL_SGIX_fog_scale(); + } + if (__GLeeCheckExtension("GL_SUNX_constant_data", &extensionNames) ) + { + _GLEE_SUNX_constant_data = GL_TRUE; + __GLeeLink_GL_SUNX_constant_data(); + } + if (__GLeeCheckExtension("GL_SUN_global_alpha", &extensionNames) ) + { + _GLEE_SUN_global_alpha = GL_TRUE; + __GLeeLink_GL_SUN_global_alpha(); + } + if (__GLeeCheckExtension("GL_SUN_triangle_list", &extensionNames) ) + { + _GLEE_SUN_triangle_list = GL_TRUE; + __GLeeLink_GL_SUN_triangle_list(); + } + if (__GLeeCheckExtension("GL_SUN_vertex", &extensionNames) ) + { + _GLEE_SUN_vertex = GL_TRUE; + __GLeeLink_GL_SUN_vertex(); + } + if (__GLeeCheckExtension("GL_EXT_blend_func_separate", &extensionNames) ) + { + _GLEE_EXT_blend_func_separate = GL_TRUE; + __GLeeLink_GL_EXT_blend_func_separate(); + } + if (__GLeeCheckExtension("GL_INGR_color_clamp", &extensionNames) ) + { + _GLEE_INGR_color_clamp = GL_TRUE; + __GLeeLink_GL_INGR_color_clamp(); + } + if (__GLeeCheckExtension("GL_INGR_interlace_read", &extensionNames) ) + { + _GLEE_INGR_interlace_read = GL_TRUE; + __GLeeLink_GL_INGR_interlace_read(); + } + if (__GLeeCheckExtension("GL_EXT_stencil_wrap", &extensionNames) ) + { + _GLEE_EXT_stencil_wrap = GL_TRUE; + __GLeeLink_GL_EXT_stencil_wrap(); + } + if (__GLeeCheckExtension("GL_EXT_422_pixels", &extensionNames) ) + { + _GLEE_EXT_422_pixels = GL_TRUE; + __GLeeLink_GL_EXT_422_pixels(); + } + if (__GLeeCheckExtension("GL_NV_texgen_reflection", &extensionNames) ) + { + _GLEE_NV_texgen_reflection = GL_TRUE; + __GLeeLink_GL_NV_texgen_reflection(); + } + if (__GLeeCheckExtension("GL_EXT_texture_cube_map", &extensionNames) ) + { + _GLEE_EXT_texture_cube_map = GL_TRUE; + __GLeeLink_GL_EXT_texture_cube_map(); + } + if (__GLeeCheckExtension("GL_SUN_convolution_border_modes", &extensionNames) ) + { + _GLEE_SUN_convolution_border_modes = GL_TRUE; + __GLeeLink_GL_SUN_convolution_border_modes(); + } + if (__GLeeCheckExtension("GL_EXT_texture_env_add", &extensionNames) ) + { + _GLEE_EXT_texture_env_add = GL_TRUE; + __GLeeLink_GL_EXT_texture_env_add(); + } + if (__GLeeCheckExtension("GL_EXT_texture_lod_bias", &extensionNames) ) + { + _GLEE_EXT_texture_lod_bias = GL_TRUE; + __GLeeLink_GL_EXT_texture_lod_bias(); + } + if (__GLeeCheckExtension("GL_EXT_texture_filter_anisotropic", &extensionNames) ) + { + _GLEE_EXT_texture_filter_anisotropic = GL_TRUE; + __GLeeLink_GL_EXT_texture_filter_anisotropic(); + } + if (__GLeeCheckExtension("GL_EXT_vertex_weighting", &extensionNames) ) + { + _GLEE_EXT_vertex_weighting = GL_TRUE; + __GLeeLink_GL_EXT_vertex_weighting(); + } + if (__GLeeCheckExtension("GL_NV_light_max_exponent", &extensionNames) ) + { + _GLEE_NV_light_max_exponent = GL_TRUE; + __GLeeLink_GL_NV_light_max_exponent(); + } + if (__GLeeCheckExtension("GL_NV_vertex_array_range", &extensionNames) ) + { + _GLEE_NV_vertex_array_range = GL_TRUE; + __GLeeLink_GL_NV_vertex_array_range(); + } + if (__GLeeCheckExtension("GL_NV_register_combiners", &extensionNames) ) + { + _GLEE_NV_register_combiners = GL_TRUE; + __GLeeLink_GL_NV_register_combiners(); + } + if (__GLeeCheckExtension("GL_NV_fog_distance", &extensionNames) ) + { + _GLEE_NV_fog_distance = GL_TRUE; + __GLeeLink_GL_NV_fog_distance(); + } + if (__GLeeCheckExtension("GL_NV_texgen_emboss", &extensionNames) ) + { + _GLEE_NV_texgen_emboss = GL_TRUE; + __GLeeLink_GL_NV_texgen_emboss(); + } + if (__GLeeCheckExtension("GL_NV_blend_square", &extensionNames) ) + { + _GLEE_NV_blend_square = GL_TRUE; + __GLeeLink_GL_NV_blend_square(); + } + if (__GLeeCheckExtension("GL_NV_texture_env_combine4", &extensionNames) ) + { + _GLEE_NV_texture_env_combine4 = GL_TRUE; + __GLeeLink_GL_NV_texture_env_combine4(); + } + if (__GLeeCheckExtension("GL_MESA_resize_buffers", &extensionNames) ) + { + _GLEE_MESA_resize_buffers = GL_TRUE; + __GLeeLink_GL_MESA_resize_buffers(); + } + if (__GLeeCheckExtension("GL_MESA_window_pos", &extensionNames) ) + { + _GLEE_MESA_window_pos = GL_TRUE; + __GLeeLink_GL_MESA_window_pos(); + } + if (__GLeeCheckExtension("GL_EXT_texture_compression_s3tc", &extensionNames) ) + { + _GLEE_EXT_texture_compression_s3tc = GL_TRUE; + __GLeeLink_GL_EXT_texture_compression_s3tc(); + } + if (__GLeeCheckExtension("GL_IBM_cull_vertex", &extensionNames) ) + { + _GLEE_IBM_cull_vertex = GL_TRUE; + __GLeeLink_GL_IBM_cull_vertex(); + } + if (__GLeeCheckExtension("GL_IBM_multimode_draw_arrays", &extensionNames) ) + { + _GLEE_IBM_multimode_draw_arrays = GL_TRUE; + __GLeeLink_GL_IBM_multimode_draw_arrays(); + } + if (__GLeeCheckExtension("GL_IBM_vertex_array_lists", &extensionNames) ) + { + _GLEE_IBM_vertex_array_lists = GL_TRUE; + __GLeeLink_GL_IBM_vertex_array_lists(); + } + if (__GLeeCheckExtension("GL_SGIX_subsample", &extensionNames) ) + { + _GLEE_SGIX_subsample = GL_TRUE; + __GLeeLink_GL_SGIX_subsample(); + } + if (__GLeeCheckExtension("GL_SGIX_ycrcb_subsample", &extensionNames) ) + { + _GLEE_SGIX_ycrcb_subsample = GL_TRUE; + __GLeeLink_GL_SGIX_ycrcb_subsample(); + } + if (__GLeeCheckExtension("GL_SGIX_ycrcba", &extensionNames) ) + { + _GLEE_SGIX_ycrcba = GL_TRUE; + __GLeeLink_GL_SGIX_ycrcba(); + } + if (__GLeeCheckExtension("GL_SGI_depth_pass_instrument", &extensionNames) ) + { + _GLEE_SGI_depth_pass_instrument = GL_TRUE; + __GLeeLink_GL_SGI_depth_pass_instrument(); + } + if (__GLeeCheckExtension("GL_3DFX_texture_compression_FXT1", &extensionNames) ) + { + _GLEE_3DFX_texture_compression_FXT1 = GL_TRUE; + __GLeeLink_GL_3DFX_texture_compression_FXT1(); + } + if (__GLeeCheckExtension("GL_3DFX_multisample", &extensionNames) ) + { + _GLEE_3DFX_multisample = GL_TRUE; + __GLeeLink_GL_3DFX_multisample(); + } + if (__GLeeCheckExtension("GL_3DFX_tbuffer", &extensionNames) ) + { + _GLEE_3DFX_tbuffer = GL_TRUE; + __GLeeLink_GL_3DFX_tbuffer(); + } + if (__GLeeCheckExtension("GL_EXT_multisample", &extensionNames) ) + { + _GLEE_EXT_multisample = GL_TRUE; + __GLeeLink_GL_EXT_multisample(); + } + if (__GLeeCheckExtension("GL_SGIX_vertex_preclip", &extensionNames) ) + { + _GLEE_SGIX_vertex_preclip = GL_TRUE; + __GLeeLink_GL_SGIX_vertex_preclip(); + } + if (__GLeeCheckExtension("GL_SGIX_convolution_accuracy", &extensionNames) ) + { + _GLEE_SGIX_convolution_accuracy = GL_TRUE; + __GLeeLink_GL_SGIX_convolution_accuracy(); + } + if (__GLeeCheckExtension("GL_SGIX_resample", &extensionNames) ) + { + _GLEE_SGIX_resample = GL_TRUE; + __GLeeLink_GL_SGIX_resample(); + } + if (__GLeeCheckExtension("GL_SGIS_point_line_texgen", &extensionNames) ) + { + _GLEE_SGIS_point_line_texgen = GL_TRUE; + __GLeeLink_GL_SGIS_point_line_texgen(); + } + if (__GLeeCheckExtension("GL_SGIS_texture_color_mask", &extensionNames) ) + { + _GLEE_SGIS_texture_color_mask = GL_TRUE; + __GLeeLink_GL_SGIS_texture_color_mask(); + } + if (__GLeeCheckExtension("GL_EXT_texture_env_dot3", &extensionNames) ) + { + _GLEE_EXT_texture_env_dot3 = GL_TRUE; + __GLeeLink_GL_EXT_texture_env_dot3(); + } + if (__GLeeCheckExtension("GL_ATI_texture_mirror_once", &extensionNames) ) + { + _GLEE_ATI_texture_mirror_once = GL_TRUE; + __GLeeLink_GL_ATI_texture_mirror_once(); + } + if (__GLeeCheckExtension("GL_NV_fence", &extensionNames) ) + { + _GLEE_NV_fence = GL_TRUE; + __GLeeLink_GL_NV_fence(); + } + if (__GLeeCheckExtension("GL_IBM_texture_mirrored_repeat", &extensionNames) ) + { + _GLEE_IBM_texture_mirrored_repeat = GL_TRUE; + __GLeeLink_GL_IBM_texture_mirrored_repeat(); + } + if (__GLeeCheckExtension("GL_NV_evaluators", &extensionNames) ) + { + _GLEE_NV_evaluators = GL_TRUE; + __GLeeLink_GL_NV_evaluators(); + } + if (__GLeeCheckExtension("GL_NV_packed_depth_stencil", &extensionNames) ) + { + _GLEE_NV_packed_depth_stencil = GL_TRUE; + __GLeeLink_GL_NV_packed_depth_stencil(); + } + if (__GLeeCheckExtension("GL_NV_register_combiners2", &extensionNames) ) + { + _GLEE_NV_register_combiners2 = GL_TRUE; + __GLeeLink_GL_NV_register_combiners2(); + } + if (__GLeeCheckExtension("GL_NV_texture_compression_vtc", &extensionNames) ) + { + _GLEE_NV_texture_compression_vtc = GL_TRUE; + __GLeeLink_GL_NV_texture_compression_vtc(); + } + if (__GLeeCheckExtension("GL_NV_texture_rectangle", &extensionNames) ) + { + _GLEE_NV_texture_rectangle = GL_TRUE; + __GLeeLink_GL_NV_texture_rectangle(); + } + if (__GLeeCheckExtension("GL_NV_texture_shader", &extensionNames) ) + { + _GLEE_NV_texture_shader = GL_TRUE; + __GLeeLink_GL_NV_texture_shader(); + } + if (__GLeeCheckExtension("GL_NV_texture_shader2", &extensionNames) ) + { + _GLEE_NV_texture_shader2 = GL_TRUE; + __GLeeLink_GL_NV_texture_shader2(); + } + if (__GLeeCheckExtension("GL_NV_vertex_array_range2", &extensionNames) ) + { + _GLEE_NV_vertex_array_range2 = GL_TRUE; + __GLeeLink_GL_NV_vertex_array_range2(); + } + if (__GLeeCheckExtension("GL_NV_vertex_program", &extensionNames) ) + { + _GLEE_NV_vertex_program = GL_TRUE; + __GLeeLink_GL_NV_vertex_program(); + } + if (__GLeeCheckExtension("GL_SGIX_texture_coordinate_clamp", &extensionNames) ) + { + _GLEE_SGIX_texture_coordinate_clamp = GL_TRUE; + __GLeeLink_GL_SGIX_texture_coordinate_clamp(); + } + if (__GLeeCheckExtension("GL_SGIX_scalebias_hint", &extensionNames) ) + { + _GLEE_SGIX_scalebias_hint = GL_TRUE; + __GLeeLink_GL_SGIX_scalebias_hint(); + } + if (__GLeeCheckExtension("GL_OML_interlace", &extensionNames) ) + { + _GLEE_OML_interlace = GL_TRUE; + __GLeeLink_GL_OML_interlace(); + } + if (__GLeeCheckExtension("GL_OML_subsample", &extensionNames) ) + { + _GLEE_OML_subsample = GL_TRUE; + __GLeeLink_GL_OML_subsample(); + } + if (__GLeeCheckExtension("GL_OML_resample", &extensionNames) ) + { + _GLEE_OML_resample = GL_TRUE; + __GLeeLink_GL_OML_resample(); + } + if (__GLeeCheckExtension("GL_NV_copy_depth_to_color", &extensionNames) ) + { + _GLEE_NV_copy_depth_to_color = GL_TRUE; + __GLeeLink_GL_NV_copy_depth_to_color(); + } + if (__GLeeCheckExtension("GL_ATI_envmap_bumpmap", &extensionNames) ) + { + _GLEE_ATI_envmap_bumpmap = GL_TRUE; + __GLeeLink_GL_ATI_envmap_bumpmap(); + } + if (__GLeeCheckExtension("GL_ATI_fragment_shader", &extensionNames) ) + { + _GLEE_ATI_fragment_shader = GL_TRUE; + __GLeeLink_GL_ATI_fragment_shader(); + } + if (__GLeeCheckExtension("GL_ATI_pn_triangles", &extensionNames) ) + { + _GLEE_ATI_pn_triangles = GL_TRUE; + __GLeeLink_GL_ATI_pn_triangles(); + } + if (__GLeeCheckExtension("GL_ATI_vertex_array_object", &extensionNames) ) + { + _GLEE_ATI_vertex_array_object = GL_TRUE; + __GLeeLink_GL_ATI_vertex_array_object(); + } + if (__GLeeCheckExtension("GL_EXT_vertex_shader", &extensionNames) ) + { + _GLEE_EXT_vertex_shader = GL_TRUE; + __GLeeLink_GL_EXT_vertex_shader(); + } + if (__GLeeCheckExtension("GL_ATI_vertex_streams", &extensionNames) ) + { + _GLEE_ATI_vertex_streams = GL_TRUE; + __GLeeLink_GL_ATI_vertex_streams(); + } + if (__GLeeCheckExtension("GL_ATI_element_array", &extensionNames) ) + { + _GLEE_ATI_element_array = GL_TRUE; + __GLeeLink_GL_ATI_element_array(); + } + if (__GLeeCheckExtension("GL_SUN_mesh_array", &extensionNames) ) + { + _GLEE_SUN_mesh_array = GL_TRUE; + __GLeeLink_GL_SUN_mesh_array(); + } + if (__GLeeCheckExtension("GL_SUN_slice_accum", &extensionNames) ) + { + _GLEE_SUN_slice_accum = GL_TRUE; + __GLeeLink_GL_SUN_slice_accum(); + } + if (__GLeeCheckExtension("GL_NV_multisample_filter_hint", &extensionNames) ) + { + _GLEE_NV_multisample_filter_hint = GL_TRUE; + __GLeeLink_GL_NV_multisample_filter_hint(); + } + if (__GLeeCheckExtension("GL_NV_depth_clamp", &extensionNames) ) + { + _GLEE_NV_depth_clamp = GL_TRUE; + __GLeeLink_GL_NV_depth_clamp(); + } + if (__GLeeCheckExtension("GL_NV_occlusion_query", &extensionNames) ) + { + _GLEE_NV_occlusion_query = GL_TRUE; + __GLeeLink_GL_NV_occlusion_query(); + } + if (__GLeeCheckExtension("GL_NV_point_sprite", &extensionNames) ) + { + _GLEE_NV_point_sprite = GL_TRUE; + __GLeeLink_GL_NV_point_sprite(); + } + if (__GLeeCheckExtension("GL_NV_texture_shader3", &extensionNames) ) + { + _GLEE_NV_texture_shader3 = GL_TRUE; + __GLeeLink_GL_NV_texture_shader3(); + } + if (__GLeeCheckExtension("GL_NV_vertex_program1_1", &extensionNames) ) + { + _GLEE_NV_vertex_program1_1 = GL_TRUE; + __GLeeLink_GL_NV_vertex_program1_1(); + } + if (__GLeeCheckExtension("GL_EXT_shadow_funcs", &extensionNames) ) + { + _GLEE_EXT_shadow_funcs = GL_TRUE; + __GLeeLink_GL_EXT_shadow_funcs(); + } + if (__GLeeCheckExtension("GL_EXT_stencil_two_side", &extensionNames) ) + { + _GLEE_EXT_stencil_two_side = GL_TRUE; + __GLeeLink_GL_EXT_stencil_two_side(); + } + if (__GLeeCheckExtension("GL_ATI_text_fragment_shader", &extensionNames) ) + { + _GLEE_ATI_text_fragment_shader = GL_TRUE; + __GLeeLink_GL_ATI_text_fragment_shader(); + } + if (__GLeeCheckExtension("GL_APPLE_client_storage", &extensionNames) ) + { + _GLEE_APPLE_client_storage = GL_TRUE; + __GLeeLink_GL_APPLE_client_storage(); + } + if (__GLeeCheckExtension("GL_APPLE_element_array", &extensionNames) ) + { + _GLEE_APPLE_element_array = GL_TRUE; + __GLeeLink_GL_APPLE_element_array(); + } + if (__GLeeCheckExtension("GL_APPLE_fence", &extensionNames) ) + { + _GLEE_APPLE_fence = GL_TRUE; + __GLeeLink_GL_APPLE_fence(); + } + if (__GLeeCheckExtension("GL_APPLE_vertex_array_object", &extensionNames) ) + { + _GLEE_APPLE_vertex_array_object = GL_TRUE; + __GLeeLink_GL_APPLE_vertex_array_object(); + } + if (__GLeeCheckExtension("GL_APPLE_vertex_array_range", &extensionNames) ) + { + _GLEE_APPLE_vertex_array_range = GL_TRUE; + __GLeeLink_GL_APPLE_vertex_array_range(); + } + if (__GLeeCheckExtension("GL_APPLE_ycbcr_422", &extensionNames) ) + { + _GLEE_APPLE_ycbcr_422 = GL_TRUE; + __GLeeLink_GL_APPLE_ycbcr_422(); + } + if (__GLeeCheckExtension("GL_S3_s3tc", &extensionNames) ) + { + _GLEE_S3_s3tc = GL_TRUE; + __GLeeLink_GL_S3_s3tc(); + } + if (__GLeeCheckExtension("GL_ATI_draw_buffers", &extensionNames) ) + { + _GLEE_ATI_draw_buffers = GL_TRUE; + __GLeeLink_GL_ATI_draw_buffers(); + } + if (__GLeeCheckExtension("GL_ATI_pixel_format_float", &extensionNames) ) + { + _GLEE_ATI_pixel_format_float = GL_TRUE; + __GLeeLink_GL_ATI_pixel_format_float(); + } + if (__GLeeCheckExtension("GL_ATI_texture_env_combine3", &extensionNames) ) + { + _GLEE_ATI_texture_env_combine3 = GL_TRUE; + __GLeeLink_GL_ATI_texture_env_combine3(); + } + if (__GLeeCheckExtension("GL_ATI_texture_float", &extensionNames) ) + { + _GLEE_ATI_texture_float = GL_TRUE; + __GLeeLink_GL_ATI_texture_float(); + } + if (__GLeeCheckExtension("GL_NV_float_buffer", &extensionNames) ) + { + _GLEE_NV_float_buffer = GL_TRUE; + __GLeeLink_GL_NV_float_buffer(); + } + if (__GLeeCheckExtension("GL_NV_fragment_program", &extensionNames) ) + { + _GLEE_NV_fragment_program = GL_TRUE; + __GLeeLink_GL_NV_fragment_program(); + } + if (__GLeeCheckExtension("GL_NV_half_float", &extensionNames) ) + { + _GLEE_NV_half_float = GL_TRUE; + __GLeeLink_GL_NV_half_float(); + } + if (__GLeeCheckExtension("GL_NV_pixel_data_range", &extensionNames) ) + { + _GLEE_NV_pixel_data_range = GL_TRUE; + __GLeeLink_GL_NV_pixel_data_range(); + } + if (__GLeeCheckExtension("GL_NV_primitive_restart", &extensionNames) ) + { + _GLEE_NV_primitive_restart = GL_TRUE; + __GLeeLink_GL_NV_primitive_restart(); + } + if (__GLeeCheckExtension("GL_NV_texture_expand_normal", &extensionNames) ) + { + _GLEE_NV_texture_expand_normal = GL_TRUE; + __GLeeLink_GL_NV_texture_expand_normal(); + } + if (__GLeeCheckExtension("GL_NV_vertex_program2", &extensionNames) ) + { + _GLEE_NV_vertex_program2 = GL_TRUE; + __GLeeLink_GL_NV_vertex_program2(); + } + if (__GLeeCheckExtension("GL_ATI_map_object_buffer", &extensionNames) ) + { + _GLEE_ATI_map_object_buffer = GL_TRUE; + __GLeeLink_GL_ATI_map_object_buffer(); + } + if (__GLeeCheckExtension("GL_ATI_separate_stencil", &extensionNames) ) + { + _GLEE_ATI_separate_stencil = GL_TRUE; + __GLeeLink_GL_ATI_separate_stencil(); + } + if (__GLeeCheckExtension("GL_ATI_vertex_attrib_array_object", &extensionNames) ) + { + _GLEE_ATI_vertex_attrib_array_object = GL_TRUE; + __GLeeLink_GL_ATI_vertex_attrib_array_object(); + } + if (__GLeeCheckExtension("GL_OES_read_format", &extensionNames) ) + { + _GLEE_OES_read_format = GL_TRUE; + __GLeeLink_GL_OES_read_format(); + } + if (__GLeeCheckExtension("GL_EXT_depth_bounds_test", &extensionNames) ) + { + _GLEE_EXT_depth_bounds_test = GL_TRUE; + __GLeeLink_GL_EXT_depth_bounds_test(); + } + if (__GLeeCheckExtension("GL_EXT_texture_mirror_clamp", &extensionNames) ) + { + _GLEE_EXT_texture_mirror_clamp = GL_TRUE; + __GLeeLink_GL_EXT_texture_mirror_clamp(); + } + if (__GLeeCheckExtension("GL_EXT_blend_equation_separate", &extensionNames) ) + { + _GLEE_EXT_blend_equation_separate = GL_TRUE; + __GLeeLink_GL_EXT_blend_equation_separate(); + } + if (__GLeeCheckExtension("GL_MESA_pack_invert", &extensionNames) ) + { + _GLEE_MESA_pack_invert = GL_TRUE; + __GLeeLink_GL_MESA_pack_invert(); + } + if (__GLeeCheckExtension("GL_MESA_ycbcr_texture", &extensionNames) ) + { + _GLEE_MESA_ycbcr_texture = GL_TRUE; + __GLeeLink_GL_MESA_ycbcr_texture(); + } + if (__GLeeCheckExtension("GL_EXT_pixel_buffer_object", &extensionNames) ) + { + _GLEE_EXT_pixel_buffer_object = GL_TRUE; + __GLeeLink_GL_EXT_pixel_buffer_object(); + } + if (__GLeeCheckExtension("GL_NV_fragment_program_option", &extensionNames) ) + { + _GLEE_NV_fragment_program_option = GL_TRUE; + __GLeeLink_GL_NV_fragment_program_option(); + } + if (__GLeeCheckExtension("GL_NV_fragment_program2", &extensionNames) ) + { + _GLEE_NV_fragment_program2 = GL_TRUE; + __GLeeLink_GL_NV_fragment_program2(); + } + if (__GLeeCheckExtension("GL_NV_vertex_program2_option", &extensionNames) ) + { + _GLEE_NV_vertex_program2_option = GL_TRUE; + __GLeeLink_GL_NV_vertex_program2_option(); + } + if (__GLeeCheckExtension("GL_NV_vertex_program3", &extensionNames) ) + { + _GLEE_NV_vertex_program3 = GL_TRUE; + __GLeeLink_GL_NV_vertex_program3(); + } + if (__GLeeCheckExtension("GL_EXT_framebuffer_object", &extensionNames) ) + { + _GLEE_EXT_framebuffer_object = GL_TRUE; + __GLeeLink_GL_EXT_framebuffer_object(); + } + if (__GLeeCheckExtension("GL_GREMEDY_string_marker", &extensionNames) ) + { + _GLEE_GREMEDY_string_marker = GL_TRUE; + __GLeeLink_GL_GREMEDY_string_marker(); + } + if (__GLeeCheckExtension("GL_EXT_Cg_shader", &extensionNames) ) + { + _GLEE_EXT_Cg_shader = GL_TRUE; + __GLeeLink_GL_EXT_Cg_shader(); + } + if (__GLeeCheckExtension("GL_EXT_timer_query", &extensionNames) ) + { + _GLEE_EXT_timer_query = GL_TRUE; + __GLeeLink_GL_EXT_timer_query(); + } + if (__GLeeCheckExtension("GL_EXT_texture_buffer_object", &extensionNames) ) + { + _GLEE_EXT_texture_buffer_object = GL_TRUE; + __GLeeLink_GL_EXT_texture_buffer_object(); + } + if (__GLeeCheckExtension("GL_EXT_gpu_shader4", &extensionNames) ) + { + _GLEE_EXT_gpu_shader4 = GL_TRUE; + __GLeeLink_GL_EXT_gpu_shader4(); + } + if (__GLeeCheckExtension("GL_EXT_geometry_shader4", &extensionNames) ) + { + _GLEE_EXT_geometry_shader4 = GL_TRUE; + __GLeeLink_GL_EXT_geometry_shader4(); + } + if (__GLeeCheckExtension("GL_EXT_bindable_uniform", &extensionNames) ) + { + _GLEE_EXT_bindable_uniform = GL_TRUE; + __GLeeLink_GL_EXT_bindable_uniform(); + } + if (__GLeeCheckExtension("GL_EXT_framebuffer_sRGB", &extensionNames) ) + { + _GLEE_EXT_framebuffer_sRGB = GL_TRUE; + __GLeeLink_GL_EXT_framebuffer_sRGB(); + } + if (__GLeeCheckExtension("GL_EXT_texture_shared_exponent", &extensionNames) ) + { + _GLEE_EXT_texture_shared_exponent = GL_TRUE; + __GLeeLink_GL_EXT_texture_shared_exponent(); + } + if (__GLeeCheckExtension("GL_EXT_packed_float", &extensionNames) ) + { + _GLEE_EXT_packed_float = GL_TRUE; + __GLeeLink_GL_EXT_packed_float(); + } + if (__GLeeCheckExtension("GL_EXT_texture_array", &extensionNames) ) + { + _GLEE_EXT_texture_array = GL_TRUE; + __GLeeLink_GL_EXT_texture_array(); + } + if (__GLeeCheckExtension("GL_EXT_texture_integer", &extensionNames) ) + { + _GLEE_EXT_texture_integer = GL_TRUE; + __GLeeLink_GL_EXT_texture_integer(); + } + if (__GLeeCheckExtension("GL_NV_depth_buffer_float", &extensionNames) ) + { + _GLEE_NV_depth_buffer_float = GL_TRUE; + __GLeeLink_GL_NV_depth_buffer_float(); + } + if (__GLeeCheckExtension("GL_EXT_texture_compression_latc", &extensionNames) ) + { + _GLEE_EXT_texture_compression_latc = GL_TRUE; + __GLeeLink_GL_EXT_texture_compression_latc(); + } + if (__GLeeCheckExtension("GL_NV_transform_feedback", &extensionNames) ) + { + _GLEE_NV_transform_feedback = GL_TRUE; + __GLeeLink_GL_NV_transform_feedback(); + } + if (__GLeeCheckExtension("GL_NV_geometry_program4", &extensionNames) ) + { + _GLEE_NV_geometry_program4 = GL_TRUE; + __GLeeLink_GL_NV_geometry_program4(); + } + if (__GLeeCheckExtension("GL_NV_gpu_program4", &extensionNames) ) + { + _GLEE_NV_gpu_program4 = GL_TRUE; + __GLeeLink_GL_NV_gpu_program4(); + } + if (__GLeeCheckExtension("GL_NV_framebuffer_multisample_coverage", &extensionNames) ) + { + _GLEE_NV_framebuffer_multisample_coverage = GL_TRUE; + __GLeeLink_GL_NV_framebuffer_multisample_coverage(); + } + if (__GLeeCheckExtension("GL_EXT_framebuffer_multisample", &extensionNames) ) + { + _GLEE_EXT_framebuffer_multisample = GL_TRUE; + __GLeeLink_GL_EXT_framebuffer_multisample(); + } + if (__GLeeCheckExtension("GL_EXT_framebuffer_blit", &extensionNames) ) + { + _GLEE_EXT_framebuffer_blit = GL_TRUE; + __GLeeLink_GL_EXT_framebuffer_blit(); + } + if (__GLeeCheckExtension("GL_EXT_texture_compression_rgtc", &extensionNames) ) + { + _GLEE_EXT_texture_compression_rgtc = GL_TRUE; + __GLeeLink_GL_EXT_texture_compression_rgtc(); + } + if (__GLeeCheckExtension("GL_EXT_color_matrix", &extensionNames) ) + { + _GLEE_EXT_color_matrix = GL_TRUE; + __GLeeLink_GL_EXT_color_matrix(); + } + if (__GLeeCheckExtension("GL_SGIX_texture_select", &extensionNames) ) + { + _GLEE_SGIX_texture_select = GL_TRUE; + __GLeeLink_GL_SGIX_texture_select(); + } + if (__GLeeCheckExtension("GL_INGR_blend_func_separate", &extensionNames) ) + { + _GLEE_INGR_blend_func_separate = GL_TRUE; + __GLeeLink_GL_INGR_blend_func_separate(); + } + if (__GLeeCheckExtension("GL_SGIX_depth_pass_instrument", &extensionNames) ) + { + _GLEE_SGIX_depth_pass_instrument = GL_TRUE; + __GLeeLink_GL_SGIX_depth_pass_instrument(); + } + if (__GLeeCheckExtension("GL_SGIX_igloo_interface", &extensionNames) ) + { + _GLEE_SGIX_igloo_interface = GL_TRUE; + __GLeeLink_GL_SGIX_igloo_interface(); + } + if (__GLeeCheckExtension("GL_EXT_draw_buffers2", &extensionNames) ) + { + _GLEE_EXT_draw_buffers2 = GL_TRUE; + __GLeeLink_GL_EXT_draw_buffers2(); + } + if (__GLeeCheckExtension("GL_NV_parameter_buffer_object", &extensionNames) ) + { + _GLEE_NV_parameter_buffer_object = GL_TRUE; + __GLeeLink_GL_NV_parameter_buffer_object(); + } + if (__GLeeCheckExtension("GL_EXT_draw_instanced", &extensionNames) ) + { + _GLEE_EXT_draw_instanced = GL_TRUE; + __GLeeLink_GL_EXT_draw_instanced(); + } + if (__GLeeCheckExtension("GL_EXT_fragment_lighting", &extensionNames) ) + { + _GLEE_EXT_fragment_lighting = GL_TRUE; + __GLeeLink_GL_EXT_fragment_lighting(); + } + if (__GLeeCheckExtension("GL_EXT_packed_depth_stencil", &extensionNames) ) + { + _GLEE_EXT_packed_depth_stencil = GL_TRUE; + __GLeeLink_GL_EXT_packed_depth_stencil(); + } + if (__GLeeCheckExtension("GL_EXT_scene_marker", &extensionNames) ) + { + _GLEE_EXT_scene_marker = GL_TRUE; + __GLeeLink_GL_EXT_scene_marker(); + } + if (__GLeeCheckExtension("GL_EXT_stencil_clear_tag", &extensionNames) ) + { + _GLEE_EXT_stencil_clear_tag = GL_TRUE; + __GLeeLink_GL_EXT_stencil_clear_tag(); + } + if (__GLeeCheckExtension("GL_EXT_texture_compression_dxt1", &extensionNames) ) + { + _GLEE_EXT_texture_compression_dxt1 = GL_TRUE; + __GLeeLink_GL_EXT_texture_compression_dxt1(); + } + if (__GLeeCheckExtension("GL_EXT_texture_env", &extensionNames) ) + { + _GLEE_EXT_texture_env = GL_TRUE; + __GLeeLink_GL_EXT_texture_env(); + } + if (__GLeeCheckExtension("GL_EXT_texture_sRGB", &extensionNames) ) + { + _GLEE_EXT_texture_sRGB = GL_TRUE; + __GLeeLink_GL_EXT_texture_sRGB(); + } + if (__GLeeCheckExtension("GL_IBM_static_data", &extensionNames) ) + { + _GLEE_IBM_static_data = GL_TRUE; + __GLeeLink_GL_IBM_static_data(); + } + if (__GLeeCheckExtension("GL_MESAX_texture_stack", &extensionNames) ) + { + _GLEE_MESAX_texture_stack = GL_TRUE; + __GLeeLink_GL_MESAX_texture_stack(); + } + if (__GLeeCheckExtension("GL_OES_byte_coordinates", &extensionNames) ) + { + _GLEE_OES_byte_coordinates = GL_TRUE; + __GLeeLink_GL_OES_byte_coordinates(); + } + if (__GLeeCheckExtension("GL_OES_compressed_paletted_texture", &extensionNames) ) + { + _GLEE_OES_compressed_paletted_texture = GL_TRUE; + __GLeeLink_GL_OES_compressed_paletted_texture(); + } + if (__GLeeCheckExtension("GL_OES_single_precision", &extensionNames) ) + { + _GLEE_OES_single_precision = GL_TRUE; + __GLeeLink_GL_OES_single_precision(); + } + if (__GLeeCheckExtension("GL_SGIX_pixel_texture_bits", &extensionNames) ) + { + _GLEE_SGIX_pixel_texture_bits = GL_TRUE; + __GLeeLink_GL_SGIX_pixel_texture_bits(); + } + if (__GLeeCheckExtension("GL_SGIX_texture_range", &extensionNames) ) + { + _GLEE_SGIX_texture_range = GL_TRUE; + __GLeeLink_GL_SGIX_texture_range(); + } +#ifdef WIN32 + if (__GLeeCheckExtension("WGL_ARB_buffer_region", &extensionNames) ) + { + _GLEE_WGL_ARB_buffer_region = GL_TRUE; + __GLeeLink_WGL_ARB_buffer_region(); + } + if (__GLeeCheckExtension("WGL_ARB_multisample", &extensionNames) ) + { + _GLEE_WGL_ARB_multisample = GL_TRUE; + __GLeeLink_WGL_ARB_multisample(); + } + if (__GLeeCheckExtension("WGL_ARB_extensions_string", &extensionNames) ) + { + _GLEE_WGL_ARB_extensions_string = GL_TRUE; + __GLeeLink_WGL_ARB_extensions_string(); + } + if (__GLeeCheckExtension("WGL_ARB_pixel_format", &extensionNames) ) + { + _GLEE_WGL_ARB_pixel_format = GL_TRUE; + __GLeeLink_WGL_ARB_pixel_format(); + } + if (__GLeeCheckExtension("WGL_ARB_make_current_read", &extensionNames) ) + { + _GLEE_WGL_ARB_make_current_read = GL_TRUE; + __GLeeLink_WGL_ARB_make_current_read(); + } + if (__GLeeCheckExtension("WGL_ARB_pbuffer", &extensionNames) ) + { + _GLEE_WGL_ARB_pbuffer = GL_TRUE; + __GLeeLink_WGL_ARB_pbuffer(); + } + if (__GLeeCheckExtension("WGL_ARB_render_texture", &extensionNames) ) + { + _GLEE_WGL_ARB_render_texture = GL_TRUE; + __GLeeLink_WGL_ARB_render_texture(); + } + if (__GLeeCheckExtension("WGL_ARB_pixel_format_float", &extensionNames) ) + { + _GLEE_WGL_ARB_pixel_format_float = GL_TRUE; + __GLeeLink_WGL_ARB_pixel_format_float(); + } + if (__GLeeCheckExtension("WGL_EXT_make_current_read", &extensionNames) ) + { + _GLEE_WGL_EXT_make_current_read = GL_TRUE; + __GLeeLink_WGL_EXT_make_current_read(); + } + if (__GLeeCheckExtension("WGL_EXT_pixel_format", &extensionNames) ) + { + _GLEE_WGL_EXT_pixel_format = GL_TRUE; + __GLeeLink_WGL_EXT_pixel_format(); + } + if (__GLeeCheckExtension("WGL_EXT_pbuffer", &extensionNames) ) + { + _GLEE_WGL_EXT_pbuffer = GL_TRUE; + __GLeeLink_WGL_EXT_pbuffer(); + } + if (__GLeeCheckExtension("WGL_EXT_depth_float", &extensionNames) ) + { + _GLEE_WGL_EXT_depth_float = GL_TRUE; + __GLeeLink_WGL_EXT_depth_float(); + } + if (__GLeeCheckExtension("WGL_3DFX_multisample", &extensionNames) ) + { + _GLEE_WGL_3DFX_multisample = GL_TRUE; + __GLeeLink_WGL_3DFX_multisample(); + } + if (__GLeeCheckExtension("WGL_EXT_multisample", &extensionNames) ) + { + _GLEE_WGL_EXT_multisample = GL_TRUE; + __GLeeLink_WGL_EXT_multisample(); + } + if (__GLeeCheckExtension("WGL_I3D_digital_video_control", &extensionNames) ) + { + _GLEE_WGL_I3D_digital_video_control = GL_TRUE; + __GLeeLink_WGL_I3D_digital_video_control(); + } + if (__GLeeCheckExtension("WGL_I3D_gamma", &extensionNames) ) + { + _GLEE_WGL_I3D_gamma = GL_TRUE; + __GLeeLink_WGL_I3D_gamma(); + } + if (__GLeeCheckExtension("WGL_I3D_genlock", &extensionNames) ) + { + _GLEE_WGL_I3D_genlock = GL_TRUE; + __GLeeLink_WGL_I3D_genlock(); + } + if (__GLeeCheckExtension("WGL_I3D_image_buffer", &extensionNames) ) + { + _GLEE_WGL_I3D_image_buffer = GL_TRUE; + __GLeeLink_WGL_I3D_image_buffer(); + } + if (__GLeeCheckExtension("WGL_I3D_swap_frame_lock", &extensionNames) ) + { + _GLEE_WGL_I3D_swap_frame_lock = GL_TRUE; + __GLeeLink_WGL_I3D_swap_frame_lock(); + } + if (__GLeeCheckExtension("WGL_NV_render_depth_texture", &extensionNames) ) + { + _GLEE_WGL_NV_render_depth_texture = GL_TRUE; + __GLeeLink_WGL_NV_render_depth_texture(); + } + if (__GLeeCheckExtension("WGL_NV_render_texture_rectangle", &extensionNames) ) + { + _GLEE_WGL_NV_render_texture_rectangle = GL_TRUE; + __GLeeLink_WGL_NV_render_texture_rectangle(); + } + if (__GLeeCheckExtension("WGL_ATI_pixel_format_float", &extensionNames) ) + { + _GLEE_WGL_ATI_pixel_format_float = GL_TRUE; + __GLeeLink_WGL_ATI_pixel_format_float(); + } + if (__GLeeCheckExtension("WGL_NV_float_buffer", &extensionNames) ) + { + _GLEE_WGL_NV_float_buffer = GL_TRUE; + __GLeeLink_WGL_NV_float_buffer(); + } + if (__GLeeCheckExtension("WGL_EXT_display_color_table", &extensionNames) ) + { + _GLEE_WGL_EXT_display_color_table = GL_TRUE; + __GLeeLink_WGL_EXT_display_color_table(); + } + if (__GLeeCheckExtension("WGL_EXT_extensions_string", &extensionNames) ) + { + _GLEE_WGL_EXT_extensions_string = GL_TRUE; + __GLeeLink_WGL_EXT_extensions_string(); + } + if (__GLeeCheckExtension("WGL_EXT_swap_control", &extensionNames) ) + { + _GLEE_WGL_EXT_swap_control = GL_TRUE; + __GLeeLink_WGL_EXT_swap_control(); + } + if (__GLeeCheckExtension("WGL_NV_vertex_array_range", &extensionNames) ) + { + _GLEE_WGL_NV_vertex_array_range = GL_TRUE; + __GLeeLink_WGL_NV_vertex_array_range(); + } + if (__GLeeCheckExtension("WGL_OML_sync_control", &extensionNames) ) + { + _GLEE_WGL_OML_sync_control = GL_TRUE; + __GLeeLink_WGL_OML_sync_control(); + } + if (__GLeeCheckExtension("WGL_I3D_swap_frame_usage", &extensionNames) ) + { + _GLEE_WGL_I3D_swap_frame_usage = GL_TRUE; + __GLeeLink_WGL_I3D_swap_frame_usage(); + } + if (__GLeeCheckExtension("WGL_3DL_stereo_control", &extensionNames) ) + { + _GLEE_WGL_3DL_stereo_control = GL_TRUE; + __GLeeLink_WGL_3DL_stereo_control(); + } +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else /* GLX */ + if (__GLeeCheckExtension("GLX_VERSION_1_3", &extensionNames) ) + { + _GLEE_GLX_VERSION_1_3 = GL_TRUE; + __GLeeLink_GLX_VERSION_1_3(); + } + if (__GLeeCheckExtension("GLX_VERSION_1_4", &extensionNames) ) + { + _GLEE_GLX_VERSION_1_4 = GL_TRUE; + __GLeeLink_GLX_VERSION_1_4(); + } + if (__GLeeCheckExtension("GLX_ARB_multisample", &extensionNames) ) + { + _GLEE_GLX_ARB_multisample = GL_TRUE; + __GLeeLink_GLX_ARB_multisample(); + } + if (__GLeeCheckExtension("GLX_ARB_fbconfig_float", &extensionNames) ) + { + _GLEE_GLX_ARB_fbconfig_float = GL_TRUE; + __GLeeLink_GLX_ARB_fbconfig_float(); + } + if (__GLeeCheckExtension("GLX_SGIS_multisample", &extensionNames) ) + { + _GLEE_GLX_SGIS_multisample = GL_TRUE; + __GLeeLink_GLX_SGIS_multisample(); + } + if (__GLeeCheckExtension("GLX_EXT_visual_info", &extensionNames) ) + { + _GLEE_GLX_EXT_visual_info = GL_TRUE; + __GLeeLink_GLX_EXT_visual_info(); + } + if (__GLeeCheckExtension("GLX_SGI_swap_control", &extensionNames) ) + { + _GLEE_GLX_SGI_swap_control = GL_TRUE; + __GLeeLink_GLX_SGI_swap_control(); + } + if (__GLeeCheckExtension("GLX_SGI_video_sync", &extensionNames) ) + { + _GLEE_GLX_SGI_video_sync = GL_TRUE; + __GLeeLink_GLX_SGI_video_sync(); + } + if (__GLeeCheckExtension("GLX_SGI_make_current_read", &extensionNames) ) + { + _GLEE_GLX_SGI_make_current_read = GL_TRUE; + __GLeeLink_GLX_SGI_make_current_read(); + } + if (__GLeeCheckExtension("GLX_EXT_visual_rating", &extensionNames) ) + { + _GLEE_GLX_EXT_visual_rating = GL_TRUE; + __GLeeLink_GLX_EXT_visual_rating(); + } + if (__GLeeCheckExtension("GLX_EXT_import_context", &extensionNames) ) + { + _GLEE_GLX_EXT_import_context = GL_TRUE; + __GLeeLink_GLX_EXT_import_context(); + } + if (__GLeeCheckExtension("GLX_SGIX_fbconfig", &extensionNames) ) + { + _GLEE_GLX_SGIX_fbconfig = GL_TRUE; + __GLeeLink_GLX_SGIX_fbconfig(); + } + if (__GLeeCheckExtension("GLX_SGIX_pbuffer", &extensionNames) ) + { + _GLEE_GLX_SGIX_pbuffer = GL_TRUE; + __GLeeLink_GLX_SGIX_pbuffer(); + } + if (__GLeeCheckExtension("GLX_SGI_cushion", &extensionNames) ) + { + _GLEE_GLX_SGI_cushion = GL_TRUE; + __GLeeLink_GLX_SGI_cushion(); + } + if (__GLeeCheckExtension("GLX_SGIX_video_resize", &extensionNames) ) + { + _GLEE_GLX_SGIX_video_resize = GL_TRUE; + __GLeeLink_GLX_SGIX_video_resize(); + } + if (__GLeeCheckExtension("GLX_SGIX_swap_group", &extensionNames) ) + { + _GLEE_GLX_SGIX_swap_group = GL_TRUE; + __GLeeLink_GLX_SGIX_swap_group(); + } + if (__GLeeCheckExtension("GLX_SGIX_swap_barrier", &extensionNames) ) + { + _GLEE_GLX_SGIX_swap_barrier = GL_TRUE; + __GLeeLink_GLX_SGIX_swap_barrier(); + } + if (__GLeeCheckExtension("GLX_SGIS_blended_overlay", &extensionNames) ) + { + _GLEE_GLX_SGIS_blended_overlay = GL_TRUE; + __GLeeLink_GLX_SGIS_blended_overlay(); + } + if (__GLeeCheckExtension("GLX_SGIS_shared_multisample", &extensionNames) ) + { + _GLEE_GLX_SGIS_shared_multisample = GL_TRUE; + __GLeeLink_GLX_SGIS_shared_multisample(); + } + if (__GLeeCheckExtension("GLX_SUN_get_transparent_index", &extensionNames) ) + { + _GLEE_GLX_SUN_get_transparent_index = GL_TRUE; + __GLeeLink_GLX_SUN_get_transparent_index(); + } + if (__GLeeCheckExtension("GLX_3DFX_multisample", &extensionNames) ) + { + _GLEE_GLX_3DFX_multisample = GL_TRUE; + __GLeeLink_GLX_3DFX_multisample(); + } + if (__GLeeCheckExtension("GLX_MESA_copy_sub_buffer", &extensionNames) ) + { + _GLEE_GLX_MESA_copy_sub_buffer = GL_TRUE; + __GLeeLink_GLX_MESA_copy_sub_buffer(); + } + if (__GLeeCheckExtension("GLX_MESA_pixmap_colormap", &extensionNames) ) + { + _GLEE_GLX_MESA_pixmap_colormap = GL_TRUE; + __GLeeLink_GLX_MESA_pixmap_colormap(); + } + if (__GLeeCheckExtension("GLX_MESA_release_buffers", &extensionNames) ) + { + _GLEE_GLX_MESA_release_buffers = GL_TRUE; + __GLeeLink_GLX_MESA_release_buffers(); + } + if (__GLeeCheckExtension("GLX_MESA_set_3dfx_mode", &extensionNames) ) + { + _GLEE_GLX_MESA_set_3dfx_mode = GL_TRUE; + __GLeeLink_GLX_MESA_set_3dfx_mode(); + } + if (__GLeeCheckExtension("GLX_SGIX_visual_select_group", &extensionNames) ) + { + _GLEE_GLX_SGIX_visual_select_group = GL_TRUE; + __GLeeLink_GLX_SGIX_visual_select_group(); + } + if (__GLeeCheckExtension("GLX_OML_swap_method", &extensionNames) ) + { + _GLEE_GLX_OML_swap_method = GL_TRUE; + __GLeeLink_GLX_OML_swap_method(); + } + if (__GLeeCheckExtension("GLX_OML_sync_control", &extensionNames) ) + { + _GLEE_GLX_OML_sync_control = GL_TRUE; + __GLeeLink_GLX_OML_sync_control(); + } + if (__GLeeCheckExtension("GLX_NV_float_buffer", &extensionNames) ) + { + _GLEE_GLX_NV_float_buffer = GL_TRUE; + __GLeeLink_GLX_NV_float_buffer(); + } + if (__GLeeCheckExtension("GLX_SGIX_hyperpipe", &extensionNames) ) + { + _GLEE_GLX_SGIX_hyperpipe = GL_TRUE; + __GLeeLink_GLX_SGIX_hyperpipe(); + } + if (__GLeeCheckExtension("GLX_MESA_agp_offset", &extensionNames) ) + { + _GLEE_GLX_MESA_agp_offset = GL_TRUE; + __GLeeLink_GLX_MESA_agp_offset(); + } + if (__GLeeCheckExtension("GLX_EXT_scene_marker", &extensionNames) ) + { + _GLEE_GLX_EXT_scene_marker = GL_TRUE; + __GLeeLink_GLX_EXT_scene_marker(); + } +#endif /* end GLX */ + + __GLeeExtList_clean(&extensionNames); + return GL_TRUE; +} diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/GLee.h electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/GLee.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/GLee.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/GLee.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,10797 @@ +/*************************************************************************** +* +* GLee.h +* GLee (OpenGL Easy Extension library) +* Version : 5.21 +* +* Copyright (c)2006 Ben Woodhouse All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer as +* the first lines of this file unmodified. +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* +* THIS SOFTWARE IS PROVIDED BY BEN WOODHOUSE ``AS IS'' AND ANY EXPRESS OR +* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +* IN NO EVENT SHALL BEN WOODHOUSE BE LIABLE FOR ANY DIRECT, INDIRECT, +* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +* Web: http://elf-stone.com/glee.php +* +* [This file was automatically generated by GLeeGen 5.21 +* +***************************************************************************/ + +#ifndef __glee_h_ +#define __glee_h_ + +#ifdef __gl_h_ + #error gl.h included before glee.h +#endif + +#ifdef __glext_h_ + #error glext.h included before glee.h +#endif + +#ifdef __wglext_h_ + #error wglext.h included before glee.h +#endif + +#ifdef __glxext_h_ + #error glxext.h included before glee.h +#endif + +#ifdef WIN32 + #define WIN32_LEAN_AND_MEAN + #include + #include +#elif defined(__APPLE__) || defined(__APPLE_CC__) + #include +#else // GLX + #define __glext_h_ /* prevent glext.h from being included */ + #define __glxext_h_ /* prevent glxext.h from being included */ + #define GLX_GLXEXT_PROTOTYPES + #include + #include +#endif + +#ifndef APIENTRY + #define APIENTRY +#endif + +#ifndef APIENTRYP + #define APIENTRYP APIENTRY * +#endif + +#define GLEE_EXTERN extern + +#ifdef __cplusplus + extern "C" { /* begin C linkage */ +#endif + +#define GLEE_LINK_FAIL 0 +#define GLEE_LINK_PARTIAL 1 +#define GLEE_LINK_COMPLETE 2 + +/* Extension querying variables */ + +GLEE_EXTERN GLboolean _GLEE_VERSION_1_2; +GLEE_EXTERN GLboolean _GLEE_ARB_imaging; +GLEE_EXTERN GLboolean _GLEE_VERSION_1_3; +GLEE_EXTERN GLboolean _GLEE_VERSION_1_4; +GLEE_EXTERN GLboolean _GLEE_VERSION_1_5; +GLEE_EXTERN GLboolean _GLEE_VERSION_2_0; +GLEE_EXTERN GLboolean _GLEE_VERSION_2_1; +GLEE_EXTERN GLboolean _GLEE_ARB_multitexture; +GLEE_EXTERN GLboolean _GLEE_ARB_transpose_matrix; +GLEE_EXTERN GLboolean _GLEE_ARB_multisample; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_env_add; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_cube_map; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_compression; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_border_clamp; +GLEE_EXTERN GLboolean _GLEE_ARB_point_parameters; +GLEE_EXTERN GLboolean _GLEE_ARB_vertex_blend; +GLEE_EXTERN GLboolean _GLEE_ARB_matrix_palette; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_env_combine; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_env_crossbar; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_env_dot3; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_mirrored_repeat; +GLEE_EXTERN GLboolean _GLEE_ARB_depth_texture; +GLEE_EXTERN GLboolean _GLEE_ARB_shadow; +GLEE_EXTERN GLboolean _GLEE_ARB_shadow_ambient; +GLEE_EXTERN GLboolean _GLEE_ARB_window_pos; +GLEE_EXTERN GLboolean _GLEE_ARB_vertex_program; +GLEE_EXTERN GLboolean _GLEE_ARB_fragment_program; +GLEE_EXTERN GLboolean _GLEE_ARB_vertex_buffer_object; +GLEE_EXTERN GLboolean _GLEE_ARB_occlusion_query; +GLEE_EXTERN GLboolean _GLEE_ARB_shader_objects; +GLEE_EXTERN GLboolean _GLEE_ARB_vertex_shader; +GLEE_EXTERN GLboolean _GLEE_ARB_fragment_shader; +GLEE_EXTERN GLboolean _GLEE_ARB_shading_language_100; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_non_power_of_two; +GLEE_EXTERN GLboolean _GLEE_ARB_point_sprite; +GLEE_EXTERN GLboolean _GLEE_ARB_fragment_program_shadow; +GLEE_EXTERN GLboolean _GLEE_ARB_draw_buffers; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_rectangle; +GLEE_EXTERN GLboolean _GLEE_ARB_color_buffer_float; +GLEE_EXTERN GLboolean _GLEE_ARB_half_float_pixel; +GLEE_EXTERN GLboolean _GLEE_ARB_texture_float; +GLEE_EXTERN GLboolean _GLEE_ARB_pixel_buffer_object; +GLEE_EXTERN GLboolean _GLEE_EXT_abgr; +GLEE_EXTERN GLboolean _GLEE_EXT_blend_color; +GLEE_EXTERN GLboolean _GLEE_EXT_polygon_offset; +GLEE_EXTERN GLboolean _GLEE_EXT_texture; +GLEE_EXTERN GLboolean _GLEE_EXT_texture3D; +GLEE_EXTERN GLboolean _GLEE_SGIS_texture_filter4; +GLEE_EXTERN GLboolean _GLEE_EXT_subtexture; +GLEE_EXTERN GLboolean _GLEE_EXT_copy_texture; +GLEE_EXTERN GLboolean _GLEE_EXT_histogram; +GLEE_EXTERN GLboolean _GLEE_EXT_convolution; +GLEE_EXTERN GLboolean _GLEE_SGI_color_matrix; +GLEE_EXTERN GLboolean _GLEE_SGI_color_table; +GLEE_EXTERN GLboolean _GLEE_SGIS_pixel_texture; +GLEE_EXTERN GLboolean _GLEE_SGIX_pixel_texture; +GLEE_EXTERN GLboolean _GLEE_SGIS_texture4D; +GLEE_EXTERN GLboolean _GLEE_SGI_texture_color_table; +GLEE_EXTERN GLboolean _GLEE_EXT_cmyka; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_object; +GLEE_EXTERN GLboolean _GLEE_SGIS_detail_texture; +GLEE_EXTERN GLboolean _GLEE_SGIS_sharpen_texture; +GLEE_EXTERN GLboolean _GLEE_EXT_packed_pixels; +GLEE_EXTERN GLboolean _GLEE_SGIS_texture_lod; +GLEE_EXTERN GLboolean _GLEE_SGIS_multisample; +GLEE_EXTERN GLboolean _GLEE_EXT_rescale_normal; +GLEE_EXTERN GLboolean _GLEE_EXT_vertex_array; +GLEE_EXTERN GLboolean _GLEE_EXT_misc_attribute; +GLEE_EXTERN GLboolean _GLEE_SGIS_generate_mipmap; +GLEE_EXTERN GLboolean _GLEE_SGIX_clipmap; +GLEE_EXTERN GLboolean _GLEE_SGIX_shadow; +GLEE_EXTERN GLboolean _GLEE_SGIS_texture_edge_clamp; +GLEE_EXTERN GLboolean _GLEE_SGIS_texture_border_clamp; +GLEE_EXTERN GLboolean _GLEE_EXT_blend_minmax; +GLEE_EXTERN GLboolean _GLEE_EXT_blend_subtract; +GLEE_EXTERN GLboolean _GLEE_EXT_blend_logic_op; +GLEE_EXTERN GLboolean _GLEE_SGIX_interlace; +GLEE_EXTERN GLboolean _GLEE_SGIX_pixel_tiles; +GLEE_EXTERN GLboolean _GLEE_SGIS_texture_select; +GLEE_EXTERN GLboolean _GLEE_SGIX_sprite; +GLEE_EXTERN GLboolean _GLEE_SGIX_texture_multi_buffer; +GLEE_EXTERN GLboolean _GLEE_EXT_point_parameters; +GLEE_EXTERN GLboolean _GLEE_SGIS_point_parameters; +GLEE_EXTERN GLboolean _GLEE_SGIX_instruments; +GLEE_EXTERN GLboolean _GLEE_SGIX_texture_scale_bias; +GLEE_EXTERN GLboolean _GLEE_SGIX_framezoom; +GLEE_EXTERN GLboolean _GLEE_SGIX_tag_sample_buffer; +GLEE_EXTERN GLboolean _GLEE_FfdMaskSGIX; +GLEE_EXTERN GLboolean _GLEE_SGIX_polynomial_ffd; +GLEE_EXTERN GLboolean _GLEE_SGIX_reference_plane; +GLEE_EXTERN GLboolean _GLEE_SGIX_flush_raster; +GLEE_EXTERN GLboolean _GLEE_SGIX_depth_texture; +GLEE_EXTERN GLboolean _GLEE_SGIS_fog_function; +GLEE_EXTERN GLboolean _GLEE_SGIX_fog_offset; +GLEE_EXTERN GLboolean _GLEE_HP_image_transform; +GLEE_EXTERN GLboolean _GLEE_HP_convolution_border_modes; +GLEE_EXTERN GLboolean _GLEE_INGR_palette_buffer; +GLEE_EXTERN GLboolean _GLEE_SGIX_texture_add_env; +GLEE_EXTERN GLboolean _GLEE_EXT_color_subtable; +GLEE_EXTERN GLboolean _GLEE_PGI_vertex_hints; +GLEE_EXTERN GLboolean _GLEE_PGI_misc_hints; +GLEE_EXTERN GLboolean _GLEE_EXT_paletted_texture; +GLEE_EXTERN GLboolean _GLEE_EXT_clip_volume_hint; +GLEE_EXTERN GLboolean _GLEE_SGIX_list_priority; +GLEE_EXTERN GLboolean _GLEE_SGIX_ir_instrument1; +GLEE_EXTERN GLboolean _GLEE_SGIX_calligraphic_fragment; +GLEE_EXTERN GLboolean _GLEE_SGIX_texture_lod_bias; +GLEE_EXTERN GLboolean _GLEE_SGIX_shadow_ambient; +GLEE_EXTERN GLboolean _GLEE_EXT_index_texture; +GLEE_EXTERN GLboolean _GLEE_EXT_index_material; +GLEE_EXTERN GLboolean _GLEE_EXT_index_func; +GLEE_EXTERN GLboolean _GLEE_EXT_index_array_formats; +GLEE_EXTERN GLboolean _GLEE_EXT_compiled_vertex_array; +GLEE_EXTERN GLboolean _GLEE_EXT_cull_vertex; +GLEE_EXTERN GLboolean _GLEE_SGIX_ycrcb; +GLEE_EXTERN GLboolean _GLEE_SGIX_fragment_lighting; +GLEE_EXTERN GLboolean _GLEE_IBM_rasterpos_clip; +GLEE_EXTERN GLboolean _GLEE_HP_texture_lighting; +GLEE_EXTERN GLboolean _GLEE_EXT_draw_range_elements; +GLEE_EXTERN GLboolean _GLEE_WIN_phong_shading; +GLEE_EXTERN GLboolean _GLEE_WIN_specular_fog; +GLEE_EXTERN GLboolean _GLEE_EXT_light_texture; +GLEE_EXTERN GLboolean _GLEE_SGIX_blend_alpha_minmax; +GLEE_EXTERN GLboolean _GLEE_SGIX_impact_pixel_texture; +GLEE_EXTERN GLboolean _GLEE_EXT_bgra; +GLEE_EXTERN GLboolean _GLEE_SGIX_async; +GLEE_EXTERN GLboolean _GLEE_SGIX_async_pixel; +GLEE_EXTERN GLboolean _GLEE_SGIX_async_histogram; +GLEE_EXTERN GLboolean _GLEE_INTEL_texture_scissor; +GLEE_EXTERN GLboolean _GLEE_INTEL_parallel_arrays; +GLEE_EXTERN GLboolean _GLEE_HP_occlusion_test; +GLEE_EXTERN GLboolean _GLEE_EXT_pixel_transform; +GLEE_EXTERN GLboolean _GLEE_EXT_pixel_transform_color_table; +GLEE_EXTERN GLboolean _GLEE_EXT_shared_texture_palette; +GLEE_EXTERN GLboolean _GLEE_EXT_separate_specular_color; +GLEE_EXTERN GLboolean _GLEE_EXT_secondary_color; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_perturb_normal; +GLEE_EXTERN GLboolean _GLEE_EXT_multi_draw_arrays; +GLEE_EXTERN GLboolean _GLEE_EXT_fog_coord; +GLEE_EXTERN GLboolean _GLEE_REND_screen_coordinates; +GLEE_EXTERN GLboolean _GLEE_EXT_coordinate_frame; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_env_combine; +GLEE_EXTERN GLboolean _GLEE_APPLE_specular_vector; +GLEE_EXTERN GLboolean _GLEE_APPLE_transform_hint; +GLEE_EXTERN GLboolean _GLEE_SGIX_fog_scale; +GLEE_EXTERN GLboolean _GLEE_SUNX_constant_data; +GLEE_EXTERN GLboolean _GLEE_SUN_global_alpha; +GLEE_EXTERN GLboolean _GLEE_SUN_triangle_list; +GLEE_EXTERN GLboolean _GLEE_SUN_vertex; +GLEE_EXTERN GLboolean _GLEE_EXT_blend_func_separate; +GLEE_EXTERN GLboolean _GLEE_INGR_color_clamp; +GLEE_EXTERN GLboolean _GLEE_INGR_interlace_read; +GLEE_EXTERN GLboolean _GLEE_EXT_stencil_wrap; +GLEE_EXTERN GLboolean _GLEE_EXT_422_pixels; +GLEE_EXTERN GLboolean _GLEE_NV_texgen_reflection; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_cube_map; +GLEE_EXTERN GLboolean _GLEE_SUN_convolution_border_modes; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_env_add; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_lod_bias; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_filter_anisotropic; +GLEE_EXTERN GLboolean _GLEE_EXT_vertex_weighting; +GLEE_EXTERN GLboolean _GLEE_NV_light_max_exponent; +GLEE_EXTERN GLboolean _GLEE_NV_vertex_array_range; +GLEE_EXTERN GLboolean _GLEE_NV_register_combiners; +GLEE_EXTERN GLboolean _GLEE_NV_fog_distance; +GLEE_EXTERN GLboolean _GLEE_NV_texgen_emboss; +GLEE_EXTERN GLboolean _GLEE_NV_blend_square; +GLEE_EXTERN GLboolean _GLEE_NV_texture_env_combine4; +GLEE_EXTERN GLboolean _GLEE_MESA_resize_buffers; +GLEE_EXTERN GLboolean _GLEE_MESA_window_pos; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_compression_s3tc; +GLEE_EXTERN GLboolean _GLEE_IBM_cull_vertex; +GLEE_EXTERN GLboolean _GLEE_IBM_multimode_draw_arrays; +GLEE_EXTERN GLboolean _GLEE_IBM_vertex_array_lists; +GLEE_EXTERN GLboolean _GLEE_SGIX_subsample; +GLEE_EXTERN GLboolean _GLEE_SGIX_ycrcb_subsample; +GLEE_EXTERN GLboolean _GLEE_SGIX_ycrcba; +GLEE_EXTERN GLboolean _GLEE_SGI_depth_pass_instrument; +GLEE_EXTERN GLboolean _GLEE_3DFX_texture_compression_FXT1; +GLEE_EXTERN GLboolean _GLEE_3DFX_multisample; +GLEE_EXTERN GLboolean _GLEE_3DFX_tbuffer; +GLEE_EXTERN GLboolean _GLEE_EXT_multisample; +GLEE_EXTERN GLboolean _GLEE_SGIX_vertex_preclip; +GLEE_EXTERN GLboolean _GLEE_SGIX_convolution_accuracy; +GLEE_EXTERN GLboolean _GLEE_SGIX_resample; +GLEE_EXTERN GLboolean _GLEE_SGIS_point_line_texgen; +GLEE_EXTERN GLboolean _GLEE_SGIS_texture_color_mask; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_env_dot3; +GLEE_EXTERN GLboolean _GLEE_ATI_texture_mirror_once; +GLEE_EXTERN GLboolean _GLEE_NV_fence; +GLEE_EXTERN GLboolean _GLEE_IBM_texture_mirrored_repeat; +GLEE_EXTERN GLboolean _GLEE_NV_evaluators; +GLEE_EXTERN GLboolean _GLEE_NV_packed_depth_stencil; +GLEE_EXTERN GLboolean _GLEE_NV_register_combiners2; +GLEE_EXTERN GLboolean _GLEE_NV_texture_compression_vtc; +GLEE_EXTERN GLboolean _GLEE_NV_texture_rectangle; +GLEE_EXTERN GLboolean _GLEE_NV_texture_shader; +GLEE_EXTERN GLboolean _GLEE_NV_texture_shader2; +GLEE_EXTERN GLboolean _GLEE_NV_vertex_array_range2; +GLEE_EXTERN GLboolean _GLEE_NV_vertex_program; +GLEE_EXTERN GLboolean _GLEE_SGIX_texture_coordinate_clamp; +GLEE_EXTERN GLboolean _GLEE_SGIX_scalebias_hint; +GLEE_EXTERN GLboolean _GLEE_OML_interlace; +GLEE_EXTERN GLboolean _GLEE_OML_subsample; +GLEE_EXTERN GLboolean _GLEE_OML_resample; +GLEE_EXTERN GLboolean _GLEE_NV_copy_depth_to_color; +GLEE_EXTERN GLboolean _GLEE_ATI_envmap_bumpmap; +GLEE_EXTERN GLboolean _GLEE_ATI_fragment_shader; +GLEE_EXTERN GLboolean _GLEE_ATI_pn_triangles; +GLEE_EXTERN GLboolean _GLEE_ATI_vertex_array_object; +GLEE_EXTERN GLboolean _GLEE_EXT_vertex_shader; +GLEE_EXTERN GLboolean _GLEE_ATI_vertex_streams; +GLEE_EXTERN GLboolean _GLEE_ATI_element_array; +GLEE_EXTERN GLboolean _GLEE_SUN_mesh_array; +GLEE_EXTERN GLboolean _GLEE_SUN_slice_accum; +GLEE_EXTERN GLboolean _GLEE_NV_multisample_filter_hint; +GLEE_EXTERN GLboolean _GLEE_NV_depth_clamp; +GLEE_EXTERN GLboolean _GLEE_NV_occlusion_query; +GLEE_EXTERN GLboolean _GLEE_NV_point_sprite; +GLEE_EXTERN GLboolean _GLEE_NV_texture_shader3; +GLEE_EXTERN GLboolean _GLEE_NV_vertex_program1_1; +GLEE_EXTERN GLboolean _GLEE_EXT_shadow_funcs; +GLEE_EXTERN GLboolean _GLEE_EXT_stencil_two_side; +GLEE_EXTERN GLboolean _GLEE_ATI_text_fragment_shader; +GLEE_EXTERN GLboolean _GLEE_APPLE_client_storage; +GLEE_EXTERN GLboolean _GLEE_APPLE_element_array; +GLEE_EXTERN GLboolean _GLEE_APPLE_fence; +GLEE_EXTERN GLboolean _GLEE_APPLE_vertex_array_object; +GLEE_EXTERN GLboolean _GLEE_APPLE_vertex_array_range; +GLEE_EXTERN GLboolean _GLEE_APPLE_ycbcr_422; +GLEE_EXTERN GLboolean _GLEE_S3_s3tc; +GLEE_EXTERN GLboolean _GLEE_ATI_draw_buffers; +GLEE_EXTERN GLboolean _GLEE_ATI_pixel_format_float; +GLEE_EXTERN GLboolean _GLEE_ATI_texture_env_combine3; +GLEE_EXTERN GLboolean _GLEE_ATI_texture_float; +GLEE_EXTERN GLboolean _GLEE_NV_float_buffer; +GLEE_EXTERN GLboolean _GLEE_NV_fragment_program; +GLEE_EXTERN GLboolean _GLEE_NV_half_float; +GLEE_EXTERN GLboolean _GLEE_NV_pixel_data_range; +GLEE_EXTERN GLboolean _GLEE_NV_primitive_restart; +GLEE_EXTERN GLboolean _GLEE_NV_texture_expand_normal; +GLEE_EXTERN GLboolean _GLEE_NV_vertex_program2; +GLEE_EXTERN GLboolean _GLEE_ATI_map_object_buffer; +GLEE_EXTERN GLboolean _GLEE_ATI_separate_stencil; +GLEE_EXTERN GLboolean _GLEE_ATI_vertex_attrib_array_object; +GLEE_EXTERN GLboolean _GLEE_OES_read_format; +GLEE_EXTERN GLboolean _GLEE_EXT_depth_bounds_test; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_mirror_clamp; +GLEE_EXTERN GLboolean _GLEE_EXT_blend_equation_separate; +GLEE_EXTERN GLboolean _GLEE_MESA_pack_invert; +GLEE_EXTERN GLboolean _GLEE_MESA_ycbcr_texture; +GLEE_EXTERN GLboolean _GLEE_EXT_pixel_buffer_object; +GLEE_EXTERN GLboolean _GLEE_NV_fragment_program_option; +GLEE_EXTERN GLboolean _GLEE_NV_fragment_program2; +GLEE_EXTERN GLboolean _GLEE_NV_vertex_program2_option; +GLEE_EXTERN GLboolean _GLEE_NV_vertex_program3; +GLEE_EXTERN GLboolean _GLEE_EXT_framebuffer_object; +GLEE_EXTERN GLboolean _GLEE_GREMEDY_string_marker; +GLEE_EXTERN GLboolean _GLEE_EXT_Cg_shader; +GLEE_EXTERN GLboolean _GLEE_EXT_timer_query; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_buffer_object; +GLEE_EXTERN GLboolean _GLEE_EXT_gpu_shader4; +GLEE_EXTERN GLboolean _GLEE_EXT_geometry_shader4; +GLEE_EXTERN GLboolean _GLEE_EXT_bindable_uniform; +GLEE_EXTERN GLboolean _GLEE_EXT_framebuffer_sRGB; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_shared_exponent; +GLEE_EXTERN GLboolean _GLEE_EXT_packed_float; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_array; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_integer; +GLEE_EXTERN GLboolean _GLEE_NV_depth_buffer_float; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_compression_latc; +GLEE_EXTERN GLboolean _GLEE_NV_transform_feedback; +GLEE_EXTERN GLboolean _GLEE_NV_geometry_program4; +GLEE_EXTERN GLboolean _GLEE_NV_gpu_program4; +GLEE_EXTERN GLboolean _GLEE_NV_framebuffer_multisample_coverage; +GLEE_EXTERN GLboolean _GLEE_EXT_framebuffer_multisample; +GLEE_EXTERN GLboolean _GLEE_EXT_framebuffer_blit; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_compression_rgtc; +GLEE_EXTERN GLboolean _GLEE_EXT_color_matrix; +GLEE_EXTERN GLboolean _GLEE_SGIX_texture_select; +GLEE_EXTERN GLboolean _GLEE_INGR_blend_func_separate; +GLEE_EXTERN GLboolean _GLEE_SGIX_depth_pass_instrument; +GLEE_EXTERN GLboolean _GLEE_SGIX_igloo_interface; +GLEE_EXTERN GLboolean _GLEE_EXT_draw_buffers2; +GLEE_EXTERN GLboolean _GLEE_NV_parameter_buffer_object; +GLEE_EXTERN GLboolean _GLEE_EXT_draw_instanced; +GLEE_EXTERN GLboolean _GLEE_EXT_fragment_lighting; +GLEE_EXTERN GLboolean _GLEE_EXT_packed_depth_stencil; +GLEE_EXTERN GLboolean _GLEE_EXT_scene_marker; +GLEE_EXTERN GLboolean _GLEE_EXT_stencil_clear_tag; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_compression_dxt1; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_env; +GLEE_EXTERN GLboolean _GLEE_EXT_texture_sRGB; +GLEE_EXTERN GLboolean _GLEE_IBM_static_data; +GLEE_EXTERN GLboolean _GLEE_MESAX_texture_stack; +GLEE_EXTERN GLboolean _GLEE_OES_byte_coordinates; +GLEE_EXTERN GLboolean _GLEE_OES_compressed_paletted_texture; +GLEE_EXTERN GLboolean _GLEE_OES_single_precision; +GLEE_EXTERN GLboolean _GLEE_SGIX_pixel_texture_bits; +GLEE_EXTERN GLboolean _GLEE_SGIX_texture_range; + +/* Aliases for extension querying variables */ + +#define GLEE_VERSION_1_2 GLeeEnabled(&_GLEE_VERSION_1_2) +#define GLEE_ARB_imaging GLeeEnabled(&_GLEE_ARB_imaging) +#define GLEE_VERSION_1_3 GLeeEnabled(&_GLEE_VERSION_1_3) +#define GLEE_VERSION_1_4 GLeeEnabled(&_GLEE_VERSION_1_4) +#define GLEE_VERSION_1_5 GLeeEnabled(&_GLEE_VERSION_1_5) +#define GLEE_VERSION_2_0 GLeeEnabled(&_GLEE_VERSION_2_0) +#define GLEE_VERSION_2_1 GLeeEnabled(&_GLEE_VERSION_2_1) +#define GLEE_ARB_multitexture GLeeEnabled(&_GLEE_ARB_multitexture) +#define GLEE_ARB_transpose_matrix GLeeEnabled(&_GLEE_ARB_transpose_matrix) +#define GLEE_ARB_multisample GLeeEnabled(&_GLEE_ARB_multisample) +#define GLEE_ARB_texture_env_add GLeeEnabled(&_GLEE_ARB_texture_env_add) +#define GLEE_ARB_texture_cube_map GLeeEnabled(&_GLEE_ARB_texture_cube_map) +#define GLEE_ARB_texture_compression GLeeEnabled(&_GLEE_ARB_texture_compression) +#define GLEE_ARB_texture_border_clamp GLeeEnabled(&_GLEE_ARB_texture_border_clamp) +#define GLEE_ARB_point_parameters GLeeEnabled(&_GLEE_ARB_point_parameters) +#define GLEE_ARB_vertex_blend GLeeEnabled(&_GLEE_ARB_vertex_blend) +#define GLEE_ARB_matrix_palette GLeeEnabled(&_GLEE_ARB_matrix_palette) +#define GLEE_ARB_texture_env_combine GLeeEnabled(&_GLEE_ARB_texture_env_combine) +#define GLEE_ARB_texture_env_crossbar GLeeEnabled(&_GLEE_ARB_texture_env_crossbar) +#define GLEE_ARB_texture_env_dot3 GLeeEnabled(&_GLEE_ARB_texture_env_dot3) +#define GLEE_ARB_texture_mirrored_repeat GLeeEnabled(&_GLEE_ARB_texture_mirrored_repeat) +#define GLEE_ARB_depth_texture GLeeEnabled(&_GLEE_ARB_depth_texture) +#define GLEE_ARB_shadow GLeeEnabled(&_GLEE_ARB_shadow) +#define GLEE_ARB_shadow_ambient GLeeEnabled(&_GLEE_ARB_shadow_ambient) +#define GLEE_ARB_window_pos GLeeEnabled(&_GLEE_ARB_window_pos) +#define GLEE_ARB_vertex_program GLeeEnabled(&_GLEE_ARB_vertex_program) +#define GLEE_ARB_fragment_program GLeeEnabled(&_GLEE_ARB_fragment_program) +#define GLEE_ARB_vertex_buffer_object GLeeEnabled(&_GLEE_ARB_vertex_buffer_object) +#define GLEE_ARB_occlusion_query GLeeEnabled(&_GLEE_ARB_occlusion_query) +#define GLEE_ARB_shader_objects GLeeEnabled(&_GLEE_ARB_shader_objects) +#define GLEE_ARB_vertex_shader GLeeEnabled(&_GLEE_ARB_vertex_shader) +#define GLEE_ARB_fragment_shader GLeeEnabled(&_GLEE_ARB_fragment_shader) +#define GLEE_ARB_shading_language_100 GLeeEnabled(&_GLEE_ARB_shading_language_100) +#define GLEE_ARB_texture_non_power_of_two GLeeEnabled(&_GLEE_ARB_texture_non_power_of_two) +#define GLEE_ARB_point_sprite GLeeEnabled(&_GLEE_ARB_point_sprite) +#define GLEE_ARB_fragment_program_shadow GLeeEnabled(&_GLEE_ARB_fragment_program_shadow) +#define GLEE_ARB_draw_buffers GLeeEnabled(&_GLEE_ARB_draw_buffers) +#define GLEE_ARB_texture_rectangle GLeeEnabled(&_GLEE_ARB_texture_rectangle) +#define GLEE_ARB_color_buffer_float GLeeEnabled(&_GLEE_ARB_color_buffer_float) +#define GLEE_ARB_half_float_pixel GLeeEnabled(&_GLEE_ARB_half_float_pixel) +#define GLEE_ARB_texture_float GLeeEnabled(&_GLEE_ARB_texture_float) +#define GLEE_ARB_pixel_buffer_object GLeeEnabled(&_GLEE_ARB_pixel_buffer_object) +#define GLEE_EXT_abgr GLeeEnabled(&_GLEE_EXT_abgr) +#define GLEE_EXT_blend_color GLeeEnabled(&_GLEE_EXT_blend_color) +#define GLEE_EXT_polygon_offset GLeeEnabled(&_GLEE_EXT_polygon_offset) +#define GLEE_EXT_texture GLeeEnabled(&_GLEE_EXT_texture) +#define GLEE_EXT_texture3D GLeeEnabled(&_GLEE_EXT_texture3D) +#define GLEE_SGIS_texture_filter4 GLeeEnabled(&_GLEE_SGIS_texture_filter4) +#define GLEE_EXT_subtexture GLeeEnabled(&_GLEE_EXT_subtexture) +#define GLEE_EXT_copy_texture GLeeEnabled(&_GLEE_EXT_copy_texture) +#define GLEE_EXT_histogram GLeeEnabled(&_GLEE_EXT_histogram) +#define GLEE_EXT_convolution GLeeEnabled(&_GLEE_EXT_convolution) +#define GLEE_SGI_color_matrix GLeeEnabled(&_GLEE_SGI_color_matrix) +#define GLEE_SGI_color_table GLeeEnabled(&_GLEE_SGI_color_table) +#define GLEE_SGIS_pixel_texture GLeeEnabled(&_GLEE_SGIS_pixel_texture) +#define GLEE_SGIX_pixel_texture GLeeEnabled(&_GLEE_SGIX_pixel_texture) +#define GLEE_SGIS_texture4D GLeeEnabled(&_GLEE_SGIS_texture4D) +#define GLEE_SGI_texture_color_table GLeeEnabled(&_GLEE_SGI_texture_color_table) +#define GLEE_EXT_cmyka GLeeEnabled(&_GLEE_EXT_cmyka) +#define GLEE_EXT_texture_object GLeeEnabled(&_GLEE_EXT_texture_object) +#define GLEE_SGIS_detail_texture GLeeEnabled(&_GLEE_SGIS_detail_texture) +#define GLEE_SGIS_sharpen_texture GLeeEnabled(&_GLEE_SGIS_sharpen_texture) +#define GLEE_EXT_packed_pixels GLeeEnabled(&_GLEE_EXT_packed_pixels) +#define GLEE_SGIS_texture_lod GLeeEnabled(&_GLEE_SGIS_texture_lod) +#define GLEE_SGIS_multisample GLeeEnabled(&_GLEE_SGIS_multisample) +#define GLEE_EXT_rescale_normal GLeeEnabled(&_GLEE_EXT_rescale_normal) +#define GLEE_EXT_vertex_array GLeeEnabled(&_GLEE_EXT_vertex_array) +#define GLEE_EXT_misc_attribute GLeeEnabled(&_GLEE_EXT_misc_attribute) +#define GLEE_SGIS_generate_mipmap GLeeEnabled(&_GLEE_SGIS_generate_mipmap) +#define GLEE_SGIX_clipmap GLeeEnabled(&_GLEE_SGIX_clipmap) +#define GLEE_SGIX_shadow GLeeEnabled(&_GLEE_SGIX_shadow) +#define GLEE_SGIS_texture_edge_clamp GLeeEnabled(&_GLEE_SGIS_texture_edge_clamp) +#define GLEE_SGIS_texture_border_clamp GLeeEnabled(&_GLEE_SGIS_texture_border_clamp) +#define GLEE_EXT_blend_minmax GLeeEnabled(&_GLEE_EXT_blend_minmax) +#define GLEE_EXT_blend_subtract GLeeEnabled(&_GLEE_EXT_blend_subtract) +#define GLEE_EXT_blend_logic_op GLeeEnabled(&_GLEE_EXT_blend_logic_op) +#define GLEE_SGIX_interlace GLeeEnabled(&_GLEE_SGIX_interlace) +#define GLEE_SGIX_pixel_tiles GLeeEnabled(&_GLEE_SGIX_pixel_tiles) +#define GLEE_SGIS_texture_select GLeeEnabled(&_GLEE_SGIS_texture_select) +#define GLEE_SGIX_sprite GLeeEnabled(&_GLEE_SGIX_sprite) +#define GLEE_SGIX_texture_multi_buffer GLeeEnabled(&_GLEE_SGIX_texture_multi_buffer) +#define GLEE_EXT_point_parameters GLeeEnabled(&_GLEE_EXT_point_parameters) +#define GLEE_SGIS_point_parameters GLeeEnabled(&_GLEE_SGIS_point_parameters) +#define GLEE_SGIX_instruments GLeeEnabled(&_GLEE_SGIX_instruments) +#define GLEE_SGIX_texture_scale_bias GLeeEnabled(&_GLEE_SGIX_texture_scale_bias) +#define GLEE_SGIX_framezoom GLeeEnabled(&_GLEE_SGIX_framezoom) +#define GLEE_SGIX_tag_sample_buffer GLeeEnabled(&_GLEE_SGIX_tag_sample_buffer) +#define GLEE_FfdMaskSGIX GLeeEnabled(&_GLEE_FfdMaskSGIX) +#define GLEE_SGIX_polynomial_ffd GLeeEnabled(&_GLEE_SGIX_polynomial_ffd) +#define GLEE_SGIX_reference_plane GLeeEnabled(&_GLEE_SGIX_reference_plane) +#define GLEE_SGIX_flush_raster GLeeEnabled(&_GLEE_SGIX_flush_raster) +#define GLEE_SGIX_depth_texture GLeeEnabled(&_GLEE_SGIX_depth_texture) +#define GLEE_SGIS_fog_function GLeeEnabled(&_GLEE_SGIS_fog_function) +#define GLEE_SGIX_fog_offset GLeeEnabled(&_GLEE_SGIX_fog_offset) +#define GLEE_HP_image_transform GLeeEnabled(&_GLEE_HP_image_transform) +#define GLEE_HP_convolution_border_modes GLeeEnabled(&_GLEE_HP_convolution_border_modes) +#define GLEE_INGR_palette_buffer GLeeEnabled(&_GLEE_INGR_palette_buffer) +#define GLEE_SGIX_texture_add_env GLeeEnabled(&_GLEE_SGIX_texture_add_env) +#define GLEE_EXT_color_subtable GLeeEnabled(&_GLEE_EXT_color_subtable) +#define GLEE_PGI_vertex_hints GLeeEnabled(&_GLEE_PGI_vertex_hints) +#define GLEE_PGI_misc_hints GLeeEnabled(&_GLEE_PGI_misc_hints) +#define GLEE_EXT_paletted_texture GLeeEnabled(&_GLEE_EXT_paletted_texture) +#define GLEE_EXT_clip_volume_hint GLeeEnabled(&_GLEE_EXT_clip_volume_hint) +#define GLEE_SGIX_list_priority GLeeEnabled(&_GLEE_SGIX_list_priority) +#define GLEE_SGIX_ir_instrument1 GLeeEnabled(&_GLEE_SGIX_ir_instrument1) +#define GLEE_SGIX_calligraphic_fragment GLeeEnabled(&_GLEE_SGIX_calligraphic_fragment) +#define GLEE_SGIX_texture_lod_bias GLeeEnabled(&_GLEE_SGIX_texture_lod_bias) +#define GLEE_SGIX_shadow_ambient GLeeEnabled(&_GLEE_SGIX_shadow_ambient) +#define GLEE_EXT_index_texture GLeeEnabled(&_GLEE_EXT_index_texture) +#define GLEE_EXT_index_material GLeeEnabled(&_GLEE_EXT_index_material) +#define GLEE_EXT_index_func GLeeEnabled(&_GLEE_EXT_index_func) +#define GLEE_EXT_index_array_formats GLeeEnabled(&_GLEE_EXT_index_array_formats) +#define GLEE_EXT_compiled_vertex_array GLeeEnabled(&_GLEE_EXT_compiled_vertex_array) +#define GLEE_EXT_cull_vertex GLeeEnabled(&_GLEE_EXT_cull_vertex) +#define GLEE_SGIX_ycrcb GLeeEnabled(&_GLEE_SGIX_ycrcb) +#define GLEE_SGIX_fragment_lighting GLeeEnabled(&_GLEE_SGIX_fragment_lighting) +#define GLEE_IBM_rasterpos_clip GLeeEnabled(&_GLEE_IBM_rasterpos_clip) +#define GLEE_HP_texture_lighting GLeeEnabled(&_GLEE_HP_texture_lighting) +#define GLEE_EXT_draw_range_elements GLeeEnabled(&_GLEE_EXT_draw_range_elements) +#define GLEE_WIN_phong_shading GLeeEnabled(&_GLEE_WIN_phong_shading) +#define GLEE_WIN_specular_fog GLeeEnabled(&_GLEE_WIN_specular_fog) +#define GLEE_EXT_light_texture GLeeEnabled(&_GLEE_EXT_light_texture) +#define GLEE_SGIX_blend_alpha_minmax GLeeEnabled(&_GLEE_SGIX_blend_alpha_minmax) +#define GLEE_SGIX_impact_pixel_texture GLeeEnabled(&_GLEE_SGIX_impact_pixel_texture) +#define GLEE_EXT_bgra GLeeEnabled(&_GLEE_EXT_bgra) +#define GLEE_SGIX_async GLeeEnabled(&_GLEE_SGIX_async) +#define GLEE_SGIX_async_pixel GLeeEnabled(&_GLEE_SGIX_async_pixel) +#define GLEE_SGIX_async_histogram GLeeEnabled(&_GLEE_SGIX_async_histogram) +#define GLEE_INTEL_texture_scissor GLeeEnabled(&_GLEE_INTEL_texture_scissor) +#define GLEE_INTEL_parallel_arrays GLeeEnabled(&_GLEE_INTEL_parallel_arrays) +#define GLEE_HP_occlusion_test GLeeEnabled(&_GLEE_HP_occlusion_test) +#define GLEE_EXT_pixel_transform GLeeEnabled(&_GLEE_EXT_pixel_transform) +#define GLEE_EXT_pixel_transform_color_table GLeeEnabled(&_GLEE_EXT_pixel_transform_color_table) +#define GLEE_EXT_shared_texture_palette GLeeEnabled(&_GLEE_EXT_shared_texture_palette) +#define GLEE_EXT_separate_specular_color GLeeEnabled(&_GLEE_EXT_separate_specular_color) +#define GLEE_EXT_secondary_color GLeeEnabled(&_GLEE_EXT_secondary_color) +#define GLEE_EXT_texture_perturb_normal GLeeEnabled(&_GLEE_EXT_texture_perturb_normal) +#define GLEE_EXT_multi_draw_arrays GLeeEnabled(&_GLEE_EXT_multi_draw_arrays) +#define GLEE_EXT_fog_coord GLeeEnabled(&_GLEE_EXT_fog_coord) +#define GLEE_REND_screen_coordinates GLeeEnabled(&_GLEE_REND_screen_coordinates) +#define GLEE_EXT_coordinate_frame GLeeEnabled(&_GLEE_EXT_coordinate_frame) +#define GLEE_EXT_texture_env_combine GLeeEnabled(&_GLEE_EXT_texture_env_combine) +#define GLEE_APPLE_specular_vector GLeeEnabled(&_GLEE_APPLE_specular_vector) +#define GLEE_APPLE_transform_hint GLeeEnabled(&_GLEE_APPLE_transform_hint) +#define GLEE_SGIX_fog_scale GLeeEnabled(&_GLEE_SGIX_fog_scale) +#define GLEE_SUNX_constant_data GLeeEnabled(&_GLEE_SUNX_constant_data) +#define GLEE_SUN_global_alpha GLeeEnabled(&_GLEE_SUN_global_alpha) +#define GLEE_SUN_triangle_list GLeeEnabled(&_GLEE_SUN_triangle_list) +#define GLEE_SUN_vertex GLeeEnabled(&_GLEE_SUN_vertex) +#define GLEE_EXT_blend_func_separate GLeeEnabled(&_GLEE_EXT_blend_func_separate) +#define GLEE_INGR_color_clamp GLeeEnabled(&_GLEE_INGR_color_clamp) +#define GLEE_INGR_interlace_read GLeeEnabled(&_GLEE_INGR_interlace_read) +#define GLEE_EXT_stencil_wrap GLeeEnabled(&_GLEE_EXT_stencil_wrap) +#define GLEE_EXT_422_pixels GLeeEnabled(&_GLEE_EXT_422_pixels) +#define GLEE_NV_texgen_reflection GLeeEnabled(&_GLEE_NV_texgen_reflection) +#define GLEE_EXT_texture_cube_map GLeeEnabled(&_GLEE_EXT_texture_cube_map) +#define GLEE_SUN_convolution_border_modes GLeeEnabled(&_GLEE_SUN_convolution_border_modes) +#define GLEE_EXT_texture_env_add GLeeEnabled(&_GLEE_EXT_texture_env_add) +#define GLEE_EXT_texture_lod_bias GLeeEnabled(&_GLEE_EXT_texture_lod_bias) +#define GLEE_EXT_texture_filter_anisotropic GLeeEnabled(&_GLEE_EXT_texture_filter_anisotropic) +#define GLEE_EXT_vertex_weighting GLeeEnabled(&_GLEE_EXT_vertex_weighting) +#define GLEE_NV_light_max_exponent GLeeEnabled(&_GLEE_NV_light_max_exponent) +#define GLEE_NV_vertex_array_range GLeeEnabled(&_GLEE_NV_vertex_array_range) +#define GLEE_NV_register_combiners GLeeEnabled(&_GLEE_NV_register_combiners) +#define GLEE_NV_fog_distance GLeeEnabled(&_GLEE_NV_fog_distance) +#define GLEE_NV_texgen_emboss GLeeEnabled(&_GLEE_NV_texgen_emboss) +#define GLEE_NV_blend_square GLeeEnabled(&_GLEE_NV_blend_square) +#define GLEE_NV_texture_env_combine4 GLeeEnabled(&_GLEE_NV_texture_env_combine4) +#define GLEE_MESA_resize_buffers GLeeEnabled(&_GLEE_MESA_resize_buffers) +#define GLEE_MESA_window_pos GLeeEnabled(&_GLEE_MESA_window_pos) +#define GLEE_EXT_texture_compression_s3tc GLeeEnabled(&_GLEE_EXT_texture_compression_s3tc) +#define GLEE_IBM_cull_vertex GLeeEnabled(&_GLEE_IBM_cull_vertex) +#define GLEE_IBM_multimode_draw_arrays GLeeEnabled(&_GLEE_IBM_multimode_draw_arrays) +#define GLEE_IBM_vertex_array_lists GLeeEnabled(&_GLEE_IBM_vertex_array_lists) +#define GLEE_SGIX_subsample GLeeEnabled(&_GLEE_SGIX_subsample) +#define GLEE_SGIX_ycrcb_subsample GLeeEnabled(&_GLEE_SGIX_ycrcb_subsample) +#define GLEE_SGIX_ycrcba GLeeEnabled(&_GLEE_SGIX_ycrcba) +#define GLEE_SGI_depth_pass_instrument GLeeEnabled(&_GLEE_SGI_depth_pass_instrument) +#define GLEE_3DFX_texture_compression_FXT1 GLeeEnabled(&_GLEE_3DFX_texture_compression_FXT1) +#define GLEE_3DFX_multisample GLeeEnabled(&_GLEE_3DFX_multisample) +#define GLEE_3DFX_tbuffer GLeeEnabled(&_GLEE_3DFX_tbuffer) +#define GLEE_EXT_multisample GLeeEnabled(&_GLEE_EXT_multisample) +#define GLEE_SGIX_vertex_preclip GLeeEnabled(&_GLEE_SGIX_vertex_preclip) +#define GLEE_SGIX_convolution_accuracy GLeeEnabled(&_GLEE_SGIX_convolution_accuracy) +#define GLEE_SGIX_resample GLeeEnabled(&_GLEE_SGIX_resample) +#define GLEE_SGIS_point_line_texgen GLeeEnabled(&_GLEE_SGIS_point_line_texgen) +#define GLEE_SGIS_texture_color_mask GLeeEnabled(&_GLEE_SGIS_texture_color_mask) +#define GLEE_EXT_texture_env_dot3 GLeeEnabled(&_GLEE_EXT_texture_env_dot3) +#define GLEE_ATI_texture_mirror_once GLeeEnabled(&_GLEE_ATI_texture_mirror_once) +#define GLEE_NV_fence GLeeEnabled(&_GLEE_NV_fence) +#define GLEE_IBM_texture_mirrored_repeat GLeeEnabled(&_GLEE_IBM_texture_mirrored_repeat) +#define GLEE_NV_evaluators GLeeEnabled(&_GLEE_NV_evaluators) +#define GLEE_NV_packed_depth_stencil GLeeEnabled(&_GLEE_NV_packed_depth_stencil) +#define GLEE_NV_register_combiners2 GLeeEnabled(&_GLEE_NV_register_combiners2) +#define GLEE_NV_texture_compression_vtc GLeeEnabled(&_GLEE_NV_texture_compression_vtc) +#define GLEE_NV_texture_rectangle GLeeEnabled(&_GLEE_NV_texture_rectangle) +#define GLEE_NV_texture_shader GLeeEnabled(&_GLEE_NV_texture_shader) +#define GLEE_NV_texture_shader2 GLeeEnabled(&_GLEE_NV_texture_shader2) +#define GLEE_NV_vertex_array_range2 GLeeEnabled(&_GLEE_NV_vertex_array_range2) +#define GLEE_NV_vertex_program GLeeEnabled(&_GLEE_NV_vertex_program) +#define GLEE_SGIX_texture_coordinate_clamp GLeeEnabled(&_GLEE_SGIX_texture_coordinate_clamp) +#define GLEE_SGIX_scalebias_hint GLeeEnabled(&_GLEE_SGIX_scalebias_hint) +#define GLEE_OML_interlace GLeeEnabled(&_GLEE_OML_interlace) +#define GLEE_OML_subsample GLeeEnabled(&_GLEE_OML_subsample) +#define GLEE_OML_resample GLeeEnabled(&_GLEE_OML_resample) +#define GLEE_NV_copy_depth_to_color GLeeEnabled(&_GLEE_NV_copy_depth_to_color) +#define GLEE_ATI_envmap_bumpmap GLeeEnabled(&_GLEE_ATI_envmap_bumpmap) +#define GLEE_ATI_fragment_shader GLeeEnabled(&_GLEE_ATI_fragment_shader) +#define GLEE_ATI_pn_triangles GLeeEnabled(&_GLEE_ATI_pn_triangles) +#define GLEE_ATI_vertex_array_object GLeeEnabled(&_GLEE_ATI_vertex_array_object) +#define GLEE_EXT_vertex_shader GLeeEnabled(&_GLEE_EXT_vertex_shader) +#define GLEE_ATI_vertex_streams GLeeEnabled(&_GLEE_ATI_vertex_streams) +#define GLEE_ATI_element_array GLeeEnabled(&_GLEE_ATI_element_array) +#define GLEE_SUN_mesh_array GLeeEnabled(&_GLEE_SUN_mesh_array) +#define GLEE_SUN_slice_accum GLeeEnabled(&_GLEE_SUN_slice_accum) +#define GLEE_NV_multisample_filter_hint GLeeEnabled(&_GLEE_NV_multisample_filter_hint) +#define GLEE_NV_depth_clamp GLeeEnabled(&_GLEE_NV_depth_clamp) +#define GLEE_NV_occlusion_query GLeeEnabled(&_GLEE_NV_occlusion_query) +#define GLEE_NV_point_sprite GLeeEnabled(&_GLEE_NV_point_sprite) +#define GLEE_NV_texture_shader3 GLeeEnabled(&_GLEE_NV_texture_shader3) +#define GLEE_NV_vertex_program1_1 GLeeEnabled(&_GLEE_NV_vertex_program1_1) +#define GLEE_EXT_shadow_funcs GLeeEnabled(&_GLEE_EXT_shadow_funcs) +#define GLEE_EXT_stencil_two_side GLeeEnabled(&_GLEE_EXT_stencil_two_side) +#define GLEE_ATI_text_fragment_shader GLeeEnabled(&_GLEE_ATI_text_fragment_shader) +#define GLEE_APPLE_client_storage GLeeEnabled(&_GLEE_APPLE_client_storage) +#define GLEE_APPLE_element_array GLeeEnabled(&_GLEE_APPLE_element_array) +#define GLEE_APPLE_fence GLeeEnabled(&_GLEE_APPLE_fence) +#define GLEE_APPLE_vertex_array_object GLeeEnabled(&_GLEE_APPLE_vertex_array_object) +#define GLEE_APPLE_vertex_array_range GLeeEnabled(&_GLEE_APPLE_vertex_array_range) +#define GLEE_APPLE_ycbcr_422 GLeeEnabled(&_GLEE_APPLE_ycbcr_422) +#define GLEE_S3_s3tc GLeeEnabled(&_GLEE_S3_s3tc) +#define GLEE_ATI_draw_buffers GLeeEnabled(&_GLEE_ATI_draw_buffers) +#define GLEE_ATI_pixel_format_float GLeeEnabled(&_GLEE_ATI_pixel_format_float) +#define GLEE_ATI_texture_env_combine3 GLeeEnabled(&_GLEE_ATI_texture_env_combine3) +#define GLEE_ATI_texture_float GLeeEnabled(&_GLEE_ATI_texture_float) +#define GLEE_NV_float_buffer GLeeEnabled(&_GLEE_NV_float_buffer) +#define GLEE_NV_fragment_program GLeeEnabled(&_GLEE_NV_fragment_program) +#define GLEE_NV_half_float GLeeEnabled(&_GLEE_NV_half_float) +#define GLEE_NV_pixel_data_range GLeeEnabled(&_GLEE_NV_pixel_data_range) +#define GLEE_NV_primitive_restart GLeeEnabled(&_GLEE_NV_primitive_restart) +#define GLEE_NV_texture_expand_normal GLeeEnabled(&_GLEE_NV_texture_expand_normal) +#define GLEE_NV_vertex_program2 GLeeEnabled(&_GLEE_NV_vertex_program2) +#define GLEE_ATI_map_object_buffer GLeeEnabled(&_GLEE_ATI_map_object_buffer) +#define GLEE_ATI_separate_stencil GLeeEnabled(&_GLEE_ATI_separate_stencil) +#define GLEE_ATI_vertex_attrib_array_object GLeeEnabled(&_GLEE_ATI_vertex_attrib_array_object) +#define GLEE_OES_read_format GLeeEnabled(&_GLEE_OES_read_format) +#define GLEE_EXT_depth_bounds_test GLeeEnabled(&_GLEE_EXT_depth_bounds_test) +#define GLEE_EXT_texture_mirror_clamp GLeeEnabled(&_GLEE_EXT_texture_mirror_clamp) +#define GLEE_EXT_blend_equation_separate GLeeEnabled(&_GLEE_EXT_blend_equation_separate) +#define GLEE_MESA_pack_invert GLeeEnabled(&_GLEE_MESA_pack_invert) +#define GLEE_MESA_ycbcr_texture GLeeEnabled(&_GLEE_MESA_ycbcr_texture) +#define GLEE_EXT_pixel_buffer_object GLeeEnabled(&_GLEE_EXT_pixel_buffer_object) +#define GLEE_NV_fragment_program_option GLeeEnabled(&_GLEE_NV_fragment_program_option) +#define GLEE_NV_fragment_program2 GLeeEnabled(&_GLEE_NV_fragment_program2) +#define GLEE_NV_vertex_program2_option GLeeEnabled(&_GLEE_NV_vertex_program2_option) +#define GLEE_NV_vertex_program3 GLeeEnabled(&_GLEE_NV_vertex_program3) +#define GLEE_EXT_framebuffer_object GLeeEnabled(&_GLEE_EXT_framebuffer_object) +#define GLEE_GREMEDY_string_marker GLeeEnabled(&_GLEE_GREMEDY_string_marker) +#define GLEE_EXT_Cg_shader GLeeEnabled(&_GLEE_EXT_Cg_shader) +#define GLEE_EXT_timer_query GLeeEnabled(&_GLEE_EXT_timer_query) +#define GLEE_EXT_texture_buffer_object GLeeEnabled(&_GLEE_EXT_texture_buffer_object) +#define GLEE_EXT_gpu_shader4 GLeeEnabled(&_GLEE_EXT_gpu_shader4) +#define GLEE_EXT_geometry_shader4 GLeeEnabled(&_GLEE_EXT_geometry_shader4) +#define GLEE_EXT_bindable_uniform GLeeEnabled(&_GLEE_EXT_bindable_uniform) +#define GLEE_EXT_framebuffer_sRGB GLeeEnabled(&_GLEE_EXT_framebuffer_sRGB) +#define GLEE_EXT_texture_shared_exponent GLeeEnabled(&_GLEE_EXT_texture_shared_exponent) +#define GLEE_EXT_packed_float GLeeEnabled(&_GLEE_EXT_packed_float) +#define GLEE_EXT_texture_array GLeeEnabled(&_GLEE_EXT_texture_array) +#define GLEE_EXT_texture_integer GLeeEnabled(&_GLEE_EXT_texture_integer) +#define GLEE_NV_depth_buffer_float GLeeEnabled(&_GLEE_NV_depth_buffer_float) +#define GLEE_EXT_texture_compression_latc GLeeEnabled(&_GLEE_EXT_texture_compression_latc) +#define GLEE_NV_transform_feedback GLeeEnabled(&_GLEE_NV_transform_feedback) +#define GLEE_NV_geometry_program4 GLeeEnabled(&_GLEE_NV_geometry_program4) +#define GLEE_NV_gpu_program4 GLeeEnabled(&_GLEE_NV_gpu_program4) +#define GLEE_NV_framebuffer_multisample_coverage GLeeEnabled(&_GLEE_NV_framebuffer_multisample_coverage) +#define GLEE_EXT_framebuffer_multisample GLeeEnabled(&_GLEE_EXT_framebuffer_multisample) +#define GLEE_EXT_framebuffer_blit GLeeEnabled(&_GLEE_EXT_framebuffer_blit) +#define GLEE_EXT_texture_compression_rgtc GLeeEnabled(&_GLEE_EXT_texture_compression_rgtc) +#define GLEE_EXT_color_matrix GLeeEnabled(&_GLEE_EXT_color_matrix) +#define GLEE_SGIX_texture_select GLeeEnabled(&_GLEE_SGIX_texture_select) +#define GLEE_INGR_blend_func_separate GLeeEnabled(&_GLEE_INGR_blend_func_separate) +#define GLEE_SGIX_depth_pass_instrument GLeeEnabled(&_GLEE_SGIX_depth_pass_instrument) +#define GLEE_SGIX_igloo_interface GLeeEnabled(&_GLEE_SGIX_igloo_interface) +#define GLEE_EXT_draw_buffers2 GLeeEnabled(&_GLEE_EXT_draw_buffers2) +#define GLEE_NV_parameter_buffer_object GLeeEnabled(&_GLEE_NV_parameter_buffer_object) +#define GLEE_EXT_draw_instanced GLeeEnabled(&_GLEE_EXT_draw_instanced) +#define GLEE_EXT_fragment_lighting GLeeEnabled(&_GLEE_EXT_fragment_lighting) +#define GLEE_EXT_packed_depth_stencil GLeeEnabled(&_GLEE_EXT_packed_depth_stencil) +#define GLEE_EXT_scene_marker GLeeEnabled(&_GLEE_EXT_scene_marker) +#define GLEE_EXT_stencil_clear_tag GLeeEnabled(&_GLEE_EXT_stencil_clear_tag) +#define GLEE_EXT_texture_compression_dxt1 GLeeEnabled(&_GLEE_EXT_texture_compression_dxt1) +#define GLEE_EXT_texture_env GLeeEnabled(&_GLEE_EXT_texture_env) +#define GLEE_EXT_texture_sRGB GLeeEnabled(&_GLEE_EXT_texture_sRGB) +#define GLEE_IBM_static_data GLeeEnabled(&_GLEE_IBM_static_data) +#define GLEE_MESAX_texture_stack GLeeEnabled(&_GLEE_MESAX_texture_stack) +#define GLEE_OES_byte_coordinates GLeeEnabled(&_GLEE_OES_byte_coordinates) +#define GLEE_OES_compressed_paletted_texture GLeeEnabled(&_GLEE_OES_compressed_paletted_texture) +#define GLEE_OES_single_precision GLeeEnabled(&_GLEE_OES_single_precision) +#define GLEE_SGIX_pixel_texture_bits GLeeEnabled(&_GLEE_SGIX_pixel_texture_bits) +#define GLEE_SGIX_texture_range GLeeEnabled(&_GLEE_SGIX_texture_range) + + +/***************************************************************** + * Additional types needed for extensions + *****************************************************************/ + +/* Used for GLSL shader text */ +#ifndef GL_VERSION_2_0 + typedef char GLchar; +#endif + +#include + +#ifndef GL_VERSION_1_5 + typedef ptrdiff_t GLintptr; + typedef ptrdiff_t GLsizeiptr; +#endif + +#ifndef GL_NV_half_float + typedef unsigned short GLhalfNV; +#endif + +#ifndef GL_ARB_vertex_buffer_object + typedef ptrdiff_t GLintptrARB; + typedef ptrdiff_t GLsizeiptrARB; +#endif + +#ifndef GL_ARB_shader_objects + typedef int GLhandleARB; + typedef char GLcharARB; +#endif + +#ifndef GL_EXT_timer_query + typedef signed long long GLint64EXT; + typedef unsigned long long GLuint64EXT; +#endif + +/* Platform-specific */ + +#ifdef WIN32 + + /* WGL */ + + #ifndef WGL_ARB_pbuffer + DECLARE_HANDLE(HPBUFFERARB); + #endif + #ifndef WGL_EXT_pbuffer + DECLARE_HANDLE(HPBUFFEREXT); + #endif + +#elif defined(__APPLE__) || defined(__APPLE_CC__) + + /* Mac OS X */ + +#else + + /* GLX */ + + typedef void (*__GLXextFuncPtr)(void); + + #ifndef GLX_ARB_get_proc_address + #define GLX_ARB_get_proc_address 1 + extern __GLXextFuncPtr glXGetProcAddressARB (const GLubyte *); + extern void ( * glXGetProcAddressARB (const GLubyte *procName))(void); + typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procName); + #endif + + #ifndef GLX_SGIX_fbconfig + typedef XID GLXFBConfigIDSGIX; + typedef struct __GLXFBConfigRec *GLXFBConfigSGIX; + #endif + + #ifndef GLX_SGIX_pbuffer + typedef XID GLXPbufferSGIX; + typedef struct { + int type; + unsigned long serial; + Bool send_event; + Display *display; + GLXDrawable drawable; + int event_type; + int draw_type; + unsigned int mask; + int x, y; + int width, height; + int count; + } GLXBufferClobberEventSGIX; + #endif + + #ifndef GLX_SGIX_hyperpipe + #define _GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 + typedef struct + { + char pipeName[_GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int networkId; + } GLXHyperpipeNetworkSGIX; + + typedef struct + { + char pipeName[_GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int channel; + unsigned int participationType; + int timeSlice; + } GLXHyperpipeConfigSGIX; + + typedef struct + { + char pipeName[_GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int srcXOrigin; + int srcYOrigin; + int srcWidth; + int srcHeight; + int destXOrigin; + int destYOrigin; + int destWidth; + int destHeight; + } GLXPipeRect; + + typedef struct + { + char pipeName[_GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX]; + int XOrigin; + int YOrigin; + int maxHeight; + int maxWidth; + } GLXPipeRectLimits; + #endif +#endif /* end platform specific */ + + + +/* GL_VERSION_1_2 */ + +#ifndef GL_VERSION_1_2 +#define GL_VERSION_1_2 1 +#define __GLEE_GL_VERSION_1_2 1 +/* Constants */ +#define GL_UNSIGNED_BYTE_3_3_2 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2 0x8036 +#define GL_RESCALE_NORMAL 0x803A +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_PACK_SKIP_IMAGES 0x806B +#define GL_PACK_IMAGE_HEIGHT 0x806C +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_PROXY_TEXTURE_3D 0x8070 +#define GL_TEXTURE_DEPTH 0x8071 +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 +#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 +#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_BGR 0x80E0 +#define GL_BGRA 0x80E1 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 +#define GL_SINGLE_COLOR 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR 0x81FA +#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 +#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 +#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 +#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); +typedef void (APIENTRYP PFNGLCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLEPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPROC) (GLenum target, GLenum format, GLenum type, GLvoid * table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid * image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTERPROC) (GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETMINMAXPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLHISTOGRAMPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXPROC) (GLenum target); +typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLEE_EXTERN PFNGLBLENDCOLORPROC pglBlendColor; +GLEE_EXTERN PFNGLBLENDEQUATIONPROC pglBlendEquation; +GLEE_EXTERN PFNGLDRAWRANGEELEMENTSPROC pglDrawRangeElements; +GLEE_EXTERN PFNGLCOLORTABLEPROC pglColorTable; +GLEE_EXTERN PFNGLCOLORTABLEPARAMETERFVPROC pglColorTableParameterfv; +GLEE_EXTERN PFNGLCOLORTABLEPARAMETERIVPROC pglColorTableParameteriv; +GLEE_EXTERN PFNGLCOPYCOLORTABLEPROC pglCopyColorTable; +GLEE_EXTERN PFNGLGETCOLORTABLEPROC pglGetColorTable; +GLEE_EXTERN PFNGLGETCOLORTABLEPARAMETERFVPROC pglGetColorTableParameterfv; +GLEE_EXTERN PFNGLGETCOLORTABLEPARAMETERIVPROC pglGetColorTableParameteriv; +GLEE_EXTERN PFNGLCOLORSUBTABLEPROC pglColorSubTable; +GLEE_EXTERN PFNGLCOPYCOLORSUBTABLEPROC pglCopyColorSubTable; +GLEE_EXTERN PFNGLCONVOLUTIONFILTER1DPROC pglConvolutionFilter1D; +GLEE_EXTERN PFNGLCONVOLUTIONFILTER2DPROC pglConvolutionFilter2D; +GLEE_EXTERN PFNGLCONVOLUTIONPARAMETERFPROC pglConvolutionParameterf; +GLEE_EXTERN PFNGLCONVOLUTIONPARAMETERFVPROC pglConvolutionParameterfv; +GLEE_EXTERN PFNGLCONVOLUTIONPARAMETERIPROC pglConvolutionParameteri; +GLEE_EXTERN PFNGLCONVOLUTIONPARAMETERIVPROC pglConvolutionParameteriv; +GLEE_EXTERN PFNGLCOPYCONVOLUTIONFILTER1DPROC pglCopyConvolutionFilter1D; +GLEE_EXTERN PFNGLCOPYCONVOLUTIONFILTER2DPROC pglCopyConvolutionFilter2D; +GLEE_EXTERN PFNGLGETCONVOLUTIONFILTERPROC pglGetConvolutionFilter; +GLEE_EXTERN PFNGLGETCONVOLUTIONPARAMETERFVPROC pglGetConvolutionParameterfv; +GLEE_EXTERN PFNGLGETCONVOLUTIONPARAMETERIVPROC pglGetConvolutionParameteriv; +GLEE_EXTERN PFNGLGETSEPARABLEFILTERPROC pglGetSeparableFilter; +GLEE_EXTERN PFNGLSEPARABLEFILTER2DPROC pglSeparableFilter2D; +GLEE_EXTERN PFNGLGETHISTOGRAMPROC pglGetHistogram; +GLEE_EXTERN PFNGLGETHISTOGRAMPARAMETERFVPROC pglGetHistogramParameterfv; +GLEE_EXTERN PFNGLGETHISTOGRAMPARAMETERIVPROC pglGetHistogramParameteriv; +GLEE_EXTERN PFNGLGETMINMAXPROC pglGetMinmax; +GLEE_EXTERN PFNGLGETMINMAXPARAMETERFVPROC pglGetMinmaxParameterfv; +GLEE_EXTERN PFNGLGETMINMAXPARAMETERIVPROC pglGetMinmaxParameteriv; +GLEE_EXTERN PFNGLHISTOGRAMPROC pglHistogram; +GLEE_EXTERN PFNGLMINMAXPROC pglMinmax; +GLEE_EXTERN PFNGLRESETHISTOGRAMPROC pglResetHistogram; +GLEE_EXTERN PFNGLRESETMINMAXPROC pglResetMinmax; +GLEE_EXTERN PFNGLTEXIMAGE3DPROC pglTexImage3D; +GLEE_EXTERN PFNGLTEXSUBIMAGE3DPROC pglTexSubImage3D; +GLEE_EXTERN PFNGLCOPYTEXSUBIMAGE3DPROC pglCopyTexSubImage3D; +#define glBlendColor pglBlendColor +#define glBlendEquation pglBlendEquation +#define glDrawRangeElements pglDrawRangeElements +#define glColorTable pglColorTable +#define glColorTableParameterfv pglColorTableParameterfv +#define glColorTableParameteriv pglColorTableParameteriv +#define glCopyColorTable pglCopyColorTable +#define glGetColorTable pglGetColorTable +#define glGetColorTableParameterfv pglGetColorTableParameterfv +#define glGetColorTableParameteriv pglGetColorTableParameteriv +#define glColorSubTable pglColorSubTable +#define glCopyColorSubTable pglCopyColorSubTable +#define glConvolutionFilter1D pglConvolutionFilter1D +#define glConvolutionFilter2D pglConvolutionFilter2D +#define glConvolutionParameterf pglConvolutionParameterf +#define glConvolutionParameterfv pglConvolutionParameterfv +#define glConvolutionParameteri pglConvolutionParameteri +#define glConvolutionParameteriv pglConvolutionParameteriv +#define glCopyConvolutionFilter1D pglCopyConvolutionFilter1D +#define glCopyConvolutionFilter2D pglCopyConvolutionFilter2D +#define glGetConvolutionFilter pglGetConvolutionFilter +#define glGetConvolutionParameterfv pglGetConvolutionParameterfv +#define glGetConvolutionParameteriv pglGetConvolutionParameteriv +#define glGetSeparableFilter pglGetSeparableFilter +#define glSeparableFilter2D pglSeparableFilter2D +#define glGetHistogram pglGetHistogram +#define glGetHistogramParameterfv pglGetHistogramParameterfv +#define glGetHistogramParameteriv pglGetHistogramParameteriv +#define glGetMinmax pglGetMinmax +#define glGetMinmaxParameterfv pglGetMinmaxParameterfv +#define glGetMinmaxParameteriv pglGetMinmaxParameteriv +#define glHistogram pglHistogram +#define glMinmax pglMinmax +#define glResetHistogram pglResetHistogram +#define glResetMinmax pglResetMinmax +#define glTexImage3D pglTexImage3D +#define glTexSubImage3D pglTexSubImage3D +#define glCopyTexSubImage3D pglCopyTexSubImage3D +#endif + +/* GL_ARB_imaging */ + +#ifndef GL_ARB_imaging +#define GL_ARB_imaging 1 +#define __GLEE_GL_ARB_imaging 1 +/* Constants */ +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 +#define GL_FUNC_ADD 0x8006 +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_BLEND_EQUATION 0x8009 +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B +#define GL_CONVOLUTION_1D 0x8010 +#define GL_CONVOLUTION_2D 0x8011 +#define GL_SEPARABLE_2D 0x8012 +#define GL_CONVOLUTION_BORDER_MODE 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS 0x8015 +#define GL_REDUCE 0x8016 +#define GL_CONVOLUTION_FORMAT 0x8017 +#define GL_CONVOLUTION_WIDTH 0x8018 +#define GL_CONVOLUTION_HEIGHT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS 0x8023 +#define GL_HISTOGRAM 0x8024 +#define GL_PROXY_HISTOGRAM 0x8025 +#define GL_HISTOGRAM_WIDTH 0x8026 +#define GL_HISTOGRAM_FORMAT 0x8027 +#define GL_HISTOGRAM_RED_SIZE 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE 0x802C +#define GL_HISTOGRAM_SINK 0x802D +#define GL_MINMAX 0x802E +#define GL_MINMAX_FORMAT 0x802F +#define GL_MINMAX_SINK 0x8030 +#define GL_TABLE_TOO_LARGE 0x8031 +#define GL_COLOR_MATRIX 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS 0x80BB +#define GL_COLOR_TABLE 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE 0x80D2 +#define GL_PROXY_COLOR_TABLE 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE 0x80D5 +#define GL_COLOR_TABLE_SCALE 0x80D6 +#define GL_COLOR_TABLE_BIAS 0x80D7 +#define GL_COLOR_TABLE_FORMAT 0x80D8 +#define GL_COLOR_TABLE_WIDTH 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE 0x80DF +#define GL_CONSTANT_BORDER 0x8151 +#define GL_REPLICATE_BORDER 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR 0x8154 +#endif + +/* GL_VERSION_1_3 */ + +#ifndef GL_VERSION_1_3 +#define GL_VERSION_1_3 1 +#define __GLEE_GL_VERSION_1_3 1 +/* Constants */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 +#define GL_MAX_TEXTURE_UNITS 0x84E2 +#define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX 0x84E6 +#define GL_MULTISAMPLE 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE 0x809F +#define GL_SAMPLE_COVERAGE 0x80A0 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB +#define GL_MULTISAMPLE_BIT 0x20000000 +#define GL_NORMAL_MAP 0x8511 +#define GL_REFLECTION_MAP 0x8512 +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C +#define GL_COMPRESSED_ALPHA 0x84E9 +#define GL_COMPRESSED_LUMINANCE 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA 0x84EB +#define GL_COMPRESSED_INTENSITY 0x84EC +#define GL_COMPRESSED_RGB 0x84ED +#define GL_COMPRESSED_RGBA 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0 +#define GL_TEXTURE_COMPRESSED 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 +#define GL_CLAMP_TO_BORDER 0x812D +#define GL_COMBINE 0x8570 +#define GL_COMBINE_RGB 0x8571 +#define GL_COMBINE_ALPHA 0x8572 +#define GL_SOURCE0_RGB 0x8580 +#define GL_SOURCE1_RGB 0x8581 +#define GL_SOURCE2_RGB 0x8582 +#define GL_SOURCE0_ALPHA 0x8588 +#define GL_SOURCE1_ALPHA 0x8589 +#define GL_SOURCE2_ALPHA 0x858A +#define GL_OPERAND0_RGB 0x8590 +#define GL_OPERAND1_RGB 0x8591 +#define GL_OPERAND2_RGB 0x8592 +#define GL_OPERAND0_ALPHA 0x8598 +#define GL_OPERAND1_ALPHA 0x8599 +#define GL_OPERAND2_ALPHA 0x859A +#define GL_RGB_SCALE 0x8573 +#define GL_ADD_SIGNED 0x8574 +#define GL_INTERPOLATE 0x8575 +#define GL_SUBTRACT 0x84E7 +#define GL_CONSTANT 0x8576 +#define GL_PRIMARY_COLOR 0x8577 +#define GL_PREVIOUS 0x8578 +#define GL_DOT3_RGB 0x86AE +#define GL_DOT3_RGBA 0x86AF +typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVPROC) (GLenum target, const GLdouble * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVPROC) (GLenum target, const GLfloat * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVPROC) (GLenum target, const GLint * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVPROC) (GLenum target, const GLshort * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVPROC) (GLenum target, const GLdouble * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVPROC) (GLenum target, const GLfloat * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVPROC) (GLenum target, const GLint * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVPROC) (GLenum target, const GLshort * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVPROC) (GLenum target, const GLdouble * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVPROC) (GLenum target, const GLfloat * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVPROC) (GLenum target, const GLint * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVPROC) (GLenum target, const GLshort * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVPROC) (GLenum target, const GLdouble * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVPROC) (GLenum target, const GLfloat * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVPROC) (GLenum target, const GLint * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVPROC) (GLenum target, const GLshort * v); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFPROC) (const GLfloat * m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDPROC) (const GLdouble * m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFPROC) (const GLfloat * m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDPROC) (const GLdouble * m); +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid * img); +GLEE_EXTERN PFNGLACTIVETEXTUREPROC pglActiveTexture; +GLEE_EXTERN PFNGLCLIENTACTIVETEXTUREPROC pglClientActiveTexture; +GLEE_EXTERN PFNGLMULTITEXCOORD1DPROC pglMultiTexCoord1d; +GLEE_EXTERN PFNGLMULTITEXCOORD1DVPROC pglMultiTexCoord1dv; +GLEE_EXTERN PFNGLMULTITEXCOORD1FPROC pglMultiTexCoord1f; +GLEE_EXTERN PFNGLMULTITEXCOORD1FVPROC pglMultiTexCoord1fv; +GLEE_EXTERN PFNGLMULTITEXCOORD1IPROC pglMultiTexCoord1i; +GLEE_EXTERN PFNGLMULTITEXCOORD1IVPROC pglMultiTexCoord1iv; +GLEE_EXTERN PFNGLMULTITEXCOORD1SPROC pglMultiTexCoord1s; +GLEE_EXTERN PFNGLMULTITEXCOORD1SVPROC pglMultiTexCoord1sv; +GLEE_EXTERN PFNGLMULTITEXCOORD2DPROC pglMultiTexCoord2d; +GLEE_EXTERN PFNGLMULTITEXCOORD2DVPROC pglMultiTexCoord2dv; +GLEE_EXTERN PFNGLMULTITEXCOORD2FPROC pglMultiTexCoord2f; +GLEE_EXTERN PFNGLMULTITEXCOORD2FVPROC pglMultiTexCoord2fv; +GLEE_EXTERN PFNGLMULTITEXCOORD2IPROC pglMultiTexCoord2i; +GLEE_EXTERN PFNGLMULTITEXCOORD2IVPROC pglMultiTexCoord2iv; +GLEE_EXTERN PFNGLMULTITEXCOORD2SPROC pglMultiTexCoord2s; +GLEE_EXTERN PFNGLMULTITEXCOORD2SVPROC pglMultiTexCoord2sv; +GLEE_EXTERN PFNGLMULTITEXCOORD3DPROC pglMultiTexCoord3d; +GLEE_EXTERN PFNGLMULTITEXCOORD3DVPROC pglMultiTexCoord3dv; +GLEE_EXTERN PFNGLMULTITEXCOORD3FPROC pglMultiTexCoord3f; +GLEE_EXTERN PFNGLMULTITEXCOORD3FVPROC pglMultiTexCoord3fv; +GLEE_EXTERN PFNGLMULTITEXCOORD3IPROC pglMultiTexCoord3i; +GLEE_EXTERN PFNGLMULTITEXCOORD3IVPROC pglMultiTexCoord3iv; +GLEE_EXTERN PFNGLMULTITEXCOORD3SPROC pglMultiTexCoord3s; +GLEE_EXTERN PFNGLMULTITEXCOORD3SVPROC pglMultiTexCoord3sv; +GLEE_EXTERN PFNGLMULTITEXCOORD4DPROC pglMultiTexCoord4d; +GLEE_EXTERN PFNGLMULTITEXCOORD4DVPROC pglMultiTexCoord4dv; +GLEE_EXTERN PFNGLMULTITEXCOORD4FPROC pglMultiTexCoord4f; +GLEE_EXTERN PFNGLMULTITEXCOORD4FVPROC pglMultiTexCoord4fv; +GLEE_EXTERN PFNGLMULTITEXCOORD4IPROC pglMultiTexCoord4i; +GLEE_EXTERN PFNGLMULTITEXCOORD4IVPROC pglMultiTexCoord4iv; +GLEE_EXTERN PFNGLMULTITEXCOORD4SPROC pglMultiTexCoord4s; +GLEE_EXTERN PFNGLMULTITEXCOORD4SVPROC pglMultiTexCoord4sv; +GLEE_EXTERN PFNGLLOADTRANSPOSEMATRIXFPROC pglLoadTransposeMatrixf; +GLEE_EXTERN PFNGLLOADTRANSPOSEMATRIXDPROC pglLoadTransposeMatrixd; +GLEE_EXTERN PFNGLMULTTRANSPOSEMATRIXFPROC pglMultTransposeMatrixf; +GLEE_EXTERN PFNGLMULTTRANSPOSEMATRIXDPROC pglMultTransposeMatrixd; +GLEE_EXTERN PFNGLSAMPLECOVERAGEPROC pglSampleCoverage; +GLEE_EXTERN PFNGLCOMPRESSEDTEXIMAGE3DPROC pglCompressedTexImage3D; +GLEE_EXTERN PFNGLCOMPRESSEDTEXIMAGE2DPROC pglCompressedTexImage2D; +GLEE_EXTERN PFNGLCOMPRESSEDTEXIMAGE1DPROC pglCompressedTexImage1D; +GLEE_EXTERN PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC pglCompressedTexSubImage3D; +GLEE_EXTERN PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC pglCompressedTexSubImage2D; +GLEE_EXTERN PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC pglCompressedTexSubImage1D; +GLEE_EXTERN PFNGLGETCOMPRESSEDTEXIMAGEPROC pglGetCompressedTexImage; +#define glActiveTexture pglActiveTexture +#define glClientActiveTexture pglClientActiveTexture +#define glMultiTexCoord1d pglMultiTexCoord1d +#define glMultiTexCoord1dv pglMultiTexCoord1dv +#define glMultiTexCoord1f pglMultiTexCoord1f +#define glMultiTexCoord1fv pglMultiTexCoord1fv +#define glMultiTexCoord1i pglMultiTexCoord1i +#define glMultiTexCoord1iv pglMultiTexCoord1iv +#define glMultiTexCoord1s pglMultiTexCoord1s +#define glMultiTexCoord1sv pglMultiTexCoord1sv +#define glMultiTexCoord2d pglMultiTexCoord2d +#define glMultiTexCoord2dv pglMultiTexCoord2dv +#define glMultiTexCoord2f pglMultiTexCoord2f +#define glMultiTexCoord2fv pglMultiTexCoord2fv +#define glMultiTexCoord2i pglMultiTexCoord2i +#define glMultiTexCoord2iv pglMultiTexCoord2iv +#define glMultiTexCoord2s pglMultiTexCoord2s +#define glMultiTexCoord2sv pglMultiTexCoord2sv +#define glMultiTexCoord3d pglMultiTexCoord3d +#define glMultiTexCoord3dv pglMultiTexCoord3dv +#define glMultiTexCoord3f pglMultiTexCoord3f +#define glMultiTexCoord3fv pglMultiTexCoord3fv +#define glMultiTexCoord3i pglMultiTexCoord3i +#define glMultiTexCoord3iv pglMultiTexCoord3iv +#define glMultiTexCoord3s pglMultiTexCoord3s +#define glMultiTexCoord3sv pglMultiTexCoord3sv +#define glMultiTexCoord4d pglMultiTexCoord4d +#define glMultiTexCoord4dv pglMultiTexCoord4dv +#define glMultiTexCoord4f pglMultiTexCoord4f +#define glMultiTexCoord4fv pglMultiTexCoord4fv +#define glMultiTexCoord4i pglMultiTexCoord4i +#define glMultiTexCoord4iv pglMultiTexCoord4iv +#define glMultiTexCoord4s pglMultiTexCoord4s +#define glMultiTexCoord4sv pglMultiTexCoord4sv +#define glLoadTransposeMatrixf pglLoadTransposeMatrixf +#define glLoadTransposeMatrixd pglLoadTransposeMatrixd +#define glMultTransposeMatrixf pglMultTransposeMatrixf +#define glMultTransposeMatrixd pglMultTransposeMatrixd +#define glSampleCoverage pglSampleCoverage +#define glCompressedTexImage3D pglCompressedTexImage3D +#define glCompressedTexImage2D pglCompressedTexImage2D +#define glCompressedTexImage1D pglCompressedTexImage1D +#define glCompressedTexSubImage3D pglCompressedTexSubImage3D +#define glCompressedTexSubImage2D pglCompressedTexSubImage2D +#define glCompressedTexSubImage1D pglCompressedTexSubImage1D +#define glGetCompressedTexImage pglGetCompressedTexImage +#endif + +/* GL_VERSION_1_4 */ + +#ifndef GL_VERSION_1_4 +#define GL_VERSION_1_4 1 +#define __GLEE_GL_VERSION_1_4 1 +/* Constants */ +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_POINT_SIZE_MIN 0x8126 +#define GL_POINT_SIZE_MAX 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION 0x8129 +#define GL_GENERATE_MIPMAP 0x8191 +#define GL_GENERATE_MIPMAP_HINT 0x8192 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_DEPTH_COMPONENT32 0x81A7 +#define GL_MIRRORED_REPEAT 0x8370 +#define GL_FOG_COORDINATE_SOURCE 0x8450 +#define GL_FOG_COORDINATE 0x8451 +#define GL_FRAGMENT_DEPTH 0x8452 +#define GL_CURRENT_FOG_COORDINATE 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER 0x8456 +#define GL_FOG_COORDINATE_ARRAY 0x8457 +#define GL_COLOR_SUM 0x8458 +#define GL_CURRENT_SECONDARY_COLOR 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER 0x845D +#define GL_SECONDARY_COLOR_ARRAY 0x845E +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_FILTER_CONTROL 0x8500 +#define GL_TEXTURE_LOD_BIAS 0x8501 +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 +#define GL_TEXTURE_DEPTH_SIZE 0x884A +#define GL_DEPTH_TEXTURE_MODE 0x884B +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_COMPARE_R_TO_TEXTURE 0x884E +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRYP PFNGLFOGCOORDFPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVPROC) (const GLfloat * coord); +typedef void (APIENTRYP PFNGLFOGCOORDDPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVPROC) (const GLdouble * coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERPROC) (GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei * count, GLenum type, const GLvoid* * indices, GLsizei primcount); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVPROC) (const GLbyte * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVPROC) (const GLshort * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVPROC) (const GLubyte * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVPROC) (const GLuint * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVPROC) (const GLushort * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLWINDOWPOS2DPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVPROC) (const GLshort * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVPROC) (const GLshort * v); +GLEE_EXTERN PFNGLBLENDFUNCSEPARATEPROC pglBlendFuncSeparate; +GLEE_EXTERN PFNGLFOGCOORDFPROC pglFogCoordf; +GLEE_EXTERN PFNGLFOGCOORDFVPROC pglFogCoordfv; +GLEE_EXTERN PFNGLFOGCOORDDPROC pglFogCoordd; +GLEE_EXTERN PFNGLFOGCOORDDVPROC pglFogCoorddv; +GLEE_EXTERN PFNGLFOGCOORDPOINTERPROC pglFogCoordPointer; +GLEE_EXTERN PFNGLMULTIDRAWARRAYSPROC pglMultiDrawArrays; +GLEE_EXTERN PFNGLMULTIDRAWELEMENTSPROC pglMultiDrawElements; +GLEE_EXTERN PFNGLPOINTPARAMETERFPROC pglPointParameterf; +GLEE_EXTERN PFNGLPOINTPARAMETERFVPROC pglPointParameterfv; +GLEE_EXTERN PFNGLPOINTPARAMETERIPROC pglPointParameteri; +GLEE_EXTERN PFNGLPOINTPARAMETERIVPROC pglPointParameteriv; +GLEE_EXTERN PFNGLSECONDARYCOLOR3BPROC pglSecondaryColor3b; +GLEE_EXTERN PFNGLSECONDARYCOLOR3BVPROC pglSecondaryColor3bv; +GLEE_EXTERN PFNGLSECONDARYCOLOR3DPROC pglSecondaryColor3d; +GLEE_EXTERN PFNGLSECONDARYCOLOR3DVPROC pglSecondaryColor3dv; +GLEE_EXTERN PFNGLSECONDARYCOLOR3FPROC pglSecondaryColor3f; +GLEE_EXTERN PFNGLSECONDARYCOLOR3FVPROC pglSecondaryColor3fv; +GLEE_EXTERN PFNGLSECONDARYCOLOR3IPROC pglSecondaryColor3i; +GLEE_EXTERN PFNGLSECONDARYCOLOR3IVPROC pglSecondaryColor3iv; +GLEE_EXTERN PFNGLSECONDARYCOLOR3SPROC pglSecondaryColor3s; +GLEE_EXTERN PFNGLSECONDARYCOLOR3SVPROC pglSecondaryColor3sv; +GLEE_EXTERN PFNGLSECONDARYCOLOR3UBPROC pglSecondaryColor3ub; +GLEE_EXTERN PFNGLSECONDARYCOLOR3UBVPROC pglSecondaryColor3ubv; +GLEE_EXTERN PFNGLSECONDARYCOLOR3UIPROC pglSecondaryColor3ui; +GLEE_EXTERN PFNGLSECONDARYCOLOR3UIVPROC pglSecondaryColor3uiv; +GLEE_EXTERN PFNGLSECONDARYCOLOR3USPROC pglSecondaryColor3us; +GLEE_EXTERN PFNGLSECONDARYCOLOR3USVPROC pglSecondaryColor3usv; +GLEE_EXTERN PFNGLSECONDARYCOLORPOINTERPROC pglSecondaryColorPointer; +GLEE_EXTERN PFNGLWINDOWPOS2DPROC pglWindowPos2d; +GLEE_EXTERN PFNGLWINDOWPOS2DVPROC pglWindowPos2dv; +GLEE_EXTERN PFNGLWINDOWPOS2FPROC pglWindowPos2f; +GLEE_EXTERN PFNGLWINDOWPOS2FVPROC pglWindowPos2fv; +GLEE_EXTERN PFNGLWINDOWPOS2IPROC pglWindowPos2i; +GLEE_EXTERN PFNGLWINDOWPOS2IVPROC pglWindowPos2iv; +GLEE_EXTERN PFNGLWINDOWPOS2SPROC pglWindowPos2s; +GLEE_EXTERN PFNGLWINDOWPOS2SVPROC pglWindowPos2sv; +GLEE_EXTERN PFNGLWINDOWPOS3DPROC pglWindowPos3d; +GLEE_EXTERN PFNGLWINDOWPOS3DVPROC pglWindowPos3dv; +GLEE_EXTERN PFNGLWINDOWPOS3FPROC pglWindowPos3f; +GLEE_EXTERN PFNGLWINDOWPOS3FVPROC pglWindowPos3fv; +GLEE_EXTERN PFNGLWINDOWPOS3IPROC pglWindowPos3i; +GLEE_EXTERN PFNGLWINDOWPOS3IVPROC pglWindowPos3iv; +GLEE_EXTERN PFNGLWINDOWPOS3SPROC pglWindowPos3s; +GLEE_EXTERN PFNGLWINDOWPOS3SVPROC pglWindowPos3sv; +#define glBlendFuncSeparate pglBlendFuncSeparate +#define glFogCoordf pglFogCoordf +#define glFogCoordfv pglFogCoordfv +#define glFogCoordd pglFogCoordd +#define glFogCoorddv pglFogCoorddv +#define glFogCoordPointer pglFogCoordPointer +#define glMultiDrawArrays pglMultiDrawArrays +#define glMultiDrawElements pglMultiDrawElements +#define glPointParameterf pglPointParameterf +#define glPointParameterfv pglPointParameterfv +#define glPointParameteri pglPointParameteri +#define glPointParameteriv pglPointParameteriv +#define glSecondaryColor3b pglSecondaryColor3b +#define glSecondaryColor3bv pglSecondaryColor3bv +#define glSecondaryColor3d pglSecondaryColor3d +#define glSecondaryColor3dv pglSecondaryColor3dv +#define glSecondaryColor3f pglSecondaryColor3f +#define glSecondaryColor3fv pglSecondaryColor3fv +#define glSecondaryColor3i pglSecondaryColor3i +#define glSecondaryColor3iv pglSecondaryColor3iv +#define glSecondaryColor3s pglSecondaryColor3s +#define glSecondaryColor3sv pglSecondaryColor3sv +#define glSecondaryColor3ub pglSecondaryColor3ub +#define glSecondaryColor3ubv pglSecondaryColor3ubv +#define glSecondaryColor3ui pglSecondaryColor3ui +#define glSecondaryColor3uiv pglSecondaryColor3uiv +#define glSecondaryColor3us pglSecondaryColor3us +#define glSecondaryColor3usv pglSecondaryColor3usv +#define glSecondaryColorPointer pglSecondaryColorPointer +#define glWindowPos2d pglWindowPos2d +#define glWindowPos2dv pglWindowPos2dv +#define glWindowPos2f pglWindowPos2f +#define glWindowPos2fv pglWindowPos2fv +#define glWindowPos2i pglWindowPos2i +#define glWindowPos2iv pglWindowPos2iv +#define glWindowPos2s pglWindowPos2s +#define glWindowPos2sv pglWindowPos2sv +#define glWindowPos3d pglWindowPos3d +#define glWindowPos3dv pglWindowPos3dv +#define glWindowPos3f pglWindowPos3f +#define glWindowPos3fv pglWindowPos3fv +#define glWindowPos3i pglWindowPos3i +#define glWindowPos3iv pglWindowPos3iv +#define glWindowPos3s pglWindowPos3s +#define glWindowPos3sv pglWindowPos3sv +#endif + +/* GL_VERSION_1_5 */ + +#ifndef GL_VERSION_1_5 +#define GL_VERSION_1_5 1 +#define __GLEE_GL_VERSION_1_5 1 +/* Constants */ +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 +#define GL_QUERY_COUNTER_BITS 0x8864 +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F +#define GL_READ_ONLY 0x88B8 +#define GL_WRITE_ONLY 0x88B9 +#define GL_READ_WRITE 0x88BA +#define GL_BUFFER_ACCESS 0x88BB +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_DRAW 0x88E0 +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_DRAW 0x88E4 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_DRAW 0x88E8 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_SAMPLES_PASSED 0x8914 +#define GL_FOG_COORD_SRC GL_FOG_COORDINATE_SOURCE +#define GL_FOG_COORD GL_FOG_COORDINATE +#define GL_CURRENT_FOG_COORD GL_CURRENT_FOG_COORDINATE +#define GL_FOG_COORD_ARRAY_TYPE GL_FOG_COORDINATE_ARRAY_TYPE +#define GL_FOG_COORD_ARRAY_STRIDE GL_FOG_COORDINATE_ARRAY_STRIDE +#define GL_FOG_COORD_ARRAY_POINTER GL_FOG_COORDINATE_ARRAY_POINTER +#define GL_FOG_COORD_ARRAY GL_FOG_COORDINATE_ARRAY +#define GL_FOG_COORD_ARRAY_BUFFER_BINDING GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING +#define GL_SRC0_RGB GL_SOURCE0_RGB +#define GL_SRC1_RGB GL_SOURCE1_RGB +#define GL_SRC2_RGB GL_SOURCE2_RGB +#define GL_SRC0_ALPHA GL_SOURCE0_ALPHA +#define GL_SRC1_ALPHA GL_SOURCE1_ALPHA +#define GL_SRC2_ALPHA GL_SOURCE2_ALPHA +typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint * ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint * ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint * params); +typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint * buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint * buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* * params); +GLEE_EXTERN PFNGLGENQUERIESPROC pglGenQueries; +GLEE_EXTERN PFNGLDELETEQUERIESPROC pglDeleteQueries; +GLEE_EXTERN PFNGLISQUERYPROC pglIsQuery; +GLEE_EXTERN PFNGLBEGINQUERYPROC pglBeginQuery; +GLEE_EXTERN PFNGLENDQUERYPROC pglEndQuery; +GLEE_EXTERN PFNGLGETQUERYIVPROC pglGetQueryiv; +GLEE_EXTERN PFNGLGETQUERYOBJECTIVPROC pglGetQueryObjectiv; +GLEE_EXTERN PFNGLGETQUERYOBJECTUIVPROC pglGetQueryObjectuiv; +GLEE_EXTERN PFNGLBINDBUFFERPROC pglBindBuffer; +GLEE_EXTERN PFNGLDELETEBUFFERSPROC pglDeleteBuffers; +GLEE_EXTERN PFNGLGENBUFFERSPROC pglGenBuffers; +GLEE_EXTERN PFNGLISBUFFERPROC pglIsBuffer; +GLEE_EXTERN PFNGLBUFFERDATAPROC pglBufferData; +GLEE_EXTERN PFNGLBUFFERSUBDATAPROC pglBufferSubData; +GLEE_EXTERN PFNGLGETBUFFERSUBDATAPROC pglGetBufferSubData; +GLEE_EXTERN PFNGLMAPBUFFERPROC pglMapBuffer; +GLEE_EXTERN PFNGLUNMAPBUFFERPROC pglUnmapBuffer; +GLEE_EXTERN PFNGLGETBUFFERPARAMETERIVPROC pglGetBufferParameteriv; +GLEE_EXTERN PFNGLGETBUFFERPOINTERVPROC pglGetBufferPointerv; +#define glGenQueries pglGenQueries +#define glDeleteQueries pglDeleteQueries +#define glIsQuery pglIsQuery +#define glBeginQuery pglBeginQuery +#define glEndQuery pglEndQuery +#define glGetQueryiv pglGetQueryiv +#define glGetQueryObjectiv pglGetQueryObjectiv +#define glGetQueryObjectuiv pglGetQueryObjectuiv +#define glBindBuffer pglBindBuffer +#define glDeleteBuffers pglDeleteBuffers +#define glGenBuffers pglGenBuffers +#define glIsBuffer pglIsBuffer +#define glBufferData pglBufferData +#define glBufferSubData pglBufferSubData +#define glGetBufferSubData pglGetBufferSubData +#define glMapBuffer pglMapBuffer +#define glUnmapBuffer pglUnmapBuffer +#define glGetBufferParameteriv pglGetBufferParameteriv +#define glGetBufferPointerv pglGetBufferPointerv +#endif + +/* GL_VERSION_2_0 */ + +#ifndef GL_VERSION_2_0 +#define GL_VERSION_2_0 1 +#define __GLEE_GL_VERSION_2_0 1 +/* Constants */ +#define GL_BLEND_EQUATION_RGB GL_BLEND_EQUATION +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 +#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_BLEND_EQUATION_ALPHA 0x883D +#define GL_POINT_SPRITE 0x8861 +#define GL_COORD_REPLACE 0x8862 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_MAX_TEXTURE_COORDS 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_MAX_VARYING_FLOATS 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_SHADER_TYPE 0x8B4F +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_1D 0x8B5D +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_CUBE 0x8B60 +#define GL_SAMPLER_1D_SHADOW 0x8B61 +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_DELETE_STATUS 0x8B80 +#define GL_COMPILE_STATUS 0x8B81 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D +#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0 +#define GL_LOWER_LEFT 0x8CA1 +#define GL_UPPER_LEFT 0x8CA2 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum * bufs); +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); +typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar * name); +typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); +typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (); +typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); +typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); +typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei * count, GLuint * obj); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat * params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* * pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); +typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader); +typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* * string, const GLint * length); +typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); +GLEE_EXTERN PFNGLBLENDEQUATIONSEPARATEPROC pglBlendEquationSeparate; +GLEE_EXTERN PFNGLDRAWBUFFERSPROC pglDrawBuffers; +GLEE_EXTERN PFNGLSTENCILOPSEPARATEPROC pglStencilOpSeparate; +GLEE_EXTERN PFNGLSTENCILFUNCSEPARATEPROC pglStencilFuncSeparate; +GLEE_EXTERN PFNGLSTENCILMASKSEPARATEPROC pglStencilMaskSeparate; +GLEE_EXTERN PFNGLATTACHSHADERPROC pglAttachShader; +GLEE_EXTERN PFNGLBINDATTRIBLOCATIONPROC pglBindAttribLocation; +GLEE_EXTERN PFNGLCOMPILESHADERPROC pglCompileShader; +GLEE_EXTERN PFNGLCREATEPROGRAMPROC pglCreateProgram; +GLEE_EXTERN PFNGLCREATESHADERPROC pglCreateShader; +GLEE_EXTERN PFNGLDELETEPROGRAMPROC pglDeleteProgram; +GLEE_EXTERN PFNGLDELETESHADERPROC pglDeleteShader; +GLEE_EXTERN PFNGLDETACHSHADERPROC pglDetachShader; +GLEE_EXTERN PFNGLDISABLEVERTEXATTRIBARRAYPROC pglDisableVertexAttribArray; +GLEE_EXTERN PFNGLENABLEVERTEXATTRIBARRAYPROC pglEnableVertexAttribArray; +GLEE_EXTERN PFNGLGETACTIVEATTRIBPROC pglGetActiveAttrib; +GLEE_EXTERN PFNGLGETACTIVEUNIFORMPROC pglGetActiveUniform; +GLEE_EXTERN PFNGLGETATTACHEDSHADERSPROC pglGetAttachedShaders; +GLEE_EXTERN PFNGLGETATTRIBLOCATIONPROC pglGetAttribLocation; +GLEE_EXTERN PFNGLGETPROGRAMIVPROC pglGetProgramiv; +GLEE_EXTERN PFNGLGETPROGRAMINFOLOGPROC pglGetProgramInfoLog; +GLEE_EXTERN PFNGLGETSHADERIVPROC pglGetShaderiv; +GLEE_EXTERN PFNGLGETSHADERINFOLOGPROC pglGetShaderInfoLog; +GLEE_EXTERN PFNGLGETSHADERSOURCEPROC pglGetShaderSource; +GLEE_EXTERN PFNGLGETUNIFORMLOCATIONPROC pglGetUniformLocation; +GLEE_EXTERN PFNGLGETUNIFORMFVPROC pglGetUniformfv; +GLEE_EXTERN PFNGLGETUNIFORMIVPROC pglGetUniformiv; +GLEE_EXTERN PFNGLGETVERTEXATTRIBDVPROC pglGetVertexAttribdv; +GLEE_EXTERN PFNGLGETVERTEXATTRIBFVPROC pglGetVertexAttribfv; +GLEE_EXTERN PFNGLGETVERTEXATTRIBIVPROC pglGetVertexAttribiv; +GLEE_EXTERN PFNGLGETVERTEXATTRIBPOINTERVPROC pglGetVertexAttribPointerv; +GLEE_EXTERN PFNGLISPROGRAMPROC pglIsProgram; +GLEE_EXTERN PFNGLISSHADERPROC pglIsShader; +GLEE_EXTERN PFNGLLINKPROGRAMPROC pglLinkProgram; +GLEE_EXTERN PFNGLSHADERSOURCEPROC pglShaderSource; +GLEE_EXTERN PFNGLUSEPROGRAMPROC pglUseProgram; +GLEE_EXTERN PFNGLUNIFORM1FPROC pglUniform1f; +GLEE_EXTERN PFNGLUNIFORM2FPROC pglUniform2f; +GLEE_EXTERN PFNGLUNIFORM3FPROC pglUniform3f; +GLEE_EXTERN PFNGLUNIFORM4FPROC pglUniform4f; +GLEE_EXTERN PFNGLUNIFORM1IPROC pglUniform1i; +GLEE_EXTERN PFNGLUNIFORM2IPROC pglUniform2i; +GLEE_EXTERN PFNGLUNIFORM3IPROC pglUniform3i; +GLEE_EXTERN PFNGLUNIFORM4IPROC pglUniform4i; +GLEE_EXTERN PFNGLUNIFORM1FVPROC pglUniform1fv; +GLEE_EXTERN PFNGLUNIFORM2FVPROC pglUniform2fv; +GLEE_EXTERN PFNGLUNIFORM3FVPROC pglUniform3fv; +GLEE_EXTERN PFNGLUNIFORM4FVPROC pglUniform4fv; +GLEE_EXTERN PFNGLUNIFORM1IVPROC pglUniform1iv; +GLEE_EXTERN PFNGLUNIFORM2IVPROC pglUniform2iv; +GLEE_EXTERN PFNGLUNIFORM3IVPROC pglUniform3iv; +GLEE_EXTERN PFNGLUNIFORM4IVPROC pglUniform4iv; +GLEE_EXTERN PFNGLUNIFORMMATRIX2FVPROC pglUniformMatrix2fv; +GLEE_EXTERN PFNGLUNIFORMMATRIX3FVPROC pglUniformMatrix3fv; +GLEE_EXTERN PFNGLUNIFORMMATRIX4FVPROC pglUniformMatrix4fv; +GLEE_EXTERN PFNGLVALIDATEPROGRAMPROC pglValidateProgram; +GLEE_EXTERN PFNGLVERTEXATTRIB1DPROC pglVertexAttrib1d; +GLEE_EXTERN PFNGLVERTEXATTRIB1DVPROC pglVertexAttrib1dv; +GLEE_EXTERN PFNGLVERTEXATTRIB1FPROC pglVertexAttrib1f; +GLEE_EXTERN PFNGLVERTEXATTRIB1FVPROC pglVertexAttrib1fv; +GLEE_EXTERN PFNGLVERTEXATTRIB1SPROC pglVertexAttrib1s; +GLEE_EXTERN PFNGLVERTEXATTRIB1SVPROC pglVertexAttrib1sv; +GLEE_EXTERN PFNGLVERTEXATTRIB2DPROC pglVertexAttrib2d; +GLEE_EXTERN PFNGLVERTEXATTRIB2DVPROC pglVertexAttrib2dv; +GLEE_EXTERN PFNGLVERTEXATTRIB2FPROC pglVertexAttrib2f; +GLEE_EXTERN PFNGLVERTEXATTRIB2FVPROC pglVertexAttrib2fv; +GLEE_EXTERN PFNGLVERTEXATTRIB2SPROC pglVertexAttrib2s; +GLEE_EXTERN PFNGLVERTEXATTRIB2SVPROC pglVertexAttrib2sv; +GLEE_EXTERN PFNGLVERTEXATTRIB3DPROC pglVertexAttrib3d; +GLEE_EXTERN PFNGLVERTEXATTRIB3DVPROC pglVertexAttrib3dv; +GLEE_EXTERN PFNGLVERTEXATTRIB3FPROC pglVertexAttrib3f; +GLEE_EXTERN PFNGLVERTEXATTRIB3FVPROC pglVertexAttrib3fv; +GLEE_EXTERN PFNGLVERTEXATTRIB3SPROC pglVertexAttrib3s; +GLEE_EXTERN PFNGLVERTEXATTRIB3SVPROC pglVertexAttrib3sv; +GLEE_EXTERN PFNGLVERTEXATTRIB4NBVPROC pglVertexAttrib4Nbv; +GLEE_EXTERN PFNGLVERTEXATTRIB4NIVPROC pglVertexAttrib4Niv; +GLEE_EXTERN PFNGLVERTEXATTRIB4NSVPROC pglVertexAttrib4Nsv; +GLEE_EXTERN PFNGLVERTEXATTRIB4NUBPROC pglVertexAttrib4Nub; +GLEE_EXTERN PFNGLVERTEXATTRIB4NUBVPROC pglVertexAttrib4Nubv; +GLEE_EXTERN PFNGLVERTEXATTRIB4NUIVPROC pglVertexAttrib4Nuiv; +GLEE_EXTERN PFNGLVERTEXATTRIB4NUSVPROC pglVertexAttrib4Nusv; +GLEE_EXTERN PFNGLVERTEXATTRIB4BVPROC pglVertexAttrib4bv; +GLEE_EXTERN PFNGLVERTEXATTRIB4DPROC pglVertexAttrib4d; +GLEE_EXTERN PFNGLVERTEXATTRIB4DVPROC pglVertexAttrib4dv; +GLEE_EXTERN PFNGLVERTEXATTRIB4FPROC pglVertexAttrib4f; +GLEE_EXTERN PFNGLVERTEXATTRIB4FVPROC pglVertexAttrib4fv; +GLEE_EXTERN PFNGLVERTEXATTRIB4IVPROC pglVertexAttrib4iv; +GLEE_EXTERN PFNGLVERTEXATTRIB4SPROC pglVertexAttrib4s; +GLEE_EXTERN PFNGLVERTEXATTRIB4SVPROC pglVertexAttrib4sv; +GLEE_EXTERN PFNGLVERTEXATTRIB4UBVPROC pglVertexAttrib4ubv; +GLEE_EXTERN PFNGLVERTEXATTRIB4UIVPROC pglVertexAttrib4uiv; +GLEE_EXTERN PFNGLVERTEXATTRIB4USVPROC pglVertexAttrib4usv; +GLEE_EXTERN PFNGLVERTEXATTRIBPOINTERPROC pglVertexAttribPointer; +#define glBlendEquationSeparate pglBlendEquationSeparate +#define glDrawBuffers pglDrawBuffers +#define glStencilOpSeparate pglStencilOpSeparate +#define glStencilFuncSeparate pglStencilFuncSeparate +#define glStencilMaskSeparate pglStencilMaskSeparate +#define glAttachShader pglAttachShader +#define glBindAttribLocation pglBindAttribLocation +#define glCompileShader pglCompileShader +#define glCreateProgram pglCreateProgram +#define glCreateShader pglCreateShader +#define glDeleteProgram pglDeleteProgram +#define glDeleteShader pglDeleteShader +#define glDetachShader pglDetachShader +#define glDisableVertexAttribArray pglDisableVertexAttribArray +#define glEnableVertexAttribArray pglEnableVertexAttribArray +#define glGetActiveAttrib pglGetActiveAttrib +#define glGetActiveUniform pglGetActiveUniform +#define glGetAttachedShaders pglGetAttachedShaders +#define glGetAttribLocation pglGetAttribLocation +#define glGetProgramiv pglGetProgramiv +#define glGetProgramInfoLog pglGetProgramInfoLog +#define glGetShaderiv pglGetShaderiv +#define glGetShaderInfoLog pglGetShaderInfoLog +#define glGetShaderSource pglGetShaderSource +#define glGetUniformLocation pglGetUniformLocation +#define glGetUniformfv pglGetUniformfv +#define glGetUniformiv pglGetUniformiv +#define glGetVertexAttribdv pglGetVertexAttribdv +#define glGetVertexAttribfv pglGetVertexAttribfv +#define glGetVertexAttribiv pglGetVertexAttribiv +#define glGetVertexAttribPointerv pglGetVertexAttribPointerv +#define glIsProgram pglIsProgram +#define glIsShader pglIsShader +#define glLinkProgram pglLinkProgram +#define glShaderSource pglShaderSource +#define glUseProgram pglUseProgram +#define glUniform1f pglUniform1f +#define glUniform2f pglUniform2f +#define glUniform3f pglUniform3f +#define glUniform4f pglUniform4f +#define glUniform1i pglUniform1i +#define glUniform2i pglUniform2i +#define glUniform3i pglUniform3i +#define glUniform4i pglUniform4i +#define glUniform1fv pglUniform1fv +#define glUniform2fv pglUniform2fv +#define glUniform3fv pglUniform3fv +#define glUniform4fv pglUniform4fv +#define glUniform1iv pglUniform1iv +#define glUniform2iv pglUniform2iv +#define glUniform3iv pglUniform3iv +#define glUniform4iv pglUniform4iv +#define glUniformMatrix2fv pglUniformMatrix2fv +#define glUniformMatrix3fv pglUniformMatrix3fv +#define glUniformMatrix4fv pglUniformMatrix4fv +#define glValidateProgram pglValidateProgram +#define glVertexAttrib1d pglVertexAttrib1d +#define glVertexAttrib1dv pglVertexAttrib1dv +#define glVertexAttrib1f pglVertexAttrib1f +#define glVertexAttrib1fv pglVertexAttrib1fv +#define glVertexAttrib1s pglVertexAttrib1s +#define glVertexAttrib1sv pglVertexAttrib1sv +#define glVertexAttrib2d pglVertexAttrib2d +#define glVertexAttrib2dv pglVertexAttrib2dv +#define glVertexAttrib2f pglVertexAttrib2f +#define glVertexAttrib2fv pglVertexAttrib2fv +#define glVertexAttrib2s pglVertexAttrib2s +#define glVertexAttrib2sv pglVertexAttrib2sv +#define glVertexAttrib3d pglVertexAttrib3d +#define glVertexAttrib3dv pglVertexAttrib3dv +#define glVertexAttrib3f pglVertexAttrib3f +#define glVertexAttrib3fv pglVertexAttrib3fv +#define glVertexAttrib3s pglVertexAttrib3s +#define glVertexAttrib3sv pglVertexAttrib3sv +#define glVertexAttrib4Nbv pglVertexAttrib4Nbv +#define glVertexAttrib4Niv pglVertexAttrib4Niv +#define glVertexAttrib4Nsv pglVertexAttrib4Nsv +#define glVertexAttrib4Nub pglVertexAttrib4Nub +#define glVertexAttrib4Nubv pglVertexAttrib4Nubv +#define glVertexAttrib4Nuiv pglVertexAttrib4Nuiv +#define glVertexAttrib4Nusv pglVertexAttrib4Nusv +#define glVertexAttrib4bv pglVertexAttrib4bv +#define glVertexAttrib4d pglVertexAttrib4d +#define glVertexAttrib4dv pglVertexAttrib4dv +#define glVertexAttrib4f pglVertexAttrib4f +#define glVertexAttrib4fv pglVertexAttrib4fv +#define glVertexAttrib4iv pglVertexAttrib4iv +#define glVertexAttrib4s pglVertexAttrib4s +#define glVertexAttrib4sv pglVertexAttrib4sv +#define glVertexAttrib4ubv pglVertexAttrib4ubv +#define glVertexAttrib4uiv pglVertexAttrib4uiv +#define glVertexAttrib4usv pglVertexAttrib4usv +#define glVertexAttribPointer pglVertexAttribPointer +#endif + +/* GL_VERSION_2_1 */ + +#ifndef GL_VERSION_2_1 +#define GL_VERSION_2_1 1 +#define __GLEE_GL_VERSION_2_1 1 +/* Constants */ +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB_ALPHA 0x8C42 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_SLUMINANCE_ALPHA 0x8C44 +#define GL_SLUMINANCE8_ALPHA8 0x8C45 +#define GL_SLUMINANCE 0x8C46 +#define GL_SLUMINANCE8 0x8C47 +#define GL_COMPRESSED_SRGB 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA 0x8C49 +#define GL_COMPRESSED_SLUMINANCE 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA 0x8C4B +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_CURRENT_RASTER_SECONDARY_COLOR 0x845F +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +GLEE_EXTERN PFNGLUNIFORMMATRIX2X3FVPROC pglUniformMatrix2x3fv; +GLEE_EXTERN PFNGLUNIFORMMATRIX3X2FVPROC pglUniformMatrix3x2fv; +GLEE_EXTERN PFNGLUNIFORMMATRIX2X4FVPROC pglUniformMatrix2x4fv; +GLEE_EXTERN PFNGLUNIFORMMATRIX4X2FVPROC pglUniformMatrix4x2fv; +GLEE_EXTERN PFNGLUNIFORMMATRIX3X4FVPROC pglUniformMatrix3x4fv; +GLEE_EXTERN PFNGLUNIFORMMATRIX4X3FVPROC pglUniformMatrix4x3fv; +#define glUniformMatrix2x3fv pglUniformMatrix2x3fv +#define glUniformMatrix3x2fv pglUniformMatrix3x2fv +#define glUniformMatrix2x4fv pglUniformMatrix2x4fv +#define glUniformMatrix4x2fv pglUniformMatrix4x2fv +#define glUniformMatrix3x4fv pglUniformMatrix3x4fv +#define glUniformMatrix4x3fv pglUniformMatrix4x3fv +#endif + +/* GL_ARB_multitexture */ + +#ifndef GL_ARB_multitexture +#define GL_ARB_multitexture 1 +#define __GLEE_GL_ARB_multitexture 1 +/* Constants */ +#define GL_TEXTURE0_ARB 0x84C0 +#define GL_TEXTURE1_ARB 0x84C1 +#define GL_TEXTURE2_ARB 0x84C2 +#define GL_TEXTURE3_ARB 0x84C3 +#define GL_TEXTURE4_ARB 0x84C4 +#define GL_TEXTURE5_ARB 0x84C5 +#define GL_TEXTURE6_ARB 0x84C6 +#define GL_TEXTURE7_ARB 0x84C7 +#define GL_TEXTURE8_ARB 0x84C8 +#define GL_TEXTURE9_ARB 0x84C9 +#define GL_TEXTURE10_ARB 0x84CA +#define GL_TEXTURE11_ARB 0x84CB +#define GL_TEXTURE12_ARB 0x84CC +#define GL_TEXTURE13_ARB 0x84CD +#define GL_TEXTURE14_ARB 0x84CE +#define GL_TEXTURE15_ARB 0x84CF +#define GL_TEXTURE16_ARB 0x84D0 +#define GL_TEXTURE17_ARB 0x84D1 +#define GL_TEXTURE18_ARB 0x84D2 +#define GL_TEXTURE19_ARB 0x84D3 +#define GL_TEXTURE20_ARB 0x84D4 +#define GL_TEXTURE21_ARB 0x84D5 +#define GL_TEXTURE22_ARB 0x84D6 +#define GL_TEXTURE23_ARB 0x84D7 +#define GL_TEXTURE24_ARB 0x84D8 +#define GL_TEXTURE25_ARB 0x84D9 +#define GL_TEXTURE26_ARB 0x84DA +#define GL_TEXTURE27_ARB 0x84DB +#define GL_TEXTURE28_ARB 0x84DC +#define GL_TEXTURE29_ARB 0x84DD +#define GL_TEXTURE30_ARB 0x84DE +#define GL_TEXTURE31_ARB 0x84DF +#define GL_ACTIVE_TEXTURE_ARB 0x84E0 +#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 +#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 +typedef void (APIENTRYP PFNGLACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort * v); +GLEE_EXTERN PFNGLACTIVETEXTUREARBPROC pglActiveTextureARB; +GLEE_EXTERN PFNGLCLIENTACTIVETEXTUREARBPROC pglClientActiveTextureARB; +GLEE_EXTERN PFNGLMULTITEXCOORD1DARBPROC pglMultiTexCoord1dARB; +GLEE_EXTERN PFNGLMULTITEXCOORD1DVARBPROC pglMultiTexCoord1dvARB; +GLEE_EXTERN PFNGLMULTITEXCOORD1FARBPROC pglMultiTexCoord1fARB; +GLEE_EXTERN PFNGLMULTITEXCOORD1FVARBPROC pglMultiTexCoord1fvARB; +GLEE_EXTERN PFNGLMULTITEXCOORD1IARBPROC pglMultiTexCoord1iARB; +GLEE_EXTERN PFNGLMULTITEXCOORD1IVARBPROC pglMultiTexCoord1ivARB; +GLEE_EXTERN PFNGLMULTITEXCOORD1SARBPROC pglMultiTexCoord1sARB; +GLEE_EXTERN PFNGLMULTITEXCOORD1SVARBPROC pglMultiTexCoord1svARB; +GLEE_EXTERN PFNGLMULTITEXCOORD2DARBPROC pglMultiTexCoord2dARB; +GLEE_EXTERN PFNGLMULTITEXCOORD2DVARBPROC pglMultiTexCoord2dvARB; +GLEE_EXTERN PFNGLMULTITEXCOORD2FARBPROC pglMultiTexCoord2fARB; +GLEE_EXTERN PFNGLMULTITEXCOORD2FVARBPROC pglMultiTexCoord2fvARB; +GLEE_EXTERN PFNGLMULTITEXCOORD2IARBPROC pglMultiTexCoord2iARB; +GLEE_EXTERN PFNGLMULTITEXCOORD2IVARBPROC pglMultiTexCoord2ivARB; +GLEE_EXTERN PFNGLMULTITEXCOORD2SARBPROC pglMultiTexCoord2sARB; +GLEE_EXTERN PFNGLMULTITEXCOORD2SVARBPROC pglMultiTexCoord2svARB; +GLEE_EXTERN PFNGLMULTITEXCOORD3DARBPROC pglMultiTexCoord3dARB; +GLEE_EXTERN PFNGLMULTITEXCOORD3DVARBPROC pglMultiTexCoord3dvARB; +GLEE_EXTERN PFNGLMULTITEXCOORD3FARBPROC pglMultiTexCoord3fARB; +GLEE_EXTERN PFNGLMULTITEXCOORD3FVARBPROC pglMultiTexCoord3fvARB; +GLEE_EXTERN PFNGLMULTITEXCOORD3IARBPROC pglMultiTexCoord3iARB; +GLEE_EXTERN PFNGLMULTITEXCOORD3IVARBPROC pglMultiTexCoord3ivARB; +GLEE_EXTERN PFNGLMULTITEXCOORD3SARBPROC pglMultiTexCoord3sARB; +GLEE_EXTERN PFNGLMULTITEXCOORD3SVARBPROC pglMultiTexCoord3svARB; +GLEE_EXTERN PFNGLMULTITEXCOORD4DARBPROC pglMultiTexCoord4dARB; +GLEE_EXTERN PFNGLMULTITEXCOORD4DVARBPROC pglMultiTexCoord4dvARB; +GLEE_EXTERN PFNGLMULTITEXCOORD4FARBPROC pglMultiTexCoord4fARB; +GLEE_EXTERN PFNGLMULTITEXCOORD4FVARBPROC pglMultiTexCoord4fvARB; +GLEE_EXTERN PFNGLMULTITEXCOORD4IARBPROC pglMultiTexCoord4iARB; +GLEE_EXTERN PFNGLMULTITEXCOORD4IVARBPROC pglMultiTexCoord4ivARB; +GLEE_EXTERN PFNGLMULTITEXCOORD4SARBPROC pglMultiTexCoord4sARB; +GLEE_EXTERN PFNGLMULTITEXCOORD4SVARBPROC pglMultiTexCoord4svARB; +#define glActiveTextureARB pglActiveTextureARB +#define glClientActiveTextureARB pglClientActiveTextureARB +#define glMultiTexCoord1dARB pglMultiTexCoord1dARB +#define glMultiTexCoord1dvARB pglMultiTexCoord1dvARB +#define glMultiTexCoord1fARB pglMultiTexCoord1fARB +#define glMultiTexCoord1fvARB pglMultiTexCoord1fvARB +#define glMultiTexCoord1iARB pglMultiTexCoord1iARB +#define glMultiTexCoord1ivARB pglMultiTexCoord1ivARB +#define glMultiTexCoord1sARB pglMultiTexCoord1sARB +#define glMultiTexCoord1svARB pglMultiTexCoord1svARB +#define glMultiTexCoord2dARB pglMultiTexCoord2dARB +#define glMultiTexCoord2dvARB pglMultiTexCoord2dvARB +#define glMultiTexCoord2fARB pglMultiTexCoord2fARB +#define glMultiTexCoord2fvARB pglMultiTexCoord2fvARB +#define glMultiTexCoord2iARB pglMultiTexCoord2iARB +#define glMultiTexCoord2ivARB pglMultiTexCoord2ivARB +#define glMultiTexCoord2sARB pglMultiTexCoord2sARB +#define glMultiTexCoord2svARB pglMultiTexCoord2svARB +#define glMultiTexCoord3dARB pglMultiTexCoord3dARB +#define glMultiTexCoord3dvARB pglMultiTexCoord3dvARB +#define glMultiTexCoord3fARB pglMultiTexCoord3fARB +#define glMultiTexCoord3fvARB pglMultiTexCoord3fvARB +#define glMultiTexCoord3iARB pglMultiTexCoord3iARB +#define glMultiTexCoord3ivARB pglMultiTexCoord3ivARB +#define glMultiTexCoord3sARB pglMultiTexCoord3sARB +#define glMultiTexCoord3svARB pglMultiTexCoord3svARB +#define glMultiTexCoord4dARB pglMultiTexCoord4dARB +#define glMultiTexCoord4dvARB pglMultiTexCoord4dvARB +#define glMultiTexCoord4fARB pglMultiTexCoord4fARB +#define glMultiTexCoord4fvARB pglMultiTexCoord4fvARB +#define glMultiTexCoord4iARB pglMultiTexCoord4iARB +#define glMultiTexCoord4ivARB pglMultiTexCoord4ivARB +#define glMultiTexCoord4sARB pglMultiTexCoord4sARB +#define glMultiTexCoord4svARB pglMultiTexCoord4svARB +#endif + +/* GL_ARB_transpose_matrix */ + +#ifndef GL_ARB_transpose_matrix +#define GL_ARB_transpose_matrix 1 +#define __GLEE_GL_ARB_transpose_matrix 1 +/* Constants */ +#define GL_TRANSPOSE_MODELVIEW_MATRIX_ARB 0x84E3 +#define GL_TRANSPOSE_PROJECTION_MATRIX_ARB 0x84E4 +#define GL_TRANSPOSE_TEXTURE_MATRIX_ARB 0x84E5 +#define GL_TRANSPOSE_COLOR_MATRIX_ARB 0x84E6 +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXFARBPROC) (const GLfloat * m); +typedef void (APIENTRYP PFNGLLOADTRANSPOSEMATRIXDARBPROC) (const GLdouble * m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXFARBPROC) (const GLfloat * m); +typedef void (APIENTRYP PFNGLMULTTRANSPOSEMATRIXDARBPROC) (const GLdouble * m); +GLEE_EXTERN PFNGLLOADTRANSPOSEMATRIXFARBPROC pglLoadTransposeMatrixfARB; +GLEE_EXTERN PFNGLLOADTRANSPOSEMATRIXDARBPROC pglLoadTransposeMatrixdARB; +GLEE_EXTERN PFNGLMULTTRANSPOSEMATRIXFARBPROC pglMultTransposeMatrixfARB; +GLEE_EXTERN PFNGLMULTTRANSPOSEMATRIXDARBPROC pglMultTransposeMatrixdARB; +#define glLoadTransposeMatrixfARB pglLoadTransposeMatrixfARB +#define glLoadTransposeMatrixdARB pglLoadTransposeMatrixdARB +#define glMultTransposeMatrixfARB pglMultTransposeMatrixfARB +#define glMultTransposeMatrixdARB pglMultTransposeMatrixdARB +#endif + +/* GL_ARB_multisample */ + +#ifndef GL_ARB_multisample +#define GL_ARB_multisample 1 +#define __GLEE_GL_ARB_multisample 1 +/* Constants */ +#define GL_MULTISAMPLE_ARB 0x809D +#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F +#define GL_SAMPLE_COVERAGE_ARB 0x80A0 +#define GL_SAMPLE_BUFFERS_ARB 0x80A8 +#define GL_SAMPLES_ARB 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB +#define GL_MULTISAMPLE_BIT_ARB 0x20000000 +typedef void (APIENTRYP PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert); +GLEE_EXTERN PFNGLSAMPLECOVERAGEARBPROC pglSampleCoverageARB; +#define glSampleCoverageARB pglSampleCoverageARB +#endif + +/* GL_ARB_texture_env_add */ + +#ifndef GL_ARB_texture_env_add +#define GL_ARB_texture_env_add 1 +#define __GLEE_GL_ARB_texture_env_add 1 +/* Constants */ +#endif + +/* GL_ARB_texture_cube_map */ + +#ifndef GL_ARB_texture_cube_map +#define GL_ARB_texture_cube_map 1 +#define __GLEE_GL_ARB_texture_cube_map 1 +/* Constants */ +#define GL_NORMAL_MAP_ARB 0x8511 +#define GL_REFLECTION_MAP_ARB 0x8512 +#define GL_TEXTURE_CUBE_MAP_ARB 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C +#endif + +/* GL_ARB_texture_compression */ + +#ifndef GL_ARB_texture_compression +#define GL_ARB_texture_compression 1 +#define __GLEE_GL_ARB_texture_compression 1 +/* Constants */ +#define GL_COMPRESSED_ALPHA_ARB 0x84E9 +#define GL_COMPRESSED_LUMINANCE_ARB 0x84EA +#define GL_COMPRESSED_LUMINANCE_ALPHA_ARB 0x84EB +#define GL_COMPRESSED_INTENSITY_ARB 0x84EC +#define GL_COMPRESSED_RGB_ARB 0x84ED +#define GL_COMPRESSED_RGBA_ARB 0x84EE +#define GL_TEXTURE_COMPRESSION_HINT_ARB 0x84EF +#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB 0x86A0 +#define GL_TEXTURE_COMPRESSED_ARB 0x86A1 +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3 +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint level, GLvoid * img); +GLEE_EXTERN PFNGLCOMPRESSEDTEXIMAGE3DARBPROC pglCompressedTexImage3DARB; +GLEE_EXTERN PFNGLCOMPRESSEDTEXIMAGE2DARBPROC pglCompressedTexImage2DARB; +GLEE_EXTERN PFNGLCOMPRESSEDTEXIMAGE1DARBPROC pglCompressedTexImage1DARB; +GLEE_EXTERN PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC pglCompressedTexSubImage3DARB; +GLEE_EXTERN PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC pglCompressedTexSubImage2DARB; +GLEE_EXTERN PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC pglCompressedTexSubImage1DARB; +GLEE_EXTERN PFNGLGETCOMPRESSEDTEXIMAGEARBPROC pglGetCompressedTexImageARB; +#define glCompressedTexImage3DARB pglCompressedTexImage3DARB +#define glCompressedTexImage2DARB pglCompressedTexImage2DARB +#define glCompressedTexImage1DARB pglCompressedTexImage1DARB +#define glCompressedTexSubImage3DARB pglCompressedTexSubImage3DARB +#define glCompressedTexSubImage2DARB pglCompressedTexSubImage2DARB +#define glCompressedTexSubImage1DARB pglCompressedTexSubImage1DARB +#define glGetCompressedTexImageARB pglGetCompressedTexImageARB +#endif + +/* GL_ARB_texture_border_clamp */ + +#ifndef GL_ARB_texture_border_clamp +#define GL_ARB_texture_border_clamp 1 +#define __GLEE_GL_ARB_texture_border_clamp 1 +/* Constants */ +#define GL_CLAMP_TO_BORDER_ARB 0x812D +#endif + +/* GL_ARB_point_parameters */ + +#ifndef GL_ARB_point_parameters +#define GL_ARB_point_parameters 1 +#define __GLEE_GL_ARB_point_parameters 1 +/* Constants */ +#define GL_POINT_SIZE_MIN_ARB 0x8126 +#define GL_POINT_SIZE_MAX_ARB 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128 +#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129 +typedef void (APIENTRYP PFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat * params); +GLEE_EXTERN PFNGLPOINTPARAMETERFARBPROC pglPointParameterfARB; +GLEE_EXTERN PFNGLPOINTPARAMETERFVARBPROC pglPointParameterfvARB; +#define glPointParameterfARB pglPointParameterfARB +#define glPointParameterfvARB pglPointParameterfvARB +#endif + +/* GL_ARB_vertex_blend */ + +#ifndef GL_ARB_vertex_blend +#define GL_ARB_vertex_blend 1 +#define __GLEE_GL_ARB_vertex_blend 1 +/* Constants */ +#define GL_MAX_VERTEX_UNITS_ARB 0x86A4 +#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5 +#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6 +#define GL_VERTEX_BLEND_ARB 0x86A7 +#define GL_CURRENT_WEIGHT_ARB 0x86A8 +#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9 +#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA +#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB +#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC +#define GL_WEIGHT_ARRAY_ARB 0x86AD +#define GL_MODELVIEW0_ARB 0x1700 +#define GL_MODELVIEW1_ARB 0x850A +#define GL_MODELVIEW2_ARB 0x8722 +#define GL_MODELVIEW3_ARB 0x8723 +#define GL_MODELVIEW4_ARB 0x8724 +#define GL_MODELVIEW5_ARB 0x8725 +#define GL_MODELVIEW6_ARB 0x8726 +#define GL_MODELVIEW7_ARB 0x8727 +#define GL_MODELVIEW8_ARB 0x8728 +#define GL_MODELVIEW9_ARB 0x8729 +#define GL_MODELVIEW10_ARB 0x872A +#define GL_MODELVIEW11_ARB 0x872B +#define GL_MODELVIEW12_ARB 0x872C +#define GL_MODELVIEW13_ARB 0x872D +#define GL_MODELVIEW14_ARB 0x872E +#define GL_MODELVIEW15_ARB 0x872F +#define GL_MODELVIEW16_ARB 0x8730 +#define GL_MODELVIEW17_ARB 0x8731 +#define GL_MODELVIEW18_ARB 0x8732 +#define GL_MODELVIEW19_ARB 0x8733 +#define GL_MODELVIEW20_ARB 0x8734 +#define GL_MODELVIEW21_ARB 0x8735 +#define GL_MODELVIEW22_ARB 0x8736 +#define GL_MODELVIEW23_ARB 0x8737 +#define GL_MODELVIEW24_ARB 0x8738 +#define GL_MODELVIEW25_ARB 0x8739 +#define GL_MODELVIEW26_ARB 0x873A +#define GL_MODELVIEW27_ARB 0x873B +#define GL_MODELVIEW28_ARB 0x873C +#define GL_MODELVIEW29_ARB 0x873D +#define GL_MODELVIEW30_ARB 0x873E +#define GL_MODELVIEW31_ARB 0x873F +typedef void (APIENTRYP PFNGLWEIGHTBVARBPROC) (GLint size, const GLbyte * weights); +typedef void (APIENTRYP PFNGLWEIGHTSVARBPROC) (GLint size, const GLshort * weights); +typedef void (APIENTRYP PFNGLWEIGHTIVARBPROC) (GLint size, const GLint * weights); +typedef void (APIENTRYP PFNGLWEIGHTFVARBPROC) (GLint size, const GLfloat * weights); +typedef void (APIENTRYP PFNGLWEIGHTDVARBPROC) (GLint size, const GLdouble * weights); +typedef void (APIENTRYP PFNGLWEIGHTUBVARBPROC) (GLint size, const GLubyte * weights); +typedef void (APIENTRYP PFNGLWEIGHTUSVARBPROC) (GLint size, const GLushort * weights); +typedef void (APIENTRYP PFNGLWEIGHTUIVARBPROC) (GLint size, const GLuint * weights); +typedef void (APIENTRYP PFNGLWEIGHTPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLVERTEXBLENDARBPROC) (GLint count); +GLEE_EXTERN PFNGLWEIGHTBVARBPROC pglWeightbvARB; +GLEE_EXTERN PFNGLWEIGHTSVARBPROC pglWeightsvARB; +GLEE_EXTERN PFNGLWEIGHTIVARBPROC pglWeightivARB; +GLEE_EXTERN PFNGLWEIGHTFVARBPROC pglWeightfvARB; +GLEE_EXTERN PFNGLWEIGHTDVARBPROC pglWeightdvARB; +GLEE_EXTERN PFNGLWEIGHTUBVARBPROC pglWeightubvARB; +GLEE_EXTERN PFNGLWEIGHTUSVARBPROC pglWeightusvARB; +GLEE_EXTERN PFNGLWEIGHTUIVARBPROC pglWeightuivARB; +GLEE_EXTERN PFNGLWEIGHTPOINTERARBPROC pglWeightPointerARB; +GLEE_EXTERN PFNGLVERTEXBLENDARBPROC pglVertexBlendARB; +#define glWeightbvARB pglWeightbvARB +#define glWeightsvARB pglWeightsvARB +#define glWeightivARB pglWeightivARB +#define glWeightfvARB pglWeightfvARB +#define glWeightdvARB pglWeightdvARB +#define glWeightubvARB pglWeightubvARB +#define glWeightusvARB pglWeightusvARB +#define glWeightuivARB pglWeightuivARB +#define glWeightPointerARB pglWeightPointerARB +#define glVertexBlendARB pglVertexBlendARB +#endif + +/* GL_ARB_matrix_palette */ + +#ifndef GL_ARB_matrix_palette +#define GL_ARB_matrix_palette 1 +#define __GLEE_GL_ARB_matrix_palette 1 +/* Constants */ +#define GL_MATRIX_PALETTE_ARB 0x8840 +#define GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB 0x8841 +#define GL_MAX_PALETTE_MATRICES_ARB 0x8842 +#define GL_CURRENT_PALETTE_MATRIX_ARB 0x8843 +#define GL_MATRIX_INDEX_ARRAY_ARB 0x8844 +#define GL_CURRENT_MATRIX_INDEX_ARB 0x8845 +#define GL_MATRIX_INDEX_ARRAY_SIZE_ARB 0x8846 +#define GL_MATRIX_INDEX_ARRAY_TYPE_ARB 0x8847 +#define GL_MATRIX_INDEX_ARRAY_STRIDE_ARB 0x8848 +#define GL_MATRIX_INDEX_ARRAY_POINTER_ARB 0x8849 +typedef void (APIENTRYP PFNGLCURRENTPALETTEMATRIXARBPROC) (GLint index); +typedef void (APIENTRYP PFNGLMATRIXINDEXUBVARBPROC) (GLint size, const GLubyte * indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUSVARBPROC) (GLint size, const GLushort * indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXUIVARBPROC) (GLint size, const GLuint * indices); +typedef void (APIENTRYP PFNGLMATRIXINDEXPOINTERARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +GLEE_EXTERN PFNGLCURRENTPALETTEMATRIXARBPROC pglCurrentPaletteMatrixARB; +GLEE_EXTERN PFNGLMATRIXINDEXUBVARBPROC pglMatrixIndexubvARB; +GLEE_EXTERN PFNGLMATRIXINDEXUSVARBPROC pglMatrixIndexusvARB; +GLEE_EXTERN PFNGLMATRIXINDEXUIVARBPROC pglMatrixIndexuivARB; +GLEE_EXTERN PFNGLMATRIXINDEXPOINTERARBPROC pglMatrixIndexPointerARB; +#define glCurrentPaletteMatrixARB pglCurrentPaletteMatrixARB +#define glMatrixIndexubvARB pglMatrixIndexubvARB +#define glMatrixIndexusvARB pglMatrixIndexusvARB +#define glMatrixIndexuivARB pglMatrixIndexuivARB +#define glMatrixIndexPointerARB pglMatrixIndexPointerARB +#endif + +/* GL_ARB_texture_env_combine */ + +#ifndef GL_ARB_texture_env_combine +#define GL_ARB_texture_env_combine 1 +#define __GLEE_GL_ARB_texture_env_combine 1 +/* Constants */ +#define GL_COMBINE_ARB 0x8570 +#define GL_COMBINE_RGB_ARB 0x8571 +#define GL_COMBINE_ALPHA_ARB 0x8572 +#define GL_SOURCE0_RGB_ARB 0x8580 +#define GL_SOURCE1_RGB_ARB 0x8581 +#define GL_SOURCE2_RGB_ARB 0x8582 +#define GL_SOURCE0_ALPHA_ARB 0x8588 +#define GL_SOURCE1_ALPHA_ARB 0x8589 +#define GL_SOURCE2_ALPHA_ARB 0x858A +#define GL_OPERAND0_RGB_ARB 0x8590 +#define GL_OPERAND1_RGB_ARB 0x8591 +#define GL_OPERAND2_RGB_ARB 0x8592 +#define GL_OPERAND0_ALPHA_ARB 0x8598 +#define GL_OPERAND1_ALPHA_ARB 0x8599 +#define GL_OPERAND2_ALPHA_ARB 0x859A +#define GL_RGB_SCALE_ARB 0x8573 +#define GL_ADD_SIGNED_ARB 0x8574 +#define GL_INTERPOLATE_ARB 0x8575 +#define GL_SUBTRACT_ARB 0x84E7 +#define GL_CONSTANT_ARB 0x8576 +#define GL_PRIMARY_COLOR_ARB 0x8577 +#define GL_PREVIOUS_ARB 0x8578 +#endif + +/* GL_ARB_texture_env_crossbar */ + +#ifndef GL_ARB_texture_env_crossbar +#define GL_ARB_texture_env_crossbar 1 +#define __GLEE_GL_ARB_texture_env_crossbar 1 +/* Constants */ +#endif + +/* GL_ARB_texture_env_dot3 */ + +#ifndef GL_ARB_texture_env_dot3 +#define GL_ARB_texture_env_dot3 1 +#define __GLEE_GL_ARB_texture_env_dot3 1 +/* Constants */ +#define GL_DOT3_RGB_ARB 0x86AE +#define GL_DOT3_RGBA_ARB 0x86AF +#endif + +/* GL_ARB_texture_mirrored_repeat */ + +#ifndef GL_ARB_texture_mirrored_repeat +#define GL_ARB_texture_mirrored_repeat 1 +#define __GLEE_GL_ARB_texture_mirrored_repeat 1 +/* Constants */ +#define GL_MIRRORED_REPEAT_ARB 0x8370 +#endif + +/* GL_ARB_depth_texture */ + +#ifndef GL_ARB_depth_texture +#define GL_ARB_depth_texture 1 +#define __GLEE_GL_ARB_depth_texture 1 +/* Constants */ +#define GL_DEPTH_COMPONENT16_ARB 0x81A5 +#define GL_DEPTH_COMPONENT24_ARB 0x81A6 +#define GL_DEPTH_COMPONENT32_ARB 0x81A7 +#define GL_TEXTURE_DEPTH_SIZE_ARB 0x884A +#define GL_DEPTH_TEXTURE_MODE_ARB 0x884B +#endif + +/* GL_ARB_shadow */ + +#ifndef GL_ARB_shadow +#define GL_ARB_shadow 1 +#define __GLEE_GL_ARB_shadow 1 +/* Constants */ +#define GL_TEXTURE_COMPARE_MODE_ARB 0x884C +#define GL_TEXTURE_COMPARE_FUNC_ARB 0x884D +#define GL_COMPARE_R_TO_TEXTURE_ARB 0x884E +#endif + +/* GL_ARB_shadow_ambient */ + +#ifndef GL_ARB_shadow_ambient +#define GL_ARB_shadow_ambient 1 +#define __GLEE_GL_ARB_shadow_ambient 1 +/* Constants */ +#define GL_TEXTURE_COMPARE_FAIL_VALUE_ARB 0x80BF +#endif + +/* GL_ARB_window_pos */ + +#ifndef GL_ARB_window_pos +#define GL_ARB_window_pos 1 +#define __GLEE_GL_ARB_window_pos 1 +/* Constants */ +typedef void (APIENTRYP PFNGLWINDOWPOS2DARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVARBPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVARBPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IARBPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVARBPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVARBPROC) (const GLshort * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVARBPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVARBPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVARBPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SARBPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVARBPROC) (const GLshort * v); +GLEE_EXTERN PFNGLWINDOWPOS2DARBPROC pglWindowPos2dARB; +GLEE_EXTERN PFNGLWINDOWPOS2DVARBPROC pglWindowPos2dvARB; +GLEE_EXTERN PFNGLWINDOWPOS2FARBPROC pglWindowPos2fARB; +GLEE_EXTERN PFNGLWINDOWPOS2FVARBPROC pglWindowPos2fvARB; +GLEE_EXTERN PFNGLWINDOWPOS2IARBPROC pglWindowPos2iARB; +GLEE_EXTERN PFNGLWINDOWPOS2IVARBPROC pglWindowPos2ivARB; +GLEE_EXTERN PFNGLWINDOWPOS2SARBPROC pglWindowPos2sARB; +GLEE_EXTERN PFNGLWINDOWPOS2SVARBPROC pglWindowPos2svARB; +GLEE_EXTERN PFNGLWINDOWPOS3DARBPROC pglWindowPos3dARB; +GLEE_EXTERN PFNGLWINDOWPOS3DVARBPROC pglWindowPos3dvARB; +GLEE_EXTERN PFNGLWINDOWPOS3FARBPROC pglWindowPos3fARB; +GLEE_EXTERN PFNGLWINDOWPOS3FVARBPROC pglWindowPos3fvARB; +GLEE_EXTERN PFNGLWINDOWPOS3IARBPROC pglWindowPos3iARB; +GLEE_EXTERN PFNGLWINDOWPOS3IVARBPROC pglWindowPos3ivARB; +GLEE_EXTERN PFNGLWINDOWPOS3SARBPROC pglWindowPos3sARB; +GLEE_EXTERN PFNGLWINDOWPOS3SVARBPROC pglWindowPos3svARB; +#define glWindowPos2dARB pglWindowPos2dARB +#define glWindowPos2dvARB pglWindowPos2dvARB +#define glWindowPos2fARB pglWindowPos2fARB +#define glWindowPos2fvARB pglWindowPos2fvARB +#define glWindowPos2iARB pglWindowPos2iARB +#define glWindowPos2ivARB pglWindowPos2ivARB +#define glWindowPos2sARB pglWindowPos2sARB +#define glWindowPos2svARB pglWindowPos2svARB +#define glWindowPos3dARB pglWindowPos3dARB +#define glWindowPos3dvARB pglWindowPos3dvARB +#define glWindowPos3fARB pglWindowPos3fARB +#define glWindowPos3fvARB pglWindowPos3fvARB +#define glWindowPos3iARB pglWindowPos3iARB +#define glWindowPos3ivARB pglWindowPos3ivARB +#define glWindowPos3sARB pglWindowPos3sARB +#define glWindowPos3svARB pglWindowPos3svARB +#endif + +/* GL_ARB_vertex_program */ + +#ifndef GL_ARB_vertex_program +#define GL_ARB_vertex_program 1 +#define __GLEE_GL_ARB_vertex_program 1 +/* Constants */ +#define GL_COLOR_SUM_ARB 0x8458 +#define GL_VERTEX_PROGRAM_ARB 0x8620 +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625 +#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626 +#define GL_PROGRAM_LENGTH_ARB 0x8627 +#define GL_PROGRAM_STRING_ARB 0x8628 +#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E +#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F +#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640 +#define GL_CURRENT_MATRIX_ARB 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643 +#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645 +#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B +#define GL_PROGRAM_BINDING_ARB 0x8677 +#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A +#define GL_PROGRAM_ERROR_STRING_ARB 0x8874 +#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875 +#define GL_PROGRAM_FORMAT_ARB 0x8876 +#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0 +#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1 +#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2 +#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3 +#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4 +#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5 +#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6 +#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7 +#define GL_PROGRAM_PARAMETERS_ARB 0x88A8 +#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9 +#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA +#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB +#define GL_PROGRAM_ATTRIBS_ARB 0x88AC +#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD +#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE +#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF +#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0 +#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1 +#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2 +#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3 +#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4 +#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5 +#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6 +#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7 +#define GL_MATRIX0_ARB 0x88C0 +#define GL_MATRIX1_ARB 0x88C1 +#define GL_MATRIX2_ARB 0x88C2 +#define GL_MATRIX3_ARB 0x88C3 +#define GL_MATRIX4_ARB 0x88C4 +#define GL_MATRIX5_ARB 0x88C5 +#define GL_MATRIX6_ARB 0x88C6 +#define GL_MATRIX7_ARB 0x88C7 +#define GL_MATRIX8_ARB 0x88C8 +#define GL_MATRIX9_ARB 0x88C9 +#define GL_MATRIX10_ARB 0x88CA +#define GL_MATRIX11_ARB 0x88CB +#define GL_MATRIX12_ARB 0x88CC +#define GL_MATRIX13_ARB 0x88CD +#define GL_MATRIX14_ARB 0x88CE +#define GL_MATRIX15_ARB 0x88CF +#define GL_MATRIX16_ARB 0x88D0 +#define GL_MATRIX17_ARB 0x88D1 +#define GL_MATRIX18_ARB 0x88D2 +#define GL_MATRIX19_ARB 0x88D3 +#define GL_MATRIX20_ARB 0x88D4 +#define GL_MATRIX21_ARB 0x88D5 +#define GL_MATRIX22_ARB 0x88D6 +#define GL_MATRIX23_ARB 0x88D7 +#define GL_MATRIX24_ARB 0x88D8 +#define GL_MATRIX25_ARB 0x88D9 +#define GL_MATRIX26_ARB 0x88DA +#define GL_MATRIX27_ARB 0x88DB +#define GL_MATRIX28_ARB 0x88DC +#define GL_MATRIX29_ARB 0x88DD +#define GL_MATRIX30_ARB 0x88DE +#define GL_MATRIX31_ARB 0x88DF +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index); +typedef void (APIENTRYP PFNGLPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid * string); +typedef void (APIENTRYP PFNGLBINDPROGRAMARBPROC) (GLenum target, GLuint program); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint * programs); +typedef void (APIENTRYP PFNGLGENPROGRAMSARBPROC) (GLsizei n, GLuint * programs); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble * params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat * params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble * params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat * params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble * params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat * params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble * params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat * params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid * string); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* * pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMARBPROC) (GLuint program); +GLEE_EXTERN PFNGLVERTEXATTRIB1DARBPROC pglVertexAttrib1dARB; +GLEE_EXTERN PFNGLVERTEXATTRIB1DVARBPROC pglVertexAttrib1dvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB1FARBPROC pglVertexAttrib1fARB; +GLEE_EXTERN PFNGLVERTEXATTRIB1FVARBPROC pglVertexAttrib1fvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB1SARBPROC pglVertexAttrib1sARB; +GLEE_EXTERN PFNGLVERTEXATTRIB1SVARBPROC pglVertexAttrib1svARB; +GLEE_EXTERN PFNGLVERTEXATTRIB2DARBPROC pglVertexAttrib2dARB; +GLEE_EXTERN PFNGLVERTEXATTRIB2DVARBPROC pglVertexAttrib2dvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB2FARBPROC pglVertexAttrib2fARB; +GLEE_EXTERN PFNGLVERTEXATTRIB2FVARBPROC pglVertexAttrib2fvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB2SARBPROC pglVertexAttrib2sARB; +GLEE_EXTERN PFNGLVERTEXATTRIB2SVARBPROC pglVertexAttrib2svARB; +GLEE_EXTERN PFNGLVERTEXATTRIB3DARBPROC pglVertexAttrib3dARB; +GLEE_EXTERN PFNGLVERTEXATTRIB3DVARBPROC pglVertexAttrib3dvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB3FARBPROC pglVertexAttrib3fARB; +GLEE_EXTERN PFNGLVERTEXATTRIB3FVARBPROC pglVertexAttrib3fvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB3SARBPROC pglVertexAttrib3sARB; +GLEE_EXTERN PFNGLVERTEXATTRIB3SVARBPROC pglVertexAttrib3svARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4NBVARBPROC pglVertexAttrib4NbvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4NIVARBPROC pglVertexAttrib4NivARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4NSVARBPROC pglVertexAttrib4NsvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4NUBARBPROC pglVertexAttrib4NubARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4NUBVARBPROC pglVertexAttrib4NubvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4NUIVARBPROC pglVertexAttrib4NuivARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4NUSVARBPROC pglVertexAttrib4NusvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4BVARBPROC pglVertexAttrib4bvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4DARBPROC pglVertexAttrib4dARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4DVARBPROC pglVertexAttrib4dvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4FARBPROC pglVertexAttrib4fARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4FVARBPROC pglVertexAttrib4fvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4IVARBPROC pglVertexAttrib4ivARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4SARBPROC pglVertexAttrib4sARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4SVARBPROC pglVertexAttrib4svARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4UBVARBPROC pglVertexAttrib4ubvARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4UIVARBPROC pglVertexAttrib4uivARB; +GLEE_EXTERN PFNGLVERTEXATTRIB4USVARBPROC pglVertexAttrib4usvARB; +GLEE_EXTERN PFNGLVERTEXATTRIBPOINTERARBPROC pglVertexAttribPointerARB; +GLEE_EXTERN PFNGLENABLEVERTEXATTRIBARRAYARBPROC pglEnableVertexAttribArrayARB; +GLEE_EXTERN PFNGLDISABLEVERTEXATTRIBARRAYARBPROC pglDisableVertexAttribArrayARB; +GLEE_EXTERN PFNGLPROGRAMSTRINGARBPROC pglProgramStringARB; +GLEE_EXTERN PFNGLBINDPROGRAMARBPROC pglBindProgramARB; +GLEE_EXTERN PFNGLDELETEPROGRAMSARBPROC pglDeleteProgramsARB; +GLEE_EXTERN PFNGLGENPROGRAMSARBPROC pglGenProgramsARB; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETER4DARBPROC pglProgramEnvParameter4dARB; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETER4DVARBPROC pglProgramEnvParameter4dvARB; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETER4FARBPROC pglProgramEnvParameter4fARB; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETER4FVARBPROC pglProgramEnvParameter4fvARB; +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETER4DARBPROC pglProgramLocalParameter4dARB; +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETER4DVARBPROC pglProgramLocalParameter4dvARB; +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETER4FARBPROC pglProgramLocalParameter4fARB; +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETER4FVARBPROC pglProgramLocalParameter4fvARB; +GLEE_EXTERN PFNGLGETPROGRAMENVPARAMETERDVARBPROC pglGetProgramEnvParameterdvARB; +GLEE_EXTERN PFNGLGETPROGRAMENVPARAMETERFVARBPROC pglGetProgramEnvParameterfvARB; +GLEE_EXTERN PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC pglGetProgramLocalParameterdvARB; +GLEE_EXTERN PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC pglGetProgramLocalParameterfvARB; +GLEE_EXTERN PFNGLGETPROGRAMIVARBPROC pglGetProgramivARB; +GLEE_EXTERN PFNGLGETPROGRAMSTRINGARBPROC pglGetProgramStringARB; +GLEE_EXTERN PFNGLGETVERTEXATTRIBDVARBPROC pglGetVertexAttribdvARB; +GLEE_EXTERN PFNGLGETVERTEXATTRIBFVARBPROC pglGetVertexAttribfvARB; +GLEE_EXTERN PFNGLGETVERTEXATTRIBIVARBPROC pglGetVertexAttribivARB; +GLEE_EXTERN PFNGLGETVERTEXATTRIBPOINTERVARBPROC pglGetVertexAttribPointervARB; +GLEE_EXTERN PFNGLISPROGRAMARBPROC pglIsProgramARB; +#define glVertexAttrib1dARB pglVertexAttrib1dARB +#define glVertexAttrib1dvARB pglVertexAttrib1dvARB +#define glVertexAttrib1fARB pglVertexAttrib1fARB +#define glVertexAttrib1fvARB pglVertexAttrib1fvARB +#define glVertexAttrib1sARB pglVertexAttrib1sARB +#define glVertexAttrib1svARB pglVertexAttrib1svARB +#define glVertexAttrib2dARB pglVertexAttrib2dARB +#define glVertexAttrib2dvARB pglVertexAttrib2dvARB +#define glVertexAttrib2fARB pglVertexAttrib2fARB +#define glVertexAttrib2fvARB pglVertexAttrib2fvARB +#define glVertexAttrib2sARB pglVertexAttrib2sARB +#define glVertexAttrib2svARB pglVertexAttrib2svARB +#define glVertexAttrib3dARB pglVertexAttrib3dARB +#define glVertexAttrib3dvARB pglVertexAttrib3dvARB +#define glVertexAttrib3fARB pglVertexAttrib3fARB +#define glVertexAttrib3fvARB pglVertexAttrib3fvARB +#define glVertexAttrib3sARB pglVertexAttrib3sARB +#define glVertexAttrib3svARB pglVertexAttrib3svARB +#define glVertexAttrib4NbvARB pglVertexAttrib4NbvARB +#define glVertexAttrib4NivARB pglVertexAttrib4NivARB +#define glVertexAttrib4NsvARB pglVertexAttrib4NsvARB +#define glVertexAttrib4NubARB pglVertexAttrib4NubARB +#define glVertexAttrib4NubvARB pglVertexAttrib4NubvARB +#define glVertexAttrib4NuivARB pglVertexAttrib4NuivARB +#define glVertexAttrib4NusvARB pglVertexAttrib4NusvARB +#define glVertexAttrib4bvARB pglVertexAttrib4bvARB +#define glVertexAttrib4dARB pglVertexAttrib4dARB +#define glVertexAttrib4dvARB pglVertexAttrib4dvARB +#define glVertexAttrib4fARB pglVertexAttrib4fARB +#define glVertexAttrib4fvARB pglVertexAttrib4fvARB +#define glVertexAttrib4ivARB pglVertexAttrib4ivARB +#define glVertexAttrib4sARB pglVertexAttrib4sARB +#define glVertexAttrib4svARB pglVertexAttrib4svARB +#define glVertexAttrib4ubvARB pglVertexAttrib4ubvARB +#define glVertexAttrib4uivARB pglVertexAttrib4uivARB +#define glVertexAttrib4usvARB pglVertexAttrib4usvARB +#define glVertexAttribPointerARB pglVertexAttribPointerARB +#define glEnableVertexAttribArrayARB pglEnableVertexAttribArrayARB +#define glDisableVertexAttribArrayARB pglDisableVertexAttribArrayARB +#define glProgramStringARB pglProgramStringARB +#define glBindProgramARB pglBindProgramARB +#define glDeleteProgramsARB pglDeleteProgramsARB +#define glGenProgramsARB pglGenProgramsARB +#define glProgramEnvParameter4dARB pglProgramEnvParameter4dARB +#define glProgramEnvParameter4dvARB pglProgramEnvParameter4dvARB +#define glProgramEnvParameter4fARB pglProgramEnvParameter4fARB +#define glProgramEnvParameter4fvARB pglProgramEnvParameter4fvARB +#define glProgramLocalParameter4dARB pglProgramLocalParameter4dARB +#define glProgramLocalParameter4dvARB pglProgramLocalParameter4dvARB +#define glProgramLocalParameter4fARB pglProgramLocalParameter4fARB +#define glProgramLocalParameter4fvARB pglProgramLocalParameter4fvARB +#define glGetProgramEnvParameterdvARB pglGetProgramEnvParameterdvARB +#define glGetProgramEnvParameterfvARB pglGetProgramEnvParameterfvARB +#define glGetProgramLocalParameterdvARB pglGetProgramLocalParameterdvARB +#define glGetProgramLocalParameterfvARB pglGetProgramLocalParameterfvARB +#define glGetProgramivARB pglGetProgramivARB +#define glGetProgramStringARB pglGetProgramStringARB +#define glGetVertexAttribdvARB pglGetVertexAttribdvARB +#define glGetVertexAttribfvARB pglGetVertexAttribfvARB +#define glGetVertexAttribivARB pglGetVertexAttribivARB +#define glGetVertexAttribPointervARB pglGetVertexAttribPointervARB +#define glIsProgramARB pglIsProgramARB +#endif + +/* GL_ARB_fragment_program */ + +#ifndef GL_ARB_fragment_program +#define GL_ARB_fragment_program 1 +#define __GLEE_GL_ARB_fragment_program 1 +/* Constants */ +#define GL_FRAGMENT_PROGRAM_ARB 0x8804 +#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805 +#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806 +#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807 +#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808 +#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809 +#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A +#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B +#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C +#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D +#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E +#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F +#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810 +#define GL_MAX_TEXTURE_COORDS_ARB 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872 +#endif + +/* GL_ARB_vertex_buffer_object */ + +#ifndef GL_ARB_vertex_buffer_object +#define GL_ARB_vertex_buffer_object 1 +#define __GLEE_GL_ARB_vertex_buffer_object 1 +/* Constants */ +#define GL_BUFFER_SIZE_ARB 0x8764 +#define GL_BUFFER_USAGE_ARB 0x8765 +#define GL_ARRAY_BUFFER_ARB 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER_ARB 0x8893 +#define GL_ARRAY_BUFFER_BINDING_ARB 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB 0x8895 +#define GL_VERTEX_ARRAY_BUFFER_BINDING_ARB 0x8896 +#define GL_NORMAL_ARRAY_BUFFER_BINDING_ARB 0x8897 +#define GL_COLOR_ARRAY_BUFFER_BINDING_ARB 0x8898 +#define GL_INDEX_ARRAY_BUFFER_BINDING_ARB 0x8899 +#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB 0x889A +#define GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB 0x889B +#define GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB 0x889C +#define GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB 0x889D +#define GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB 0x889E +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB 0x889F +#define GL_READ_ONLY_ARB 0x88B8 +#define GL_WRITE_ONLY_ARB 0x88B9 +#define GL_READ_WRITE_ARB 0x88BA +#define GL_BUFFER_ACCESS_ARB 0x88BB +#define GL_BUFFER_MAPPED_ARB 0x88BC +#define GL_BUFFER_MAP_POINTER_ARB 0x88BD +#define GL_STREAM_DRAW_ARB 0x88E0 +#define GL_STREAM_READ_ARB 0x88E1 +#define GL_STREAM_COPY_ARB 0x88E2 +#define GL_STATIC_DRAW_ARB 0x88E4 +#define GL_STATIC_READ_ARB 0x88E5 +#define GL_STATIC_COPY_ARB 0x88E6 +#define GL_DYNAMIC_DRAW_ARB 0x88E8 +#define GL_DYNAMIC_READ_ARB 0x88E9 +#define GL_DYNAMIC_COPY_ARB 0x88EA +typedef void (APIENTRYP PFNGLBINDBUFFERARBPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRYP PFNGLDELETEBUFFERSARBPROC) (GLsizei n, const GLuint * buffers); +typedef void (APIENTRYP PFNGLGENBUFFERSARBPROC) (GLsizei n, GLuint * buffers); +typedef GLboolean (APIENTRYP PFNGLISBUFFERARBPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLBUFFERDATAARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); +typedef void (APIENTRYP PFNGLBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); +typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); +typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERARBPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVARBPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVARBPROC) (GLenum target, GLenum pname, GLvoid* * params); +GLEE_EXTERN PFNGLBINDBUFFERARBPROC pglBindBufferARB; +GLEE_EXTERN PFNGLDELETEBUFFERSARBPROC pglDeleteBuffersARB; +GLEE_EXTERN PFNGLGENBUFFERSARBPROC pglGenBuffersARB; +GLEE_EXTERN PFNGLISBUFFERARBPROC pglIsBufferARB; +GLEE_EXTERN PFNGLBUFFERDATAARBPROC pglBufferDataARB; +GLEE_EXTERN PFNGLBUFFERSUBDATAARBPROC pglBufferSubDataARB; +GLEE_EXTERN PFNGLGETBUFFERSUBDATAARBPROC pglGetBufferSubDataARB; +GLEE_EXTERN PFNGLMAPBUFFERARBPROC pglMapBufferARB; +GLEE_EXTERN PFNGLUNMAPBUFFERARBPROC pglUnmapBufferARB; +GLEE_EXTERN PFNGLGETBUFFERPARAMETERIVARBPROC pglGetBufferParameterivARB; +GLEE_EXTERN PFNGLGETBUFFERPOINTERVARBPROC pglGetBufferPointervARB; +#define glBindBufferARB pglBindBufferARB +#define glDeleteBuffersARB pglDeleteBuffersARB +#define glGenBuffersARB pglGenBuffersARB +#define glIsBufferARB pglIsBufferARB +#define glBufferDataARB pglBufferDataARB +#define glBufferSubDataARB pglBufferSubDataARB +#define glGetBufferSubDataARB pglGetBufferSubDataARB +#define glMapBufferARB pglMapBufferARB +#define glUnmapBufferARB pglUnmapBufferARB +#define glGetBufferParameterivARB pglGetBufferParameterivARB +#define glGetBufferPointervARB pglGetBufferPointervARB +#endif + +/* GL_ARB_occlusion_query */ + +#ifndef GL_ARB_occlusion_query +#define GL_ARB_occlusion_query 1 +#define __GLEE_GL_ARB_occlusion_query 1 +/* Constants */ +#define GL_QUERY_COUNTER_BITS_ARB 0x8864 +#define GL_CURRENT_QUERY_ARB 0x8865 +#define GL_QUERY_RESULT_ARB 0x8866 +#define GL_QUERY_RESULT_AVAILABLE_ARB 0x8867 +#define GL_SAMPLES_PASSED_ARB 0x8914 +typedef void (APIENTRYP PFNGLGENQUERIESARBPROC) (GLsizei n, GLuint * ids); +typedef void (APIENTRYP PFNGLDELETEQUERIESARBPROC) (GLsizei n, const GLuint * ids); +typedef GLboolean (APIENTRYP PFNGLISQUERYARBPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINQUERYARBPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLENDQUERYARBPROC) (GLenum target); +typedef void (APIENTRYP PFNGLGETQUERYIVARBPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVARBPROC) (GLuint id, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVARBPROC) (GLuint id, GLenum pname, GLuint * params); +GLEE_EXTERN PFNGLGENQUERIESARBPROC pglGenQueriesARB; +GLEE_EXTERN PFNGLDELETEQUERIESARBPROC pglDeleteQueriesARB; +GLEE_EXTERN PFNGLISQUERYARBPROC pglIsQueryARB; +GLEE_EXTERN PFNGLBEGINQUERYARBPROC pglBeginQueryARB; +GLEE_EXTERN PFNGLENDQUERYARBPROC pglEndQueryARB; +GLEE_EXTERN PFNGLGETQUERYIVARBPROC pglGetQueryivARB; +GLEE_EXTERN PFNGLGETQUERYOBJECTIVARBPROC pglGetQueryObjectivARB; +GLEE_EXTERN PFNGLGETQUERYOBJECTUIVARBPROC pglGetQueryObjectuivARB; +#define glGenQueriesARB pglGenQueriesARB +#define glDeleteQueriesARB pglDeleteQueriesARB +#define glIsQueryARB pglIsQueryARB +#define glBeginQueryARB pglBeginQueryARB +#define glEndQueryARB pglEndQueryARB +#define glGetQueryivARB pglGetQueryivARB +#define glGetQueryObjectivARB pglGetQueryObjectivARB +#define glGetQueryObjectuivARB pglGetQueryObjectuivARB +#endif + +/* GL_ARB_shader_objects */ + +#ifndef GL_ARB_shader_objects +#define GL_ARB_shader_objects 1 +#define __GLEE_GL_ARB_shader_objects 1 +/* Constants */ +#define GL_PROGRAM_OBJECT_ARB 0x8B40 +#define GL_SHADER_OBJECT_ARB 0x8B48 +#define GL_OBJECT_TYPE_ARB 0x8B4E +#define GL_OBJECT_SUBTYPE_ARB 0x8B4F +#define GL_FLOAT_VEC2_ARB 0x8B50 +#define GL_FLOAT_VEC3_ARB 0x8B51 +#define GL_FLOAT_VEC4_ARB 0x8B52 +#define GL_INT_VEC2_ARB 0x8B53 +#define GL_INT_VEC3_ARB 0x8B54 +#define GL_INT_VEC4_ARB 0x8B55 +#define GL_BOOL_ARB 0x8B56 +#define GL_BOOL_VEC2_ARB 0x8B57 +#define GL_BOOL_VEC3_ARB 0x8B58 +#define GL_BOOL_VEC4_ARB 0x8B59 +#define GL_FLOAT_MAT2_ARB 0x8B5A +#define GL_FLOAT_MAT3_ARB 0x8B5B +#define GL_FLOAT_MAT4_ARB 0x8B5C +#define GL_SAMPLER_1D_ARB 0x8B5D +#define GL_SAMPLER_2D_ARB 0x8B5E +#define GL_SAMPLER_3D_ARB 0x8B5F +#define GL_SAMPLER_CUBE_ARB 0x8B60 +#define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 +#define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 +#define GL_SAMPLER_2D_RECT_ARB 0x8B63 +#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 +#define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 +#define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 +#define GL_OBJECT_LINK_STATUS_ARB 0x8B82 +#define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 +#define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 +#define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 +#define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 +#define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 +#define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 +typedef void (APIENTRYP PFNGLDELETEOBJECTARBPROC) (GLhandleARB obj); +typedef GLhandleARB (APIENTRYP PFNGLGETHANDLEARBPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLDETACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATESHADEROBJECTARBPROC) (GLenum shaderType); +typedef void (APIENTRYP PFNGLSHADERSOURCEARBPROC) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* * string, const GLint * length); +typedef void (APIENTRYP PFNGLCOMPILESHADERARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB (APIENTRYP PFNGLCREATEPROGRAMOBJECTARBPROC) (); +typedef void (APIENTRYP PFNGLATTACHOBJECTARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void (APIENTRYP PFNGLLINKPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUSEPROGRAMOBJECTARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLVALIDATEPROGRAMARBPROC) (GLhandleARB programObj); +typedef void (APIENTRYP PFNGLUNIFORM1FARBPROC) (GLint location, GLfloat v0); +typedef void (APIENTRYP PFNGLUNIFORM2FARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRYP PFNGLUNIFORM3FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRYP PFNGLUNIFORM4FARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRYP PFNGLUNIFORM1IARBPROC) (GLint location, GLint v0); +typedef void (APIENTRYP PFNGLUNIFORM2IARBPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRYP PFNGLUNIFORM3IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRYP PFNGLUNIFORM4IARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRYP PFNGLUNIFORM1FVARBPROC) (GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORM2FVARBPROC) (GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORM3FVARBPROC) (GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORM4FVARBPROC) (GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORM1IVARBPROC) (GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRYP PFNGLUNIFORM2IVARBPROC) (GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRYP PFNGLUNIFORM3IVARBPROC) (GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRYP PFNGLUNIFORM4IVARBPROC) (GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERFVARBPROC) (GLhandleARB obj, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETOBJECTPARAMETERIVARBPROC) (GLhandleARB obj, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETINFOLOGARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); +typedef void (APIENTRYP PFNGLGETATTACHEDOBJECTSARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei * count, GLhandleARB * obj); +typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB * name); +typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); +typedef void (APIENTRYP PFNGLGETUNIFORMFVARBPROC) (GLhandleARB programObj, GLint location, GLfloat * params); +typedef void (APIENTRYP PFNGLGETUNIFORMIVARBPROC) (GLhandleARB programObj, GLint location, GLint * params); +typedef void (APIENTRYP PFNGLGETSHADERSOURCEARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * source); +GLEE_EXTERN PFNGLDELETEOBJECTARBPROC pglDeleteObjectARB; +GLEE_EXTERN PFNGLGETHANDLEARBPROC pglGetHandleARB; +GLEE_EXTERN PFNGLDETACHOBJECTARBPROC pglDetachObjectARB; +GLEE_EXTERN PFNGLCREATESHADEROBJECTARBPROC pglCreateShaderObjectARB; +GLEE_EXTERN PFNGLSHADERSOURCEARBPROC pglShaderSourceARB; +GLEE_EXTERN PFNGLCOMPILESHADERARBPROC pglCompileShaderARB; +GLEE_EXTERN PFNGLCREATEPROGRAMOBJECTARBPROC pglCreateProgramObjectARB; +GLEE_EXTERN PFNGLATTACHOBJECTARBPROC pglAttachObjectARB; +GLEE_EXTERN PFNGLLINKPROGRAMARBPROC pglLinkProgramARB; +GLEE_EXTERN PFNGLUSEPROGRAMOBJECTARBPROC pglUseProgramObjectARB; +GLEE_EXTERN PFNGLVALIDATEPROGRAMARBPROC pglValidateProgramARB; +GLEE_EXTERN PFNGLUNIFORM1FARBPROC pglUniform1fARB; +GLEE_EXTERN PFNGLUNIFORM2FARBPROC pglUniform2fARB; +GLEE_EXTERN PFNGLUNIFORM3FARBPROC pglUniform3fARB; +GLEE_EXTERN PFNGLUNIFORM4FARBPROC pglUniform4fARB; +GLEE_EXTERN PFNGLUNIFORM1IARBPROC pglUniform1iARB; +GLEE_EXTERN PFNGLUNIFORM2IARBPROC pglUniform2iARB; +GLEE_EXTERN PFNGLUNIFORM3IARBPROC pglUniform3iARB; +GLEE_EXTERN PFNGLUNIFORM4IARBPROC pglUniform4iARB; +GLEE_EXTERN PFNGLUNIFORM1FVARBPROC pglUniform1fvARB; +GLEE_EXTERN PFNGLUNIFORM2FVARBPROC pglUniform2fvARB; +GLEE_EXTERN PFNGLUNIFORM3FVARBPROC pglUniform3fvARB; +GLEE_EXTERN PFNGLUNIFORM4FVARBPROC pglUniform4fvARB; +GLEE_EXTERN PFNGLUNIFORM1IVARBPROC pglUniform1ivARB; +GLEE_EXTERN PFNGLUNIFORM2IVARBPROC pglUniform2ivARB; +GLEE_EXTERN PFNGLUNIFORM3IVARBPROC pglUniform3ivARB; +GLEE_EXTERN PFNGLUNIFORM4IVARBPROC pglUniform4ivARB; +GLEE_EXTERN PFNGLUNIFORMMATRIX2FVARBPROC pglUniformMatrix2fvARB; +GLEE_EXTERN PFNGLUNIFORMMATRIX3FVARBPROC pglUniformMatrix3fvARB; +GLEE_EXTERN PFNGLUNIFORMMATRIX4FVARBPROC pglUniformMatrix4fvARB; +GLEE_EXTERN PFNGLGETOBJECTPARAMETERFVARBPROC pglGetObjectParameterfvARB; +GLEE_EXTERN PFNGLGETOBJECTPARAMETERIVARBPROC pglGetObjectParameterivARB; +GLEE_EXTERN PFNGLGETINFOLOGARBPROC pglGetInfoLogARB; +GLEE_EXTERN PFNGLGETATTACHEDOBJECTSARBPROC pglGetAttachedObjectsARB; +GLEE_EXTERN PFNGLGETUNIFORMLOCATIONARBPROC pglGetUniformLocationARB; +GLEE_EXTERN PFNGLGETACTIVEUNIFORMARBPROC pglGetActiveUniformARB; +GLEE_EXTERN PFNGLGETUNIFORMFVARBPROC pglGetUniformfvARB; +GLEE_EXTERN PFNGLGETUNIFORMIVARBPROC pglGetUniformivARB; +GLEE_EXTERN PFNGLGETSHADERSOURCEARBPROC pglGetShaderSourceARB; +#define glDeleteObjectARB pglDeleteObjectARB +#define glGetHandleARB pglGetHandleARB +#define glDetachObjectARB pglDetachObjectARB +#define glCreateShaderObjectARB pglCreateShaderObjectARB +#define glShaderSourceARB pglShaderSourceARB +#define glCompileShaderARB pglCompileShaderARB +#define glCreateProgramObjectARB pglCreateProgramObjectARB +#define glAttachObjectARB pglAttachObjectARB +#define glLinkProgramARB pglLinkProgramARB +#define glUseProgramObjectARB pglUseProgramObjectARB +#define glValidateProgramARB pglValidateProgramARB +#define glUniform1fARB pglUniform1fARB +#define glUniform2fARB pglUniform2fARB +#define glUniform3fARB pglUniform3fARB +#define glUniform4fARB pglUniform4fARB +#define glUniform1iARB pglUniform1iARB +#define glUniform2iARB pglUniform2iARB +#define glUniform3iARB pglUniform3iARB +#define glUniform4iARB pglUniform4iARB +#define glUniform1fvARB pglUniform1fvARB +#define glUniform2fvARB pglUniform2fvARB +#define glUniform3fvARB pglUniform3fvARB +#define glUniform4fvARB pglUniform4fvARB +#define glUniform1ivARB pglUniform1ivARB +#define glUniform2ivARB pglUniform2ivARB +#define glUniform3ivARB pglUniform3ivARB +#define glUniform4ivARB pglUniform4ivARB +#define glUniformMatrix2fvARB pglUniformMatrix2fvARB +#define glUniformMatrix3fvARB pglUniformMatrix3fvARB +#define glUniformMatrix4fvARB pglUniformMatrix4fvARB +#define glGetObjectParameterfvARB pglGetObjectParameterfvARB +#define glGetObjectParameterivARB pglGetObjectParameterivARB +#define glGetInfoLogARB pglGetInfoLogARB +#define glGetAttachedObjectsARB pglGetAttachedObjectsARB +#define glGetUniformLocationARB pglGetUniformLocationARB +#define glGetActiveUniformARB pglGetActiveUniformARB +#define glGetUniformfvARB pglGetUniformfvARB +#define glGetUniformivARB pglGetUniformivARB +#define glGetShaderSourceARB pglGetShaderSourceARB +#endif + +/* GL_ARB_vertex_shader */ + +#ifndef GL_ARB_vertex_shader +#define GL_ARB_vertex_shader 1 +#define __GLEE_GL_ARB_vertex_shader 1 +/* Constants */ +#define GL_VERTEX_SHADER_ARB 0x8B31 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A +#define GL_MAX_VARYING_FLOATS_ARB 0x8B4B +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D +#define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 +#define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A +typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB * name); +typedef void (APIENTRYP PFNGLGETACTIVEATTRIBARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); +typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONARBPROC) (GLhandleARB programObj, const GLcharARB * name); +GLEE_EXTERN PFNGLBINDATTRIBLOCATIONARBPROC pglBindAttribLocationARB; +GLEE_EXTERN PFNGLGETACTIVEATTRIBARBPROC pglGetActiveAttribARB; +GLEE_EXTERN PFNGLGETATTRIBLOCATIONARBPROC pglGetAttribLocationARB; +#define glBindAttribLocationARB pglBindAttribLocationARB +#define glGetActiveAttribARB pglGetActiveAttribARB +#define glGetAttribLocationARB pglGetAttribLocationARB +#endif + +/* GL_ARB_fragment_shader */ + +#ifndef GL_ARB_fragment_shader +#define GL_ARB_fragment_shader 1 +#define __GLEE_GL_ARB_fragment_shader 1 +/* Constants */ +#define GL_FRAGMENT_SHADER_ARB 0x8B30 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B +#endif + +/* GL_ARB_shading_language_100 */ + +#ifndef GL_ARB_shading_language_100 +#define GL_ARB_shading_language_100 1 +#define __GLEE_GL_ARB_shading_language_100 1 +/* Constants */ +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#endif + +/* GL_ARB_texture_non_power_of_two */ + +#ifndef GL_ARB_texture_non_power_of_two +#define GL_ARB_texture_non_power_of_two 1 +#define __GLEE_GL_ARB_texture_non_power_of_two 1 +/* Constants */ +#endif + +/* GL_ARB_point_sprite */ + +#ifndef GL_ARB_point_sprite +#define GL_ARB_point_sprite 1 +#define __GLEE_GL_ARB_point_sprite 1 +/* Constants */ +#define GL_POINT_SPRITE_ARB 0x8861 +#define GL_COORD_REPLACE_ARB 0x8862 +#endif + +/* GL_ARB_fragment_program_shadow */ + +#ifndef GL_ARB_fragment_program_shadow +#define GL_ARB_fragment_program_shadow 1 +#define __GLEE_GL_ARB_fragment_program_shadow 1 +/* Constants */ +#endif + +/* GL_ARB_draw_buffers */ + +#ifndef GL_ARB_draw_buffers +#define GL_ARB_draw_buffers 1 +#define __GLEE_GL_ARB_draw_buffers 1 +/* Constants */ +#define GL_MAX_DRAW_BUFFERS_ARB 0x8824 +#define GL_DRAW_BUFFER0_ARB 0x8825 +#define GL_DRAW_BUFFER1_ARB 0x8826 +#define GL_DRAW_BUFFER2_ARB 0x8827 +#define GL_DRAW_BUFFER3_ARB 0x8828 +#define GL_DRAW_BUFFER4_ARB 0x8829 +#define GL_DRAW_BUFFER5_ARB 0x882A +#define GL_DRAW_BUFFER6_ARB 0x882B +#define GL_DRAW_BUFFER7_ARB 0x882C +#define GL_DRAW_BUFFER8_ARB 0x882D +#define GL_DRAW_BUFFER9_ARB 0x882E +#define GL_DRAW_BUFFER10_ARB 0x882F +#define GL_DRAW_BUFFER11_ARB 0x8830 +#define GL_DRAW_BUFFER12_ARB 0x8831 +#define GL_DRAW_BUFFER13_ARB 0x8832 +#define GL_DRAW_BUFFER14_ARB 0x8833 +#define GL_DRAW_BUFFER15_ARB 0x8834 +typedef void (APIENTRYP PFNGLDRAWBUFFERSARBPROC) (GLsizei n, const GLenum * bufs); +GLEE_EXTERN PFNGLDRAWBUFFERSARBPROC pglDrawBuffersARB; +#define glDrawBuffersARB pglDrawBuffersARB +#endif + +/* GL_ARB_texture_rectangle */ + +#ifndef GL_ARB_texture_rectangle +#define GL_ARB_texture_rectangle 1 +#define __GLEE_GL_ARB_texture_rectangle 1 +/* Constants */ +#define GL_TEXTURE_RECTANGLE_ARB 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8 +#endif + +/* GL_ARB_color_buffer_float */ + +#ifndef GL_ARB_color_buffer_float +#define GL_ARB_color_buffer_float 1 +#define __GLEE_GL_ARB_color_buffer_float 1 +/* Constants */ +#define GL_RGBA_FLOAT_MODE_ARB 0x8820 +#define GL_CLAMP_VERTEX_COLOR_ARB 0x891A +#define GL_CLAMP_FRAGMENT_COLOR_ARB 0x891B +#define GL_CLAMP_READ_COLOR_ARB 0x891C +#define GL_FIXED_ONLY_ARB 0x891D +typedef void (APIENTRYP PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp); +GLEE_EXTERN PFNGLCLAMPCOLORARBPROC pglClampColorARB; +#define glClampColorARB pglClampColorARB +#endif + +/* GL_ARB_half_float_pixel */ + +#ifndef GL_ARB_half_float_pixel +#define GL_ARB_half_float_pixel 1 +#define __GLEE_GL_ARB_half_float_pixel 1 +/* Constants */ +#define GL_HALF_FLOAT_ARB 0x140B +#endif + +/* GL_ARB_texture_float */ + +#ifndef GL_ARB_texture_float +#define GL_ARB_texture_float 1 +#define __GLEE_GL_ARB_texture_float 1 +/* Constants */ +#define GL_TEXTURE_RED_TYPE_ARB 0x8C10 +#define GL_TEXTURE_GREEN_TYPE_ARB 0x8C11 +#define GL_TEXTURE_BLUE_TYPE_ARB 0x8C12 +#define GL_TEXTURE_ALPHA_TYPE_ARB 0x8C13 +#define GL_TEXTURE_LUMINANCE_TYPE_ARB 0x8C14 +#define GL_TEXTURE_INTENSITY_TYPE_ARB 0x8C15 +#define GL_TEXTURE_DEPTH_TYPE_ARB 0x8C16 +#define GL_UNSIGNED_NORMALIZED_ARB 0x8C17 +#define GL_RGBA32F_ARB 0x8814 +#define GL_RGB32F_ARB 0x8815 +#define GL_ALPHA32F_ARB 0x8816 +#define GL_INTENSITY32F_ARB 0x8817 +#define GL_LUMINANCE32F_ARB 0x8818 +#define GL_LUMINANCE_ALPHA32F_ARB 0x8819 +#define GL_RGBA16F_ARB 0x881A +#define GL_RGB16F_ARB 0x881B +#define GL_ALPHA16F_ARB 0x881C +#define GL_INTENSITY16F_ARB 0x881D +#define GL_LUMINANCE16F_ARB 0x881E +#define GL_LUMINANCE_ALPHA16F_ARB 0x881F +#endif + +/* GL_ARB_pixel_buffer_object */ + +#ifndef GL_ARB_pixel_buffer_object +#define GL_ARB_pixel_buffer_object 1 +#define __GLEE_GL_ARB_pixel_buffer_object 1 +/* Constants */ +#define GL_PIXEL_PACK_BUFFER_ARB 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_ARB 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_ARB 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_ARB 0x88EF +#endif + +/* GL_EXT_abgr */ + +#ifndef GL_EXT_abgr +#define GL_EXT_abgr 1 +#define __GLEE_GL_EXT_abgr 1 +/* Constants */ +#define GL_ABGR_EXT 0x8000 +#endif + +/* GL_EXT_blend_color */ + +#ifndef GL_EXT_blend_color +#define GL_EXT_blend_color 1 +#define __GLEE_GL_EXT_blend_color 1 +/* Constants */ +#define GL_CONSTANT_COLOR_EXT 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR_EXT 0x8002 +#define GL_CONSTANT_ALPHA_EXT 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA_EXT 0x8004 +#define GL_BLEND_COLOR_EXT 0x8005 +typedef void (APIENTRYP PFNGLBLENDCOLOREXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GLEE_EXTERN PFNGLBLENDCOLOREXTPROC pglBlendColorEXT; +#define glBlendColorEXT pglBlendColorEXT +#endif + +/* GL_EXT_polygon_offset */ + +#ifndef GL_EXT_polygon_offset +#define GL_EXT_polygon_offset 1 +#define __GLEE_GL_EXT_polygon_offset 1 +/* Constants */ +#define GL_POLYGON_OFFSET_EXT 0x8037 +#define GL_POLYGON_OFFSET_FACTOR_EXT 0x8038 +#define GL_POLYGON_OFFSET_BIAS_EXT 0x8039 +typedef void (APIENTRYP PFNGLPOLYGONOFFSETEXTPROC) (GLfloat factor, GLfloat bias); +GLEE_EXTERN PFNGLPOLYGONOFFSETEXTPROC pglPolygonOffsetEXT; +#define glPolygonOffsetEXT pglPolygonOffsetEXT +#endif + +/* GL_EXT_texture */ + +#ifndef GL_EXT_texture +#define GL_EXT_texture 1 +#define __GLEE_GL_EXT_texture 1 +/* Constants */ +#define GL_ALPHA4_EXT 0x803B +#define GL_ALPHA8_EXT 0x803C +#define GL_ALPHA12_EXT 0x803D +#define GL_ALPHA16_EXT 0x803E +#define GL_LUMINANCE4_EXT 0x803F +#define GL_LUMINANCE8_EXT 0x8040 +#define GL_LUMINANCE12_EXT 0x8041 +#define GL_LUMINANCE16_EXT 0x8042 +#define GL_LUMINANCE4_ALPHA4_EXT 0x8043 +#define GL_LUMINANCE6_ALPHA2_EXT 0x8044 +#define GL_LUMINANCE8_ALPHA8_EXT 0x8045 +#define GL_LUMINANCE12_ALPHA4_EXT 0x8046 +#define GL_LUMINANCE12_ALPHA12_EXT 0x8047 +#define GL_LUMINANCE16_ALPHA16_EXT 0x8048 +#define GL_INTENSITY_EXT 0x8049 +#define GL_INTENSITY4_EXT 0x804A +#define GL_INTENSITY8_EXT 0x804B +#define GL_INTENSITY12_EXT 0x804C +#define GL_INTENSITY16_EXT 0x804D +#define GL_RGB2_EXT 0x804E +#define GL_RGB4_EXT 0x804F +#define GL_RGB5_EXT 0x8050 +#define GL_RGB8_EXT 0x8051 +#define GL_RGB10_EXT 0x8052 +#define GL_RGB12_EXT 0x8053 +#define GL_RGB16_EXT 0x8054 +#define GL_RGBA2_EXT 0x8055 +#define GL_RGBA4_EXT 0x8056 +#define GL_RGB5_A1_EXT 0x8057 +#define GL_RGBA8_EXT 0x8058 +#define GL_RGB10_A2_EXT 0x8059 +#define GL_RGBA12_EXT 0x805A +#define GL_RGBA16_EXT 0x805B +#define GL_TEXTURE_RED_SIZE_EXT 0x805C +#define GL_TEXTURE_GREEN_SIZE_EXT 0x805D +#define GL_TEXTURE_BLUE_SIZE_EXT 0x805E +#define GL_TEXTURE_ALPHA_SIZE_EXT 0x805F +#define GL_TEXTURE_LUMINANCE_SIZE_EXT 0x8060 +#define GL_TEXTURE_INTENSITY_SIZE_EXT 0x8061 +#define GL_REPLACE_EXT 0x8062 +#define GL_PROXY_TEXTURE_1D_EXT 0x8063 +#define GL_PROXY_TEXTURE_2D_EXT 0x8064 +#define GL_TEXTURE_TOO_LARGE_EXT 0x8065 +#endif + +/* GL_EXT_texture3D */ + +#ifndef GL_EXT_texture3D +#define GL_EXT_texture3D 1 +#define __GLEE_GL_EXT_texture3D 1 +/* Constants */ +#define GL_PACK_SKIP_IMAGES_EXT 0x806B +#define GL_PACK_IMAGE_HEIGHT_EXT 0x806C +#define GL_UNPACK_SKIP_IMAGES_EXT 0x806D +#define GL_UNPACK_IMAGE_HEIGHT_EXT 0x806E +#define GL_TEXTURE_3D_EXT 0x806F +#define GL_PROXY_TEXTURE_3D_EXT 0x8070 +#define GL_TEXTURE_DEPTH_EXT 0x8071 +#define GL_TEXTURE_WRAP_R_EXT 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE_EXT 0x8073 +typedef void (APIENTRYP PFNGLTEXIMAGE3DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); +GLEE_EXTERN PFNGLTEXIMAGE3DEXTPROC pglTexImage3DEXT; +GLEE_EXTERN PFNGLTEXSUBIMAGE3DEXTPROC pglTexSubImage3DEXT; +#define glTexImage3DEXT pglTexImage3DEXT +#define glTexSubImage3DEXT pglTexSubImage3DEXT +#endif + +/* GL_SGIS_texture_filter4 */ + +#ifndef GL_SGIS_texture_filter4 +#define GL_SGIS_texture_filter4 1 +#define __GLEE_GL_SGIS_texture_filter4 1 +/* Constants */ +#define GL_FILTER4_SGIS 0x8146 +#define GL_TEXTURE_FILTER4_SIZE_SGIS 0x8147 +typedef void (APIENTRYP PFNGLGETTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLfloat * weights); +typedef void (APIENTRYP PFNGLTEXFILTERFUNCSGISPROC) (GLenum target, GLenum filter, GLsizei n, const GLfloat * weights); +GLEE_EXTERN PFNGLGETTEXFILTERFUNCSGISPROC pglGetTexFilterFuncSGIS; +GLEE_EXTERN PFNGLTEXFILTERFUNCSGISPROC pglTexFilterFuncSGIS; +#define glGetTexFilterFuncSGIS pglGetTexFilterFuncSGIS +#define glTexFilterFuncSGIS pglTexFilterFuncSGIS +#endif + +/* GL_EXT_subtexture */ + +#ifndef GL_EXT_subtexture +#define GL_EXT_subtexture 1 +#define __GLEE_GL_EXT_subtexture 1 +/* Constants */ +typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); +GLEE_EXTERN PFNGLTEXSUBIMAGE1DEXTPROC pglTexSubImage1DEXT; +GLEE_EXTERN PFNGLTEXSUBIMAGE2DEXTPROC pglTexSubImage2DEXT; +#define glTexSubImage1DEXT pglTexSubImage1DEXT +#define glTexSubImage2DEXT pglTexSubImage2DEXT +#endif + +/* GL_EXT_copy_texture */ + +#ifndef GL_EXT_copy_texture +#define GL_EXT_copy_texture 1 +#define __GLEE_GL_EXT_copy_texture 1 +/* Constants */ +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DEXTPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DEXTPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GLEE_EXTERN PFNGLCOPYTEXIMAGE1DEXTPROC pglCopyTexImage1DEXT; +GLEE_EXTERN PFNGLCOPYTEXIMAGE2DEXTPROC pglCopyTexImage2DEXT; +GLEE_EXTERN PFNGLCOPYTEXSUBIMAGE1DEXTPROC pglCopyTexSubImage1DEXT; +GLEE_EXTERN PFNGLCOPYTEXSUBIMAGE2DEXTPROC pglCopyTexSubImage2DEXT; +GLEE_EXTERN PFNGLCOPYTEXSUBIMAGE3DEXTPROC pglCopyTexSubImage3DEXT; +#define glCopyTexImage1DEXT pglCopyTexImage1DEXT +#define glCopyTexImage2DEXT pglCopyTexImage2DEXT +#define glCopyTexSubImage1DEXT pglCopyTexSubImage1DEXT +#define glCopyTexSubImage2DEXT pglCopyTexSubImage2DEXT +#define glCopyTexSubImage3DEXT pglCopyTexSubImage3DEXT +#endif + +/* GL_EXT_histogram */ + +#ifndef GL_EXT_histogram +#define GL_EXT_histogram 1 +#define __GLEE_GL_EXT_histogram 1 +/* Constants */ +#define GL_HISTOGRAM_EXT 0x8024 +#define GL_PROXY_HISTOGRAM_EXT 0x8025 +#define GL_HISTOGRAM_WIDTH_EXT 0x8026 +#define GL_HISTOGRAM_FORMAT_EXT 0x8027 +#define GL_HISTOGRAM_RED_SIZE_EXT 0x8028 +#define GL_HISTOGRAM_GREEN_SIZE_EXT 0x8029 +#define GL_HISTOGRAM_BLUE_SIZE_EXT 0x802A +#define GL_HISTOGRAM_ALPHA_SIZE_EXT 0x802B +#define GL_HISTOGRAM_LUMINANCE_SIZE_EXT 0x802C +#define GL_HISTOGRAM_SINK_EXT 0x802D +#define GL_MINMAX_EXT 0x802E +#define GL_MINMAX_FORMAT_EXT 0x802F +#define GL_MINMAX_SINK_EXT 0x8030 +#define GL_TABLE_TOO_LARGE_EXT 0x8031 +typedef void (APIENTRYP PFNGLGETHISTOGRAMEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETHISTOGRAMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETMINMAXEXTPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETMINMAXPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLHISTOGRAMEXTPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLMINMAXEXTPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRYP PFNGLRESETHISTOGRAMEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLRESETMINMAXEXTPROC) (GLenum target); +GLEE_EXTERN PFNGLGETHISTOGRAMEXTPROC pglGetHistogramEXT; +GLEE_EXTERN PFNGLGETHISTOGRAMPARAMETERFVEXTPROC pglGetHistogramParameterfvEXT; +GLEE_EXTERN PFNGLGETHISTOGRAMPARAMETERIVEXTPROC pglGetHistogramParameterivEXT; +GLEE_EXTERN PFNGLGETMINMAXEXTPROC pglGetMinmaxEXT; +GLEE_EXTERN PFNGLGETMINMAXPARAMETERFVEXTPROC pglGetMinmaxParameterfvEXT; +GLEE_EXTERN PFNGLGETMINMAXPARAMETERIVEXTPROC pglGetMinmaxParameterivEXT; +GLEE_EXTERN PFNGLHISTOGRAMEXTPROC pglHistogramEXT; +GLEE_EXTERN PFNGLMINMAXEXTPROC pglMinmaxEXT; +GLEE_EXTERN PFNGLRESETHISTOGRAMEXTPROC pglResetHistogramEXT; +GLEE_EXTERN PFNGLRESETMINMAXEXTPROC pglResetMinmaxEXT; +#define glGetHistogramEXT pglGetHistogramEXT +#define glGetHistogramParameterfvEXT pglGetHistogramParameterfvEXT +#define glGetHistogramParameterivEXT pglGetHistogramParameterivEXT +#define glGetMinmaxEXT pglGetMinmaxEXT +#define glGetMinmaxParameterfvEXT pglGetMinmaxParameterfvEXT +#define glGetMinmaxParameterivEXT pglGetMinmaxParameterivEXT +#define glHistogramEXT pglHistogramEXT +#define glMinmaxEXT pglMinmaxEXT +#define glResetHistogramEXT pglResetHistogramEXT +#define glResetMinmaxEXT pglResetMinmaxEXT +#endif + +/* GL_EXT_convolution */ + +#ifndef GL_EXT_convolution +#define GL_EXT_convolution 1 +#define __GLEE_GL_EXT_convolution 1 +/* Constants */ +#define GL_CONVOLUTION_1D_EXT 0x8010 +#define GL_CONVOLUTION_2D_EXT 0x8011 +#define GL_SEPARABLE_2D_EXT 0x8012 +#define GL_CONVOLUTION_BORDER_MODE_EXT 0x8013 +#define GL_CONVOLUTION_FILTER_SCALE_EXT 0x8014 +#define GL_CONVOLUTION_FILTER_BIAS_EXT 0x8015 +#define GL_REDUCE_EXT 0x8016 +#define GL_CONVOLUTION_FORMAT_EXT 0x8017 +#define GL_CONVOLUTION_WIDTH_EXT 0x8018 +#define GL_CONVOLUTION_HEIGHT_EXT 0x8019 +#define GL_MAX_CONVOLUTION_WIDTH_EXT 0x801A +#define GL_MAX_CONVOLUTION_HEIGHT_EXT 0x801B +#define GL_POST_CONVOLUTION_RED_SCALE_EXT 0x801C +#define GL_POST_CONVOLUTION_GREEN_SCALE_EXT 0x801D +#define GL_POST_CONVOLUTION_BLUE_SCALE_EXT 0x801E +#define GL_POST_CONVOLUTION_ALPHA_SCALE_EXT 0x801F +#define GL_POST_CONVOLUTION_RED_BIAS_EXT 0x8020 +#define GL_POST_CONVOLUTION_GREEN_BIAS_EXT 0x8021 +#define GL_POST_CONVOLUTION_BLUE_BIAS_EXT 0x8022 +#define GL_POST_CONVOLUTION_ALPHA_BIAS_EXT 0x8023 +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); +typedef void (APIENTRYP PFNGLCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRYP PFNGLCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid * image); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETSEPARABLEFILTEREXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); +typedef void (APIENTRYP PFNGLSEPARABLEFILTER2DEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); +GLEE_EXTERN PFNGLCONVOLUTIONFILTER1DEXTPROC pglConvolutionFilter1DEXT; +GLEE_EXTERN PFNGLCONVOLUTIONFILTER2DEXTPROC pglConvolutionFilter2DEXT; +GLEE_EXTERN PFNGLCONVOLUTIONPARAMETERFEXTPROC pglConvolutionParameterfEXT; +GLEE_EXTERN PFNGLCONVOLUTIONPARAMETERFVEXTPROC pglConvolutionParameterfvEXT; +GLEE_EXTERN PFNGLCONVOLUTIONPARAMETERIEXTPROC pglConvolutionParameteriEXT; +GLEE_EXTERN PFNGLCONVOLUTIONPARAMETERIVEXTPROC pglConvolutionParameterivEXT; +GLEE_EXTERN PFNGLCOPYCONVOLUTIONFILTER1DEXTPROC pglCopyConvolutionFilter1DEXT; +GLEE_EXTERN PFNGLCOPYCONVOLUTIONFILTER2DEXTPROC pglCopyConvolutionFilter2DEXT; +GLEE_EXTERN PFNGLGETCONVOLUTIONFILTEREXTPROC pglGetConvolutionFilterEXT; +GLEE_EXTERN PFNGLGETCONVOLUTIONPARAMETERFVEXTPROC pglGetConvolutionParameterfvEXT; +GLEE_EXTERN PFNGLGETCONVOLUTIONPARAMETERIVEXTPROC pglGetConvolutionParameterivEXT; +GLEE_EXTERN PFNGLGETSEPARABLEFILTEREXTPROC pglGetSeparableFilterEXT; +GLEE_EXTERN PFNGLSEPARABLEFILTER2DEXTPROC pglSeparableFilter2DEXT; +#define glConvolutionFilter1DEXT pglConvolutionFilter1DEXT +#define glConvolutionFilter2DEXT pglConvolutionFilter2DEXT +#define glConvolutionParameterfEXT pglConvolutionParameterfEXT +#define glConvolutionParameterfvEXT pglConvolutionParameterfvEXT +#define glConvolutionParameteriEXT pglConvolutionParameteriEXT +#define glConvolutionParameterivEXT pglConvolutionParameterivEXT +#define glCopyConvolutionFilter1DEXT pglCopyConvolutionFilter1DEXT +#define glCopyConvolutionFilter2DEXT pglCopyConvolutionFilter2DEXT +#define glGetConvolutionFilterEXT pglGetConvolutionFilterEXT +#define glGetConvolutionParameterfvEXT pglGetConvolutionParameterfvEXT +#define glGetConvolutionParameterivEXT pglGetConvolutionParameterivEXT +#define glGetSeparableFilterEXT pglGetSeparableFilterEXT +#define glSeparableFilter2DEXT pglSeparableFilter2DEXT +#endif + +/* GL_SGI_color_matrix */ + +#ifndef GL_SGI_color_matrix +#define GL_SGI_color_matrix 1 +#define __GLEE_GL_SGI_color_matrix 1 +/* Constants */ +#define GL_COLOR_MATRIX_SGI 0x80B1 +#define GL_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B2 +#define GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI 0x80B3 +#define GL_POST_COLOR_MATRIX_RED_SCALE_SGI 0x80B4 +#define GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI 0x80B5 +#define GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI 0x80B6 +#define GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI 0x80B7 +#define GL_POST_COLOR_MATRIX_RED_BIAS_SGI 0x80B8 +#define GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI 0x80B9 +#define GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI 0x80BA +#define GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI 0x80BB +#endif + +/* GL_SGI_color_table */ + +#ifndef GL_SGI_color_table +#define GL_SGI_color_table 1 +#define __GLEE_GL_SGI_color_table 1 +/* Constants */ +#define GL_COLOR_TABLE_SGI 0x80D0 +#define GL_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D1 +#define GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D2 +#define GL_PROXY_COLOR_TABLE_SGI 0x80D3 +#define GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI 0x80D4 +#define GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI 0x80D5 +#define GL_COLOR_TABLE_SCALE_SGI 0x80D6 +#define GL_COLOR_TABLE_BIAS_SGI 0x80D7 +#define GL_COLOR_TABLE_FORMAT_SGI 0x80D8 +#define GL_COLOR_TABLE_WIDTH_SGI 0x80D9 +#define GL_COLOR_TABLE_RED_SIZE_SGI 0x80DA +#define GL_COLOR_TABLE_GREEN_SIZE_SGI 0x80DB +#define GL_COLOR_TABLE_BLUE_SIZE_SGI 0x80DC +#define GL_COLOR_TABLE_ALPHA_SIZE_SGI 0x80DD +#define GL_COLOR_TABLE_LUMINANCE_SIZE_SGI 0x80DE +#define GL_COLOR_TABLE_INTENSITY_SIZE_SGI 0x80DF +typedef void (APIENTRYP PFNGLCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLCOPYCOLORTABLESGIPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRYP PFNGLGETCOLORTABLESGIPROC) (GLenum target, GLenum format, GLenum type, GLvoid * table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVSGIPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVSGIPROC) (GLenum target, GLenum pname, GLint * params); +GLEE_EXTERN PFNGLCOLORTABLESGIPROC pglColorTableSGI; +GLEE_EXTERN PFNGLCOLORTABLEPARAMETERFVSGIPROC pglColorTableParameterfvSGI; +GLEE_EXTERN PFNGLCOLORTABLEPARAMETERIVSGIPROC pglColorTableParameterivSGI; +GLEE_EXTERN PFNGLCOPYCOLORTABLESGIPROC pglCopyColorTableSGI; +GLEE_EXTERN PFNGLGETCOLORTABLESGIPROC pglGetColorTableSGI; +GLEE_EXTERN PFNGLGETCOLORTABLEPARAMETERFVSGIPROC pglGetColorTableParameterfvSGI; +GLEE_EXTERN PFNGLGETCOLORTABLEPARAMETERIVSGIPROC pglGetColorTableParameterivSGI; +#define glColorTableSGI pglColorTableSGI +#define glColorTableParameterfvSGI pglColorTableParameterfvSGI +#define glColorTableParameterivSGI pglColorTableParameterivSGI +#define glCopyColorTableSGI pglCopyColorTableSGI +#define glGetColorTableSGI pglGetColorTableSGI +#define glGetColorTableParameterfvSGI pglGetColorTableParameterfvSGI +#define glGetColorTableParameterivSGI pglGetColorTableParameterivSGI +#endif + +/* GL_SGIS_pixel_texture */ + +#ifndef GL_SGIS_pixel_texture +#define GL_SGIS_pixel_texture 1 +#define __GLEE_GL_SGIS_pixel_texture 1 +/* Constants */ +#define GL_PIXEL_TEXTURE_SGIS 0x8353 +#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354 +#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355 +#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356 +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERISGISPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC) (GLenum pname, GLfloat * params); +GLEE_EXTERN PFNGLPIXELTEXGENPARAMETERISGISPROC pglPixelTexGenParameteriSGIS; +GLEE_EXTERN PFNGLPIXELTEXGENPARAMETERIVSGISPROC pglPixelTexGenParameterivSGIS; +GLEE_EXTERN PFNGLPIXELTEXGENPARAMETERFSGISPROC pglPixelTexGenParameterfSGIS; +GLEE_EXTERN PFNGLPIXELTEXGENPARAMETERFVSGISPROC pglPixelTexGenParameterfvSGIS; +GLEE_EXTERN PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC pglGetPixelTexGenParameterivSGIS; +GLEE_EXTERN PFNGLGETPIXELTEXGENPARAMETERFVSGISPROC pglGetPixelTexGenParameterfvSGIS; +#define glPixelTexGenParameteriSGIS pglPixelTexGenParameteriSGIS +#define glPixelTexGenParameterivSGIS pglPixelTexGenParameterivSGIS +#define glPixelTexGenParameterfSGIS pglPixelTexGenParameterfSGIS +#define glPixelTexGenParameterfvSGIS pglPixelTexGenParameterfvSGIS +#define glGetPixelTexGenParameterivSGIS pglGetPixelTexGenParameterivSGIS +#define glGetPixelTexGenParameterfvSGIS pglGetPixelTexGenParameterfvSGIS +#endif + +/* GL_SGIX_pixel_texture */ + +#ifndef GL_SGIX_pixel_texture +#define GL_SGIX_pixel_texture 1 +#define __GLEE_GL_SGIX_pixel_texture 1 +/* Constants */ +#define GL_PIXEL_TEX_GEN_SGIX 0x8139 +#define GL_PIXEL_TEX_GEN_MODE_SGIX 0x832B +typedef void (APIENTRYP PFNGLPIXELTEXGENSGIXPROC) (GLenum mode); +GLEE_EXTERN PFNGLPIXELTEXGENSGIXPROC pglPixelTexGenSGIX; +#define glPixelTexGenSGIX pglPixelTexGenSGIX +#endif + +/* GL_SGIS_texture4D */ + +#ifndef GL_SGIS_texture4D +#define GL_SGIS_texture4D 1 +#define __GLEE_GL_SGIS_texture4D 1 +/* Constants */ +#define GL_PACK_SKIP_VOLUMES_SGIS 0x8130 +#define GL_PACK_IMAGE_DEPTH_SGIS 0x8131 +#define GL_UNPACK_SKIP_VOLUMES_SGIS 0x8132 +#define GL_UNPACK_IMAGE_DEPTH_SGIS 0x8133 +#define GL_TEXTURE_4D_SGIS 0x8134 +#define GL_PROXY_TEXTURE_4D_SGIS 0x8135 +#define GL_TEXTURE_4DSIZE_SGIS 0x8136 +#define GL_TEXTURE_WRAP_Q_SGIS 0x8137 +#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138 +#define GL_TEXTURE_4D_BINDING_SGIS 0x814F +typedef void (APIENTRYP PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRYP PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid * pixels); +GLEE_EXTERN PFNGLTEXIMAGE4DSGISPROC pglTexImage4DSGIS; +GLEE_EXTERN PFNGLTEXSUBIMAGE4DSGISPROC pglTexSubImage4DSGIS; +#define glTexImage4DSGIS pglTexImage4DSGIS +#define glTexSubImage4DSGIS pglTexSubImage4DSGIS +#endif + +/* GL_SGI_texture_color_table */ + +#ifndef GL_SGI_texture_color_table +#define GL_SGI_texture_color_table 1 +#define __GLEE_GL_SGI_texture_color_table 1 +/* Constants */ +#define GL_TEXTURE_COLOR_TABLE_SGI 0x80BC +#define GL_PROXY_TEXTURE_COLOR_TABLE_SGI 0x80BD +#endif + +/* GL_EXT_cmyka */ + +#ifndef GL_EXT_cmyka +#define GL_EXT_cmyka 1 +#define __GLEE_GL_EXT_cmyka 1 +/* Constants */ +#define GL_CMYK_EXT 0x800C +#define GL_CMYKA_EXT 0x800D +#define GL_PACK_CMYK_HINT_EXT 0x800E +#define GL_UNPACK_CMYK_HINT_EXT 0x800F +#endif + +/* GL_EXT_texture_object */ + +#ifndef GL_EXT_texture_object +#define GL_EXT_texture_object 1 +#define __GLEE_GL_EXT_texture_object 1 +/* Constants */ +#define GL_TEXTURE_PRIORITY_EXT 0x8066 +#define GL_TEXTURE_RESIDENT_EXT 0x8067 +#define GL_TEXTURE_1D_BINDING_EXT 0x8068 +#define GL_TEXTURE_2D_BINDING_EXT 0x8069 +#define GL_TEXTURE_3D_BINDING_EXT 0x806A +typedef GLboolean (APIENTRYP PFNGLARETEXTURESRESIDENTEXTPROC) (GLsizei n, const GLuint * textures, GLboolean * residences); +typedef void (APIENTRYP PFNGLBINDTEXTUREEXTPROC) (GLenum target, GLuint texture); +typedef void (APIENTRYP PFNGLDELETETEXTURESEXTPROC) (GLsizei n, const GLuint * textures); +typedef void (APIENTRYP PFNGLGENTEXTURESEXTPROC) (GLsizei n, GLuint * textures); +typedef GLboolean (APIENTRYP PFNGLISTEXTUREEXTPROC) (GLuint texture); +typedef void (APIENTRYP PFNGLPRIORITIZETEXTURESEXTPROC) (GLsizei n, const GLuint * textures, const GLclampf * priorities); +GLEE_EXTERN PFNGLARETEXTURESRESIDENTEXTPROC pglAreTexturesResidentEXT; +GLEE_EXTERN PFNGLBINDTEXTUREEXTPROC pglBindTextureEXT; +GLEE_EXTERN PFNGLDELETETEXTURESEXTPROC pglDeleteTexturesEXT; +GLEE_EXTERN PFNGLGENTEXTURESEXTPROC pglGenTexturesEXT; +GLEE_EXTERN PFNGLISTEXTUREEXTPROC pglIsTextureEXT; +GLEE_EXTERN PFNGLPRIORITIZETEXTURESEXTPROC pglPrioritizeTexturesEXT; +#define glAreTexturesResidentEXT pglAreTexturesResidentEXT +#define glBindTextureEXT pglBindTextureEXT +#define glDeleteTexturesEXT pglDeleteTexturesEXT +#define glGenTexturesEXT pglGenTexturesEXT +#define glIsTextureEXT pglIsTextureEXT +#define glPrioritizeTexturesEXT pglPrioritizeTexturesEXT +#endif + +/* GL_SGIS_detail_texture */ + +#ifndef GL_SGIS_detail_texture +#define GL_SGIS_detail_texture 1 +#define __GLEE_GL_SGIS_detail_texture 1 +/* Constants */ +#define GL_DETAIL_TEXTURE_2D_SGIS 0x8095 +#define GL_DETAIL_TEXTURE_2D_BINDING_SGIS 0x8096 +#define GL_LINEAR_DETAIL_SGIS 0x8097 +#define GL_LINEAR_DETAIL_ALPHA_SGIS 0x8098 +#define GL_LINEAR_DETAIL_COLOR_SGIS 0x8099 +#define GL_DETAIL_TEXTURE_LEVEL_SGIS 0x809A +#define GL_DETAIL_TEXTURE_MODE_SGIS 0x809B +#define GL_DETAIL_TEXTURE_FUNC_POINTS_SGIS 0x809C +typedef void (APIENTRYP PFNGLDETAILTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat * points); +typedef void (APIENTRYP PFNGLGETDETAILTEXFUNCSGISPROC) (GLenum target, GLfloat * points); +GLEE_EXTERN PFNGLDETAILTEXFUNCSGISPROC pglDetailTexFuncSGIS; +GLEE_EXTERN PFNGLGETDETAILTEXFUNCSGISPROC pglGetDetailTexFuncSGIS; +#define glDetailTexFuncSGIS pglDetailTexFuncSGIS +#define glGetDetailTexFuncSGIS pglGetDetailTexFuncSGIS +#endif + +/* GL_SGIS_sharpen_texture */ + +#ifndef GL_SGIS_sharpen_texture +#define GL_SGIS_sharpen_texture 1 +#define __GLEE_GL_SGIS_sharpen_texture 1 +/* Constants */ +#define GL_LINEAR_SHARPEN_SGIS 0x80AD +#define GL_LINEAR_SHARPEN_ALPHA_SGIS 0x80AE +#define GL_LINEAR_SHARPEN_COLOR_SGIS 0x80AF +#define GL_SHARPEN_TEXTURE_FUNC_POINTS_SGIS 0x80B0 +typedef void (APIENTRYP PFNGLSHARPENTEXFUNCSGISPROC) (GLenum target, GLsizei n, const GLfloat * points); +typedef void (APIENTRYP PFNGLGETSHARPENTEXFUNCSGISPROC) (GLenum target, GLfloat * points); +GLEE_EXTERN PFNGLSHARPENTEXFUNCSGISPROC pglSharpenTexFuncSGIS; +GLEE_EXTERN PFNGLGETSHARPENTEXFUNCSGISPROC pglGetSharpenTexFuncSGIS; +#define glSharpenTexFuncSGIS pglSharpenTexFuncSGIS +#define glGetSharpenTexFuncSGIS pglGetSharpenTexFuncSGIS +#endif + +/* GL_EXT_packed_pixels */ + +#ifndef GL_EXT_packed_pixels +#define GL_EXT_packed_pixels 1 +#define __GLEE_GL_EXT_packed_pixels 1 +/* Constants */ +#define GL_UNSIGNED_BYTE_3_3_2_EXT 0x8032 +#define GL_UNSIGNED_SHORT_4_4_4_4_EXT 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1_EXT 0x8034 +#define GL_UNSIGNED_INT_8_8_8_8_EXT 0x8035 +#define GL_UNSIGNED_INT_10_10_10_2_EXT 0x8036 +#endif + +/* GL_SGIS_texture_lod */ + +#ifndef GL_SGIS_texture_lod +#define GL_SGIS_texture_lod 1 +#define __GLEE_GL_SGIS_texture_lod 1 +/* Constants */ +#define GL_TEXTURE_MIN_LOD_SGIS 0x813A +#define GL_TEXTURE_MAX_LOD_SGIS 0x813B +#define GL_TEXTURE_BASE_LEVEL_SGIS 0x813C +#define GL_TEXTURE_MAX_LEVEL_SGIS 0x813D +#endif + +/* GL_SGIS_multisample */ + +#ifndef GL_SGIS_multisample +#define GL_SGIS_multisample 1 +#define __GLEE_GL_SGIS_multisample 1 +/* Constants */ +#define GL_MULTISAMPLE_SGIS 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_SGIS 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_SGIS 0x809F +#define GL_SAMPLE_MASK_SGIS 0x80A0 +#define GL_1PASS_SGIS 0x80A1 +#define GL_2PASS_0_SGIS 0x80A2 +#define GL_2PASS_1_SGIS 0x80A3 +#define GL_4PASS_0_SGIS 0x80A4 +#define GL_4PASS_1_SGIS 0x80A5 +#define GL_4PASS_2_SGIS 0x80A6 +#define GL_4PASS_3_SGIS 0x80A7 +#define GL_SAMPLE_BUFFERS_SGIS 0x80A8 +#define GL_SAMPLES_SGIS 0x80A9 +#define GL_SAMPLE_MASK_VALUE_SGIS 0x80AA +#define GL_SAMPLE_MASK_INVERT_SGIS 0x80AB +#define GL_SAMPLE_PATTERN_SGIS 0x80AC +typedef void (APIENTRYP PFNGLSAMPLEMASKSGISPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNSGISPROC) (GLenum pattern); +GLEE_EXTERN PFNGLSAMPLEMASKSGISPROC pglSampleMaskSGIS; +GLEE_EXTERN PFNGLSAMPLEPATTERNSGISPROC pglSamplePatternSGIS; +#define glSampleMaskSGIS pglSampleMaskSGIS +#define glSamplePatternSGIS pglSamplePatternSGIS +#endif + +/* GL_EXT_rescale_normal */ + +#ifndef GL_EXT_rescale_normal +#define GL_EXT_rescale_normal 1 +#define __GLEE_GL_EXT_rescale_normal 1 +/* Constants */ +#define GL_RESCALE_NORMAL_EXT 0x803A +#endif + +/* GL_EXT_vertex_array */ + +#ifndef GL_EXT_vertex_array +#define GL_EXT_vertex_array 1 +#define __GLEE_GL_EXT_vertex_array 1 +/* Constants */ +#define GL_VERTEX_ARRAY_EXT 0x8074 +#define GL_NORMAL_ARRAY_EXT 0x8075 +#define GL_COLOR_ARRAY_EXT 0x8076 +#define GL_INDEX_ARRAY_EXT 0x8077 +#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078 +#define GL_EDGE_FLAG_ARRAY_EXT 0x8079 +#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A +#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B +#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C +#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D +#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E +#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F +#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080 +#define GL_COLOR_ARRAY_SIZE_EXT 0x8081 +#define GL_COLOR_ARRAY_TYPE_EXT 0x8082 +#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083 +#define GL_COLOR_ARRAY_COUNT_EXT 0x8084 +#define GL_INDEX_ARRAY_TYPE_EXT 0x8085 +#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086 +#define GL_INDEX_ARRAY_COUNT_EXT 0x8087 +#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088 +#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089 +#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A +#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B +#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C +#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D +#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E +#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F +#define GL_COLOR_ARRAY_POINTER_EXT 0x8090 +#define GL_INDEX_ARRAY_POINTER_EXT 0x8091 +#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092 +#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093 +typedef void (APIENTRYP PFNGLARRAYELEMENTEXTPROC) (GLint i); +typedef void (APIENTRYP PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean * pointer); +typedef void (APIENTRYP PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* * params); +typedef void (APIENTRYP PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid * pointer); +GLEE_EXTERN PFNGLARRAYELEMENTEXTPROC pglArrayElementEXT; +GLEE_EXTERN PFNGLCOLORPOINTEREXTPROC pglColorPointerEXT; +GLEE_EXTERN PFNGLDRAWARRAYSEXTPROC pglDrawArraysEXT; +GLEE_EXTERN PFNGLEDGEFLAGPOINTEREXTPROC pglEdgeFlagPointerEXT; +GLEE_EXTERN PFNGLGETPOINTERVEXTPROC pglGetPointervEXT; +GLEE_EXTERN PFNGLINDEXPOINTEREXTPROC pglIndexPointerEXT; +GLEE_EXTERN PFNGLNORMALPOINTEREXTPROC pglNormalPointerEXT; +GLEE_EXTERN PFNGLTEXCOORDPOINTEREXTPROC pglTexCoordPointerEXT; +GLEE_EXTERN PFNGLVERTEXPOINTEREXTPROC pglVertexPointerEXT; +#define glArrayElementEXT pglArrayElementEXT +#define glColorPointerEXT pglColorPointerEXT +#define glDrawArraysEXT pglDrawArraysEXT +#define glEdgeFlagPointerEXT pglEdgeFlagPointerEXT +#define glGetPointervEXT pglGetPointervEXT +#define glIndexPointerEXT pglIndexPointerEXT +#define glNormalPointerEXT pglNormalPointerEXT +#define glTexCoordPointerEXT pglTexCoordPointerEXT +#define glVertexPointerEXT pglVertexPointerEXT +#endif + +/* GL_EXT_misc_attribute */ + +#ifndef GL_EXT_misc_attribute +#define GL_EXT_misc_attribute 1 +#define __GLEE_GL_EXT_misc_attribute 1 +/* Constants */ +#endif + +/* GL_SGIS_generate_mipmap */ + +#ifndef GL_SGIS_generate_mipmap +#define GL_SGIS_generate_mipmap 1 +#define __GLEE_GL_SGIS_generate_mipmap 1 +/* Constants */ +#define GL_GENERATE_MIPMAP_SGIS 0x8191 +#define GL_GENERATE_MIPMAP_HINT_SGIS 0x8192 +#endif + +/* GL_SGIX_clipmap */ + +#ifndef GL_SGIX_clipmap +#define GL_SGIX_clipmap 1 +#define __GLEE_GL_SGIX_clipmap 1 +/* Constants */ +#define GL_LINEAR_CLIPMAP_LINEAR_SGIX 0x8170 +#define GL_TEXTURE_CLIPMAP_CENTER_SGIX 0x8171 +#define GL_TEXTURE_CLIPMAP_FRAME_SGIX 0x8172 +#define GL_TEXTURE_CLIPMAP_OFFSET_SGIX 0x8173 +#define GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8174 +#define GL_TEXTURE_CLIPMAP_LOD_OFFSET_SGIX 0x8175 +#define GL_TEXTURE_CLIPMAP_DEPTH_SGIX 0x8176 +#define GL_MAX_CLIPMAP_DEPTH_SGIX 0x8177 +#define GL_MAX_CLIPMAP_VIRTUAL_DEPTH_SGIX 0x8178 +#define GL_NEAREST_CLIPMAP_NEAREST_SGIX 0x844D +#define GL_NEAREST_CLIPMAP_LINEAR_SGIX 0x844E +#define GL_LINEAR_CLIPMAP_NEAREST_SGIX 0x844F +#endif + +/* GL_SGIX_shadow */ + +#ifndef GL_SGIX_shadow +#define GL_SGIX_shadow 1 +#define __GLEE_GL_SGIX_shadow 1 +/* Constants */ +#define GL_TEXTURE_COMPARE_SGIX 0x819A +#define GL_TEXTURE_COMPARE_OPERATOR_SGIX 0x819B +#define GL_TEXTURE_LEQUAL_R_SGIX 0x819C +#define GL_TEXTURE_GEQUAL_R_SGIX 0x819D +#endif + +/* GL_SGIS_texture_edge_clamp */ + +#ifndef GL_SGIS_texture_edge_clamp +#define GL_SGIS_texture_edge_clamp 1 +#define __GLEE_GL_SGIS_texture_edge_clamp 1 +/* Constants */ +#define GL_CLAMP_TO_EDGE_SGIS 0x812F +#endif + +/* GL_SGIS_texture_border_clamp */ + +#ifndef GL_SGIS_texture_border_clamp +#define GL_SGIS_texture_border_clamp 1 +#define __GLEE_GL_SGIS_texture_border_clamp 1 +/* Constants */ +#define GL_CLAMP_TO_BORDER_SGIS 0x812D +#endif + +/* GL_EXT_blend_minmax */ + +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#define __GLEE_GL_EXT_blend_minmax 1 +/* Constants */ +#define GL_FUNC_ADD_EXT 0x8006 +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#define GL_BLEND_EQUATION_EXT 0x8009 +typedef void (APIENTRYP PFNGLBLENDEQUATIONEXTPROC) (GLenum mode); +GLEE_EXTERN PFNGLBLENDEQUATIONEXTPROC pglBlendEquationEXT; +#define glBlendEquationEXT pglBlendEquationEXT +#endif + +/* GL_EXT_blend_subtract */ + +#ifndef GL_EXT_blend_subtract +#define GL_EXT_blend_subtract 1 +#define __GLEE_GL_EXT_blend_subtract 1 +/* Constants */ +#define GL_FUNC_SUBTRACT_EXT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B +#endif + +/* GL_EXT_blend_logic_op */ + +#ifndef GL_EXT_blend_logic_op +#define GL_EXT_blend_logic_op 1 +#define __GLEE_GL_EXT_blend_logic_op 1 +/* Constants */ +#endif + +/* GL_SGIX_interlace */ + +#ifndef GL_SGIX_interlace +#define GL_SGIX_interlace 1 +#define __GLEE_GL_SGIX_interlace 1 +/* Constants */ +#define GL_INTERLACE_SGIX 0x8094 +#endif + +/* GL_SGIX_pixel_tiles */ + +#ifndef GL_SGIX_pixel_tiles +#define GL_SGIX_pixel_tiles 1 +#define __GLEE_GL_SGIX_pixel_tiles 1 +/* Constants */ +#define GL_PIXEL_TILE_BEST_ALIGNMENT_SGIX 0x813E +#define GL_PIXEL_TILE_CACHE_INCREMENT_SGIX 0x813F +#define GL_PIXEL_TILE_WIDTH_SGIX 0x8140 +#define GL_PIXEL_TILE_HEIGHT_SGIX 0x8141 +#define GL_PIXEL_TILE_GRID_WIDTH_SGIX 0x8142 +#define GL_PIXEL_TILE_GRID_HEIGHT_SGIX 0x8143 +#define GL_PIXEL_TILE_GRID_DEPTH_SGIX 0x8144 +#define GL_PIXEL_TILE_CACHE_SIZE_SGIX 0x8145 +#endif + +/* GL_SGIS_texture_select */ + +#ifndef GL_SGIS_texture_select +#define GL_SGIS_texture_select 1 +#define __GLEE_GL_SGIS_texture_select 1 +/* Constants */ +#define GL_DUAL_ALPHA4_SGIS 0x8110 +#define GL_DUAL_ALPHA8_SGIS 0x8111 +#define GL_DUAL_ALPHA12_SGIS 0x8112 +#define GL_DUAL_ALPHA16_SGIS 0x8113 +#define GL_DUAL_LUMINANCE4_SGIS 0x8114 +#define GL_DUAL_LUMINANCE8_SGIS 0x8115 +#define GL_DUAL_LUMINANCE12_SGIS 0x8116 +#define GL_DUAL_LUMINANCE16_SGIS 0x8117 +#define GL_DUAL_INTENSITY4_SGIS 0x8118 +#define GL_DUAL_INTENSITY8_SGIS 0x8119 +#define GL_DUAL_INTENSITY12_SGIS 0x811A +#define GL_DUAL_INTENSITY16_SGIS 0x811B +#define GL_DUAL_LUMINANCE_ALPHA4_SGIS 0x811C +#define GL_DUAL_LUMINANCE_ALPHA8_SGIS 0x811D +#define GL_QUAD_ALPHA4_SGIS 0x811E +#define GL_QUAD_ALPHA8_SGIS 0x811F +#define GL_QUAD_LUMINANCE4_SGIS 0x8120 +#define GL_QUAD_LUMINANCE8_SGIS 0x8121 +#define GL_QUAD_INTENSITY4_SGIS 0x8122 +#define GL_QUAD_INTENSITY8_SGIS 0x8123 +#define GL_DUAL_TEXTURE_SELECT_SGIS 0x8124 +#define GL_QUAD_TEXTURE_SELECT_SGIS 0x8125 +#endif + +/* GL_SGIX_sprite */ + +#ifndef GL_SGIX_sprite +#define GL_SGIX_sprite 1 +#define __GLEE_GL_SGIX_sprite 1 +/* Constants */ +#define GL_SPRITE_SGIX 0x8148 +#define GL_SPRITE_MODE_SGIX 0x8149 +#define GL_SPRITE_AXIS_SGIX 0x814A +#define GL_SPRITE_TRANSLATION_SGIX 0x814B +#define GL_SPRITE_AXIAL_SGIX 0x814C +#define GL_SPRITE_OBJECT_ALIGNED_SGIX 0x814D +#define GL_SPRITE_EYE_ALIGNED_SGIX 0x814E +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERFVSGIXPROC) (GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GLint * params); +GLEE_EXTERN PFNGLSPRITEPARAMETERFSGIXPROC pglSpriteParameterfSGIX; +GLEE_EXTERN PFNGLSPRITEPARAMETERFVSGIXPROC pglSpriteParameterfvSGIX; +GLEE_EXTERN PFNGLSPRITEPARAMETERISGIXPROC pglSpriteParameteriSGIX; +GLEE_EXTERN PFNGLSPRITEPARAMETERIVSGIXPROC pglSpriteParameterivSGIX; +#define glSpriteParameterfSGIX pglSpriteParameterfSGIX +#define glSpriteParameterfvSGIX pglSpriteParameterfvSGIX +#define glSpriteParameteriSGIX pglSpriteParameteriSGIX +#define glSpriteParameterivSGIX pglSpriteParameterivSGIX +#endif + +/* GL_SGIX_texture_multi_buffer */ + +#ifndef GL_SGIX_texture_multi_buffer +#define GL_SGIX_texture_multi_buffer 1 +#define __GLEE_GL_SGIX_texture_multi_buffer 1 +/* Constants */ +#define GL_TEXTURE_MULTI_BUFFER_HINT_SGIX 0x812E +#endif + +/* GL_EXT_point_parameters */ + +#ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters 1 +#define __GLEE_GL_EXT_point_parameters 1 +/* Constants */ +#define GL_POINT_SIZE_MIN_EXT 0x8126 +#define GL_POINT_SIZE_MAX_EXT 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 +#define GL_DISTANCE_ATTENUATION_EXT 0x8129 +typedef void (APIENTRYP PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat * params); +GLEE_EXTERN PFNGLPOINTPARAMETERFEXTPROC pglPointParameterfEXT; +GLEE_EXTERN PFNGLPOINTPARAMETERFVEXTPROC pglPointParameterfvEXT; +#define glPointParameterfEXT pglPointParameterfEXT +#define glPointParameterfvEXT pglPointParameterfvEXT +#endif + +/* GL_SGIS_point_parameters */ + +#ifndef GL_SGIS_point_parameters +#define GL_SGIS_point_parameters 1 +#define __GLEE_GL_SGIS_point_parameters 1 +/* Constants */ +#define GL_POINT_SIZE_MIN_SGIS 0x8126 +#define GL_POINT_SIZE_MAX_SGIS 0x8127 +#define GL_POINT_FADE_THRESHOLD_SIZE_SGIS 0x8128 +#define GL_DISTANCE_ATTENUATION_SGIS 0x8129 +typedef void (APIENTRYP PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat * params); +GLEE_EXTERN PFNGLPOINTPARAMETERFSGISPROC pglPointParameterfSGIS; +GLEE_EXTERN PFNGLPOINTPARAMETERFVSGISPROC pglPointParameterfvSGIS; +#define glPointParameterfSGIS pglPointParameterfSGIS +#define glPointParameterfvSGIS pglPointParameterfvSGIS +#endif + +/* GL_SGIX_instruments */ + +#ifndef GL_SGIX_instruments +#define GL_SGIX_instruments 1 +#define __GLEE_GL_SGIX_instruments 1 +/* Constants */ +#define GL_INSTRUMENT_BUFFER_POINTER_SGIX 0x8180 +#define GL_INSTRUMENT_MEASUREMENTS_SGIX 0x8181 +typedef GLint (APIENTRYP PFNGLGETINSTRUMENTSSGIXPROC) (); +typedef void (APIENTRYP PFNGLINSTRUMENTSBUFFERSGIXPROC) (GLsizei size, GLint * buffer); +typedef GLint (APIENTRYP PFNGLPOLLINSTRUMENTSSGIXPROC) (GLint * marker_p); +typedef void (APIENTRYP PFNGLREADINSTRUMENTSSGIXPROC) (GLint marker); +typedef void (APIENTRYP PFNGLSTARTINSTRUMENTSSGIXPROC) (); +typedef void (APIENTRYP PFNGLSTOPINSTRUMENTSSGIXPROC) (GLint marker); +GLEE_EXTERN PFNGLGETINSTRUMENTSSGIXPROC pglGetInstrumentsSGIX; +GLEE_EXTERN PFNGLINSTRUMENTSBUFFERSGIXPROC pglInstrumentsBufferSGIX; +GLEE_EXTERN PFNGLPOLLINSTRUMENTSSGIXPROC pglPollInstrumentsSGIX; +GLEE_EXTERN PFNGLREADINSTRUMENTSSGIXPROC pglReadInstrumentsSGIX; +GLEE_EXTERN PFNGLSTARTINSTRUMENTSSGIXPROC pglStartInstrumentsSGIX; +GLEE_EXTERN PFNGLSTOPINSTRUMENTSSGIXPROC pglStopInstrumentsSGIX; +#define glGetInstrumentsSGIX pglGetInstrumentsSGIX +#define glInstrumentsBufferSGIX pglInstrumentsBufferSGIX +#define glPollInstrumentsSGIX pglPollInstrumentsSGIX +#define glReadInstrumentsSGIX pglReadInstrumentsSGIX +#define glStartInstrumentsSGIX pglStartInstrumentsSGIX +#define glStopInstrumentsSGIX pglStopInstrumentsSGIX +#endif + +/* GL_SGIX_texture_scale_bias */ + +#ifndef GL_SGIX_texture_scale_bias +#define GL_SGIX_texture_scale_bias 1 +#define __GLEE_GL_SGIX_texture_scale_bias 1 +/* Constants */ +#define GL_POST_TEXTURE_FILTER_BIAS_SGIX 0x8179 +#define GL_POST_TEXTURE_FILTER_SCALE_SGIX 0x817A +#define GL_POST_TEXTURE_FILTER_BIAS_RANGE_SGIX 0x817B +#define GL_POST_TEXTURE_FILTER_SCALE_RANGE_SGIX 0x817C +#endif + +/* GL_SGIX_framezoom */ + +#ifndef GL_SGIX_framezoom +#define GL_SGIX_framezoom 1 +#define __GLEE_GL_SGIX_framezoom 1 +/* Constants */ +#define GL_FRAMEZOOM_SGIX 0x818B +#define GL_FRAMEZOOM_FACTOR_SGIX 0x818C +#define GL_MAX_FRAMEZOOM_FACTOR_SGIX 0x818D +typedef void (APIENTRYP PFNGLFRAMEZOOMSGIXPROC) (GLint factor); +GLEE_EXTERN PFNGLFRAMEZOOMSGIXPROC pglFrameZoomSGIX; +#define glFrameZoomSGIX pglFrameZoomSGIX +#endif + +/* GL_SGIX_tag_sample_buffer */ + +#ifndef GL_SGIX_tag_sample_buffer +#define GL_SGIX_tag_sample_buffer 1 +#define __GLEE_GL_SGIX_tag_sample_buffer 1 +/* Constants */ +typedef void (APIENTRYP PFNGLTAGSAMPLEBUFFERSGIXPROC) (); +GLEE_EXTERN PFNGLTAGSAMPLEBUFFERSGIXPROC pglTagSampleBufferSGIX; +#define glTagSampleBufferSGIX pglTagSampleBufferSGIX +#endif + +/* GL_FfdMaskSGIX */ + +#ifndef GL_FfdMaskSGIX +#define GL_FfdMaskSGIX 1 +#define __GLEE_GL_FfdMaskSGIX 1 +/* Constants */ +#define GL_TEXTURE_DEFORMATION_BIT_SGIX 0x00000001 +#define GL_GEOMETRY_DEFORMATION_BIT_SGIX 0x00000002 +#endif + +/* GL_SGIX_polynomial_ffd */ + +#ifndef GL_SGIX_polynomial_ffd +#define GL_SGIX_polynomial_ffd 1 +#define __GLEE_GL_SGIX_polynomial_ffd 1 +/* Constants */ +#define GL_GEOMETRY_DEFORMATION_SGIX 0x8194 +#define GL_TEXTURE_DEFORMATION_SGIX 0x8195 +#define GL_DEFORMATIONS_MASK_SGIX 0x8196 +#define GL_MAX_DEFORMATION_ORDER_SGIX 0x8197 +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3DSGIXPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble * points); +typedef void (APIENTRYP PFNGLDEFORMATIONMAP3FSGIXPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat * points); +typedef void (APIENTRYP PFNGLDEFORMSGIXPROC) (GLbitfield mask); +typedef void (APIENTRYP PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC) (GLbitfield mask); +GLEE_EXTERN PFNGLDEFORMATIONMAP3DSGIXPROC pglDeformationMap3dSGIX; +GLEE_EXTERN PFNGLDEFORMATIONMAP3FSGIXPROC pglDeformationMap3fSGIX; +GLEE_EXTERN PFNGLDEFORMSGIXPROC pglDeformSGIX; +GLEE_EXTERN PFNGLLOADIDENTITYDEFORMATIONMAPSGIXPROC pglLoadIdentityDeformationMapSGIX; +#define glDeformationMap3dSGIX pglDeformationMap3dSGIX +#define glDeformationMap3fSGIX pglDeformationMap3fSGIX +#define glDeformSGIX pglDeformSGIX +#define glLoadIdentityDeformationMapSGIX pglLoadIdentityDeformationMapSGIX +#endif + +/* GL_SGIX_reference_plane */ + +#ifndef GL_SGIX_reference_plane +#define GL_SGIX_reference_plane 1 +#define __GLEE_GL_SGIX_reference_plane 1 +/* Constants */ +#define GL_REFERENCE_PLANE_SGIX 0x817D +#define GL_REFERENCE_PLANE_EQUATION_SGIX 0x817E +typedef void (APIENTRYP PFNGLREFERENCEPLANESGIXPROC) (const GLdouble * equation); +GLEE_EXTERN PFNGLREFERENCEPLANESGIXPROC pglReferencePlaneSGIX; +#define glReferencePlaneSGIX pglReferencePlaneSGIX +#endif + +/* GL_SGIX_flush_raster */ + +#ifndef GL_SGIX_flush_raster +#define GL_SGIX_flush_raster 1 +#define __GLEE_GL_SGIX_flush_raster 1 +/* Constants */ +typedef void (APIENTRYP PFNGLFLUSHRASTERSGIXPROC) (); +GLEE_EXTERN PFNGLFLUSHRASTERSGIXPROC pglFlushRasterSGIX; +#define glFlushRasterSGIX pglFlushRasterSGIX +#endif + +/* GL_SGIX_depth_texture */ + +#ifndef GL_SGIX_depth_texture +#define GL_SGIX_depth_texture 1 +#define __GLEE_GL_SGIX_depth_texture 1 +/* Constants */ +#define GL_DEPTH_COMPONENT16_SGIX 0x81A5 +#define GL_DEPTH_COMPONENT24_SGIX 0x81A6 +#define GL_DEPTH_COMPONENT32_SGIX 0x81A7 +#endif + +/* GL_SGIS_fog_function */ + +#ifndef GL_SGIS_fog_function +#define GL_SGIS_fog_function 1 +#define __GLEE_GL_SGIS_fog_function 1 +/* Constants */ +#define GL_FOG_FUNC_SGIS 0x812A +#define GL_FOG_FUNC_POINTS_SGIS 0x812B +#define GL_MAX_FOG_FUNC_POINTS_SGIS 0x812C +typedef void (APIENTRYP PFNGLFOGFUNCSGISPROC) (GLsizei n, const GLfloat * points); +typedef void (APIENTRYP PFNGLGETFOGFUNCSGISPROC) (GLfloat * points); +GLEE_EXTERN PFNGLFOGFUNCSGISPROC pglFogFuncSGIS; +GLEE_EXTERN PFNGLGETFOGFUNCSGISPROC pglGetFogFuncSGIS; +#define glFogFuncSGIS pglFogFuncSGIS +#define glGetFogFuncSGIS pglGetFogFuncSGIS +#endif + +/* GL_SGIX_fog_offset */ + +#ifndef GL_SGIX_fog_offset +#define GL_SGIX_fog_offset 1 +#define __GLEE_GL_SGIX_fog_offset 1 +/* Constants */ +#define GL_FOG_OFFSET_SGIX 0x8198 +#define GL_FOG_OFFSET_VALUE_SGIX 0x8199 +#endif + +/* GL_HP_image_transform */ + +#ifndef GL_HP_image_transform +#define GL_HP_image_transform 1 +#define __GLEE_GL_HP_image_transform 1 +/* Constants */ +#define GL_IMAGE_SCALE_X_HP 0x8155 +#define GL_IMAGE_SCALE_Y_HP 0x8156 +#define GL_IMAGE_TRANSLATE_X_HP 0x8157 +#define GL_IMAGE_TRANSLATE_Y_HP 0x8158 +#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159 +#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A +#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B +#define GL_IMAGE_MAG_FILTER_HP 0x815C +#define GL_IMAGE_MIN_FILTER_HP 0x815D +#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E +#define GL_CUBIC_HP 0x815F +#define GL_AVERAGE_HP 0x8160 +#define GL_IMAGE_TRANSFORM_2D_HP 0x8161 +#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162 +#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163 +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIHPPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFHPPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target, GLenum pname, GLfloat * params); +GLEE_EXTERN PFNGLIMAGETRANSFORMPARAMETERIHPPROC pglImageTransformParameteriHP; +GLEE_EXTERN PFNGLIMAGETRANSFORMPARAMETERFHPPROC pglImageTransformParameterfHP; +GLEE_EXTERN PFNGLIMAGETRANSFORMPARAMETERIVHPPROC pglImageTransformParameterivHP; +GLEE_EXTERN PFNGLIMAGETRANSFORMPARAMETERFVHPPROC pglImageTransformParameterfvHP; +GLEE_EXTERN PFNGLGETIMAGETRANSFORMPARAMETERIVHPPROC pglGetImageTransformParameterivHP; +GLEE_EXTERN PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC pglGetImageTransformParameterfvHP; +#define glImageTransformParameteriHP pglImageTransformParameteriHP +#define glImageTransformParameterfHP pglImageTransformParameterfHP +#define glImageTransformParameterivHP pglImageTransformParameterivHP +#define glImageTransformParameterfvHP pglImageTransformParameterfvHP +#define glGetImageTransformParameterivHP pglGetImageTransformParameterivHP +#define glGetImageTransformParameterfvHP pglGetImageTransformParameterfvHP +#endif + +/* GL_HP_convolution_border_modes */ + +#ifndef GL_HP_convolution_border_modes +#define GL_HP_convolution_border_modes 1 +#define __GLEE_GL_HP_convolution_border_modes 1 +/* Constants */ +#define GL_IGNORE_BORDER_HP 0x8150 +#define GL_CONSTANT_BORDER_HP 0x8151 +#define GL_REPLICATE_BORDER_HP 0x8153 +#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154 +#endif + +/* GL_INGR_palette_buffer */ + +#ifndef GL_INGR_palette_buffer +#define GL_INGR_palette_buffer 1 +#define __GLEE_GL_INGR_palette_buffer 1 +/* Constants */ +#endif + +/* GL_SGIX_texture_add_env */ + +#ifndef GL_SGIX_texture_add_env +#define GL_SGIX_texture_add_env 1 +#define __GLEE_GL_SGIX_texture_add_env 1 +/* Constants */ +#define GL_TEXTURE_ENV_BIAS_SGIX 0x80BE +#endif + +/* GL_EXT_color_subtable */ + +#ifndef GL_EXT_color_subtable +#define GL_EXT_color_subtable 1 +#define __GLEE_GL_EXT_color_subtable 1 +/* Constants */ +typedef void (APIENTRYP PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRYP PFNGLCOPYCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +GLEE_EXTERN PFNGLCOLORSUBTABLEEXTPROC pglColorSubTableEXT; +GLEE_EXTERN PFNGLCOPYCOLORSUBTABLEEXTPROC pglCopyColorSubTableEXT; +#define glColorSubTableEXT pglColorSubTableEXT +#define glCopyColorSubTableEXT pglCopyColorSubTableEXT +#endif + +/* GL_PGI_vertex_hints */ + +#ifndef GL_PGI_vertex_hints +#define GL_PGI_vertex_hints 1 +#define __GLEE_GL_PGI_vertex_hints 1 +/* Constants */ +#define GL_VERTEX_DATA_HINT_PGI 0x1A22A +#define GL_VERTEX_CONSISTENT_HINT_PGI 0x1A22B +#define GL_MATERIAL_SIDE_HINT_PGI 0x1A22C +#define GL_MAX_VERTEX_HINT_PGI 0x1A22D +#define GL_COLOR3_BIT_PGI 0x00010000 +#define GL_COLOR4_BIT_PGI 0x00020000 +#define GL_EDGEFLAG_BIT_PGI 0x00040000 +#define GL_INDEX_BIT_PGI 0x00080000 +#define GL_MAT_AMBIENT_BIT_PGI 0x00100000 +#define GL_MAT_AMBIENT_AND_DIFFUSE_BIT_PGI 0x00200000 +#define GL_MAT_DIFFUSE_BIT_PGI 0x00400000 +#define GL_MAT_EMISSION_BIT_PGI 0x00800000 +#define GL_MAT_COLOR_INDEXES_BIT_PGI 0x01000000 +#define GL_MAT_SHININESS_BIT_PGI 0x02000000 +#define GL_MAT_SPECULAR_BIT_PGI 0x04000000 +#define GL_NORMAL_BIT_PGI 0x08000000 +#define GL_TEXCOORD1_BIT_PGI 0x10000000 +#define GL_TEXCOORD2_BIT_PGI 0x20000000 +#define GL_TEXCOORD3_BIT_PGI 0x40000000 +#define GL_TEXCOORD4_BIT_PGI 0x80000000 +#define GL_VERTEX23_BIT_PGI 0x00000004 +#define GL_VERTEX4_BIT_PGI 0x00000008 +#endif + +/* GL_PGI_misc_hints */ + +#ifndef GL_PGI_misc_hints +#define GL_PGI_misc_hints 1 +#define __GLEE_GL_PGI_misc_hints 1 +/* Constants */ +#define GL_PREFER_DOUBLEBUFFER_HINT_PGI 0x1A1F8 +#define GL_CONSERVE_MEMORY_HINT_PGI 0x1A1FD +#define GL_RECLAIM_MEMORY_HINT_PGI 0x1A1FE +#define GL_NATIVE_GRAPHICS_HANDLE_PGI 0x1A202 +#define GL_NATIVE_GRAPHICS_BEGIN_HINT_PGI 0x1A203 +#define GL_NATIVE_GRAPHICS_END_HINT_PGI 0x1A204 +#define GL_ALWAYS_FAST_HINT_PGI 0x1A20C +#define GL_ALWAYS_SOFT_HINT_PGI 0x1A20D +#define GL_ALLOW_DRAW_OBJ_HINT_PGI 0x1A20E +#define GL_ALLOW_DRAW_WIN_HINT_PGI 0x1A20F +#define GL_ALLOW_DRAW_FRG_HINT_PGI 0x1A210 +#define GL_ALLOW_DRAW_MEM_HINT_PGI 0x1A211 +#define GL_STRICT_DEPTHFUNC_HINT_PGI 0x1A216 +#define GL_STRICT_LIGHTING_HINT_PGI 0x1A217 +#define GL_STRICT_SCISSOR_HINT_PGI 0x1A218 +#define GL_FULL_STIPPLE_HINT_PGI 0x1A219 +#define GL_CLIP_NEAR_HINT_PGI 0x1A220 +#define GL_CLIP_FAR_HINT_PGI 0x1A221 +#define GL_WIDE_LINE_HINT_PGI 0x1A222 +#define GL_BACK_NORMALS_HINT_PGI 0x1A223 +typedef void (APIENTRYP PFNGLHINTPGIPROC) (GLenum target, GLint mode); +GLEE_EXTERN PFNGLHINTPGIPROC pglHintPGI; +#define glHintPGI pglHintPGI +#endif + +/* GL_EXT_paletted_texture */ + +#ifndef GL_EXT_paletted_texture +#define GL_EXT_paletted_texture 1 +#define __GLEE_GL_EXT_paletted_texture 1 +/* Constants */ +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +typedef void (APIENTRYP PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid * table); +typedef void (APIENTRYP PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid * data); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat * params); +GLEE_EXTERN PFNGLCOLORTABLEEXTPROC pglColorTableEXT; +GLEE_EXTERN PFNGLGETCOLORTABLEEXTPROC pglGetColorTableEXT; +GLEE_EXTERN PFNGLGETCOLORTABLEPARAMETERIVEXTPROC pglGetColorTableParameterivEXT; +GLEE_EXTERN PFNGLGETCOLORTABLEPARAMETERFVEXTPROC pglGetColorTableParameterfvEXT; +#define glColorTableEXT pglColorTableEXT +#define glGetColorTableEXT pglGetColorTableEXT +#define glGetColorTableParameterivEXT pglGetColorTableParameterivEXT +#define glGetColorTableParameterfvEXT pglGetColorTableParameterfvEXT +#endif + +/* GL_EXT_clip_volume_hint */ + +#ifndef GL_EXT_clip_volume_hint +#define GL_EXT_clip_volume_hint 1 +#define __GLEE_GL_EXT_clip_volume_hint 1 +/* Constants */ +#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0 +#endif + +/* GL_SGIX_list_priority */ + +#ifndef GL_SGIX_list_priority +#define GL_SGIX_list_priority 1 +#define __GLEE_GL_SGIX_list_priority 1 +/* Constants */ +#define GL_LIST_PRIORITY_SGIX 0x8182 +typedef void (APIENTRYP PFNGLGETLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLLISTPARAMETERFSGIXPROC) (GLuint list, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLLISTPARAMETERFVSGIXPROC) (GLuint list, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLLISTPARAMETERISGIXPROC) (GLuint list, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum pname, const GLint * params); +GLEE_EXTERN PFNGLGETLISTPARAMETERFVSGIXPROC pglGetListParameterfvSGIX; +GLEE_EXTERN PFNGLGETLISTPARAMETERIVSGIXPROC pglGetListParameterivSGIX; +GLEE_EXTERN PFNGLLISTPARAMETERFSGIXPROC pglListParameterfSGIX; +GLEE_EXTERN PFNGLLISTPARAMETERFVSGIXPROC pglListParameterfvSGIX; +GLEE_EXTERN PFNGLLISTPARAMETERISGIXPROC pglListParameteriSGIX; +GLEE_EXTERN PFNGLLISTPARAMETERIVSGIXPROC pglListParameterivSGIX; +#define glGetListParameterfvSGIX pglGetListParameterfvSGIX +#define glGetListParameterivSGIX pglGetListParameterivSGIX +#define glListParameterfSGIX pglListParameterfSGIX +#define glListParameterfvSGIX pglListParameterfvSGIX +#define glListParameteriSGIX pglListParameteriSGIX +#define glListParameterivSGIX pglListParameterivSGIX +#endif + +/* GL_SGIX_ir_instrument1 */ + +#ifndef GL_SGIX_ir_instrument1 +#define GL_SGIX_ir_instrument1 1 +#define __GLEE_GL_SGIX_ir_instrument1 1 +/* Constants */ +#define GL_IR_INSTRUMENT1_SGIX 0x817F +#endif + +/* GL_SGIX_calligraphic_fragment */ + +#ifndef GL_SGIX_calligraphic_fragment +#define GL_SGIX_calligraphic_fragment 1 +#define __GLEE_GL_SGIX_calligraphic_fragment 1 +/* Constants */ +#define GL_CALLIGRAPHIC_FRAGMENT_SGIX 0x8183 +#endif + +/* GL_SGIX_texture_lod_bias */ + +#ifndef GL_SGIX_texture_lod_bias +#define GL_SGIX_texture_lod_bias 1 +#define __GLEE_GL_SGIX_texture_lod_bias 1 +/* Constants */ +#define GL_TEXTURE_LOD_BIAS_S_SGIX 0x818E +#define GL_TEXTURE_LOD_BIAS_T_SGIX 0x818F +#define GL_TEXTURE_LOD_BIAS_R_SGIX 0x8190 +#endif + +/* GL_SGIX_shadow_ambient */ + +#ifndef GL_SGIX_shadow_ambient +#define GL_SGIX_shadow_ambient 1 +#define __GLEE_GL_SGIX_shadow_ambient 1 +/* Constants */ +#define GL_SHADOW_AMBIENT_SGIX 0x80BF +#endif + +/* GL_EXT_index_texture */ + +#ifndef GL_EXT_index_texture +#define GL_EXT_index_texture 1 +#define __GLEE_GL_EXT_index_texture 1 +/* Constants */ +#endif + +/* GL_EXT_index_material */ + +#ifndef GL_EXT_index_material +#define GL_EXT_index_material 1 +#define __GLEE_GL_EXT_index_material 1 +/* Constants */ +#define GL_INDEX_MATERIAL_EXT 0x81B8 +#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9 +#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA +typedef void (APIENTRYP PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode); +GLEE_EXTERN PFNGLINDEXMATERIALEXTPROC pglIndexMaterialEXT; +#define glIndexMaterialEXT pglIndexMaterialEXT +#endif + +/* GL_EXT_index_func */ + +#ifndef GL_EXT_index_func +#define GL_EXT_index_func 1 +#define __GLEE_GL_EXT_index_func 1 +/* Constants */ +#define GL_INDEX_TEST_EXT 0x81B5 +#define GL_INDEX_TEST_FUNC_EXT 0x81B6 +#define GL_INDEX_TEST_REF_EXT 0x81B7 +typedef void (APIENTRYP PFNGLINDEXFUNCEXTPROC) (GLenum func, GLclampf ref); +GLEE_EXTERN PFNGLINDEXFUNCEXTPROC pglIndexFuncEXT; +#define glIndexFuncEXT pglIndexFuncEXT +#endif + +/* GL_EXT_index_array_formats */ + +#ifndef GL_EXT_index_array_formats +#define GL_EXT_index_array_formats 1 +#define __GLEE_GL_EXT_index_array_formats 1 +/* Constants */ +#define GL_IUI_V2F_EXT 0x81AD +#define GL_IUI_V3F_EXT 0x81AE +#define GL_IUI_N3F_V2F_EXT 0x81AF +#define GL_IUI_N3F_V3F_EXT 0x81B0 +#define GL_T2F_IUI_V2F_EXT 0x81B1 +#define GL_T2F_IUI_V3F_EXT 0x81B2 +#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3 +#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4 +#endif + +/* GL_EXT_compiled_vertex_array */ + +#ifndef GL_EXT_compiled_vertex_array +#define GL_EXT_compiled_vertex_array 1 +#define __GLEE_GL_EXT_compiled_vertex_array 1 +/* Constants */ +#define GL_ARRAY_ELEMENT_LOCK_FIRST_EXT 0x81A8 +#define GL_ARRAY_ELEMENT_LOCK_COUNT_EXT 0x81A9 +typedef void (APIENTRYP PFNGLLOCKARRAYSEXTPROC) (GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLUNLOCKARRAYSEXTPROC) (); +GLEE_EXTERN PFNGLLOCKARRAYSEXTPROC pglLockArraysEXT; +GLEE_EXTERN PFNGLUNLOCKARRAYSEXTPROC pglUnlockArraysEXT; +#define glLockArraysEXT pglLockArraysEXT +#define glUnlockArraysEXT pglUnlockArraysEXT +#endif + +/* GL_EXT_cull_vertex */ + +#ifndef GL_EXT_cull_vertex +#define GL_EXT_cull_vertex 1 +#define __GLEE_GL_EXT_cull_vertex 1 +/* Constants */ +#define GL_CULL_VERTEX_EXT 0x81AA +#define GL_CULL_VERTEX_EYE_POSITION_EXT 0x81AB +#define GL_CULL_VERTEX_OBJECT_POSITION_EXT 0x81AC +typedef void (APIENTRYP PFNGLCULLPARAMETERDVEXTPROC) (GLenum pname, GLdouble * params); +typedef void (APIENTRYP PFNGLCULLPARAMETERFVEXTPROC) (GLenum pname, GLfloat * params); +GLEE_EXTERN PFNGLCULLPARAMETERDVEXTPROC pglCullParameterdvEXT; +GLEE_EXTERN PFNGLCULLPARAMETERFVEXTPROC pglCullParameterfvEXT; +#define glCullParameterdvEXT pglCullParameterdvEXT +#define glCullParameterfvEXT pglCullParameterfvEXT +#endif + +/* GL_SGIX_ycrcb */ + +#ifndef GL_SGIX_ycrcb +#define GL_SGIX_ycrcb 1 +#define __GLEE_GL_SGIX_ycrcb 1 +/* Constants */ +#define GL_YCRCB_422_SGIX 0x81BB +#define GL_YCRCB_444_SGIX 0x81BC +#endif + +/* GL_SGIX_fragment_lighting */ + +#ifndef GL_SGIX_fragment_lighting +#define GL_SGIX_fragment_lighting 1 +#define __GLEE_GL_SGIX_fragment_lighting 1 +/* Constants */ +#define GL_FRAGMENT_LIGHTING_SGIX 0x8400 +#define GL_FRAGMENT_COLOR_MATERIAL_SGIX 0x8401 +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_SGIX 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_SGIX 0x8403 +#define GL_MAX_FRAGMENT_LIGHTS_SGIX 0x8404 +#define GL_MAX_ACTIVE_LIGHTS_SGIX 0x8405 +#define GL_CURRENT_RASTER_NORMAL_SGIX 0x8406 +#define GL_LIGHT_ENV_MODE_SGIX 0x8407 +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_SGIX 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_SGIX 0x8409 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_SGIX 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_SGIX 0x840B +#define GL_FRAGMENT_LIGHT0_SGIX 0x840C +#define GL_FRAGMENT_LIGHT1_SGIX 0x840D +#define GL_FRAGMENT_LIGHT2_SGIX 0x840E +#define GL_FRAGMENT_LIGHT3_SGIX 0x840F +#define GL_FRAGMENT_LIGHT4_SGIX 0x8410 +#define GL_FRAGMENT_LIGHT5_SGIX 0x8411 +#define GL_FRAGMENT_LIGHT6_SGIX 0x8412 +#define GL_FRAGMENT_LIGHT7_SGIX 0x8413 +typedef void (APIENTRYP PFNGLFRAGMENTCOLORMATERIALSGIXPROC) (GLenum face, GLenum mode); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFSGIXPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTISGIXPROC) (GLenum light, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFSGIXPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELISGIXPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFSGIXPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALISGIXPROC) (GLenum face, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param); +GLEE_EXTERN PFNGLFRAGMENTCOLORMATERIALSGIXPROC pglFragmentColorMaterialSGIX; +GLEE_EXTERN PFNGLFRAGMENTLIGHTFSGIXPROC pglFragmentLightfSGIX; +GLEE_EXTERN PFNGLFRAGMENTLIGHTFVSGIXPROC pglFragmentLightfvSGIX; +GLEE_EXTERN PFNGLFRAGMENTLIGHTISGIXPROC pglFragmentLightiSGIX; +GLEE_EXTERN PFNGLFRAGMENTLIGHTIVSGIXPROC pglFragmentLightivSGIX; +GLEE_EXTERN PFNGLFRAGMENTLIGHTMODELFSGIXPROC pglFragmentLightModelfSGIX; +GLEE_EXTERN PFNGLFRAGMENTLIGHTMODELFVSGIXPROC pglFragmentLightModelfvSGIX; +GLEE_EXTERN PFNGLFRAGMENTLIGHTMODELISGIXPROC pglFragmentLightModeliSGIX; +GLEE_EXTERN PFNGLFRAGMENTLIGHTMODELIVSGIXPROC pglFragmentLightModelivSGIX; +GLEE_EXTERN PFNGLFRAGMENTMATERIALFSGIXPROC pglFragmentMaterialfSGIX; +GLEE_EXTERN PFNGLFRAGMENTMATERIALFVSGIXPROC pglFragmentMaterialfvSGIX; +GLEE_EXTERN PFNGLFRAGMENTMATERIALISGIXPROC pglFragmentMaterialiSGIX; +GLEE_EXTERN PFNGLFRAGMENTMATERIALIVSGIXPROC pglFragmentMaterialivSGIX; +GLEE_EXTERN PFNGLGETFRAGMENTLIGHTFVSGIXPROC pglGetFragmentLightfvSGIX; +GLEE_EXTERN PFNGLGETFRAGMENTLIGHTIVSGIXPROC pglGetFragmentLightivSGIX; +GLEE_EXTERN PFNGLGETFRAGMENTMATERIALFVSGIXPROC pglGetFragmentMaterialfvSGIX; +GLEE_EXTERN PFNGLGETFRAGMENTMATERIALIVSGIXPROC pglGetFragmentMaterialivSGIX; +GLEE_EXTERN PFNGLLIGHTENVISGIXPROC pglLightEnviSGIX; +#define glFragmentColorMaterialSGIX pglFragmentColorMaterialSGIX +#define glFragmentLightfSGIX pglFragmentLightfSGIX +#define glFragmentLightfvSGIX pglFragmentLightfvSGIX +#define glFragmentLightiSGIX pglFragmentLightiSGIX +#define glFragmentLightivSGIX pglFragmentLightivSGIX +#define glFragmentLightModelfSGIX pglFragmentLightModelfSGIX +#define glFragmentLightModelfvSGIX pglFragmentLightModelfvSGIX +#define glFragmentLightModeliSGIX pglFragmentLightModeliSGIX +#define glFragmentLightModelivSGIX pglFragmentLightModelivSGIX +#define glFragmentMaterialfSGIX pglFragmentMaterialfSGIX +#define glFragmentMaterialfvSGIX pglFragmentMaterialfvSGIX +#define glFragmentMaterialiSGIX pglFragmentMaterialiSGIX +#define glFragmentMaterialivSGIX pglFragmentMaterialivSGIX +#define glGetFragmentLightfvSGIX pglGetFragmentLightfvSGIX +#define glGetFragmentLightivSGIX pglGetFragmentLightivSGIX +#define glGetFragmentMaterialfvSGIX pglGetFragmentMaterialfvSGIX +#define glGetFragmentMaterialivSGIX pglGetFragmentMaterialivSGIX +#define glLightEnviSGIX pglLightEnviSGIX +#endif + +/* GL_IBM_rasterpos_clip */ + +#ifndef GL_IBM_rasterpos_clip +#define GL_IBM_rasterpos_clip 1 +#define __GLEE_GL_IBM_rasterpos_clip 1 +/* Constants */ +#define GL_RASTER_POSITION_UNCLIPPED_IBM 0x19262 +#endif + +/* GL_HP_texture_lighting */ + +#ifndef GL_HP_texture_lighting +#define GL_HP_texture_lighting 1 +#define __GLEE_GL_HP_texture_lighting 1 +/* Constants */ +#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167 +#define GL_TEXTURE_POST_SPECULAR_HP 0x8168 +#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169 +#endif + +/* GL_EXT_draw_range_elements */ + +#ifndef GL_EXT_draw_range_elements +#define GL_EXT_draw_range_elements 1 +#define __GLEE_GL_EXT_draw_range_elements 1 +/* Constants */ +#define GL_MAX_ELEMENTS_VERTICES_EXT 0x80E8 +#define GL_MAX_ELEMENTS_INDICES_EXT 0x80E9 +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); +GLEE_EXTERN PFNGLDRAWRANGEELEMENTSEXTPROC pglDrawRangeElementsEXT; +#define glDrawRangeElementsEXT pglDrawRangeElementsEXT +#endif + +/* GL_WIN_phong_shading */ + +#ifndef GL_WIN_phong_shading +#define GL_WIN_phong_shading 1 +#define __GLEE_GL_WIN_phong_shading 1 +/* Constants */ +#define GL_PHONG_WIN 0x80EA +#define GL_PHONG_HINT_WIN 0x80EB +#endif + +/* GL_WIN_specular_fog */ + +#ifndef GL_WIN_specular_fog +#define GL_WIN_specular_fog 1 +#define __GLEE_GL_WIN_specular_fog 1 +/* Constants */ +#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC +#endif + +/* GL_EXT_light_texture */ + +#ifndef GL_EXT_light_texture +#define GL_EXT_light_texture 1 +#define __GLEE_GL_EXT_light_texture 1 +/* Constants */ +#define GL_FRAGMENT_MATERIAL_EXT 0x8349 +#define GL_FRAGMENT_NORMAL_EXT 0x834A +#define GL_FRAGMENT_COLOR_EXT 0x834C +#define GL_ATTENUATION_EXT 0x834D +#define GL_SHADOW_ATTENUATION_EXT 0x834E +#define GL_TEXTURE_APPLICATION_MODE_EXT 0x834F +#define GL_TEXTURE_LIGHT_EXT 0x8350 +#define GL_TEXTURE_MATERIAL_FACE_EXT 0x8351 +#define GL_TEXTURE_MATERIAL_PARAMETER_EXT 0x8352 +typedef void (APIENTRYP PFNGLAPPLYTEXTUREEXTPROC) (GLenum mode); +typedef void (APIENTRYP PFNGLTEXTURELIGHTEXTPROC) (GLenum pname); +typedef void (APIENTRYP PFNGLTEXTUREMATERIALEXTPROC) (GLenum face, GLenum mode); +GLEE_EXTERN PFNGLAPPLYTEXTUREEXTPROC pglApplyTextureEXT; +GLEE_EXTERN PFNGLTEXTURELIGHTEXTPROC pglTextureLightEXT; +GLEE_EXTERN PFNGLTEXTUREMATERIALEXTPROC pglTextureMaterialEXT; +#define glApplyTextureEXT pglApplyTextureEXT +#define glTextureLightEXT pglTextureLightEXT +#define glTextureMaterialEXT pglTextureMaterialEXT +#endif + +/* GL_SGIX_blend_alpha_minmax */ + +#ifndef GL_SGIX_blend_alpha_minmax +#define GL_SGIX_blend_alpha_minmax 1 +#define __GLEE_GL_SGIX_blend_alpha_minmax 1 +/* Constants */ +#define GL_ALPHA_MIN_SGIX 0x8320 +#define GL_ALPHA_MAX_SGIX 0x8321 +#endif + +/* GL_SGIX_impact_pixel_texture */ + +#ifndef GL_SGIX_impact_pixel_texture +#define GL_SGIX_impact_pixel_texture 1 +#define __GLEE_GL_SGIX_impact_pixel_texture 1 +/* Constants */ +#define GL_PIXEL_TEX_GEN_Q_CEILING_SGIX 0x8184 +#define GL_PIXEL_TEX_GEN_Q_ROUND_SGIX 0x8185 +#define GL_PIXEL_TEX_GEN_Q_FLOOR_SGIX 0x8186 +#define GL_PIXEL_TEX_GEN_ALPHA_REPLACE_SGIX 0x8187 +#define GL_PIXEL_TEX_GEN_ALPHA_NO_REPLACE_SGIX 0x8188 +#define GL_PIXEL_TEX_GEN_ALPHA_LS_SGIX 0x8189 +#define GL_PIXEL_TEX_GEN_ALPHA_MS_SGIX 0x818A +#endif + +/* GL_EXT_bgra */ + +#ifndef GL_EXT_bgra +#define GL_EXT_bgra 1 +#define __GLEE_GL_EXT_bgra 1 +/* Constants */ +#define GL_BGR_EXT 0x80E0 +#define GL_BGRA_EXT 0x80E1 +#endif + +/* GL_SGIX_async */ + +#ifndef GL_SGIX_async +#define GL_SGIX_async 1 +#define __GLEE_GL_SGIX_async 1 +/* Constants */ +#define GL_ASYNC_MARKER_SGIX 0x8329 +typedef void (APIENTRYP PFNGLASYNCMARKERSGIXPROC) (GLuint marker); +typedef GLint (APIENTRYP PFNGLFINISHASYNCSGIXPROC) (GLuint * markerp); +typedef GLint (APIENTRYP PFNGLPOLLASYNCSGIXPROC) (GLuint * markerp); +typedef GLuint (APIENTRYP PFNGLGENASYNCMARKERSSGIXPROC) (GLsizei range); +typedef void (APIENTRYP PFNGLDELETEASYNCMARKERSSGIXPROC) (GLuint marker, GLsizei range); +typedef GLboolean (APIENTRYP PFNGLISASYNCMARKERSGIXPROC) (GLuint marker); +GLEE_EXTERN PFNGLASYNCMARKERSGIXPROC pglAsyncMarkerSGIX; +GLEE_EXTERN PFNGLFINISHASYNCSGIXPROC pglFinishAsyncSGIX; +GLEE_EXTERN PFNGLPOLLASYNCSGIXPROC pglPollAsyncSGIX; +GLEE_EXTERN PFNGLGENASYNCMARKERSSGIXPROC pglGenAsyncMarkersSGIX; +GLEE_EXTERN PFNGLDELETEASYNCMARKERSSGIXPROC pglDeleteAsyncMarkersSGIX; +GLEE_EXTERN PFNGLISASYNCMARKERSGIXPROC pglIsAsyncMarkerSGIX; +#define glAsyncMarkerSGIX pglAsyncMarkerSGIX +#define glFinishAsyncSGIX pglFinishAsyncSGIX +#define glPollAsyncSGIX pglPollAsyncSGIX +#define glGenAsyncMarkersSGIX pglGenAsyncMarkersSGIX +#define glDeleteAsyncMarkersSGIX pglDeleteAsyncMarkersSGIX +#define glIsAsyncMarkerSGIX pglIsAsyncMarkerSGIX +#endif + +/* GL_SGIX_async_pixel */ + +#ifndef GL_SGIX_async_pixel +#define GL_SGIX_async_pixel 1 +#define __GLEE_GL_SGIX_async_pixel 1 +/* Constants */ +#define GL_ASYNC_TEX_IMAGE_SGIX 0x835C +#define GL_ASYNC_DRAW_PIXELS_SGIX 0x835D +#define GL_ASYNC_READ_PIXELS_SGIX 0x835E +#define GL_MAX_ASYNC_TEX_IMAGE_SGIX 0x835F +#define GL_MAX_ASYNC_DRAW_PIXELS_SGIX 0x8360 +#define GL_MAX_ASYNC_READ_PIXELS_SGIX 0x8361 +#endif + +/* GL_SGIX_async_histogram */ + +#ifndef GL_SGIX_async_histogram +#define GL_SGIX_async_histogram 1 +#define __GLEE_GL_SGIX_async_histogram 1 +/* Constants */ +#define GL_ASYNC_HISTOGRAM_SGIX 0x832C +#define GL_MAX_ASYNC_HISTOGRAM_SGIX 0x832D +#endif + +/* GL_INTEL_texture_scissor */ + +#ifndef GL_INTEL_texture_scissor +#define GL_INTEL_texture_scissor 1 +#define __GLEE_GL_INTEL_texture_scissor 1 +/* Constants */ +#endif + +/* GL_INTEL_parallel_arrays */ + +#ifndef GL_INTEL_parallel_arrays +#define GL_INTEL_parallel_arrays 1 +#define __GLEE_GL_INTEL_parallel_arrays 1 +/* Constants */ +#define GL_PARALLEL_ARRAYS_INTEL 0x83F4 +#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5 +#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6 +#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7 +#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8 +typedef void (APIENTRYP PFNGLVERTEXPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* * pointer); +typedef void (APIENTRYP PFNGLNORMALPOINTERVINTELPROC) (GLenum type, const GLvoid* * pointer); +typedef void (APIENTRYP PFNGLCOLORPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* * pointer); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERVINTELPROC) (GLint size, GLenum type, const GLvoid* * pointer); +GLEE_EXTERN PFNGLVERTEXPOINTERVINTELPROC pglVertexPointervINTEL; +GLEE_EXTERN PFNGLNORMALPOINTERVINTELPROC pglNormalPointervINTEL; +GLEE_EXTERN PFNGLCOLORPOINTERVINTELPROC pglColorPointervINTEL; +GLEE_EXTERN PFNGLTEXCOORDPOINTERVINTELPROC pglTexCoordPointervINTEL; +#define glVertexPointervINTEL pglVertexPointervINTEL +#define glNormalPointervINTEL pglNormalPointervINTEL +#define glColorPointervINTEL pglColorPointervINTEL +#define glTexCoordPointervINTEL pglTexCoordPointervINTEL +#endif + +/* GL_HP_occlusion_test */ + +#ifndef GL_HP_occlusion_test +#define GL_HP_occlusion_test 1 +#define __GLEE_GL_HP_occlusion_test 1 +/* Constants */ +#define GL_OCCLUSION_TEST_HP 0x8165 +#define GL_OCCLUSION_TEST_RESULT_HP 0x8166 +#endif + +/* GL_EXT_pixel_transform */ + +#ifndef GL_EXT_pixel_transform +#define GL_EXT_pixel_transform 1 +#define __GLEE_GL_EXT_pixel_transform 1 +/* Constants */ +#define GL_PIXEL_TRANSFORM_2D_EXT 0x8330 +#define GL_PIXEL_MAG_FILTER_EXT 0x8331 +#define GL_PIXEL_MIN_FILTER_EXT 0x8332 +#define GL_PIXEL_CUBIC_WEIGHT_EXT 0x8333 +#define GL_CUBIC_EXT 0x8334 +#define GL_AVERAGE_EXT 0x8335 +#define GL_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8336 +#define GL_MAX_PIXEL_TRANSFORM_2D_STACK_DEPTH_EXT 0x8337 +#define GL_PIXEL_TRANSFORM_2D_MATRIX_EXT 0x8338 +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIEXTPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFEXTPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC) (GLenum target, GLenum pname, const GLfloat * params); +GLEE_EXTERN PFNGLPIXELTRANSFORMPARAMETERIEXTPROC pglPixelTransformParameteriEXT; +GLEE_EXTERN PFNGLPIXELTRANSFORMPARAMETERFEXTPROC pglPixelTransformParameterfEXT; +GLEE_EXTERN PFNGLPIXELTRANSFORMPARAMETERIVEXTPROC pglPixelTransformParameterivEXT; +GLEE_EXTERN PFNGLPIXELTRANSFORMPARAMETERFVEXTPROC pglPixelTransformParameterfvEXT; +#define glPixelTransformParameteriEXT pglPixelTransformParameteriEXT +#define glPixelTransformParameterfEXT pglPixelTransformParameterfEXT +#define glPixelTransformParameterivEXT pglPixelTransformParameterivEXT +#define glPixelTransformParameterfvEXT pglPixelTransformParameterfvEXT +#endif + +/* GL_EXT_pixel_transform_color_table */ + +#ifndef GL_EXT_pixel_transform_color_table +#define GL_EXT_pixel_transform_color_table 1 +#define __GLEE_GL_EXT_pixel_transform_color_table 1 +/* Constants */ +#endif + +/* GL_EXT_shared_texture_palette */ + +#ifndef GL_EXT_shared_texture_palette +#define GL_EXT_shared_texture_palette 1 +#define __GLEE_GL_EXT_shared_texture_palette 1 +/* Constants */ +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +#endif + +/* GL_EXT_separate_specular_color */ + +#ifndef GL_EXT_separate_specular_color +#define GL_EXT_separate_specular_color 1 +#define __GLEE_GL_EXT_separate_specular_color 1 +/* Constants */ +#define GL_LIGHT_MODEL_COLOR_CONTROL_EXT 0x81F8 +#define GL_SINGLE_COLOR_EXT 0x81F9 +#define GL_SEPARATE_SPECULAR_COLOR_EXT 0x81FA +#endif + +/* GL_EXT_secondary_color */ + +#ifndef GL_EXT_secondary_color +#define GL_EXT_secondary_color 1 +#define __GLEE_GL_EXT_secondary_color 1 +/* Constants */ +#define GL_COLOR_SUM_EXT 0x8458 +#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459 +#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A +#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B +#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C +#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D +#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3BVEXTPROC) (const GLbyte * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3DVEXTPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IEXTPROC) (GLint red, GLint green, GLint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3IVEXTPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SEXTPROC) (GLshort red, GLshort green, GLshort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3SVEXTPROC) (const GLshort * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UBVEXTPROC) (const GLubyte * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIEXTPROC) (GLuint red, GLuint green, GLuint blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3UIVEXTPROC) (const GLuint * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USEXTPROC) (GLushort red, GLushort green, GLushort blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3USVEXTPROC) (const GLushort * v); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +GLEE_EXTERN PFNGLSECONDARYCOLOR3BEXTPROC pglSecondaryColor3bEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3BVEXTPROC pglSecondaryColor3bvEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3DEXTPROC pglSecondaryColor3dEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3DVEXTPROC pglSecondaryColor3dvEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3FEXTPROC pglSecondaryColor3fEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3FVEXTPROC pglSecondaryColor3fvEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3IEXTPROC pglSecondaryColor3iEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3IVEXTPROC pglSecondaryColor3ivEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3SEXTPROC pglSecondaryColor3sEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3SVEXTPROC pglSecondaryColor3svEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3UBEXTPROC pglSecondaryColor3ubEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3UBVEXTPROC pglSecondaryColor3ubvEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3UIEXTPROC pglSecondaryColor3uiEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3UIVEXTPROC pglSecondaryColor3uivEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3USEXTPROC pglSecondaryColor3usEXT; +GLEE_EXTERN PFNGLSECONDARYCOLOR3USVEXTPROC pglSecondaryColor3usvEXT; +GLEE_EXTERN PFNGLSECONDARYCOLORPOINTEREXTPROC pglSecondaryColorPointerEXT; +#define glSecondaryColor3bEXT pglSecondaryColor3bEXT +#define glSecondaryColor3bvEXT pglSecondaryColor3bvEXT +#define glSecondaryColor3dEXT pglSecondaryColor3dEXT +#define glSecondaryColor3dvEXT pglSecondaryColor3dvEXT +#define glSecondaryColor3fEXT pglSecondaryColor3fEXT +#define glSecondaryColor3fvEXT pglSecondaryColor3fvEXT +#define glSecondaryColor3iEXT pglSecondaryColor3iEXT +#define glSecondaryColor3ivEXT pglSecondaryColor3ivEXT +#define glSecondaryColor3sEXT pglSecondaryColor3sEXT +#define glSecondaryColor3svEXT pglSecondaryColor3svEXT +#define glSecondaryColor3ubEXT pglSecondaryColor3ubEXT +#define glSecondaryColor3ubvEXT pglSecondaryColor3ubvEXT +#define glSecondaryColor3uiEXT pglSecondaryColor3uiEXT +#define glSecondaryColor3uivEXT pglSecondaryColor3uivEXT +#define glSecondaryColor3usEXT pglSecondaryColor3usEXT +#define glSecondaryColor3usvEXT pglSecondaryColor3usvEXT +#define glSecondaryColorPointerEXT pglSecondaryColorPointerEXT +#endif + +/* GL_EXT_texture_perturb_normal */ + +#ifndef GL_EXT_texture_perturb_normal +#define GL_EXT_texture_perturb_normal 1 +#define __GLEE_GL_EXT_texture_perturb_normal 1 +/* Constants */ +#define GL_PERTURB_EXT 0x85AE +#define GL_TEXTURE_NORMAL_EXT 0x85AF +typedef void (APIENTRYP PFNGLTEXTURENORMALEXTPROC) (GLenum mode); +GLEE_EXTERN PFNGLTEXTURENORMALEXTPROC pglTextureNormalEXT; +#define glTextureNormalEXT pglTextureNormalEXT +#endif + +/* GL_EXT_multi_draw_arrays */ + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +#define __GLEE_GL_EXT_multi_draw_arrays 1 +/* Constants */ +typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei * count, GLenum type, const GLvoid* * indices, GLsizei primcount); +GLEE_EXTERN PFNGLMULTIDRAWARRAYSEXTPROC pglMultiDrawArraysEXT; +GLEE_EXTERN PFNGLMULTIDRAWELEMENTSEXTPROC pglMultiDrawElementsEXT; +#define glMultiDrawArraysEXT pglMultiDrawArraysEXT +#define glMultiDrawElementsEXT pglMultiDrawElementsEXT +#endif + +/* GL_EXT_fog_coord */ + +#ifndef GL_EXT_fog_coord +#define GL_EXT_fog_coord 1 +#define __GLEE_GL_EXT_fog_coord 1 +/* Constants */ +#define GL_FOG_COORDINATE_SOURCE_EXT 0x8450 +#define GL_FOG_COORDINATE_EXT 0x8451 +#define GL_FRAGMENT_DEPTH_EXT 0x8452 +#define GL_CURRENT_FOG_COORDINATE_EXT 0x8453 +#define GL_FOG_COORDINATE_ARRAY_TYPE_EXT 0x8454 +#define GL_FOG_COORDINATE_ARRAY_STRIDE_EXT 0x8455 +#define GL_FOG_COORDINATE_ARRAY_POINTER_EXT 0x8456 +#define GL_FOG_COORDINATE_ARRAY_EXT 0x8457 +typedef void (APIENTRYP PFNGLFOGCOORDFEXTPROC) (GLfloat coord); +typedef void (APIENTRYP PFNGLFOGCOORDFVEXTPROC) (const GLfloat * coord); +typedef void (APIENTRYP PFNGLFOGCOORDDEXTPROC) (GLdouble coord); +typedef void (APIENTRYP PFNGLFOGCOORDDVEXTPROC) (const GLdouble * coord); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid * pointer); +GLEE_EXTERN PFNGLFOGCOORDFEXTPROC pglFogCoordfEXT; +GLEE_EXTERN PFNGLFOGCOORDFVEXTPROC pglFogCoordfvEXT; +GLEE_EXTERN PFNGLFOGCOORDDEXTPROC pglFogCoorddEXT; +GLEE_EXTERN PFNGLFOGCOORDDVEXTPROC pglFogCoorddvEXT; +GLEE_EXTERN PFNGLFOGCOORDPOINTEREXTPROC pglFogCoordPointerEXT; +#define glFogCoordfEXT pglFogCoordfEXT +#define glFogCoordfvEXT pglFogCoordfvEXT +#define glFogCoorddEXT pglFogCoorddEXT +#define glFogCoorddvEXT pglFogCoorddvEXT +#define glFogCoordPointerEXT pglFogCoordPointerEXT +#endif + +/* GL_REND_screen_coordinates */ + +#ifndef GL_REND_screen_coordinates +#define GL_REND_screen_coordinates 1 +#define __GLEE_GL_REND_screen_coordinates 1 +/* Constants */ +#define GL_SCREEN_COORDINATES_REND 0x8490 +#define GL_INVERTED_SCREEN_W_REND 0x8491 +#endif + +/* GL_EXT_coordinate_frame */ + +#ifndef GL_EXT_coordinate_frame +#define GL_EXT_coordinate_frame 1 +#define __GLEE_GL_EXT_coordinate_frame 1 +/* Constants */ +#define GL_TANGENT_ARRAY_EXT 0x8439 +#define GL_BINORMAL_ARRAY_EXT 0x843A +#define GL_CURRENT_TANGENT_EXT 0x843B +#define GL_CURRENT_BINORMAL_EXT 0x843C +#define GL_TANGENT_ARRAY_TYPE_EXT 0x843E +#define GL_TANGENT_ARRAY_STRIDE_EXT 0x843F +#define GL_BINORMAL_ARRAY_TYPE_EXT 0x8440 +#define GL_BINORMAL_ARRAY_STRIDE_EXT 0x8441 +#define GL_TANGENT_ARRAY_POINTER_EXT 0x8442 +#define GL_BINORMAL_ARRAY_POINTER_EXT 0x8443 +#define GL_MAP1_TANGENT_EXT 0x8444 +#define GL_MAP2_TANGENT_EXT 0x8445 +#define GL_MAP1_BINORMAL_EXT 0x8446 +#define GL_MAP2_BINORMAL_EXT 0x8447 +typedef void (APIENTRYP PFNGLTANGENT3BEXTPROC) (GLbyte tx, GLbyte ty, GLbyte tz); +typedef void (APIENTRYP PFNGLTANGENT3BVEXTPROC) (const GLbyte * v); +typedef void (APIENTRYP PFNGLTANGENT3DEXTPROC) (GLdouble tx, GLdouble ty, GLdouble tz); +typedef void (APIENTRYP PFNGLTANGENT3DVEXTPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLTANGENT3FEXTPROC) (GLfloat tx, GLfloat ty, GLfloat tz); +typedef void (APIENTRYP PFNGLTANGENT3FVEXTPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLTANGENT3IEXTPROC) (GLint tx, GLint ty, GLint tz); +typedef void (APIENTRYP PFNGLTANGENT3IVEXTPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLTANGENT3SEXTPROC) (GLshort tx, GLshort ty, GLshort tz); +typedef void (APIENTRYP PFNGLTANGENT3SVEXTPROC) (const GLshort * v); +typedef void (APIENTRYP PFNGLBINORMAL3BEXTPROC) (GLbyte bx, GLbyte by, GLbyte bz); +typedef void (APIENTRYP PFNGLBINORMAL3BVEXTPROC) (const GLbyte * v); +typedef void (APIENTRYP PFNGLBINORMAL3DEXTPROC) (GLdouble bx, GLdouble by, GLdouble bz); +typedef void (APIENTRYP PFNGLBINORMAL3DVEXTPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLBINORMAL3FEXTPROC) (GLfloat bx, GLfloat by, GLfloat bz); +typedef void (APIENTRYP PFNGLBINORMAL3FVEXTPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLBINORMAL3IEXTPROC) (GLint bx, GLint by, GLint bz); +typedef void (APIENTRYP PFNGLBINORMAL3IVEXTPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLBINORMAL3SEXTPROC) (GLshort bx, GLshort by, GLshort bz); +typedef void (APIENTRYP PFNGLBINORMAL3SVEXTPROC) (const GLshort * v); +typedef void (APIENTRYP PFNGLTANGENTPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLBINORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid * pointer); +GLEE_EXTERN PFNGLTANGENT3BEXTPROC pglTangent3bEXT; +GLEE_EXTERN PFNGLTANGENT3BVEXTPROC pglTangent3bvEXT; +GLEE_EXTERN PFNGLTANGENT3DEXTPROC pglTangent3dEXT; +GLEE_EXTERN PFNGLTANGENT3DVEXTPROC pglTangent3dvEXT; +GLEE_EXTERN PFNGLTANGENT3FEXTPROC pglTangent3fEXT; +GLEE_EXTERN PFNGLTANGENT3FVEXTPROC pglTangent3fvEXT; +GLEE_EXTERN PFNGLTANGENT3IEXTPROC pglTangent3iEXT; +GLEE_EXTERN PFNGLTANGENT3IVEXTPROC pglTangent3ivEXT; +GLEE_EXTERN PFNGLTANGENT3SEXTPROC pglTangent3sEXT; +GLEE_EXTERN PFNGLTANGENT3SVEXTPROC pglTangent3svEXT; +GLEE_EXTERN PFNGLBINORMAL3BEXTPROC pglBinormal3bEXT; +GLEE_EXTERN PFNGLBINORMAL3BVEXTPROC pglBinormal3bvEXT; +GLEE_EXTERN PFNGLBINORMAL3DEXTPROC pglBinormal3dEXT; +GLEE_EXTERN PFNGLBINORMAL3DVEXTPROC pglBinormal3dvEXT; +GLEE_EXTERN PFNGLBINORMAL3FEXTPROC pglBinormal3fEXT; +GLEE_EXTERN PFNGLBINORMAL3FVEXTPROC pglBinormal3fvEXT; +GLEE_EXTERN PFNGLBINORMAL3IEXTPROC pglBinormal3iEXT; +GLEE_EXTERN PFNGLBINORMAL3IVEXTPROC pglBinormal3ivEXT; +GLEE_EXTERN PFNGLBINORMAL3SEXTPROC pglBinormal3sEXT; +GLEE_EXTERN PFNGLBINORMAL3SVEXTPROC pglBinormal3svEXT; +GLEE_EXTERN PFNGLTANGENTPOINTEREXTPROC pglTangentPointerEXT; +GLEE_EXTERN PFNGLBINORMALPOINTEREXTPROC pglBinormalPointerEXT; +#define glTangent3bEXT pglTangent3bEXT +#define glTangent3bvEXT pglTangent3bvEXT +#define glTangent3dEXT pglTangent3dEXT +#define glTangent3dvEXT pglTangent3dvEXT +#define glTangent3fEXT pglTangent3fEXT +#define glTangent3fvEXT pglTangent3fvEXT +#define glTangent3iEXT pglTangent3iEXT +#define glTangent3ivEXT pglTangent3ivEXT +#define glTangent3sEXT pglTangent3sEXT +#define glTangent3svEXT pglTangent3svEXT +#define glBinormal3bEXT pglBinormal3bEXT +#define glBinormal3bvEXT pglBinormal3bvEXT +#define glBinormal3dEXT pglBinormal3dEXT +#define glBinormal3dvEXT pglBinormal3dvEXT +#define glBinormal3fEXT pglBinormal3fEXT +#define glBinormal3fvEXT pglBinormal3fvEXT +#define glBinormal3iEXT pglBinormal3iEXT +#define glBinormal3ivEXT pglBinormal3ivEXT +#define glBinormal3sEXT pglBinormal3sEXT +#define glBinormal3svEXT pglBinormal3svEXT +#define glTangentPointerEXT pglTangentPointerEXT +#define glBinormalPointerEXT pglBinormalPointerEXT +#endif + +/* GL_EXT_texture_env_combine */ + +#ifndef GL_EXT_texture_env_combine +#define GL_EXT_texture_env_combine 1 +#define __GLEE_GL_EXT_texture_env_combine 1 +/* Constants */ +#define GL_COMBINE_EXT 0x8570 +#define GL_COMBINE_RGB_EXT 0x8571 +#define GL_COMBINE_ALPHA_EXT 0x8572 +#define GL_RGB_SCALE_EXT 0x8573 +#define GL_ADD_SIGNED_EXT 0x8574 +#define GL_INTERPOLATE_EXT 0x8575 +#define GL_CONSTANT_EXT 0x8576 +#define GL_PRIMARY_COLOR_EXT 0x8577 +#define GL_PREVIOUS_EXT 0x8578 +#define GL_SOURCE0_RGB_EXT 0x8580 +#define GL_SOURCE1_RGB_EXT 0x8581 +#define GL_SOURCE2_RGB_EXT 0x8582 +#define GL_SOURCE0_ALPHA_EXT 0x8588 +#define GL_SOURCE1_ALPHA_EXT 0x8589 +#define GL_SOURCE2_ALPHA_EXT 0x858A +#define GL_OPERAND0_RGB_EXT 0x8590 +#define GL_OPERAND1_RGB_EXT 0x8591 +#define GL_OPERAND2_RGB_EXT 0x8592 +#define GL_OPERAND0_ALPHA_EXT 0x8598 +#define GL_OPERAND1_ALPHA_EXT 0x8599 +#define GL_OPERAND2_ALPHA_EXT 0x859A +#endif + +/* GL_APPLE_specular_vector */ + +#ifndef GL_APPLE_specular_vector +#define GL_APPLE_specular_vector 1 +#define __GLEE_GL_APPLE_specular_vector 1 +/* Constants */ +#define GL_LIGHT_MODEL_SPECULAR_VECTOR_APPLE 0x85B0 +#endif + +/* GL_APPLE_transform_hint */ + +#ifndef GL_APPLE_transform_hint +#define GL_APPLE_transform_hint 1 +#define __GLEE_GL_APPLE_transform_hint 1 +/* Constants */ +#define GL_TRANSFORM_HINT_APPLE 0x85B1 +#endif + +/* GL_SGIX_fog_scale */ + +#ifndef GL_SGIX_fog_scale +#define GL_SGIX_fog_scale 1 +#define __GLEE_GL_SGIX_fog_scale 1 +/* Constants */ +#define GL_FOG_SCALE_SGIX 0x81FC +#define GL_FOG_SCALE_VALUE_SGIX 0x81FD +#endif + +/* GL_SUNX_constant_data */ + +#ifndef GL_SUNX_constant_data +#define GL_SUNX_constant_data 1 +#define __GLEE_GL_SUNX_constant_data 1 +/* Constants */ +#define GL_UNPACK_CONSTANT_DATA_SUNX 0x81D5 +#define GL_TEXTURE_CONSTANT_DATA_SUNX 0x81D6 +typedef void (APIENTRYP PFNGLFINISHTEXTURESUNXPROC) (); +GLEE_EXTERN PFNGLFINISHTEXTURESUNXPROC pglFinishTextureSUNX; +#define glFinishTextureSUNX pglFinishTextureSUNX +#endif + +/* GL_SUN_global_alpha */ + +#ifndef GL_SUN_global_alpha +#define GL_SUN_global_alpha 1 +#define __GLEE_GL_SUN_global_alpha 1 +/* Constants */ +#define GL_GLOBAL_ALPHA_SUN 0x81D9 +#define GL_GLOBAL_ALPHA_FACTOR_SUN 0x81DA +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORBSUNPROC) (GLbyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORSSUNPROC) (GLshort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORISUNPROC) (GLint factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORFSUNPROC) (GLfloat factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORDSUNPROC) (GLdouble factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUBSUNPROC) (GLubyte factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUSSUNPROC) (GLushort factor); +typedef void (APIENTRYP PFNGLGLOBALALPHAFACTORUISUNPROC) (GLuint factor); +GLEE_EXTERN PFNGLGLOBALALPHAFACTORBSUNPROC pglGlobalAlphaFactorbSUN; +GLEE_EXTERN PFNGLGLOBALALPHAFACTORSSUNPROC pglGlobalAlphaFactorsSUN; +GLEE_EXTERN PFNGLGLOBALALPHAFACTORISUNPROC pglGlobalAlphaFactoriSUN; +GLEE_EXTERN PFNGLGLOBALALPHAFACTORFSUNPROC pglGlobalAlphaFactorfSUN; +GLEE_EXTERN PFNGLGLOBALALPHAFACTORDSUNPROC pglGlobalAlphaFactordSUN; +GLEE_EXTERN PFNGLGLOBALALPHAFACTORUBSUNPROC pglGlobalAlphaFactorubSUN; +GLEE_EXTERN PFNGLGLOBALALPHAFACTORUSSUNPROC pglGlobalAlphaFactorusSUN; +GLEE_EXTERN PFNGLGLOBALALPHAFACTORUISUNPROC pglGlobalAlphaFactoruiSUN; +#define glGlobalAlphaFactorbSUN pglGlobalAlphaFactorbSUN +#define glGlobalAlphaFactorsSUN pglGlobalAlphaFactorsSUN +#define glGlobalAlphaFactoriSUN pglGlobalAlphaFactoriSUN +#define glGlobalAlphaFactorfSUN pglGlobalAlphaFactorfSUN +#define glGlobalAlphaFactordSUN pglGlobalAlphaFactordSUN +#define glGlobalAlphaFactorubSUN pglGlobalAlphaFactorubSUN +#define glGlobalAlphaFactorusSUN pglGlobalAlphaFactorusSUN +#define glGlobalAlphaFactoruiSUN pglGlobalAlphaFactoruiSUN +#endif + +/* GL_SUN_triangle_list */ + +#ifndef GL_SUN_triangle_list +#define GL_SUN_triangle_list 1 +#define __GLEE_GL_SUN_triangle_list 1 +/* Constants */ +#define GL_RESTART_SUN 0x0001 +#define GL_REPLACE_MIDDLE_SUN 0x0002 +#define GL_REPLACE_OLDEST_SUN 0x0003 +#define GL_TRIANGLE_LIST_SUN 0x81D7 +#define GL_REPLACEMENT_CODE_SUN 0x81D8 +#define GL_REPLACEMENT_CODE_ARRAY_SUN 0x85C0 +#define GL_REPLACEMENT_CODE_ARRAY_TYPE_SUN 0x85C1 +#define GL_REPLACEMENT_CODE_ARRAY_STRIDE_SUN 0x85C2 +#define GL_REPLACEMENT_CODE_ARRAY_POINTER_SUN 0x85C3 +#define GL_R1UI_V3F_SUN 0x85C4 +#define GL_R1UI_C4UB_V3F_SUN 0x85C5 +#define GL_R1UI_C3F_V3F_SUN 0x85C6 +#define GL_R1UI_N3F_V3F_SUN 0x85C7 +#define GL_R1UI_C4F_N3F_V3F_SUN 0x85C8 +#define GL_R1UI_T2F_V3F_SUN 0x85C9 +#define GL_R1UI_T2F_N3F_V3F_SUN 0x85CA +#define GL_R1UI_T2F_C4F_N3F_V3F_SUN 0x85CB +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUISUNPROC) (GLuint code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSSUNPROC) (GLushort code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBSUNPROC) (GLubyte code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVSUNPROC) (const GLuint * code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUSVSUNPROC) (const GLushort * code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUBVSUNPROC) (const GLubyte * code); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEPOINTERSUNPROC) (GLenum type, GLsizei stride, const GLvoid* * pointer); +GLEE_EXTERN PFNGLREPLACEMENTCODEUISUNPROC pglReplacementCodeuiSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUSSUNPROC pglReplacementCodeusSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUBSUNPROC pglReplacementCodeubSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUIVSUNPROC pglReplacementCodeuivSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUSVSUNPROC pglReplacementCodeusvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUBVSUNPROC pglReplacementCodeubvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEPOINTERSUNPROC pglReplacementCodePointerSUN; +#define glReplacementCodeuiSUN pglReplacementCodeuiSUN +#define glReplacementCodeusSUN pglReplacementCodeusSUN +#define glReplacementCodeubSUN pglReplacementCodeubSUN +#define glReplacementCodeuivSUN pglReplacementCodeuivSUN +#define glReplacementCodeusvSUN pglReplacementCodeusvSUN +#define glReplacementCodeubvSUN pglReplacementCodeubvSUN +#define glReplacementCodePointerSUN pglReplacementCodePointerSUN +#endif + +/* GL_SUN_vertex */ + +#ifndef GL_SUN_vertex +#define GL_SUN_vertex 1 +#define __GLEE_GL_SUN_vertex 1 +/* Constants */ +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX2FVSUNPROC) (const GLubyte * c, const GLfloat * v); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FSUNPROC) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4UBVERTEX3FVSUNPROC) (const GLubyte * c, const GLfloat * v); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR3FVERTEX3FVSUNPROC) (const GLfloat * c, const GLfloat * v); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FSUNPROC) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLNORMAL3FVERTEX3FVSUNPROC) (const GLfloat * n, const GLfloat * v); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat * c, const GLfloat * n, const GLfloat * v); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FVERTEX3FVSUNPROC) (const GLfloat * tc, const GLfloat * v); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FVERTEX4FVSUNPROC) (const GLfloat * tc, const GLfloat * v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC) (const GLfloat * tc, const GLubyte * c, const GLfloat * v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC) (const GLfloat * tc, const GLfloat * c, const GLfloat * v); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat * tc, const GLfloat * n, const GLfloat * v); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLfloat * tc, const GLfloat * c, const GLfloat * n, const GLfloat * v); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC) (const GLfloat * tc, const GLfloat * c, const GLfloat * n, const GLfloat * v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC) (const GLuint * rc, const GLfloat * v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC) (const GLuint * rc, const GLubyte * c, const GLfloat * v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC) (const GLuint * rc, const GLfloat * c, const GLfloat * v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC) (const GLuint * rc, const GLfloat * n, const GLfloat * v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint * rc, const GLfloat * c, const GLfloat * n, const GLfloat * v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC) (const GLuint * rc, const GLfloat * tc, const GLfloat * v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC) (const GLuint * rc, const GLfloat * tc, const GLfloat * n, const GLfloat * v); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC) (const GLuint * rc, const GLfloat * tc, const GLfloat * c, const GLfloat * n, const GLfloat * v); +GLEE_EXTERN PFNGLCOLOR4UBVERTEX2FSUNPROC pglColor4ubVertex2fSUN; +GLEE_EXTERN PFNGLCOLOR4UBVERTEX2FVSUNPROC pglColor4ubVertex2fvSUN; +GLEE_EXTERN PFNGLCOLOR4UBVERTEX3FSUNPROC pglColor4ubVertex3fSUN; +GLEE_EXTERN PFNGLCOLOR4UBVERTEX3FVSUNPROC pglColor4ubVertex3fvSUN; +GLEE_EXTERN PFNGLCOLOR3FVERTEX3FSUNPROC pglColor3fVertex3fSUN; +GLEE_EXTERN PFNGLCOLOR3FVERTEX3FVSUNPROC pglColor3fVertex3fvSUN; +GLEE_EXTERN PFNGLNORMAL3FVERTEX3FSUNPROC pglNormal3fVertex3fSUN; +GLEE_EXTERN PFNGLNORMAL3FVERTEX3FVSUNPROC pglNormal3fVertex3fvSUN; +GLEE_EXTERN PFNGLCOLOR4FNORMAL3FVERTEX3FSUNPROC pglColor4fNormal3fVertex3fSUN; +GLEE_EXTERN PFNGLCOLOR4FNORMAL3FVERTEX3FVSUNPROC pglColor4fNormal3fVertex3fvSUN; +GLEE_EXTERN PFNGLTEXCOORD2FVERTEX3FSUNPROC pglTexCoord2fVertex3fSUN; +GLEE_EXTERN PFNGLTEXCOORD2FVERTEX3FVSUNPROC pglTexCoord2fVertex3fvSUN; +GLEE_EXTERN PFNGLTEXCOORD4FVERTEX4FSUNPROC pglTexCoord4fVertex4fSUN; +GLEE_EXTERN PFNGLTEXCOORD4FVERTEX4FVSUNPROC pglTexCoord4fVertex4fvSUN; +GLEE_EXTERN PFNGLTEXCOORD2FCOLOR4UBVERTEX3FSUNPROC pglTexCoord2fColor4ubVertex3fSUN; +GLEE_EXTERN PFNGLTEXCOORD2FCOLOR4UBVERTEX3FVSUNPROC pglTexCoord2fColor4ubVertex3fvSUN; +GLEE_EXTERN PFNGLTEXCOORD2FCOLOR3FVERTEX3FSUNPROC pglTexCoord2fColor3fVertex3fSUN; +GLEE_EXTERN PFNGLTEXCOORD2FCOLOR3FVERTEX3FVSUNPROC pglTexCoord2fColor3fVertex3fvSUN; +GLEE_EXTERN PFNGLTEXCOORD2FNORMAL3FVERTEX3FSUNPROC pglTexCoord2fNormal3fVertex3fSUN; +GLEE_EXTERN PFNGLTEXCOORD2FNORMAL3FVERTEX3FVSUNPROC pglTexCoord2fNormal3fVertex3fvSUN; +GLEE_EXTERN PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC pglTexCoord2fColor4fNormal3fVertex3fSUN; +GLEE_EXTERN PFNGLTEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC pglTexCoord2fColor4fNormal3fVertex3fvSUN; +GLEE_EXTERN PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FSUNPROC pglTexCoord4fColor4fNormal3fVertex4fSUN; +GLEE_EXTERN PFNGLTEXCOORD4FCOLOR4FNORMAL3FVERTEX4FVSUNPROC pglTexCoord4fColor4fNormal3fVertex4fvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUIVERTEX3FSUNPROC pglReplacementCodeuiVertex3fSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUIVERTEX3FVSUNPROC pglReplacementCodeuiVertex3fvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FSUNPROC pglReplacementCodeuiColor4ubVertex3fSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUICOLOR4UBVERTEX3FVSUNPROC pglReplacementCodeuiColor4ubVertex3fvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FSUNPROC pglReplacementCodeuiColor3fVertex3fSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUICOLOR3FVERTEX3FVSUNPROC pglReplacementCodeuiColor3fVertex3fvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FSUNPROC pglReplacementCodeuiNormal3fVertex3fSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUINORMAL3FVERTEX3FVSUNPROC pglReplacementCodeuiNormal3fVertex3fvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FSUNPROC pglReplacementCodeuiColor4fNormal3fVertex3fSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUICOLOR4FNORMAL3FVERTEX3FVSUNPROC pglReplacementCodeuiColor4fNormal3fVertex3fvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FSUNPROC pglReplacementCodeuiTexCoord2fVertex3fSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUITEXCOORD2FVERTEX3FVSUNPROC pglReplacementCodeuiTexCoord2fVertex3fvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FSUNPROC pglReplacementCodeuiTexCoord2fNormal3fVertex3fSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUITEXCOORD2FNORMAL3FVERTEX3FVSUNPROC pglReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FSUNPROC pglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN; +GLEE_EXTERN PFNGLREPLACEMENTCODEUITEXCOORD2FCOLOR4FNORMAL3FVERTEX3FVSUNPROC pglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN; +#define glColor4ubVertex2fSUN pglColor4ubVertex2fSUN +#define glColor4ubVertex2fvSUN pglColor4ubVertex2fvSUN +#define glColor4ubVertex3fSUN pglColor4ubVertex3fSUN +#define glColor4ubVertex3fvSUN pglColor4ubVertex3fvSUN +#define glColor3fVertex3fSUN pglColor3fVertex3fSUN +#define glColor3fVertex3fvSUN pglColor3fVertex3fvSUN +#define glNormal3fVertex3fSUN pglNormal3fVertex3fSUN +#define glNormal3fVertex3fvSUN pglNormal3fVertex3fvSUN +#define glColor4fNormal3fVertex3fSUN pglColor4fNormal3fVertex3fSUN +#define glColor4fNormal3fVertex3fvSUN pglColor4fNormal3fVertex3fvSUN +#define glTexCoord2fVertex3fSUN pglTexCoord2fVertex3fSUN +#define glTexCoord2fVertex3fvSUN pglTexCoord2fVertex3fvSUN +#define glTexCoord4fVertex4fSUN pglTexCoord4fVertex4fSUN +#define glTexCoord4fVertex4fvSUN pglTexCoord4fVertex4fvSUN +#define glTexCoord2fColor4ubVertex3fSUN pglTexCoord2fColor4ubVertex3fSUN +#define glTexCoord2fColor4ubVertex3fvSUN pglTexCoord2fColor4ubVertex3fvSUN +#define glTexCoord2fColor3fVertex3fSUN pglTexCoord2fColor3fVertex3fSUN +#define glTexCoord2fColor3fVertex3fvSUN pglTexCoord2fColor3fVertex3fvSUN +#define glTexCoord2fNormal3fVertex3fSUN pglTexCoord2fNormal3fVertex3fSUN +#define glTexCoord2fNormal3fVertex3fvSUN pglTexCoord2fNormal3fVertex3fvSUN +#define glTexCoord2fColor4fNormal3fVertex3fSUN pglTexCoord2fColor4fNormal3fVertex3fSUN +#define glTexCoord2fColor4fNormal3fVertex3fvSUN pglTexCoord2fColor4fNormal3fVertex3fvSUN +#define glTexCoord4fColor4fNormal3fVertex4fSUN pglTexCoord4fColor4fNormal3fVertex4fSUN +#define glTexCoord4fColor4fNormal3fVertex4fvSUN pglTexCoord4fColor4fNormal3fVertex4fvSUN +#define glReplacementCodeuiVertex3fSUN pglReplacementCodeuiVertex3fSUN +#define glReplacementCodeuiVertex3fvSUN pglReplacementCodeuiVertex3fvSUN +#define glReplacementCodeuiColor4ubVertex3fSUN pglReplacementCodeuiColor4ubVertex3fSUN +#define glReplacementCodeuiColor4ubVertex3fvSUN pglReplacementCodeuiColor4ubVertex3fvSUN +#define glReplacementCodeuiColor3fVertex3fSUN pglReplacementCodeuiColor3fVertex3fSUN +#define glReplacementCodeuiColor3fVertex3fvSUN pglReplacementCodeuiColor3fVertex3fvSUN +#define glReplacementCodeuiNormal3fVertex3fSUN pglReplacementCodeuiNormal3fVertex3fSUN +#define glReplacementCodeuiNormal3fVertex3fvSUN pglReplacementCodeuiNormal3fVertex3fvSUN +#define glReplacementCodeuiColor4fNormal3fVertex3fSUN pglReplacementCodeuiColor4fNormal3fVertex3fSUN +#define glReplacementCodeuiColor4fNormal3fVertex3fvSUN pglReplacementCodeuiColor4fNormal3fVertex3fvSUN +#define glReplacementCodeuiTexCoord2fVertex3fSUN pglReplacementCodeuiTexCoord2fVertex3fSUN +#define glReplacementCodeuiTexCoord2fVertex3fvSUN pglReplacementCodeuiTexCoord2fVertex3fvSUN +#define glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN pglReplacementCodeuiTexCoord2fNormal3fVertex3fSUN +#define glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN pglReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN +#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN pglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN +#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN pglReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN +#endif + +/* GL_EXT_blend_func_separate */ + +#ifndef GL_EXT_blend_func_separate +#define GL_EXT_blend_func_separate 1 +#define __GLEE_GL_EXT_blend_func_separate 1 +/* Constants */ +#define GL_BLEND_DST_RGB_EXT 0x80C8 +#define GL_BLEND_SRC_RGB_EXT 0x80C9 +#define GL_BLEND_DST_ALPHA_EXT 0x80CA +#define GL_BLEND_SRC_ALPHA_EXT 0x80CB +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GLEE_EXTERN PFNGLBLENDFUNCSEPARATEEXTPROC pglBlendFuncSeparateEXT; +#define glBlendFuncSeparateEXT pglBlendFuncSeparateEXT +#endif + +/* GL_INGR_color_clamp */ + +#ifndef GL_INGR_color_clamp +#define GL_INGR_color_clamp 1 +#define __GLEE_GL_INGR_color_clamp 1 +/* Constants */ +#define GL_RED_MIN_CLAMP_INGR 0x8560 +#define GL_GREEN_MIN_CLAMP_INGR 0x8561 +#define GL_BLUE_MIN_CLAMP_INGR 0x8562 +#define GL_ALPHA_MIN_CLAMP_INGR 0x8563 +#define GL_RED_MAX_CLAMP_INGR 0x8564 +#define GL_GREEN_MAX_CLAMP_INGR 0x8565 +#define GL_BLUE_MAX_CLAMP_INGR 0x8566 +#define GL_ALPHA_MAX_CLAMP_INGR 0x8567 +#endif + +/* GL_INGR_interlace_read */ + +#ifndef GL_INGR_interlace_read +#define GL_INGR_interlace_read 1 +#define __GLEE_GL_INGR_interlace_read 1 +/* Constants */ +#define GL_INTERLACE_READ_INGR 0x8568 +#endif + +/* GL_EXT_stencil_wrap */ + +#ifndef GL_EXT_stencil_wrap +#define GL_EXT_stencil_wrap 1 +#define __GLEE_GL_EXT_stencil_wrap 1 +/* Constants */ +#define GL_INCR_WRAP_EXT 0x8507 +#define GL_DECR_WRAP_EXT 0x8508 +#endif + +/* GL_EXT_422_pixels */ + +#ifndef GL_EXT_422_pixels +#define GL_EXT_422_pixels 1 +#define __GLEE_GL_EXT_422_pixels 1 +/* Constants */ +#define GL_422_EXT 0x80CC +#define GL_422_REV_EXT 0x80CD +#define GL_422_AVERAGE_EXT 0x80CE +#define GL_422_REV_AVERAGE_EXT 0x80CF +#endif + +/* GL_NV_texgen_reflection */ + +#ifndef GL_NV_texgen_reflection +#define GL_NV_texgen_reflection 1 +#define __GLEE_GL_NV_texgen_reflection 1 +/* Constants */ +#define GL_NORMAL_MAP_NV 0x8511 +#define GL_REFLECTION_MAP_NV 0x8512 +#endif + +/* GL_EXT_texture_cube_map */ + +#ifndef GL_EXT_texture_cube_map +#define GL_EXT_texture_cube_map 1 +#define __GLEE_GL_EXT_texture_cube_map 1 +/* Constants */ +#define GL_NORMAL_MAP_EXT 0x8511 +#define GL_REFLECTION_MAP_EXT 0x8512 +#define GL_TEXTURE_CUBE_MAP_EXT 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A +#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C +#endif + +/* GL_SUN_convolution_border_modes */ + +#ifndef GL_SUN_convolution_border_modes +#define GL_SUN_convolution_border_modes 1 +#define __GLEE_GL_SUN_convolution_border_modes 1 +/* Constants */ +#define GL_WRAP_BORDER_SUN 0x81D4 +#endif + +/* GL_EXT_texture_env_add */ + +#ifndef GL_EXT_texture_env_add +#define GL_EXT_texture_env_add 1 +#define __GLEE_GL_EXT_texture_env_add 1 +/* Constants */ +#endif + +/* GL_EXT_texture_lod_bias */ + +#ifndef GL_EXT_texture_lod_bias +#define GL_EXT_texture_lod_bias 1 +#define __GLEE_GL_EXT_texture_lod_bias 1 +/* Constants */ +#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD +#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 +#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 +#endif + +/* GL_EXT_texture_filter_anisotropic */ + +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#define __GLEE_GL_EXT_texture_filter_anisotropic 1 +/* Constants */ +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +/* GL_EXT_vertex_weighting */ + +#ifndef GL_EXT_vertex_weighting +#define GL_EXT_vertex_weighting 1 +#define __GLEE_GL_EXT_vertex_weighting 1 +/* Constants */ +#define GL_MODELVIEW0_STACK_DEPTH_EXT GL_MODELVIEW_STACK_DEPTH +#define GL_MODELVIEW1_STACK_DEPTH_EXT 0x8502 +#define GL_MODELVIEW0_MATRIX_EXT GL_MODELVIEW_MATRIX +#define GL_MODELVIEW1_MATRIX_EXT 0x8506 +#define GL_VERTEX_WEIGHTING_EXT 0x8509 +#define GL_MODELVIEW0_EXT GL_MODELVIEW +#define GL_MODELVIEW1_EXT 0x850A +#define GL_CURRENT_VERTEX_WEIGHT_EXT 0x850B +#define GL_VERTEX_WEIGHT_ARRAY_EXT 0x850C +#define GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT 0x850D +#define GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT 0x850E +#define GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT 0x850F +#define GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT 0x8510 +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFEXTPROC) (GLfloat weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTFVEXTPROC) (const GLfloat * weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTPOINTEREXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid * pointer); +GLEE_EXTERN PFNGLVERTEXWEIGHTFEXTPROC pglVertexWeightfEXT; +GLEE_EXTERN PFNGLVERTEXWEIGHTFVEXTPROC pglVertexWeightfvEXT; +GLEE_EXTERN PFNGLVERTEXWEIGHTPOINTEREXTPROC pglVertexWeightPointerEXT; +#define glVertexWeightfEXT pglVertexWeightfEXT +#define glVertexWeightfvEXT pglVertexWeightfvEXT +#define glVertexWeightPointerEXT pglVertexWeightPointerEXT +#endif + +/* GL_NV_light_max_exponent */ + +#ifndef GL_NV_light_max_exponent +#define GL_NV_light_max_exponent 1 +#define __GLEE_GL_NV_light_max_exponent 1 +/* Constants */ +#define GL_MAX_SHININESS_NV 0x8504 +#define GL_MAX_SPOT_EXPONENT_NV 0x8505 +#endif + +/* GL_NV_vertex_array_range */ + +#ifndef GL_NV_vertex_array_range +#define GL_NV_vertex_array_range 1 +#define __GLEE_GL_NV_vertex_array_range 1 +/* Constants */ +#define GL_VERTEX_ARRAY_RANGE_NV 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_NV 0x851E +#define GL_VERTEX_ARRAY_RANGE_VALID_NV 0x851F +#define GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV 0x8520 +#define GL_VERTEX_ARRAY_RANGE_POINTER_NV 0x8521 +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGENVPROC) (); +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGENVPROC) (GLsizei length, const GLvoid * pointer); +GLEE_EXTERN PFNGLFLUSHVERTEXARRAYRANGENVPROC pglFlushVertexArrayRangeNV; +GLEE_EXTERN PFNGLVERTEXARRAYRANGENVPROC pglVertexArrayRangeNV; +#define glFlushVertexArrayRangeNV pglFlushVertexArrayRangeNV +#define glVertexArrayRangeNV pglVertexArrayRangeNV +#endif + +/* GL_NV_register_combiners */ + +#ifndef GL_NV_register_combiners +#define GL_NV_register_combiners 1 +#define __GLEE_GL_NV_register_combiners 1 +/* Constants */ +#define GL_REGISTER_COMBINERS_NV 0x8522 +#define GL_VARIABLE_A_NV 0x8523 +#define GL_VARIABLE_B_NV 0x8524 +#define GL_VARIABLE_C_NV 0x8525 +#define GL_VARIABLE_D_NV 0x8526 +#define GL_VARIABLE_E_NV 0x8527 +#define GL_VARIABLE_F_NV 0x8528 +#define GL_VARIABLE_G_NV 0x8529 +#define GL_CONSTANT_COLOR0_NV 0x852A +#define GL_CONSTANT_COLOR1_NV 0x852B +#define GL_PRIMARY_COLOR_NV 0x852C +#define GL_SECONDARY_COLOR_NV 0x852D +#define GL_SPARE0_NV 0x852E +#define GL_SPARE1_NV 0x852F +#define GL_DISCARD_NV 0x8530 +#define GL_E_TIMES_F_NV 0x8531 +#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532 +#define GL_UNSIGNED_IDENTITY_NV 0x8536 +#define GL_UNSIGNED_INVERT_NV 0x8537 +#define GL_EXPAND_NORMAL_NV 0x8538 +#define GL_EXPAND_NEGATE_NV 0x8539 +#define GL_HALF_BIAS_NORMAL_NV 0x853A +#define GL_HALF_BIAS_NEGATE_NV 0x853B +#define GL_SIGNED_IDENTITY_NV 0x853C +#define GL_SIGNED_NEGATE_NV 0x853D +#define GL_SCALE_BY_TWO_NV 0x853E +#define GL_SCALE_BY_FOUR_NV 0x853F +#define GL_SCALE_BY_ONE_HALF_NV 0x8540 +#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541 +#define GL_COMBINER_INPUT_NV 0x8542 +#define GL_COMBINER_MAPPING_NV 0x8543 +#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544 +#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545 +#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546 +#define GL_COMBINER_MUX_SUM_NV 0x8547 +#define GL_COMBINER_SCALE_NV 0x8548 +#define GL_COMBINER_BIAS_NV 0x8549 +#define GL_COMBINER_AB_OUTPUT_NV 0x854A +#define GL_COMBINER_CD_OUTPUT_NV 0x854B +#define GL_COMBINER_SUM_OUTPUT_NV 0x854C +#define GL_MAX_GENERAL_COMBINERS_NV 0x854D +#define GL_NUM_GENERAL_COMBINERS_NV 0x854E +#define GL_COLOR_SUM_CLAMP_NV 0x854F +#define GL_COMBINER0_NV 0x8550 +#define GL_COMBINER1_NV 0x8551 +#define GL_COMBINER2_NV 0x8552 +#define GL_COMBINER3_NV 0x8553 +#define GL_COMBINER4_NV 0x8554 +#define GL_COMBINER5_NV 0x8555 +#define GL_COMBINER6_NV 0x8556 +#define GL_COMBINER7_NV 0x8557 +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (APIENTRYP PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint * params); +GLEE_EXTERN PFNGLCOMBINERPARAMETERFVNVPROC pglCombinerParameterfvNV; +GLEE_EXTERN PFNGLCOMBINERPARAMETERFNVPROC pglCombinerParameterfNV; +GLEE_EXTERN PFNGLCOMBINERPARAMETERIVNVPROC pglCombinerParameterivNV; +GLEE_EXTERN PFNGLCOMBINERPARAMETERINVPROC pglCombinerParameteriNV; +GLEE_EXTERN PFNGLCOMBINERINPUTNVPROC pglCombinerInputNV; +GLEE_EXTERN PFNGLCOMBINEROUTPUTNVPROC pglCombinerOutputNV; +GLEE_EXTERN PFNGLFINALCOMBINERINPUTNVPROC pglFinalCombinerInputNV; +GLEE_EXTERN PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC pglGetCombinerInputParameterfvNV; +GLEE_EXTERN PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC pglGetCombinerInputParameterivNV; +GLEE_EXTERN PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC pglGetCombinerOutputParameterfvNV; +GLEE_EXTERN PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC pglGetCombinerOutputParameterivNV; +GLEE_EXTERN PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC pglGetFinalCombinerInputParameterfvNV; +GLEE_EXTERN PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC pglGetFinalCombinerInputParameterivNV; +#define glCombinerParameterfvNV pglCombinerParameterfvNV +#define glCombinerParameterfNV pglCombinerParameterfNV +#define glCombinerParameterivNV pglCombinerParameterivNV +#define glCombinerParameteriNV pglCombinerParameteriNV +#define glCombinerInputNV pglCombinerInputNV +#define glCombinerOutputNV pglCombinerOutputNV +#define glFinalCombinerInputNV pglFinalCombinerInputNV +#define glGetCombinerInputParameterfvNV pglGetCombinerInputParameterfvNV +#define glGetCombinerInputParameterivNV pglGetCombinerInputParameterivNV +#define glGetCombinerOutputParameterfvNV pglGetCombinerOutputParameterfvNV +#define glGetCombinerOutputParameterivNV pglGetCombinerOutputParameterivNV +#define glGetFinalCombinerInputParameterfvNV pglGetFinalCombinerInputParameterfvNV +#define glGetFinalCombinerInputParameterivNV pglGetFinalCombinerInputParameterivNV +#endif + +/* GL_NV_fog_distance */ + +#ifndef GL_NV_fog_distance +#define GL_NV_fog_distance 1 +#define __GLEE_GL_NV_fog_distance 1 +/* Constants */ +#define GL_FOG_DISTANCE_MODE_NV 0x855A +#define GL_EYE_RADIAL_NV 0x855B +#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C +#endif + +/* GL_NV_texgen_emboss */ + +#ifndef GL_NV_texgen_emboss +#define GL_NV_texgen_emboss 1 +#define __GLEE_GL_NV_texgen_emboss 1 +/* Constants */ +#define GL_EMBOSS_LIGHT_NV 0x855D +#define GL_EMBOSS_CONSTANT_NV 0x855E +#define GL_EMBOSS_MAP_NV 0x855F +#endif + +/* GL_NV_blend_square */ + +#ifndef GL_NV_blend_square +#define GL_NV_blend_square 1 +#define __GLEE_GL_NV_blend_square 1 +/* Constants */ +#endif + +/* GL_NV_texture_env_combine4 */ + +#ifndef GL_NV_texture_env_combine4 +#define GL_NV_texture_env_combine4 1 +#define __GLEE_GL_NV_texture_env_combine4 1 +/* Constants */ +#define GL_COMBINE4_NV 0x8503 +#define GL_SOURCE3_RGB_NV 0x8583 +#define GL_SOURCE3_ALPHA_NV 0x858B +#define GL_OPERAND3_RGB_NV 0x8593 +#define GL_OPERAND3_ALPHA_NV 0x859B +#endif + +/* GL_MESA_resize_buffers */ + +#ifndef GL_MESA_resize_buffers +#define GL_MESA_resize_buffers 1 +#define __GLEE_GL_MESA_resize_buffers 1 +/* Constants */ +typedef void (APIENTRYP PFNGLRESIZEBUFFERSMESAPROC) (); +GLEE_EXTERN PFNGLRESIZEBUFFERSMESAPROC pglResizeBuffersMESA; +#define glResizeBuffersMESA pglResizeBuffersMESA +#endif + +/* GL_MESA_window_pos */ + +#ifndef GL_MESA_window_pos +#define GL_MESA_window_pos 1 +#define __GLEE_GL_MESA_window_pos 1 +/* Constants */ +typedef void (APIENTRYP PFNGLWINDOWPOS2DMESAPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLWINDOWPOS2DVMESAPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLWINDOWPOS2FMESAPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLWINDOWPOS2FVMESAPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLWINDOWPOS2IMESAPROC) (GLint x, GLint y); +typedef void (APIENTRYP PFNGLWINDOWPOS2IVMESAPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLWINDOWPOS2SMESAPROC) (GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLWINDOWPOS2SVMESAPROC) (const GLshort * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3DMESAPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLWINDOWPOS3DVMESAPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3FMESAPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLWINDOWPOS3FVMESAPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3IMESAPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLWINDOWPOS3IVMESAPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLWINDOWPOS3SMESAPROC) (GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLWINDOWPOS3SVMESAPROC) (const GLshort * v); +typedef void (APIENTRYP PFNGLWINDOWPOS4DMESAPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble * v); +typedef void (APIENTRYP PFNGLWINDOWPOS4FMESAPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLWINDOWPOS4FVMESAPROC) (const GLfloat * v); +typedef void (APIENTRYP PFNGLWINDOWPOS4IMESAPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLWINDOWPOS4IVMESAPROC) (const GLint * v); +typedef void (APIENTRYP PFNGLWINDOWPOS4SMESAPROC) (GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLWINDOWPOS4SVMESAPROC) (const GLshort * v); +GLEE_EXTERN PFNGLWINDOWPOS2DMESAPROC pglWindowPos2dMESA; +GLEE_EXTERN PFNGLWINDOWPOS2DVMESAPROC pglWindowPos2dvMESA; +GLEE_EXTERN PFNGLWINDOWPOS2FMESAPROC pglWindowPos2fMESA; +GLEE_EXTERN PFNGLWINDOWPOS2FVMESAPROC pglWindowPos2fvMESA; +GLEE_EXTERN PFNGLWINDOWPOS2IMESAPROC pglWindowPos2iMESA; +GLEE_EXTERN PFNGLWINDOWPOS2IVMESAPROC pglWindowPos2ivMESA; +GLEE_EXTERN PFNGLWINDOWPOS2SMESAPROC pglWindowPos2sMESA; +GLEE_EXTERN PFNGLWINDOWPOS2SVMESAPROC pglWindowPos2svMESA; +GLEE_EXTERN PFNGLWINDOWPOS3DMESAPROC pglWindowPos3dMESA; +GLEE_EXTERN PFNGLWINDOWPOS3DVMESAPROC pglWindowPos3dvMESA; +GLEE_EXTERN PFNGLWINDOWPOS3FMESAPROC pglWindowPos3fMESA; +GLEE_EXTERN PFNGLWINDOWPOS3FVMESAPROC pglWindowPos3fvMESA; +GLEE_EXTERN PFNGLWINDOWPOS3IMESAPROC pglWindowPos3iMESA; +GLEE_EXTERN PFNGLWINDOWPOS3IVMESAPROC pglWindowPos3ivMESA; +GLEE_EXTERN PFNGLWINDOWPOS3SMESAPROC pglWindowPos3sMESA; +GLEE_EXTERN PFNGLWINDOWPOS3SVMESAPROC pglWindowPos3svMESA; +GLEE_EXTERN PFNGLWINDOWPOS4DMESAPROC pglWindowPos4dMESA; +GLEE_EXTERN PFNGLWINDOWPOS4DVMESAPROC pglWindowPos4dvMESA; +GLEE_EXTERN PFNGLWINDOWPOS4FMESAPROC pglWindowPos4fMESA; +GLEE_EXTERN PFNGLWINDOWPOS4FVMESAPROC pglWindowPos4fvMESA; +GLEE_EXTERN PFNGLWINDOWPOS4IMESAPROC pglWindowPos4iMESA; +GLEE_EXTERN PFNGLWINDOWPOS4IVMESAPROC pglWindowPos4ivMESA; +GLEE_EXTERN PFNGLWINDOWPOS4SMESAPROC pglWindowPos4sMESA; +GLEE_EXTERN PFNGLWINDOWPOS4SVMESAPROC pglWindowPos4svMESA; +#define glWindowPos2dMESA pglWindowPos2dMESA +#define glWindowPos2dvMESA pglWindowPos2dvMESA +#define glWindowPos2fMESA pglWindowPos2fMESA +#define glWindowPos2fvMESA pglWindowPos2fvMESA +#define glWindowPos2iMESA pglWindowPos2iMESA +#define glWindowPos2ivMESA pglWindowPos2ivMESA +#define glWindowPos2sMESA pglWindowPos2sMESA +#define glWindowPos2svMESA pglWindowPos2svMESA +#define glWindowPos3dMESA pglWindowPos3dMESA +#define glWindowPos3dvMESA pglWindowPos3dvMESA +#define glWindowPos3fMESA pglWindowPos3fMESA +#define glWindowPos3fvMESA pglWindowPos3fvMESA +#define glWindowPos3iMESA pglWindowPos3iMESA +#define glWindowPos3ivMESA pglWindowPos3ivMESA +#define glWindowPos3sMESA pglWindowPos3sMESA +#define glWindowPos3svMESA pglWindowPos3svMESA +#define glWindowPos4dMESA pglWindowPos4dMESA +#define glWindowPos4dvMESA pglWindowPos4dvMESA +#define glWindowPos4fMESA pglWindowPos4fMESA +#define glWindowPos4fvMESA pglWindowPos4fvMESA +#define glWindowPos4iMESA pglWindowPos4iMESA +#define glWindowPos4ivMESA pglWindowPos4ivMESA +#define glWindowPos4sMESA pglWindowPos4sMESA +#define glWindowPos4svMESA pglWindowPos4svMESA +#endif + +/* GL_EXT_texture_compression_s3tc */ + +#ifndef GL_EXT_texture_compression_s3tc +#define GL_EXT_texture_compression_s3tc 1 +#define __GLEE_GL_EXT_texture_compression_s3tc 1 +/* Constants */ +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2 +#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3 +#endif + +/* GL_IBM_cull_vertex */ + +#ifndef GL_IBM_cull_vertex +#define GL_IBM_cull_vertex 1 +#define __GLEE_GL_IBM_cull_vertex 1 +/* Constants */ +#define GL_CULL_VERTEX_IBM 103050 +#endif + +/* GL_IBM_multimode_draw_arrays */ + +#ifndef GL_IBM_multimode_draw_arrays +#define GL_IBM_multimode_draw_arrays 1 +#define __GLEE_GL_IBM_multimode_draw_arrays 1 +/* Constants */ +typedef void (APIENTRYP PFNGLMULTIMODEDRAWARRAYSIBMPROC) (const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride); +typedef void (APIENTRYP PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (const GLenum * mode, const GLsizei * count, GLenum type, const GLvoid* const * indices, GLsizei primcount, GLint modestride); +GLEE_EXTERN PFNGLMULTIMODEDRAWARRAYSIBMPROC pglMultiModeDrawArraysIBM; +GLEE_EXTERN PFNGLMULTIMODEDRAWELEMENTSIBMPROC pglMultiModeDrawElementsIBM; +#define glMultiModeDrawArraysIBM pglMultiModeDrawArraysIBM +#define glMultiModeDrawElementsIBM pglMultiModeDrawElementsIBM +#endif + +/* GL_IBM_vertex_array_lists */ + +#ifndef GL_IBM_vertex_array_lists +#define GL_IBM_vertex_array_lists 1 +#define __GLEE_GL_IBM_vertex_array_lists 1 +/* Constants */ +#define GL_VERTEX_ARRAY_LIST_IBM 103070 +#define GL_NORMAL_ARRAY_LIST_IBM 103071 +#define GL_COLOR_ARRAY_LIST_IBM 103072 +#define GL_INDEX_ARRAY_LIST_IBM 103073 +#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074 +#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075 +#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076 +#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077 +#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080 +#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081 +#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082 +#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083 +#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084 +#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085 +#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086 +#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087 +typedef void (APIENTRYP PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean* * pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride); +typedef void (APIENTRYP PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid* * pointer, GLint ptrstride); +GLEE_EXTERN PFNGLCOLORPOINTERLISTIBMPROC pglColorPointerListIBM; +GLEE_EXTERN PFNGLSECONDARYCOLORPOINTERLISTIBMPROC pglSecondaryColorPointerListIBM; +GLEE_EXTERN PFNGLEDGEFLAGPOINTERLISTIBMPROC pglEdgeFlagPointerListIBM; +GLEE_EXTERN PFNGLFOGCOORDPOINTERLISTIBMPROC pglFogCoordPointerListIBM; +GLEE_EXTERN PFNGLINDEXPOINTERLISTIBMPROC pglIndexPointerListIBM; +GLEE_EXTERN PFNGLNORMALPOINTERLISTIBMPROC pglNormalPointerListIBM; +GLEE_EXTERN PFNGLTEXCOORDPOINTERLISTIBMPROC pglTexCoordPointerListIBM; +GLEE_EXTERN PFNGLVERTEXPOINTERLISTIBMPROC pglVertexPointerListIBM; +#define glColorPointerListIBM pglColorPointerListIBM +#define glSecondaryColorPointerListIBM pglSecondaryColorPointerListIBM +#define glEdgeFlagPointerListIBM pglEdgeFlagPointerListIBM +#define glFogCoordPointerListIBM pglFogCoordPointerListIBM +#define glIndexPointerListIBM pglIndexPointerListIBM +#define glNormalPointerListIBM pglNormalPointerListIBM +#define glTexCoordPointerListIBM pglTexCoordPointerListIBM +#define glVertexPointerListIBM pglVertexPointerListIBM +#endif + +/* GL_SGIX_subsample */ + +#ifndef GL_SGIX_subsample +#define GL_SGIX_subsample 1 +#define __GLEE_GL_SGIX_subsample 1 +/* Constants */ +#define GL_PACK_SUBSAMPLE_RATE_SGIX 0x85A0 +#define GL_UNPACK_SUBSAMPLE_RATE_SGIX 0x85A1 +#define GL_PIXEL_SUBSAMPLE_4444_SGIX 0x85A2 +#define GL_PIXEL_SUBSAMPLE_2424_SGIX 0x85A3 +#define GL_PIXEL_SUBSAMPLE_4242_SGIX 0x85A4 +#endif + +/* GL_SGIX_ycrcb_subsample */ + +#ifndef GL_SGIX_ycrcb_subsample +#define GL_SGIX_ycrcb_subsample 1 +#define __GLEE_GL_SGIX_ycrcb_subsample 1 +/* Constants */ +#endif + +/* GL_SGIX_ycrcba */ + +#ifndef GL_SGIX_ycrcba +#define GL_SGIX_ycrcba 1 +#define __GLEE_GL_SGIX_ycrcba 1 +/* Constants */ +#define GL_YCRCB_SGIX 0x8318 +#define GL_YCRCBA_SGIX 0x8319 +#endif + +/* GL_SGI_depth_pass_instrument */ + +#ifndef GL_SGI_depth_pass_instrument +#define GL_SGI_depth_pass_instrument 1 +#define __GLEE_GL_SGI_depth_pass_instrument 1 +/* Constants */ +#define GL_DEPTH_PASS_INSTRUMENT_SGIX 0x8310 +#define GL_DEPTH_PASS_INSTRUMENT_COUNTERS_SGIX 0x8311 +#define GL_DEPTH_PASS_INSTRUMENT_MAX_SGIX 0x8312 +#endif + +/* GL_3DFX_texture_compression_FXT1 */ + +#ifndef GL_3DFX_texture_compression_FXT1 +#define GL_3DFX_texture_compression_FXT1 1 +#define __GLEE_GL_3DFX_texture_compression_FXT1 1 +/* Constants */ +#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0 +#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1 +#endif + +/* GL_3DFX_multisample */ + +#ifndef GL_3DFX_multisample +#define GL_3DFX_multisample 1 +#define __GLEE_GL_3DFX_multisample 1 +/* Constants */ +#define GL_MULTISAMPLE_3DFX 0x86B2 +#define GL_SAMPLE_BUFFERS_3DFX 0x86B3 +#define GL_SAMPLES_3DFX 0x86B4 +#define GL_MULTISAMPLE_BIT_3DFX 0x20000000 +#endif + +/* GL_3DFX_tbuffer */ + +#ifndef GL_3DFX_tbuffer +#define GL_3DFX_tbuffer 1 +#define __GLEE_GL_3DFX_tbuffer 1 +/* Constants */ +typedef void (APIENTRYP PFNGLTBUFFERMASK3DFXPROC) (GLuint mask); +GLEE_EXTERN PFNGLTBUFFERMASK3DFXPROC pglTbufferMask3DFX; +#define glTbufferMask3DFX pglTbufferMask3DFX +#endif + +/* GL_EXT_multisample */ + +#ifndef GL_EXT_multisample +#define GL_EXT_multisample 1 +#define __GLEE_GL_EXT_multisample 1 +/* Constants */ +#define GL_MULTISAMPLE_EXT 0x809D +#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E +#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F +#define GL_SAMPLE_MASK_EXT 0x80A0 +#define GL_1PASS_EXT 0x80A1 +#define GL_2PASS_0_EXT 0x80A2 +#define GL_2PASS_1_EXT 0x80A3 +#define GL_4PASS_0_EXT 0x80A4 +#define GL_4PASS_1_EXT 0x80A5 +#define GL_4PASS_2_EXT 0x80A6 +#define GL_4PASS_3_EXT 0x80A7 +#define GL_SAMPLE_BUFFERS_EXT 0x80A8 +#define GL_SAMPLES_EXT 0x80A9 +#define GL_SAMPLE_MASK_VALUE_EXT 0x80AA +#define GL_SAMPLE_MASK_INVERT_EXT 0x80AB +#define GL_SAMPLE_PATTERN_EXT 0x80AC +#define GL_MULTISAMPLE_BIT_EXT 0x20000000 +typedef void (APIENTRYP PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert); +typedef void (APIENTRYP PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern); +GLEE_EXTERN PFNGLSAMPLEMASKEXTPROC pglSampleMaskEXT; +GLEE_EXTERN PFNGLSAMPLEPATTERNEXTPROC pglSamplePatternEXT; +#define glSampleMaskEXT pglSampleMaskEXT +#define glSamplePatternEXT pglSamplePatternEXT +#endif + +/* GL_SGIX_vertex_preclip */ + +#ifndef GL_SGIX_vertex_preclip +#define GL_SGIX_vertex_preclip 1 +#define __GLEE_GL_SGIX_vertex_preclip 1 +/* Constants */ +#define GL_VERTEX_PRECLIP_SGIX 0x83EE +#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF +#endif + +/* GL_SGIX_convolution_accuracy */ + +#ifndef GL_SGIX_convolution_accuracy +#define GL_SGIX_convolution_accuracy 1 +#define __GLEE_GL_SGIX_convolution_accuracy 1 +/* Constants */ +#define GL_CONVOLUTION_HINT_SGIX 0x8316 +#endif + +/* GL_SGIX_resample */ + +#ifndef GL_SGIX_resample +#define GL_SGIX_resample 1 +#define __GLEE_GL_SGIX_resample 1 +/* Constants */ +#define GL_PACK_RESAMPLE_SGIX 0x842C +#define GL_UNPACK_RESAMPLE_SGIX 0x842D +#define GL_RESAMPLE_REPLICATE_SGIX 0x842E +#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F +#define GL_RESAMPLE_DECIMATE_SGIX 0x8430 +#endif + +/* GL_SGIS_point_line_texgen */ + +#ifndef GL_SGIS_point_line_texgen +#define GL_SGIS_point_line_texgen 1 +#define __GLEE_GL_SGIS_point_line_texgen 1 +/* Constants */ +#define GL_EYE_DISTANCE_TO_POINT_SGIS 0x81F0 +#define GL_OBJECT_DISTANCE_TO_POINT_SGIS 0x81F1 +#define GL_EYE_DISTANCE_TO_LINE_SGIS 0x81F2 +#define GL_OBJECT_DISTANCE_TO_LINE_SGIS 0x81F3 +#define GL_EYE_POINT_SGIS 0x81F4 +#define GL_OBJECT_POINT_SGIS 0x81F5 +#define GL_EYE_LINE_SGIS 0x81F6 +#define GL_OBJECT_LINE_SGIS 0x81F7 +#endif + +/* GL_SGIS_texture_color_mask */ + +#ifndef GL_SGIS_texture_color_mask +#define GL_SGIS_texture_color_mask 1 +#define __GLEE_GL_SGIS_texture_color_mask 1 +/* Constants */ +#define GL_TEXTURE_COLOR_WRITEMASK_SGIS 0x81EF +typedef void (APIENTRYP PFNGLTEXTURECOLORMASKSGISPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GLEE_EXTERN PFNGLTEXTURECOLORMASKSGISPROC pglTextureColorMaskSGIS; +#define glTextureColorMaskSGIS pglTextureColorMaskSGIS +#endif + +/* GL_EXT_texture_env_dot3 */ + +#ifndef GL_EXT_texture_env_dot3 +#define GL_EXT_texture_env_dot3 1 +#define __GLEE_GL_EXT_texture_env_dot3 1 +/* Constants */ +#define GL_DOT3_RGB_EXT 0x8740 +#define GL_DOT3_RGBA_EXT 0x8741 +#endif + +/* GL_ATI_texture_mirror_once */ + +#ifndef GL_ATI_texture_mirror_once +#define GL_ATI_texture_mirror_once 1 +#define __GLEE_GL_ATI_texture_mirror_once 1 +/* Constants */ +#define GL_MIRROR_CLAMP_ATI 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743 +#endif + +/* GL_NV_fence */ + +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#define __GLEE_GL_NV_fence 1 +/* Constants */ +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +typedef void (APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint * fences); +typedef void (APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint * fences); +typedef GLboolean (APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +GLEE_EXTERN PFNGLDELETEFENCESNVPROC pglDeleteFencesNV; +GLEE_EXTERN PFNGLGENFENCESNVPROC pglGenFencesNV; +GLEE_EXTERN PFNGLISFENCENVPROC pglIsFenceNV; +GLEE_EXTERN PFNGLTESTFENCENVPROC pglTestFenceNV; +GLEE_EXTERN PFNGLGETFENCEIVNVPROC pglGetFenceivNV; +GLEE_EXTERN PFNGLFINISHFENCENVPROC pglFinishFenceNV; +GLEE_EXTERN PFNGLSETFENCENVPROC pglSetFenceNV; +#define glDeleteFencesNV pglDeleteFencesNV +#define glGenFencesNV pglGenFencesNV +#define glIsFenceNV pglIsFenceNV +#define glTestFenceNV pglTestFenceNV +#define glGetFenceivNV pglGetFenceivNV +#define glFinishFenceNV pglFinishFenceNV +#define glSetFenceNV pglSetFenceNV +#endif + +/* GL_IBM_texture_mirrored_repeat */ + +#ifndef GL_IBM_texture_mirrored_repeat +#define GL_IBM_texture_mirrored_repeat 1 +#define __GLEE_GL_IBM_texture_mirrored_repeat 1 +/* Constants */ +#define GL_MIRRORED_REPEAT_IBM 0x8370 +#endif + +/* GL_NV_evaluators */ + +#ifndef GL_NV_evaluators +#define GL_NV_evaluators 1 +#define __GLEE_GL_NV_evaluators 1 +/* Constants */ +#define GL_EVAL_2D_NV 0x86C0 +#define GL_EVAL_TRIANGULAR_2D_NV 0x86C1 +#define GL_MAP_TESSELLATION_NV 0x86C2 +#define GL_MAP_ATTRIB_U_ORDER_NV 0x86C3 +#define GL_MAP_ATTRIB_V_ORDER_NV 0x86C4 +#define GL_EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 +#define GL_EVAL_VERTEX_ATTRIB0_NV 0x86C6 +#define GL_EVAL_VERTEX_ATTRIB1_NV 0x86C7 +#define GL_EVAL_VERTEX_ATTRIB2_NV 0x86C8 +#define GL_EVAL_VERTEX_ATTRIB3_NV 0x86C9 +#define GL_EVAL_VERTEX_ATTRIB4_NV 0x86CA +#define GL_EVAL_VERTEX_ATTRIB5_NV 0x86CB +#define GL_EVAL_VERTEX_ATTRIB6_NV 0x86CC +#define GL_EVAL_VERTEX_ATTRIB7_NV 0x86CD +#define GL_EVAL_VERTEX_ATTRIB8_NV 0x86CE +#define GL_EVAL_VERTEX_ATTRIB9_NV 0x86CF +#define GL_EVAL_VERTEX_ATTRIB10_NV 0x86D0 +#define GL_EVAL_VERTEX_ATTRIB11_NV 0x86D1 +#define GL_EVAL_VERTEX_ATTRIB12_NV 0x86D2 +#define GL_EVAL_VERTEX_ATTRIB13_NV 0x86D3 +#define GL_EVAL_VERTEX_ATTRIB14_NV 0x86D4 +#define GL_EVAL_VERTEX_ATTRIB15_NV 0x86D5 +#define GL_MAX_MAP_TESSELLATION_NV 0x86D6 +#define GL_MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 +typedef void (APIENTRYP PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid * points); +typedef void (APIENTRYP PFNGLMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLGETMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid * points); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERIVNVPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERIVNVPROC) (GLenum target, GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETMAPATTRIBPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode); +GLEE_EXTERN PFNGLMAPCONTROLPOINTSNVPROC pglMapControlPointsNV; +GLEE_EXTERN PFNGLMAPPARAMETERIVNVPROC pglMapParameterivNV; +GLEE_EXTERN PFNGLMAPPARAMETERFVNVPROC pglMapParameterfvNV; +GLEE_EXTERN PFNGLGETMAPCONTROLPOINTSNVPROC pglGetMapControlPointsNV; +GLEE_EXTERN PFNGLGETMAPPARAMETERIVNVPROC pglGetMapParameterivNV; +GLEE_EXTERN PFNGLGETMAPPARAMETERFVNVPROC pglGetMapParameterfvNV; +GLEE_EXTERN PFNGLGETMAPATTRIBPARAMETERIVNVPROC pglGetMapAttribParameterivNV; +GLEE_EXTERN PFNGLGETMAPATTRIBPARAMETERFVNVPROC pglGetMapAttribParameterfvNV; +GLEE_EXTERN PFNGLEVALMAPSNVPROC pglEvalMapsNV; +#define glMapControlPointsNV pglMapControlPointsNV +#define glMapParameterivNV pglMapParameterivNV +#define glMapParameterfvNV pglMapParameterfvNV +#define glGetMapControlPointsNV pglGetMapControlPointsNV +#define glGetMapParameterivNV pglGetMapParameterivNV +#define glGetMapParameterfvNV pglGetMapParameterfvNV +#define glGetMapAttribParameterivNV pglGetMapAttribParameterivNV +#define glGetMapAttribParameterfvNV pglGetMapAttribParameterfvNV +#define glEvalMapsNV pglEvalMapsNV +#endif + +/* GL_NV_packed_depth_stencil */ + +#ifndef GL_NV_packed_depth_stencil +#define GL_NV_packed_depth_stencil 1 +#define __GLEE_GL_NV_packed_depth_stencil 1 +/* Constants */ +#define GL_DEPTH_STENCIL_NV 0x84F9 +#define GL_UNSIGNED_INT_24_8_NV 0x84FA +#endif + +/* GL_NV_register_combiners2 */ + +#ifndef GL_NV_register_combiners2 +#define GL_NV_register_combiners2 1 +#define __GLEE_GL_NV_register_combiners2 1 +/* Constants */ +#define GL_PER_STAGE_CONSTANTS_NV 0x8535 +typedef void (APIENTRYP PFNGLCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat * params); +typedef void (APIENTRYP PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat * params); +GLEE_EXTERN PFNGLCOMBINERSTAGEPARAMETERFVNVPROC pglCombinerStageParameterfvNV; +GLEE_EXTERN PFNGLGETCOMBINERSTAGEPARAMETERFVNVPROC pglGetCombinerStageParameterfvNV; +#define glCombinerStageParameterfvNV pglCombinerStageParameterfvNV +#define glGetCombinerStageParameterfvNV pglGetCombinerStageParameterfvNV +#endif + +/* GL_NV_texture_compression_vtc */ + +#ifndef GL_NV_texture_compression_vtc +#define GL_NV_texture_compression_vtc 1 +#define __GLEE_GL_NV_texture_compression_vtc 1 +/* Constants */ +#endif + +/* GL_NV_texture_rectangle */ + +#ifndef GL_NV_texture_rectangle +#define GL_NV_texture_rectangle 1 +#define __GLEE_GL_NV_texture_rectangle 1 +/* Constants */ +#define GL_TEXTURE_RECTANGLE_NV 0x84F5 +#define GL_TEXTURE_BINDING_RECTANGLE_NV 0x84F6 +#define GL_PROXY_TEXTURE_RECTANGLE_NV 0x84F7 +#define GL_MAX_RECTANGLE_TEXTURE_SIZE_NV 0x84F8 +#endif + +/* GL_NV_texture_shader */ + +#ifndef GL_NV_texture_shader +#define GL_NV_texture_shader 1 +#define __GLEE_GL_NV_texture_shader 1 +/* Constants */ +#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C +#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D +#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E +#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9 +#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA +#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB +#define GL_DSDT_MAG_INTENSITY_NV 0x86DC +#define GL_SHADER_CONSISTENT_NV 0x86DD +#define GL_TEXTURE_SHADER_NV 0x86DE +#define GL_SHADER_OPERATION_NV 0x86DF +#define GL_CULL_MODES_NV 0x86E0 +#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1 +#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2 +#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3 +#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV +#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV +#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV +#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4 +#define GL_CONST_EYE_NV 0x86E5 +#define GL_PASS_THROUGH_NV 0x86E6 +#define GL_CULL_FRAGMENT_NV 0x86E7 +#define GL_OFFSET_TEXTURE_2D_NV 0x86E8 +#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9 +#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA +#define GL_DOT_PRODUCT_NV 0x86EC +#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED +#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE +#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0 +#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1 +#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2 +#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3 +#define GL_HILO_NV 0x86F4 +#define GL_DSDT_NV 0x86F5 +#define GL_DSDT_MAG_NV 0x86F6 +#define GL_DSDT_MAG_VIB_NV 0x86F7 +#define GL_HILO16_NV 0x86F8 +#define GL_SIGNED_HILO_NV 0x86F9 +#define GL_SIGNED_HILO16_NV 0x86FA +#define GL_SIGNED_RGBA_NV 0x86FB +#define GL_SIGNED_RGBA8_NV 0x86FC +#define GL_SIGNED_RGB_NV 0x86FE +#define GL_SIGNED_RGB8_NV 0x86FF +#define GL_SIGNED_LUMINANCE_NV 0x8701 +#define GL_SIGNED_LUMINANCE8_NV 0x8702 +#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703 +#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704 +#define GL_SIGNED_ALPHA_NV 0x8705 +#define GL_SIGNED_ALPHA8_NV 0x8706 +#define GL_SIGNED_INTENSITY_NV 0x8707 +#define GL_SIGNED_INTENSITY8_NV 0x8708 +#define GL_DSDT8_NV 0x8709 +#define GL_DSDT8_MAG8_NV 0x870A +#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B +#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C +#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D +#define GL_HI_SCALE_NV 0x870E +#define GL_LO_SCALE_NV 0x870F +#define GL_DS_SCALE_NV 0x8710 +#define GL_DT_SCALE_NV 0x8711 +#define GL_MAGNITUDE_SCALE_NV 0x8712 +#define GL_VIBRANCE_SCALE_NV 0x8713 +#define GL_HI_BIAS_NV 0x8714 +#define GL_LO_BIAS_NV 0x8715 +#define GL_DS_BIAS_NV 0x8716 +#define GL_DT_BIAS_NV 0x8717 +#define GL_MAGNITUDE_BIAS_NV 0x8718 +#define GL_VIBRANCE_BIAS_NV 0x8719 +#define GL_TEXTURE_BORDER_VALUES_NV 0x871A +#define GL_TEXTURE_HI_SIZE_NV 0x871B +#define GL_TEXTURE_LO_SIZE_NV 0x871C +#define GL_TEXTURE_DS_SIZE_NV 0x871D +#define GL_TEXTURE_DT_SIZE_NV 0x871E +#define GL_TEXTURE_MAG_SIZE_NV 0x871F +#endif + +/* GL_NV_texture_shader2 */ + +#ifndef GL_NV_texture_shader2 +#define GL_NV_texture_shader2 1 +#define __GLEE_GL_NV_texture_shader2 1 +/* Constants */ +#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF +#endif + +/* GL_NV_vertex_array_range2 */ + +#ifndef GL_NV_vertex_array_range2 +#define GL_NV_vertex_array_range2 1 +#define __GLEE_GL_NV_vertex_array_range2 1 +/* Constants */ +#define GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV 0x8533 +#endif + +/* GL_NV_vertex_program */ + +#ifndef GL_NV_vertex_program +#define GL_NV_vertex_program 1 +#define __GLEE_GL_NV_vertex_program 1 +/* Constants */ +#define GL_VERTEX_PROGRAM_NV 0x8620 +#define GL_VERTEX_STATE_PROGRAM_NV 0x8621 +#define GL_ATTRIB_ARRAY_SIZE_NV 0x8623 +#define GL_ATTRIB_ARRAY_STRIDE_NV 0x8624 +#define GL_ATTRIB_ARRAY_TYPE_NV 0x8625 +#define GL_CURRENT_ATTRIB_NV 0x8626 +#define GL_PROGRAM_LENGTH_NV 0x8627 +#define GL_PROGRAM_STRING_NV 0x8628 +#define GL_MODELVIEW_PROJECTION_NV 0x8629 +#define GL_IDENTITY_NV 0x862A +#define GL_INVERSE_NV 0x862B +#define GL_TRANSPOSE_NV 0x862C +#define GL_INVERSE_TRANSPOSE_NV 0x862D +#define GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV 0x862E +#define GL_MAX_TRACK_MATRICES_NV 0x862F +#define GL_MATRIX0_NV 0x8630 +#define GL_MATRIX1_NV 0x8631 +#define GL_MATRIX2_NV 0x8632 +#define GL_MATRIX3_NV 0x8633 +#define GL_MATRIX4_NV 0x8634 +#define GL_MATRIX5_NV 0x8635 +#define GL_MATRIX6_NV 0x8636 +#define GL_MATRIX7_NV 0x8637 +#define GL_CURRENT_MATRIX_STACK_DEPTH_NV 0x8640 +#define GL_CURRENT_MATRIX_NV 0x8641 +#define GL_VERTEX_PROGRAM_POINT_SIZE_NV 0x8642 +#define GL_VERTEX_PROGRAM_TWO_SIDE_NV 0x8643 +#define GL_PROGRAM_PARAMETER_NV 0x8644 +#define GL_ATTRIB_ARRAY_POINTER_NV 0x8645 +#define GL_PROGRAM_TARGET_NV 0x8646 +#define GL_PROGRAM_RESIDENT_NV 0x8647 +#define GL_TRACK_MATRIX_NV 0x8648 +#define GL_TRACK_MATRIX_TRANSFORM_NV 0x8649 +#define GL_VERTEX_PROGRAM_BINDING_NV 0x864A +#define GL_PROGRAM_ERROR_POSITION_NV 0x864B +#define GL_VERTEX_ATTRIB_ARRAY0_NV 0x8650 +#define GL_VERTEX_ATTRIB_ARRAY1_NV 0x8651 +#define GL_VERTEX_ATTRIB_ARRAY2_NV 0x8652 +#define GL_VERTEX_ATTRIB_ARRAY3_NV 0x8653 +#define GL_VERTEX_ATTRIB_ARRAY4_NV 0x8654 +#define GL_VERTEX_ATTRIB_ARRAY5_NV 0x8655 +#define GL_VERTEX_ATTRIB_ARRAY6_NV 0x8656 +#define GL_VERTEX_ATTRIB_ARRAY7_NV 0x8657 +#define GL_VERTEX_ATTRIB_ARRAY8_NV 0x8658 +#define GL_VERTEX_ATTRIB_ARRAY9_NV 0x8659 +#define GL_VERTEX_ATTRIB_ARRAY10_NV 0x865A +#define GL_VERTEX_ATTRIB_ARRAY11_NV 0x865B +#define GL_VERTEX_ATTRIB_ARRAY12_NV 0x865C +#define GL_VERTEX_ATTRIB_ARRAY13_NV 0x865D +#define GL_VERTEX_ATTRIB_ARRAY14_NV 0x865E +#define GL_VERTEX_ATTRIB_ARRAY15_NV 0x865F +#define GL_MAP1_VERTEX_ATTRIB0_4_NV 0x8660 +#define GL_MAP1_VERTEX_ATTRIB1_4_NV 0x8661 +#define GL_MAP1_VERTEX_ATTRIB2_4_NV 0x8662 +#define GL_MAP1_VERTEX_ATTRIB3_4_NV 0x8663 +#define GL_MAP1_VERTEX_ATTRIB4_4_NV 0x8664 +#define GL_MAP1_VERTEX_ATTRIB5_4_NV 0x8665 +#define GL_MAP1_VERTEX_ATTRIB6_4_NV 0x8666 +#define GL_MAP1_VERTEX_ATTRIB7_4_NV 0x8667 +#define GL_MAP1_VERTEX_ATTRIB8_4_NV 0x8668 +#define GL_MAP1_VERTEX_ATTRIB9_4_NV 0x8669 +#define GL_MAP1_VERTEX_ATTRIB10_4_NV 0x866A +#define GL_MAP1_VERTEX_ATTRIB11_4_NV 0x866B +#define GL_MAP1_VERTEX_ATTRIB12_4_NV 0x866C +#define GL_MAP1_VERTEX_ATTRIB13_4_NV 0x866D +#define GL_MAP1_VERTEX_ATTRIB14_4_NV 0x866E +#define GL_MAP1_VERTEX_ATTRIB15_4_NV 0x866F +#define GL_MAP2_VERTEX_ATTRIB0_4_NV 0x8670 +#define GL_MAP2_VERTEX_ATTRIB1_4_NV 0x8671 +#define GL_MAP2_VERTEX_ATTRIB2_4_NV 0x8672 +#define GL_MAP2_VERTEX_ATTRIB3_4_NV 0x8673 +#define GL_MAP2_VERTEX_ATTRIB4_4_NV 0x8674 +#define GL_MAP2_VERTEX_ATTRIB5_4_NV 0x8675 +#define GL_MAP2_VERTEX_ATTRIB6_4_NV 0x8676 +#define GL_MAP2_VERTEX_ATTRIB7_4_NV 0x8677 +#define GL_MAP2_VERTEX_ATTRIB8_4_NV 0x8678 +#define GL_MAP2_VERTEX_ATTRIB9_4_NV 0x8679 +#define GL_MAP2_VERTEX_ATTRIB10_4_NV 0x867A +#define GL_MAP2_VERTEX_ATTRIB11_4_NV 0x867B +#define GL_MAP2_VERTEX_ATTRIB12_4_NV 0x867C +#define GL_MAP2_VERTEX_ATTRIB13_4_NV 0x867D +#define GL_MAP2_VERTEX_ATTRIB14_4_NV 0x867E +#define GL_MAP2_VERTEX_ATTRIB15_4_NV 0x867F +typedef GLboolean (APIENTRYP PFNGLAREPROGRAMSRESIDENTNVPROC) (GLsizei n, const GLuint * programs, GLboolean * residences); +typedef void (APIENTRYP PFNGLBINDPROGRAMNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRYP PFNGLDELETEPROGRAMSNVPROC) (GLsizei n, const GLuint * programs); +typedef void (APIENTRYP PFNGLEXECUTEPROGRAMNVPROC) (GLenum target, GLuint id, const GLfloat * params); +typedef void (APIENTRYP PFNGLGENPROGRAMSNVPROC) (GLsizei n, GLuint * programs); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERDVNVPROC) (GLenum target, GLuint index, GLenum pname, GLdouble * params); +typedef void (APIENTRYP PFNGLGETPROGRAMPARAMETERFVNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETPROGRAMIVNVPROC) (GLuint id, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETPROGRAMSTRINGNVPROC) (GLuint id, GLenum pname, GLubyte * program); +typedef void (APIENTRYP PFNGLGETTRACKMATRIXIVNVPROC) (GLenum target, GLuint address, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVNVPROC) (GLuint index, GLenum pname, GLdouble * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVNVPROC) (GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVNVPROC) (GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVNVPROC) (GLuint index, GLenum pname, GLvoid* * pointer); +typedef GLboolean (APIENTRYP PFNGLISPROGRAMNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLLOADPROGRAMNVPROC) (GLenum target, GLuint id, GLsizei len, const GLubyte * program); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4DVNVPROC) (GLenum target, GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETER4FVNVPROC) (GLenum target, GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4DVNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble * v); +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERS4FVNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat * v); +typedef void (APIENTRYP PFNGLREQUESTRESIDENTPROGRAMSNVPROC) (GLsizei n, const GLuint * programs); +typedef void (APIENTRYP PFNGLTRACKMATRIXNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERNVPROC) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DNVPROC) (GLuint index, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVNVPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVNVPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVNVPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVNVPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVNVPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVNVPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVNVPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVNVPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVNVPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVNVPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVNVPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVNVPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVNVPROC) (GLuint index, const GLubyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1DVNVPROC) (GLuint index, GLsizei count, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1FVNVPROC) (GLuint index, GLsizei count, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1SVNVPROC) (GLuint index, GLsizei count, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2DVNVPROC) (GLuint index, GLsizei count, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2FVNVPROC) (GLuint index, GLsizei count, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2SVNVPROC) (GLuint index, GLsizei count, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3DVNVPROC) (GLuint index, GLsizei count, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3FVNVPROC) (GLuint index, GLsizei count, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3SVNVPROC) (GLuint index, GLsizei count, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4DVNVPROC) (GLuint index, GLsizei count, const GLdouble * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4FVNVPROC) (GLuint index, GLsizei count, const GLfloat * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4SVNVPROC) (GLuint index, GLsizei count, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4UBVNVPROC) (GLuint index, GLsizei count, const GLubyte * v); +GLEE_EXTERN PFNGLAREPROGRAMSRESIDENTNVPROC pglAreProgramsResidentNV; +GLEE_EXTERN PFNGLBINDPROGRAMNVPROC pglBindProgramNV; +GLEE_EXTERN PFNGLDELETEPROGRAMSNVPROC pglDeleteProgramsNV; +GLEE_EXTERN PFNGLEXECUTEPROGRAMNVPROC pglExecuteProgramNV; +GLEE_EXTERN PFNGLGENPROGRAMSNVPROC pglGenProgramsNV; +GLEE_EXTERN PFNGLGETPROGRAMPARAMETERDVNVPROC pglGetProgramParameterdvNV; +GLEE_EXTERN PFNGLGETPROGRAMPARAMETERFVNVPROC pglGetProgramParameterfvNV; +GLEE_EXTERN PFNGLGETPROGRAMIVNVPROC pglGetProgramivNV; +GLEE_EXTERN PFNGLGETPROGRAMSTRINGNVPROC pglGetProgramStringNV; +GLEE_EXTERN PFNGLGETTRACKMATRIXIVNVPROC pglGetTrackMatrixivNV; +GLEE_EXTERN PFNGLGETVERTEXATTRIBDVNVPROC pglGetVertexAttribdvNV; +GLEE_EXTERN PFNGLGETVERTEXATTRIBFVNVPROC pglGetVertexAttribfvNV; +GLEE_EXTERN PFNGLGETVERTEXATTRIBIVNVPROC pglGetVertexAttribivNV; +GLEE_EXTERN PFNGLGETVERTEXATTRIBPOINTERVNVPROC pglGetVertexAttribPointervNV; +GLEE_EXTERN PFNGLISPROGRAMNVPROC pglIsProgramNV; +GLEE_EXTERN PFNGLLOADPROGRAMNVPROC pglLoadProgramNV; +GLEE_EXTERN PFNGLPROGRAMPARAMETER4DNVPROC pglProgramParameter4dNV; +GLEE_EXTERN PFNGLPROGRAMPARAMETER4DVNVPROC pglProgramParameter4dvNV; +GLEE_EXTERN PFNGLPROGRAMPARAMETER4FNVPROC pglProgramParameter4fNV; +GLEE_EXTERN PFNGLPROGRAMPARAMETER4FVNVPROC pglProgramParameter4fvNV; +GLEE_EXTERN PFNGLPROGRAMPARAMETERS4DVNVPROC pglProgramParameters4dvNV; +GLEE_EXTERN PFNGLPROGRAMPARAMETERS4FVNVPROC pglProgramParameters4fvNV; +GLEE_EXTERN PFNGLREQUESTRESIDENTPROGRAMSNVPROC pglRequestResidentProgramsNV; +GLEE_EXTERN PFNGLTRACKMATRIXNVPROC pglTrackMatrixNV; +GLEE_EXTERN PFNGLVERTEXATTRIBPOINTERNVPROC pglVertexAttribPointerNV; +GLEE_EXTERN PFNGLVERTEXATTRIB1DNVPROC pglVertexAttrib1dNV; +GLEE_EXTERN PFNGLVERTEXATTRIB1DVNVPROC pglVertexAttrib1dvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB1FNVPROC pglVertexAttrib1fNV; +GLEE_EXTERN PFNGLVERTEXATTRIB1FVNVPROC pglVertexAttrib1fvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB1SNVPROC pglVertexAttrib1sNV; +GLEE_EXTERN PFNGLVERTEXATTRIB1SVNVPROC pglVertexAttrib1svNV; +GLEE_EXTERN PFNGLVERTEXATTRIB2DNVPROC pglVertexAttrib2dNV; +GLEE_EXTERN PFNGLVERTEXATTRIB2DVNVPROC pglVertexAttrib2dvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB2FNVPROC pglVertexAttrib2fNV; +GLEE_EXTERN PFNGLVERTEXATTRIB2FVNVPROC pglVertexAttrib2fvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB2SNVPROC pglVertexAttrib2sNV; +GLEE_EXTERN PFNGLVERTEXATTRIB2SVNVPROC pglVertexAttrib2svNV; +GLEE_EXTERN PFNGLVERTEXATTRIB3DNVPROC pglVertexAttrib3dNV; +GLEE_EXTERN PFNGLVERTEXATTRIB3DVNVPROC pglVertexAttrib3dvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB3FNVPROC pglVertexAttrib3fNV; +GLEE_EXTERN PFNGLVERTEXATTRIB3FVNVPROC pglVertexAttrib3fvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB3SNVPROC pglVertexAttrib3sNV; +GLEE_EXTERN PFNGLVERTEXATTRIB3SVNVPROC pglVertexAttrib3svNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4DNVPROC pglVertexAttrib4dNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4DVNVPROC pglVertexAttrib4dvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4FNVPROC pglVertexAttrib4fNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4FVNVPROC pglVertexAttrib4fvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4SNVPROC pglVertexAttrib4sNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4SVNVPROC pglVertexAttrib4svNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4UBNVPROC pglVertexAttrib4ubNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4UBVNVPROC pglVertexAttrib4ubvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS1DVNVPROC pglVertexAttribs1dvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS1FVNVPROC pglVertexAttribs1fvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS1SVNVPROC pglVertexAttribs1svNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS2DVNVPROC pglVertexAttribs2dvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS2FVNVPROC pglVertexAttribs2fvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS2SVNVPROC pglVertexAttribs2svNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS3DVNVPROC pglVertexAttribs3dvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS3FVNVPROC pglVertexAttribs3fvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS3SVNVPROC pglVertexAttribs3svNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS4DVNVPROC pglVertexAttribs4dvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS4FVNVPROC pglVertexAttribs4fvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS4SVNVPROC pglVertexAttribs4svNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS4UBVNVPROC pglVertexAttribs4ubvNV; +#define glAreProgramsResidentNV pglAreProgramsResidentNV +#define glBindProgramNV pglBindProgramNV +#define glDeleteProgramsNV pglDeleteProgramsNV +#define glExecuteProgramNV pglExecuteProgramNV +#define glGenProgramsNV pglGenProgramsNV +#define glGetProgramParameterdvNV pglGetProgramParameterdvNV +#define glGetProgramParameterfvNV pglGetProgramParameterfvNV +#define glGetProgramivNV pglGetProgramivNV +#define glGetProgramStringNV pglGetProgramStringNV +#define glGetTrackMatrixivNV pglGetTrackMatrixivNV +#define glGetVertexAttribdvNV pglGetVertexAttribdvNV +#define glGetVertexAttribfvNV pglGetVertexAttribfvNV +#define glGetVertexAttribivNV pglGetVertexAttribivNV +#define glGetVertexAttribPointervNV pglGetVertexAttribPointervNV +#define glIsProgramNV pglIsProgramNV +#define glLoadProgramNV pglLoadProgramNV +#define glProgramParameter4dNV pglProgramParameter4dNV +#define glProgramParameter4dvNV pglProgramParameter4dvNV +#define glProgramParameter4fNV pglProgramParameter4fNV +#define glProgramParameter4fvNV pglProgramParameter4fvNV +#define glProgramParameters4dvNV pglProgramParameters4dvNV +#define glProgramParameters4fvNV pglProgramParameters4fvNV +#define glRequestResidentProgramsNV pglRequestResidentProgramsNV +#define glTrackMatrixNV pglTrackMatrixNV +#define glVertexAttribPointerNV pglVertexAttribPointerNV +#define glVertexAttrib1dNV pglVertexAttrib1dNV +#define glVertexAttrib1dvNV pglVertexAttrib1dvNV +#define glVertexAttrib1fNV pglVertexAttrib1fNV +#define glVertexAttrib1fvNV pglVertexAttrib1fvNV +#define glVertexAttrib1sNV pglVertexAttrib1sNV +#define glVertexAttrib1svNV pglVertexAttrib1svNV +#define glVertexAttrib2dNV pglVertexAttrib2dNV +#define glVertexAttrib2dvNV pglVertexAttrib2dvNV +#define glVertexAttrib2fNV pglVertexAttrib2fNV +#define glVertexAttrib2fvNV pglVertexAttrib2fvNV +#define glVertexAttrib2sNV pglVertexAttrib2sNV +#define glVertexAttrib2svNV pglVertexAttrib2svNV +#define glVertexAttrib3dNV pglVertexAttrib3dNV +#define glVertexAttrib3dvNV pglVertexAttrib3dvNV +#define glVertexAttrib3fNV pglVertexAttrib3fNV +#define glVertexAttrib3fvNV pglVertexAttrib3fvNV +#define glVertexAttrib3sNV pglVertexAttrib3sNV +#define glVertexAttrib3svNV pglVertexAttrib3svNV +#define glVertexAttrib4dNV pglVertexAttrib4dNV +#define glVertexAttrib4dvNV pglVertexAttrib4dvNV +#define glVertexAttrib4fNV pglVertexAttrib4fNV +#define glVertexAttrib4fvNV pglVertexAttrib4fvNV +#define glVertexAttrib4sNV pglVertexAttrib4sNV +#define glVertexAttrib4svNV pglVertexAttrib4svNV +#define glVertexAttrib4ubNV pglVertexAttrib4ubNV +#define glVertexAttrib4ubvNV pglVertexAttrib4ubvNV +#define glVertexAttribs1dvNV pglVertexAttribs1dvNV +#define glVertexAttribs1fvNV pglVertexAttribs1fvNV +#define glVertexAttribs1svNV pglVertexAttribs1svNV +#define glVertexAttribs2dvNV pglVertexAttribs2dvNV +#define glVertexAttribs2fvNV pglVertexAttribs2fvNV +#define glVertexAttribs2svNV pglVertexAttribs2svNV +#define glVertexAttribs3dvNV pglVertexAttribs3dvNV +#define glVertexAttribs3fvNV pglVertexAttribs3fvNV +#define glVertexAttribs3svNV pglVertexAttribs3svNV +#define glVertexAttribs4dvNV pglVertexAttribs4dvNV +#define glVertexAttribs4fvNV pglVertexAttribs4fvNV +#define glVertexAttribs4svNV pglVertexAttribs4svNV +#define glVertexAttribs4ubvNV pglVertexAttribs4ubvNV +#endif + +/* GL_SGIX_texture_coordinate_clamp */ + +#ifndef GL_SGIX_texture_coordinate_clamp +#define GL_SGIX_texture_coordinate_clamp 1 +#define __GLEE_GL_SGIX_texture_coordinate_clamp 1 +/* Constants */ +#define GL_TEXTURE_MAX_CLAMP_S_SGIX 0x8369 +#define GL_TEXTURE_MAX_CLAMP_T_SGIX 0x836A +#define GL_TEXTURE_MAX_CLAMP_R_SGIX 0x836B +#endif + +/* GL_SGIX_scalebias_hint */ + +#ifndef GL_SGIX_scalebias_hint +#define GL_SGIX_scalebias_hint 1 +#define __GLEE_GL_SGIX_scalebias_hint 1 +/* Constants */ +#define GL_SCALEBIAS_HINT_SGIX 0x8322 +#endif + +/* GL_OML_interlace */ + +#ifndef GL_OML_interlace +#define GL_OML_interlace 1 +#define __GLEE_GL_OML_interlace 1 +/* Constants */ +#define GL_INTERLACE_OML 0x8980 +#define GL_INTERLACE_READ_OML 0x8981 +#endif + +/* GL_OML_subsample */ + +#ifndef GL_OML_subsample +#define GL_OML_subsample 1 +#define __GLEE_GL_OML_subsample 1 +/* Constants */ +#define GL_FORMAT_SUBSAMPLE_24_24_OML 0x8982 +#define GL_FORMAT_SUBSAMPLE_244_244_OML 0x8983 +#endif + +/* GL_OML_resample */ + +#ifndef GL_OML_resample +#define GL_OML_resample 1 +#define __GLEE_GL_OML_resample 1 +/* Constants */ +#define GL_PACK_RESAMPLE_OML 0x8984 +#define GL_UNPACK_RESAMPLE_OML 0x8985 +#define GL_RESAMPLE_REPLICATE_OML 0x8986 +#define GL_RESAMPLE_ZERO_FILL_OML 0x8987 +#define GL_RESAMPLE_AVERAGE_OML 0x8988 +#define GL_RESAMPLE_DECIMATE_OML 0x8989 +#endif + +/* GL_NV_copy_depth_to_color */ + +#ifndef GL_NV_copy_depth_to_color +#define GL_NV_copy_depth_to_color 1 +#define __GLEE_GL_NV_copy_depth_to_color 1 +/* Constants */ +#define GL_DEPTH_STENCIL_TO_RGBA_NV 0x886E +#define GL_DEPTH_STENCIL_TO_BGRA_NV 0x886F +#endif + +/* GL_ATI_envmap_bumpmap */ + +#ifndef GL_ATI_envmap_bumpmap +#define GL_ATI_envmap_bumpmap 1 +#define __GLEE_GL_ATI_envmap_bumpmap 1 +/* Constants */ +#define GL_BUMP_ROT_MATRIX_ATI 0x8775 +#define GL_BUMP_ROT_MATRIX_SIZE_ATI 0x8776 +#define GL_BUMP_NUM_TEX_UNITS_ATI 0x8777 +#define GL_BUMP_TEX_UNITS_ATI 0x8778 +#define GL_DUDV_ATI 0x8779 +#define GL_DU8DV8_ATI 0x877A +#define GL_BUMP_ENVMAP_ATI 0x877B +#define GL_BUMP_TARGET_ATI 0x877C +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERIVATIPROC) (GLenum pname, const GLint * param); +typedef void (APIENTRYP PFNGLTEXBUMPPARAMETERFVATIPROC) (GLenum pname, const GLfloat * param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERIVATIPROC) (GLenum pname, GLint * param); +typedef void (APIENTRYP PFNGLGETTEXBUMPPARAMETERFVATIPROC) (GLenum pname, GLfloat * param); +GLEE_EXTERN PFNGLTEXBUMPPARAMETERIVATIPROC pglTexBumpParameterivATI; +GLEE_EXTERN PFNGLTEXBUMPPARAMETERFVATIPROC pglTexBumpParameterfvATI; +GLEE_EXTERN PFNGLGETTEXBUMPPARAMETERIVATIPROC pglGetTexBumpParameterivATI; +GLEE_EXTERN PFNGLGETTEXBUMPPARAMETERFVATIPROC pglGetTexBumpParameterfvATI; +#define glTexBumpParameterivATI pglTexBumpParameterivATI +#define glTexBumpParameterfvATI pglTexBumpParameterfvATI +#define glGetTexBumpParameterivATI pglGetTexBumpParameterivATI +#define glGetTexBumpParameterfvATI pglGetTexBumpParameterfvATI +#endif + +/* GL_ATI_fragment_shader */ + +#ifndef GL_ATI_fragment_shader +#define GL_ATI_fragment_shader 1 +#define __GLEE_GL_ATI_fragment_shader 1 +/* Constants */ +#define GL_FRAGMENT_SHADER_ATI 0x8920 +#define GL_REG_0_ATI 0x8921 +#define GL_REG_1_ATI 0x8922 +#define GL_REG_2_ATI 0x8923 +#define GL_REG_3_ATI 0x8924 +#define GL_REG_4_ATI 0x8925 +#define GL_REG_5_ATI 0x8926 +#define GL_REG_6_ATI 0x8927 +#define GL_REG_7_ATI 0x8928 +#define GL_REG_8_ATI 0x8929 +#define GL_REG_9_ATI 0x892A +#define GL_REG_10_ATI 0x892B +#define GL_REG_11_ATI 0x892C +#define GL_REG_12_ATI 0x892D +#define GL_REG_13_ATI 0x892E +#define GL_REG_14_ATI 0x892F +#define GL_REG_15_ATI 0x8930 +#define GL_REG_16_ATI 0x8931 +#define GL_REG_17_ATI 0x8932 +#define GL_REG_18_ATI 0x8933 +#define GL_REG_19_ATI 0x8934 +#define GL_REG_20_ATI 0x8935 +#define GL_REG_21_ATI 0x8936 +#define GL_REG_22_ATI 0x8937 +#define GL_REG_23_ATI 0x8938 +#define GL_REG_24_ATI 0x8939 +#define GL_REG_25_ATI 0x893A +#define GL_REG_26_ATI 0x893B +#define GL_REG_27_ATI 0x893C +#define GL_REG_28_ATI 0x893D +#define GL_REG_29_ATI 0x893E +#define GL_REG_30_ATI 0x893F +#define GL_REG_31_ATI 0x8940 +#define GL_CON_0_ATI 0x8941 +#define GL_CON_1_ATI 0x8942 +#define GL_CON_2_ATI 0x8943 +#define GL_CON_3_ATI 0x8944 +#define GL_CON_4_ATI 0x8945 +#define GL_CON_5_ATI 0x8946 +#define GL_CON_6_ATI 0x8947 +#define GL_CON_7_ATI 0x8948 +#define GL_CON_8_ATI 0x8949 +#define GL_CON_9_ATI 0x894A +#define GL_CON_10_ATI 0x894B +#define GL_CON_11_ATI 0x894C +#define GL_CON_12_ATI 0x894D +#define GL_CON_13_ATI 0x894E +#define GL_CON_14_ATI 0x894F +#define GL_CON_15_ATI 0x8950 +#define GL_CON_16_ATI 0x8951 +#define GL_CON_17_ATI 0x8952 +#define GL_CON_18_ATI 0x8953 +#define GL_CON_19_ATI 0x8954 +#define GL_CON_20_ATI 0x8955 +#define GL_CON_21_ATI 0x8956 +#define GL_CON_22_ATI 0x8957 +#define GL_CON_23_ATI 0x8958 +#define GL_CON_24_ATI 0x8959 +#define GL_CON_25_ATI 0x895A +#define GL_CON_26_ATI 0x895B +#define GL_CON_27_ATI 0x895C +#define GL_CON_28_ATI 0x895D +#define GL_CON_29_ATI 0x895E +#define GL_CON_30_ATI 0x895F +#define GL_CON_31_ATI 0x8960 +#define GL_MOV_ATI 0x8961 +#define GL_ADD_ATI 0x8963 +#define GL_MUL_ATI 0x8964 +#define GL_SUB_ATI 0x8965 +#define GL_DOT3_ATI 0x8966 +#define GL_DOT4_ATI 0x8967 +#define GL_MAD_ATI 0x8968 +#define GL_LERP_ATI 0x8969 +#define GL_CND_ATI 0x896A +#define GL_CND0_ATI 0x896B +#define GL_DOT2_ADD_ATI 0x896C +#define GL_SECONDARY_INTERPOLATOR_ATI 0x896D +#define GL_NUM_FRAGMENT_REGISTERS_ATI 0x896E +#define GL_NUM_FRAGMENT_CONSTANTS_ATI 0x896F +#define GL_NUM_PASSES_ATI 0x8970 +#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI 0x8971 +#define GL_NUM_INSTRUCTIONS_TOTAL_ATI 0x8972 +#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI 0x8973 +#define GL_NUM_LOOPBACK_COMPONENTS_ATI 0x8974 +#define GL_COLOR_ALPHA_PAIRING_ATI 0x8975 +#define GL_SWIZZLE_STR_ATI 0x8976 +#define GL_SWIZZLE_STQ_ATI 0x8977 +#define GL_SWIZZLE_STR_DR_ATI 0x8978 +#define GL_SWIZZLE_STQ_DQ_ATI 0x8979 +#define GL_SWIZZLE_STRQ_ATI 0x897A +#define GL_SWIZZLE_STRQ_DQ_ATI 0x897B +#define GL_RED_BIT_ATI 0x00000001 +#define GL_GREEN_BIT_ATI 0x00000002 +#define GL_BLUE_BIT_ATI 0x00000004 +#define GL_2X_BIT_ATI 0x00000001 +#define GL_4X_BIT_ATI 0x00000002 +#define GL_8X_BIT_ATI 0x00000004 +#define GL_HALF_BIT_ATI 0x00000008 +#define GL_QUARTER_BIT_ATI 0x00000010 +#define GL_EIGHTH_BIT_ATI 0x00000020 +#define GL_SATURATE_BIT_ATI 0x00000040 +#define GL_COMP_BIT_ATI 0x00000002 +#define GL_NEGATE_BIT_ATI 0x00000004 +#define GL_BIAS_BIT_ATI 0x00000008 +typedef GLuint (APIENTRYP PFNGLGENFRAGMENTSHADERSATIPROC) (GLuint range); +typedef void (APIENTRYP PFNGLBINDFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDELETEFRAGMENTSHADERATIPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINFRAGMENTSHADERATIPROC) (); +typedef void (APIENTRYP PFNGLENDFRAGMENTSHADERATIPROC) (); +typedef void (APIENTRYP PFNGLPASSTEXCOORDATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (APIENTRYP PFNGLSAMPLEMAPATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLCOLORFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRYP PFNGLALPHAFRAGMENTOP3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRYP PFNGLSETFRAGMENTSHADERCONSTANTATIPROC) (GLuint dst, const GLfloat * value); +GLEE_EXTERN PFNGLGENFRAGMENTSHADERSATIPROC pglGenFragmentShadersATI; +GLEE_EXTERN PFNGLBINDFRAGMENTSHADERATIPROC pglBindFragmentShaderATI; +GLEE_EXTERN PFNGLDELETEFRAGMENTSHADERATIPROC pglDeleteFragmentShaderATI; +GLEE_EXTERN PFNGLBEGINFRAGMENTSHADERATIPROC pglBeginFragmentShaderATI; +GLEE_EXTERN PFNGLENDFRAGMENTSHADERATIPROC pglEndFragmentShaderATI; +GLEE_EXTERN PFNGLPASSTEXCOORDATIPROC pglPassTexCoordATI; +GLEE_EXTERN PFNGLSAMPLEMAPATIPROC pglSampleMapATI; +GLEE_EXTERN PFNGLCOLORFRAGMENTOP1ATIPROC pglColorFragmentOp1ATI; +GLEE_EXTERN PFNGLCOLORFRAGMENTOP2ATIPROC pglColorFragmentOp2ATI; +GLEE_EXTERN PFNGLCOLORFRAGMENTOP3ATIPROC pglColorFragmentOp3ATI; +GLEE_EXTERN PFNGLALPHAFRAGMENTOP1ATIPROC pglAlphaFragmentOp1ATI; +GLEE_EXTERN PFNGLALPHAFRAGMENTOP2ATIPROC pglAlphaFragmentOp2ATI; +GLEE_EXTERN PFNGLALPHAFRAGMENTOP3ATIPROC pglAlphaFragmentOp3ATI; +GLEE_EXTERN PFNGLSETFRAGMENTSHADERCONSTANTATIPROC pglSetFragmentShaderConstantATI; +#define glGenFragmentShadersATI pglGenFragmentShadersATI +#define glBindFragmentShaderATI pglBindFragmentShaderATI +#define glDeleteFragmentShaderATI pglDeleteFragmentShaderATI +#define glBeginFragmentShaderATI pglBeginFragmentShaderATI +#define glEndFragmentShaderATI pglEndFragmentShaderATI +#define glPassTexCoordATI pglPassTexCoordATI +#define glSampleMapATI pglSampleMapATI +#define glColorFragmentOp1ATI pglColorFragmentOp1ATI +#define glColorFragmentOp2ATI pglColorFragmentOp2ATI +#define glColorFragmentOp3ATI pglColorFragmentOp3ATI +#define glAlphaFragmentOp1ATI pglAlphaFragmentOp1ATI +#define glAlphaFragmentOp2ATI pglAlphaFragmentOp2ATI +#define glAlphaFragmentOp3ATI pglAlphaFragmentOp3ATI +#define glSetFragmentShaderConstantATI pglSetFragmentShaderConstantATI +#endif + +/* GL_ATI_pn_triangles */ + +#ifndef GL_ATI_pn_triangles +#define GL_ATI_pn_triangles 1 +#define __GLEE_GL_ATI_pn_triangles 1 +/* Constants */ +#define GL_PN_TRIANGLES_ATI 0x87F0 +#define GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F1 +#define GL_PN_TRIANGLES_POINT_MODE_ATI 0x87F2 +#define GL_PN_TRIANGLES_NORMAL_MODE_ATI 0x87F3 +#define GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI 0x87F4 +#define GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI 0x87F5 +#define GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI 0x87F6 +#define GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI 0x87F7 +#define GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI 0x87F8 +typedef void (APIENTRYP PFNGLPNTRIANGLESIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPNTRIANGLESFATIPROC) (GLenum pname, GLfloat param); +GLEE_EXTERN PFNGLPNTRIANGLESIATIPROC pglPNTrianglesiATI; +GLEE_EXTERN PFNGLPNTRIANGLESFATIPROC pglPNTrianglesfATI; +#define glPNTrianglesiATI pglPNTrianglesiATI +#define glPNTrianglesfATI pglPNTrianglesfATI +#endif + +/* GL_ATI_vertex_array_object */ + +#ifndef GL_ATI_vertex_array_object +#define GL_ATI_vertex_array_object 1 +#define __GLEE_GL_ATI_vertex_array_object 1 +/* Constants */ +#define GL_STATIC_ATI 0x8760 +#define GL_DYNAMIC_ATI 0x8761 +#define GL_PRESERVE_ATI 0x8762 +#define GL_DISCARD_ATI 0x8763 +#define GL_OBJECT_BUFFER_SIZE_ATI 0x8764 +#define GL_OBJECT_BUFFER_USAGE_ATI 0x8765 +#define GL_ARRAY_OBJECT_BUFFER_ATI 0x8766 +#define GL_ARRAY_OBJECT_OFFSET_ATI 0x8767 +typedef GLuint (APIENTRYP PFNGLNEWOBJECTBUFFERATIPROC) (GLsizei size, const GLvoid * pointer, GLenum usage); +typedef GLboolean (APIENTRYP PFNGLISOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUPDATEOBJECTBUFFERATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid * pointer, GLenum preserve); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERFVATIPROC) (GLuint buffer, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETOBJECTBUFFERIVATIPROC) (GLuint buffer, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLFREEOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLARRAYOBJECTATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTFVATIPROC) (GLenum array, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETARRAYOBJECTIVATIPROC) (GLenum array, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLVARIANTARRAYOBJECTATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTFVATIPROC) (GLuint id, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETVARIANTARRAYOBJECTIVATIPROC) (GLuint id, GLenum pname, GLint * params); +GLEE_EXTERN PFNGLNEWOBJECTBUFFERATIPROC pglNewObjectBufferATI; +GLEE_EXTERN PFNGLISOBJECTBUFFERATIPROC pglIsObjectBufferATI; +GLEE_EXTERN PFNGLUPDATEOBJECTBUFFERATIPROC pglUpdateObjectBufferATI; +GLEE_EXTERN PFNGLGETOBJECTBUFFERFVATIPROC pglGetObjectBufferfvATI; +GLEE_EXTERN PFNGLGETOBJECTBUFFERIVATIPROC pglGetObjectBufferivATI; +GLEE_EXTERN PFNGLFREEOBJECTBUFFERATIPROC pglFreeObjectBufferATI; +GLEE_EXTERN PFNGLARRAYOBJECTATIPROC pglArrayObjectATI; +GLEE_EXTERN PFNGLGETARRAYOBJECTFVATIPROC pglGetArrayObjectfvATI; +GLEE_EXTERN PFNGLGETARRAYOBJECTIVATIPROC pglGetArrayObjectivATI; +GLEE_EXTERN PFNGLVARIANTARRAYOBJECTATIPROC pglVariantArrayObjectATI; +GLEE_EXTERN PFNGLGETVARIANTARRAYOBJECTFVATIPROC pglGetVariantArrayObjectfvATI; +GLEE_EXTERN PFNGLGETVARIANTARRAYOBJECTIVATIPROC pglGetVariantArrayObjectivATI; +#define glNewObjectBufferATI pglNewObjectBufferATI +#define glIsObjectBufferATI pglIsObjectBufferATI +#define glUpdateObjectBufferATI pglUpdateObjectBufferATI +#define glGetObjectBufferfvATI pglGetObjectBufferfvATI +#define glGetObjectBufferivATI pglGetObjectBufferivATI +#define glFreeObjectBufferATI pglFreeObjectBufferATI +#define glArrayObjectATI pglArrayObjectATI +#define glGetArrayObjectfvATI pglGetArrayObjectfvATI +#define glGetArrayObjectivATI pglGetArrayObjectivATI +#define glVariantArrayObjectATI pglVariantArrayObjectATI +#define glGetVariantArrayObjectfvATI pglGetVariantArrayObjectfvATI +#define glGetVariantArrayObjectivATI pglGetVariantArrayObjectivATI +#endif + +/* GL_EXT_vertex_shader */ + +#ifndef GL_EXT_vertex_shader +#define GL_EXT_vertex_shader 1 +#define __GLEE_GL_EXT_vertex_shader 1 +/* Constants */ +#define GL_VERTEX_SHADER_EXT 0x8780 +#define GL_VERTEX_SHADER_BINDING_EXT 0x8781 +#define GL_OP_INDEX_EXT 0x8782 +#define GL_OP_NEGATE_EXT 0x8783 +#define GL_OP_DOT3_EXT 0x8784 +#define GL_OP_DOT4_EXT 0x8785 +#define GL_OP_MUL_EXT 0x8786 +#define GL_OP_ADD_EXT 0x8787 +#define GL_OP_MADD_EXT 0x8788 +#define GL_OP_FRAC_EXT 0x8789 +#define GL_OP_MAX_EXT 0x878A +#define GL_OP_MIN_EXT 0x878B +#define GL_OP_SET_GE_EXT 0x878C +#define GL_OP_SET_LT_EXT 0x878D +#define GL_OP_CLAMP_EXT 0x878E +#define GL_OP_FLOOR_EXT 0x878F +#define GL_OP_ROUND_EXT 0x8790 +#define GL_OP_EXP_BASE_2_EXT 0x8791 +#define GL_OP_LOG_BASE_2_EXT 0x8792 +#define GL_OP_POWER_EXT 0x8793 +#define GL_OP_RECIP_EXT 0x8794 +#define GL_OP_RECIP_SQRT_EXT 0x8795 +#define GL_OP_SUB_EXT 0x8796 +#define GL_OP_CROSS_PRODUCT_EXT 0x8797 +#define GL_OP_MULTIPLY_MATRIX_EXT 0x8798 +#define GL_OP_MOV_EXT 0x8799 +#define GL_OUTPUT_VERTEX_EXT 0x879A +#define GL_OUTPUT_COLOR0_EXT 0x879B +#define GL_OUTPUT_COLOR1_EXT 0x879C +#define GL_OUTPUT_TEXTURE_COORD0_EXT 0x879D +#define GL_OUTPUT_TEXTURE_COORD1_EXT 0x879E +#define GL_OUTPUT_TEXTURE_COORD2_EXT 0x879F +#define GL_OUTPUT_TEXTURE_COORD3_EXT 0x87A0 +#define GL_OUTPUT_TEXTURE_COORD4_EXT 0x87A1 +#define GL_OUTPUT_TEXTURE_COORD5_EXT 0x87A2 +#define GL_OUTPUT_TEXTURE_COORD6_EXT 0x87A3 +#define GL_OUTPUT_TEXTURE_COORD7_EXT 0x87A4 +#define GL_OUTPUT_TEXTURE_COORD8_EXT 0x87A5 +#define GL_OUTPUT_TEXTURE_COORD9_EXT 0x87A6 +#define GL_OUTPUT_TEXTURE_COORD10_EXT 0x87A7 +#define GL_OUTPUT_TEXTURE_COORD11_EXT 0x87A8 +#define GL_OUTPUT_TEXTURE_COORD12_EXT 0x87A9 +#define GL_OUTPUT_TEXTURE_COORD13_EXT 0x87AA +#define GL_OUTPUT_TEXTURE_COORD14_EXT 0x87AB +#define GL_OUTPUT_TEXTURE_COORD15_EXT 0x87AC +#define GL_OUTPUT_TEXTURE_COORD16_EXT 0x87AD +#define GL_OUTPUT_TEXTURE_COORD17_EXT 0x87AE +#define GL_OUTPUT_TEXTURE_COORD18_EXT 0x87AF +#define GL_OUTPUT_TEXTURE_COORD19_EXT 0x87B0 +#define GL_OUTPUT_TEXTURE_COORD20_EXT 0x87B1 +#define GL_OUTPUT_TEXTURE_COORD21_EXT 0x87B2 +#define GL_OUTPUT_TEXTURE_COORD22_EXT 0x87B3 +#define GL_OUTPUT_TEXTURE_COORD23_EXT 0x87B4 +#define GL_OUTPUT_TEXTURE_COORD24_EXT 0x87B5 +#define GL_OUTPUT_TEXTURE_COORD25_EXT 0x87B6 +#define GL_OUTPUT_TEXTURE_COORD26_EXT 0x87B7 +#define GL_OUTPUT_TEXTURE_COORD27_EXT 0x87B8 +#define GL_OUTPUT_TEXTURE_COORD28_EXT 0x87B9 +#define GL_OUTPUT_TEXTURE_COORD29_EXT 0x87BA +#define GL_OUTPUT_TEXTURE_COORD30_EXT 0x87BB +#define GL_OUTPUT_TEXTURE_COORD31_EXT 0x87BC +#define GL_OUTPUT_FOG_EXT 0x87BD +#define GL_SCALAR_EXT 0x87BE +#define GL_VECTOR_EXT 0x87BF +#define GL_MATRIX_EXT 0x87C0 +#define GL_VARIANT_EXT 0x87C1 +#define GL_INVARIANT_EXT 0x87C2 +#define GL_LOCAL_CONSTANT_EXT 0x87C3 +#define GL_LOCAL_EXT 0x87C4 +#define GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87C5 +#define GL_MAX_VERTEX_SHADER_VARIANTS_EXT 0x87C6 +#define GL_MAX_VERTEX_SHADER_INVARIANTS_EXT 0x87C7 +#define GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87C8 +#define GL_MAX_VERTEX_SHADER_LOCALS_EXT 0x87C9 +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CA +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT 0x87CB +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87CC +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT 0x87CD +#define GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT 0x87CE +#define GL_VERTEX_SHADER_INSTRUCTIONS_EXT 0x87CF +#define GL_VERTEX_SHADER_VARIANTS_EXT 0x87D0 +#define GL_VERTEX_SHADER_INVARIANTS_EXT 0x87D1 +#define GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT 0x87D2 +#define GL_VERTEX_SHADER_LOCALS_EXT 0x87D3 +#define GL_VERTEX_SHADER_OPTIMIZED_EXT 0x87D4 +#define GL_X_EXT 0x87D5 +#define GL_Y_EXT 0x87D6 +#define GL_Z_EXT 0x87D7 +#define GL_W_EXT 0x87D8 +#define GL_NEGATIVE_X_EXT 0x87D9 +#define GL_NEGATIVE_Y_EXT 0x87DA +#define GL_NEGATIVE_Z_EXT 0x87DB +#define GL_NEGATIVE_W_EXT 0x87DC +#define GL_ZERO_EXT 0x87DD +#define GL_ONE_EXT 0x87DE +#define GL_NEGATIVE_ONE_EXT 0x87DF +#define GL_NORMALIZED_RANGE_EXT 0x87E0 +#define GL_FULL_RANGE_EXT 0x87E1 +#define GL_CURRENT_VERTEX_EXT 0x87E2 +#define GL_MVP_MATRIX_EXT 0x87E3 +#define GL_VARIANT_VALUE_EXT 0x87E4 +#define GL_VARIANT_DATATYPE_EXT 0x87E5 +#define GL_VARIANT_ARRAY_STRIDE_EXT 0x87E6 +#define GL_VARIANT_ARRAY_TYPE_EXT 0x87E7 +#define GL_VARIANT_ARRAY_EXT 0x87E8 +#define GL_VARIANT_ARRAY_POINTER_EXT 0x87E9 +#define GL_INVARIANT_VALUE_EXT 0x87EA +#define GL_INVARIANT_DATATYPE_EXT 0x87EB +#define GL_LOCAL_CONSTANT_VALUE_EXT 0x87EC +#define GL_LOCAL_CONSTANT_DATATYPE_EXT 0x87ED +typedef void (APIENTRYP PFNGLBEGINVERTEXSHADEREXTPROC) (); +typedef void (APIENTRYP PFNGLENDVERTEXSHADEREXTPROC) (); +typedef void (APIENTRYP PFNGLBINDVERTEXSHADEREXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLGENVERTEXSHADERSEXTPROC) (GLuint range); +typedef void (APIENTRYP PFNGLDELETEVERTEXSHADEREXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLSHADEROP1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (APIENTRYP PFNGLSHADEROP2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (APIENTRYP PFNGLSHADEROP3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (APIENTRYP PFNGLSWIZZLEEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLWRITEMASKEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRYP PFNGLINSERTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void (APIENTRYP PFNGLEXTRACTCOMPONENTEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (APIENTRYP PFNGLGENSYMBOLSEXTPROC) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); +typedef void (APIENTRYP PFNGLSETINVARIANTEXTPROC) (GLuint id, GLenum type, const GLvoid * addr); +typedef void (APIENTRYP PFNGLSETLOCALCONSTANTEXTPROC) (GLuint id, GLenum type, const GLvoid * addr); +typedef void (APIENTRYP PFNGLVARIANTBVEXTPROC) (GLuint id, const GLbyte * addr); +typedef void (APIENTRYP PFNGLVARIANTSVEXTPROC) (GLuint id, const GLshort * addr); +typedef void (APIENTRYP PFNGLVARIANTIVEXTPROC) (GLuint id, const GLint * addr); +typedef void (APIENTRYP PFNGLVARIANTFVEXTPROC) (GLuint id, const GLfloat * addr); +typedef void (APIENTRYP PFNGLVARIANTDVEXTPROC) (GLuint id, const GLdouble * addr); +typedef void (APIENTRYP PFNGLVARIANTUBVEXTPROC) (GLuint id, const GLubyte * addr); +typedef void (APIENTRYP PFNGLVARIANTUSVEXTPROC) (GLuint id, const GLushort * addr); +typedef void (APIENTRYP PFNGLVARIANTUIVEXTPROC) (GLuint id, const GLuint * addr); +typedef void (APIENTRYP PFNGLVARIANTPOINTEREXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid * addr); +typedef void (APIENTRYP PFNGLENABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef void (APIENTRYP PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC) (GLuint id); +typedef GLuint (APIENTRYP PFNGLBINDLIGHTPARAMETEREXTPROC) (GLenum light, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDMATERIALPARAMETEREXTPROC) (GLenum face, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXGENPARAMETEREXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDTEXTUREUNITPARAMETEREXTPROC) (GLenum unit, GLenum value); +typedef GLuint (APIENTRYP PFNGLBINDPARAMETEREXTPROC) (GLenum value); +typedef GLboolean (APIENTRYP PFNGLISVARIANTENABLEDEXTPROC) (GLuint id, GLenum cap); +typedef void (APIENTRYP PFNGLGETVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean * data); +typedef void (APIENTRYP PFNGLGETVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint * data); +typedef void (APIENTRYP PFNGLGETVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat * data); +typedef void (APIENTRYP PFNGLGETVARIANTPOINTERVEXTPROC) (GLuint id, GLenum value, GLvoid* * data); +typedef void (APIENTRYP PFNGLGETINVARIANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean * data); +typedef void (APIENTRYP PFNGLGETINVARIANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint * data); +typedef void (APIENTRYP PFNGLGETINVARIANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat * data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC) (GLuint id, GLenum value, GLboolean * data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTINTEGERVEXTPROC) (GLuint id, GLenum value, GLint * data); +typedef void (APIENTRYP PFNGLGETLOCALCONSTANTFLOATVEXTPROC) (GLuint id, GLenum value, GLfloat * data); +GLEE_EXTERN PFNGLBEGINVERTEXSHADEREXTPROC pglBeginVertexShaderEXT; +GLEE_EXTERN PFNGLENDVERTEXSHADEREXTPROC pglEndVertexShaderEXT; +GLEE_EXTERN PFNGLBINDVERTEXSHADEREXTPROC pglBindVertexShaderEXT; +GLEE_EXTERN PFNGLGENVERTEXSHADERSEXTPROC pglGenVertexShadersEXT; +GLEE_EXTERN PFNGLDELETEVERTEXSHADEREXTPROC pglDeleteVertexShaderEXT; +GLEE_EXTERN PFNGLSHADEROP1EXTPROC pglShaderOp1EXT; +GLEE_EXTERN PFNGLSHADEROP2EXTPROC pglShaderOp2EXT; +GLEE_EXTERN PFNGLSHADEROP3EXTPROC pglShaderOp3EXT; +GLEE_EXTERN PFNGLSWIZZLEEXTPROC pglSwizzleEXT; +GLEE_EXTERN PFNGLWRITEMASKEXTPROC pglWriteMaskEXT; +GLEE_EXTERN PFNGLINSERTCOMPONENTEXTPROC pglInsertComponentEXT; +GLEE_EXTERN PFNGLEXTRACTCOMPONENTEXTPROC pglExtractComponentEXT; +GLEE_EXTERN PFNGLGENSYMBOLSEXTPROC pglGenSymbolsEXT; +GLEE_EXTERN PFNGLSETINVARIANTEXTPROC pglSetInvariantEXT; +GLEE_EXTERN PFNGLSETLOCALCONSTANTEXTPROC pglSetLocalConstantEXT; +GLEE_EXTERN PFNGLVARIANTBVEXTPROC pglVariantbvEXT; +GLEE_EXTERN PFNGLVARIANTSVEXTPROC pglVariantsvEXT; +GLEE_EXTERN PFNGLVARIANTIVEXTPROC pglVariantivEXT; +GLEE_EXTERN PFNGLVARIANTFVEXTPROC pglVariantfvEXT; +GLEE_EXTERN PFNGLVARIANTDVEXTPROC pglVariantdvEXT; +GLEE_EXTERN PFNGLVARIANTUBVEXTPROC pglVariantubvEXT; +GLEE_EXTERN PFNGLVARIANTUSVEXTPROC pglVariantusvEXT; +GLEE_EXTERN PFNGLVARIANTUIVEXTPROC pglVariantuivEXT; +GLEE_EXTERN PFNGLVARIANTPOINTEREXTPROC pglVariantPointerEXT; +GLEE_EXTERN PFNGLENABLEVARIANTCLIENTSTATEEXTPROC pglEnableVariantClientStateEXT; +GLEE_EXTERN PFNGLDISABLEVARIANTCLIENTSTATEEXTPROC pglDisableVariantClientStateEXT; +GLEE_EXTERN PFNGLBINDLIGHTPARAMETEREXTPROC pglBindLightParameterEXT; +GLEE_EXTERN PFNGLBINDMATERIALPARAMETEREXTPROC pglBindMaterialParameterEXT; +GLEE_EXTERN PFNGLBINDTEXGENPARAMETEREXTPROC pglBindTexGenParameterEXT; +GLEE_EXTERN PFNGLBINDTEXTUREUNITPARAMETEREXTPROC pglBindTextureUnitParameterEXT; +GLEE_EXTERN PFNGLBINDPARAMETEREXTPROC pglBindParameterEXT; +GLEE_EXTERN PFNGLISVARIANTENABLEDEXTPROC pglIsVariantEnabledEXT; +GLEE_EXTERN PFNGLGETVARIANTBOOLEANVEXTPROC pglGetVariantBooleanvEXT; +GLEE_EXTERN PFNGLGETVARIANTINTEGERVEXTPROC pglGetVariantIntegervEXT; +GLEE_EXTERN PFNGLGETVARIANTFLOATVEXTPROC pglGetVariantFloatvEXT; +GLEE_EXTERN PFNGLGETVARIANTPOINTERVEXTPROC pglGetVariantPointervEXT; +GLEE_EXTERN PFNGLGETINVARIANTBOOLEANVEXTPROC pglGetInvariantBooleanvEXT; +GLEE_EXTERN PFNGLGETINVARIANTINTEGERVEXTPROC pglGetInvariantIntegervEXT; +GLEE_EXTERN PFNGLGETINVARIANTFLOATVEXTPROC pglGetInvariantFloatvEXT; +GLEE_EXTERN PFNGLGETLOCALCONSTANTBOOLEANVEXTPROC pglGetLocalConstantBooleanvEXT; +GLEE_EXTERN PFNGLGETLOCALCONSTANTINTEGERVEXTPROC pglGetLocalConstantIntegervEXT; +GLEE_EXTERN PFNGLGETLOCALCONSTANTFLOATVEXTPROC pglGetLocalConstantFloatvEXT; +#define glBeginVertexShaderEXT pglBeginVertexShaderEXT +#define glEndVertexShaderEXT pglEndVertexShaderEXT +#define glBindVertexShaderEXT pglBindVertexShaderEXT +#define glGenVertexShadersEXT pglGenVertexShadersEXT +#define glDeleteVertexShaderEXT pglDeleteVertexShaderEXT +#define glShaderOp1EXT pglShaderOp1EXT +#define glShaderOp2EXT pglShaderOp2EXT +#define glShaderOp3EXT pglShaderOp3EXT +#define glSwizzleEXT pglSwizzleEXT +#define glWriteMaskEXT pglWriteMaskEXT +#define glInsertComponentEXT pglInsertComponentEXT +#define glExtractComponentEXT pglExtractComponentEXT +#define glGenSymbolsEXT pglGenSymbolsEXT +#define glSetInvariantEXT pglSetInvariantEXT +#define glSetLocalConstantEXT pglSetLocalConstantEXT +#define glVariantbvEXT pglVariantbvEXT +#define glVariantsvEXT pglVariantsvEXT +#define glVariantivEXT pglVariantivEXT +#define glVariantfvEXT pglVariantfvEXT +#define glVariantdvEXT pglVariantdvEXT +#define glVariantubvEXT pglVariantubvEXT +#define glVariantusvEXT pglVariantusvEXT +#define glVariantuivEXT pglVariantuivEXT +#define glVariantPointerEXT pglVariantPointerEXT +#define glEnableVariantClientStateEXT pglEnableVariantClientStateEXT +#define glDisableVariantClientStateEXT pglDisableVariantClientStateEXT +#define glBindLightParameterEXT pglBindLightParameterEXT +#define glBindMaterialParameterEXT pglBindMaterialParameterEXT +#define glBindTexGenParameterEXT pglBindTexGenParameterEXT +#define glBindTextureUnitParameterEXT pglBindTextureUnitParameterEXT +#define glBindParameterEXT pglBindParameterEXT +#define glIsVariantEnabledEXT pglIsVariantEnabledEXT +#define glGetVariantBooleanvEXT pglGetVariantBooleanvEXT +#define glGetVariantIntegervEXT pglGetVariantIntegervEXT +#define glGetVariantFloatvEXT pglGetVariantFloatvEXT +#define glGetVariantPointervEXT pglGetVariantPointervEXT +#define glGetInvariantBooleanvEXT pglGetInvariantBooleanvEXT +#define glGetInvariantIntegervEXT pglGetInvariantIntegervEXT +#define glGetInvariantFloatvEXT pglGetInvariantFloatvEXT +#define glGetLocalConstantBooleanvEXT pglGetLocalConstantBooleanvEXT +#define glGetLocalConstantIntegervEXT pglGetLocalConstantIntegervEXT +#define glGetLocalConstantFloatvEXT pglGetLocalConstantFloatvEXT +#endif + +/* GL_ATI_vertex_streams */ + +#ifndef GL_ATI_vertex_streams +#define GL_ATI_vertex_streams 1 +#define __GLEE_GL_ATI_vertex_streams 1 +/* Constants */ +#define GL_MAX_VERTEX_STREAMS_ATI 0x876B +#define GL_VERTEX_STREAM0_ATI 0x876C +#define GL_VERTEX_STREAM1_ATI 0x876D +#define GL_VERTEX_STREAM2_ATI 0x876E +#define GL_VERTEX_STREAM3_ATI 0x876F +#define GL_VERTEX_STREAM4_ATI 0x8770 +#define GL_VERTEX_STREAM5_ATI 0x8771 +#define GL_VERTEX_STREAM6_ATI 0x8772 +#define GL_VERTEX_STREAM7_ATI 0x8773 +#define GL_VERTEX_SOURCE_ATI 0x8774 +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SATIPROC) (GLenum stream, GLshort x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1SVATIPROC) (GLenum stream, const GLshort * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IATIPROC) (GLenum stream, GLint x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1IVATIPROC) (GLenum stream, const GLint * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FATIPROC) (GLenum stream, GLfloat x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1FVATIPROC) (GLenum stream, const GLfloat * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DATIPROC) (GLenum stream, GLdouble x); +typedef void (APIENTRYP PFNGLVERTEXSTREAM1DVATIPROC) (GLenum stream, const GLdouble * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2SVATIPROC) (GLenum stream, const GLshort * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2IVATIPROC) (GLenum stream, const GLint * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2FVATIPROC) (GLenum stream, const GLfloat * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRYP PFNGLVERTEXSTREAM2DVATIPROC) (GLenum stream, const GLdouble * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3SVATIPROC) (GLenum stream, const GLshort * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3IVATIPROC) (GLenum stream, const GLint * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3FVATIPROC) (GLenum stream, const GLfloat * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRYP PFNGLVERTEXSTREAM3DVATIPROC) (GLenum stream, const GLdouble * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4SVATIPROC) (GLenum stream, const GLshort * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4IVATIPROC) (GLenum stream, const GLint * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4FVATIPROC) (GLenum stream, const GLfloat * coords); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLVERTEXSTREAM4DVATIPROC) (GLenum stream, const GLdouble * coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BATIPROC) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3BVATIPROC) (GLenum stream, const GLbyte * coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SATIPROC) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3SVATIPROC) (GLenum stream, const GLshort * coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IATIPROC) (GLenum stream, GLint nx, GLint ny, GLint nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3IVATIPROC) (GLenum stream, const GLint * coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FATIPROC) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3FVATIPROC) (GLenum stream, const GLfloat * coords); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DATIPROC) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); +typedef void (APIENTRYP PFNGLNORMALSTREAM3DVATIPROC) (GLenum stream, const GLdouble * coords); +typedef void (APIENTRYP PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC) (GLenum stream); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVIATIPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLVERTEXBLENDENVFATIPROC) (GLenum pname, GLfloat param); +GLEE_EXTERN PFNGLVERTEXSTREAM1SATIPROC pglVertexStream1sATI; +GLEE_EXTERN PFNGLVERTEXSTREAM1SVATIPROC pglVertexStream1svATI; +GLEE_EXTERN PFNGLVERTEXSTREAM1IATIPROC pglVertexStream1iATI; +GLEE_EXTERN PFNGLVERTEXSTREAM1IVATIPROC pglVertexStream1ivATI; +GLEE_EXTERN PFNGLVERTEXSTREAM1FATIPROC pglVertexStream1fATI; +GLEE_EXTERN PFNGLVERTEXSTREAM1FVATIPROC pglVertexStream1fvATI; +GLEE_EXTERN PFNGLVERTEXSTREAM1DATIPROC pglVertexStream1dATI; +GLEE_EXTERN PFNGLVERTEXSTREAM1DVATIPROC pglVertexStream1dvATI; +GLEE_EXTERN PFNGLVERTEXSTREAM2SATIPROC pglVertexStream2sATI; +GLEE_EXTERN PFNGLVERTEXSTREAM2SVATIPROC pglVertexStream2svATI; +GLEE_EXTERN PFNGLVERTEXSTREAM2IATIPROC pglVertexStream2iATI; +GLEE_EXTERN PFNGLVERTEXSTREAM2IVATIPROC pglVertexStream2ivATI; +GLEE_EXTERN PFNGLVERTEXSTREAM2FATIPROC pglVertexStream2fATI; +GLEE_EXTERN PFNGLVERTEXSTREAM2FVATIPROC pglVertexStream2fvATI; +GLEE_EXTERN PFNGLVERTEXSTREAM2DATIPROC pglVertexStream2dATI; +GLEE_EXTERN PFNGLVERTEXSTREAM2DVATIPROC pglVertexStream2dvATI; +GLEE_EXTERN PFNGLVERTEXSTREAM3SATIPROC pglVertexStream3sATI; +GLEE_EXTERN PFNGLVERTEXSTREAM3SVATIPROC pglVertexStream3svATI; +GLEE_EXTERN PFNGLVERTEXSTREAM3IATIPROC pglVertexStream3iATI; +GLEE_EXTERN PFNGLVERTEXSTREAM3IVATIPROC pglVertexStream3ivATI; +GLEE_EXTERN PFNGLVERTEXSTREAM3FATIPROC pglVertexStream3fATI; +GLEE_EXTERN PFNGLVERTEXSTREAM3FVATIPROC pglVertexStream3fvATI; +GLEE_EXTERN PFNGLVERTEXSTREAM3DATIPROC pglVertexStream3dATI; +GLEE_EXTERN PFNGLVERTEXSTREAM3DVATIPROC pglVertexStream3dvATI; +GLEE_EXTERN PFNGLVERTEXSTREAM4SATIPROC pglVertexStream4sATI; +GLEE_EXTERN PFNGLVERTEXSTREAM4SVATIPROC pglVertexStream4svATI; +GLEE_EXTERN PFNGLVERTEXSTREAM4IATIPROC pglVertexStream4iATI; +GLEE_EXTERN PFNGLVERTEXSTREAM4IVATIPROC pglVertexStream4ivATI; +GLEE_EXTERN PFNGLVERTEXSTREAM4FATIPROC pglVertexStream4fATI; +GLEE_EXTERN PFNGLVERTEXSTREAM4FVATIPROC pglVertexStream4fvATI; +GLEE_EXTERN PFNGLVERTEXSTREAM4DATIPROC pglVertexStream4dATI; +GLEE_EXTERN PFNGLVERTEXSTREAM4DVATIPROC pglVertexStream4dvATI; +GLEE_EXTERN PFNGLNORMALSTREAM3BATIPROC pglNormalStream3bATI; +GLEE_EXTERN PFNGLNORMALSTREAM3BVATIPROC pglNormalStream3bvATI; +GLEE_EXTERN PFNGLNORMALSTREAM3SATIPROC pglNormalStream3sATI; +GLEE_EXTERN PFNGLNORMALSTREAM3SVATIPROC pglNormalStream3svATI; +GLEE_EXTERN PFNGLNORMALSTREAM3IATIPROC pglNormalStream3iATI; +GLEE_EXTERN PFNGLNORMALSTREAM3IVATIPROC pglNormalStream3ivATI; +GLEE_EXTERN PFNGLNORMALSTREAM3FATIPROC pglNormalStream3fATI; +GLEE_EXTERN PFNGLNORMALSTREAM3FVATIPROC pglNormalStream3fvATI; +GLEE_EXTERN PFNGLNORMALSTREAM3DATIPROC pglNormalStream3dATI; +GLEE_EXTERN PFNGLNORMALSTREAM3DVATIPROC pglNormalStream3dvATI; +GLEE_EXTERN PFNGLCLIENTACTIVEVERTEXSTREAMATIPROC pglClientActiveVertexStreamATI; +GLEE_EXTERN PFNGLVERTEXBLENDENVIATIPROC pglVertexBlendEnviATI; +GLEE_EXTERN PFNGLVERTEXBLENDENVFATIPROC pglVertexBlendEnvfATI; +#define glVertexStream1sATI pglVertexStream1sATI +#define glVertexStream1svATI pglVertexStream1svATI +#define glVertexStream1iATI pglVertexStream1iATI +#define glVertexStream1ivATI pglVertexStream1ivATI +#define glVertexStream1fATI pglVertexStream1fATI +#define glVertexStream1fvATI pglVertexStream1fvATI +#define glVertexStream1dATI pglVertexStream1dATI +#define glVertexStream1dvATI pglVertexStream1dvATI +#define glVertexStream2sATI pglVertexStream2sATI +#define glVertexStream2svATI pglVertexStream2svATI +#define glVertexStream2iATI pglVertexStream2iATI +#define glVertexStream2ivATI pglVertexStream2ivATI +#define glVertexStream2fATI pglVertexStream2fATI +#define glVertexStream2fvATI pglVertexStream2fvATI +#define glVertexStream2dATI pglVertexStream2dATI +#define glVertexStream2dvATI pglVertexStream2dvATI +#define glVertexStream3sATI pglVertexStream3sATI +#define glVertexStream3svATI pglVertexStream3svATI +#define glVertexStream3iATI pglVertexStream3iATI +#define glVertexStream3ivATI pglVertexStream3ivATI +#define glVertexStream3fATI pglVertexStream3fATI +#define glVertexStream3fvATI pglVertexStream3fvATI +#define glVertexStream3dATI pglVertexStream3dATI +#define glVertexStream3dvATI pglVertexStream3dvATI +#define glVertexStream4sATI pglVertexStream4sATI +#define glVertexStream4svATI pglVertexStream4svATI +#define glVertexStream4iATI pglVertexStream4iATI +#define glVertexStream4ivATI pglVertexStream4ivATI +#define glVertexStream4fATI pglVertexStream4fATI +#define glVertexStream4fvATI pglVertexStream4fvATI +#define glVertexStream4dATI pglVertexStream4dATI +#define glVertexStream4dvATI pglVertexStream4dvATI +#define glNormalStream3bATI pglNormalStream3bATI +#define glNormalStream3bvATI pglNormalStream3bvATI +#define glNormalStream3sATI pglNormalStream3sATI +#define glNormalStream3svATI pglNormalStream3svATI +#define glNormalStream3iATI pglNormalStream3iATI +#define glNormalStream3ivATI pglNormalStream3ivATI +#define glNormalStream3fATI pglNormalStream3fATI +#define glNormalStream3fvATI pglNormalStream3fvATI +#define glNormalStream3dATI pglNormalStream3dATI +#define glNormalStream3dvATI pglNormalStream3dvATI +#define glClientActiveVertexStreamATI pglClientActiveVertexStreamATI +#define glVertexBlendEnviATI pglVertexBlendEnviATI +#define glVertexBlendEnvfATI pglVertexBlendEnvfATI +#endif + +/* GL_ATI_element_array */ + +#ifndef GL_ATI_element_array +#define GL_ATI_element_array 1 +#define __GLEE_GL_ATI_element_array 1 +/* Constants */ +#define GL_ELEMENT_ARRAY_ATI 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_ATI 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_ATI 0x876A +typedef void (APIENTRYP PFNGLELEMENTPOINTERATIPROC) (GLenum type, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); +GLEE_EXTERN PFNGLELEMENTPOINTERATIPROC pglElementPointerATI; +GLEE_EXTERN PFNGLDRAWELEMENTARRAYATIPROC pglDrawElementArrayATI; +GLEE_EXTERN PFNGLDRAWRANGEELEMENTARRAYATIPROC pglDrawRangeElementArrayATI; +#define glElementPointerATI pglElementPointerATI +#define glDrawElementArrayATI pglDrawElementArrayATI +#define glDrawRangeElementArrayATI pglDrawRangeElementArrayATI +#endif + +/* GL_SUN_mesh_array */ + +#ifndef GL_SUN_mesh_array +#define GL_SUN_mesh_array 1 +#define __GLEE_GL_SUN_mesh_array 1 +/* Constants */ +#define GL_QUAD_MESH_SUN 0x8614 +#define GL_TRIANGLE_MESH_SUN 0x8615 +typedef void (APIENTRYP PFNGLDRAWMESHARRAYSSUNPROC) (GLenum mode, GLint first, GLsizei count, GLsizei width); +GLEE_EXTERN PFNGLDRAWMESHARRAYSSUNPROC pglDrawMeshArraysSUN; +#define glDrawMeshArraysSUN pglDrawMeshArraysSUN +#endif + +/* GL_SUN_slice_accum */ + +#ifndef GL_SUN_slice_accum +#define GL_SUN_slice_accum 1 +#define __GLEE_GL_SUN_slice_accum 1 +/* Constants */ +#define GL_SLICE_ACCUM_SUN 0x85CC +#endif + +/* GL_NV_multisample_filter_hint */ + +#ifndef GL_NV_multisample_filter_hint +#define GL_NV_multisample_filter_hint 1 +#define __GLEE_GL_NV_multisample_filter_hint 1 +/* Constants */ +#define GL_MULTISAMPLE_FILTER_HINT_NV 0x8534 +#endif + +/* GL_NV_depth_clamp */ + +#ifndef GL_NV_depth_clamp +#define GL_NV_depth_clamp 1 +#define __GLEE_GL_NV_depth_clamp 1 +/* Constants */ +#define GL_DEPTH_CLAMP_NV 0x864F +#endif + +/* GL_NV_occlusion_query */ + +#ifndef GL_NV_occlusion_query +#define GL_NV_occlusion_query 1 +#define __GLEE_GL_NV_occlusion_query 1 +/* Constants */ +#define GL_PIXEL_COUNTER_BITS_NV 0x8864 +#define GL_CURRENT_OCCLUSION_QUERY_ID_NV 0x8865 +#define GL_PIXEL_COUNT_NV 0x8866 +#define GL_PIXEL_COUNT_AVAILABLE_NV 0x8867 +typedef void (APIENTRYP PFNGLGENOCCLUSIONQUERIESNVPROC) (GLsizei n, GLuint * ids); +typedef void (APIENTRYP PFNGLDELETEOCCLUSIONQUERIESNVPROC) (GLsizei n, const GLuint * ids); +typedef GLboolean (APIENTRYP PFNGLISOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLBEGINOCCLUSIONQUERYNVPROC) (GLuint id); +typedef void (APIENTRYP PFNGLENDOCCLUSIONQUERYNVPROC) (); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint * params); +GLEE_EXTERN PFNGLGENOCCLUSIONQUERIESNVPROC pglGenOcclusionQueriesNV; +GLEE_EXTERN PFNGLDELETEOCCLUSIONQUERIESNVPROC pglDeleteOcclusionQueriesNV; +GLEE_EXTERN PFNGLISOCCLUSIONQUERYNVPROC pglIsOcclusionQueryNV; +GLEE_EXTERN PFNGLBEGINOCCLUSIONQUERYNVPROC pglBeginOcclusionQueryNV; +GLEE_EXTERN PFNGLENDOCCLUSIONQUERYNVPROC pglEndOcclusionQueryNV; +GLEE_EXTERN PFNGLGETOCCLUSIONQUERYIVNVPROC pglGetOcclusionQueryivNV; +GLEE_EXTERN PFNGLGETOCCLUSIONQUERYUIVNVPROC pglGetOcclusionQueryuivNV; +#define glGenOcclusionQueriesNV pglGenOcclusionQueriesNV +#define glDeleteOcclusionQueriesNV pglDeleteOcclusionQueriesNV +#define glIsOcclusionQueryNV pglIsOcclusionQueryNV +#define glBeginOcclusionQueryNV pglBeginOcclusionQueryNV +#define glEndOcclusionQueryNV pglEndOcclusionQueryNV +#define glGetOcclusionQueryivNV pglGetOcclusionQueryivNV +#define glGetOcclusionQueryuivNV pglGetOcclusionQueryuivNV +#endif + +/* GL_NV_point_sprite */ + +#ifndef GL_NV_point_sprite +#define GL_NV_point_sprite 1 +#define __GLEE_GL_NV_point_sprite 1 +/* Constants */ +#define GL_POINT_SPRITE_NV 0x8861 +#define GL_COORD_REPLACE_NV 0x8862 +#define GL_POINT_SPRITE_R_MODE_NV 0x8863 +typedef void (APIENTRYP PFNGLPOINTPARAMETERINVPROC) (GLenum pname, GLint param); +typedef void (APIENTRYP PFNGLPOINTPARAMETERIVNVPROC) (GLenum pname, const GLint * params); +GLEE_EXTERN PFNGLPOINTPARAMETERINVPROC pglPointParameteriNV; +GLEE_EXTERN PFNGLPOINTPARAMETERIVNVPROC pglPointParameterivNV; +#define glPointParameteriNV pglPointParameteriNV +#define glPointParameterivNV pglPointParameterivNV +#endif + +/* GL_NV_texture_shader3 */ + +#ifndef GL_NV_texture_shader3 +#define GL_NV_texture_shader3 1 +#define __GLEE_GL_NV_texture_shader3 1 +/* Constants */ +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850 +#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852 +#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853 +#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854 +#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856 +#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857 +#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858 +#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859 +#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A +#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B +#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C +#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D +#define GL_HILO8_NV 0x885E +#define GL_SIGNED_HILO8_NV 0x885F +#define GL_FORCE_BLUE_TO_ONE_NV 0x8860 +#endif + +/* GL_NV_vertex_program1_1 */ + +#ifndef GL_NV_vertex_program1_1 +#define GL_NV_vertex_program1_1 1 +#define __GLEE_GL_NV_vertex_program1_1 1 +/* Constants */ +#endif + +/* GL_EXT_shadow_funcs */ + +#ifndef GL_EXT_shadow_funcs +#define GL_EXT_shadow_funcs 1 +#define __GLEE_GL_EXT_shadow_funcs 1 +/* Constants */ +#endif + +/* GL_EXT_stencil_two_side */ + +#ifndef GL_EXT_stencil_two_side +#define GL_EXT_stencil_two_side 1 +#define __GLEE_GL_EXT_stencil_two_side 1 +/* Constants */ +#define GL_STENCIL_TEST_TWO_SIDE_EXT 0x8910 +#define GL_ACTIVE_STENCIL_FACE_EXT 0x8911 +typedef void (APIENTRYP PFNGLACTIVESTENCILFACEEXTPROC) (GLenum face); +GLEE_EXTERN PFNGLACTIVESTENCILFACEEXTPROC pglActiveStencilFaceEXT; +#define glActiveStencilFaceEXT pglActiveStencilFaceEXT +#endif + +/* GL_ATI_text_fragment_shader */ + +#ifndef GL_ATI_text_fragment_shader +#define GL_ATI_text_fragment_shader 1 +#define __GLEE_GL_ATI_text_fragment_shader 1 +/* Constants */ +#define GL_TEXT_FRAGMENT_SHADER_ATI 0x8200 +#endif + +/* GL_APPLE_client_storage */ + +#ifndef GL_APPLE_client_storage +#define GL_APPLE_client_storage 1 +#define __GLEE_GL_APPLE_client_storage 1 +/* Constants */ +#define GL_UNPACK_CLIENT_STORAGE_APPLE 0x85B2 +#endif + +/* GL_APPLE_element_array */ + +#ifndef GL_APPLE_element_array +#define GL_APPLE_element_array 1 +#define __GLEE_GL_APPLE_element_array 1 +/* Constants */ +#define GL_ELEMENT_ARRAY_APPLE 0x8768 +#define GL_ELEMENT_ARRAY_TYPE_APPLE 0x8769 +#define GL_ELEMENT_ARRAY_POINTER_APPLE 0x876A +typedef void (APIENTRYP PFNGLELEMENTPOINTERAPPLEPROC) (GLenum type, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC) (GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount); +typedef void (APIENTRYP PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint * first, const GLsizei * count, GLsizei primcount); +GLEE_EXTERN PFNGLELEMENTPOINTERAPPLEPROC pglElementPointerAPPLE; +GLEE_EXTERN PFNGLDRAWELEMENTARRAYAPPLEPROC pglDrawElementArrayAPPLE; +GLEE_EXTERN PFNGLDRAWRANGEELEMENTARRAYAPPLEPROC pglDrawRangeElementArrayAPPLE; +GLEE_EXTERN PFNGLMULTIDRAWELEMENTARRAYAPPLEPROC pglMultiDrawElementArrayAPPLE; +GLEE_EXTERN PFNGLMULTIDRAWRANGEELEMENTARRAYAPPLEPROC pglMultiDrawRangeElementArrayAPPLE; +#define glElementPointerAPPLE pglElementPointerAPPLE +#define glDrawElementArrayAPPLE pglDrawElementArrayAPPLE +#define glDrawRangeElementArrayAPPLE pglDrawRangeElementArrayAPPLE +#define glMultiDrawElementArrayAPPLE pglMultiDrawElementArrayAPPLE +#define glMultiDrawRangeElementArrayAPPLE pglMultiDrawRangeElementArrayAPPLE +#endif + +/* GL_APPLE_fence */ + +#ifndef GL_APPLE_fence +#define GL_APPLE_fence 1 +#define __GLEE_GL_APPLE_fence 1 +/* Constants */ +#define GL_DRAW_PIXELS_APPLE 0x8A0A +#define GL_FENCE_APPLE 0x8A0B +typedef void (APIENTRYP PFNGLGENFENCESAPPLEPROC) (GLsizei n, GLuint * fences); +typedef void (APIENTRYP PFNGLDELETEFENCESAPPLEPROC) (GLsizei n, const GLuint * fences); +typedef void (APIENTRYP PFNGLSETFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLISFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTFENCEAPPLEPROC) (GLuint fence); +typedef void (APIENTRYP PFNGLFINISHFENCEAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRYP PFNGLTESTOBJECTAPPLEPROC) (GLenum object, GLuint name); +typedef void (APIENTRYP PFNGLFINISHOBJECTAPPLEPROC) (GLenum object, GLint name); +GLEE_EXTERN PFNGLGENFENCESAPPLEPROC pglGenFencesAPPLE; +GLEE_EXTERN PFNGLDELETEFENCESAPPLEPROC pglDeleteFencesAPPLE; +GLEE_EXTERN PFNGLSETFENCEAPPLEPROC pglSetFenceAPPLE; +GLEE_EXTERN PFNGLISFENCEAPPLEPROC pglIsFenceAPPLE; +GLEE_EXTERN PFNGLTESTFENCEAPPLEPROC pglTestFenceAPPLE; +GLEE_EXTERN PFNGLFINISHFENCEAPPLEPROC pglFinishFenceAPPLE; +GLEE_EXTERN PFNGLTESTOBJECTAPPLEPROC pglTestObjectAPPLE; +GLEE_EXTERN PFNGLFINISHOBJECTAPPLEPROC pglFinishObjectAPPLE; +#define glGenFencesAPPLE pglGenFencesAPPLE +#define glDeleteFencesAPPLE pglDeleteFencesAPPLE +#define glSetFenceAPPLE pglSetFenceAPPLE +#define glIsFenceAPPLE pglIsFenceAPPLE +#define glTestFenceAPPLE pglTestFenceAPPLE +#define glFinishFenceAPPLE pglFinishFenceAPPLE +#define glTestObjectAPPLE pglTestObjectAPPLE +#define glFinishObjectAPPLE pglFinishObjectAPPLE +#endif + +/* GL_APPLE_vertex_array_object */ + +#ifndef GL_APPLE_vertex_array_object +#define GL_APPLE_vertex_array_object 1 +#define __GLEE_GL_APPLE_vertex_array_object 1 +/* Constants */ +#define GL_VERTEX_ARRAY_BINDING_APPLE 0x85B5 +typedef void (APIENTRYP PFNGLBINDVERTEXARRAYAPPLEPROC) (GLuint array); +typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint * arrays); +typedef void (APIENTRYP PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, const GLuint * arrays); +typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array); +GLEE_EXTERN PFNGLBINDVERTEXARRAYAPPLEPROC pglBindVertexArrayAPPLE; +GLEE_EXTERN PFNGLDELETEVERTEXARRAYSAPPLEPROC pglDeleteVertexArraysAPPLE; +GLEE_EXTERN PFNGLGENVERTEXARRAYSAPPLEPROC pglGenVertexArraysAPPLE; +GLEE_EXTERN PFNGLISVERTEXARRAYAPPLEPROC pglIsVertexArrayAPPLE; +#define glBindVertexArrayAPPLE pglBindVertexArrayAPPLE +#define glDeleteVertexArraysAPPLE pglDeleteVertexArraysAPPLE +#define glGenVertexArraysAPPLE pglGenVertexArraysAPPLE +#define glIsVertexArrayAPPLE pglIsVertexArrayAPPLE +#endif + +/* GL_APPLE_vertex_array_range */ + +#ifndef GL_APPLE_vertex_array_range +#define GL_APPLE_vertex_array_range 1 +#define __GLEE_GL_APPLE_vertex_array_range 1 +/* Constants */ +#define GL_VERTEX_ARRAY_RANGE_APPLE 0x851D +#define GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE 0x851E +#define GL_VERTEX_ARRAY_STORAGE_HINT_APPLE 0x851F +#define GL_VERTEX_ARRAY_RANGE_POINTER_APPLE 0x8521 +#define GL_STORAGE_CACHED_APPLE 0x85BE +#define GL_STORAGE_SHARED_APPLE 0x85BF +typedef void (APIENTRYP PFNGLVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid * pointer); +typedef void (APIENTRYP PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC) (GLsizei length, GLvoid * pointer); +typedef void (APIENTRYP PFNGLVERTEXARRAYPARAMETERIAPPLEPROC) (GLenum pname, GLint param); +GLEE_EXTERN PFNGLVERTEXARRAYRANGEAPPLEPROC pglVertexArrayRangeAPPLE; +GLEE_EXTERN PFNGLFLUSHVERTEXARRAYRANGEAPPLEPROC pglFlushVertexArrayRangeAPPLE; +GLEE_EXTERN PFNGLVERTEXARRAYPARAMETERIAPPLEPROC pglVertexArrayParameteriAPPLE; +#define glVertexArrayRangeAPPLE pglVertexArrayRangeAPPLE +#define glFlushVertexArrayRangeAPPLE pglFlushVertexArrayRangeAPPLE +#define glVertexArrayParameteriAPPLE pglVertexArrayParameteriAPPLE +#endif + +/* GL_APPLE_ycbcr_422 */ + +#ifndef GL_APPLE_ycbcr_422 +#define GL_APPLE_ycbcr_422 1 +#define __GLEE_GL_APPLE_ycbcr_422 1 +/* Constants */ +#define GL_YCBCR_422_APPLE 0x85B9 +#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB +#endif + +/* GL_S3_s3tc */ + +#ifndef GL_S3_s3tc +#define GL_S3_s3tc 1 +#define __GLEE_GL_S3_s3tc 1 +/* Constants */ +#define GL_RGB_S3TC 0x83A0 +#define GL_RGB4_S3TC 0x83A1 +#define GL_RGBA_S3TC 0x83A2 +#define GL_RGBA4_S3TC 0x83A3 +#endif + +/* GL_ATI_draw_buffers */ + +#ifndef GL_ATI_draw_buffers +#define GL_ATI_draw_buffers 1 +#define __GLEE_GL_ATI_draw_buffers 1 +/* Constants */ +#define GL_MAX_DRAW_BUFFERS_ATI 0x8824 +#define GL_DRAW_BUFFER0_ATI 0x8825 +#define GL_DRAW_BUFFER1_ATI 0x8826 +#define GL_DRAW_BUFFER2_ATI 0x8827 +#define GL_DRAW_BUFFER3_ATI 0x8828 +#define GL_DRAW_BUFFER4_ATI 0x8829 +#define GL_DRAW_BUFFER5_ATI 0x882A +#define GL_DRAW_BUFFER6_ATI 0x882B +#define GL_DRAW_BUFFER7_ATI 0x882C +#define GL_DRAW_BUFFER8_ATI 0x882D +#define GL_DRAW_BUFFER9_ATI 0x882E +#define GL_DRAW_BUFFER10_ATI 0x882F +#define GL_DRAW_BUFFER11_ATI 0x8830 +#define GL_DRAW_BUFFER12_ATI 0x8831 +#define GL_DRAW_BUFFER13_ATI 0x8832 +#define GL_DRAW_BUFFER14_ATI 0x8833 +#define GL_DRAW_BUFFER15_ATI 0x8834 +typedef void (APIENTRYP PFNGLDRAWBUFFERSATIPROC) (GLsizei n, const GLenum * bufs); +GLEE_EXTERN PFNGLDRAWBUFFERSATIPROC pglDrawBuffersATI; +#define glDrawBuffersATI pglDrawBuffersATI +#endif + +/* GL_ATI_pixel_format_float */ + +#ifndef GL_ATI_pixel_format_float +#define GL_ATI_pixel_format_float 1 +#define __GLEE_GL_ATI_pixel_format_float 1 +/* Constants */ +#define GL_TYPE_RGBA_FLOAT_ATI 0x8820 +#define GL_COLOR_CLEAR_UNCLAMPED_VALUE_ATI 0x8835 +#endif + +/* GL_ATI_texture_env_combine3 */ + +#ifndef GL_ATI_texture_env_combine3 +#define GL_ATI_texture_env_combine3 1 +#define __GLEE_GL_ATI_texture_env_combine3 1 +/* Constants */ +#define GL_MODULATE_ADD_ATI 0x8744 +#define GL_MODULATE_SIGNED_ADD_ATI 0x8745 +#define GL_MODULATE_SUBTRACT_ATI 0x8746 +#endif + +/* GL_ATI_texture_float */ + +#ifndef GL_ATI_texture_float +#define GL_ATI_texture_float 1 +#define __GLEE_GL_ATI_texture_float 1 +/* Constants */ +#define GL_RGBA_FLOAT32_ATI 0x8814 +#define GL_RGB_FLOAT32_ATI 0x8815 +#define GL_ALPHA_FLOAT32_ATI 0x8816 +#define GL_INTENSITY_FLOAT32_ATI 0x8817 +#define GL_LUMINANCE_FLOAT32_ATI 0x8818 +#define GL_LUMINANCE_ALPHA_FLOAT32_ATI 0x8819 +#define GL_RGBA_FLOAT16_ATI 0x881A +#define GL_RGB_FLOAT16_ATI 0x881B +#define GL_ALPHA_FLOAT16_ATI 0x881C +#define GL_INTENSITY_FLOAT16_ATI 0x881D +#define GL_LUMINANCE_FLOAT16_ATI 0x881E +#define GL_LUMINANCE_ALPHA_FLOAT16_ATI 0x881F +#endif + +/* GL_NV_float_buffer */ + +#ifndef GL_NV_float_buffer +#define GL_NV_float_buffer 1 +#define __GLEE_GL_NV_float_buffer 1 +/* Constants */ +#define GL_FLOAT_R_NV 0x8880 +#define GL_FLOAT_RG_NV 0x8881 +#define GL_FLOAT_RGB_NV 0x8882 +#define GL_FLOAT_RGBA_NV 0x8883 +#define GL_FLOAT_R16_NV 0x8884 +#define GL_FLOAT_R32_NV 0x8885 +#define GL_FLOAT_RG16_NV 0x8886 +#define GL_FLOAT_RG32_NV 0x8887 +#define GL_FLOAT_RGB16_NV 0x8888 +#define GL_FLOAT_RGB32_NV 0x8889 +#define GL_FLOAT_RGBA16_NV 0x888A +#define GL_FLOAT_RGBA32_NV 0x888B +#define GL_TEXTURE_FLOAT_COMPONENTS_NV 0x888C +#define GL_FLOAT_CLEAR_COLOR_VALUE_NV 0x888D +#define GL_FLOAT_RGBA_MODE_NV 0x888E +#endif + +/* GL_NV_fragment_program */ + +#ifndef GL_NV_fragment_program +#define GL_NV_fragment_program 1 +#define __GLEE_GL_NV_fragment_program 1 +/* Constants */ +#define GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV 0x8868 +#define GL_FRAGMENT_PROGRAM_NV 0x8870 +#define GL_MAX_TEXTURE_COORDS_NV 0x8871 +#define GL_MAX_TEXTURE_IMAGE_UNITS_NV 0x8872 +#define GL_FRAGMENT_PROGRAM_BINDING_NV 0x8873 +#define GL_PROGRAM_ERROR_STRING_NV 0x8874 +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FNVPROC) (GLuint id, GLsizei len, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DNVPROC) (GLuint id, GLsizei len, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC) (GLuint id, GLsizei len, const GLubyte * name, const GLfloat * v); +typedef void (APIENTRYP PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC) (GLuint id, GLsizei len, const GLubyte * name, const GLdouble * v); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC) (GLuint id, GLsizei len, const GLubyte * name, GLfloat * params); +typedef void (APIENTRYP PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC) (GLuint id, GLsizei len, const GLubyte * name, GLdouble * params); +GLEE_EXTERN PFNGLPROGRAMNAMEDPARAMETER4FNVPROC pglProgramNamedParameter4fNV; +GLEE_EXTERN PFNGLPROGRAMNAMEDPARAMETER4DNVPROC pglProgramNamedParameter4dNV; +GLEE_EXTERN PFNGLPROGRAMNAMEDPARAMETER4FVNVPROC pglProgramNamedParameter4fvNV; +GLEE_EXTERN PFNGLPROGRAMNAMEDPARAMETER4DVNVPROC pglProgramNamedParameter4dvNV; +GLEE_EXTERN PFNGLGETPROGRAMNAMEDPARAMETERFVNVPROC pglGetProgramNamedParameterfvNV; +GLEE_EXTERN PFNGLGETPROGRAMNAMEDPARAMETERDVNVPROC pglGetProgramNamedParameterdvNV; +#define glProgramNamedParameter4fNV pglProgramNamedParameter4fNV +#define glProgramNamedParameter4dNV pglProgramNamedParameter4dNV +#define glProgramNamedParameter4fvNV pglProgramNamedParameter4fvNV +#define glProgramNamedParameter4dvNV pglProgramNamedParameter4dvNV +#define glGetProgramNamedParameterfvNV pglGetProgramNamedParameterfvNV +#define glGetProgramNamedParameterdvNV pglGetProgramNamedParameterdvNV +#endif + +/* GL_NV_half_float */ + +#ifndef GL_NV_half_float +#define GL_NV_half_float 1 +#define __GLEE_GL_NV_half_float 1 +/* Constants */ +#define GL_HALF_FLOAT_NV 0x140B +typedef void (APIENTRYP PFNGLVERTEX2HNVPROC) (GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEX2HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEX3HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEX3HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEX4HNVPROC) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEX4HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLNORMAL3HNVPROC) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); +typedef void (APIENTRYP PFNGLNORMAL3HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLCOLOR3HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLCOLOR4HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); +typedef void (APIENTRYP PFNGLCOLOR4HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLTEXCOORD1HNVPROC) (GLhalfNV s); +typedef void (APIENTRYP PFNGLTEXCOORD1HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLTEXCOORD2HNVPROC) (GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLTEXCOORD2HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLTEXCOORD3HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLTEXCOORD3HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLTEXCOORD4HNVPROC) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLTEXCOORD4HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HNVPROC) (GLenum target, GLhalfNV s); +typedef void (APIENTRYP PFNGLMULTITEXCOORD1HVNVPROC) (GLenum target, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t); +typedef void (APIENTRYP PFNGLMULTITEXCOORD2HVNVPROC) (GLenum target, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); +typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); +typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog); +typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV * fog); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); +typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight); +typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV * weight); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x); +typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y); +typedef void (APIENTRYP PFNGLVERTEXATTRIB2HVNVPROC) (GLuint index, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); +typedef void (APIENTRYP PFNGLVERTEXATTRIB3HVNVPROC) (GLuint index, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); +typedef void (APIENTRYP PFNGLVERTEXATTRIB4HVNVPROC) (GLuint index, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV * v); +GLEE_EXTERN PFNGLVERTEX2HNVPROC pglVertex2hNV; +GLEE_EXTERN PFNGLVERTEX2HVNVPROC pglVertex2hvNV; +GLEE_EXTERN PFNGLVERTEX3HNVPROC pglVertex3hNV; +GLEE_EXTERN PFNGLVERTEX3HVNVPROC pglVertex3hvNV; +GLEE_EXTERN PFNGLVERTEX4HNVPROC pglVertex4hNV; +GLEE_EXTERN PFNGLVERTEX4HVNVPROC pglVertex4hvNV; +GLEE_EXTERN PFNGLNORMAL3HNVPROC pglNormal3hNV; +GLEE_EXTERN PFNGLNORMAL3HVNVPROC pglNormal3hvNV; +GLEE_EXTERN PFNGLCOLOR3HNVPROC pglColor3hNV; +GLEE_EXTERN PFNGLCOLOR3HVNVPROC pglColor3hvNV; +GLEE_EXTERN PFNGLCOLOR4HNVPROC pglColor4hNV; +GLEE_EXTERN PFNGLCOLOR4HVNVPROC pglColor4hvNV; +GLEE_EXTERN PFNGLTEXCOORD1HNVPROC pglTexCoord1hNV; +GLEE_EXTERN PFNGLTEXCOORD1HVNVPROC pglTexCoord1hvNV; +GLEE_EXTERN PFNGLTEXCOORD2HNVPROC pglTexCoord2hNV; +GLEE_EXTERN PFNGLTEXCOORD2HVNVPROC pglTexCoord2hvNV; +GLEE_EXTERN PFNGLTEXCOORD3HNVPROC pglTexCoord3hNV; +GLEE_EXTERN PFNGLTEXCOORD3HVNVPROC pglTexCoord3hvNV; +GLEE_EXTERN PFNGLTEXCOORD4HNVPROC pglTexCoord4hNV; +GLEE_EXTERN PFNGLTEXCOORD4HVNVPROC pglTexCoord4hvNV; +GLEE_EXTERN PFNGLMULTITEXCOORD1HNVPROC pglMultiTexCoord1hNV; +GLEE_EXTERN PFNGLMULTITEXCOORD1HVNVPROC pglMultiTexCoord1hvNV; +GLEE_EXTERN PFNGLMULTITEXCOORD2HNVPROC pglMultiTexCoord2hNV; +GLEE_EXTERN PFNGLMULTITEXCOORD2HVNVPROC pglMultiTexCoord2hvNV; +GLEE_EXTERN PFNGLMULTITEXCOORD3HNVPROC pglMultiTexCoord3hNV; +GLEE_EXTERN PFNGLMULTITEXCOORD3HVNVPROC pglMultiTexCoord3hvNV; +GLEE_EXTERN PFNGLMULTITEXCOORD4HNVPROC pglMultiTexCoord4hNV; +GLEE_EXTERN PFNGLMULTITEXCOORD4HVNVPROC pglMultiTexCoord4hvNV; +GLEE_EXTERN PFNGLFOGCOORDHNVPROC pglFogCoordhNV; +GLEE_EXTERN PFNGLFOGCOORDHVNVPROC pglFogCoordhvNV; +GLEE_EXTERN PFNGLSECONDARYCOLOR3HNVPROC pglSecondaryColor3hNV; +GLEE_EXTERN PFNGLSECONDARYCOLOR3HVNVPROC pglSecondaryColor3hvNV; +GLEE_EXTERN PFNGLVERTEXWEIGHTHNVPROC pglVertexWeighthNV; +GLEE_EXTERN PFNGLVERTEXWEIGHTHVNVPROC pglVertexWeighthvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB1HNVPROC pglVertexAttrib1hNV; +GLEE_EXTERN PFNGLVERTEXATTRIB1HVNVPROC pglVertexAttrib1hvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB2HNVPROC pglVertexAttrib2hNV; +GLEE_EXTERN PFNGLVERTEXATTRIB2HVNVPROC pglVertexAttrib2hvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB3HNVPROC pglVertexAttrib3hNV; +GLEE_EXTERN PFNGLVERTEXATTRIB3HVNVPROC pglVertexAttrib3hvNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4HNVPROC pglVertexAttrib4hNV; +GLEE_EXTERN PFNGLVERTEXATTRIB4HVNVPROC pglVertexAttrib4hvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS1HVNVPROC pglVertexAttribs1hvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS2HVNVPROC pglVertexAttribs2hvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS3HVNVPROC pglVertexAttribs3hvNV; +GLEE_EXTERN PFNGLVERTEXATTRIBS4HVNVPROC pglVertexAttribs4hvNV; +#define glVertex2hNV pglVertex2hNV +#define glVertex2hvNV pglVertex2hvNV +#define glVertex3hNV pglVertex3hNV +#define glVertex3hvNV pglVertex3hvNV +#define glVertex4hNV pglVertex4hNV +#define glVertex4hvNV pglVertex4hvNV +#define glNormal3hNV pglNormal3hNV +#define glNormal3hvNV pglNormal3hvNV +#define glColor3hNV pglColor3hNV +#define glColor3hvNV pglColor3hvNV +#define glColor4hNV pglColor4hNV +#define glColor4hvNV pglColor4hvNV +#define glTexCoord1hNV pglTexCoord1hNV +#define glTexCoord1hvNV pglTexCoord1hvNV +#define glTexCoord2hNV pglTexCoord2hNV +#define glTexCoord2hvNV pglTexCoord2hvNV +#define glTexCoord3hNV pglTexCoord3hNV +#define glTexCoord3hvNV pglTexCoord3hvNV +#define glTexCoord4hNV pglTexCoord4hNV +#define glTexCoord4hvNV pglTexCoord4hvNV +#define glMultiTexCoord1hNV pglMultiTexCoord1hNV +#define glMultiTexCoord1hvNV pglMultiTexCoord1hvNV +#define glMultiTexCoord2hNV pglMultiTexCoord2hNV +#define glMultiTexCoord2hvNV pglMultiTexCoord2hvNV +#define glMultiTexCoord3hNV pglMultiTexCoord3hNV +#define glMultiTexCoord3hvNV pglMultiTexCoord3hvNV +#define glMultiTexCoord4hNV pglMultiTexCoord4hNV +#define glMultiTexCoord4hvNV pglMultiTexCoord4hvNV +#define glFogCoordhNV pglFogCoordhNV +#define glFogCoordhvNV pglFogCoordhvNV +#define glSecondaryColor3hNV pglSecondaryColor3hNV +#define glSecondaryColor3hvNV pglSecondaryColor3hvNV +#define glVertexWeighthNV pglVertexWeighthNV +#define glVertexWeighthvNV pglVertexWeighthvNV +#define glVertexAttrib1hNV pglVertexAttrib1hNV +#define glVertexAttrib1hvNV pglVertexAttrib1hvNV +#define glVertexAttrib2hNV pglVertexAttrib2hNV +#define glVertexAttrib2hvNV pglVertexAttrib2hvNV +#define glVertexAttrib3hNV pglVertexAttrib3hNV +#define glVertexAttrib3hvNV pglVertexAttrib3hvNV +#define glVertexAttrib4hNV pglVertexAttrib4hNV +#define glVertexAttrib4hvNV pglVertexAttrib4hvNV +#define glVertexAttribs1hvNV pglVertexAttribs1hvNV +#define glVertexAttribs2hvNV pglVertexAttribs2hvNV +#define glVertexAttribs3hvNV pglVertexAttribs3hvNV +#define glVertexAttribs4hvNV pglVertexAttribs4hvNV +#endif + +/* GL_NV_pixel_data_range */ + +#ifndef GL_NV_pixel_data_range +#define GL_NV_pixel_data_range 1 +#define __GLEE_GL_NV_pixel_data_range 1 +/* Constants */ +#define GL_WRITE_PIXEL_DATA_RANGE_NV 0x8878 +#define GL_READ_PIXEL_DATA_RANGE_NV 0x8879 +#define GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV 0x887A +#define GL_READ_PIXEL_DATA_RANGE_LENGTH_NV 0x887B +#define GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV 0x887C +#define GL_READ_PIXEL_DATA_RANGE_POINTER_NV 0x887D +typedef void (APIENTRYP PFNGLPIXELDATARANGENVPROC) (GLenum target, GLsizei length, GLvoid * pointer); +typedef void (APIENTRYP PFNGLFLUSHPIXELDATARANGENVPROC) (GLenum target); +GLEE_EXTERN PFNGLPIXELDATARANGENVPROC pglPixelDataRangeNV; +GLEE_EXTERN PFNGLFLUSHPIXELDATARANGENVPROC pglFlushPixelDataRangeNV; +#define glPixelDataRangeNV pglPixelDataRangeNV +#define glFlushPixelDataRangeNV pglFlushPixelDataRangeNV +#endif + +/* GL_NV_primitive_restart */ + +#ifndef GL_NV_primitive_restart +#define GL_NV_primitive_restart 1 +#define __GLEE_GL_NV_primitive_restart 1 +/* Constants */ +#define GL_PRIMITIVE_RESTART_NV 0x8558 +#define GL_PRIMITIVE_RESTART_INDEX_NV 0x8559 +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTNVPROC) (); +typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXNVPROC) (GLuint index); +GLEE_EXTERN PFNGLPRIMITIVERESTARTNVPROC pglPrimitiveRestartNV; +GLEE_EXTERN PFNGLPRIMITIVERESTARTINDEXNVPROC pglPrimitiveRestartIndexNV; +#define glPrimitiveRestartNV pglPrimitiveRestartNV +#define glPrimitiveRestartIndexNV pglPrimitiveRestartIndexNV +#endif + +/* GL_NV_texture_expand_normal */ + +#ifndef GL_NV_texture_expand_normal +#define GL_NV_texture_expand_normal 1 +#define __GLEE_GL_NV_texture_expand_normal 1 +/* Constants */ +#define GL_TEXTURE_UNSIGNED_REMAP_MODE_NV 0x888F +#endif + +/* GL_NV_vertex_program2 */ + +#ifndef GL_NV_vertex_program2 +#define GL_NV_vertex_program2 1 +#define __GLEE_GL_NV_vertex_program2 1 +/* Constants */ +#endif + +/* GL_ATI_map_object_buffer */ + +#ifndef GL_ATI_map_object_buffer +#define GL_ATI_map_object_buffer 1 +#define __GLEE_GL_ATI_map_object_buffer 1 +/* Constants */ +typedef GLvoid* (APIENTRYP PFNGLMAPOBJECTBUFFERATIPROC) (GLuint buffer); +typedef void (APIENTRYP PFNGLUNMAPOBJECTBUFFERATIPROC) (GLuint buffer); +GLEE_EXTERN PFNGLMAPOBJECTBUFFERATIPROC pglMapObjectBufferATI; +GLEE_EXTERN PFNGLUNMAPOBJECTBUFFERATIPROC pglUnmapObjectBufferATI; +#define glMapObjectBufferATI pglMapObjectBufferATI +#define glUnmapObjectBufferATI pglUnmapObjectBufferATI +#endif + +/* GL_ATI_separate_stencil */ + +#ifndef GL_ATI_separate_stencil +#define GL_ATI_separate_stencil 1 +#define __GLEE_GL_ATI_separate_stencil 1 +/* Constants */ +#define GL_STENCIL_BACK_FUNC_ATI 0x8800 +#define GL_STENCIL_BACK_FAIL_ATI 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI 0x8803 +typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); +GLEE_EXTERN PFNGLSTENCILOPSEPARATEATIPROC pglStencilOpSeparateATI; +GLEE_EXTERN PFNGLSTENCILFUNCSEPARATEATIPROC pglStencilFuncSeparateATI; +#define glStencilOpSeparateATI pglStencilOpSeparateATI +#define glStencilFuncSeparateATI pglStencilFuncSeparateATI +#endif + +/* GL_ATI_vertex_attrib_array_object */ + +#ifndef GL_ATI_vertex_attrib_array_object +#define GL_ATI_vertex_attrib_array_object 1 +#define __GLEE_GL_ATI_vertex_attrib_array_object 1 +/* Constants */ +typedef void (APIENTRYP PFNGLVERTEXATTRIBARRAYOBJECTATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC) (GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC) (GLuint index, GLenum pname, GLint * params); +GLEE_EXTERN PFNGLVERTEXATTRIBARRAYOBJECTATIPROC pglVertexAttribArrayObjectATI; +GLEE_EXTERN PFNGLGETVERTEXATTRIBARRAYOBJECTFVATIPROC pglGetVertexAttribArrayObjectfvATI; +GLEE_EXTERN PFNGLGETVERTEXATTRIBARRAYOBJECTIVATIPROC pglGetVertexAttribArrayObjectivATI; +#define glVertexAttribArrayObjectATI pglVertexAttribArrayObjectATI +#define glGetVertexAttribArrayObjectfvATI pglGetVertexAttribArrayObjectfvATI +#define glGetVertexAttribArrayObjectivATI pglGetVertexAttribArrayObjectivATI +#endif + +/* GL_OES_read_format */ + +#ifndef GL_OES_read_format +#define GL_OES_read_format 1 +#define __GLEE_GL_OES_read_format 1 +/* Constants */ +#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B +#endif + +/* GL_EXT_depth_bounds_test */ + +#ifndef GL_EXT_depth_bounds_test +#define GL_EXT_depth_bounds_test 1 +#define __GLEE_GL_EXT_depth_bounds_test 1 +/* Constants */ +#define GL_DEPTH_BOUNDS_TEST_EXT 0x8890 +#define GL_DEPTH_BOUNDS_EXT 0x8891 +typedef void (APIENTRYP PFNGLDEPTHBOUNDSEXTPROC) (GLclampd zmin, GLclampd zmax); +GLEE_EXTERN PFNGLDEPTHBOUNDSEXTPROC pglDepthBoundsEXT; +#define glDepthBoundsEXT pglDepthBoundsEXT +#endif + +/* GL_EXT_texture_mirror_clamp */ + +#ifndef GL_EXT_texture_mirror_clamp +#define GL_EXT_texture_mirror_clamp 1 +#define __GLEE_GL_EXT_texture_mirror_clamp 1 +/* Constants */ +#define GL_MIRROR_CLAMP_EXT 0x8742 +#define GL_MIRROR_CLAMP_TO_EDGE_EXT 0x8743 +#define GL_MIRROR_CLAMP_TO_BORDER_EXT 0x8912 +#endif + +/* GL_EXT_blend_equation_separate */ + +#ifndef GL_EXT_blend_equation_separate +#define GL_EXT_blend_equation_separate 1 +#define __GLEE_GL_EXT_blend_equation_separate 1 +/* Constants */ +#define GL_BLEND_EQUATION_RGB_EXT GL_BLEND_EQUATION +#define GL_BLEND_EQUATION_ALPHA_EXT 0x883D +typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEEXTPROC) (GLenum modeRGB, GLenum modeAlpha); +GLEE_EXTERN PFNGLBLENDEQUATIONSEPARATEEXTPROC pglBlendEquationSeparateEXT; +#define glBlendEquationSeparateEXT pglBlendEquationSeparateEXT +#endif + +/* GL_MESA_pack_invert */ + +#ifndef GL_MESA_pack_invert +#define GL_MESA_pack_invert 1 +#define __GLEE_GL_MESA_pack_invert 1 +/* Constants */ +#define GL_PACK_INVERT_MESA 0x8758 +#endif + +/* GL_MESA_ycbcr_texture */ + +#ifndef GL_MESA_ycbcr_texture +#define GL_MESA_ycbcr_texture 1 +#define __GLEE_GL_MESA_ycbcr_texture 1 +/* Constants */ +#define GL_UNSIGNED_SHORT_8_8_MESA 0x85BA +#define GL_UNSIGNED_SHORT_8_8_REV_MESA 0x85BB +#define GL_YCBCR_MESA 0x8757 +#endif + +/* GL_EXT_pixel_buffer_object */ + +#ifndef GL_EXT_pixel_buffer_object +#define GL_EXT_pixel_buffer_object 1 +#define __GLEE_GL_EXT_pixel_buffer_object 1 +/* Constants */ +#define GL_PIXEL_PACK_BUFFER_EXT 0x88EB +#define GL_PIXEL_UNPACK_BUFFER_EXT 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING_EXT 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING_EXT 0x88EF +#endif + +/* GL_NV_fragment_program_option */ + +#ifndef GL_NV_fragment_program_option +#define GL_NV_fragment_program_option 1 +#define __GLEE_GL_NV_fragment_program_option 1 +/* Constants */ +#endif + +/* GL_NV_fragment_program2 */ + +#ifndef GL_NV_fragment_program2 +#define GL_NV_fragment_program2 1 +#define __GLEE_GL_NV_fragment_program2 1 +/* Constants */ +#define GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV 0x88F4 +#define GL_MAX_PROGRAM_CALL_DEPTH_NV 0x88F5 +#define GL_MAX_PROGRAM_IF_DEPTH_NV 0x88F6 +#define GL_MAX_PROGRAM_LOOP_DEPTH_NV 0x88F7 +#define GL_MAX_PROGRAM_LOOP_COUNT_NV 0x88F8 +#endif + +/* GL_NV_vertex_program2_option */ + +#ifndef GL_NV_vertex_program2_option +#define GL_NV_vertex_program2_option 1 +#define __GLEE_GL_NV_vertex_program2_option 1 +/* Constants */ +#endif + +/* GL_NV_vertex_program3 */ + +#ifndef GL_NV_vertex_program3 +#define GL_NV_vertex_program3 1 +#define __GLEE_GL_NV_vertex_program3 1 +/* Constants */ +#endif + +/* GL_EXT_framebuffer_object */ + +#ifndef GL_EXT_framebuffer_object +#define GL_EXT_framebuffer_object 1 +#define __GLEE_GL_EXT_framebuffer_object 1 +/* Constants */ +#define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 +#define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 +#define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 +#define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC +#define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD +#define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF +#define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 +#define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 +#define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 +#define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 +#define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 +#define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 +#define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 +#define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 +#define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 +#define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 +#define GL_COLOR_ATTACHMENT10_EXT 0x8CEA +#define GL_COLOR_ATTACHMENT11_EXT 0x8CEB +#define GL_COLOR_ATTACHMENT12_EXT 0x8CEC +#define GL_COLOR_ATTACHMENT13_EXT 0x8CED +#define GL_COLOR_ATTACHMENT14_EXT 0x8CEE +#define GL_COLOR_ATTACHMENT15_EXT 0x8CEF +#define GL_DEPTH_ATTACHMENT_EXT 0x8D00 +#define GL_STENCIL_ATTACHMENT_EXT 0x8D20 +#define GL_FRAMEBUFFER_EXT 0x8D40 +#define GL_RENDERBUFFER_EXT 0x8D41 +#define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 +#define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 +#define GL_STENCIL_INDEX_EXT 0x8D45 +#define GL_STENCIL_INDEX1_EXT 0x8D46 +#define GL_STENCIL_INDEX4_EXT 0x8D47 +#define GL_STENCIL_INDEX8_EXT 0x8D48 +#define GL_STENCIL_INDEX16_EXT 0x8D49 +#define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 +typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFEREXTPROC) (GLuint renderbuffer); +typedef void (APIENTRYP PFNGLBINDRENDERBUFFEREXTPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSEXTPROC) (GLsizei n, const GLuint * renderbuffers); +typedef void (APIENTRYP PFNGLGENRENDERBUFFERSEXTPROC) (GLsizei n, GLuint * renderbuffers); +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFEREXTPROC) (GLuint framebuffer); +typedef void (APIENTRYP PFNGLBINDFRAMEBUFFEREXTPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSEXTPROC) (GLsizei n, const GLuint * framebuffers); +typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSEXTPROC) (GLsizei n, GLuint * framebuffers); +typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC) (GLenum target); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGENERATEMIPMAPEXTPROC) (GLenum target); +GLEE_EXTERN PFNGLISRENDERBUFFEREXTPROC pglIsRenderbufferEXT; +GLEE_EXTERN PFNGLBINDRENDERBUFFEREXTPROC pglBindRenderbufferEXT; +GLEE_EXTERN PFNGLDELETERENDERBUFFERSEXTPROC pglDeleteRenderbuffersEXT; +GLEE_EXTERN PFNGLGENRENDERBUFFERSEXTPROC pglGenRenderbuffersEXT; +GLEE_EXTERN PFNGLRENDERBUFFERSTORAGEEXTPROC pglRenderbufferStorageEXT; +GLEE_EXTERN PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC pglGetRenderbufferParameterivEXT; +GLEE_EXTERN PFNGLISFRAMEBUFFEREXTPROC pglIsFramebufferEXT; +GLEE_EXTERN PFNGLBINDFRAMEBUFFEREXTPROC pglBindFramebufferEXT; +GLEE_EXTERN PFNGLDELETEFRAMEBUFFERSEXTPROC pglDeleteFramebuffersEXT; +GLEE_EXTERN PFNGLGENFRAMEBUFFERSEXTPROC pglGenFramebuffersEXT; +GLEE_EXTERN PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC pglCheckFramebufferStatusEXT; +GLEE_EXTERN PFNGLFRAMEBUFFERTEXTURE1DEXTPROC pglFramebufferTexture1DEXT; +GLEE_EXTERN PFNGLFRAMEBUFFERTEXTURE2DEXTPROC pglFramebufferTexture2DEXT; +GLEE_EXTERN PFNGLFRAMEBUFFERTEXTURE3DEXTPROC pglFramebufferTexture3DEXT; +GLEE_EXTERN PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC pglFramebufferRenderbufferEXT; +GLEE_EXTERN PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC pglGetFramebufferAttachmentParameterivEXT; +GLEE_EXTERN PFNGLGENERATEMIPMAPEXTPROC pglGenerateMipmapEXT; +#define glIsRenderbufferEXT pglIsRenderbufferEXT +#define glBindRenderbufferEXT pglBindRenderbufferEXT +#define glDeleteRenderbuffersEXT pglDeleteRenderbuffersEXT +#define glGenRenderbuffersEXT pglGenRenderbuffersEXT +#define glRenderbufferStorageEXT pglRenderbufferStorageEXT +#define glGetRenderbufferParameterivEXT pglGetRenderbufferParameterivEXT +#define glIsFramebufferEXT pglIsFramebufferEXT +#define glBindFramebufferEXT pglBindFramebufferEXT +#define glDeleteFramebuffersEXT pglDeleteFramebuffersEXT +#define glGenFramebuffersEXT pglGenFramebuffersEXT +#define glCheckFramebufferStatusEXT pglCheckFramebufferStatusEXT +#define glFramebufferTexture1DEXT pglFramebufferTexture1DEXT +#define glFramebufferTexture2DEXT pglFramebufferTexture2DEXT +#define glFramebufferTexture3DEXT pglFramebufferTexture3DEXT +#define glFramebufferRenderbufferEXT pglFramebufferRenderbufferEXT +#define glGetFramebufferAttachmentParameterivEXT pglGetFramebufferAttachmentParameterivEXT +#define glGenerateMipmapEXT pglGenerateMipmapEXT +#endif + +/* GL_GREMEDY_string_marker */ + +#ifndef GL_GREMEDY_string_marker +#define GL_GREMEDY_string_marker 1 +#define __GLEE_GL_GREMEDY_string_marker 1 +/* Constants */ +typedef void (APIENTRYP PFNGLSTRINGMARKERGREMEDYPROC) (GLsizei len, const GLvoid * string); +GLEE_EXTERN PFNGLSTRINGMARKERGREMEDYPROC pglStringMarkerGREMEDY; +#define glStringMarkerGREMEDY pglStringMarkerGREMEDY +#endif + +/* GL_EXT_Cg_shader */ + +#ifndef GL_EXT_Cg_shader +#define GL_EXT_Cg_shader 1 +#define __GLEE_GL_EXT_Cg_shader 1 +/* Constants */ +#define GL_CG_VERTEX_SHADER_EXT 0x890E +#define GL_CG_FRAGMENT_SHADER_EXT 0x890F +#endif + +/* GL_EXT_timer_query */ + +#ifndef GL_EXT_timer_query +#define GL_EXT_timer_query 1 +#define __GLEE_GL_EXT_timer_query 1 +/* Constants */ +#define GL_TIME_ELAPSED_EXT 0x88BF +typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VEXTPROC) (GLuint id, GLenum pname, GLint64EXT * params); +typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VEXTPROC) (GLuint id, GLenum pname, GLuint64EXT * params); +GLEE_EXTERN PFNGLGETQUERYOBJECTI64VEXTPROC pglGetQueryObjecti64vEXT; +GLEE_EXTERN PFNGLGETQUERYOBJECTUI64VEXTPROC pglGetQueryObjectui64vEXT; +#define glGetQueryObjecti64vEXT pglGetQueryObjecti64vEXT +#define glGetQueryObjectui64vEXT pglGetQueryObjectui64vEXT +#endif + +/* GL_EXT_texture_buffer_object */ + +#ifndef GL_EXT_texture_buffer_object +#define GL_EXT_texture_buffer_object 1 +#define __GLEE_GL_EXT_texture_buffer_object 1 +/* Constants */ +#define GL_TEXTURE_BUFFER_EXT 0x8C2A +#define GL_MAX_TEXTURE_BUFFER_SIZE_EXT 0x8C2B +#define GL_TEXTURE_BINDING_BUFFER_EXT 0x8C2C +#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT 0x8C2D +#define GL_TEXTURE_BUFFER_FORMAT_EXT 0x8C2E +typedef void (APIENTRYP PFNGLTEXBUFFEREXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); +GLEE_EXTERN PFNGLTEXBUFFEREXTPROC pglTexBufferEXT; +#define glTexBufferEXT pglTexBufferEXT +#endif + +/* GL_EXT_gpu_shader4 */ + +#ifndef GL_EXT_gpu_shader4 +#define GL_EXT_gpu_shader4 1 +#define __GLEE_GL_EXT_gpu_shader4 1 +/* Constants */ +#define GL_SAMPLER_1D_ARRAY_EXT 0x8DC0 +#define GL_SAMPLER_2D_ARRAY_EXT 0x8DC1 +#define GL_SAMPLER_BUFFER_EXT 0x8DC2 +#define GL_SAMPLER_1D_ARRAY_SHADOW_EXT 0x8DC3 +#define GL_SAMPLER_2D_ARRAY_SHADOW_EXT 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW_EXT 0x8DC5 +#define GL_UNSIGNED_INT_VEC2_EXT 0x8DC6 +#define GL_UNSIGNED_INT_VEC3_EXT 0x8DC7 +#define GL_UNSIGNED_INT_VEC4_EXT 0x8DC8 +#define GL_INT_SAMPLER_1D_EXT 0x8DC9 +#define GL_INT_SAMPLER_2D_EXT 0x8DCA +#define GL_INT_SAMPLER_3D_EXT 0x8DCB +#define GL_INT_SAMPLER_CUBE_EXT 0x8DCC +#define GL_INT_SAMPLER_2D_RECT_EXT 0x8DCD +#define GL_INT_SAMPLER_1D_ARRAY_EXT 0x8DCE +#define GL_INT_SAMPLER_2D_ARRAY_EXT 0x8DCF +#define GL_INT_SAMPLER_BUFFER_EXT 0x8DD0 +#define GL_UNSIGNED_INT_SAMPLER_1D_EXT 0x8DD1 +#define GL_UNSIGNED_INT_SAMPLER_2D_EXT 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D_EXT 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE_EXT 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT 0x8DD5 +#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT 0x8DD6 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT 0x8DD7 +#define GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT 0x8DD8 +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT 0x88FD +typedef void (APIENTRYP PFNGLGETUNIFORMUIVEXTPROC) (GLuint program, GLint location, GLuint * params); +typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONEXTPROC) (GLuint program, GLuint color, const GLchar * name); +typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONEXTPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRYP PFNGLUNIFORM1UIEXTPROC) (GLint location, GLuint v0); +typedef void (APIENTRYP PFNGLUNIFORM2UIEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRYP PFNGLUNIFORM3UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRYP PFNGLUNIFORM4UIEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRYP PFNGLUNIFORM1UIVEXTPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRYP PFNGLUNIFORM2UIVEXTPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRYP PFNGLUNIFORM3UIVEXTPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRYP PFNGLUNIFORM4UIVEXTPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IEXTPROC) (GLuint index, GLint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IEXTPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIEXTPROC) (GLuint index, GLuint x); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVEXTPROC) (GLuint index, const GLint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVEXTPROC) (GLuint index, const GLint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVEXTPROC) (GLuint index, const GLint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVEXTPROC) (GLuint index, const GLint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVEXTPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVEXTPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVEXTPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVEXTPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVEXTPROC) (GLuint index, const GLbyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVEXTPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVEXTPROC) (GLuint index, const GLubyte * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVEXTPROC) (GLuint index, const GLushort * v); +typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTEREXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVEXTPROC) (GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVEXTPROC) (GLuint index, GLenum pname, GLuint * params); +GLEE_EXTERN PFNGLGETUNIFORMUIVEXTPROC pglGetUniformuivEXT; +GLEE_EXTERN PFNGLBINDFRAGDATALOCATIONEXTPROC pglBindFragDataLocationEXT; +GLEE_EXTERN PFNGLGETFRAGDATALOCATIONEXTPROC pglGetFragDataLocationEXT; +GLEE_EXTERN PFNGLUNIFORM1UIEXTPROC pglUniform1uiEXT; +GLEE_EXTERN PFNGLUNIFORM2UIEXTPROC pglUniform2uiEXT; +GLEE_EXTERN PFNGLUNIFORM3UIEXTPROC pglUniform3uiEXT; +GLEE_EXTERN PFNGLUNIFORM4UIEXTPROC pglUniform4uiEXT; +GLEE_EXTERN PFNGLUNIFORM1UIVEXTPROC pglUniform1uivEXT; +GLEE_EXTERN PFNGLUNIFORM2UIVEXTPROC pglUniform2uivEXT; +GLEE_EXTERN PFNGLUNIFORM3UIVEXTPROC pglUniform3uivEXT; +GLEE_EXTERN PFNGLUNIFORM4UIVEXTPROC pglUniform4uivEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI1IEXTPROC pglVertexAttribI1iEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI2IEXTPROC pglVertexAttribI2iEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI3IEXTPROC pglVertexAttribI3iEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI4IEXTPROC pglVertexAttribI4iEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI1UIEXTPROC pglVertexAttribI1uiEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI2UIEXTPROC pglVertexAttribI2uiEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI3UIEXTPROC pglVertexAttribI3uiEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI4UIEXTPROC pglVertexAttribI4uiEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI1IVEXTPROC pglVertexAttribI1ivEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI2IVEXTPROC pglVertexAttribI2ivEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI3IVEXTPROC pglVertexAttribI3ivEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI4IVEXTPROC pglVertexAttribI4ivEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI1UIVEXTPROC pglVertexAttribI1uivEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI2UIVEXTPROC pglVertexAttribI2uivEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI3UIVEXTPROC pglVertexAttribI3uivEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI4UIVEXTPROC pglVertexAttribI4uivEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI4BVEXTPROC pglVertexAttribI4bvEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI4SVEXTPROC pglVertexAttribI4svEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI4UBVEXTPROC pglVertexAttribI4ubvEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBI4USVEXTPROC pglVertexAttribI4usvEXT; +GLEE_EXTERN PFNGLVERTEXATTRIBIPOINTEREXTPROC pglVertexAttribIPointerEXT; +GLEE_EXTERN PFNGLGETVERTEXATTRIBIIVEXTPROC pglGetVertexAttribIivEXT; +GLEE_EXTERN PFNGLGETVERTEXATTRIBIUIVEXTPROC pglGetVertexAttribIuivEXT; +#define glGetUniformuivEXT pglGetUniformuivEXT +#define glBindFragDataLocationEXT pglBindFragDataLocationEXT +#define glGetFragDataLocationEXT pglGetFragDataLocationEXT +#define glUniform1uiEXT pglUniform1uiEXT +#define glUniform2uiEXT pglUniform2uiEXT +#define glUniform3uiEXT pglUniform3uiEXT +#define glUniform4uiEXT pglUniform4uiEXT +#define glUniform1uivEXT pglUniform1uivEXT +#define glUniform2uivEXT pglUniform2uivEXT +#define glUniform3uivEXT pglUniform3uivEXT +#define glUniform4uivEXT pglUniform4uivEXT +#define glVertexAttribI1iEXT pglVertexAttribI1iEXT +#define glVertexAttribI2iEXT pglVertexAttribI2iEXT +#define glVertexAttribI3iEXT pglVertexAttribI3iEXT +#define glVertexAttribI4iEXT pglVertexAttribI4iEXT +#define glVertexAttribI1uiEXT pglVertexAttribI1uiEXT +#define glVertexAttribI2uiEXT pglVertexAttribI2uiEXT +#define glVertexAttribI3uiEXT pglVertexAttribI3uiEXT +#define glVertexAttribI4uiEXT pglVertexAttribI4uiEXT +#define glVertexAttribI1ivEXT pglVertexAttribI1ivEXT +#define glVertexAttribI2ivEXT pglVertexAttribI2ivEXT +#define glVertexAttribI3ivEXT pglVertexAttribI3ivEXT +#define glVertexAttribI4ivEXT pglVertexAttribI4ivEXT +#define glVertexAttribI1uivEXT pglVertexAttribI1uivEXT +#define glVertexAttribI2uivEXT pglVertexAttribI2uivEXT +#define glVertexAttribI3uivEXT pglVertexAttribI3uivEXT +#define glVertexAttribI4uivEXT pglVertexAttribI4uivEXT +#define glVertexAttribI4bvEXT pglVertexAttribI4bvEXT +#define glVertexAttribI4svEXT pglVertexAttribI4svEXT +#define glVertexAttribI4ubvEXT pglVertexAttribI4ubvEXT +#define glVertexAttribI4usvEXT pglVertexAttribI4usvEXT +#define glVertexAttribIPointerEXT pglVertexAttribIPointerEXT +#define glGetVertexAttribIivEXT pglGetVertexAttribIivEXT +#define glGetVertexAttribIuivEXT pglGetVertexAttribIuivEXT +#endif + +/* GL_EXT_geometry_shader4 */ + +#ifndef GL_EXT_geometry_shader4 +#define GL_EXT_geometry_shader4 1 +#define __GLEE_GL_EXT_geometry_shader4 1 +/* Constants */ +#define GL_GEOMETRY_SHADER_EXT 0x8DD9 +#define GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT 0x8DDD +#define GL_MAX_VERTEX_VARYING_COMPONENTS_EXT 0x8DDE +#define GL_MAX_VARYING_COMPONENTS_EXT 0x8B4B +#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT 0x8DDF +#define GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT 0x8DE0 +#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT 0x8DE1 +#define GL_GEOMETRY_VERTICES_OUT_EXT 0x8DDA +#define GL_GEOMETRY_INPUT_TYPE_EXT 0x8DDB +#define GL_GEOMETRY_OUTPUT_TYPE_EXT 0x8DDC +#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT 0x8C29 +#define GL_LINES_ADJACENCY_EXT 0xA +#define GL_LINE_STRIP_ADJACENCY_EXT 0xB +#define GL_TRIANGLES_ADJACENCY_EXT 0xC +#define GL_TRIANGLE_STRIP_ADJACENCY_EXT 0xD +#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT 0x8DA7 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT 0x8DA8 +#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT 0x8DA9 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT 0x8CD4 +#define GL_PROGRAM_POINT_SIZE_EXT 0x8642 +typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); +GLEE_EXTERN PFNGLPROGRAMPARAMETERIEXTPROC pglProgramParameteriEXT; +GLEE_EXTERN PFNGLFRAMEBUFFERTEXTUREEXTPROC pglFramebufferTextureEXT; +GLEE_EXTERN PFNGLFRAMEBUFFERTEXTURELAYEREXTPROC pglFramebufferTextureLayerEXT; +GLEE_EXTERN PFNGLFRAMEBUFFERTEXTUREFACEEXTPROC pglFramebufferTextureFaceEXT; +#define glProgramParameteriEXT pglProgramParameteriEXT +#define glFramebufferTextureEXT pglFramebufferTextureEXT +#define glFramebufferTextureLayerEXT pglFramebufferTextureLayerEXT +#define glFramebufferTextureFaceEXT pglFramebufferTextureFaceEXT +#endif + +/* GL_EXT_bindable_uniform */ + +#ifndef GL_EXT_bindable_uniform +#define GL_EXT_bindable_uniform 1 +#define __GLEE_GL_EXT_bindable_uniform 1 +/* Constants */ +#define GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT 0x8DE2 +#define GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT 0x8DE3 +#define GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT 0x8DE4 +#define GL_MAX_BINDABLE_UNIFORM_SIZE_EXT 0x8DED +#define GL_UNIFORM_BUFFER_EXT 0x8DEE +#define GL_UNIFORM_BUFFER_BINDING_EXT 0x8DEF +typedef void (APIENTRYP PFNGLUNIFORMBUFFEREXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint (APIENTRYP PFNGLGETUNIFORMBUFFERSIZEEXTPROC) (GLuint program, GLint location); +typedef GLintptr (APIENTRYP PFNGLGETUNIFORMOFFSETEXTPROC) (GLuint program, GLint location); +GLEE_EXTERN PFNGLUNIFORMBUFFEREXTPROC pglUniformBufferEXT; +GLEE_EXTERN PFNGLGETUNIFORMBUFFERSIZEEXTPROC pglGetUniformBufferSizeEXT; +GLEE_EXTERN PFNGLGETUNIFORMOFFSETEXTPROC pglGetUniformOffsetEXT; +#define glUniformBufferEXT pglUniformBufferEXT +#define glGetUniformBufferSizeEXT pglGetUniformBufferSizeEXT +#define glGetUniformOffsetEXT pglGetUniformOffsetEXT +#endif + +/* GL_EXT_framebuffer_sRGB */ + +#ifndef GL_EXT_framebuffer_sRGB +#define GL_EXT_framebuffer_sRGB 1 +#define __GLEE_GL_EXT_framebuffer_sRGB 1 +/* Constants */ +#define GL_FRAMEBUFFER_SRGB_EXT 0x8DB9 +#define GL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x8DBA +#endif + +/* GL_EXT_texture_shared_exponent */ + +#ifndef GL_EXT_texture_shared_exponent +#define GL_EXT_texture_shared_exponent 1 +#define __GLEE_GL_EXT_texture_shared_exponent 1 +/* Constants */ +#define GL_RGB9_E5_EXT 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT 0x8C3E +#define GL_TEXTURE_SHARED_SIZE_EXT 0x8C3F +#endif + +/* GL_EXT_packed_float */ + +#ifndef GL_EXT_packed_float +#define GL_EXT_packed_float 1 +#define __GLEE_GL_EXT_packed_float 1 +/* Constants */ +#define GL_R11F_G11F_B10F_EXT 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV_EXT 0x8C3B +#define GL_RGBA_SIGNED_COMPONENTS_EXT 0x8C3C +#endif + +/* GL_EXT_texture_array */ + +#ifndef GL_EXT_texture_array +#define GL_EXT_texture_array 1 +#define __GLEE_GL_EXT_texture_array 1 +/* Constants */ +#define GL_TEXTURE_1D_ARRAY_EXT 0x8C18 +#define GL_PROXY_TEXTURE_1D_ARRAY_EXT 0x8C19 +#define GL_TEXTURE_2D_ARRAY_EXT 0x8C1A +#define GL_PROXY_TEXTURE_2D_ARRAY_EXT 0x8C1B +#define GL_TEXTURE_BINDING_1D_ARRAY_EXT 0x8C1C +#define GL_TEXTURE_BINDING_2D_ARRAY_EXT 0x8C1D +#define GL_MAX_ARRAY_TEXTURE_LAYERS_EXT 0x88FF +#define GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT 0x884E +#endif + +/* GL_EXT_texture_integer */ + +#ifndef GL_EXT_texture_integer +#define GL_EXT_texture_integer 1 +#define __GLEE_GL_EXT_texture_integer 1 +/* Constants */ +#define GL_RGBA32UI_EXT 0x8D70 +#define GL_RGB32UI_EXT 0x8D71 +#define GL_ALPHA32UI_EXT 0x8D72 +#define GL_INTENSITY32UI_EXT 0x8D73 +#define GL_LUMINANCE32UI_EXT 0x8D74 +#define GL_LUMINANCE_ALPHA32UI_EXT 0x8D75 +#define GL_RGBA16UI_EXT 0x8D76 +#define GL_RGB16UI_EXT 0x8D77 +#define GL_ALPHA16UI_EXT 0x8D78 +#define GL_INTENSITY16UI_EXT 0x8D79 +#define GL_LUMINANCE16UI_EXT 0x8D7A +#define GL_LUMINANCE_ALPHA16UI_EXT 0x8D7B +#define GL_RGBA8UI_EXT 0x8D7C +#define GL_RGB8UI_EXT 0x8D7D +#define GL_ALPHA8UI_EXT 0x8D7E +#define GL_INTENSITY8UI_EXT 0x8D7F +#define GL_LUMINANCE8UI_EXT 0x8D80 +#define GL_LUMINANCE_ALPHA8UI_EXT 0x8D81 +#define GL_RGBA32I_EXT 0x8D82 +#define GL_RGB32I_EXT 0x8D83 +#define GL_ALPHA32I_EXT 0x8D84 +#define GL_INTENSITY32I_EXT 0x8D85 +#define GL_LUMINANCE32I_EXT 0x8D86 +#define GL_LUMINANCE_ALPHA32I_EXT 0x8D87 +#define GL_RGBA16I_EXT 0x8D88 +#define GL_RGB16I_EXT 0x8D89 +#define GL_ALPHA16I_EXT 0x8D8A +#define GL_INTENSITY16I_EXT 0x8D8B +#define GL_LUMINANCE16I_EXT 0x8D8C +#define GL_LUMINANCE_ALPHA16I_EXT 0x8D8D +#define GL_RGBA8I_EXT 0x8D8E +#define GL_RGB8I_EXT 0x8D8F +#define GL_ALPHA8I_EXT 0x8D90 +#define GL_INTENSITY8I_EXT 0x8D91 +#define GL_LUMINANCE8I_EXT 0x8D92 +#define GL_LUMINANCE_ALPHA8I_EXT 0x8D93 +#define GL_RED_INTEGER_EXT 0x8D94 +#define GL_GREEN_INTEGER_EXT 0x8D95 +#define GL_BLUE_INTEGER_EXT 0x8D96 +#define GL_ALPHA_INTEGER_EXT 0x8D97 +#define GL_RGB_INTEGER_EXT 0x8D98 +#define GL_RGBA_INTEGER_EXT 0x8D99 +#define GL_BGR_INTEGER_EXT 0x8D9A +#define GL_BGRA_INTEGER_EXT 0x8D9B +#define GL_LUMINANCE_INTEGER_EXT 0x8D9C +#define GL_LUMINANCE_ALPHA_INTEGER_EXT 0x8D9D +#define GL_RGBA_INTEGER_MODE_EXT 0x8D9E +typedef void (APIENTRYP PFNGLTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, const GLuint * params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVEXTPROC) (GLenum target, GLenum pname, GLuint * params); +typedef void (APIENTRYP PFNGLCLEARCOLORIIEXTPROC) (GLint red, GLint green, GLint blue, GLint alpha); +typedef void (APIENTRYP PFNGLCLEARCOLORIUIEXTPROC) (GLuint red, GLuint green, GLuint blue, GLuint alpha); +GLEE_EXTERN PFNGLTEXPARAMETERIIVEXTPROC pglTexParameterIivEXT; +GLEE_EXTERN PFNGLTEXPARAMETERIUIVEXTPROC pglTexParameterIuivEXT; +GLEE_EXTERN PFNGLGETTEXPARAMETERIIVEXTPROC pglGetTexParameterIivEXT; +GLEE_EXTERN PFNGLGETTEXPARAMETERIUIVEXTPROC pglGetTexParameterIuivEXT; +GLEE_EXTERN PFNGLCLEARCOLORIIEXTPROC pglClearColorIiEXT; +GLEE_EXTERN PFNGLCLEARCOLORIUIEXTPROC pglClearColorIuiEXT; +#define glTexParameterIivEXT pglTexParameterIivEXT +#define glTexParameterIuivEXT pglTexParameterIuivEXT +#define glGetTexParameterIivEXT pglGetTexParameterIivEXT +#define glGetTexParameterIuivEXT pglGetTexParameterIuivEXT +#define glClearColorIiEXT pglClearColorIiEXT +#define glClearColorIuiEXT pglClearColorIuiEXT +#endif + +/* GL_NV_depth_buffer_float */ + +#ifndef GL_NV_depth_buffer_float +#define GL_NV_depth_buffer_float 1 +#define __GLEE_GL_NV_depth_buffer_float 1 +/* Constants */ +#define GL_DEPTH_COMPONENT32F_NV 0x8DAB +#define GL_DEPTH32F_STENCIL8_NV 0x8DAC +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV 0x8DAD +#define GL_DEPTH_BUFFER_FLOAT_MODE_NV 0x8DAF +typedef void (APIENTRYP PFNGLDEPTHRANGEDNVPROC) (GLdouble zNear, GLdouble zFar); +typedef void (APIENTRYP PFNGLCLEARDEPTHDNVPROC) (GLdouble depth); +typedef void (APIENTRYP PFNGLDEPTHBOUNDSDNVPROC) (GLdouble zmin, GLdouble zmax); +GLEE_EXTERN PFNGLDEPTHRANGEDNVPROC pglDepthRangedNV; +GLEE_EXTERN PFNGLCLEARDEPTHDNVPROC pglClearDepthdNV; +GLEE_EXTERN PFNGLDEPTHBOUNDSDNVPROC pglDepthBoundsdNV; +#define glDepthRangedNV pglDepthRangedNV +#define glClearDepthdNV pglClearDepthdNV +#define glDepthBoundsdNV pglDepthBoundsdNV +#endif + +/* GL_EXT_texture_compression_latc */ + +#ifndef GL_EXT_texture_compression_latc +#define GL_EXT_texture_compression_latc 1 +#define __GLEE_GL_EXT_texture_compression_latc 1 +/* Constants */ +#define GL_COMPRESSED_LUMINANCE_LATC1_EXT 0x8C70 +#define GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT 0x8C71 +#define GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT 0x8C72 +#define GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT 0x8C73 +#endif + +/* GL_NV_transform_feedback */ + +#ifndef GL_NV_transform_feedback +#define GL_NV_transform_feedback 1 +#define __GLEE_GL_NV_transform_feedback 1 +/* Constants */ +#define GL_BACK_PRIMARY_COLOR_NV 0x8C77 +#define GL_BACK_SECONDARY_COLOR_NV 0x8C78 +#define GL_TEXTURE_COORD_NV 0x8C79 +#define GL_CLIP_DISTANCE_NV 0x8C7A +#define GL_VERTEX_ID_NV 0x8C7B +#define GL_PRIMITIVE_ID_NV 0x8C7C +#define GL_GENERIC_ATTRIB_NV 0x8C7D +#define GL_TRANSFORM_FEEDBACK_ATTRIBS_NV 0x8C7E +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV 0x8C80 +#define GL_ACTIVE_VARYINGS_NV 0x8C81 +#define GL_ACTIVE_VARYING_MAX_LENGTH_NV 0x8C82 +#define GL_TRANSFORM_FEEDBACK_VARYINGS_NV 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START_NV 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV 0x8C85 +#define GL_TRANSFORM_FEEDBACK_RECORD_NV 0x8C86 +#define GL_PRIMITIVES_GENERATED_NV 0x8C87 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV 0x8C88 +#define GL_RASTERIZER_DISCARD_NV 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_ATTRIBS_NV 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV 0x8C8B +#define GL_INTERLEAVED_ATTRIBS_NV 0x8C8C +#define GL_SEPARATE_ATTRIBS_NV 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER_NV 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV 0x8C8F +typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKNVPROC) (GLenum primitiveMode); +typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKNVPROC) (); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC) (GLuint count, const GLint * attribs, GLenum bufferMode); +typedef void (APIENTRYP PFNGLBINDBUFFERRANGENVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRYP PFNGLBINDBUFFEROFFSETNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRYP PFNGLBINDBUFFERBASENVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC) (GLuint program, GLsizei count, const GLint * locations, GLenum bufferMode); +typedef void (APIENTRYP PFNGLACTIVEVARYINGNVPROC) (GLuint program, const GLchar * name); +typedef GLint (APIENTRYP PFNGLGETVARYINGLOCATIONNVPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRYP PFNGLGETACTIVEVARYINGNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); +typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC) (GLuint program, GLuint index, GLint * location); +GLEE_EXTERN PFNGLBEGINTRANSFORMFEEDBACKNVPROC pglBeginTransformFeedbackNV; +GLEE_EXTERN PFNGLENDTRANSFORMFEEDBACKNVPROC pglEndTransformFeedbackNV; +GLEE_EXTERN PFNGLTRANSFORMFEEDBACKATTRIBSNVPROC pglTransformFeedbackAttribsNV; +GLEE_EXTERN PFNGLBINDBUFFERRANGENVPROC pglBindBufferRangeNV; +GLEE_EXTERN PFNGLBINDBUFFEROFFSETNVPROC pglBindBufferOffsetNV; +GLEE_EXTERN PFNGLBINDBUFFERBASENVPROC pglBindBufferBaseNV; +GLEE_EXTERN PFNGLTRANSFORMFEEDBACKVARYINGSNVPROC pglTransformFeedbackVaryingsNV; +GLEE_EXTERN PFNGLACTIVEVARYINGNVPROC pglActiveVaryingNV; +GLEE_EXTERN PFNGLGETVARYINGLOCATIONNVPROC pglGetVaryingLocationNV; +GLEE_EXTERN PFNGLGETACTIVEVARYINGNVPROC pglGetActiveVaryingNV; +GLEE_EXTERN PFNGLGETTRANSFORMFEEDBACKVARYINGNVPROC pglGetTransformFeedbackVaryingNV; +#define glBeginTransformFeedbackNV pglBeginTransformFeedbackNV +#define glEndTransformFeedbackNV pglEndTransformFeedbackNV +#define glTransformFeedbackAttribsNV pglTransformFeedbackAttribsNV +#define glBindBufferRangeNV pglBindBufferRangeNV +#define glBindBufferOffsetNV pglBindBufferOffsetNV +#define glBindBufferBaseNV pglBindBufferBaseNV +#define glTransformFeedbackVaryingsNV pglTransformFeedbackVaryingsNV +#define glActiveVaryingNV pglActiveVaryingNV +#define glGetVaryingLocationNV pglGetVaryingLocationNV +#define glGetActiveVaryingNV pglGetActiveVaryingNV +#define glGetTransformFeedbackVaryingNV pglGetTransformFeedbackVaryingNV +#endif + +/* GL_NV_geometry_program4 */ + +#ifndef GL_NV_geometry_program4 +#define GL_NV_geometry_program4 1 +#define __GLEE_GL_NV_geometry_program4 1 +/* Constants */ +#define GL_GEOMETRY_PROGRAM_NV 0x8C26 +#define GL_MAX_PROGRAM_OUTPUT_VERTICES_NV 0x8C27 +#define GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV 0x8C28 +typedef void (APIENTRYP PFNGLPROGRAMVERTEXLIMITNVPROC) (GLenum target, GLint limit); +GLEE_EXTERN PFNGLPROGRAMVERTEXLIMITNVPROC pglProgramVertexLimitNV; +#define glProgramVertexLimitNV pglProgramVertexLimitNV +#endif + +/* GL_NV_gpu_program4 */ + +#ifndef GL_NV_gpu_program4 +#define GL_NV_gpu_program4 1 +#define __GLEE_GL_NV_gpu_program4 1 +/* Constants */ +#define GL_MIN_PROGRAM_TEXEL_OFFSET_NV 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET_NV 0x8905 +#define GL_PROGRAM_ATTRIB_COMPONENTS_NV 0x8906 +#define GL_PROGRAM_RESULT_COMPONENTS_NV 0x8907 +#define GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV 0x8908 +#define GL_MAX_PROGRAM_RESULT_COMPONENTS_NV 0x8909 +#define GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV 0x8DA5 +#define GL_MAX_PROGRAM_GENERIC_RESULTS_NV 0x8DA6 +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint * params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint * params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint * params); +typedef void (APIENTRYP PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint * params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4INVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4IVNVPROC) (GLenum target, GLuint index, const GLint * params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4IVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint * params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UINVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERI4UIVNVPROC) (GLenum target, GLuint index, const GLuint * params); +typedef void (APIENTRYP PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint * params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint * params); +typedef void (APIENTRYP PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint * params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIIVNVPROC) (GLenum target, GLuint index, GLint * params); +typedef void (APIENTRYP PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC) (GLenum target, GLuint index, GLuint * params); +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETERI4INVPROC pglProgramLocalParameterI4iNV; +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETERI4IVNVPROC pglProgramLocalParameterI4ivNV; +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETERSI4IVNVPROC pglProgramLocalParametersI4ivNV; +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETERI4UINVPROC pglProgramLocalParameterI4uiNV; +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETERI4UIVNVPROC pglProgramLocalParameterI4uivNV; +GLEE_EXTERN PFNGLPROGRAMLOCALPARAMETERSI4UIVNVPROC pglProgramLocalParametersI4uivNV; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETERI4INVPROC pglProgramEnvParameterI4iNV; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETERI4IVNVPROC pglProgramEnvParameterI4ivNV; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETERSI4IVNVPROC pglProgramEnvParametersI4ivNV; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETERI4UINVPROC pglProgramEnvParameterI4uiNV; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETERI4UIVNVPROC pglProgramEnvParameterI4uivNV; +GLEE_EXTERN PFNGLPROGRAMENVPARAMETERSI4UIVNVPROC pglProgramEnvParametersI4uivNV; +GLEE_EXTERN PFNGLGETPROGRAMLOCALPARAMETERIIVNVPROC pglGetProgramLocalParameterIivNV; +GLEE_EXTERN PFNGLGETPROGRAMLOCALPARAMETERIUIVNVPROC pglGetProgramLocalParameterIuivNV; +GLEE_EXTERN PFNGLGETPROGRAMENVPARAMETERIIVNVPROC pglGetProgramEnvParameterIivNV; +GLEE_EXTERN PFNGLGETPROGRAMENVPARAMETERIUIVNVPROC pglGetProgramEnvParameterIuivNV; +#define glProgramLocalParameterI4iNV pglProgramLocalParameterI4iNV +#define glProgramLocalParameterI4ivNV pglProgramLocalParameterI4ivNV +#define glProgramLocalParametersI4ivNV pglProgramLocalParametersI4ivNV +#define glProgramLocalParameterI4uiNV pglProgramLocalParameterI4uiNV +#define glProgramLocalParameterI4uivNV pglProgramLocalParameterI4uivNV +#define glProgramLocalParametersI4uivNV pglProgramLocalParametersI4uivNV +#define glProgramEnvParameterI4iNV pglProgramEnvParameterI4iNV +#define glProgramEnvParameterI4ivNV pglProgramEnvParameterI4ivNV +#define glProgramEnvParametersI4ivNV pglProgramEnvParametersI4ivNV +#define glProgramEnvParameterI4uiNV pglProgramEnvParameterI4uiNV +#define glProgramEnvParameterI4uivNV pglProgramEnvParameterI4uivNV +#define glProgramEnvParametersI4uivNV pglProgramEnvParametersI4uivNV +#define glGetProgramLocalParameterIivNV pglGetProgramLocalParameterIivNV +#define glGetProgramLocalParameterIuivNV pglGetProgramLocalParameterIuivNV +#define glGetProgramEnvParameterIivNV pglGetProgramEnvParameterIivNV +#define glGetProgramEnvParameterIuivNV pglGetProgramEnvParameterIuivNV +#endif + +/* GL_NV_framebuffer_multisample_coverage */ + +#ifndef GL_NV_framebuffer_multisample_coverage +#define GL_NV_framebuffer_multisample_coverage 1 +#define __GLEE_GL_NV_framebuffer_multisample_coverage 1 +/* Constants */ +#define GL_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8CAB +#define GL_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E10 +#define GL_MAX_RENDERBUFFER_COVERAGE_SAMPLES_NV 0x8D57 +#define GL_MAX_RENDERBUFFER_COLOR_SAMPLES_NV 0x8E11 +#define GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV 0x8E12 +#define GL_MULTISAMPLE_COVERAGE_MODES_NV 0x8E13 +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +GLEE_EXTERN PFNGLRENDERBUFFERSTORAGEMULTISAMPLECOVERAGENVPROC pglRenderbufferStorageMultisampleCoverageNV; +#define glRenderbufferStorageMultisampleCoverageNV pglRenderbufferStorageMultisampleCoverageNV +#endif + +/* GL_EXT_framebuffer_multisample */ + +#ifndef GL_EXT_framebuffer_multisample +#define GL_EXT_framebuffer_multisample 1 +#define __GLEE_GL_EXT_framebuffer_multisample 1 +/* Constants */ +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56 +#define GL_MAX_SAMPLES_EXT 0x8D57 +#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB +typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GLEE_EXTERN PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC pglRenderbufferStorageMultisampleEXT; +#define glRenderbufferStorageMultisampleEXT pglRenderbufferStorageMultisampleEXT +#endif + +/* GL_EXT_framebuffer_blit */ + +#ifndef GL_EXT_framebuffer_blit +#define GL_EXT_framebuffer_blit 1 +#define __GLEE_GL_EXT_framebuffer_blit 1 +/* Constants */ +#define GL_READ_FRAMEBUFFER_EXT 0x8CA8 +#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9 +#define GL_DRAW_FRAMEBUFFER_BINDING_EXT 0x8CA6 +#define GL_READ_FRAMEBUFFER_BINDING_EXT 0x8CAA +typedef void (APIENTRYP PFNGLBLITFRAMEBUFFEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GLEE_EXTERN PFNGLBLITFRAMEBUFFEREXTPROC pglBlitFramebufferEXT; +#define glBlitFramebufferEXT pglBlitFramebufferEXT +#endif + +/* GL_EXT_texture_compression_rgtc */ + +#ifndef GL_EXT_texture_compression_rgtc +#define GL_EXT_texture_compression_rgtc 1 +#define __GLEE_GL_EXT_texture_compression_rgtc 1 +/* Constants */ +#define GL_COMPRESSED_RED_RGTC1_EXT 0x8DBB +#define GL_COMPRESSED_SIGNED_RED_RGTC1_EXT 0x8DBC +#define GL_COMPRESSED_RED_GREEN_RGTC2_EXT 0x8DBD +#define GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT 0x8DBE +#endif + +/* GL_EXT_color_matrix */ + +#ifndef GL_EXT_color_matrix +#define GL_EXT_color_matrix 1 +#define __GLEE_GL_EXT_color_matrix 1 +/* Constants */ +#endif + +/* GL_SGIX_texture_select */ + +#ifndef GL_SGIX_texture_select +#define GL_SGIX_texture_select 1 +#define __GLEE_GL_SGIX_texture_select 1 +/* Constants */ +#endif + +/* GL_INGR_blend_func_separate */ + +#ifndef GL_INGR_blend_func_separate +#define GL_INGR_blend_func_separate 1 +#define __GLEE_GL_INGR_blend_func_separate 1 +/* Constants */ +typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEINGRPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +GLEE_EXTERN PFNGLBLENDFUNCSEPARATEINGRPROC pglBlendFuncSeparateINGR; +#define glBlendFuncSeparateINGR pglBlendFuncSeparateINGR +#endif + +/* GL_SGIX_depth_pass_instrument */ + +#ifndef GL_SGIX_depth_pass_instrument +#define GL_SGIX_depth_pass_instrument 1 +#define __GLEE_GL_SGIX_depth_pass_instrument 1 +/* Constants */ +#endif + +/* GL_SGIX_igloo_interface */ + +#ifndef GL_SGIX_igloo_interface +#define GL_SGIX_igloo_interface 1 +#define __GLEE_GL_SGIX_igloo_interface 1 +/* Constants */ +typedef void (APIENTRYP PFNGLIGLOOINTERFACESGIXPROC) (GLenum pname, const GLvoid * params); +GLEE_EXTERN PFNGLIGLOOINTERFACESGIXPROC pglIglooInterfaceSGIX; +#define glIglooInterfaceSGIX pglIglooInterfaceSGIX +#endif + +/* GL_EXT_draw_buffers2 */ + +#ifndef GL_EXT_draw_buffers2 +#define GL_EXT_draw_buffers2 1 +#define __GLEE_GL_EXT_draw_buffers2 1 +/* Constants */ +typedef void (APIENTRYP PFNGLCOLORMASKINDEXEDEXTPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRYP PFNGLGETBOOLEANINDEXEDVEXTPROC) (GLenum target, GLuint index, GLboolean * data); +typedef void (APIENTRYP PFNGLGETINTEGERINDEXEDVEXTPROC) (GLenum target, GLuint index, GLint * data); +typedef void (APIENTRYP PFNGLENABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRYP PFNGLDISABLEINDEXEDEXTPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRYP PFNGLISENABLEDINDEXEDEXTPROC) (GLenum target, GLuint index); +GLEE_EXTERN PFNGLCOLORMASKINDEXEDEXTPROC pglColorMaskIndexedEXT; +GLEE_EXTERN PFNGLGETBOOLEANINDEXEDVEXTPROC pglGetBooleanIndexedvEXT; +GLEE_EXTERN PFNGLGETINTEGERINDEXEDVEXTPROC pglGetIntegerIndexedvEXT; +GLEE_EXTERN PFNGLENABLEINDEXEDEXTPROC pglEnableIndexedEXT; +GLEE_EXTERN PFNGLDISABLEINDEXEDEXTPROC pglDisableIndexedEXT; +GLEE_EXTERN PFNGLISENABLEDINDEXEDEXTPROC pglIsEnabledIndexedEXT; +#define glColorMaskIndexedEXT pglColorMaskIndexedEXT +#define glGetBooleanIndexedvEXT pglGetBooleanIndexedvEXT +#define glGetIntegerIndexedvEXT pglGetIntegerIndexedvEXT +#define glEnableIndexedEXT pglEnableIndexedEXT +#define glDisableIndexedEXT pglDisableIndexedEXT +#define glIsEnabledIndexedEXT pglIsEnabledIndexedEXT +#endif + +/* GL_NV_parameter_buffer_object */ + +#ifndef GL_NV_parameter_buffer_object +#define GL_NV_parameter_buffer_object 1 +#define __GLEE_GL_NV_parameter_buffer_object 1 +/* Constants */ +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat * params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint * params); +typedef void (APIENTRYP PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLuint * params); +GLEE_EXTERN PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC pglProgramBufferParametersfvNV; +GLEE_EXTERN PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC pglProgramBufferParametersIivNV; +GLEE_EXTERN PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC pglProgramBufferParametersIuivNV; +#define glProgramBufferParametersfvNV pglProgramBufferParametersfvNV +#define glProgramBufferParametersIivNV pglProgramBufferParametersIivNV +#define glProgramBufferParametersIuivNV pglProgramBufferParametersIuivNV +#endif + +/* GL_EXT_draw_instanced */ + +#ifndef GL_EXT_draw_instanced +#define GL_EXT_draw_instanced 1 +#define __GLEE_GL_EXT_draw_instanced 1 +/* Constants */ +typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDEXTPROC) (GLenum mode, GLint start, GLsizei count, GLsizei primcount); +typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount); +GLEE_EXTERN PFNGLDRAWARRAYSINSTANCEDEXTPROC pglDrawArraysInstancedEXT; +GLEE_EXTERN PFNGLDRAWELEMENTSINSTANCEDEXTPROC pglDrawElementsInstancedEXT; +#define glDrawArraysInstancedEXT pglDrawArraysInstancedEXT +#define glDrawElementsInstancedEXT pglDrawElementsInstancedEXT +#endif + +/* GL_EXT_fragment_lighting */ + +#ifndef GL_EXT_fragment_lighting +#define GL_EXT_fragment_lighting 1 +#define __GLEE_GL_EXT_fragment_lighting 1 +/* Constants */ +#define GL_FRAGMENT_LIGHTING_EXT 0x8400 +#define GL_FRAGMENT_COLOR_MATERIAL_EXT 0x8401 +#define GL_FRAGMENT_COLOR_MATERIAL_FACE_EXT 0x8402 +#define GL_FRAGMENT_COLOR_MATERIAL_PARAMETER_EXT 0x8403 +#define GL_MAX_FRAGMENT_LIGHTS_EXT 0x8404 +#define GL_MAX_ACTIVE_LIGHTS_EXT 0x8405 +#define GL_CURRENT_RASTER_NORMAL_EXT 0x8406 +#define GL_LIGHT_ENV_MODE_EXT 0x8407 +#define GL_FRAGMENT_LIGHT_MODEL_LOCAL_VIEWER_EXT 0x8408 +#define GL_FRAGMENT_LIGHT_MODEL_TWO_SIDE_EXT 0x8409 +#define GL_FRAGMENT_LIGHT_MODEL_AMBIENT_EXT 0x840A +#define GL_FRAGMENT_LIGHT_MODEL_NORMAL_INTERPOLATION_EXT 0x840B +#define GL_FRAGMENT_LIGHT0_EXT 0x840C +#define GL_FRAGMENT_LIGHT7_EXT 0x8413 +typedef GLvoid (APIENTRYP PFNGLFRAGMENTLIGHTMODELIEXTPROC) (GLenum pname, GLint param); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTLIGHTMODELFEXTPROC) (GLenum pname, GLfloat param); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVEXTPROC) (GLenum pname, GLint * params); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVEXTPROC) (GLenum pname, GLfloat * params); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTLIGHTIEXTPROC) (GLenum light, GLenum pname, GLint param); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTLIGHTFEXTPROC) (GLenum light, GLenum pname, GLfloat param); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint * params); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat * params); +typedef GLvoid (APIENTRYP PFNGLGETFRAGMENTLIGHTIVEXTPROC) (GLenum light, GLenum pname, GLint * params); +typedef GLvoid (APIENTRYP PFNGLGETFRAGMENTLIGHTFVEXTPROC) (GLenum light, GLenum pname, GLfloat * params); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTMATERIALFEXTPROC) (GLenum face, GLenum pname, const GLfloat param); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTMATERIALIEXTPROC) (GLenum face, GLenum pname, const GLint param); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat * params); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint * params); +typedef GLvoid (APIENTRYP PFNGLFRAGMENTCOLORMATERIALEXTPROC) (GLenum face, GLenum mode); +typedef GLvoid (APIENTRYP PFNGLGETFRAGMENTMATERIALFVEXTPROC) (GLenum face, GLenum pname, const GLfloat * params); +typedef GLvoid (APIENTRYP PFNGLGETFRAGMENTMATERIALIVEXTPROC) (GLenum face, GLenum pname, const GLint * params); +typedef GLvoid (APIENTRYP PFNGLLIGHTENVIEXTPROC) (GLenum pname, GLint param); +GLEE_EXTERN PFNGLFRAGMENTLIGHTMODELIEXTPROC pglFragmentLightModeliEXT; +GLEE_EXTERN PFNGLFRAGMENTLIGHTMODELFEXTPROC pglFragmentLightModelfEXT; +GLEE_EXTERN PFNGLFRAGMENTLIGHTMODELIVEXTPROC pglFragmentLightModelivEXT; +GLEE_EXTERN PFNGLFRAGMENTLIGHTMODELFVEXTPROC pglFragmentLightModelfvEXT; +GLEE_EXTERN PFNGLFRAGMENTLIGHTIEXTPROC pglFragmentLightiEXT; +GLEE_EXTERN PFNGLFRAGMENTLIGHTFEXTPROC pglFragmentLightfEXT; +GLEE_EXTERN PFNGLFRAGMENTLIGHTIVEXTPROC pglFragmentLightivEXT; +GLEE_EXTERN PFNGLFRAGMENTLIGHTFVEXTPROC pglFragmentLightfvEXT; +GLEE_EXTERN PFNGLGETFRAGMENTLIGHTIVEXTPROC pglGetFragmentLightivEXT; +GLEE_EXTERN PFNGLGETFRAGMENTLIGHTFVEXTPROC pglGetFragmentLightfvEXT; +GLEE_EXTERN PFNGLFRAGMENTMATERIALFEXTPROC pglFragmentMaterialfEXT; +GLEE_EXTERN PFNGLFRAGMENTMATERIALIEXTPROC pglFragmentMaterialiEXT; +GLEE_EXTERN PFNGLFRAGMENTMATERIALFVEXTPROC pglFragmentMaterialfvEXT; +GLEE_EXTERN PFNGLFRAGMENTMATERIALIVEXTPROC pglFragmentMaterialivEXT; +GLEE_EXTERN PFNGLFRAGMENTCOLORMATERIALEXTPROC pglFragmentColorMaterialEXT; +GLEE_EXTERN PFNGLGETFRAGMENTMATERIALFVEXTPROC pglGetFragmentMaterialfvEXT; +GLEE_EXTERN PFNGLGETFRAGMENTMATERIALIVEXTPROC pglGetFragmentMaterialivEXT; +GLEE_EXTERN PFNGLLIGHTENVIEXTPROC pglLightEnviEXT; +#define glFragmentLightModeliEXT pglFragmentLightModeliEXT +#define glFragmentLightModelfEXT pglFragmentLightModelfEXT +#define glFragmentLightModelivEXT pglFragmentLightModelivEXT +#define glFragmentLightModelfvEXT pglFragmentLightModelfvEXT +#define glFragmentLightiEXT pglFragmentLightiEXT +#define glFragmentLightfEXT pglFragmentLightfEXT +#define glFragmentLightivEXT pglFragmentLightivEXT +#define glFragmentLightfvEXT pglFragmentLightfvEXT +#define glGetFragmentLightivEXT pglGetFragmentLightivEXT +#define glGetFragmentLightfvEXT pglGetFragmentLightfvEXT +#define glFragmentMaterialfEXT pglFragmentMaterialfEXT +#define glFragmentMaterialiEXT pglFragmentMaterialiEXT +#define glFragmentMaterialfvEXT pglFragmentMaterialfvEXT +#define glFragmentMaterialivEXT pglFragmentMaterialivEXT +#define glFragmentColorMaterialEXT pglFragmentColorMaterialEXT +#define glGetFragmentMaterialfvEXT pglGetFragmentMaterialfvEXT +#define glGetFragmentMaterialivEXT pglGetFragmentMaterialivEXT +#define glLightEnviEXT pglLightEnviEXT +#endif + +/* GL_EXT_packed_depth_stencil */ + +#ifndef GL_EXT_packed_depth_stencil +#define GL_EXT_packed_depth_stencil 1 +#define __GLEE_GL_EXT_packed_depth_stencil 1 +/* Constants */ +#define GL_DEPTH_STENCIL_EXT 0x84F9 +#define GL_UNSIGNED_INT_24_8_EXT 0x84FA +#define GL_DEPTH24_STENCIL8_EXT 0x88F0 +#define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 +#endif + +/* GL_EXT_scene_marker */ + +#ifndef GL_EXT_scene_marker +#define GL_EXT_scene_marker 1 +#define __GLEE_GL_EXT_scene_marker 1 +/* Constants */ +typedef GLvoid (APIENTRYP PFNGLBEGINSCENEEXTPROC) (); +typedef GLvoid (APIENTRYP PFNGLENDSCENEEXTPROC) (); +GLEE_EXTERN PFNGLBEGINSCENEEXTPROC pglBeginSceneEXT; +GLEE_EXTERN PFNGLENDSCENEEXTPROC pglEndSceneEXT; +#define glBeginSceneEXT pglBeginSceneEXT +#define glEndSceneEXT pglEndSceneEXT +#endif + +/* GL_EXT_stencil_clear_tag */ + +#ifndef GL_EXT_stencil_clear_tag +#define GL_EXT_stencil_clear_tag 1 +#define __GLEE_GL_EXT_stencil_clear_tag 1 +/* Constants */ +#define GL_STENCIL_TAG_BITS_EXT 0x88F2 +#define GL_STENCIL_CLEAR_TAG_VALUE_EXT 0x88F3 +#endif + +/* GL_EXT_texture_compression_dxt1 */ + +#ifndef GL_EXT_texture_compression_dxt1 +#define GL_EXT_texture_compression_dxt1 1 +#define __GLEE_GL_EXT_texture_compression_dxt1 1 +/* Constants */ +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#endif + +/* GL_EXT_texture_env */ + +#ifndef GL_EXT_texture_env +#define GL_EXT_texture_env 1 +#define __GLEE_GL_EXT_texture_env 1 +/* Constants */ +#define GL_TEXTURE_ENV0_EXT 0 +#define GL_TEXTURE_ENV_MODE_ALPHA_EXT 0 +#define GL_ENV_COPY_EXT 0 +#define GL_ENV_REPLACE_EXT 0 +#define GL_ENV_MODULATE_EXT 0 +#define GL_ENV_ADD_EXT 0 +#define GL_ENV_SUBTRACT_EXT 0 +#define GL_ENV_REVERSE_SUBTRACT_EXT 0 +#define GL_ENV_BLEND_EXT 0 +#define GL_ENV_REVERSE_BLEND_EXT 0 +#define GL_TEXTURE_ENV_SHIFT_EXT 0 +#endif + +/* GL_EXT_texture_sRGB */ + +#ifndef GL_EXT_texture_sRGB +#define GL_EXT_texture_sRGB 1 +#define __GLEE_GL_EXT_texture_sRGB 1 +/* Constants */ +#define GL_SRGB_EXT 0x8C40 +#define GL_SRGB8_EXT 0x8C41 +#define GL_SRGB_ALPHA_EXT 0x8C42 +#define GL_SRGB8_ALPHA8_EXT 0x8C43 +#define GL_SLUMINANCE_ALPHA_EXT 0x8C44 +#define GL_SLUMINANCE8_ALPHA8_EXT 0x8C45 +#define GL_SLUMINANCE_EXT 0x8C46 +#define GL_SLUMINANCE8_EXT 0x8C47 +#define GL_COMPRESSED_SRGB_EXT 0x8C48 +#define GL_COMPRESSED_SRGB_ALPHA_EXT 0x8C49 +#define GL_COMPRESSED_SLUMINANCE_EXT 0x8C4A +#define GL_COMPRESSED_SLUMINANCE_ALPHA_EXT 0x8C4B +#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT 0x8C4C +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT 0x8C4D +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT 0x8C4E +#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT 0x8C4F +#endif + +/* GL_IBM_static_data */ + +#ifndef GL_IBM_static_data +#define GL_IBM_static_data 1 +#define __GLEE_GL_IBM_static_data 1 +/* Constants */ +#define GL_ALL_STATIC_DATA_IBM 103060 +#define GL_STATIC_VERTEX_ARRAY_IBM 103061 +#endif + +/* GL_MESAX_texture_stack */ + +#ifndef GL_MESAX_texture_stack +#define GL_MESAX_texture_stack 1 +#define __GLEE_GL_MESAX_texture_stack 1 +/* Constants */ +#define GL_TEXTURE_1D_STACK_MESAX 0x8759 +#define GL_TEXTURE_2D_STACK_MESAX 0x875A +#define GL_PROXY_TEXTURE_1D_STACK_MESAX 0x875B +#define GL_PROXY_TEXTURE_2D_STACK_MESAX 0x875C +#define GL_TEXTURE_1D_STACK_BINDING_MESAX 0x875D +#define GL_TEXTURE_2D_STACK_BINDING_MESAX 0x875E +#endif + +/* GL_OES_byte_coordinates */ + +#ifndef GL_OES_byte_coordinates +#define GL_OES_byte_coordinates 1 +#define __GLEE_GL_OES_byte_coordinates 1 +/* Constants */ +#define GL_BYTE 0x1400 +#endif + +/* GL_OES_compressed_paletted_texture */ + +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#define __GLEE_GL_OES_compressed_paletted_texture 1 +/* Constants */ +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif + +/* GL_OES_single_precision */ + +#ifndef GL_OES_single_precision +#define GL_OES_single_precision 1 +#define __GLEE_GL_OES_single_precision 1 +/* Constants */ +typedef GLvoid (APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf n, GLclampf f); +typedef GLvoid (APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +typedef GLvoid (APIENTRYP PFNGLORTHOFOESPROC) (GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f); +typedef GLvoid (APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat* equation); +typedef GLvoid (APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum plane, GLfloat* equation); +typedef GLvoid (APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampd depth); +GLEE_EXTERN PFNGLDEPTHRANGEFOESPROC pglDepthRangefOES; +GLEE_EXTERN PFNGLFRUSTUMFOESPROC pglFrustumfOES; +GLEE_EXTERN PFNGLORTHOFOESPROC pglOrthofOES; +GLEE_EXTERN PFNGLCLIPPLANEFOESPROC pglClipPlanefOES; +GLEE_EXTERN PFNGLGETCLIPPLANEFOESPROC pglGetClipPlanefOES; +GLEE_EXTERN PFNGLCLEARDEPTHFOESPROC pglClearDepthfOES; +#define glDepthRangefOES pglDepthRangefOES +#define glFrustumfOES pglFrustumfOES +#define glOrthofOES pglOrthofOES +#define glClipPlanefOES pglClipPlanefOES +#define glGetClipPlanefOES pglGetClipPlanefOES +#define glClearDepthfOES pglClearDepthfOES +#endif + +/* GL_SGIX_pixel_texture_bits */ + +#ifndef GL_SGIX_pixel_texture_bits +#define GL_SGIX_pixel_texture_bits 1 +#define __GLEE_GL_SGIX_pixel_texture_bits 1 +/* Constants */ +#endif + +/* GL_SGIX_texture_range */ + +#ifndef GL_SGIX_texture_range +#define GL_SGIX_texture_range 1 +#define __GLEE_GL_SGIX_texture_range 1 +/* Constants */ +#define GL_RGB_SIGNED_SGIX 0x85E0 +#define GL_RGBA_SIGNED_SGIX 0x85E1 +#define GL_ALPHA_SIGNED_SGIX 0x85E2 +#define GL_LUMINANCE_SIGNED_SGIX 0x85E3 +#define GL_INTENSITY_SIGNED_SGIX 0x85E4 +#define GL_LUMINANCE_ALPHA_SIGNED_SGIX 0x85E5 +#define GL_RGB16_SIGNED_SGIX 0x85E6 +#define GL_RGBA16_SIGNED_SGIX 0x85E7 +#define GL_ALPHA16_SIGNED_SGIX 0x85E8 +#define GL_LUMINANCE16_SIGNED_SGIX 0x85E9 +#define GL_INTENSITY16_SIGNED_SGIX 0x85EA +#define GL_LUMINANCE16_ALPHA16_SIGNED_SGIX 0x85EB +#define GL_RGB_EXTENDED_RANGE_SGIX 0x85EC +#define GL_RGBA_EXTENDED_RANGE_SGIX 0x85ED +#define GL_ALPHA_EXTENDED_RANGE_SGIX 0x85EE +#define GL_LUMINANCE_EXTENDED_RANGE_SGIX 0x85EF +#define GL_INTENSITY_EXTENDED_RANGE_SGIX 0x85F0 +#define GL_LUMINANCE_ALPHA_EXTENDED_RANGE_SGIX 0x85F1 +#define GL_RGB16_EXTENDED_RANGE_SGIX 0x85F2 +#define GL_RGBA16_EXTENDED_RANGE_SGIX 0x85F3 +#define GL_ALPHA16_EXTENDED_RANGE_SGIX 0x85F4 +#define GL_LUMINANCE16_EXTENDED_RANGE_SGIX 0x85F5 +#define GL_INTENSITY16_EXTENDED_RANGE_SGIX 0x85F6 +#define GL_LUMINANCE16_ALPHA16_EXTENDED_RANGE_SGIX 0x85F7 +#define GL_MIN_LUMINANCE_SGIS 0x85F8 +#define GL_MAX_LUMINANCE_SGIS 0x85F9 +#define GL_MIN_INTENSITY_SGIS 0x85FA +#define GL_MAX_INTENSITY_SGIS 0x85FB +#endif + +/* WGL */ + +#ifdef WIN32 + +/* Extension querying variables */ + +GLEE_EXTERN GLboolean _GLEE_WGL_ARB_buffer_region; +GLEE_EXTERN GLboolean _GLEE_WGL_ARB_multisample; +GLEE_EXTERN GLboolean _GLEE_WGL_ARB_extensions_string; +GLEE_EXTERN GLboolean _GLEE_WGL_ARB_pixel_format; +GLEE_EXTERN GLboolean _GLEE_WGL_ARB_make_current_read; +GLEE_EXTERN GLboolean _GLEE_WGL_ARB_pbuffer; +GLEE_EXTERN GLboolean _GLEE_WGL_ARB_render_texture; +GLEE_EXTERN GLboolean _GLEE_WGL_ARB_pixel_format_float; +GLEE_EXTERN GLboolean _GLEE_WGL_EXT_make_current_read; +GLEE_EXTERN GLboolean _GLEE_WGL_EXT_pixel_format; +GLEE_EXTERN GLboolean _GLEE_WGL_EXT_pbuffer; +GLEE_EXTERN GLboolean _GLEE_WGL_EXT_depth_float; +GLEE_EXTERN GLboolean _GLEE_WGL_3DFX_multisample; +GLEE_EXTERN GLboolean _GLEE_WGL_EXT_multisample; +GLEE_EXTERN GLboolean _GLEE_WGL_I3D_digital_video_control; +GLEE_EXTERN GLboolean _GLEE_WGL_I3D_gamma; +GLEE_EXTERN GLboolean _GLEE_WGL_I3D_genlock; +GLEE_EXTERN GLboolean _GLEE_WGL_I3D_image_buffer; +GLEE_EXTERN GLboolean _GLEE_WGL_I3D_swap_frame_lock; +GLEE_EXTERN GLboolean _GLEE_WGL_NV_render_depth_texture; +GLEE_EXTERN GLboolean _GLEE_WGL_NV_render_texture_rectangle; +GLEE_EXTERN GLboolean _GLEE_WGL_ATI_pixel_format_float; +GLEE_EXTERN GLboolean _GLEE_WGL_NV_float_buffer; +GLEE_EXTERN GLboolean _GLEE_WGL_EXT_display_color_table; +GLEE_EXTERN GLboolean _GLEE_WGL_EXT_extensions_string; +GLEE_EXTERN GLboolean _GLEE_WGL_EXT_swap_control; +GLEE_EXTERN GLboolean _GLEE_WGL_NV_vertex_array_range; +GLEE_EXTERN GLboolean _GLEE_WGL_OML_sync_control; +GLEE_EXTERN GLboolean _GLEE_WGL_I3D_swap_frame_usage; +GLEE_EXTERN GLboolean _GLEE_WGL_3DL_stereo_control; + +/* Aliases for extension querying variables */ + +#define GLEE_WGL_ARB_buffer_region GLeeEnabled(&_GLEE_WGL_ARB_buffer_region) +#define GLEE_WGL_ARB_multisample GLeeEnabled(&_GLEE_WGL_ARB_multisample) +#define GLEE_WGL_ARB_extensions_string GLeeEnabled(&_GLEE_WGL_ARB_extensions_string) +#define GLEE_WGL_ARB_pixel_format GLeeEnabled(&_GLEE_WGL_ARB_pixel_format) +#define GLEE_WGL_ARB_make_current_read GLeeEnabled(&_GLEE_WGL_ARB_make_current_read) +#define GLEE_WGL_ARB_pbuffer GLeeEnabled(&_GLEE_WGL_ARB_pbuffer) +#define GLEE_WGL_ARB_render_texture GLeeEnabled(&_GLEE_WGL_ARB_render_texture) +#define GLEE_WGL_ARB_pixel_format_float GLeeEnabled(&_GLEE_WGL_ARB_pixel_format_float) +#define GLEE_WGL_EXT_make_current_read GLeeEnabled(&_GLEE_WGL_EXT_make_current_read) +#define GLEE_WGL_EXT_pixel_format GLeeEnabled(&_GLEE_WGL_EXT_pixel_format) +#define GLEE_WGL_EXT_pbuffer GLeeEnabled(&_GLEE_WGL_EXT_pbuffer) +#define GLEE_WGL_EXT_depth_float GLeeEnabled(&_GLEE_WGL_EXT_depth_float) +#define GLEE_WGL_3DFX_multisample GLeeEnabled(&_GLEE_WGL_3DFX_multisample) +#define GLEE_WGL_EXT_multisample GLeeEnabled(&_GLEE_WGL_EXT_multisample) +#define GLEE_WGL_I3D_digital_video_control GLeeEnabled(&_GLEE_WGL_I3D_digital_video_control) +#define GLEE_WGL_I3D_gamma GLeeEnabled(&_GLEE_WGL_I3D_gamma) +#define GLEE_WGL_I3D_genlock GLeeEnabled(&_GLEE_WGL_I3D_genlock) +#define GLEE_WGL_I3D_image_buffer GLeeEnabled(&_GLEE_WGL_I3D_image_buffer) +#define GLEE_WGL_I3D_swap_frame_lock GLeeEnabled(&_GLEE_WGL_I3D_swap_frame_lock) +#define GLEE_WGL_NV_render_depth_texture GLeeEnabled(&_GLEE_WGL_NV_render_depth_texture) +#define GLEE_WGL_NV_render_texture_rectangle GLeeEnabled(&_GLEE_WGL_NV_render_texture_rectangle) +#define GLEE_WGL_ATI_pixel_format_float GLeeEnabled(&_GLEE_WGL_ATI_pixel_format_float) +#define GLEE_WGL_NV_float_buffer GLeeEnabled(&_GLEE_WGL_NV_float_buffer) +#define GLEE_WGL_EXT_display_color_table GLeeEnabled(&_GLEE_WGL_EXT_display_color_table) +#define GLEE_WGL_EXT_extensions_string GLeeEnabled(&_GLEE_WGL_EXT_extensions_string) +#define GLEE_WGL_EXT_swap_control GLeeEnabled(&_GLEE_WGL_EXT_swap_control) +#define GLEE_WGL_NV_vertex_array_range GLeeEnabled(&_GLEE_WGL_NV_vertex_array_range) +#define GLEE_WGL_OML_sync_control GLeeEnabled(&_GLEE_WGL_OML_sync_control) +#define GLEE_WGL_I3D_swap_frame_usage GLeeEnabled(&_GLEE_WGL_I3D_swap_frame_usage) +#define GLEE_WGL_3DL_stereo_control GLeeEnabled(&_GLEE_WGL_3DL_stereo_control) + +/* WGL_ARB_buffer_region */ + +#ifndef WGL_ARB_buffer_region +#define WGL_ARB_buffer_region 1 +#define __GLEE_WGL_ARB_buffer_region 1 +/* Constants */ +#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 +#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 +#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 +#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 +typedef HANDLE (APIENTRYP PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); +typedef VOID (APIENTRYP PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); +typedef BOOL (APIENTRYP PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); +typedef BOOL (APIENTRYP PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); +GLEE_EXTERN PFNWGLCREATEBUFFERREGIONARBPROC pwglCreateBufferRegionARB; +GLEE_EXTERN PFNWGLDELETEBUFFERREGIONARBPROC pwglDeleteBufferRegionARB; +GLEE_EXTERN PFNWGLSAVEBUFFERREGIONARBPROC pwglSaveBufferRegionARB; +GLEE_EXTERN PFNWGLRESTOREBUFFERREGIONARBPROC pwglRestoreBufferRegionARB; +#define wglCreateBufferRegionARB pwglCreateBufferRegionARB +#define wglDeleteBufferRegionARB pwglDeleteBufferRegionARB +#define wglSaveBufferRegionARB pwglSaveBufferRegionARB +#define wglRestoreBufferRegionARB pwglRestoreBufferRegionARB +#endif + +/* WGL_ARB_multisample */ + +#ifndef WGL_ARB_multisample +#define WGL_ARB_multisample 1 +#define __GLEE_WGL_ARB_multisample 1 +/* Constants */ +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif + +/* WGL_ARB_extensions_string */ + +#ifndef WGL_ARB_extensions_string +#define WGL_ARB_extensions_string 1 +#define __GLEE_WGL_ARB_extensions_string 1 +/* Constants */ +typedef const char * (APIENTRYP PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); +GLEE_EXTERN PFNWGLGETEXTENSIONSSTRINGARBPROC pwglGetExtensionsStringARB; +#define wglGetExtensionsStringARB pwglGetExtensionsStringARB +#endif + +/* WGL_ARB_pixel_format */ + +#ifndef WGL_ARB_pixel_format +#define WGL_ARB_pixel_format 1 +#define __GLEE_WGL_ARB_pixel_format 1 +/* Constants */ +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C +typedef BOOL (APIENTRYP PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int * piAttributes, int * piValues); +typedef BOOL (APIENTRYP PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int * piAttributes, FLOAT * pfValues); +typedef BOOL (APIENTRYP PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int * piAttribIList, const FLOAT * pfAttribFList, UINT nMaxFormats, int * piFormats, UINT * nNumFormats); +GLEE_EXTERN PFNWGLGETPIXELFORMATATTRIBIVARBPROC pwglGetPixelFormatAttribivARB; +GLEE_EXTERN PFNWGLGETPIXELFORMATATTRIBFVARBPROC pwglGetPixelFormatAttribfvARB; +GLEE_EXTERN PFNWGLCHOOSEPIXELFORMATARBPROC pwglChoosePixelFormatARB; +#define wglGetPixelFormatAttribivARB pwglGetPixelFormatAttribivARB +#define wglGetPixelFormatAttribfvARB pwglGetPixelFormatAttribfvARB +#define wglChoosePixelFormatARB pwglChoosePixelFormatARB +#endif + +/* WGL_ARB_make_current_read */ + +#ifndef WGL_ARB_make_current_read +#define WGL_ARB_make_current_read 1 +#define __GLEE_WGL_ARB_make_current_read 1 +/* Constants */ +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 +typedef BOOL (APIENTRYP PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (APIENTRYP PFNWGLGETCURRENTREADDCARBPROC) (); +GLEE_EXTERN PFNWGLMAKECONTEXTCURRENTARBPROC pwglMakeContextCurrentARB; +GLEE_EXTERN PFNWGLGETCURRENTREADDCARBPROC pwglGetCurrentReadDCARB; +#define wglMakeContextCurrentARB pwglMakeContextCurrentARB +#define wglGetCurrentReadDCARB pwglGetCurrentReadDCARB +#endif + +/* WGL_ARB_pbuffer */ + +#ifndef WGL_ARB_pbuffer +#define WGL_ARB_pbuffer 1 +#define __GLEE_WGL_ARB_pbuffer 1 +/* Constants */ +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 +typedef HPBUFFERARB (APIENTRYP PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int * piAttribList); +typedef HDC (APIENTRYP PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); +typedef int (APIENTRYP PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); +typedef BOOL (APIENTRYP PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (APIENTRYP PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int * piValue); +GLEE_EXTERN PFNWGLCREATEPBUFFERARBPROC pwglCreatePbufferARB; +GLEE_EXTERN PFNWGLGETPBUFFERDCARBPROC pwglGetPbufferDCARB; +GLEE_EXTERN PFNWGLRELEASEPBUFFERDCARBPROC pwglReleasePbufferDCARB; +GLEE_EXTERN PFNWGLDESTROYPBUFFERARBPROC pwglDestroyPbufferARB; +GLEE_EXTERN PFNWGLQUERYPBUFFERARBPROC pwglQueryPbufferARB; +#define wglCreatePbufferARB pwglCreatePbufferARB +#define wglGetPbufferDCARB pwglGetPbufferDCARB +#define wglReleasePbufferDCARB pwglReleasePbufferDCARB +#define wglDestroyPbufferARB pwglDestroyPbufferARB +#define wglQueryPbufferARB pwglQueryPbufferARB +#endif + +/* WGL_ARB_render_texture */ + +#ifndef WGL_ARB_render_texture +#define WGL_ARB_render_texture 1 +#define __GLEE_WGL_ARB_render_texture 1 +/* Constants */ +#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 +#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 +#define WGL_TEXTURE_FORMAT_ARB 0x2072 +#define WGL_TEXTURE_TARGET_ARB 0x2073 +#define WGL_MIPMAP_TEXTURE_ARB 0x2074 +#define WGL_TEXTURE_RGB_ARB 0x2075 +#define WGL_TEXTURE_RGBA_ARB 0x2076 +#define WGL_NO_TEXTURE_ARB 0x2077 +#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 +#define WGL_TEXTURE_1D_ARB 0x2079 +#define WGL_TEXTURE_2D_ARB 0x207A +#define WGL_MIPMAP_LEVEL_ARB 0x207B +#define WGL_CUBE_MAP_FACE_ARB 0x207C +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 +#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 +#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 +#define WGL_FRONT_LEFT_ARB 0x2083 +#define WGL_FRONT_RIGHT_ARB 0x2084 +#define WGL_BACK_LEFT_ARB 0x2085 +#define WGL_BACK_RIGHT_ARB 0x2086 +#define WGL_AUX0_ARB 0x2087 +#define WGL_AUX1_ARB 0x2088 +#define WGL_AUX2_ARB 0x2089 +#define WGL_AUX3_ARB 0x208A +#define WGL_AUX4_ARB 0x208B +#define WGL_AUX5_ARB 0x208C +#define WGL_AUX6_ARB 0x208D +#define WGL_AUX7_ARB 0x208E +#define WGL_AUX8_ARB 0x208F +#define WGL_AUX9_ARB 0x2090 +typedef BOOL (APIENTRYP PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (APIENTRYP PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (APIENTRYP PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int * piAttribList); +GLEE_EXTERN PFNWGLBINDTEXIMAGEARBPROC pwglBindTexImageARB; +GLEE_EXTERN PFNWGLRELEASETEXIMAGEARBPROC pwglReleaseTexImageARB; +GLEE_EXTERN PFNWGLSETPBUFFERATTRIBARBPROC pwglSetPbufferAttribARB; +#define wglBindTexImageARB pwglBindTexImageARB +#define wglReleaseTexImageARB pwglReleaseTexImageARB +#define wglSetPbufferAttribARB pwglSetPbufferAttribARB +#endif + +/* WGL_ARB_pixel_format_float */ + +#ifndef WGL_ARB_pixel_format_float +#define WGL_ARB_pixel_format_float 1 +#define __GLEE_WGL_ARB_pixel_format_float 1 +/* Constants */ +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 +#endif + +/* WGL_EXT_make_current_read */ + +#ifndef WGL_EXT_make_current_read +#define WGL_EXT_make_current_read 1 +#define __GLEE_WGL_EXT_make_current_read 1 +/* Constants */ +#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 +typedef BOOL (APIENTRYP PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (APIENTRYP PFNWGLGETCURRENTREADDCEXTPROC) (); +GLEE_EXTERN PFNWGLMAKECONTEXTCURRENTEXTPROC pwglMakeContextCurrentEXT; +GLEE_EXTERN PFNWGLGETCURRENTREADDCEXTPROC pwglGetCurrentReadDCEXT; +#define wglMakeContextCurrentEXT pwglMakeContextCurrentEXT +#define wglGetCurrentReadDCEXT pwglGetCurrentReadDCEXT +#endif + +/* WGL_EXT_pixel_format */ + +#ifndef WGL_EXT_pixel_format +#define WGL_EXT_pixel_format 1 +#define __GLEE_WGL_EXT_pixel_format 1 +/* Constants */ +#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 +#define WGL_DRAW_TO_WINDOW_EXT 0x2001 +#define WGL_DRAW_TO_BITMAP_EXT 0x2002 +#define WGL_ACCELERATION_EXT 0x2003 +#define WGL_NEED_PALETTE_EXT 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 +#define WGL_SWAP_METHOD_EXT 0x2007 +#define WGL_NUMBER_OVERLAYS_EXT 0x2008 +#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 +#define WGL_TRANSPARENT_EXT 0x200A +#define WGL_TRANSPARENT_VALUE_EXT 0x200B +#define WGL_SHARE_DEPTH_EXT 0x200C +#define WGL_SHARE_STENCIL_EXT 0x200D +#define WGL_SHARE_ACCUM_EXT 0x200E +#define WGL_SUPPORT_GDI_EXT 0x200F +#define WGL_SUPPORT_OPENGL_EXT 0x2010 +#define WGL_DOUBLE_BUFFER_EXT 0x2011 +#define WGL_STEREO_EXT 0x2012 +#define WGL_PIXEL_TYPE_EXT 0x2013 +#define WGL_COLOR_BITS_EXT 0x2014 +#define WGL_RED_BITS_EXT 0x2015 +#define WGL_RED_SHIFT_EXT 0x2016 +#define WGL_GREEN_BITS_EXT 0x2017 +#define WGL_GREEN_SHIFT_EXT 0x2018 +#define WGL_BLUE_BITS_EXT 0x2019 +#define WGL_BLUE_SHIFT_EXT 0x201A +#define WGL_ALPHA_BITS_EXT 0x201B +#define WGL_ALPHA_SHIFT_EXT 0x201C +#define WGL_ACCUM_BITS_EXT 0x201D +#define WGL_ACCUM_RED_BITS_EXT 0x201E +#define WGL_ACCUM_GREEN_BITS_EXT 0x201F +#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 +#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 +#define WGL_DEPTH_BITS_EXT 0x2022 +#define WGL_STENCIL_BITS_EXT 0x2023 +#define WGL_AUX_BUFFERS_EXT 0x2024 +#define WGL_NO_ACCELERATION_EXT 0x2025 +#define WGL_GENERIC_ACCELERATION_EXT 0x2026 +#define WGL_FULL_ACCELERATION_EXT 0x2027 +#define WGL_SWAP_EXCHANGE_EXT 0x2028 +#define WGL_SWAP_COPY_EXT 0x2029 +#define WGL_SWAP_UNDEFINED_EXT 0x202A +#define WGL_TYPE_RGBA_EXT 0x202B +#define WGL_TYPE_COLORINDEX_EXT 0x202C +typedef BOOL (APIENTRYP PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int * piAttributes, int * piValues); +typedef BOOL (APIENTRYP PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int * piAttributes, FLOAT * pfValues); +typedef BOOL (APIENTRYP PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int * piAttribIList, const FLOAT * pfAttribFList, UINT nMaxFormats, int * piFormats, UINT * nNumFormats); +GLEE_EXTERN PFNWGLGETPIXELFORMATATTRIBIVEXTPROC pwglGetPixelFormatAttribivEXT; +GLEE_EXTERN PFNWGLGETPIXELFORMATATTRIBFVEXTPROC pwglGetPixelFormatAttribfvEXT; +GLEE_EXTERN PFNWGLCHOOSEPIXELFORMATEXTPROC pwglChoosePixelFormatEXT; +#define wglGetPixelFormatAttribivEXT pwglGetPixelFormatAttribivEXT +#define wglGetPixelFormatAttribfvEXT pwglGetPixelFormatAttribfvEXT +#define wglChoosePixelFormatEXT pwglChoosePixelFormatEXT +#endif + +/* WGL_EXT_pbuffer */ + +#ifndef WGL_EXT_pbuffer +#define WGL_EXT_pbuffer 1 +#define __GLEE_WGL_EXT_pbuffer 1 +/* Constants */ +#define WGL_DRAW_TO_PBUFFER_EXT 0x202D +#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E +#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 +#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 +#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 +#define WGL_PBUFFER_LARGEST_EXT 0x2033 +#define WGL_PBUFFER_WIDTH_EXT 0x2034 +#define WGL_PBUFFER_HEIGHT_EXT 0x2035 +typedef HPBUFFEREXT (APIENTRYP PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int * piAttribList); +typedef HDC (APIENTRYP PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); +typedef int (APIENTRYP PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); +typedef BOOL (APIENTRYP PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); +typedef BOOL (APIENTRYP PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int * piValue); +GLEE_EXTERN PFNWGLCREATEPBUFFEREXTPROC pwglCreatePbufferEXT; +GLEE_EXTERN PFNWGLGETPBUFFERDCEXTPROC pwglGetPbufferDCEXT; +GLEE_EXTERN PFNWGLRELEASEPBUFFERDCEXTPROC pwglReleasePbufferDCEXT; +GLEE_EXTERN PFNWGLDESTROYPBUFFEREXTPROC pwglDestroyPbufferEXT; +GLEE_EXTERN PFNWGLQUERYPBUFFEREXTPROC pwglQueryPbufferEXT; +#define wglCreatePbufferEXT pwglCreatePbufferEXT +#define wglGetPbufferDCEXT pwglGetPbufferDCEXT +#define wglReleasePbufferDCEXT pwglReleasePbufferDCEXT +#define wglDestroyPbufferEXT pwglDestroyPbufferEXT +#define wglQueryPbufferEXT pwglQueryPbufferEXT +#endif + +/* WGL_EXT_depth_float */ + +#ifndef WGL_EXT_depth_float +#define WGL_EXT_depth_float 1 +#define __GLEE_WGL_EXT_depth_float 1 +/* Constants */ +#define WGL_DEPTH_FLOAT_EXT 0x2040 +#endif + +/* WGL_3DFX_multisample */ + +#ifndef WGL_3DFX_multisample +#define WGL_3DFX_multisample 1 +#define __GLEE_WGL_3DFX_multisample 1 +/* Constants */ +#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 +#define WGL_SAMPLES_3DFX 0x2061 +#endif + +/* WGL_EXT_multisample */ + +#ifndef WGL_EXT_multisample +#define WGL_EXT_multisample 1 +#define __GLEE_WGL_EXT_multisample 1 +/* Constants */ +#define WGL_SAMPLE_BUFFERS_EXT 0x2041 +#define WGL_SAMPLES_EXT 0x2042 +#endif + +/* WGL_I3D_digital_video_control */ + +#ifndef WGL_I3D_digital_video_control +#define WGL_I3D_digital_video_control 1 +#define __GLEE_WGL_I3D_digital_video_control 1 +/* Constants */ +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 +#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 +#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 +#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 +typedef BOOL (APIENTRYP PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int * piValue); +typedef BOOL (APIENTRYP PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int * piValue); +GLEE_EXTERN PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC pwglGetDigitalVideoParametersI3D; +GLEE_EXTERN PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC pwglSetDigitalVideoParametersI3D; +#define wglGetDigitalVideoParametersI3D pwglGetDigitalVideoParametersI3D +#define wglSetDigitalVideoParametersI3D pwglSetDigitalVideoParametersI3D +#endif + +/* WGL_I3D_gamma */ + +#ifndef WGL_I3D_gamma +#define WGL_I3D_gamma 1 +#define __GLEE_WGL_I3D_gamma 1 +/* Constants */ +#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E +#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F +typedef BOOL (APIENTRYP PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int * piValue); +typedef BOOL (APIENTRYP PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int * piValue); +typedef BOOL (APIENTRYP PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT * puRed, USHORT * puGreen, USHORT * puBlue); +typedef BOOL (APIENTRYP PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT * puRed, const USHORT * puGreen, const USHORT * puBlue); +GLEE_EXTERN PFNWGLGETGAMMATABLEPARAMETERSI3DPROC pwglGetGammaTableParametersI3D; +GLEE_EXTERN PFNWGLSETGAMMATABLEPARAMETERSI3DPROC pwglSetGammaTableParametersI3D; +GLEE_EXTERN PFNWGLGETGAMMATABLEI3DPROC pwglGetGammaTableI3D; +GLEE_EXTERN PFNWGLSETGAMMATABLEI3DPROC pwglSetGammaTableI3D; +#define wglGetGammaTableParametersI3D pwglGetGammaTableParametersI3D +#define wglSetGammaTableParametersI3D pwglSetGammaTableParametersI3D +#define wglGetGammaTableI3D pwglGetGammaTableI3D +#define wglSetGammaTableI3D pwglSetGammaTableI3D +#endif + +/* WGL_I3D_genlock */ + +#ifndef WGL_I3D_genlock +#define WGL_I3D_genlock 1 +#define __GLEE_WGL_I3D_genlock 1 +/* Constants */ +#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 +#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 +#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 +#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 +#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 +#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 +#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A +#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B +#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C +typedef BOOL (APIENTRYP PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (APIENTRYP PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); +typedef BOOL (APIENTRYP PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL * pFlag); +typedef BOOL (APIENTRYP PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); +typedef BOOL (APIENTRYP PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT * uSource); +typedef BOOL (APIENTRYP PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); +typedef BOOL (APIENTRYP PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT * uEdge); +typedef BOOL (APIENTRYP PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); +typedef BOOL (APIENTRYP PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT * uRate); +typedef BOOL (APIENTRYP PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); +typedef BOOL (APIENTRYP PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT * uDelay); +typedef BOOL (APIENTRYP PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT * uMaxLineDelay, UINT * uMaxPixelDelay); +GLEE_EXTERN PFNWGLENABLEGENLOCKI3DPROC pwglEnableGenlockI3D; +GLEE_EXTERN PFNWGLDISABLEGENLOCKI3DPROC pwglDisableGenlockI3D; +GLEE_EXTERN PFNWGLISENABLEDGENLOCKI3DPROC pwglIsEnabledGenlockI3D; +GLEE_EXTERN PFNWGLGENLOCKSOURCEI3DPROC pwglGenlockSourceI3D; +GLEE_EXTERN PFNWGLGETGENLOCKSOURCEI3DPROC pwglGetGenlockSourceI3D; +GLEE_EXTERN PFNWGLGENLOCKSOURCEEDGEI3DPROC pwglGenlockSourceEdgeI3D; +GLEE_EXTERN PFNWGLGETGENLOCKSOURCEEDGEI3DPROC pwglGetGenlockSourceEdgeI3D; +GLEE_EXTERN PFNWGLGENLOCKSAMPLERATEI3DPROC pwglGenlockSampleRateI3D; +GLEE_EXTERN PFNWGLGETGENLOCKSAMPLERATEI3DPROC pwglGetGenlockSampleRateI3D; +GLEE_EXTERN PFNWGLGENLOCKSOURCEDELAYI3DPROC pwglGenlockSourceDelayI3D; +GLEE_EXTERN PFNWGLGETGENLOCKSOURCEDELAYI3DPROC pwglGetGenlockSourceDelayI3D; +GLEE_EXTERN PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC pwglQueryGenlockMaxSourceDelayI3D; +#define wglEnableGenlockI3D pwglEnableGenlockI3D +#define wglDisableGenlockI3D pwglDisableGenlockI3D +#define wglIsEnabledGenlockI3D pwglIsEnabledGenlockI3D +#define wglGenlockSourceI3D pwglGenlockSourceI3D +#define wglGetGenlockSourceI3D pwglGetGenlockSourceI3D +#define wglGenlockSourceEdgeI3D pwglGenlockSourceEdgeI3D +#define wglGetGenlockSourceEdgeI3D pwglGetGenlockSourceEdgeI3D +#define wglGenlockSampleRateI3D pwglGenlockSampleRateI3D +#define wglGetGenlockSampleRateI3D pwglGetGenlockSampleRateI3D +#define wglGenlockSourceDelayI3D pwglGenlockSourceDelayI3D +#define wglGetGenlockSourceDelayI3D pwglGetGenlockSourceDelayI3D +#define wglQueryGenlockMaxSourceDelayI3D pwglQueryGenlockMaxSourceDelayI3D +#endif + +/* WGL_I3D_image_buffer */ + +#ifndef WGL_I3D_image_buffer +#define WGL_I3D_image_buffer 1 +#define __GLEE_WGL_I3D_image_buffer 1 +/* Constants */ +#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 +#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 +typedef LPVOID (APIENTRYP PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); +typedef BOOL (APIENTRYP PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); +typedef BOOL (APIENTRYP PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE * pEvent, const LPVOID * pAddress, const DWORD * pSize, UINT count); +typedef BOOL (APIENTRYP PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID * pAddress, UINT count); +GLEE_EXTERN PFNWGLCREATEIMAGEBUFFERI3DPROC pwglCreateImageBufferI3D; +GLEE_EXTERN PFNWGLDESTROYIMAGEBUFFERI3DPROC pwglDestroyImageBufferI3D; +GLEE_EXTERN PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC pwglAssociateImageBufferEventsI3D; +GLEE_EXTERN PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC pwglReleaseImageBufferEventsI3D; +#define wglCreateImageBufferI3D pwglCreateImageBufferI3D +#define wglDestroyImageBufferI3D pwglDestroyImageBufferI3D +#define wglAssociateImageBufferEventsI3D pwglAssociateImageBufferEventsI3D +#define wglReleaseImageBufferEventsI3D pwglReleaseImageBufferEventsI3D +#endif + +/* WGL_I3D_swap_frame_lock */ + +#ifndef WGL_I3D_swap_frame_lock +#define WGL_I3D_swap_frame_lock 1 +#define __GLEE_WGL_I3D_swap_frame_lock 1 +/* Constants */ +typedef BOOL (APIENTRYP PFNWGLENABLEFRAMELOCKI3DPROC) (); +typedef BOOL (APIENTRYP PFNWGLDISABLEFRAMELOCKI3DPROC) (); +typedef BOOL (APIENTRYP PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL * pFlag); +typedef BOOL (APIENTRYP PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL * pFlag); +GLEE_EXTERN PFNWGLENABLEFRAMELOCKI3DPROC pwglEnableFrameLockI3D; +GLEE_EXTERN PFNWGLDISABLEFRAMELOCKI3DPROC pwglDisableFrameLockI3D; +GLEE_EXTERN PFNWGLISENABLEDFRAMELOCKI3DPROC pwglIsEnabledFrameLockI3D; +GLEE_EXTERN PFNWGLQUERYFRAMELOCKMASTERI3DPROC pwglQueryFrameLockMasterI3D; +#define wglEnableFrameLockI3D pwglEnableFrameLockI3D +#define wglDisableFrameLockI3D pwglDisableFrameLockI3D +#define wglIsEnabledFrameLockI3D pwglIsEnabledFrameLockI3D +#define wglQueryFrameLockMasterI3D pwglQueryFrameLockMasterI3D +#endif + +/* WGL_NV_render_depth_texture */ + +#ifndef WGL_NV_render_depth_texture +#define WGL_NV_render_depth_texture 1 +#define __GLEE_WGL_NV_render_depth_texture 1 +/* Constants */ +#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 +#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 +#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 +#define WGL_DEPTH_COMPONENT_NV 0x20A7 +#endif + +/* WGL_NV_render_texture_rectangle */ + +#ifndef WGL_NV_render_texture_rectangle +#define WGL_NV_render_texture_rectangle 1 +#define __GLEE_WGL_NV_render_texture_rectangle 1 +/* Constants */ +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 +#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 +#endif + +/* WGL_ATI_pixel_format_float */ + +#ifndef WGL_ATI_pixel_format_float +#define WGL_ATI_pixel_format_float 1 +#define __GLEE_WGL_ATI_pixel_format_float 1 +/* Constants */ +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 +#endif + +/* WGL_NV_float_buffer */ + +#ifndef WGL_NV_float_buffer +#define WGL_NV_float_buffer 1 +#define __GLEE_WGL_NV_float_buffer 1 +/* Constants */ +#define WGL_FLOAT_COMPONENTS_NV 0x20B0 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 +#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 +#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 +#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 +#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 +#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 +#endif + +/* WGL_EXT_display_color_table */ + +#ifndef WGL_EXT_display_color_table +#define WGL_EXT_display_color_table 1 +#define __GLEE_WGL_EXT_display_color_table 1 +/* Constants */ +typedef GLboolean (APIENTRYP PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef GLboolean (APIENTRYP PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort * table, GLuint length); +typedef GLboolean (APIENTRYP PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); +typedef VOID (APIENTRYP PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); +GLEE_EXTERN PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC pwglCreateDisplayColorTableEXT; +GLEE_EXTERN PFNWGLLOADDISPLAYCOLORTABLEEXTPROC pwglLoadDisplayColorTableEXT; +GLEE_EXTERN PFNWGLBINDDISPLAYCOLORTABLEEXTPROC pwglBindDisplayColorTableEXT; +GLEE_EXTERN PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC pwglDestroyDisplayColorTableEXT; +#define wglCreateDisplayColorTableEXT pwglCreateDisplayColorTableEXT +#define wglLoadDisplayColorTableEXT pwglLoadDisplayColorTableEXT +#define wglBindDisplayColorTableEXT pwglBindDisplayColorTableEXT +#define wglDestroyDisplayColorTableEXT pwglDestroyDisplayColorTableEXT +#endif + +/* WGL_EXT_extensions_string */ + +#ifndef WGL_EXT_extensions_string +#define WGL_EXT_extensions_string 1 +#define __GLEE_WGL_EXT_extensions_string 1 +/* Constants */ +typedef const char * (APIENTRYP PFNWGLGETEXTENSIONSSTRINGEXTPROC) (); +GLEE_EXTERN PFNWGLGETEXTENSIONSSTRINGEXTPROC pwglGetExtensionsStringEXT; +#define wglGetExtensionsStringEXT pwglGetExtensionsStringEXT +#endif + +/* WGL_EXT_swap_control */ + +#ifndef WGL_EXT_swap_control +#define WGL_EXT_swap_control 1 +#define __GLEE_WGL_EXT_swap_control 1 +/* Constants */ +typedef BOOL (APIENTRYP PFNWGLSWAPINTERVALEXTPROC) (int interval); +typedef int (APIENTRYP PFNWGLGETSWAPINTERVALEXTPROC) (); +GLEE_EXTERN PFNWGLSWAPINTERVALEXTPROC pwglSwapIntervalEXT; +GLEE_EXTERN PFNWGLGETSWAPINTERVALEXTPROC pwglGetSwapIntervalEXT; +#define wglSwapIntervalEXT pwglSwapIntervalEXT +#define wglGetSwapIntervalEXT pwglGetSwapIntervalEXT +#endif + +/* WGL_NV_vertex_array_range */ + +#ifndef WGL_NV_vertex_array_range +#define WGL_NV_vertex_array_range 1 +#define __GLEE_WGL_NV_vertex_array_range 1 +/* Constants */ +typedef void* (APIENTRYP PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); +typedef void (APIENTRYP PFNWGLFREEMEMORYNVPROC) (void * pointer); +GLEE_EXTERN PFNWGLALLOCATEMEMORYNVPROC pwglAllocateMemoryNV; +GLEE_EXTERN PFNWGLFREEMEMORYNVPROC pwglFreeMemoryNV; +#define wglAllocateMemoryNV pwglAllocateMemoryNV +#define wglFreeMemoryNV pwglFreeMemoryNV +#endif + +/* WGL_OML_sync_control */ + +#ifndef WGL_OML_sync_control +#define WGL_OML_sync_control 1 +#define __GLEE_WGL_OML_sync_control 1 +/* Constants */ +typedef BOOL (APIENTRYP PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 * ust, INT64 * msc, INT64 * sbc); +typedef BOOL (APIENTRYP PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 * numerator, INT32 * denominator); +typedef INT64 (APIENTRYP PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef INT64 (APIENTRYP PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); +typedef BOOL (APIENTRYP PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 * ust, INT64 * msc, INT64 * sbc); +typedef BOOL (APIENTRYP PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 * ust, INT64 * msc, INT64 * sbc); +GLEE_EXTERN PFNWGLGETSYNCVALUESOMLPROC pwglGetSyncValuesOML; +GLEE_EXTERN PFNWGLGETMSCRATEOMLPROC pwglGetMscRateOML; +GLEE_EXTERN PFNWGLSWAPBUFFERSMSCOMLPROC pwglSwapBuffersMscOML; +GLEE_EXTERN PFNWGLSWAPLAYERBUFFERSMSCOMLPROC pwglSwapLayerBuffersMscOML; +GLEE_EXTERN PFNWGLWAITFORMSCOMLPROC pwglWaitForMscOML; +GLEE_EXTERN PFNWGLWAITFORSBCOMLPROC pwglWaitForSbcOML; +#define wglGetSyncValuesOML pwglGetSyncValuesOML +#define wglGetMscRateOML pwglGetMscRateOML +#define wglSwapBuffersMscOML pwglSwapBuffersMscOML +#define wglSwapLayerBuffersMscOML pwglSwapLayerBuffersMscOML +#define wglWaitForMscOML pwglWaitForMscOML +#define wglWaitForSbcOML pwglWaitForSbcOML +#endif + +/* WGL_I3D_swap_frame_usage */ + +#ifndef WGL_I3D_swap_frame_usage +#define WGL_I3D_swap_frame_usage 1 +#define __GLEE_WGL_I3D_swap_frame_usage 1 +/* Constants */ +typedef BOOL (APIENTRYP PFNWGLGETFRAMEUSAGEI3DPROC) (float * pUsage); +typedef BOOL (APIENTRYP PFNWGLBEGINFRAMETRACKINGI3DPROC) (); +typedef BOOL (APIENTRYP PFNWGLENDFRAMETRACKINGI3DPROC) (); +typedef BOOL (APIENTRYP PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD * pFrameCount, DWORD * pMissedFrames, float * pLastMissedUsage); +GLEE_EXTERN PFNWGLGETFRAMEUSAGEI3DPROC pwglGetFrameUsageI3D; +GLEE_EXTERN PFNWGLBEGINFRAMETRACKINGI3DPROC pwglBeginFrameTrackingI3D; +GLEE_EXTERN PFNWGLENDFRAMETRACKINGI3DPROC pwglEndFrameTrackingI3D; +GLEE_EXTERN PFNWGLQUERYFRAMETRACKINGI3DPROC pwglQueryFrameTrackingI3D; +#define wglGetFrameUsageI3D pwglGetFrameUsageI3D +#define wglBeginFrameTrackingI3D pwglBeginFrameTrackingI3D +#define wglEndFrameTrackingI3D pwglEndFrameTrackingI3D +#define wglQueryFrameTrackingI3D pwglQueryFrameTrackingI3D +#endif + +/* WGL_3DL_stereo_control */ + +#ifndef WGL_3DL_stereo_control +#define WGL_3DL_stereo_control 1 +#define __GLEE_WGL_3DL_stereo_control 1 +/* Constants */ +#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 +#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 +#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 +#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 +typedef BOOL (APIENTRYP PFNWGLSETSTEREOEMITTERSTATE3DLPROC) (HDC hDC, UINT uState); +GLEE_EXTERN PFNWGLSETSTEREOEMITTERSTATE3DLPROC pwglSetStereoEmitterState3DL; +#define wglSetStereoEmitterState3DL pwglSetStereoEmitterState3DL +#endif +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else /* GLX */ + +/* Extension querying variables */ + +GLEE_EXTERN GLboolean _GLEE_GLX_VERSION_1_3; +GLEE_EXTERN GLboolean _GLEE_GLX_VERSION_1_4; +GLEE_EXTERN GLboolean _GLEE_GLX_ARB_multisample; +GLEE_EXTERN GLboolean _GLEE_GLX_ARB_fbconfig_float; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIS_multisample; +GLEE_EXTERN GLboolean _GLEE_GLX_EXT_visual_info; +GLEE_EXTERN GLboolean _GLEE_GLX_SGI_swap_control; +GLEE_EXTERN GLboolean _GLEE_GLX_SGI_video_sync; +GLEE_EXTERN GLboolean _GLEE_GLX_SGI_make_current_read; +GLEE_EXTERN GLboolean _GLEE_GLX_EXT_visual_rating; +GLEE_EXTERN GLboolean _GLEE_GLX_EXT_import_context; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIX_fbconfig; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIX_pbuffer; +GLEE_EXTERN GLboolean _GLEE_GLX_SGI_cushion; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIX_video_resize; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIX_swap_group; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIX_swap_barrier; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIS_blended_overlay; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIS_shared_multisample; +GLEE_EXTERN GLboolean _GLEE_GLX_SUN_get_transparent_index; +GLEE_EXTERN GLboolean _GLEE_GLX_3DFX_multisample; +GLEE_EXTERN GLboolean _GLEE_GLX_MESA_copy_sub_buffer; +GLEE_EXTERN GLboolean _GLEE_GLX_MESA_pixmap_colormap; +GLEE_EXTERN GLboolean _GLEE_GLX_MESA_release_buffers; +GLEE_EXTERN GLboolean _GLEE_GLX_MESA_set_3dfx_mode; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIX_visual_select_group; +GLEE_EXTERN GLboolean _GLEE_GLX_OML_swap_method; +GLEE_EXTERN GLboolean _GLEE_GLX_OML_sync_control; +GLEE_EXTERN GLboolean _GLEE_GLX_NV_float_buffer; +GLEE_EXTERN GLboolean _GLEE_GLX_SGIX_hyperpipe; +GLEE_EXTERN GLboolean _GLEE_GLX_MESA_agp_offset; +GLEE_EXTERN GLboolean _GLEE_GLX_EXT_scene_marker; + +/* Aliases for extension querying variables */ + +#define GLEE_GLX_VERSION_1_3 GLeeEnabled(&_GLEE_GLX_VERSION_1_3) +#define GLEE_GLX_VERSION_1_4 GLeeEnabled(&_GLEE_GLX_VERSION_1_4) +#define GLEE_GLX_ARB_multisample GLeeEnabled(&_GLEE_GLX_ARB_multisample) +#define GLEE_GLX_ARB_fbconfig_float GLeeEnabled(&_GLEE_GLX_ARB_fbconfig_float) +#define GLEE_GLX_SGIS_multisample GLeeEnabled(&_GLEE_GLX_SGIS_multisample) +#define GLEE_GLX_EXT_visual_info GLeeEnabled(&_GLEE_GLX_EXT_visual_info) +#define GLEE_GLX_SGI_swap_control GLeeEnabled(&_GLEE_GLX_SGI_swap_control) +#define GLEE_GLX_SGI_video_sync GLeeEnabled(&_GLEE_GLX_SGI_video_sync) +#define GLEE_GLX_SGI_make_current_read GLeeEnabled(&_GLEE_GLX_SGI_make_current_read) +#define GLEE_GLX_EXT_visual_rating GLeeEnabled(&_GLEE_GLX_EXT_visual_rating) +#define GLEE_GLX_EXT_import_context GLeeEnabled(&_GLEE_GLX_EXT_import_context) +#define GLEE_GLX_SGIX_fbconfig GLeeEnabled(&_GLEE_GLX_SGIX_fbconfig) +#define GLEE_GLX_SGIX_pbuffer GLeeEnabled(&_GLEE_GLX_SGIX_pbuffer) +#define GLEE_GLX_SGI_cushion GLeeEnabled(&_GLEE_GLX_SGI_cushion) +#define GLEE_GLX_SGIX_video_resize GLeeEnabled(&_GLEE_GLX_SGIX_video_resize) +#define GLEE_GLX_SGIX_swap_group GLeeEnabled(&_GLEE_GLX_SGIX_swap_group) +#define GLEE_GLX_SGIX_swap_barrier GLeeEnabled(&_GLEE_GLX_SGIX_swap_barrier) +#define GLEE_GLX_SGIS_blended_overlay GLeeEnabled(&_GLEE_GLX_SGIS_blended_overlay) +#define GLEE_GLX_SGIS_shared_multisample GLeeEnabled(&_GLEE_GLX_SGIS_shared_multisample) +#define GLEE_GLX_SUN_get_transparent_index GLeeEnabled(&_GLEE_GLX_SUN_get_transparent_index) +#define GLEE_GLX_3DFX_multisample GLeeEnabled(&_GLEE_GLX_3DFX_multisample) +#define GLEE_GLX_MESA_copy_sub_buffer GLeeEnabled(&_GLEE_GLX_MESA_copy_sub_buffer) +#define GLEE_GLX_MESA_pixmap_colormap GLeeEnabled(&_GLEE_GLX_MESA_pixmap_colormap) +#define GLEE_GLX_MESA_release_buffers GLeeEnabled(&_GLEE_GLX_MESA_release_buffers) +#define GLEE_GLX_MESA_set_3dfx_mode GLeeEnabled(&_GLEE_GLX_MESA_set_3dfx_mode) +#define GLEE_GLX_SGIX_visual_select_group GLeeEnabled(&_GLEE_GLX_SGIX_visual_select_group) +#define GLEE_GLX_OML_swap_method GLeeEnabled(&_GLEE_GLX_OML_swap_method) +#define GLEE_GLX_OML_sync_control GLeeEnabled(&_GLEE_GLX_OML_sync_control) +#define GLEE_GLX_NV_float_buffer GLeeEnabled(&_GLEE_GLX_NV_float_buffer) +#define GLEE_GLX_SGIX_hyperpipe GLeeEnabled(&_GLEE_GLX_SGIX_hyperpipe) +#define GLEE_GLX_MESA_agp_offset GLeeEnabled(&_GLEE_GLX_MESA_agp_offset) +#define GLEE_GLX_EXT_scene_marker GLeeEnabled(&_GLEE_GLX_EXT_scene_marker) + +/* GLX_VERSION_1_3 */ + +#ifndef GLX_VERSION_1_3 +#define GLX_VERSION_1_3 1 +#define __GLEE_GLX_VERSION_1_3 1 +/* Constants */ +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_CONFIG_CAVEAT 0x20 +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_DONT_CARE 0xFFFFFFFF +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 +#define GLX_VISUAL_ID 0x800B +#define GLX_SCREEN 0x800C +#define GLX_NON_CONFORMANT_CONFIG 0x800D +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 +#define GLX_PBUFFER_HEIGHT 0x8040 +#define GLX_PBUFFER_WIDTH 0x8041 +typedef GLXFBConfig * (APIENTRYP PFNGLXGETFBCONFIGSPROC) (Display * dpy, int screen, int * nelements); +typedef GLXFBConfig * (APIENTRYP PFNGLXCHOOSEFBCONFIGPROC) (Display * dpy, int screen, const int * attrib_list, int * nelements); +typedef int (APIENTRYP PFNGLXGETFBCONFIGATTRIBPROC) (Display * dpy, GLXFBConfig config, int attribute, int * value); +typedef XVisualInfo * (APIENTRYP PFNGLXGETVISUALFROMFBCONFIGPROC) (Display * dpy, GLXFBConfig config); +typedef GLXWindow (APIENTRYP PFNGLXCREATEWINDOWPROC) (Display * dpy, GLXFBConfig config, Window win, const int * attrib_list); +typedef void (APIENTRYP PFNGLXDESTROYWINDOWPROC) (Display * dpy, GLXWindow win); +typedef GLXPixmap (APIENTRYP PFNGLXCREATEPIXMAPPROC) (Display * dpy, GLXFBConfig config, Pixmap pixmap, const int * attrib_list); +typedef void (APIENTRYP PFNGLXDESTROYPIXMAPPROC) (Display * dpy, GLXPixmap pixmap); +typedef GLXPbuffer (APIENTRYP PFNGLXCREATEPBUFFERPROC) (Display * dpy, GLXFBConfig config, const int * attrib_list); +typedef void (APIENTRYP PFNGLXDESTROYPBUFFERPROC) (Display * dpy, GLXPbuffer pbuf); +typedef void (APIENTRYP PFNGLXQUERYDRAWABLEPROC) (Display * dpy, GLXDrawable draw, int attribute, unsigned int * value); +typedef GLXContext (APIENTRYP PFNGLXCREATENEWCONTEXTPROC) (Display * dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef Bool (APIENTRYP PFNGLXMAKECONTEXTCURRENTPROC) (Display * dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable (APIENTRYP PFNGLXGETCURRENTREADDRAWABLEPROC) (); +typedef Display * (APIENTRYP PFNGLXGETCURRENTDISPLAYPROC) (); +typedef int (APIENTRYP PFNGLXQUERYCONTEXTPROC) (Display * dpy, GLXContext ctx, int attribute, int * value); +typedef void (APIENTRYP PFNGLXSELECTEVENTPROC) (Display * dpy, GLXDrawable draw, unsigned long event_mask); +typedef void (APIENTRYP PFNGLXGETSELECTEDEVENTPROC) (Display * dpy, GLXDrawable draw, unsigned long * event_mask); +GLEE_EXTERN PFNGLXGETFBCONFIGSPROC pglXGetFBConfigs; +GLEE_EXTERN PFNGLXCHOOSEFBCONFIGPROC pglXChooseFBConfig; +GLEE_EXTERN PFNGLXGETFBCONFIGATTRIBPROC pglXGetFBConfigAttrib; +GLEE_EXTERN PFNGLXGETVISUALFROMFBCONFIGPROC pglXGetVisualFromFBConfig; +GLEE_EXTERN PFNGLXCREATEWINDOWPROC pglXCreateWindow; +GLEE_EXTERN PFNGLXDESTROYWINDOWPROC pglXDestroyWindow; +GLEE_EXTERN PFNGLXCREATEPIXMAPPROC pglXCreatePixmap; +GLEE_EXTERN PFNGLXDESTROYPIXMAPPROC pglXDestroyPixmap; +GLEE_EXTERN PFNGLXCREATEPBUFFERPROC pglXCreatePbuffer; +GLEE_EXTERN PFNGLXDESTROYPBUFFERPROC pglXDestroyPbuffer; +GLEE_EXTERN PFNGLXQUERYDRAWABLEPROC pglXQueryDrawable; +GLEE_EXTERN PFNGLXCREATENEWCONTEXTPROC pglXCreateNewContext; +GLEE_EXTERN PFNGLXMAKECONTEXTCURRENTPROC pglXMakeContextCurrent; +GLEE_EXTERN PFNGLXGETCURRENTREADDRAWABLEPROC pglXGetCurrentReadDrawable; +GLEE_EXTERN PFNGLXGETCURRENTDISPLAYPROC pglXGetCurrentDisplay; +GLEE_EXTERN PFNGLXQUERYCONTEXTPROC pglXQueryContext; +GLEE_EXTERN PFNGLXSELECTEVENTPROC pglXSelectEvent; +GLEE_EXTERN PFNGLXGETSELECTEDEVENTPROC pglXGetSelectedEvent; +#define glXGetFBConfigs pglXGetFBConfigs +#define glXChooseFBConfig pglXChooseFBConfig +#define glXGetFBConfigAttrib pglXGetFBConfigAttrib +#define glXGetVisualFromFBConfig pglXGetVisualFromFBConfig +#define glXCreateWindow pglXCreateWindow +#define glXDestroyWindow pglXDestroyWindow +#define glXCreatePixmap pglXCreatePixmap +#define glXDestroyPixmap pglXDestroyPixmap +#define glXCreatePbuffer pglXCreatePbuffer +#define glXDestroyPbuffer pglXDestroyPbuffer +#define glXQueryDrawable pglXQueryDrawable +#define glXCreateNewContext pglXCreateNewContext +#define glXMakeContextCurrent pglXMakeContextCurrent +#define glXGetCurrentReadDrawable pglXGetCurrentReadDrawable +#define glXGetCurrentDisplay pglXGetCurrentDisplay +#define glXQueryContext pglXQueryContext +#define glXSelectEvent pglXSelectEvent +#define glXGetSelectedEvent pglXGetSelectedEvent +#endif + +/* GLX_VERSION_1_4 */ + +#ifndef GLX_VERSION_1_4 +#define GLX_VERSION_1_4 1 +#define __GLEE_GLX_VERSION_1_4 1 +/* Constants */ +#define GLX_SAMPLE_BUFFERS 100000 +#define GLX_SAMPLES 100001 +typedef __GLXextFuncPtr (APIENTRYP PFNGLXGETPROCADDRESSPROC) (const GLubyte * procName); +GLEE_EXTERN PFNGLXGETPROCADDRESSPROC pglXGetProcAddress; +#define glXGetProcAddress pglXGetProcAddress +#endif + +/* GLX_ARB_multisample */ + +#ifndef GLX_ARB_multisample +#define GLX_ARB_multisample 1 +#define __GLEE_GLX_ARB_multisample 1 +/* Constants */ +#define GLX_SAMPLE_BUFFERS_ARB 100000 +#define GLX_SAMPLES_ARB 100001 +#endif + +/* GLX_ARB_fbconfig_float */ + +#ifndef GLX_ARB_fbconfig_float +#define GLX_ARB_fbconfig_float 1 +#define __GLEE_GLX_ARB_fbconfig_float 1 +/* Constants */ +#define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 +#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 +#endif + +/* GLX_SGIS_multisample */ + +#ifndef GLX_SGIS_multisample +#define GLX_SGIS_multisample 1 +#define __GLEE_GLX_SGIS_multisample 1 +/* Constants */ +#define GLX_SAMPLE_BUFFERS_SGIS 100000 +#define GLX_SAMPLES_SGIS 100001 +#endif + +/* GLX_EXT_visual_info */ + +#ifndef GLX_EXT_visual_info +#define GLX_EXT_visual_info 1 +#define __GLEE_GLX_EXT_visual_info 1 +/* Constants */ +#define GLX_X_VISUAL_TYPE_EXT 0x22 +#define GLX_TRANSPARENT_TYPE_EXT 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 +#define GLX_NONE_EXT 0x8000 +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_STATIC_GRAY_EXT 0x8007 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 +#endif + +/* GLX_SGI_swap_control */ + +#ifndef GLX_SGI_swap_control +#define GLX_SGI_swap_control 1 +#define __GLEE_GLX_SGI_swap_control 1 +/* Constants */ +typedef int (APIENTRYP PFNGLXSWAPINTERVALSGIPROC) (int interval); +GLEE_EXTERN PFNGLXSWAPINTERVALSGIPROC pglXSwapIntervalSGI; +#define glXSwapIntervalSGI pglXSwapIntervalSGI +#endif + +/* GLX_SGI_video_sync */ + +#ifndef GLX_SGI_video_sync +#define GLX_SGI_video_sync 1 +#define __GLEE_GLX_SGI_video_sync 1 +/* Constants */ +typedef int (APIENTRYP PFNGLXGETVIDEOSYNCSGIPROC) (unsigned int * count); +typedef int (APIENTRYP PFNGLXWAITVIDEOSYNCSGIPROC) (int divisor, int remainder, unsigned int * count); +GLEE_EXTERN PFNGLXGETVIDEOSYNCSGIPROC pglXGetVideoSyncSGI; +GLEE_EXTERN PFNGLXWAITVIDEOSYNCSGIPROC pglXWaitVideoSyncSGI; +#define glXGetVideoSyncSGI pglXGetVideoSyncSGI +#define glXWaitVideoSyncSGI pglXWaitVideoSyncSGI +#endif + +/* GLX_SGI_make_current_read */ + +#ifndef GLX_SGI_make_current_read +#define GLX_SGI_make_current_read 1 +#define __GLEE_GLX_SGI_make_current_read 1 +/* Constants */ +typedef Bool (APIENTRYP PFNGLXMAKECURRENTREADSGIPROC) (Display * dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable (APIENTRYP PFNGLXGETCURRENTREADDRAWABLESGIPROC) (); +GLEE_EXTERN PFNGLXMAKECURRENTREADSGIPROC pglXMakeCurrentReadSGI; +GLEE_EXTERN PFNGLXGETCURRENTREADDRAWABLESGIPROC pglXGetCurrentReadDrawableSGI; +#define glXMakeCurrentReadSGI pglXMakeCurrentReadSGI +#define glXGetCurrentReadDrawableSGI pglXGetCurrentReadDrawableSGI +#endif + +/* GLX_EXT_visual_rating */ + +#ifndef GLX_EXT_visual_rating +#define GLX_EXT_visual_rating 1 +#define __GLEE_GLX_EXT_visual_rating 1 +/* Constants */ +#define GLX_VISUAL_CAVEAT_EXT 0x20 +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D +#endif + +/* GLX_EXT_import_context */ + +#ifndef GLX_EXT_import_context +#define GLX_EXT_import_context 1 +#define __GLEE_GLX_EXT_import_context 1 +/* Constants */ +#define GLX_SHARE_CONTEXT_EXT 0x800A +#define GLX_VISUAL_ID_EXT 0x800B +#define GLX_SCREEN_EXT 0x800C +typedef Display * (APIENTRYP PFNGLXGETCURRENTDISPLAYEXTPROC) (); +typedef int (APIENTRYP PFNGLXQUERYCONTEXTINFOEXTPROC) (Display * dpy, GLXContext context, int attribute, int * value); +typedef GLXContextID (APIENTRYP PFNGLXGETCONTEXTIDEXTPROC) (const GLXContext context); +typedef GLXContext (APIENTRYP PFNGLXIMPORTCONTEXTEXTPROC) (Display * dpy, GLXContextID contextID); +typedef void (APIENTRYP PFNGLXFREECONTEXTEXTPROC) (Display * dpy, GLXContext context); +GLEE_EXTERN PFNGLXGETCURRENTDISPLAYEXTPROC pglXGetCurrentDisplayEXT; +GLEE_EXTERN PFNGLXQUERYCONTEXTINFOEXTPROC pglXQueryContextInfoEXT; +GLEE_EXTERN PFNGLXGETCONTEXTIDEXTPROC pglXGetContextIDEXT; +GLEE_EXTERN PFNGLXIMPORTCONTEXTEXTPROC pglXImportContextEXT; +GLEE_EXTERN PFNGLXFREECONTEXTEXTPROC pglXFreeContextEXT; +#define glXGetCurrentDisplayEXT pglXGetCurrentDisplayEXT +#define glXQueryContextInfoEXT pglXQueryContextInfoEXT +#define glXGetContextIDEXT pglXGetContextIDEXT +#define glXImportContextEXT pglXImportContextEXT +#define glXFreeContextEXT pglXFreeContextEXT +#endif + +/* GLX_SGIX_fbconfig */ + +#ifndef GLX_SGIX_fbconfig +#define GLX_SGIX_fbconfig 1 +#define __GLEE_GLX_SGIX_fbconfig 1 +/* Constants */ +#define GLX_WINDOW_BIT_SGIX 0x00000001 +#define GLX_PIXMAP_BIT_SGIX 0x00000002 +#define GLX_RGBA_BIT_SGIX 0x00000001 +#define GLX_COLOR_INDEX_BIT_SGIX 0x00000002 +#define GLX_DRAWABLE_TYPE_SGIX 0x8010 +#define GLX_RENDER_TYPE_SGIX 0x8011 +#define GLX_X_RENDERABLE_SGIX 0x8012 +#define GLX_FBCONFIG_ID_SGIX 0x8013 +#define GLX_RGBA_TYPE_SGIX 0x8014 +#define GLX_COLOR_INDEX_TYPE_SGIX 0x8015 +typedef int (APIENTRYP PFNGLXGETFBCONFIGATTRIBSGIXPROC) (Display * dpy, GLXFBConfigSGIX config, int attribute, int * value); +typedef GLXFBConfigSGIX * (APIENTRYP PFNGLXCHOOSEFBCONFIGSGIXPROC) (Display * dpy, int screen, int * attrib_list, int * nelements); +typedef GLXPixmap (APIENTRYP PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC) (Display * dpy, GLXFBConfigSGIX config, Pixmap pixmap); +typedef GLXContext (APIENTRYP PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC) (Display * dpy, GLXFBConfigSGIX config, int render_type, GLXContext share_list, Bool direct); +typedef XVisualInfo * (APIENTRYP PFNGLXGETVISUALFROMFBCONFIGSGIXPROC) (Display * dpy, GLXFBConfigSGIX config); +typedef GLXFBConfigSGIX (APIENTRYP PFNGLXGETFBCONFIGFROMVISUALSGIXPROC) (Display * dpy, XVisualInfo * vis); +GLEE_EXTERN PFNGLXGETFBCONFIGATTRIBSGIXPROC pglXGetFBConfigAttribSGIX; +GLEE_EXTERN PFNGLXCHOOSEFBCONFIGSGIXPROC pglXChooseFBConfigSGIX; +GLEE_EXTERN PFNGLXCREATEGLXPIXMAPWITHCONFIGSGIXPROC pglXCreateGLXPixmapWithConfigSGIX; +GLEE_EXTERN PFNGLXCREATECONTEXTWITHCONFIGSGIXPROC pglXCreateContextWithConfigSGIX; +GLEE_EXTERN PFNGLXGETVISUALFROMFBCONFIGSGIXPROC pglXGetVisualFromFBConfigSGIX; +GLEE_EXTERN PFNGLXGETFBCONFIGFROMVISUALSGIXPROC pglXGetFBConfigFromVisualSGIX; +#define glXGetFBConfigAttribSGIX pglXGetFBConfigAttribSGIX +#define glXChooseFBConfigSGIX pglXChooseFBConfigSGIX +#define glXCreateGLXPixmapWithConfigSGIX pglXCreateGLXPixmapWithConfigSGIX +#define glXCreateContextWithConfigSGIX pglXCreateContextWithConfigSGIX +#define glXGetVisualFromFBConfigSGIX pglXGetVisualFromFBConfigSGIX +#define glXGetFBConfigFromVisualSGIX pglXGetFBConfigFromVisualSGIX +#endif + +/* GLX_SGIX_pbuffer */ + +#ifndef GLX_SGIX_pbuffer +#define GLX_SGIX_pbuffer 1 +#define __GLEE_GLX_SGIX_pbuffer 1 +/* Constants */ +#define GLX_PBUFFER_BIT_SGIX 0x00000004 +#define GLX_BUFFER_CLOBBER_MASK_SGIX 0x08000000 +#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT_SGIX 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX 0x00000008 +#define GLX_AUX_BUFFERS_BIT_SGIX 0x00000010 +#define GLX_DEPTH_BUFFER_BIT_SGIX 0x00000020 +#define GLX_STENCIL_BUFFER_BIT_SGIX 0x00000040 +#define GLX_ACCUM_BUFFER_BIT_SGIX 0x00000080 +#define GLX_SAMPLE_BUFFERS_BIT_SGIX 0x00000100 +#define GLX_MAX_PBUFFER_WIDTH_SGIX 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT_SGIX 0x8017 +#define GLX_MAX_PBUFFER_PIXELS_SGIX 0x8018 +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A +#define GLX_PRESERVED_CONTENTS_SGIX 0x801B +#define GLX_LARGEST_PBUFFER_SGIX 0x801C +#define GLX_WIDTH_SGIX 0x801D +#define GLX_HEIGHT_SGIX 0x801E +#define GLX_EVENT_MASK_SGIX 0x801F +#define GLX_DAMAGED_SGIX 0x8020 +#define GLX_SAVED_SGIX 0x8021 +#define GLX_WINDOW_SGIX 0x8022 +#define GLX_PBUFFER_SGIX 0x8023 +typedef GLXPbufferSGIX (APIENTRYP PFNGLXCREATEGLXPBUFFERSGIXPROC) (Display * dpy, GLXFBConfigSGIX config, unsigned int width, unsigned int height, int * attrib_list); +typedef void (APIENTRYP PFNGLXDESTROYGLXPBUFFERSGIXPROC) (Display * dpy, GLXPbufferSGIX pbuf); +typedef int (APIENTRYP PFNGLXQUERYGLXPBUFFERSGIXPROC) (Display * dpy, GLXPbufferSGIX pbuf, int attribute, unsigned int * value); +typedef void (APIENTRYP PFNGLXSELECTEVENTSGIXPROC) (Display * dpy, GLXDrawable drawable, unsigned long mask); +typedef void (APIENTRYP PFNGLXGETSELECTEDEVENTSGIXPROC) (Display * dpy, GLXDrawable drawable, unsigned long * mask); +GLEE_EXTERN PFNGLXCREATEGLXPBUFFERSGIXPROC pglXCreateGLXPbufferSGIX; +GLEE_EXTERN PFNGLXDESTROYGLXPBUFFERSGIXPROC pglXDestroyGLXPbufferSGIX; +GLEE_EXTERN PFNGLXQUERYGLXPBUFFERSGIXPROC pglXQueryGLXPbufferSGIX; +GLEE_EXTERN PFNGLXSELECTEVENTSGIXPROC pglXSelectEventSGIX; +GLEE_EXTERN PFNGLXGETSELECTEDEVENTSGIXPROC pglXGetSelectedEventSGIX; +#define glXCreateGLXPbufferSGIX pglXCreateGLXPbufferSGIX +#define glXDestroyGLXPbufferSGIX pglXDestroyGLXPbufferSGIX +#define glXQueryGLXPbufferSGIX pglXQueryGLXPbufferSGIX +#define glXSelectEventSGIX pglXSelectEventSGIX +#define glXGetSelectedEventSGIX pglXGetSelectedEventSGIX +#endif + +/* GLX_SGI_cushion */ + +#ifndef GLX_SGI_cushion +#define GLX_SGI_cushion 1 +#define __GLEE_GLX_SGI_cushion 1 +/* Constants */ +typedef void (APIENTRYP PFNGLXCUSHIONSGIPROC) (Display * dpy, Window window, float cushion); +GLEE_EXTERN PFNGLXCUSHIONSGIPROC pglXCushionSGI; +#define glXCushionSGI pglXCushionSGI +#endif + +/* GLX_SGIX_video_resize */ + +#ifndef GLX_SGIX_video_resize +#define GLX_SGIX_video_resize 1 +#define __GLEE_GLX_SGIX_video_resize 1 +/* Constants */ +#define GLX_SYNC_FRAME_SGIX 0x00000000 +#define GLX_SYNC_SWAP_SGIX 0x00000001 +typedef int (APIENTRYP PFNGLXBINDCHANNELTOWINDOWSGIXPROC) (Display * display, int screen, int channel, Window window); +typedef int (APIENTRYP PFNGLXCHANNELRECTSGIXPROC) (Display * display, int screen, int channel, int x, int y, int w, int h); +typedef int (APIENTRYP PFNGLXQUERYCHANNELRECTSGIXPROC) (Display * display, int screen, int channel, int * dx, int * dy, int * dw, int * dh); +typedef int (APIENTRYP PFNGLXQUERYCHANNELDELTASSGIXPROC) (Display * display, int screen, int channel, int * x, int * y, int * w, int * h); +typedef int (APIENTRYP PFNGLXCHANNELRECTSYNCSGIXPROC) (Display * display, int screen, int channel, GLenum synctype); +GLEE_EXTERN PFNGLXBINDCHANNELTOWINDOWSGIXPROC pglXBindChannelToWindowSGIX; +GLEE_EXTERN PFNGLXCHANNELRECTSGIXPROC pglXChannelRectSGIX; +GLEE_EXTERN PFNGLXQUERYCHANNELRECTSGIXPROC pglXQueryChannelRectSGIX; +GLEE_EXTERN PFNGLXQUERYCHANNELDELTASSGIXPROC pglXQueryChannelDeltasSGIX; +GLEE_EXTERN PFNGLXCHANNELRECTSYNCSGIXPROC pglXChannelRectSyncSGIX; +#define glXBindChannelToWindowSGIX pglXBindChannelToWindowSGIX +#define glXChannelRectSGIX pglXChannelRectSGIX +#define glXQueryChannelRectSGIX pglXQueryChannelRectSGIX +#define glXQueryChannelDeltasSGIX pglXQueryChannelDeltasSGIX +#define glXChannelRectSyncSGIX pglXChannelRectSyncSGIX +#endif + +/* GLX_SGIX_swap_group */ + +#ifndef GLX_SGIX_swap_group +#define GLX_SGIX_swap_group 1 +#define __GLEE_GLX_SGIX_swap_group 1 +/* Constants */ +typedef void (APIENTRYP PFNGLXJOINSWAPGROUPSGIXPROC) (Display * dpy, GLXDrawable drawable, GLXDrawable member); +GLEE_EXTERN PFNGLXJOINSWAPGROUPSGIXPROC pglXJoinSwapGroupSGIX; +#define glXJoinSwapGroupSGIX pglXJoinSwapGroupSGIX +#endif + +/* GLX_SGIX_swap_barrier */ + +#ifndef GLX_SGIX_swap_barrier +#define GLX_SGIX_swap_barrier 1 +#define __GLEE_GLX_SGIX_swap_barrier 1 +/* Constants */ +typedef void (APIENTRYP PFNGLXBINDSWAPBARRIERSGIXPROC) (Display * dpy, GLXDrawable drawable, int barrier); +typedef Bool (APIENTRYP PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC) (Display * dpy, int screen, int * max); +GLEE_EXTERN PFNGLXBINDSWAPBARRIERSGIXPROC pglXBindSwapBarrierSGIX; +GLEE_EXTERN PFNGLXQUERYMAXSWAPBARRIERSSGIXPROC pglXQueryMaxSwapBarriersSGIX; +#define glXBindSwapBarrierSGIX pglXBindSwapBarrierSGIX +#define glXQueryMaxSwapBarriersSGIX pglXQueryMaxSwapBarriersSGIX +#endif + +/* GLX_SGIS_blended_overlay */ + +#ifndef GLX_SGIS_blended_overlay +#define GLX_SGIS_blended_overlay 1 +#define __GLEE_GLX_SGIS_blended_overlay 1 +/* Constants */ +#define GLX_BLENDED_RGBA_SGIS 0x8025 +#endif + +/* GLX_SGIS_shared_multisample */ + +#ifndef GLX_SGIS_shared_multisample +#define GLX_SGIS_shared_multisample 1 +#define __GLEE_GLX_SGIS_shared_multisample 1 +/* Constants */ +#define GLX_MULTISAMPLE_SUB_RECT_WIDTH_SGIS 0x8026 +#define GLX_MULTISAMPLE_SUB_RECT_HEIGHT_SGIS 0x8027 +#endif + +/* GLX_SUN_get_transparent_index */ + +#ifndef GLX_SUN_get_transparent_index +#define GLX_SUN_get_transparent_index 1 +#define __GLEE_GLX_SUN_get_transparent_index 1 +/* Constants */ +typedef Status (APIENTRYP PFNGLXGETTRANSPARENTINDEXSUNPROC) (Display * dpy, Window overlay, Window underlay, long * pTransparentIndex); +GLEE_EXTERN PFNGLXGETTRANSPARENTINDEXSUNPROC pglXGetTransparentIndexSUN; +#define glXGetTransparentIndexSUN pglXGetTransparentIndexSUN +#endif + +/* GLX_3DFX_multisample */ + +#ifndef GLX_3DFX_multisample +#define GLX_3DFX_multisample 1 +#define __GLEE_GLX_3DFX_multisample 1 +/* Constants */ +#define GLX_SAMPLE_BUFFERS_3DFX 0x8050 +#define GLX_SAMPLES_3DFX 0x8051 +#endif + +/* GLX_MESA_copy_sub_buffer */ + +#ifndef GLX_MESA_copy_sub_buffer +#define GLX_MESA_copy_sub_buffer 1 +#define __GLEE_GLX_MESA_copy_sub_buffer 1 +/* Constants */ +typedef void (APIENTRYP PFNGLXCOPYSUBBUFFERMESAPROC) (Display * dpy, GLXDrawable drawable, int x, int y, int width, int height); +GLEE_EXTERN PFNGLXCOPYSUBBUFFERMESAPROC pglXCopySubBufferMESA; +#define glXCopySubBufferMESA pglXCopySubBufferMESA +#endif + +/* GLX_MESA_pixmap_colormap */ + +#ifndef GLX_MESA_pixmap_colormap +#define GLX_MESA_pixmap_colormap 1 +#define __GLEE_GLX_MESA_pixmap_colormap 1 +/* Constants */ +typedef GLXPixmap (APIENTRYP PFNGLXCREATEGLXPIXMAPMESAPROC) (Display * dpy, XVisualInfo * visual, Pixmap pixmap, Colormap cmap); +GLEE_EXTERN PFNGLXCREATEGLXPIXMAPMESAPROC pglXCreateGLXPixmapMESA; +#define glXCreateGLXPixmapMESA pglXCreateGLXPixmapMESA +#endif + +/* GLX_MESA_release_buffers */ + +#ifndef GLX_MESA_release_buffers +#define GLX_MESA_release_buffers 1 +#define __GLEE_GLX_MESA_release_buffers 1 +/* Constants */ +typedef Bool (APIENTRYP PFNGLXRELEASEBUFFERSMESAPROC) (Display * dpy, GLXDrawable drawable); +GLEE_EXTERN PFNGLXRELEASEBUFFERSMESAPROC pglXReleaseBuffersMESA; +#define glXReleaseBuffersMESA pglXReleaseBuffersMESA +#endif + +/* GLX_MESA_set_3dfx_mode */ + +#ifndef GLX_MESA_set_3dfx_mode +#define GLX_MESA_set_3dfx_mode 1 +#define __GLEE_GLX_MESA_set_3dfx_mode 1 +/* Constants */ +#define GLX_3DFX_WINDOW_MODE_MESA 0x1 +#define GLX_3DFX_FULLSCREEN_MODE_MESA 0x2 +typedef Bool (APIENTRYP PFNGLXSET3DFXMODEMESAPROC) (int mode); +GLEE_EXTERN PFNGLXSET3DFXMODEMESAPROC pglXSet3DfxModeMESA; +#define glXSet3DfxModeMESA pglXSet3DfxModeMESA +#endif + +/* GLX_SGIX_visual_select_group */ + +#ifndef GLX_SGIX_visual_select_group +#define GLX_SGIX_visual_select_group 1 +#define __GLEE_GLX_SGIX_visual_select_group 1 +/* Constants */ +#define GLX_VISUAL_SELECT_GROUP_SGIX 0x8028 +#endif + +/* GLX_OML_swap_method */ + +#ifndef GLX_OML_swap_method +#define GLX_OML_swap_method 1 +#define __GLEE_GLX_OML_swap_method 1 +/* Constants */ +#define GLX_SWAP_METHOD_OML 0x8060 +#define GLX_SWAP_EXCHANGE_OML 0x8061 +#define GLX_SWAP_COPY_OML 0x8062 +#define GLX_SWAP_UNDEFINED_OML 0x8063 +#endif + +/* GLX_OML_sync_control */ + +#ifndef GLX_OML_sync_control +#define GLX_OML_sync_control 1 +#define __GLEE_GLX_OML_sync_control 1 +/* Constants */ +typedef Bool (APIENTRYP PFNGLXGETSYNCVALUESOMLPROC) (Display * dpy, GLXDrawable drawable, int64_t * ust, int64_t * msc, int64_t * sbc); +typedef Bool (APIENTRYP PFNGLXGETMSCRATEOMLPROC) (Display * dpy, GLXDrawable drawable, int32_t * numerator, int32_t * denominator); +typedef int64_t (APIENTRYP PFNGLXSWAPBUFFERSMSCOMLPROC) (Display * dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder); +typedef Bool (APIENTRYP PFNGLXWAITFORMSCOMLPROC) (Display * dpy, GLXDrawable drawable, int64_t target_msc, int64_t divisor, int64_t remainder, int64_t * ust, int64_t * msc, int64_t * sbc); +typedef Bool (APIENTRYP PFNGLXWAITFORSBCOMLPROC) (Display * dpy, GLXDrawable drawable, int64_t target_sbc, int64_t * ust, int64_t * msc, int64_t * sbc); +GLEE_EXTERN PFNGLXGETSYNCVALUESOMLPROC pglXGetSyncValuesOML; +GLEE_EXTERN PFNGLXGETMSCRATEOMLPROC pglXGetMscRateOML; +GLEE_EXTERN PFNGLXSWAPBUFFERSMSCOMLPROC pglXSwapBuffersMscOML; +GLEE_EXTERN PFNGLXWAITFORMSCOMLPROC pglXWaitForMscOML; +GLEE_EXTERN PFNGLXWAITFORSBCOMLPROC pglXWaitForSbcOML; +#define glXGetSyncValuesOML pglXGetSyncValuesOML +#define glXGetMscRateOML pglXGetMscRateOML +#define glXSwapBuffersMscOML pglXSwapBuffersMscOML +#define glXWaitForMscOML pglXWaitForMscOML +#define glXWaitForSbcOML pglXWaitForSbcOML +#endif + +/* GLX_NV_float_buffer */ + +#ifndef GLX_NV_float_buffer +#define GLX_NV_float_buffer 1 +#define __GLEE_GLX_NV_float_buffer 1 +/* Constants */ +#define GLX_FLOAT_COMPONENTS_NV 0x20B0 +#endif + +/* GLX_SGIX_hyperpipe */ + +#ifndef GLX_SGIX_hyperpipe +#define GLX_SGIX_hyperpipe 1 +#define __GLEE_GLX_SGIX_hyperpipe 1 +/* Constants */ +#define GLX_HYPERPIPE_PIPE_NAME_LENGTH_SGIX 80 +#define GLX_BAD_HYPERPIPE_CONFIG_SGIX 91 +#define GLX_BAD_HYPERPIPE_SGIX 92 +#define GLX_HYPERPIPE_DISPLAY_PIPE_SGIX 0x00000001 +#define GLX_HYPERPIPE_RENDER_PIPE_SGIX 0x00000002 +#define GLX_PIPE_RECT_SGIX 0x00000001 +#define GLX_PIPE_RECT_LIMITS_SGIX 0x00000002 +#define GLX_HYPERPIPE_STEREO_SGIX 0x00000003 +#define GLX_HYPERPIPE_PIXEL_AVERAGE_SGIX 0x00000004 +#define GLX_HYPERPIPE_ID_SGIX 0x8030 +typedef GLXHyperpipeNetworkSGIX * (APIENTRYP PFNGLXQUERYHYPERPIPENETWORKSGIXPROC) (Display * dpy, int * npipes); +typedef int (APIENTRYP PFNGLXHYPERPIPECONFIGSGIXPROC) (Display * dpy, int networkId, int npipes, GLXHyperpipeConfigSGIX * cfg, int * hpId); +typedef GLXHyperpipeConfigSGIX * (APIENTRYP PFNGLXQUERYHYPERPIPECONFIGSGIXPROC) (Display * dpy, int hpId, int * npipes); +typedef int (APIENTRYP PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC) (Display * dpy, int hpId); +typedef int (APIENTRYP PFNGLXBINDHYPERPIPESGIXPROC) (Display * dpy, int hpId); +typedef int (APIENTRYP PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC) (Display * dpy, int timeSlice, int attrib, int size, void * attribList, void * returnAttribList); +typedef int (APIENTRYP PFNGLXHYPERPIPEATTRIBSGIXPROC) (Display * dpy, int timeSlice, int attrib, int size, void * attribList); +typedef int (APIENTRYP PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC) (Display * dpy, int timeSlice, int attrib, int size, void * returnAttribList); +GLEE_EXTERN PFNGLXQUERYHYPERPIPENETWORKSGIXPROC pglXQueryHyperpipeNetworkSGIX; +GLEE_EXTERN PFNGLXHYPERPIPECONFIGSGIXPROC pglXHyperpipeConfigSGIX; +GLEE_EXTERN PFNGLXQUERYHYPERPIPECONFIGSGIXPROC pglXQueryHyperpipeConfigSGIX; +GLEE_EXTERN PFNGLXDESTROYHYPERPIPECONFIGSGIXPROC pglXDestroyHyperpipeConfigSGIX; +GLEE_EXTERN PFNGLXBINDHYPERPIPESGIXPROC pglXBindHyperpipeSGIX; +GLEE_EXTERN PFNGLXQUERYHYPERPIPEBESTATTRIBSGIXPROC pglXQueryHyperpipeBestAttribSGIX; +GLEE_EXTERN PFNGLXHYPERPIPEATTRIBSGIXPROC pglXHyperpipeAttribSGIX; +GLEE_EXTERN PFNGLXQUERYHYPERPIPEATTRIBSGIXPROC pglXQueryHyperpipeAttribSGIX; +#define glXQueryHyperpipeNetworkSGIX pglXQueryHyperpipeNetworkSGIX +#define glXHyperpipeConfigSGIX pglXHyperpipeConfigSGIX +#define glXQueryHyperpipeConfigSGIX pglXQueryHyperpipeConfigSGIX +#define glXDestroyHyperpipeConfigSGIX pglXDestroyHyperpipeConfigSGIX +#define glXBindHyperpipeSGIX pglXBindHyperpipeSGIX +#define glXQueryHyperpipeBestAttribSGIX pglXQueryHyperpipeBestAttribSGIX +#define glXHyperpipeAttribSGIX pglXHyperpipeAttribSGIX +#define glXQueryHyperpipeAttribSGIX pglXQueryHyperpipeAttribSGIX +#endif + +/* GLX_MESA_agp_offset */ + +#ifndef GLX_MESA_agp_offset +#define GLX_MESA_agp_offset 1 +#define __GLEE_GLX_MESA_agp_offset 1 +/* Constants */ +typedef unsigned int (APIENTRYP PFNGLXGETAGPOFFSETMESAPROC) (const void * pointer); +GLEE_EXTERN PFNGLXGETAGPOFFSETMESAPROC pglXGetAGPOffsetMESA; +#define glXGetAGPOffsetMESA pglXGetAGPOffsetMESA +#endif + +/* GLX_EXT_scene_marker */ + +#ifndef GLX_EXT_scene_marker +#define GLX_EXT_scene_marker 1 +#define __GLEE_GLX_EXT_scene_marker 1 +/* Constants */ +#endif +#endif /*end GLX */ + +/***************************************************************** + * GLee functions + *****************************************************************/ + +GLEE_EXTERN GLboolean GLeeInit(); +GLEE_EXTERN GLint GLeeForceLink(const char * extensionName); +GLEE_EXTERN const char * GLeeGetErrorString(); +GLEE_EXTERN const char * GLeeGetExtStrGL(); +GLEE_EXTERN GLboolean GLeeEnabled(GLboolean * extensionQueryingVariable); + +#ifdef WIN32 +GLEE_EXTERN const char * GLeeGetExtStrWGL(); +#elif defined(__APPLE__) || defined(__APPLE_CC__) +#else +GLEE_EXTERN const char * GLeeGetExtStrGLX(); +#endif + +#ifdef __cplusplus +} /* end C linkage */ +#endif + +#endif /* __glee_h_ defined */ Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/glut32.lib and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/glut32.lib differ diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/glut.h electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/glut.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/glut.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/glut.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,716 @@ +#ifndef __glut_h__ +#define __glut_h__ + +/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */ + +/* This program is freely distributable without licensing fees and is + provided without guarantee or warrantee expressed or implied. This + program is -not- in the public domain. */ + +#if defined(_WIN32) + +/* GLUT 3.7 now tries to avoid including + to avoid name space pollution, but Win32's + needs APIENTRY and WINGDIAPI defined properly. */ +# if 0 + /* This would put tons of macros and crap in our clean name space. */ +# define WIN32_LEAN_AND_MEAN +# include +# else + /* XXX This is from Win32's */ +# ifndef APIENTRY +# define GLUT_APIENTRY_DEFINED +# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) || defined(__LCC__) +# define APIENTRY __stdcall +# else +# define APIENTRY +# endif +# endif + /* XXX This is from Win32's */ +# ifndef CALLBACK +# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS) || defined(__LCC__) +# define CALLBACK __stdcall +# else +# define CALLBACK +# endif +# endif + /* XXX Hack for lcc compiler. It doesn't support __declspec(dllimport), just __stdcall. */ +# if defined( __LCC__ ) +# undef WINGDIAPI +# define WINGDIAPI __stdcall +# else + /* XXX This is from Win32's and */ +# ifndef WINGDIAPI +# define GLUT_WINGDIAPI_DEFINED +# define WINGDIAPI __declspec(dllimport) +# endif +# endif + /* XXX This is from Win32's */ +# ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +# define _WCHAR_T_DEFINED +# endif +# endif + +/* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA + in your compile preprocessor options. */ +# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA) +# pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */ +/* To enable automatic SGI OpenGL for Windows library usage for GLUT, + define GLUT_USE_SGI_OPENGL in your compile preprocessor options. */ +# ifdef GLUT_USE_SGI_OPENGL +# pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */ +# pragma comment (lib, "glu.lib") /* link with SGI OpenGL Utility lib */ +# pragma comment (lib, "glut.lib") /* link with Win32 GLUT for SGI OpenGL lib */ +# else +# pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */ +# pragma comment (lib, "glu32.lib") /* link with Microsoft OpenGL Utility lib */ +# pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */ +# endif +# endif + +/* To disable supression of annoying warnings about floats being promoted + to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor + options. */ +# ifndef GLUT_NO_WARNING_DISABLE +# pragma warning (disable:4244) /* Disable bogus VC++ 4.2 conversion warnings. */ +# pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */ +# endif + +/* Win32 has an annoying issue where there are multiple C run-time + libraries (CRTs). If the executable is linked with a different CRT + from the GLUT DLL, the GLUT DLL will not share the same CRT static + data seen by the executable. In particular, atexit callbacks registered + in the executable will not be called if GLUT calls its (different) + exit routine). GLUT is typically built with the + "/MD" option (the CRT with multithreading DLL support), but the Visual + C++ linker default is "/ML" (the single threaded CRT). + + One workaround to this issue is requiring users to always link with + the same CRT as GLUT is compiled with. That requires users supply a + non-standard option. GLUT 3.7 has its own built-in workaround where + the executable's "exit" function pointer is covertly passed to GLUT. + GLUT then calls the executable's exit function pointer to ensure that + any "atexit" calls registered by the application are called if GLUT + needs to exit. + + Note that the __glut*WithExit routines should NEVER be called directly. + To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */ + +/* XXX This is from Win32's */ +# if !defined(_MSC_VER) && !defined(__cdecl) + /* Define __cdecl for non-Microsoft compilers. */ +# define __cdecl +# define GLUT_DEFINED___CDECL +# endif +# ifndef _CRTIMP +# ifdef _NTSDK + /* Definition compatible with NT SDK */ +# define _CRTIMP +# else + /* Current definition */ +# ifdef _DLL +# define _CRTIMP __declspec(dllimport) +# else +# define _CRTIMP +# endif +# endif +# define GLUT_DEFINED__CRTIMP +# endif + +/* GLUT API entry point declarations for Win32. */ +# ifdef GLUT_BUILDING_LIB +# define GLUTAPI __declspec(dllexport) +# else +# ifdef _DLL +# define GLUTAPI __declspec(dllimport) +# else +# define GLUTAPI extern +# endif +# endif + +/* GLUT callback calling convention for Win32. */ +# define GLUTCALLBACK __cdecl + +#endif /* _WIN32 */ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(_WIN32) +# ifndef GLUT_BUILDING_LIB +extern _CRTIMP void __cdecl exit(int); +# endif +#else +/* non-Win32 case. */ +/* Define APIENTRY and CALLBACK to nothing if we aren't on Win32. */ +# define APIENTRY +# define GLUT_APIENTRY_DEFINED +# define CALLBACK +/* Define GLUTAPI and GLUTCALLBACK as below if we aren't on Win32. */ +# define GLUTAPI extern +# define GLUTCALLBACK +/* Prototype exit for the non-Win32 case (see above). */ +extern void exit(int); +#endif + +/** + GLUT API revision history: + + GLUT_API_VERSION is updated to reflect incompatible GLUT + API changes (interface changes, semantic changes, deletions, + or additions). + + GLUT_API_VERSION=1 First public release of GLUT. 11/29/94 + + GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling, + extension. Supports new input devices like tablet, dial and button + box, and Spaceball. Easy to query OpenGL extensions. + + GLUT_API_VERSION=3 glutMenuStatus added. + + GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer, + glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic + video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc, + glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat, + glutJoystickFunc, glutForceJoystickFunc (NOT FINALIZED!). +**/ +#ifndef GLUT_API_VERSION /* allow this to be overriden */ +#define GLUT_API_VERSION 3 +#endif + +/** + GLUT implementation revision history: + + GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT + API revisions and implementation revisions (ie, bug fixes). + + GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of + GLUT Xlib-based implementation. 11/29/94 + + GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of + GLUT Xlib-based implementation providing GLUT version 2 + interfaces. + + GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95 + + GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95 + + GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95 + + GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96 + + GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner + and video resize. 1/3/97 + + GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines. + + GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release. + + GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling. + + GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support. + + GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface. + + GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa +**/ +#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */ +#define GLUT_XLIB_IMPLEMENTATION 15 +#endif + +/* Display mode bit masks. */ +#define GLUT_RGB 0 +#define GLUT_RGBA GLUT_RGB +#define GLUT_INDEX 1 +#define GLUT_SINGLE 0 +#define GLUT_DOUBLE 2 +#define GLUT_ACCUM 4 +#define GLUT_ALPHA 8 +#define GLUT_DEPTH 16 +#define GLUT_STENCIL 32 +#if (GLUT_API_VERSION >= 2) +#define GLUT_MULTISAMPLE 128 +#define GLUT_STEREO 256 +#endif +#if (GLUT_API_VERSION >= 3) +#define GLUT_LUMINANCE 512 +#endif + +/* Mouse buttons. */ +#define GLUT_LEFT_BUTTON 0 +#define GLUT_MIDDLE_BUTTON 1 +#define GLUT_RIGHT_BUTTON 2 + +/* Mouse button state. */ +#define GLUT_DOWN 0 +#define GLUT_UP 1 + +#if (GLUT_API_VERSION >= 2) +/* function keys */ +#define GLUT_KEY_F1 1 +#define GLUT_KEY_F2 2 +#define GLUT_KEY_F3 3 +#define GLUT_KEY_F4 4 +#define GLUT_KEY_F5 5 +#define GLUT_KEY_F6 6 +#define GLUT_KEY_F7 7 +#define GLUT_KEY_F8 8 +#define GLUT_KEY_F9 9 +#define GLUT_KEY_F10 10 +#define GLUT_KEY_F11 11 +#define GLUT_KEY_F12 12 +/* directional keys */ +#define GLUT_KEY_LEFT 100 +#define GLUT_KEY_UP 101 +#define GLUT_KEY_RIGHT 102 +#define GLUT_KEY_DOWN 103 +#define GLUT_KEY_PAGE_UP 104 +#define GLUT_KEY_PAGE_DOWN 105 +#define GLUT_KEY_HOME 106 +#define GLUT_KEY_END 107 +#define GLUT_KEY_INSERT 108 +#endif + +/* Entry/exit state. */ +#define GLUT_LEFT 0 +#define GLUT_ENTERED 1 + +/* Menu usage state. */ +#define GLUT_MENU_NOT_IN_USE 0 +#define GLUT_MENU_IN_USE 1 + +/* Visibility state. */ +#define GLUT_NOT_VISIBLE 0 +#define GLUT_VISIBLE 1 + +/* Window status state. */ +#define GLUT_HIDDEN 0 +#define GLUT_FULLY_RETAINED 1 +#define GLUT_PARTIALLY_RETAINED 2 +#define GLUT_FULLY_COVERED 3 + +/* Color index component selection values. */ +#define GLUT_RED 0 +#define GLUT_GREEN 1 +#define GLUT_BLUE 2 + +#if defined(_WIN32) +/* Stroke font constants (use these in GLUT program). */ +#define GLUT_STROKE_ROMAN ((void*)0) +#define GLUT_STROKE_MONO_ROMAN ((void*)1) + +/* Bitmap font constants (use these in GLUT program). */ +#define GLUT_BITMAP_9_BY_15 ((void*)2) +#define GLUT_BITMAP_8_BY_13 ((void*)3) +#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4) +#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5) +#if (GLUT_API_VERSION >= 3) +#define GLUT_BITMAP_HELVETICA_10 ((void*)6) +#define GLUT_BITMAP_HELVETICA_12 ((void*)7) +#define GLUT_BITMAP_HELVETICA_18 ((void*)8) +#endif +#else +/* Stroke font opaque addresses (use constants instead in source code). */ +GLUTAPI void *glutStrokeRoman; +GLUTAPI void *glutStrokeMonoRoman; + +/* Stroke font constants (use these in GLUT program). */ +#define GLUT_STROKE_ROMAN (&glutStrokeRoman) +#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman) + +/* Bitmap font opaque addresses (use constants instead in source code). */ +GLUTAPI void *glutBitmap9By15; +GLUTAPI void *glutBitmap8By13; +GLUTAPI void *glutBitmapTimesRoman10; +GLUTAPI void *glutBitmapTimesRoman24; +GLUTAPI void *glutBitmapHelvetica10; +GLUTAPI void *glutBitmapHelvetica12; +GLUTAPI void *glutBitmapHelvetica18; + +/* Bitmap font constants (use these in GLUT program). */ +#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15) +#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13) +#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10) +#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24) +#if (GLUT_API_VERSION >= 3) +#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10) +#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12) +#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18) +#endif +#endif + +/* glutGet parameters. */ +#define GLUT_WINDOW_X ((GLenum) 100) +#define GLUT_WINDOW_Y ((GLenum) 101) +#define GLUT_WINDOW_WIDTH ((GLenum) 102) +#define GLUT_WINDOW_HEIGHT ((GLenum) 103) +#define GLUT_WINDOW_BUFFER_SIZE ((GLenum) 104) +#define GLUT_WINDOW_STENCIL_SIZE ((GLenum) 105) +#define GLUT_WINDOW_DEPTH_SIZE ((GLenum) 106) +#define GLUT_WINDOW_RED_SIZE ((GLenum) 107) +#define GLUT_WINDOW_GREEN_SIZE ((GLenum) 108) +#define GLUT_WINDOW_BLUE_SIZE ((GLenum) 109) +#define GLUT_WINDOW_ALPHA_SIZE ((GLenum) 110) +#define GLUT_WINDOW_ACCUM_RED_SIZE ((GLenum) 111) +#define GLUT_WINDOW_ACCUM_GREEN_SIZE ((GLenum) 112) +#define GLUT_WINDOW_ACCUM_BLUE_SIZE ((GLenum) 113) +#define GLUT_WINDOW_ACCUM_ALPHA_SIZE ((GLenum) 114) +#define GLUT_WINDOW_DOUBLEBUFFER ((GLenum) 115) +#define GLUT_WINDOW_RGBA ((GLenum) 116) +#define GLUT_WINDOW_PARENT ((GLenum) 117) +#define GLUT_WINDOW_NUM_CHILDREN ((GLenum) 118) +#define GLUT_WINDOW_COLORMAP_SIZE ((GLenum) 119) +#if (GLUT_API_VERSION >= 2) +#define GLUT_WINDOW_NUM_SAMPLES ((GLenum) 120) +#define GLUT_WINDOW_STEREO ((GLenum) 121) +#endif +#if (GLUT_API_VERSION >= 3) +#define GLUT_WINDOW_CURSOR ((GLenum) 122) +#endif +#define GLUT_SCREEN_WIDTH ((GLenum) 200) +#define GLUT_SCREEN_HEIGHT ((GLenum) 201) +#define GLUT_SCREEN_WIDTH_MM ((GLenum) 202) +#define GLUT_SCREEN_HEIGHT_MM ((GLenum) 203) +#define GLUT_MENU_NUM_ITEMS ((GLenum) 300) +#define GLUT_DISPLAY_MODE_POSSIBLE ((GLenum) 400) +#define GLUT_INIT_WINDOW_X ((GLenum) 500) +#define GLUT_INIT_WINDOW_Y ((GLenum) 501) +#define GLUT_INIT_WINDOW_WIDTH ((GLenum) 502) +#define GLUT_INIT_WINDOW_HEIGHT ((GLenum) 503) +#define GLUT_INIT_DISPLAY_MODE ((GLenum) 504) +#if (GLUT_API_VERSION >= 2) +#define GLUT_ELAPSED_TIME ((GLenum) 700) +#endif +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) +#define GLUT_WINDOW_FORMAT_ID ((GLenum) 123) +#endif + +#if (GLUT_API_VERSION >= 2) +/* glutDeviceGet parameters. */ +#define GLUT_HAS_KEYBOARD ((GLenum) 600) +#define GLUT_HAS_MOUSE ((GLenum) 601) +#define GLUT_HAS_SPACEBALL ((GLenum) 602) +#define GLUT_HAS_DIAL_AND_BUTTON_BOX ((GLenum) 603) +#define GLUT_HAS_TABLET ((GLenum) 604) +#define GLUT_NUM_MOUSE_BUTTONS ((GLenum) 605) +#define GLUT_NUM_SPACEBALL_BUTTONS ((GLenum) 606) +#define GLUT_NUM_BUTTON_BOX_BUTTONS ((GLenum) 607) +#define GLUT_NUM_DIALS ((GLenum) 608) +#define GLUT_NUM_TABLET_BUTTONS ((GLenum) 609) +#endif +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) +#define GLUT_DEVICE_IGNORE_KEY_REPEAT ((GLenum) 610) +#define GLUT_DEVICE_KEY_REPEAT ((GLenum) 611) +#define GLUT_HAS_JOYSTICK ((GLenum) 612) +#define GLUT_OWNS_JOYSTICK ((GLenum) 613) +#define GLUT_JOYSTICK_BUTTONS ((GLenum) 614) +#define GLUT_JOYSTICK_AXES ((GLenum) 615) +#define GLUT_JOYSTICK_POLL_RATE ((GLenum) 616) +#endif + +#if (GLUT_API_VERSION >= 3) +/* glutLayerGet parameters. */ +#define GLUT_OVERLAY_POSSIBLE ((GLenum) 800) +#define GLUT_LAYER_IN_USE ((GLenum) 801) +#define GLUT_HAS_OVERLAY ((GLenum) 802) +#define GLUT_TRANSPARENT_INDEX ((GLenum) 803) +#define GLUT_NORMAL_DAMAGED ((GLenum) 804) +#define GLUT_OVERLAY_DAMAGED ((GLenum) 805) + +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +/* glutVideoResizeGet parameters. */ +#define GLUT_VIDEO_RESIZE_POSSIBLE ((GLenum) 900) +#define GLUT_VIDEO_RESIZE_IN_USE ((GLenum) 901) +#define GLUT_VIDEO_RESIZE_X_DELTA ((GLenum) 902) +#define GLUT_VIDEO_RESIZE_Y_DELTA ((GLenum) 903) +#define GLUT_VIDEO_RESIZE_WIDTH_DELTA ((GLenum) 904) +#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA ((GLenum) 905) +#define GLUT_VIDEO_RESIZE_X ((GLenum) 906) +#define GLUT_VIDEO_RESIZE_Y ((GLenum) 907) +#define GLUT_VIDEO_RESIZE_WIDTH ((GLenum) 908) +#define GLUT_VIDEO_RESIZE_HEIGHT ((GLenum) 909) +#endif + +/* glutUseLayer parameters. */ +#define GLUT_NORMAL ((GLenum) 0) +#define GLUT_OVERLAY ((GLenum) 1) + +/* glutGetModifiers return mask. */ +#define GLUT_ACTIVE_SHIFT 1 +#define GLUT_ACTIVE_CTRL 2 +#define GLUT_ACTIVE_ALT 4 + +/* glutSetCursor parameters. */ +/* Basic arrows. */ +#define GLUT_CURSOR_RIGHT_ARROW 0 +#define GLUT_CURSOR_LEFT_ARROW 1 +/* Symbolic cursor shapes. */ +#define GLUT_CURSOR_INFO 2 +#define GLUT_CURSOR_DESTROY 3 +#define GLUT_CURSOR_HELP 4 +#define GLUT_CURSOR_CYCLE 5 +#define GLUT_CURSOR_SPRAY 6 +#define GLUT_CURSOR_WAIT 7 +#define GLUT_CURSOR_TEXT 8 +#define GLUT_CURSOR_CROSSHAIR 9 +/* Directional cursors. */ +#define GLUT_CURSOR_UP_DOWN 10 +#define GLUT_CURSOR_LEFT_RIGHT 11 +/* Sizing cursors. */ +#define GLUT_CURSOR_TOP_SIDE 12 +#define GLUT_CURSOR_BOTTOM_SIDE 13 +#define GLUT_CURSOR_LEFT_SIDE 14 +#define GLUT_CURSOR_RIGHT_SIDE 15 +#define GLUT_CURSOR_TOP_LEFT_CORNER 16 +#define GLUT_CURSOR_TOP_RIGHT_CORNER 17 +#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18 +#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19 +/* Inherit from parent window. */ +#define GLUT_CURSOR_INHERIT 100 +/* Blank cursor. */ +#define GLUT_CURSOR_NONE 101 +/* Fullscreen crosshair (if available). */ +#define GLUT_CURSOR_FULL_CROSSHAIR 102 +#endif + +/* GLUT initialization sub-API. */ +GLUTAPI void APIENTRY glutInit(int *argcp, char **argv); +#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) +GLUTAPI void APIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); +#ifndef GLUT_BUILDING_LIB +static void APIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } +#define glutInit glutInit_ATEXIT_HACK +#endif +#endif +GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +GLUTAPI void APIENTRY glutInitDisplayString(const char *string); +#endif +GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y); +GLUTAPI void APIENTRY glutInitWindowSize(int width, int height); +GLUTAPI void APIENTRY glutMainLoop(void); + +/* GLUT window sub-API. */ +GLUTAPI int APIENTRY glutCreateWindow(const char *title); +#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) +GLUTAPI int APIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); +#ifndef GLUT_BUILDING_LIB +static int APIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } +#define glutCreateWindow glutCreateWindow_ATEXIT_HACK +#endif +#endif +GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height); +GLUTAPI void APIENTRY glutDestroyWindow(int win); +GLUTAPI void APIENTRY glutPostRedisplay(void); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) +GLUTAPI void APIENTRY glutPostWindowRedisplay(int win); +#endif +GLUTAPI void APIENTRY glutSwapBuffers(void); +GLUTAPI int APIENTRY glutGetWindow(void); +GLUTAPI void APIENTRY glutSetWindow(int win); +GLUTAPI void APIENTRY glutSetWindowTitle(const char *title); +GLUTAPI void APIENTRY glutSetIconTitle(const char *title); +GLUTAPI void APIENTRY glutPositionWindow(int x, int y); +GLUTAPI void APIENTRY glutReshapeWindow(int width, int height); +GLUTAPI void APIENTRY glutPopWindow(void); +GLUTAPI void APIENTRY glutPushWindow(void); +GLUTAPI void APIENTRY glutIconifyWindow(void); +GLUTAPI void APIENTRY glutShowWindow(void); +GLUTAPI void APIENTRY glutHideWindow(void); +#if (GLUT_API_VERSION >= 3) +GLUTAPI void APIENTRY glutFullScreen(void); +GLUTAPI void APIENTRY glutSetCursor(int cursor); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +GLUTAPI void APIENTRY glutWarpPointer(int x, int y); +#endif + +/* GLUT overlay sub-API. */ +GLUTAPI void APIENTRY glutEstablishOverlay(void); +GLUTAPI void APIENTRY glutRemoveOverlay(void); +GLUTAPI void APIENTRY glutUseLayer(GLenum layer); +GLUTAPI void APIENTRY glutPostOverlayRedisplay(void); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11) +GLUTAPI void APIENTRY glutPostWindowOverlayRedisplay(int win); +#endif +GLUTAPI void APIENTRY glutShowOverlay(void); +GLUTAPI void APIENTRY glutHideOverlay(void); +#endif + +/* GLUT menu sub-API. */ +GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int)); +#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) +GLUTAPI int APIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int)); +#ifndef GLUT_BUILDING_LIB +static int APIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); } +#define glutCreateMenu glutCreateMenu_ATEXIT_HACK +#endif +#endif +GLUTAPI void APIENTRY glutDestroyMenu(int menu); +GLUTAPI int APIENTRY glutGetMenu(void); +GLUTAPI void APIENTRY glutSetMenu(int menu); +GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value); +GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu); +GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value); +GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu); +GLUTAPI void APIENTRY glutRemoveMenuItem(int item); +GLUTAPI void APIENTRY glutAttachMenu(int button); +GLUTAPI void APIENTRY glutDetachMenu(int button); + +/* GLUT window callback sub-API. */ +GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void)); +GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height)); +GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); +GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); +GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); +GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); +GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state)); +GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state)); +GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void)); +GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value); +GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state)); +#if (GLUT_API_VERSION >= 2) +GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); +GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); +GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z)); +GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state)); +GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state)); +GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value)); +GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y)); +GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y)); +#if (GLUT_API_VERSION >= 3) +GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y)); +GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void)); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state)); +#endif +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) +GLUTAPI void APIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y)); +GLUTAPI void APIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y)); +GLUTAPI void APIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval); +#endif +#endif +#endif + +/* GLUT color index sub-API. */ +GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue); +GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component); +GLUTAPI void APIENTRY glutCopyColormap(int win); + +/* GLUT state retrieval sub-API. */ +GLUTAPI int APIENTRY glutGet(GLenum type); +GLUTAPI int APIENTRY glutDeviceGet(GLenum type); +#if (GLUT_API_VERSION >= 2) +/* GLUT extension support sub-API */ +GLUTAPI int APIENTRY glutExtensionSupported(const char *name); +#endif +#if (GLUT_API_VERSION >= 3) +GLUTAPI int APIENTRY glutGetModifiers(void); +GLUTAPI int APIENTRY glutLayerGet(GLenum type); +#endif + +/* GLUT font sub-API */ +GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character); +GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character); +GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character); +GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character); +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +GLUTAPI int APIENTRY glutBitmapLength(void *font, const unsigned char *string); +GLUTAPI int APIENTRY glutStrokeLength(void *font, const unsigned char *string); +#endif + +/* GLUT pre-built models sub-API */ +GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks); +GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks); +GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); +GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks); +GLUTAPI void APIENTRY glutWireCube(GLdouble size); +GLUTAPI void APIENTRY glutSolidCube(GLdouble size); +GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); +GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings); +GLUTAPI void APIENTRY glutWireDodecahedron(void); +GLUTAPI void APIENTRY glutSolidDodecahedron(void); +GLUTAPI void APIENTRY glutWireTeapot(GLdouble size); +GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size); +GLUTAPI void APIENTRY glutWireOctahedron(void); +GLUTAPI void APIENTRY glutSolidOctahedron(void); +GLUTAPI void APIENTRY glutWireTetrahedron(void); +GLUTAPI void APIENTRY glutSolidTetrahedron(void); +GLUTAPI void APIENTRY glutWireIcosahedron(void); +GLUTAPI void APIENTRY glutSolidIcosahedron(void); + +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9) +/* GLUT video resize sub-API. */ +GLUTAPI int APIENTRY glutVideoResizeGet(GLenum param); +GLUTAPI void APIENTRY glutSetupVideoResizing(void); +GLUTAPI void APIENTRY glutStopVideoResizing(void); +GLUTAPI void APIENTRY glutVideoResize(int x, int y, int width, int height); +GLUTAPI void APIENTRY glutVideoPan(int x, int y, int width, int height); + +/* GLUT debugging sub-API. */ +GLUTAPI void APIENTRY glutReportErrors(void); +#endif + +#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13) +/* GLUT device control sub-API. */ +/* glutSetKeyRepeat modes. */ +#define GLUT_KEY_REPEAT_OFF 0 +#define GLUT_KEY_REPEAT_ON 1 +#define GLUT_KEY_REPEAT_DEFAULT 2 + +/* Joystick button masks. */ +#define GLUT_JOYSTICK_BUTTON_A 1 +#define GLUT_JOYSTICK_BUTTON_B 2 +#define GLUT_JOYSTICK_BUTTON_C 4 +#define GLUT_JOYSTICK_BUTTON_D 8 + +GLUTAPI void APIENTRY glutIgnoreKeyRepeat(int ignore); +GLUTAPI void APIENTRY glutSetKeyRepeat(int repeatMode); +GLUTAPI void APIENTRY glutForceJoystickFunc(void); + +/* GLUT game mode sub-API. */ +/* glutGameModeGet. */ +#define GLUT_GAME_MODE_ACTIVE ((GLenum) 0) +#define GLUT_GAME_MODE_POSSIBLE ((GLenum) 1) +#define GLUT_GAME_MODE_WIDTH ((GLenum) 2) +#define GLUT_GAME_MODE_HEIGHT ((GLenum) 3) +#define GLUT_GAME_MODE_PIXEL_DEPTH ((GLenum) 4) +#define GLUT_GAME_MODE_REFRESH_RATE ((GLenum) 5) +#define GLUT_GAME_MODE_DISPLAY_CHANGED ((GLenum) 6) + +GLUTAPI void APIENTRY glutGameModeString(const char *string); +GLUTAPI int APIENTRY glutEnterGameMode(void); +GLUTAPI void APIENTRY glutLeaveGameMode(void); +GLUTAPI int APIENTRY glutGameModeGet(GLenum mode); +#endif + +#ifdef __cplusplus +} + +#endif + +#ifdef GLUT_APIENTRY_DEFINED +# undef GLUT_APIENTRY_DEFINED +# undef APIENTRY +#endif + +#ifdef GLUT_WINGDIAPI_DEFINED +# undef GLUT_WINGDIAPI_DEFINED +# undef WINGDIAPI +#endif + +#ifdef GLUT_DEFINED___CDECL +# undef GLUT_DEFINED___CDECL +# undef __cdecl +#endif + +#ifdef GLUT_DEFINED__CRTIMP +# undef GLUT_DEFINED__CRTIMP +# undef _CRTIMP +#endif + +#endif /* __glut_h__ */ diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/glx.cpp electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/glx.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/glx.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/glx.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,679 @@ +#ifndef WIN32 + +#include +#include +#include +#include +#include + +#include "glx.h" +#include "Log.h" +#include "Exception.h" + +namespace DisplayOutput +{ + +using namespace std; + +typedef struct { + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long input_mode; + unsigned long status; +} MotifWmHints, MwmHints; + +#define MWM_HINTS_FUNCTIONS (1L << 0) +#define MWM_HINTS_DECORATIONS (1L << 1) + +#define NET_WM_STATE_TOGGLE 2 + +static Atom XA_NET_WM_STATE; +static Atom XA_NET_WM_STATE_ABOVE; +static Atom XA_WIN_LAYER; +static Atom XA_NET_WM_STATE_ADD; +static Atom XA_NET_WM_STATE_MAXIMIZED_VERT; +static Atom XA_NET_WM_STATE_MAXIMIZED_HORZ; +static Atom XA_NET_WM_STATE_FULLSCREEN; + +static bool bScreensaverMode = false; + +/* +*/ +CUnixGL::CUnixGL() : CDisplayOutput() +{ +} + +CUnixGL::~CUnixGL() +{ +#ifdef LINUX_GNU + if (!bScreensaverMode) { +#endif + XUnmapWindow (m_pDisplay, m_Window); + XDestroyWindow (m_pDisplay, m_Window); +#ifdef LINUX_GNU + } +#endif + XCloseDisplay (m_pDisplay); + +#ifdef LINUX_GNU + if ( !bScreensaverMode ) + /* disable screensaver and screen blanking in non-screensaver mode */ + int dummy = system( "xset s on 2>/dev/null; xset +dpms 2>/dev/null; gconftool-2 --set --type bool \ + /apps/gnome-screensaver/idle_activation_enabled true 2>/dev/null" ); +#endif + +} + +#ifdef LINUX_GNU + +static Bool WaitForNotify( Display *dpy, XEvent *event, XPointer arg ) { + return (event->type == MapNotify) && (event->xmap.window == (Window) arg); +} + +#endif + + +bool CUnixGL::Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ) +{ + m_Width = _width; + m_Height = _height; + + m_pDisplay = XOpenDisplay(0); + assert(m_pDisplay); + + m_WidthFS = WidthOfScreen(DefaultScreenOfDisplay(m_pDisplay)); + m_HeightFS = HeightOfScreen(DefaultScreenOfDisplay(m_pDisplay)); + + XA_NET_WM_STATE = XInternAtom(m_pDisplay, "_NET_WM_STATE", False); + XA_NET_WM_STATE_ABOVE = XInternAtom(m_pDisplay, "_NET_WM_ABOVE", False); + XA_WIN_LAYER = XInternAtom(m_pDisplay, "_WIN_LAYER", False); + + int renderEventBase; + int renderErrorBase; + + if( !XRenderQueryExtension( m_pDisplay, &renderEventBase, &renderErrorBase ) ) + { + g_Log->Error( "No RENDER extension found!" ); + return false; + } + + GLXFBConfig *pFbConfig = NULL; + GLXFBConfig renderFBConfig; + XVisualInfo *pVisualInfo = NULL; + XSetWindowAttributes winAttributes; + int numElements; + XEvent event; + + int singleBufferAttributess[] = { + GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, + GLX_RENDER_TYPE, GLX_RGBA_BIT, + GLX_RED_SIZE, 1, // Request a single buffered color buffer + GLX_GREEN_SIZE, 1, // with the maximum number of color bits + GLX_BLUE_SIZE, 1, // for each component. + None + }; + + int doubleBufferAttributes[] = { + GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, + GLX_RENDER_TYPE, GLX_RGBA_BIT, + GLX_DOUBLEBUFFER, True, // Request a double-buffered color buffer with + GLX_RED_SIZE, 1, // the maximum number of bits per component. + GLX_GREEN_SIZE, 1, + GLX_BLUE_SIZE, 1, + None + }; + + // First check doublebuffered... + pFbConfig = glXChooseFBConfig( m_pDisplay, DefaultScreen( m_pDisplay ), doubleBufferAttributes, &numElements ); + if( pFbConfig ) + g_Log->Info( "Double buffered..." ); + + // ...then singlebuffered. + if( pFbConfig == NULL ) + { + pFbConfig = glXChooseFBConfig( m_pDisplay, DefaultScreen( m_pDisplay ), singleBufferAttributess, &numElements ); + if( pFbConfig ) + g_Log->Info( "Single buffered..." ); + } + + + // Final fail. + assert( pFbConfig ); + + pVisualInfo = glXGetVisualFromFBConfig( m_pDisplay, pFbConfig[0] ); + renderFBConfig = pFbConfig[0]; + + winAttributes.colormap = XCreateColormap( m_pDisplay, RootWindow(m_pDisplay, pVisualInfo->screen),pVisualInfo->visual, AllocNone ); + + winAttributes.border_pixel = 0; + winAttributes.event_mask = StructureNotifyMask | ButtonPressMask | KeyPressMask; + winAttributes.override_redirect = true; + +#ifdef LINUX_GNU + const char *xss_id = getenv("XSCREENSAVER_WINDOW"); + if (xss_id && *xss_id) { + int numReturned; + XVisualInfo *xvis; + XVisualInfo xvtmpl; + XWindowAttributes attr; + + unsigned long id = 0; + sscanf (xss_id, " 0x%lx", &id); + m_Window = (Window) id; + m_GlxWindow = m_Window; + XGetWindowAttributes(m_pDisplay, m_Window, &attr); + + xvtmpl.visual=attr.visual; + xvtmpl.visualid=XVisualIDFromVisual(attr.visual); + + xvis=XGetVisualInfo(m_pDisplay, VisualIDMask, &xvtmpl, &numReturned); + + assert (numReturned>0); + + m_GlxContext = glXCreateContext ( m_pDisplay, &xvis[0], 0, GL_TRUE); + + glXMakeCurrent ( m_pDisplay, m_Window, m_GlxContext); + + + m_Width=attr.width; + m_Height=attr.height; + + bScreensaverMode = true; + } + else { + m_Window = XCreateWindow( m_pDisplay, RootWindow( m_pDisplay, pVisualInfo->screen ), 0, 0, + _bFullscreen?m_WidthFS:m_Width, _bFullscreen?m_HeightFS:m_Height, 0, + pVisualInfo->depth, InputOutput, + pVisualInfo->visual, CWBorderPixel | CWColormap | CWEventMask, &winAttributes); + + setFullScreen( _bFullscreen ); + + XMapRaised( m_pDisplay, m_Window ); + XIfEvent( m_pDisplay, &event, WaitForNotify, (XPointer) m_Window ); + + // need to call this twice !! + setFullScreen( _bFullscreen ); + + m_GlxContext = glXCreateNewContext(m_pDisplay, renderFBConfig, GLX_RGBA_TYPE, 0, GL_TRUE); + m_GlxWindow = glXCreateWindow(m_pDisplay, renderFBConfig, m_Window, 0); + glXMakeContextCurrent(m_pDisplay, m_GlxWindow, m_GlxWindow, m_GlxContext); + + /* disable screensaver and screen blanking in non-screensaver mode */ + int dummy = system( "xset s off 2>/dev/null; xset -dpms 2>/dev/null; gconftool-2 --set --type bool \ + /apps/gnome-screensaver/idle_activation_enabled false 2>/dev/null" ); + } + + Cursor invisibleCursor; + Pixmap bitmapNoData; + XColor black; + static char noData[] = { 0,0,0,0,0,0,0,0 }; + black.red = black.green = black.blue = 0; + + bitmapNoData = XCreateBitmapFromData( m_pDisplay, m_Window, noData, 8, 8 ); + invisibleCursor = XCreatePixmapCursor( m_pDisplay, bitmapNoData, bitmapNoData, + &black, &black, 0, 0 ); + XDefineCursor( m_pDisplay, m_Window, invisibleCursor ); + XFreeCursor( m_pDisplay, invisibleCursor ); + +#else + m_Window = XCreateWindow( m_pDisplay, RootWindow( m_pDisplay, pVisualInfo->screen ), 0, 0, + _bFullscreen?m_WidthFS:m_Width, _bFullscreen?m_HeightFS:m_Height, 0, + pVisualInfo->depth, InputOutput, + pVisualInfo->visual, CWBorderPixel | CWColormap | CWEventMask, &winAttributes); + + if (!bScreensaverMode) setFullScreen( _bFullscreen ); + XMapRaised( m_pDisplay, m_Window ); + if (!bScreensaverMode && _bFullscreen) XIfEvent( m_pDisplay, &event, WaitForNotify, (XPointer) m_Window ); + + m_GlxContext = glXCreateNewContext(m_pDisplay, renderFBConfig, GLX_RGBA_TYPE, 0, GL_TRUE); + m_GlxWindow = glXCreateWindow(m_pDisplay, renderFBConfig, m_Window, 0); + XMapWindow (m_pDisplay, m_Window); + glXMakeContextCurrent(m_pDisplay, m_GlxWindow, m_GlxWindow, m_GlxContext); +#endif + + Atom wmDelete = XInternAtom(m_pDisplay, "WM_DELETE_WINDOW", True); + XSetWMProtocols(m_pDisplay, m_Window, &wmDelete, 1); + + toggleVSync(); + + XFree (pVisualInfo); + + int error = glGetError(); + if( error != GL_NO_ERROR ) + { + std::string msg = ""; + + if( error == GL_INVALID_ENUM ) msg = "GL_INVALID_ENUM"; + else if( error == GL_INVALID_VALUE ) msg = "GL_INVALID_VALUE"; + else if( error == GL_INVALID_OPERATION) msg = "GL_INVALID_OPERATION"; + else if( error == GL_STACK_OVERFLOW) msg = "GL_STACK_OVERFLOW"; + else if( error == GL_STACK_UNDERFLOW) msg = "GL_STACK_UNDERFLOW"; + else if( error == GL_OUT_OF_MEMORY) msg = "GL_OUT_OF_MEMORY"; + else if( error == GL_INVALID_FRAMEBUFFER_OPERATION_EXT) msg = "GL_INVALID_FRAMEBUFFER_OPERATION_EXT"; + else msg = "Unrecognized OpenGL error"; + + g_Log->Error( "%s in %s(%d)", msg.c_str(), __FILE__, __LINE__ ); + return false; + } + + return true; +} + +/* +*/ +void CUnixGL::Title( const std::string &_title ) +{ + XTextProperty textProp; + textProp.value = (unsigned char *)_title.c_str(); + textProp.encoding = XA_STRING; + textProp.format = 8; + textProp.nitems = _title.length(); + + XSetWMName( m_pDisplay, m_Window, &textProp ); +} + +/* +*/ +void CUnixGL::setWindowDecorations( bool enabled ) +{ + unsigned char* pucData; + int iFormat; + unsigned long ulItems; + unsigned long ulBytesAfter; + Atom typeAtom; + MotifWmHints newHints; + bool set=false; + + Atom hintsAtom = XInternAtom (m_pDisplay, "_MOTIF_WM_HINTS", True); + if (hintsAtom != None) { + + XGetWindowProperty (m_pDisplay, m_Window, hintsAtom, 0, + sizeof (MotifWmHints) / sizeof (long), + False, AnyPropertyType, &typeAtom, + &iFormat, &ulItems, &ulBytesAfter, &pucData); + + newHints.flags = MWM_HINTS_DECORATIONS; + newHints.decorations = enabled ? 1:0; + + XChangeProperty (m_pDisplay, m_Window, hintsAtom, hintsAtom, + 32, PropModeReplace, (unsigned char *) &newHints, + sizeof (MotifWmHints) / sizeof (long)); + set = true; + + } + + + /* Now try to set KWM hints */ + hintsAtom = XInternAtom(m_pDisplay, "KWM_WIN_DECORATION", True); + if (hintsAtom != None) { + long KWMHints = 0; + + XChangeProperty(m_pDisplay, m_Window, hintsAtom, hintsAtom, 32, + PropModeReplace, + (unsigned char *) &KWMHints, + sizeof(KWMHints) / 4); + set = true; + } + /* Now try to set GNOME hints */ + hintsAtom = XInternAtom(m_pDisplay, "_WIN_HINTS", True); + if (hintsAtom != None) { + long GNOMEHints = 0; + + XChangeProperty(m_pDisplay, m_Window, hintsAtom, hintsAtom, 32, + PropModeReplace, + (unsigned char *) &GNOMEHints, + sizeof(GNOMEHints) / 4); + set = true; + } + /* Finally set the transient hints if necessary */ + if (!set) { + XSetTransientForHint(m_pDisplay, m_Window, RootWindow(m_pDisplay, DefaultScreen(m_pDisplay))); + } + +} + + +static bool +isWindowMapped(Display *dpy, Window *xWin) +{ + XWindowAttributes attr; + + XGetWindowAttributes(dpy, *xWin, &attr); + if (attr.map_state != IsUnmapped) { + return true; + } else { + return false; + } +} + + + + + +void CUnixGL::setFullScreen(bool enabled) +{ + XWindowChanges changes; + unsigned int valueMask = CWX | CWY | CWWidth | CWHeight; + + m_FullScreen = enabled; + setWindowDecorations(!m_FullScreen); + + if (m_FullScreen) + { + + XA_NET_WM_STATE = XInternAtom(m_pDisplay, "_NET_WM_STATE", False); + XA_NET_WM_STATE_ADD = XInternAtom(m_pDisplay, "_NET_WM_STATE_ADD", False); + + XA_NET_WM_STATE_MAXIMIZED_VERT = XInternAtom(m_pDisplay, "_NET_WM_STATE_MAXIMIZED_VERT",False); + XA_NET_WM_STATE_MAXIMIZED_HORZ = XInternAtom(m_pDisplay,"_NET_WM_STATE_MAXIMIZED_HORZ",False); + XA_NET_WM_STATE_FULLSCREEN = XInternAtom(m_pDisplay,"_NET_WM_STATE_FULLSCREEN",False); + + + if (isWindowMapped(m_pDisplay, &m_Window)) { + XEvent e; + + memset(&e,0,sizeof(e)); + e.xany.type = ClientMessage; + e.xclient.message_type = XA_NET_WM_STATE; + e.xclient.format = 32; + e.xclient.window = m_Window; + e.xclient.data.l[0] = XA_NET_WM_STATE_ADD; + e.xclient.data.l[1] = XA_NET_WM_STATE_FULLSCREEN; + e.xclient.data.l[3] = 0l; + + XSendEvent(m_pDisplay, RootWindow(m_pDisplay, 0), 0, + SubstructureNotifyMask | SubstructureRedirectMask, &e); + } else { + int count = 0; + Atom atoms[3]; + + atoms[count++] = XA_NET_WM_STATE_FULLSCREEN; + atoms[count++] = XA_NET_WM_STATE_MAXIMIZED_VERT; + atoms[count++] = XA_NET_WM_STATE_MAXIMIZED_HORZ; + XChangeProperty(m_pDisplay, m_Window, XA_NET_WM_STATE, XA_ATOM, 32, + PropModeReplace, (unsigned char *)atoms, count); + } + + changes.x = 0; + changes.y = 0; + changes.width = m_WidthFS; + changes.height = m_HeightFS; + changes.stack_mode = Above; + valueMask |= CWStackMode; + + //m_Width = changes.width; + //m_Height = changes.height; + } + else + { + changes.x = m_XPosition; + changes.y = m_YPosition; + changes.width = m_Width; + changes.height = m_Height; + } + + //XSetWindowAttributes winAttrib; + //winAttrib.override_redirect = True; + //XChangeWindowAttributes(m_pDisplay, m_Window, CWOverrideRedirect, &winAttrib); + XMapRaised(m_pDisplay, m_Window); + //XRaiseWindow(m_pDisplay, m_Window); + XConfigureWindow(m_pDisplay, m_Window, valueMask, &changes); + alwaysOnTop(); + //XFlush(m_pDisplay); +} + +/* +*/ +void CUnixGL::alwaysOnTop() +{ + //~ XClientMessageEvent xev; + //~ memset(&xev, 0, sizeof(xev)); + + //~ xev.type = ClientMessage; + //~ xev.message_type = XA_NET_WM_STATE; + //~ xev.display = m_pDisplay; + //~ xev.window = m_Window; + //~ xev.format = 32; + //~ xev.data.l[0] = 10; + + //if (vo_fs_type & vo_wm_STAYS_ON_TOP) + //xev.data.l[1] = XA_NET_WM_STATE_STAYS_ON_TOP; + //else if (vo_fs_type & vo_wm_ABOVE) + //xev.data.l[1] = XA_NET_WM_STATE_ABOVE; + //else if (vo_fs_type & vo_wm_FULLSCREEN) + // xev.data.l[1] = XA_NET_WM_STATE_FULLSCREEN; + //else if (vo_fs_type & vo_wm_BELOW) + // This is not fallback. We can safely assume that situation where + // only NETWM_STATE_BELOW is supported and others not, doesn't exist. + // xev.data.l[1] = XA_NET_WM_STATE_BELOW; + + //XSendEvent(m_pDisplay, m_Window, False, SubstructureRedirectMask, reinterpret_cast(&xev)); + //state = XGetAtomName(mDisplay, xev.data.l[1]); + //mp_msg(MSGT_VO, MSGL_V, + // "[x11] NET style stay on top (layer %d). Using state %s.\n", + // layer, state); + //XFree(state); + + long propvalue = 12; + XChangeProperty( m_pDisplay, m_Window, XA_WIN_LAYER, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&propvalue, 1 ); + XRaiseWindow( m_pDisplay, m_Window); +} + +/* +*/ +void CUnixGL::toggleVSync() +{ + m_VSync = !m_VSync; + + if( GLEE_GLX_SGI_swap_control ) + { + if( m_VSync ) + glXSwapIntervalSGI(1); + else + glXSwapIntervalSGI(2); + } +} + +/* +*/ +void CUnixGL::Update() +{ + checkClientMessages(); +} + +/* +*/ +void CUnixGL::SwapBuffers() +{ + glXSwapBuffers( m_pDisplay, m_GlxWindow ); +} + +/* +*/ +/*bool CUnixGL::checkResizeEvent( ResizeEvent &event ) +{ + XEvent xEvent; + bool gotEvent = false; + + // remove old resize events to prevent delay. + while( XCheckTypedEvent( m_pDisplay, ConfigureNotify, &xEvent ) ) + gotEvent = true; + + if( gotEvent ) + { + if( !m_FullScreen ) + { + m_Width = xEvent.xconfigure.width; + m_Height = xEvent.xconfigure.height; + m_XPosition = xEvent.xconfigure.x; + m_YPosition = xEvent.xconfigure.y; + } + + event.width = xEvent.xconfigure.width; + event.height = xEvent.xconfigure.height; + } + + return gotEvent; +}*/ + +/* +*/ +void CUnixGL::checkClientMessages() +{ + XEvent xEvent; + + if( XCheckTypedEvent( m_pDisplay, ClientMessage, &xEvent ) ) + if( *XGetAtomName(m_pDisplay, xEvent.xclient.message_type) == *"WM_PROTOCOLS" ) + m_bClosed = true; + + // Keyboard. + if( XCheckWindowEvent( m_pDisplay, m_Window, KeyPressMask | KeyReleaseMask, &xEvent ) ) + { + CKeyEvent *spEvent = new CKeyEvent(); + + if( xEvent.type == KeyPress ) { spEvent->m_bPressed = true; } + else if( xEvent.type == KeyRelease ) { spEvent->m_bPressed = false; } + + // deprecated + //KeySym keySymbol = XKeycodeToKeysym( m_pDisplay, xEvent.xkey.keycode, 0 ); + + int keysyms_per_keycode_returned = 0; + KeySym *keySymbol = XGetKeyboardMapping( m_pDisplay, xEvent.xkey.keycode, + 1, &keysyms_per_keycode_returned ); + + switch( keySymbol[0] ) + { + case XK_F1: spEvent->m_Code = CKeyEvent::KEY_F1; break; + case XK_F2: spEvent->m_Code = CKeyEvent::KEY_F2; break; + case XK_F3: spEvent->m_Code = CKeyEvent::KEY_F3; break; + case XK_F4: spEvent->m_Code = CKeyEvent::KEY_F4; break; + case XK_F8: spEvent->m_Code = CKeyEvent::KEY_F8; break; + case XK_f: spEvent->m_Code = CKeyEvent::KEY_F; break; + case XK_s: spEvent->m_Code = CKeyEvent::KEY_s; break; + case XK_space: spEvent->m_Code = CKeyEvent::KEY_SPACE; break; + case XK_Left: spEvent->m_Code = CKeyEvent::KEY_LEFT; break; + case XK_Right: spEvent->m_Code = CKeyEvent::KEY_RIGHT; break; + case XK_Up: spEvent->m_Code = CKeyEvent::KEY_UP; break; + case XK_Down: spEvent->m_Code = CKeyEvent::KEY_DOWN; break; + case XK_Escape: spEvent->m_Code = CKeyEvent::KEY_Esc; break; + } + + XFree(keySymbol); + spCEvent e = spEvent; + m_EventQueue.push( e ); + } +} + +/* +*/ +/*bool CUnixGL::checkKeyEvent(KeyEvent& event) +{ + XEvent xEvent; + bool gotEvent = false; + + gotEvent = XCheckWindowEvent( m_pDisplay, m_Window, KeyPressMask | KeyReleaseMask, &xEvent ); + + if( gotEvent ) + { + if (xEvent.type == KeyPress) + { + event.pressed = true; + } + else if (xEvent.type == KeyRelease) + { + event.pressed = false; + } + + KeySym keySymbol = XKeycodeToKeysym(m_pDisplay, xEvent.xkey.keycode, 0); + switch (keySymbol) + { + case XK_a: + event.keycode = KeyEvent::KEY_a; + break; + case XK_d: + event.keycode = KeyEvent::KEY_d; + break; + case XK_f: + event.keycode = KeyEvent::KEY_f; + break; + case XK_h: + event.keycode = KeyEvent::KEY_h; + break; + case XK_q: + event.keycode = KeyEvent::KEY_q; + break; + case XK_r: + event.keycode = KeyEvent::KEY_r; + break; + case XK_v: + event.keycode = KeyEvent::KEY_v; + break; + case XK_x: + event.keycode = KeyEvent::KEY_x; + break; + case XK_y: + event.keycode = KeyEvent::KEY_y; + break; + case XK_space: + event.keycode = KeyEvent::KEY_SPACE; + break; + case XK_Left: + event.keycode = KeyEvent::KEY_LEFT; + break; + case XK_Right: + event.keycode = KeyEvent::KEY_RIGHT; + break; + case XK_Up: + event.keycode = KeyEvent::KEY_UP; + break; + case XK_Down: + event.keycode = KeyEvent::KEY_DOWN; + break; + case XK_F1: + event.keycode = KeyEvent::KEY_F1; + break; + case XK_F2: + event.keycode = KeyEvent::KEY_F2; + break; + case XK_F3: + event.keycode = KeyEvent::KEY_F3; + break; + case XK_F4: + event.keycode = KeyEvent::KEY_F4; + break; + case XK_F5: + event.keycode = KeyEvent::KEY_F5; + break; + case XK_F6: + event.keycode = KeyEvent::KEY_F6; + break; + case XK_F7: + event.keycode = KeyEvent::KEY_F7; + break; + case XK_F8: + event.keycode = KeyEvent::KEY_F8; + break; + case XK_F9: + event.keycode = KeyEvent::KEY_F9; + break; + case XK_F10: + event.keycode = KeyEvent::KEY_F10; + break; + case XK_F11: + event.keycode = KeyEvent::KEY_F11; + break; + case XK_F12: + event.keycode = KeyEvent::KEY_F12; + break; + default: + event.keycode = KeyEvent::KEY_NONE; + } + } + + return gotEvent; +}*/ + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/glx.h electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/glx.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/glx.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/glx.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,63 @@ +#ifndef GLX_VIDEO_OUTPUT_H +#define GLX_VIDEO_OUTPUT_H + +#ifndef WIN32 + +#ifdef _DisplayGL_H_ +#error "DisplayGL.h included before glx.h!" +#endif + +#include +#include + +#ifndef LINUX_GNU +#include "GLee.h" +#else +#include +#endif +#include "DisplayOutput.h" + +namespace DisplayOutput +{ + +class CUnixGL : public CDisplayOutput +{ + Display *m_pDisplay; + GLXContext m_GlxContext; + Window m_Window; + GLXWindow m_GlxWindow; + bool m_FullScreen; + int m_VSync; + + uint32 m_WidthFS; + uint32 m_HeightFS; + + void setFullScreen( bool enabled ); + void setWindowDecorations( bool enabled ); + void toggleVSync(); + void alwaysOnTop(); + void checkClientMessages(); + //bool checkResizeEvent( ResizeEvent &event); + + public: + CUnixGL(); + virtual ~CUnixGL(); + + static const char *Description() { return "X OpenGL display"; }; + + virtual bool Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ); + + // + virtual void Title( const std::string &_title ); + virtual void Update(); + + void SwapBuffers(); +}; + +typedef CUnixGL CDisplayGL; + +} + +#endif + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/mgl.cpp electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/mgl.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/mgl.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/mgl.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,102 @@ +#ifdef MAC + +#include + +#include "Log.h" +#include "Settings.h" +#include "mgl.h" + + +#include "Exception.h" + + +namespace DisplayOutput +{ + +uint32 CMacGL::s_DefaultWidth = 0; +uint32 CMacGL::s_DefaultHeight = 0; + +/* + CMacGL(). + +*/ +CMacGL::CMacGL() : CDisplayOutput() +{ + m_glContext = NULL; +} + +/* + ~CMacGL(). + +*/ +CMacGL::~CMacGL() +{ +} + +void CMacGL::ForceWidthAndHeight( uint32 _width, uint32 _height ) +{ + m_Width = _width; + m_Height = _height; + + if ( m_glContext ) + { + CGLSetCurrentContext (m_glContext); + glViewport(0, 0, static_cast(m_Width), static_cast(m_Height)); + } +} + +void CMacGL::SetDefaultWidthAndHeight( uint32 defWidth, uint32 defHeight ) +{ + s_DefaultWidth = defWidth; + s_DefaultHeight = defHeight; +} + +bool CMacGL::Initialize( CGLContextObj _glContext, bool /*_bPreview*/) +{ + if (_glContext) + { + SetContext(_glContext); + + CGLSetCurrentContext (m_glContext); + + GLint vblsync = 0; + + if ( g_Settings()->Get( "settings.player.vbl_sync", false ) ) + { + vblsync = 1; + } + + /*CGLError err = *///CGLEnable( m_glContext, kCGLCEMPEngine); + + //if ( err != kCGLNoError ) + // vblsync = 0; + + CGLSetParameter(m_glContext, kCGLCPSwapInterval, &vblsync); + } + + m_Width = s_DefaultWidth; + m_Height = s_DefaultHeight; + + return true; +} + +// +void CMacGL::Title( const std::string &/*_title*/ ) +{ +} + +// +void CMacGL::Update() +{ +} + +/* +*/ +void CMacGL::SwapBuffers() +{ + CGLFlushDrawable(m_glContext); +} + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/mgl.h electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/mgl.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/mgl.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/mgl.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,68 @@ +#ifndef _MGL__H_ +#define _MGL__H_ + +#ifdef MAC + +#ifdef _DisplayGL_H_ +#error "DisplayGL.h included before mgl.h!" +#endif + +#include "glee.h" +#include "../DisplayOutput.h" +#undef Random +#include +#include + + +namespace DisplayOutput +{ + +extern "C" { + void SetupPool(); +} + +/* + CMacGL. + Macintosh OpenGL output. +*/ +class CMacGL : public CDisplayOutput +{ + CGLContextObj m_glContext; + + + static uint32 s_DefaultWidth; + static uint32 s_DefaultHeight; + + public: + CMacGL(); + virtual ~CMacGL(); + + //static LRESULT CALLBACK wndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); + + static const char *Description() { return "Macintosh OpenGL display"; }; + + virtual bool Initialize( CGLContextObj _glContext, bool _bPreview ); + + virtual void SetContext( CGLContextObj glContext ) { m_glContext = glContext; } + virtual CGLContextObj GetContext( void ) { return m_glContext; } + + virtual void ForceWidthAndHeight( uint32 _width, uint32 _height ); + + static void SetDefaultWidthAndHeight( uint32 defWidth, uint32 defHeight ); + + virtual bool HasShaders() { return true; }; + + // + virtual void Title( const std::string &_title ); + virtual void Update(); + + void SwapBuffers(); +}; + +typedef CMacGL CDisplayGL; + +}; + +#endif + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/RendererGL.cpp electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/RendererGL.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/RendererGL.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/RendererGL.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,654 @@ +#include +#include +#ifndef LINUX_GNU +#include "./OpenGL/GLee.h" +#else +#include +#endif +#ifdef MAC +#include +//#include +#include +#else +#include +#include +#endif + +#include "RendererGL.h" +#include "TextureFlatGL.h" +#include "ShaderGL.h" +#include "FontGL.h" + +namespace DisplayOutput +{ + +/* + GetBlendConstant(). + + */ +int32 GetBlendConstant( const int32 _src ) +{ + static int32 formatLut[] = + { + GL_ZERO, + GL_ONE, + GL_SRC_COLOR, + GL_ONE_MINUS_SRC_COLOR, + GL_DST_COLOR, + GL_ONE_MINUS_DST_COLOR, + GL_SRC_ALPHA, + GL_ONE_MINUS_SRC_ALPHA, + GL_DST_ALPHA, + GL_ONE_MINUS_DST_ALPHA, + GL_SRC_ALPHA_SATURATE, + }; + + return( formatLut[ _src ] ); +} + +/* + GetBlendMode(). + + */ +int32 GetBlendMode( const int32 _src ) +{ + static int32 formatLut[] = + { + GL_FUNC_ADD, + GL_FUNC_SUBTRACT, + GL_FUNC_REVERSE_SUBTRACT, + GL_MIN, + GL_MAX, + }; + + return( formatLut[ _src ] ); +} + + +/* + */ +CRendererGL::CRendererGL() : CRenderer() +{ +} + +/* +*/ +CRendererGL::~CRendererGL() +{ +#ifdef WIN32 + wglMakeCurrent( NULL, NULL ); + wglDeleteContext( m_RenderContext ); + ReleaseDC( m_WindowHandle, m_DeviceContext ); +#endif +} + +/* +*/ +bool CRendererGL::Initialize( spCDisplayOutput _spDisplay ) +{ + if( !CRenderer::Initialize( _spDisplay ) ) + return false; + +#ifdef WIN32 + m_WindowHandle = _spDisplay->WindowHandle(); + + PIXELFORMATDESCRIPTOR pfd = + { + sizeof (PIXELFORMATDESCRIPTOR), /* struct size */ + 1, /* Version number */ + PFD_DRAW_TO_WINDOW /* Flags, draw to a window, */ + | PFD_DOUBLEBUFFER /* Requires Doublebuffer hw */ + | PFD_SUPPORT_OPENGL, /* use OpenGL */ + PFD_TYPE_RGBA, /* RGBA pixel values */ + 32, /* 32-bit color */ + 0, 0, 0, /* RGB bits & shift sizes. */ + 0, 0, 0, /* Don't care about them */ + 0, 0, /* No alpha buffer info */ + 0, 0, 0, 0, 0, /* No accumulation buffer */ + 16, /* depth buffer */ + 0, /* stencil buffer */ + 0, /* No auxiliary buffers */ + PFD_MAIN_PLANE, /* Layer type */ + 0, /* Reserved (must be 0) */ + 0, /* No layer mask */ + 0, /* No visible mask */ + 0 /* No damage mask */ + }; + + m_DeviceContext = GetDC( m_WindowHandle ); + + int i = ChoosePixelFormat( m_DeviceContext, &pfd ); + if( i == 0 ) + ThrowStr( "ChoosePixelFormat() failed." ); + + if( SetPixelFormat( m_DeviceContext, i, &pfd ) == FALSE ) + ThrowStr( "SetPixelFormat() failed." ); + + m_RenderContext = wglCreateContext( m_DeviceContext ); + wglMakeCurrent( m_DeviceContext, m_RenderContext ); + + if( GLEE_WGL_EXT_swap_control ) + wglSwapIntervalEXT( static_cast(true) ); +#endif + +#ifdef MAC + cgl_ctx = m_spDisplay->GetContext(); +#endif + + Defaults(); + + return true; +} + +// +void CRendererGL::Defaults() +{ + SetCurrentGLContext(); + + glShadeModel( GL_FLAT ); + glClearDepth( 0.0f ); + glDisable( GL_BLEND ); + glDisable( GL_DEPTH_TEST ); + glDepthFunc( GL_ALWAYS ); + glDisable( GL_LIGHTING ); + glFrontFace(GL_CW); + glPixelStorei( GL_PACK_ALIGNMENT, 1 ); + glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); + glClearColor( 0.0, 0.0, 0.0, 1.0 ); + glClear( GL_COLOR_BUFFER_BIT ); +} + + + +/* +*/ +bool CRendererGL::BeginFrame( void ) +{ +#ifdef MAC + CGLContextObj currContext = m_spDisplay->GetContext(); + + if (currContext != NULL) + CGLLockContext(currContext); +#endif + + SetCurrentGLContext(); + + glClear( GL_COLOR_BUFFER_BIT ); + + if( !CRenderer::BeginFrame() ) + return false; + + return true; +} + +void CRendererGL::Verify( const char */*_file*/, const int32 /*_line*/ ) +{ + /*int error = glGetError(); + if( error != GL_NO_ERROR ) + { + std::string msg = ""; + + if( error == GL_INVALID_ENUM ) msg = "GL_INVALID_ENUM"; + else if( error == GL_INVALID_VALUE ) msg = "GL_INVALID_VALUE"; + else if( error == GL_INVALID_OPERATION) msg = "GL_INVALID_OPERATION"; + else if( error == GL_STACK_OVERFLOW) msg = "GL_STACK_OVERFLOW"; + else if( error == GL_STACK_UNDERFLOW) msg = "GL_STACK_UNDERFLOW"; + else if( error == GL_OUT_OF_MEMORY) msg = "GL_OUT_OF_MEMORY"; + else if( error == GL_INVALID_FRAMEBUFFER_OPERATION_EXT) msg = "GL_INVALID_FRAMEBUFFER_OPERATION_EXT"; + else msg = "Unrecognized OpenGL error"; + + g_Log->Error( "OpenGLError - %s(%d) in %s(%d)", msg.c_str(), error, _file, _line ); + + //ThrowArgs(( "%s in %s(%d)", msg.c_str(), _file, _line )); + }*/ +} + +/* +*/ +bool CRendererGL::EndFrame( bool drawn ) +{ + SetCurrentGLContext(); + + if( !CRenderer::EndFrame( drawn ) ) + return false; + + if ( drawn ) + { +#ifdef WIN32 + SwapBuffers( m_DeviceContext ); +#else + m_spDisplay->SwapBuffers(); + VERIFYGL; +#endif + } + +#ifdef MAC + CGLContextObj currContext = m_spDisplay->GetContext(); + + if (currContext != NULL) + CGLUnlockContext(currContext); +#endif + + return true; +} + +/* +*/ +void CRendererGL::Apply() +{ + SetCurrentGLContext(); + + CRenderer::Apply(); + + // Update world transformation. + if( isBit( m_bDirtyMatrices, eWorld ) ) + { + glMatrixMode( GL_MODELVIEW ); + glLoadMatrixf( (GLfloat *)(const fp4 *)m_WorldMat.m_Mat ); + remBit( m_bDirtyMatrices, static_cast(eWorld) ); + } + + // Update view transformation. + if( isBit( m_bDirtyMatrices, eView ) ) + { + remBit( m_bDirtyMatrices, static_cast(eView) ); + } + + // Update projection transformation. + if( isBit( m_bDirtyMatrices, eProjection ) ) + { + glMatrixMode( GL_PROJECTION ); + glLoadMatrixf( (GLfloat *)(const fp4 *)m_ProjMat.m_Mat ); + remBit( m_bDirtyMatrices, static_cast(eProjection) ); + } + + // Blend state. Suboptimal! + if( m_spActiveBlend != m_spSelectedBlend ) + { + m_spActiveBlend = m_spSelectedBlend; + + glEnable(GL_BLEND); + glBlendFunc(GetBlendConstant( m_spActiveBlend->m_Src ),GetBlendConstant( m_spActiveBlend->m_Dst )); + glBlendEquation(GetBlendMode( m_spActiveBlend->m_Mode ) ); + } +} + +/* +*/ +void CRendererGL::Reset( const uint32 _flags ) +{ + SetCurrentGLContext(); + + CRenderer::Reset( _flags ); +} + + +/* +*/ +spCTextureFlat CRendererGL::NewTextureFlat( spCImage _spImage, const uint32 _flags ) +{ + SetCurrentGLContext(); + +#ifdef MAC + spCTextureFlat spTex = new CTextureFlatGL( _flags | ( ( GetTextureTargetType() == eTexture2DRect ) ? kRectTexture : 0 ), cgl_ctx ); +#else + spCTextureFlat spTex = new CTextureFlatGL( _flags | ( ( GetTextureTargetType() == eTexture2DRect ) ? kRectTexture : 0 ) ); +#endif + + spTex->Upload( _spImage ); + return spTex; +} + +/* +*/ +spCTextureFlat CRendererGL::NewTextureFlat( const uint32 _flags ) +{ + SetCurrentGLContext(); + +#ifdef MAC + spCTextureFlat spTex = new CTextureFlatGL( _flags | ( ( GetTextureTargetType() == eTexture2DRect ) ? kRectTexture : 0 ), cgl_ctx ); +#else + spCTextureFlat spTex = new CTextureFlatGL( _flags | ( ( GetTextureTargetType() == eTexture2DRect ) ? kRectTexture : 0 ) ); +#endif + + return spTex; +} + +/* +*/ +eTextureTargetType CRendererGL::GetTextureTargetType( void ) +{ +#ifndef LINUX_GNU + if (GL_EXT_texture_rectangle) +#else + if (GL_ARB_texture_rectangle) +#endif + return eTexture2DRect; + else + return eTexture2D; +} + + +/* +*/ +spCShader CRendererGL::NewShader( const char *_pVertexShader, const char *_pFragmentShader ) +{ + SetCurrentGLContext(); + +#ifdef MAC + spCShader spShader = new CShaderGL( cgl_ctx ); +#else + spCShader spShader = new CShaderGL(); +#endif + if( !spShader->Build( _pVertexShader, _pFragmentShader ) ) + return NULL; + + if( m_spActiveShader != NULL ) + m_spActiveShader->Bind(); + + return spShader; +} + +/* +*/ +spCBaseFont CRendererGL::NewFont( CFontDescription &_desc ) +{ + if (m_glFont.IsNull()) + { + SetCurrentGLContext(); + + m_glFont = new CFontGL( NewTextureFlat() ); + m_glFont->FontDescription( _desc ); + m_glFont->Create(); + } + + return m_glFont; +} + +void CRendererGL::Text( spCBaseFont _spFont, const std::string &_text, const Base::Math::CVector4 &/*_color*/, const Base::Math::CRect &_rect, uint32 /*_flags*/ ) +{ + SetCurrentGLContext(); + + spCFontGL glFont = _spFont; + + spCTextureFlat texture = glFont->GetTexture(); + + SetTexture( texture, 0 ); + Apply(); + + fp4 x0 = _rect.m_X0, x1, y0 = _rect.m_Y0; + + Base::Math::CRect texpow2r = texture->GetRect(); + + fp4 lineheight = glFont->LineHeight() / m_spDisplay->Height(); + + for (size_t i = 0; i < _text.size(); i++) + { + uint8 ch = static_cast(_text[i]); + + if (ch == '\n') + { + x0 = _rect.m_X0; + y0 += lineheight; + + continue; + } + + CFontGL::Glyph *glyph = glFont->GetGlyph(ch); + + if (glyph == NULL) + continue; + + x1 = x0 + glyph->advance / m_spDisplay->Width(); + + Base::Math::CRect r(x0, y0, x1, y0 + lineheight); + + Base::Math::CRect texr(glyph->tex_x1 * texpow2r.Width() , glyph->tex_y1 * texpow2r.Height(), glyph->tex_x2 * texpow2r.Width(), (glyph->tex_y1 + glFont->TexLineHeight()) * texpow2r.Height()); + + DrawQuad( r, Base::Math::CVector4( 1.0f,1.0f,1.0f,1.0f ), texr ); + + x0 = x1; + } + + SetTexture( NULL, 0 ); + Apply(); +} + +Base::Math::CVector2 CRendererGL::GetTextExtent( spCBaseFont _spFont, const std::string &_text ) +{ + SetCurrentGLContext(); + + spCFontGL glFont = _spFont; + + fp4 lineheight = glFont->LineHeight(); + fp4 textheight = lineheight; + fp4 textwidth = 0.0f; + + size_t start = 0, len = 0; + + for (size_t i = 0; i < _text.size(); i++) + { + char ch = _text[i]; + + if (ch == '\n') + { + if (len > 0) + { + fp4 width = glFont->StringWidth(_text.substr(start, len)); + + if (width > textwidth) + textwidth = width; + } + + len = 0; + start = i+1; + textheight += lineheight; + continue; + } + + len++; + } + + if (len > 0) + { + fp4 width = glFont->StringWidth(_text.substr(start, len)); + + if (width > textwidth) + textwidth = width; + } + + return Base::Math::CVector2( textwidth / (fp4)m_spDisplay->Width(), textheight / (fp4)m_spDisplay->Height() ); +} + +/* + */ +void CRendererGL::DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color ) +{ + SetCurrentGLContext(); + + const fp4 w05 = (fp4)m_spDisplay->Width() * 0.5f; + const fp4 h05 = (fp4)m_spDisplay->Height() * 0.5f; + Base::Math::CRect r( lerpMacro( -w05, w05, _rect.m_X0 ), lerpMacro( -h05, h05, _rect.m_Y0 ), lerpMacro( -w05, w05, _rect.m_X1 ), lerpMacro( -h05, h05, _rect.m_Y1 ) ); + + glBegin(GL_TRIANGLE_FAN); + { + glColor4f( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + glVertex2f( r.m_X0, r.m_Y0 ); + + glVertex2f( r.m_X1, r.m_Y0 ); + + glVertex2f( r.m_X1, r.m_Y1 ); + + glVertex2f( r.m_X0, r.m_Y1 ); + } + glEnd(); +} + + +/* +*/ +void CRendererGL::DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const Base::Math::CRect &_uvrect ) +{ + SetCurrentGLContext(); + + const fp4 w05 = (fp4)m_spDisplay->Width() * 0.5f; + const fp4 h05 = (fp4)m_spDisplay->Height() * 0.5f; + Base::Math::CRect r( lerpMacro( -w05, w05, _rect.m_X0 ), lerpMacro( -h05, h05, _rect.m_Y0 ), lerpMacro( -w05, w05, _rect.m_X1 ), lerpMacro( -h05, h05, _rect.m_Y1 ) ); + + /*float vertices[] = {r.m_X0, r.m_Y0, r.m_X1, r.m_Y0, r.m_X1, r.m_Y1, r.m_X0, r.m_Y1}; + float texcoords[] = {_uvrect.m_X0, _uvrect.m_Y0, _uvrect.m_X1, _uvrect.m_Y0, _uvrect.m_X1, _uvrect.m_Y1, _uvrect.m_X0, _uvrect.m_Y1 }; + + glVertexPointer(2, GL_FLOAT, 0, vertices); + glTexCoordPointer(2, GL_FLOAT, 0, texcoords); + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + + glColor4f( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + glDrawArrays(GL_QUADS, 0, 4); + + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_TEXTURE_COORD_ARRAY);*/ + + glBegin(GL_QUADS); + { + glColor4f( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y0 ); + glVertex2f( r.m_X0, r.m_Y0 ); + + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y0 ); + glVertex2f( r.m_X1, r.m_Y0 ); + + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y1 ); + glVertex2f( r.m_X1, r.m_Y1 ); + + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y1 ); + glVertex2f( r.m_X0, r.m_Y1 ); + } + glEnd(); +} + +void CRendererGL::DrawSoftQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const fp4 _width ) +{ + SetCurrentGLContext(); + + if( m_spSoftCorner == NULL ) + { + DisplayOutput::spCImage tmpImage = new DisplayOutput::CImage(); + tmpImage->Create( 32, 32, DisplayOutput::eImage_RGBA8 ); + + for( uint32 y=0; y<32; y++) + for( uint32 x=0; x<32; x++ ) + { + fp4 c = Base::Math::saturate(1.0f - powf( Base::Math::Sqrt( fp4(x*x + y*y) ) / 31.0f, 1.0f )); + tmpImage->PutPixel( static_cast(x), static_cast(y), c, c, c, c ); + } + + m_spSoftCorner = NewTextureFlat(); + m_spSoftCorner->Upload( tmpImage ); + } + + const fp4 w05 = (fp4)m_spDisplay->Width() * 0.5f; + const fp4 h05 = (fp4)m_spDisplay->Height() * 0.5f; + Base::Math::CRect r( lerpMacro( -w05, w05, _rect.m_X0 ), lerpMacro( -h05, h05, _rect.m_Y0 ), lerpMacro( -w05, w05, _rect.m_X1 ), lerpMacro( -h05, h05, _rect.m_Y1 ) ); + + fp4 x0 = r.m_X0; + fp4 y0 = r.m_Y0; + fp4 x1 = r.m_X1; + fp4 y1 = r.m_Y1; + + fp4 x0bw = r.m_X0 + _width; + fp4 y0bw = r.m_Y0 + _width; + fp4 x1bw = r.m_X1 - _width; + fp4 y1bw = r.m_Y1 - _width; + + Base::Math::CRect _uvrect = m_spSoftCorner->GetRect(); + + SetTexture( m_spSoftCorner, 0 ); + Apply(); + + glBegin(GL_TRIANGLE_STRIP); + { + glColor4f( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y0 ); + glVertex2f( x0, y0bw ); + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y1 ); + glVertex2f( x0, y0 ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y0 ); + glVertex2f( x0bw, y0bw ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y1 ); + glVertex2f( x0bw, y0 ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y0 ); + glVertex2f( x1bw, y0bw ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y1 ); + glVertex2f( x1bw, y0 ); + + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y1 ); + glVertex2f( x1bw, y0 ); + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y1 ); + glVertex2f( x1, y0 ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y0 ); + glVertex2f( x1bw, y0bw ); + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y0 ); + glVertex2f( x1, y0bw ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y0 ); + glVertex2f( x1bw, y1bw ); + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y0 ); + glVertex2f( x1, y1bw ); + + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y0 ); + glVertex2f( x1, y1bw ); + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y1 ); + glVertex2f( x1, y1 ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y0 ); + glVertex2f( x1bw, y1bw ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y1 ); + glVertex2f( x1bw, y1 ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y0 ); + glVertex2f( x0bw, y1bw ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y1 ); + glVertex2f( x0bw, y1 ); + + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y1 ); + glVertex2f( x0bw, y1 ); + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y1 ); + glVertex2f( x0, y1 ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y0 ); + glVertex2f( x0bw, y1bw ); + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y0 ); + glVertex2f( x0, y1bw ); + glTexCoord2f( _uvrect.m_X0, _uvrect.m_Y0 ); + glVertex2f( x0bw, y0bw ); + glTexCoord2f( _uvrect.m_X1, _uvrect.m_Y0 ); + glVertex2f( x0, y0bw ); + } + glEnd(); + + // Center + SetTexture( NULL, 0 ); + Apply(); + + fp4 wu = _width / m_spDisplay->Width(); + fp4 hu = _width / m_spDisplay->Height(); + + Base::Math::CRect r2( _rect.m_X0 + wu, _rect.m_Y0 + hu, _rect.m_X1 - wu, _rect.m_Y1 - hu ); + DrawQuad( r2, _color ); +} + + +void CRendererGL::SetCurrentGLContext() +{ +#if 0//def MAC + CGLContextObj currContext = m_spDisplay->GetContext(); + + if (currContext != NULL) + CGLSetCurrentContext(currContext); +#endif +} + + +} + diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/RendererGL.h electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/RendererGL.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/RendererGL.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/RendererGL.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,97 @@ +#ifndef _RENDERERGL_H_ +#define _RENDERERGL_H_ + +#include +#include "base.h" +#include "SmartPtr.h" +#include "Renderer.h" +#include "TextureFlat.h" +#include "Image.h" +#include "FontGL.h" +#ifdef MAC +#undef Random +#include +#endif + + +namespace DisplayOutput +{ + +/* + CRendererGL(). + +*/ +class CRendererGL : public CRenderer +{ +#ifdef WIN32 + HWND m_WindowHandle; + HDC m_DeviceContext; + HGLRC m_RenderContext; +#else +#ifdef MAC + CGLContextObj cgl_ctx; +#endif +#endif + + spCTextureFlat m_spSoftCorner; + + spCImage m_spTextImage; + + spCTextureFlat m_spTextTexture; + + spCFontGL m_glFont; + + Base::Math::CRect m_textRect; + + public: + CRendererGL(); + virtual ~CRendererGL(); + + virtual eRenderType Type( void ) const { return eGL; }; + virtual const std::string Description( void ) const { return "OpenGL"; } + + // + bool Initialize( spCDisplayOutput _spDisplay ); + + // + void Defaults(); + + // + bool BeginFrame( void ); + bool EndFrame( bool drawn = true ); + + // + void Apply(); + void Reset( const uint32 _flags ); + + // + spCTextureFlat NewTextureFlat( const uint32 flags = 0 ); + spCTextureFlat NewTextureFlat( spCImage _spImage, const uint32 flags = 0 ); + + eTextureTargetType GetTextureTargetType( void ); + + // + spCBaseFont NewFont( CFontDescription &_desc ); + void Text( spCBaseFont _spFont, const std::string &_text, const Base::Math::CVector4 &_color, const Base::Math::CRect &_rect, uint32 _flags ); + Base::Math::CVector2 GetTextExtent( spCBaseFont _spFont, const std::string &_text ); + + // + spCShader NewShader( const char *_pVertexShader, const char *_pFragmentShader ); + + // + void DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color ); + void DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const Base::Math::CRect &_uvRect ); + void DrawSoftQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const fp4 _width ); + + static void Verify( const char *_file, const int32 _line ); + + void SetCurrentGLContext(); +}; + +#define VERIFYGL CRendererGL::Verify( __FILE__, __LINE__ ) + +MakeSmartPointers( CRendererGL ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/ShaderGL.cpp electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/ShaderGL.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/ShaderGL.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/ShaderGL.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,431 @@ +#include +#include +#include +#include +#ifndef LINUX_GNU +#include "./OpenGL/GLee.h" +#include +#else +#include +#endif + +#include "Exception.h" +#include "RendererGL.h" +#include "ShaderGL.h" +#include "Log.h" + +namespace DisplayOutput +{ + +/* +*/ +#ifdef MAC +CShaderGL::CShaderGL(CGLContextObj glCtx) +#else +CShaderGL::CShaderGL() +#endif +{ + m_VertexShader = 0; + m_FragmentShader = 0; + m_Program = 0; +#ifdef MAC + cgl_ctx = glCtx;//CGLGetCurrentContext(); +#endif +} + +/* +*/ +CShaderGL::~CShaderGL() +{ + if( m_VertexShader ) + glDeleteObjectARB( m_VertexShader ); + + if( m_FragmentShader ) + glDeleteObjectARB( m_FragmentShader ); + + if( m_Program ) + glDeleteObjectARB( m_Program ); +} + + +/* +*/ +bool CShaderGL::Bind() +{ + glUseProgramObjectARB( m_Program ); + VERIFYGL; + + return true; +} + +/* +*/ +bool CShaderGL::Apply() +{ + std::map< std::string, spCShaderUniform >::const_iterator iter; + + // Update all uniforms. + for( iter = m_Uniforms.begin(); iter != m_Uniforms.end(); ++iter ) + ((spCShaderUniform)iter->second)->Apply(); + + // Update all samplers. + for( iter = m_Samplers.begin(); iter != m_Samplers.end(); ++iter ) + ((spCShaderUniform)iter->second)->Apply(); + + return true; +} + +/* +*/ +bool CShaderGL::Unbind() +{ + glUseProgramObjectARB( 0 ); + + return true; +} + +bool CShaderGL::Build( const char *_pVertexShader, const char *_pFragmentShader ) +{ + if( !_pVertexShader && !_pFragmentShader ) + return false; + + const GLcharARB *shaderStrings[6]; + int strIndex = 0; + char line[16]; + GLint vsResult, fsResult, linkResult; + char infoLog[2048]; + GLint len, infoLogPos = 0; + + // Compile to the highest supported language version. + if( GLEE_ARB_shading_language_100 ) + { + static char versionString[ 16 ]; + static bool bFirst = true; + + if( bFirst ) + { +//strangely enough on OSX 10.4 GL_ARB_shading_language_100 is defined as 1 but GL_SHADING_LANGUAGE_VERSION_ARB is not defined at all +#if GL_ARB_shading_language_100 && !defined(GL_SHADING_LANGUAGE_VERSION_ARB) +#define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C +#endif + const char *pVersion = (const char *)glGetString( GL_SHADING_LANGUAGE_VERSION_ARB ); + if( pVersion ) + { + snprintf( versionString, 16, "#version %d%d\n", atoi( pVersion ), atoi( strchr( pVersion, '.') + 1) ); + g_Log->Info( "GL shader %s", versionString ); + } + + bFirst = false; + } + + shaderStrings[ strIndex++ ] = versionString; + } + + shaderStrings[strIndex++] = line; + + m_VertexShader = 0; + m_FragmentShader = 0; + m_Program = glCreateProgramObjectARB(); + + // Compile the vertex shader. + if( _pVertexShader != NULL ) + { + m_VertexShader = glCreateShaderObjectARB( GL_VERTEX_SHADER_ARB ); + snprintf(line, 16, "#line %d\n", 0 ); + shaderStrings[ strIndex ] = _pVertexShader; + glShaderSourceARB( m_VertexShader, strIndex + 1, shaderStrings, NULL ); + glCompileShaderARB( m_VertexShader ); + glGetObjectParameterivARB( m_VertexShader, GL_OBJECT_COMPILE_STATUS_ARB, &vsResult ); + if( vsResult ) + glAttachObjectARB( m_Program, m_VertexShader ); + else + infoLogPos += sprintf( infoLog + infoLogPos, "Vertex shader error:\n" ); + + glGetInfoLogARB( m_VertexShader, sizeof(infoLog) - static_cast(infoLogPos), &len, infoLog + infoLogPos ); + infoLogPos += len; + + } + else + vsResult = GL_TRUE; + + // Compile the fragment shader. + if( _pFragmentShader != NULL ) + { + m_FragmentShader = glCreateShaderObjectARB( GL_FRAGMENT_SHADER_ARB ); + sprintf( line, "#line %d\n", 0 ); + shaderStrings[ strIndex ] = _pFragmentShader; + glShaderSourceARB( m_FragmentShader, strIndex + 1, shaderStrings, NULL ); + glCompileShaderARB( m_FragmentShader ); + glGetObjectParameterivARB( m_FragmentShader, GL_OBJECT_COMPILE_STATUS_ARB, &fsResult ); + if( fsResult ) + glAttachObjectARB( m_Program, m_FragmentShader ); + else + infoLogPos += sprintf( infoLog + infoLogPos, "Fragment shader error:\n" ); + + glGetInfoLogARB( m_FragmentShader, sizeof(infoLog) - static_cast(infoLogPos), &len, infoLog + infoLogPos ); + infoLogPos += len; + } + else + fsResult = GL_TRUE; + + // Link the shaders. + if( vsResult && fsResult ) + { + glLinkProgramARB( m_Program ); + glGetObjectParameterivARB( m_Program, GL_OBJECT_LINK_STATUS_ARB, &linkResult ); + glGetInfoLogARB( m_Program, sizeof(infoLog) - static_cast(infoLogPos), &len, infoLog + infoLogPos ); + //infoLogPos += len; + + if( len > 0 ) + g_Log->Warning( infoLog ); + + if( linkResult ) + { + glUseProgramObjectARB( m_Program ); + + GLint uniformCount, maxLength; + glGetObjectParameterivARB( m_Program, GL_OBJECT_ACTIVE_UNIFORMS_ARB, &uniformCount ); + glGetObjectParameterivARB( m_Program, GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB, &maxLength ); + + int nSamplers = 0; + //int nUniforms = 0; + char *name = new char[maxLength]; + + for( int i=0; i= GL_SAMPLER_1D && type <= GL_SAMPLER_2D_RECT_SHADOW_ARB ) + { + // Assign samplers to image units. + GLint location = glGetUniformLocationARB( m_Program, name ); + + int pos; + + sscanf(name, "texUnit%d", &pos); + + glUniform1i( location, pos/*nSamplers*/ ); +#ifdef MAC + m_Samplers[ name ] = new CShaderUniformGL( cgl_ctx, name, eUniform_Sampler, location ); +#else + m_Samplers[ name ] = new CShaderUniformGL( name, eUniform_Sampler, location ); +#endif + nSamplers++; + } + else + { + // Store all non-gl uniforms. + if( strncmp(name, "gl_", 3) != 0 ) + { + char *bracket = strchr(name, '['); + if( bracket == NULL || ( bracket[1] == '0' && bracket[2] == ']' ) ) + { + if( bracket ) + { + *bracket = '\0'; + length = (GLint) (bracket - name); + } + + eUniformType eType = eUniform_Float; + + switch( type ) + { + case GL_FLOAT: eType = eUniform_Float; break; + case GL_FLOAT_VEC2_ARB: eType = eUniform_Float2; break; + case GL_FLOAT_VEC3_ARB: eType = eUniform_Float3; break; + case GL_FLOAT_VEC4_ARB: eType = eUniform_Float4; break; + case GL_INT: eType = eUniform_Int; break; + case GL_INT_VEC2_ARB: eType = eUniform_Int2; break; + case GL_INT_VEC3_ARB: eType = eUniform_Int3; break; + case GL_INT_VEC4_ARB: eType = eUniform_Int4; break; + case GL_BOOL_ARB: eType = eUniform_Boolean; break; + case GL_BOOL_VEC2_ARB: eType = eUniform_Boolean2; break; + case GL_BOOL_VEC3_ARB: eType = eUniform_Boolean3; break; + case GL_BOOL_VEC4_ARB: eType = eUniform_Boolean4; break; + case GL_FLOAT_MAT2_ARB: eType = eUniform_Matrix2; break; + case GL_FLOAT_MAT3_ARB: eType = eUniform_Matrix3; break; + case GL_FLOAT_MAT4_ARB: eType = eUniform_Matrix4; break; + } + +#ifdef MAC + m_Uniforms[ name ] = new CShaderUniformGL( cgl_ctx, name, eType, glGetUniformLocationARB( m_Program, name ), size ); +#else + m_Uniforms[ name ] = new CShaderUniformGL( name, eType, glGetUniformLocationARB( m_Program, name ), size ); +#endif + } + else if( bracket != NULL && bracket[1] > '0' ) + { + /**bracket = '\0'; + for( int i = nUniforms - 1; i >= 0; i--) + { + if( strcmp( uniforms[i].name, name ) == 0 ) + { + int index = atoi(bracket + 1) + 1; + if( index > uniforms[i].nElements ) + uniforms[i].nElements = index; + } + }*/ + } + } + } + } + + SAFE_DELETE_ARRAY( name ); + +/* for (int i = 0; i < nUniforms; i++) + { + int constantSize = constantTypeSizes[uniforms[i].type] * uniforms[i].nElements; + uniforms[i].data = new ubyte[constantSize]; + memset(uniforms[i].data, 0, constantSize); + uniforms[i].dirty = false; + } + shader.uniforms = uniforms; + shader.samplers = samplers; + shader.nUniforms = nUniforms; + shader.nSamplers = nSamplers; + + return shaders.add(shader);*/ + + glUseProgram( GL_NONE ); + + VERIFYGL; + + return true; + } + } + + g_Log->Error( infoLog ); + return false; +} + +// Static list of pointers to opengl uniform functions. +static void *g_UniformFunctionList[ eUniform_NumUniformTypes-1 ]; +static bool g_bFunclistValid = false; + +/* +*/ +bool CShaderUniformGL::SetData( void *_pData, const uint32 _size ) +{ + // Let's take this opportunity to make sure the function pointers are correctly set up.. Ugly, fix! + if( !g_bFunclistValid ) + { + g_UniformFunctionList[ eUniform_Float ] = (void *)glUniform1fvARB; + g_UniformFunctionList[ eUniform_Float2 ] = (void *)glUniform2fvARB; + g_UniformFunctionList[ eUniform_Float3 ] = (void *)glUniform3fvARB; + g_UniformFunctionList[ eUniform_Float4 ] = (void *)glUniform4fvARB; + g_UniformFunctionList[ eUniform_Int ] = (void *)glUniform1ivARB; + g_UniformFunctionList[ eUniform_Int2 ] = (void *)glUniform2ivARB; + g_UniformFunctionList[ eUniform_Int3 ] = (void *)glUniform3ivARB; + g_UniformFunctionList[ eUniform_Int4 ] = (void *)glUniform4ivARB; + g_UniformFunctionList[ eUniform_Boolean ] = (void *)glUniform1ivARB; + g_UniformFunctionList[ eUniform_Boolean2 ] = (void *)glUniform2ivARB; + g_UniformFunctionList[ eUniform_Boolean3 ] = (void *)glUniform3ivARB; + g_UniformFunctionList[ eUniform_Boolean4 ] = (void *)glUniform4ivARB; + g_UniformFunctionList[ eUniform_Matrix2 ] = (void *)glUniformMatrix2fvARB; + g_UniformFunctionList[ eUniform_Matrix3 ] = (void *)glUniformMatrix3fvARB; + g_UniformFunctionList[ eUniform_Matrix4 ] = (void *)glUniformMatrix4fvARB; + g_bFunclistValid = true; + } + + if( m_pData == NULL ) + { + uint32 size = 0; + + switch( m_eType ) + { + case eUniform_Sampler: size = sizeof(int32); break; + case eUniform_Float: size = sizeof(fp4); break; + case eUniform_Float2: size = sizeof(fp4)*2; break; + case eUniform_Float3: size = sizeof(fp4)*2; break; + case eUniform_Float4: size = sizeof(fp4)*4; break; + case eUniform_Int: size = sizeof(int32); break; + case eUniform_Int2: size = sizeof(int32)*2; break; + case eUniform_Int3: size = sizeof(int32)*3; break; + case eUniform_Int4: size = sizeof(int32)*4; break; + case eUniform_Boolean: size = sizeof(int32); break; + case eUniform_Boolean2: size = sizeof(int32)*2; break; + case eUniform_Boolean3: size = sizeof(int32)*2; break; + case eUniform_Boolean4: size = sizeof(int32)*4; break; + case eUniform_Matrix2: size = sizeof(fp4)*(4*2); break; + case eUniform_Matrix3: size = sizeof(fp4)*(4*3); break; + case eUniform_Matrix4: size = sizeof(fp4)*(4*4); break; + default: size = 0; + } + + if( _size != size ) + g_Log->Warning( "hmm, uniform size != _size?"); + + m_pData = new uint8[ size ]; + } + + if( memcmp( m_pData, _pData, _size ) ) + { + memcpy( m_pData, _pData, _size ); + m_bDirty = true; + } + + return true; +} + +typedef GLvoid (APIENTRY *Uniform_Func)(GLint location, GLsizei count, const void *value); +typedef GLvoid (APIENTRY *Uniform_MatrixFunc)(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); + +/* +*/ +void CShaderUniformGL::Apply() +{ + if( !m_bDirty || m_pData == NULL ) + return; + + switch (m_eType) + { + case eUniform_Float: + glUniform1fvARB( m_Index, m_Size, (const GLfloat *)m_pData ); + break; + case eUniform_Float2: + glUniform2fvARB( m_Index, m_Size, (const GLfloat *)m_pData ); + break; + case eUniform_Float3: + glUniform3fvARB( m_Index, m_Size, (const GLfloat *)m_pData ); + break; + case eUniform_Float4: + glUniform4fvARB( m_Index, m_Size, (const GLfloat *)m_pData ); + break; + case eUniform_Int: + case eUniform_Boolean: + case eUniform_Sampler: + glUniform1ivARB( m_Index, m_Size, (const GLint *)m_pData ); + break; + case eUniform_Int2: + case eUniform_Boolean2: + glUniform2ivARB( m_Index, m_Size, (const GLint *)m_pData ); + break; + case eUniform_Int3: + case eUniform_Boolean3: + glUniform3ivARB( m_Index, m_Size, (const GLint *)m_pData ); + break; + case eUniform_Int4: + case eUniform_Boolean4: + glUniform4ivARB( m_Index, m_Size, (const GLint *)m_pData ); + break; + case eUniform_Matrix2: + glUniformMatrix2fvARB( m_Index, m_Size, GL_TRUE, (const GLfloat *)m_pData ); + break; + case eUniform_Matrix3: + glUniformMatrix3fvARB( m_Index, m_Size, GL_TRUE, (const GLfloat *)m_pData ); + break; + case eUniform_Matrix4: + glUniformMatrix4fvARB( m_Index, m_Size, GL_TRUE, (const GLfloat *)m_pData ); + break; + default: + break; + } + + VERIFYGL; + m_bDirty = false; +} + +} + diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/ShaderGL.h electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/ShaderGL.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/ShaderGL.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/ShaderGL.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,107 @@ +#ifndef _SHADERGL_H_ +#define _SHADERGL_H_ + +#include "Log.h" +#include "Shader.h" + +namespace DisplayOutput +{ + +class CShaderUniformGL : public CShaderUniform +{ + int32 m_Index; + int32 m_Size; + uint8 *m_pData; + +#ifdef MAC + CGLContextObj cgl_ctx; +#endif + + public: +#ifdef MAC + CShaderUniformGL( CGLContextObj glCtx, const std::string _name, const eUniformType _eType, const int32 _index = 0, const int32 _size = 0 ) +#else + CShaderUniformGL( const std::string _name, const eUniformType _eType, const int32 _index = 0, const int32 _size = 0 ) +#endif + : CShaderUniform( _name, _eType ), m_Index( _index ), m_Size( _size ) + { + m_pData = NULL; + std::string type = ""; + +#ifdef MAC + cgl_ctx = glCtx; +#endif + + switch( _eType ) + { + case eUniform_Sampler: type = "Sampler"; break; + case eUniform_Float: type = "Float"; break; + case eUniform_Float2: type = "Float2"; break; + case eUniform_Float3: type = "Float2"; break; + case eUniform_Float4: type = "Float4"; break; + case eUniform_Int: type = "Int"; break; + case eUniform_Int2: type = "Int2"; break; + case eUniform_Int3: type = "Int3"; break; + case eUniform_Int4: type = "Int4"; break; + case eUniform_Boolean: type = "Boolean"; break; + case eUniform_Boolean2: type = "Boolean2"; break; + case eUniform_Boolean3: type = "Boolean2"; break; + case eUniform_Boolean4: type = "Boolean4"; break; + case eUniform_Matrix2: type = "Matrix2"; break; + case eUniform_Matrix3: type = "Matrix3"; break; + case eUniform_Matrix4: type = "Matrix4"; break; + default: + type = ""; + } + + if( type == "" ) + g_Log->Warning( ("Unknown uniform " + _name).c_str() ); + else + g_Log->Info( ("Uniform '" + _name + "' (" + type + ")").c_str() ); + }; + + virtual ~CShaderUniformGL() + { + SAFE_DELETE_ARRAY( m_pData ); + }; + + virtual bool SetData( void *_pData, const uint32 _size ); + virtual void Apply(); +}; + +MakeSmartPointers( CShaderUniformGL ); + +/* + CShaderGL(). + +*/ +class CShaderGL : public CShader +{ + GLhandleARB m_Program; + GLhandleARB m_VertexShader; + GLhandleARB m_FragmentShader; + +#ifdef MAC + CGLContextObj cgl_ctx; +#endif + + public: +#ifdef MAC + CShaderGL(CGLContextObj glCtx); +#else + CShaderGL(); +#endif + virtual ~CShaderGL(); + + virtual bool Bind( void ); + virtual bool Unbind( void ); + virtual bool Apply( void ); + + bool Build( const char *_pVertexShader, const char *_pFragmentShader ); +}; + +MakeSmartPointers( CShaderGL ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/TextureFlatGL.cpp electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/TextureFlatGL.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/TextureFlatGL.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/TextureFlatGL.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,313 @@ +#include +#include +#include +#ifndef LINUX_GNU +#include "GLee.h" +#else +#include +#endif +#ifdef MAC +#include +//#include +#include +#else +#include +#include +#endif + +#include "base.h" +#include "Log.h" +#include "MathBase.h" +#include "Exception.h" +#include "DisplayOutput.h" +#include "RendererGL.h" +#include "TextureFlatGL.h" + +namespace DisplayOutput +{ + +// These map 1:1 with eImageFormat in Image.h... *Keep them in sync!!!* +static const GLint internalFormats[] = +{ + 0, + + + GL_INTENSITY8, + GL_LUMINANCE8_ALPHA8, + GL_RGB8, +#ifdef MAC + GL_RGBA, +#else + GL_RGBA8, +#endif + + GL_INTENSITY16, + GL_LUMINANCE16_ALPHA16, + GL_RGB16, + GL_RGBA16, + + GL_INTENSITY_FLOAT16_ATI, + GL_LUMINANCE_ALPHA_FLOAT16_ATI, + GL_RGB_FLOAT16_ATI, + GL_RGBA_FLOAT16_ATI, + + GL_INTENSITY_FLOAT32_ATI, + GL_LUMINANCE_ALPHA_FLOAT32_ATI, + GL_RGB_FLOAT32_ATI, + GL_RGBA_FLOAT32_ATI, + + GL_RGBA4, + GL_RGB5, + + GL_COMPRESSED_RGB_S3TC_DXT1_EXT, + GL_COMPRESSED_RGBA_S3TC_DXT3_EXT, + GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, + + GL_DEPTH_COMPONENT16, + GL_DEPTH_COMPONENT24, +}; + +// +static const GLenum srcTypes[] = +{ + 0, + + GL_UNSIGNED_BYTE, + GL_UNSIGNED_BYTE, + GL_UNSIGNED_BYTE, +#ifdef MAC + GL_UNSIGNED_INT_8_8_8_8_REV, +#else + GL_UNSIGNED_BYTE, +#endif + + GL_UNSIGNED_SHORT, + GL_UNSIGNED_SHORT, + GL_UNSIGNED_SHORT, + GL_UNSIGNED_SHORT, + + 0,//GL_HALF_FLOAT_ARB, + 0,//GL_HALF_FLOAT_ARB, + 0,//GL_HALF_FLOAT_ARB, + 0,//GL_HALF_FLOAT_ARB, + + GL_FLOAT, + GL_FLOAT, + GL_FLOAT, + GL_FLOAT, + + GL_UNSIGNED_SHORT_4_4_4_4_REV, + GL_UNSIGNED_SHORT_5_6_5, + + 0, + 0, + 0, + + GL_UNSIGNED_SHORT, + GL_UNSIGNED_INT, +}; + +/* +*/ +#ifdef MAC +CTextureFlatGL::CTextureFlatGL( const uint32 _flags, CGLContextObj glCtx ) : CTextureFlat( _flags ) +#else +CTextureFlatGL::CTextureFlatGL( const uint32 _flags ) : CTextureFlat( _flags ) +#endif +{ + m_TexTarget = GL_TEXTURE_2D; + +#ifdef MAC + cgl_ctx = glCtx;//CGLGetCurrentContext(); + + if ( _flags & kRectTexture ) + m_TexTarget = GL_TEXTURE_RECTANGLE_EXT; +#endif + + glGenTextures( (GLsizei)1, &m_TexID ); + VERIFYGL; +} + +/* +*/ +CTextureFlatGL::~CTextureFlatGL() +{ + glDeleteTextures( 1, &m_TexID ); + VERIFYGL; +} + +/* +*/ +bool CTextureFlatGL::Upload( spCImage _spImage ) +{ + m_spImage = _spImage; + + if (m_spImage==NULL) return false; + + CImageFormat format = _spImage->GetFormat(); + + static const GLenum srcFormats[] = + { + 0, + GL_LUMINANCE, + GL_LUMINANCE_ALPHA, + GL_RGB, +#ifdef MAC + GL_BGRA +#else + GL_RGBA +#endif + }; + + GLenum srcFormat = srcFormats[ format.GetChannels() ]; + GLenum srcType = srcTypes[ format.getFormatEnum() ]; + GLint internalFormat = internalFormats[ format.getFormatEnum() ]; + + if( format.isFloat() ) + internalFormat = internalFormats[ format.getFormatEnum() - (eImage_RGBA32F - eImage_I16F)]; + + glBindTexture( m_TexTarget, m_TexID ); + + glTexParameteri( m_TexTarget, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); + glTexParameteri( m_TexTarget, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); + + // Set filter modes. + glTexParameteri( m_TexTarget, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); + glTexParameteri( m_TexTarget, GL_TEXTURE_MIN_FILTER, GL_LINEAR ); + + // Upload it all + uint8 *pSrc; + uint32 mipMapLevel = 0; + while( (pSrc = _spImage->GetData( mipMapLevel ) ) != NULL ) + { + if( format.isCompressed() ) + { + // does the glCompressedTexImage2DARB need also power-of-two sized texture??? + glCompressedTexImage2DARB( m_TexTarget, mipMapLevel, internalFormat, _spImage->GetWidth( mipMapLevel ), _spImage->GetHeight( mipMapLevel ), 0, _spImage->getMipMappedSize( mipMapLevel, 1 ), pSrc ); + + if (mipMapLevel == 0) + SetRect( Base::Math::CRect( 1, 1 ) ); + } + else + { + uint32 imgWidth = _spImage->GetWidth( mipMapLevel ); + uint32 imgHeight = _spImage->GetHeight( mipMapLevel ); + + uint32 texWidth, texHeight; + +#ifdef MAC + GLint save2, + save3, + save4, + save5; + + glGetIntegerv(GL_UNPACK_ALIGNMENT, &save2); + glPixelStorei(GL_UNPACK_ALIGNMENT, 4); + glGetIntegerv(GL_UNPACK_ROW_LENGTH, &save3); + glPixelStorei(GL_UNPACK_ROW_LENGTH, _spImage->GetPitch() / 4); + glGetIntegerv(GL_UNPACK_CLIENT_STORAGE_APPLE, &save4); + glGetIntegerv(GL_TEXTURE_STORAGE_HINT_APPLE, &save5); +#endif + +#ifndef LINUX_GNU + if( GLEE_ARB_texture_non_power_of_two || m_TexTarget == GL_TEXTURE_RECTANGLE_EXT ) +#else + if( GLEE_ARB_texture_non_power_of_two || m_TexTarget == GL_TEXTURE_RECTANGLE_ARB ) + +#endif + { + texWidth = imgWidth; + texHeight = imgHeight; + } + else + { + texWidth = Base::Math::UpperPowerOfTwo( _spImage->GetWidth( mipMapLevel ) ); + texHeight = Base::Math::UpperPowerOfTwo( _spImage->GetHeight( mipMapLevel ) ); + } + + if ( texWidth == imgWidth && texHeight == imgHeight ) + { +#ifdef MAC + //glTexParameteri(m_TexTarget, GL_TEXTURE_STORAGE_HINT_APPLE , GL_STORAGE_SHARED_APPLE); + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE); +#endif + glTexImage2D( m_TexTarget, mipMapLevel, internalFormat, texWidth, texHeight, 0, srcFormat, srcType, pSrc ); + + if ( mipMapLevel == 0 ) + { +#ifndef LINUX_GNU + if ( m_TexTarget == GL_TEXTURE_RECTANGLE_EXT ) +#else + if ( m_TexTarget == GL_TEXTURE_RECTANGLE_ARB ) +#endif + SetRect( Base::Math::CRect( texWidth, texHeight ) ); + else + SetRect( Base::Math::CRect( 1, 1 ) ); + } + } + else + { + glTexImage2D( m_TexTarget, mipMapLevel, internalFormat, texWidth, texHeight, 0, srcFormat, srcType, NULL ); + glTexSubImage2D( m_TexTarget, mipMapLevel, 0, 0, _spImage->GetWidth( mipMapLevel ), _spImage->GetHeight( mipMapLevel ), srcFormat, srcType, pSrc ); + + if (mipMapLevel == 0) + { +#ifndef LINUX_GNU + if ( m_TexTarget == GL_TEXTURE_RECTANGLE_EXT ) +#else + if ( m_TexTarget == GL_TEXTURE_RECTANGLE_ARB ) +#endif + SetRect( Base::Math::CRect( (fp4)imgWidth, (fp4)imgHeight ) ); + else + SetRect( Base::Math::CRect( (fp4)imgWidth / (fp4)texWidth, (fp4)imgHeight / (fp4)texHeight ) ); + } + } + +#ifdef MAC + glTexParameteri(m_TexTarget, GL_TEXTURE_STORAGE_HINT_APPLE , save5); + glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, save4); + glPixelStorei(GL_UNPACK_ROW_LENGTH, save3); + glPixelStorei(GL_UNPACK_ALIGNMENT, save2); +#endif + } + + m_bufferCache = _spImage->GetStorageBuffer(); + + mipMapLevel++; + } + + m_bDirty = true; + + VERIFYGL; + + glBindTexture( m_TexTarget, 0 ); + + return true; +} + +/* +*/ +bool CTextureFlatGL::Bind( const uint32 _index ) +{ + glActiveTextureARB( GL_TEXTURE0 + _index ); + glEnable( m_TexTarget ); + glBindTexture( m_TexTarget, m_TexID ); + + m_bDirty = false; + + VERIFYGL; + return true; +} + +/* +*/ +bool CTextureFlatGL::Unbind( const uint32 _index ) +{ + glActiveTextureARB( GL_TEXTURE0 + _index ); + glBindTexture( m_TexTarget, 0 ); + glDisable( m_TexTarget ); + VERIFYGL; + return true; +} + +} diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/TextureFlatGL.h electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/TextureFlatGL.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/TextureFlatGL.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/TextureFlatGL.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,43 @@ +#ifndef _TEXTUREFLATGL_H +#define _TEXTUREFLATGL_H + +#include "TextureFlat.h" + +namespace DisplayOutput +{ + +const uint32 kRectTexture = 0x80000000; + +/* + CTextureFlatGL. + +*/ +class CTextureFlatGL : public CTextureFlat +{ + GLuint m_TexID; + + GLenum m_TexTarget; + +#ifdef MAC + CGLContextObj cgl_ctx; +#endif + + + public: +#ifdef MAC + CTextureFlatGL( const uint32 _flags = 0, CGLContextObj glctx = NULL ); +#else + CTextureFlatGL( const uint32 _flags = 0 ); +#endif + virtual ~CTextureFlatGL(); + + bool Upload( spCImage _spImage ); + bool Bind( const uint32 _index ); + bool Unbind( const uint32 _index ); +}; + +MakeSmartPointers( CTextureFlatGL ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/wgl.cpp electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/wgl.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/wgl.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/wgl.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,354 @@ +#ifdef WIN32 + +#define WIN32_LEAN_AND_MEAN +#include +#include + +#include "wgl.h" +#include "Log.h" + +#include "Exception.h" + +namespace DisplayOutput +{ + +/* + CWindowsGL(). + +*/ +CWindowsGL::CWindowsGL() : CDisplayOutput() +{ + m_WindowHandle = NULL; + m_bScreensaver = false; +} + +/* + ~CWindowsGL(). + +*/ +CWindowsGL::~CWindowsGL() +{ +} + +/* + wndProc(). + Handle all events, push them onto the eventqueue. +*/ +LRESULT CALLBACK CWindowsGL::wndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + PAINTSTRUCT ps; + + switch( msg ) + { + /*case WM_PAINT: + BeginPaint( hWnd, &ps ); + EndPaint( hWnd, &ps ); + break;*/ + + /*case WM_SIZE: + width = LOWORD(lParam); + height = HIWORD(lParam); + break;*/ + + case WM_CLOSE: + DestroyWindow(hWnd); + break; + + case WM_DESTROY: + PostQuitMessage(0); + break; + + case WM_KEYUP: + { + CKeyEvent *spEvent = new CKeyEvent(); + spEvent->m_bPressed = true; + + switch( wParam ) + { + case VK_LEFT: spEvent->m_Code = CKeyEvent::KEY_LEFT; break; + case VK_RIGHT: spEvent->m_Code = CKeyEvent::KEY_RIGHT; break; + case VK_UP: spEvent->m_Code = CKeyEvent::KEY_UP; break; + case VK_DOWN: spEvent->m_Code = CKeyEvent::KEY_DOWN; break; + case VK_SPACE: spEvent->m_Code = CKeyEvent::KEY_SPACE; break; + case VK_F1: spEvent->m_Code = CKeyEvent::KEY_F1; break; + case VK_F2: spEvent->m_Code = CKeyEvent::KEY_F2; break; + case VK_F3: spEvent->m_Code = CKeyEvent::KEY_F3; break; + case VK_F4: spEvent->m_Code = CKeyEvent::KEY_F4; break; + case VK_ESCAPE: spEvent->m_Code = CKeyEvent::KEY_Esc; break; + } + + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_LBUTTONUP: + { + CMouseEvent *spEvent = new CMouseEvent(); + spEvent->m_Code = CMouseEvent::Mouse_LEFT; + spEvent->m_X = MAKEPOINTS( lParam ).x; + spEvent->m_Y = MAKEPOINTS( lParam ).y; + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_RBUTTONUP: + { + CMouseEvent *spEvent = new CMouseEvent(); + spEvent->m_Code = CMouseEvent::Mouse_RIGHT; + spEvent->m_X = MAKEPOINTS( lParam ).x; + spEvent->m_Y = MAKEPOINTS( lParam ).y; + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_MOUSEMOVE: + { + CMouseEvent *spEvent = new CMouseEvent(); + spEvent->m_Code = CMouseEvent::Mouse_MOVE; + + spEvent->m_X = MAKEPOINTS( lParam ).x; + spEvent->m_Y = MAKEPOINTS( lParam ).y; + + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_POWERBROADCAST: + switch( LOWORD( wParam ) ) + { + case PBT_APMBATTERYLOW: + case PBT_APMSUSPEND: + { + CPowerEvent *spEvent = new CPowerEvent(); + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + } + break; + + default: + return DefWindowProc( hWnd, msg, wParam, lParam ); + } + return 0; +} + +/* + createwindow(). + Creates a new window, _w * _h in size, optionally fullscreen. +*/ +static HWND createwindow( uint32 _w, uint32 _h, const bool _bFullscreen ) +{ + WNDCLASS wndclass; + HMODULE hInstance = GetModuleHandle(NULL); + RECT windowRect; + SetRect(&windowRect, 0, 0, _w, _h ); + + ZeroMemory( &wndclass, sizeof(WNDCLASS) ); + + wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; + wndclass.lpfnWndProc = (WNDPROC)CWindowsGL::wndProc; + wndclass.cbClsExtra = 0; + wndclass.cbWndExtra = 0; + wndclass.hInstance = hInstance; + wndclass.hIcon = LoadIcon (NULL, IDI_WINLOGO); + wndclass.hCursor = LoadCursor (NULL, IDC_ARROW); + wndclass.hbrBackground = NULL; + wndclass.lpszMenuName = NULL; + wndclass.lpszClassName = "Electricsheep"; + + if( !RegisterClass (&wndclass) ) + { + OutputDebugString("Failed to register window class"); + return 0; + } + + if( _bFullscreen ) + { + DEVMODE dmScreenSettings; + memset(&dmScreenSettings, 0, sizeof(dmScreenSettings)); + dmScreenSettings.dmSize = sizeof(dmScreenSettings); + dmScreenSettings.dmPelsWidth = _w; + dmScreenSettings.dmPelsHeight = _h; + dmScreenSettings.dmBitsPerPel = 32; + dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; + + if( ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL ) + OutputDebugString("Failed to change display settings"); + } + + unsigned long exStyle; + unsigned long style; + if( _bFullscreen ) + { + exStyle = WS_EX_APPWINDOW; + style = WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; + } + else + { + exStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; + style = WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; + } + + AdjustWindowRectEx( &windowRect, style, false, exStyle ); + HWND hWnd = CreateWindowEx( exStyle, "Electricsheep", "Electricsheep", style, 0, 0, _w, _h, NULL, NULL, hInstance, NULL ); + + return hWnd; +} + +/* + Initialize(). + We already have a window from the screensaver, so store it and pass along all 0's to initialize + a child window. +*/ +bool CWindowsGL::Initialize( HWND _hWnd, bool _bPreview ) +{ + m_bScreensaver = true; + m_bPreview = true; + m_WindowHandle = _hWnd; + + HMODULE hInstance = GetModuleHandle(NULL); + + WNDCLASS wc; + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = (WNDPROC)CWindowsGL::wndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hIcon = NULL; + wc.hCursor = NULL; + wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); + wc.lpszMenuName = NULL; + wc.lpszClassName = "Electricsheep"; + RegisterClass( &wc ); + + if( _bPreview ) + { + RECT rc; + GetWindowRect( _hWnd, &rc ); + int32 cx = rc.right - rc.left; + int32 cy = rc.bottom - rc.top; + + m_WindowHandle = CreateWindowEx( 0, "Electricsheep", "Preview", WS_CHILD | WS_VISIBLE, 0, 0, cx, cy, _hWnd, NULL, hInstance, NULL ); + + if( m_WindowHandle == NULL ) + ThrowStr( "Unable to create window..." ); + + m_Width = cx; + m_Height = cy; + + g_Log->Info( "Screensaver preview (%dx%d)", cx, cy ); + + // Show cursor. + ShowCursor( true ); + } + else + { +// int32 cx = GetSystemMetrics( SM_CXSCREEN ); +// int32 cy = GetSystemMetrics( SM_CYSCREEN ); + RECT rc; + GetWindowRect( _hWnd, &rc ); + m_Width = rc.right; + m_Height = rc.bottom; + + //DWORD exstyle = 0;//WS_EX_TOPMOST; + //DWORD style = WS_CHILD | WS_VISIBLE; + + m_WindowHandle = _hWnd;//CreateWindowEx( exstyle, "Electricsheep", "Saver", style, 0, 0, cx, cy, _hWnd, NULL, hInstance, NULL ); + + if( m_WindowHandle == NULL ) + ThrowStr( "Unable to create window..." ); + + g_Log->Info( "Screensaver (%dx%d)", m_Width, m_Height ); + + // Hide cursor. + ShowCursor( false ); + } + + // Set up some opengl stuff for the window we just created. + //SetupGL(); +} + + +/* + Initialize(). + +*/ +HWND CWindowsGL::Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ) +{ + uint32 w, h; + + // Create window if it was not already created. + if( m_WindowHandle == NULL ) + { + uint32 w = _width; + uint32 h = _height; + + if( _bFullscreen ) + { + w = GetSystemMetrics( SM_CXSCREEN ); + h = GetSystemMetrics( SM_CYSCREEN ); + } + + g_Log->Info( "(%dx%d)", w, h ); + + m_WindowHandle = createwindow( w, h, _bFullscreen ); + if( m_WindowHandle == 0 ) + ThrowStr( "Unable to create window..." ); + } + + // Show or Hide cursor. + ShowCursor( !_bFullscreen ); + + // Get window dimensions. + RECT rect; + GetClientRect( m_WindowHandle, &rect ); + m_Width = rect.right; + m_Height = rect.bottom; + + ShowWindow( m_WindowHandle, SW_SHOW ); + SetForegroundWindow( m_WindowHandle ); + SetFocus( m_WindowHandle ); + + return m_WindowHandle; +} + +// +void CWindowsGL::Title( const std::string &_title ) +{ + SetWindowText( m_WindowHandle, _title.c_str() ); +} + +// +void CWindowsGL::Update() +{ + MSG msg; + + while( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) ) + { + if( GetMessage( &msg, NULL, 0, 0) <= 0 ) // error or WM_QUIT + { + printf( "Message to close\n" ); + fflush( stdout ); + g_Log->Info( "Message to close..." ); + m_bClosed = true; + return; + } + + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } +} + +/* +*/ +void CWindowsGL::SwapBuffers() +{ +} + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/wgl.h electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/wgl.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/OpenGL/wgl.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/OpenGL/wgl.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,55 @@ +#ifndef _WGL__H_ +#define _WGL__H_ + +#ifdef WIN32 + +#ifdef _DisplayGL_H_ +#error "DisplayGL.h included before wgl.h!" +#endif + +#include "../DisplayOutput.h" +#include "glee.h" + +namespace DisplayOutput +{ + +/* + CWindowsGL. + Windows OpenGL output. +*/ +class CWindowsGL : public CDisplayOutput +{ + HWND m_WindowHandle; + + // Only valid when running as a screensaver. + bool m_bScreensaver; + bool m_bPreview; + + public: + CWindowsGL(); + virtual ~CWindowsGL(); + + static LRESULT CALLBACK wndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); + + static char *Description() { return "Windows OpenGL display"; }; + virtual HWND Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ); + + HWND WindowHandle( void ) { return m_WindowHandle; }; + + // This is used when running as a screensaver, where the hwnd might already be provided. + virtual bool Initialize( HWND _hWnd, bool _bPreview ); + + // + virtual void Title( const std::string &_title ); + virtual void Update(); + + void SwapBuffers(); +}; + +typedef CWindowsGL CDisplayGL; + +}; + +#endif + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Font.cpp electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Font.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Font.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Font.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,52 @@ +#include +#include "base.h" +#include "Font.h" +#include "Log.h" + +class CFont; + +namespace DisplayOutput +{ + + +/* +*/ +CFontDescription::CFontDescription() : +m_Height( 10 ), m_Style( Normal ), m_bItalic( false ), m_bUnderline( false ), m_bAntiAliased( true ), m_TypeFace( "Trebuchet MS" ) +{ +} + +/* +*/ +CFontDescription::~CFontDescription() +{ +} + +/* +*/ +bool CFontDescription::operator == (const CFontDescription &_rhs ) const +{ + return( (m_Height == _rhs.m_Height) && (m_Style == _rhs.m_Style) && (m_bItalic == _rhs.m_bItalic) && + (m_bUnderline == _rhs.m_bUnderline) && (m_bAntiAliased == _rhs.m_bAntiAliased) && + (m_TypeFace == _rhs.m_TypeFace) ); +} + + +/* + CBaseFont(). + +*/ +CBaseFont::CBaseFont() +{ + m_FontDescription.TypeFace( "..." ); +} + +/* + ~CBaseFont(). + +*/ +CBaseFont::~CBaseFont() +{ +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Font.h electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Font.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Font.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Font.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,119 @@ +/* + FONT.H + Author: Stef. + + Font. +*/ +#ifndef __DAFONT_H_ +#define __DAFONT_H_ + +#include +#include "base.h" +#include "SmartPtr.h" + +namespace DisplayOutput +{ + +/* + CFontDescription(). + +*/ +class CFontDescription +{ + public: + + enum eStyle + { + Thin, + Light, + Normal, + Bold, + UberBold, + }; + + private: + + uint32 m_Height; + eStyle m_Style; + bool m_bItalic; + bool m_bUnderline; + bool m_bAntiAliased; + std::string m_TypeFace; + + public: + // + CFontDescription(); + ~CFontDescription(); + + // + bool operator == (const CFontDescription &_rhs ) const; + + // + void Height( uint32 _h ) { m_Height = _h; }; + uint32 Height( void ) const { return( m_Height ); }; + + // + void Style( const eStyle _w ) { m_Style = _w; }; + eStyle Style( void ) const { return( m_Style ); }; + + // + void Italic( const bool _b ) { m_bItalic = _b; }; + bool Italic( void ) const { return( m_bItalic ); }; + + // + void Underline( const bool _b ) { m_bUnderline = _b; }; + bool Underline( void ) const { return( m_bUnderline ); }; + + // + void AntiAliased( const bool _b ) { m_bAntiAliased = _b; }; + bool AntiAliased( void ) const { return( m_bAntiAliased ); }; + + // + void TypeFace( const std::string &_n ) { m_TypeFace = _n; }; + const std::string &TypeFace() const { return( m_TypeFace ); }; +}; + +MakeSmartPointers( CFontDescription ); + +/* + CBaseFont. + +*/ +class CBaseFont +{ + protected: + + CFontDescription m_FontDescription; + + public: + CBaseFont(); + virtual ~CBaseFont(); + + enum eRenderStyle + { + Bottom = 1, + Top, + Center, + Left, + Right, + VCenter, + NoClip, + ExpandTabs, + WordBreak, + }; + + virtual bool Create() = PureVirtual; + + virtual void Reupload() { }; + + // + void FontDescription( const CFontDescription &_desc ) { m_FontDescription = _desc; }; + const CFontDescription FontDescription( void ) const { return( m_FontDescription ); }; + +}; + +MakeSmartPointers( CBaseFont ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Renderer.cpp electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Renderer.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Renderer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Renderer.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,207 @@ +#include +#include + +#include "DisplayOutput.h" +#include "Renderer.h" +#include "Matrix.h" + +namespace DisplayOutput +{ + +/* +*/ +CRenderer::CRenderer() +{ + m_aspActiveTextures = new spCTexture[ MAX_TEXUNIT ]; + m_aspSelectedTextures = new spCTexture[ MAX_TEXUNIT ]; + + m_bDirtyMatrices = 0; +} + +/* +*/ +CRenderer::~CRenderer() +{ + if (m_aspSelectedTextures != NULL) + for( uint32 i=0; iWidth(), m_spDisplay->Height() ); +} + +/* +*/ +void CRenderer::Orthographic( const uint32 _width, const uint32 _height ) +{ + Base::Math::CMatrix4x4 proj; + proj.OrthographicRH( fp4(_width), fp4(_height), -1, 1 ); + SetTransform( proj, eProjection ); +} + +/* +*/ +void CRenderer::SetTransform( const Base::Math::CMatrix4x4 &_transform, const eMatrixTransformType _type ) +{ + switch( _type ) + { + case eWorld: m_WorldMat = _transform; break; + case eView: m_ViewMat = _transform; break; + case eProjection: m_ProjMat = _transform; break; + default: + g_Log->Warning( "Unknown transformation type..." ); + } + + setBit( m_bDirtyMatrices, _type ); +} + + +/* + SetTexture(). + +*/ +void CRenderer::SetTexture( spCTexture _spTex, const uint32 _index ) +{ + ASSERT( _index <=MAX_TEXUNIT ); + m_aspSelectedTextures[ _index ] = _spTex; +} + +/* + SetShader(). +*/ +void CRenderer::SetShader( spCShader _spShader ) +{ + m_spSelectedShader = _spShader; +} + +/* +*/ +void CRenderer::SetBlend( std::string _blend ) +{ + m_spSelectedBlend = m_BlendMap[ _blend ]; +} + + +/* +*/ +void CRenderer::Apply() +{ + // Update textures. + for( uint32 i=0; iUnbind( i ); + m_aspActiveTextures[i] = NULL; + } + } + else + if( spTex != m_aspActiveTextures[i] ) + { + if( m_aspActiveTextures[i] != NULL ) + m_aspActiveTextures[i]->Unbind( i ); + + if( spTex != NULL ) + { + // Bind new tex. + spTex->Bind( i ); + } + + m_aspActiveTextures[ i ] = spTex; + } + + // Force bind if dirty. + if( spTex != NULL ) + if( spTex->Dirty() ) + { + spTex->Bind( i ); + m_aspActiveTextures[ i ] = spTex; + } + + } + + // Update shader. + if( m_spActiveShader != m_spSelectedShader ) + { + if( m_spActiveShader != NULL ) + m_spActiveShader->Unbind(); + + if( m_spSelectedShader != NULL ) + m_spSelectedShader->Bind(); + + m_spActiveShader = m_spSelectedShader; + } + + // Update shader uniforms. + if( m_spActiveShader != NULL ) + m_spActiveShader->Apply(); +} + + +} + diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Renderer.h electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Renderer.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Renderer.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Renderer.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,190 @@ +#ifndef _RENDERER_H_ +#define _RENDERER_H_ + +#include +#include "base.h" +#include "SmartPtr.h" +#include "Font.h" +#include "TextureFlat.h" +#include "Shader.h" +#include "Image.h" +#include "DisplayOutput.h" +#include "Matrix.h" +#include "Vector4.h" + +namespace DisplayOutput +{ + +/* +*/ +enum eTextureTargetType +{ + eTexture2D, + eTexture2DRect +}; + +/* +*/ +enum eStateResetFlags +{ + eEverything = 0xffff, + eShader = 0x1, + eDepth = 0x2, + eBlend = 0x4, + eRaster = 0x8, + eTexture = 0x10, + eSampler = 0x20, + eMatrices = 0x40, +}; + +enum eRenderLimits +{ + MAX_TEXUNIT = 29 +}; + +enum eRenderType +{ + eDX9, + eGL, +}; + +// Blending constants +enum eBlendConstant +{ + eZero, + eOne, + eSrc_Color, + eOne_Minus_Src_Color, + eDst_Color, + eOne_Minus_Dst_Color, + eSrc_Alpha, + eOne_Minus_Src_Alpha, + eDst_Alpha, + eOne_Minus_Dst_Alpha, + eSrc_Alpha_Saturate, + eBlendConstNone, +}; + +// Blendmodes. +enum eBlendMode +{ + eAdd, + eSub, + eReverse_Sub, + eMin, + eMax, + eBlendNone, +}; + + +/* +*/ +class CBlend +{ + public: + CBlend( int32 _src, int32 _dst, int32 _mode ) + { + m_Src = _src; + m_Dst = _dst; + m_Mode = _mode; + m_bEnabled = (_src != eOne || _dst != eZero); + } + ~CBlend() {}; + + bool m_bEnabled; + int32 m_Src; + int32 m_Dst; + int32 m_Mode; +}; + +MakeSmartPointers( CBlend ); + +/* + CRenderer(). + +*/ +class CRenderer +{ + protected: + spCTexture *m_aspActiveTextures, *m_aspSelectedTextures; + spCShader m_spActiveShader, m_spSelectedShader; + spCBlend m_spActiveBlend, m_spSelectedBlend, m_spDefaultBlend; + + std::map m_BlendMap; + + spCDisplayOutput m_spDisplay; + + // Matrices. + Base::Math::CMatrix4x4 m_WorldMat, m_ViewMat, m_ProjMat; + uint32 m_bDirtyMatrices; + + public: + CRenderer(); + virtual ~CRenderer(); + + virtual eRenderType Type( void ) const = PureVirtual; + virtual const std::string Description( void ) const = PureVirtual; + + // + virtual bool Initialize( spCDisplayOutput _spDisplay ); + spCDisplayOutput Display() { return m_spDisplay; }; + + // + virtual bool BeginFrame( void ) { return( true ); }; + virtual bool EndFrame( bool /*drawn*/ = true ) { return( true ); }; + + // Textures. + virtual spCTextureFlat NewTextureFlat( const uint32 flags = 0 ) = PureVirtual; + virtual spCTextureFlat NewTextureFlat( spCImage _spImage, const uint32 flags = 0 ) = PureVirtual; + + // Font. + virtual spCBaseFont NewFont( CFontDescription &_desc ) = PureVirtual; + virtual void Text( spCBaseFont /*_spFont*/, const std::string &/*_text*/, const Base::Math::CVector4 &/*_color*/, const Base::Math::CRect &/*_rect*/, uint32 /*_flags*/ ) {}; + virtual Base::Math::CVector2 GetTextExtent( spCBaseFont /*_spFont*/, const std::string &/*_text*/ ) { return Base::Math::CVector2( 0, 0 ); }; + + virtual bool HasShaders() { return false; } + // Shaders. + virtual spCShader NewShader( const char *_pVertexShader, const char *_pFragmentShader ) = PureVirtual; + + // Shortcut helper function. + void Orthographic(); + void Orthographic( const uint32 _width, const uint32 _height ); + + // + enum eMatrixTransformType + { + eWorld = 1, + eView = 2, + eProjection = 4, + }; + + void SetTransform( const Base::Math::CMatrix4x4 &_transform, const eMatrixTransformType _type ); + + + // State api. + virtual void Defaults() = PureVirtual; + virtual void Reset( const uint32 _flags ); + virtual void Apply(); + virtual void SetTexture( spCTexture _spTex, const uint32 _index ); + virtual void SetShader( spCShader _spShader ); + + virtual eTextureTargetType GetTextureTargetType( void ) { return eTexture2D; }; + + // + void AddBlend( std::string _name, int32 _src, int32 _dst, int32 _mode ); + void SetBlend( std::string _blend ); + + + // Aux functions. + virtual void DrawLine( const Base::Math::CVector2 &/*_start*/, const Base::Math::CVector2 &/*_end*/, const Base::Math::CVector4 &/*_color*/, const fp4 /*_width = 1.0f*/ ) {}; + virtual void DrawRect( const Base::Math::CRect &/*_rect*/, const Base::Math::CVector4 &/*_color*/, const fp4 /*_width = 1.0f*/ ) {}; + virtual void DrawQuad( const Base::Math::CRect &/*_rect*/, const Base::Math::CVector4 &/*_color*/ ) {}; + virtual void DrawQuad( const Base::Math::CRect &/*_rect*/, const Base::Math::CVector4 &/*_color*/, const Base::Math::CRect &/*_uvRect*/ ) {}; + virtual void DrawSoftQuad( const Base::Math::CRect &/*_rect*/, const Base::Math::CVector4 &/*_color*/, const fp4 /*_width*/ ) {}; +}; + +MakeSmartPointers( CRenderer ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Shader.cpp electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Shader.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Shader.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Shader.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,24 @@ +#include +#include + +#include "Exception.h" +#include "Shader.h" +#include "Log.h" + +namespace DisplayOutput +{ + +/* +*/ +CShader::CShader() +{ +} + +/* +*/ +CShader::~CShader() +{ +} + +} + diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Shader.h electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Shader.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Shader.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Shader.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,135 @@ +#ifndef _SHADER_H_ +#define _SHADER_H_ + +#include +#include "Log.h" +#include "SmartPtr.h" + +namespace DisplayOutput +{ + +enum eUniformType { + eUniform_Float = 0, + eUniform_Float2, + eUniform_Float3, + eUniform_Float4, + eUniform_Int, + eUniform_Int2, + eUniform_Int3, + eUniform_Int4, + eUniform_Boolean, + eUniform_Boolean2, + eUniform_Boolean3, + eUniform_Boolean4, + eUniform_Matrix2, + eUniform_Matrix3, + eUniform_Matrix4, + eUniform_Sampler, + eUniform_NumUniformTypes, +}; + + +/* + CShaderUniform. + +*/ +class CShaderUniform +{ + protected: + bool m_bDirty; + std::string m_Name; + eUniformType m_eType; + + public: + CShaderUniform( const std::string _name, const eUniformType _eType ) : m_bDirty(true), m_Name( _name ), m_eType( _eType ) {} + virtual ~CShaderUniform() {} + + virtual bool SetData( void *_pData, const uint32 _size ) = PureVirtual; + virtual void Apply() = PureVirtual; +}; + +MakeSmartPointers( CShaderUniform ); + + +/* + CShader(). + +*/ +class CShader +{ + protected: + std::map< std::string, spCShaderUniform > m_Uniforms; + std::map< std::string, spCShaderUniform > m_Samplers; + + spCShaderUniform Uniform( const std::string _name ) const + { + spCShaderUniform ret = NULL; + + std::map< std::string, spCShaderUniform >::const_iterator iter; + + iter = m_Uniforms.find( _name ); + if( iter != m_Uniforms.end() ) + return iter->second; + + iter = m_Samplers.find( _name ); + if( iter != m_Samplers.end() ) + return iter->second; + + //ThrowStr( ("Uniform '" + _name + "' not found").c_str() ); + //g_Log->Warning( "Uniform '%s' not found", _name.c_str() ); + return NULL; + } + + public: + CShader(); + virtual ~CShader(); + + virtual bool Bind( void ) = PureVirtual; + virtual bool Unbind( void ) = PureVirtual; + virtual bool Apply( void ) = PureVirtual; + + virtual bool Build( const char *_pVertexShader, const char *_pFragmentShader ) = PureVirtual; + + bool Set( const std::string _name, const int32 _value ) const + { + spCShaderUniform spUniform = Uniform( _name ); + if( spUniform != NULL ) + { + spUniform->SetData( (void *)&_value, sizeof(_value) ); + return true; + } + + return false; + } + + bool Set( const std::string _name, const fp4 _value ) const + { + spCShaderUniform spUniform = Uniform( _name ); + if( spUniform != NULL ) + { + spUniform->SetData( (void *)&_value, sizeof(_value) ); + return true; + } + + return false; + } + + bool Set( const std::string _name, const fp4 _x, const fp4 _y, const fp4 _z, const fp4 _w ) const + { + spCShaderUniform spUniform = Uniform( _name ); + if( spUniform != NULL ) + { + fp4 v[4] = { _x, _y, _z, _w }; + spUniform->SetData( &v, sizeof(v) ); + return true; + } + + return false; + } +}; + +MakeSmartPointers( CShader ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Texture.cpp electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Texture.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Texture.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Texture.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,21 @@ +#include +#include "base.h" +#include "Log.h" +#include "TextureFlat.h" + +namespace DisplayOutput +{ + +/* +*/ +CTexture::CTexture( const uint32 _flags ) : m_Flags( _flags ) +{ +} + +/* +*/ +CTexture::~CTexture() +{ +} + +} diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/TextureFlat.cpp electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/TextureFlat.cpp --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/TextureFlat.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/TextureFlat.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,27 @@ +#include +#include +#include + +#include "base.h" +#include "Log.h" +#include "MathBase.h" +#include "Exception.h" +#include "DisplayOutput.h" +#include "TextureFlat.h" + +namespace DisplayOutput +{ + +/* +*/ +CTextureFlat::CTextureFlat( const uint32 _flags ) : CTexture( _flags ), m_spImage( NULL ), m_bDirty(false), m_texRect( Base::Math::CRect( 1, 1 ) ) +{ +} + +/* +*/ +CTextureFlat::~CTextureFlat() +{ +} + +} diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/TextureFlat.h electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/TextureFlat.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/TextureFlat.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/TextureFlat.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,48 @@ +#ifndef _TEXTUREFLAT_H +#define _TEXTUREFLAT_H + +#include "Texture.h" +#include "Image.h" +#include "AlignedBuffer.h" + +namespace DisplayOutput +{ + +/* + CTextureFlat. + +*/ +class CTextureFlat : public CTexture +{ + protected: + spCImage m_spImage; + bool m_bDirty; + Base::Math::CRect m_texRect; + Base::spCAlignedBuffer m_bufferCache; + + public: + CTextureFlat( const uint32 _flags = 0 ); + virtual ~CTextureFlat(); + + virtual bool Reupload( void ) { return Upload(m_spImage); }; + virtual bool Upload( spCImage _spImage ) = PureVirtual; + virtual bool Bind( const uint32 _index ) = PureVirtual; + virtual bool Unbind( const uint32 _index ) = PureVirtual; + + virtual bool Dirty( void ) { return m_bDirty; }; + + virtual Base::Math::CRect& GetRect( void ) + { + return m_texRect; + }; + virtual void SetRect( const Base::Math::CRect& _rect ) + { + m_texRect = _rect; + }; +}; + +MakeSmartPointers( CTextureFlat ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Texture.h electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Texture.h --- electricsheep-2.7~b12+svn20091224/DisplayOutput/Renderer/Texture.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/DisplayOutput/Renderer/Texture.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,32 @@ +#ifndef _TEXTURE_H +#define _TEXTURE_H + +#include "base.h" + +namespace DisplayOutput +{ + +/** + CTexture. + +*/ +class CTexture +{ + protected: + uint32 m_Flags; + + public: + CTexture( const uint32 _flags = 0 ); + virtual ~CTexture(); + + virtual bool Bind( const uint32 _index ) = PureVirtual; + virtual bool Unbind( const uint32 _index ) = PureVirtual; + + virtual bool Dirty( void ) { return false; }; +}; + +MakeSmartPointers( CTexture ); + +} + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep.c electricsheep-3.0.2-git20180325/electricsheep.c --- electricsheep-2.7~b12+svn20091224/electricsheep.c 2009-12-24 23:03:01.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,2456 +0,0 @@ -/* - electricsheep - a collaborative screensaver - Copyright (C) 1999-2009 Spotworks LLC - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ - - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "electricsheep.h" -#include "config.h" -#include "getdate.h" -/* for old versions of ubuntu xxx should use autoconf -#include "ffmpeg/avformat.h" -*/ -#include "libavformat/avformat.h" - -#ifdef HAVE_SYS_MOUNT_H -#include -#endif -#ifdef HAVE_SYS_STATVFS_H -#include -#endif -#ifdef HAVE_SYS_VFS_H -#include -#endif - -#ifdef HAVE_SYS_STATVFS_H -#define STATFS statvfs -#else -#define STATFS statfs -#endif - - -prefs_t prefs; - -char *leave_prefix = NULL; - -int min_megabytes = 0; - -/* update cache every 1000 sheep =~ 90 minutes in addition to when new - downloads are found */ -int cache_update_delay = 1000; - -/* wait this long before going to work */ -#if 1 -/* production */ -int init_delay = 300; -int init_delay_list = 30; -int list_freshness = 600; -#else -/* debug */ -int init_delay = 2; -int init_delay_list = 1; -int list_freshness = 60; -#endif - -#define copy_buffer_size 64000 - -double protected_flock_fraction = 0.2; - -int debug = 0; -int stats = 0; - -int nrestarts = 0; -int nplays = 0; -int nloopplays = 0; - -int bracket_begin_id = -1; -int bracket_end_id = -1; - -time_t simulated_time; - -/* bug: perror does not go to the log */ -char *logfile = 0; - -time_t bracket_begin_time = (time_t)(-1); -time_t bracket_end_time = (time_t)(-1); - -int nthreads = -1; - -// cheeze XXX -#define max_cp_size 300000 - -char *vote_prog = "electricsheep-voter"; - -char cps_name[PATH_MAX] = ""; -char jpg_name[PATH_MAX] = ""; -char avi_name[PATH_MAX] = ""; -char fifo_name[PATH_MAX] = ""; - - -typedef struct { - int history_size; - int *path_history; - int last_sheep; - int nrepeated; - int max_repeats; - int reset_fuse; - int reset_fuse_length; -} playback_t; - -playback_t playback; - -AVFormatContext *output_ctx = NULL; - -char *window_id = NULL; -int on_root = 0; -int timeout = 401; -int tryagain = 696; -int get_tryagain = 696; - - -int parasite = 0; -int read_only = 0; - -pid_t displayer_pid = 0; -pid_t downloader_pid = 0; -pid_t decoder_pid = 0; -pid_t ui_pid = 0; - - -FILE *avi_pipe = NULL; - -int current_anim_id = -1; -int start_id = -1; - -int generation = -1; - -#define max_url_length 1000 - -typedef struct { - int generation; - int id; - int deleted; - int readonly; - int type; - time_t mtime; - time_t atime; - double rank; - int nplays; - int size; - int rating; - int first; - int last; - char path[PATH_MAX]; - char url[max_url_length]; -} sheep_t; - -int nserver_sheep, ncached_sheep; -sheep_t *server_sheep = NULL; -sheep_t *cached_sheep = NULL; - -char *thread_name = NULL; - -char monitoraspect[30]; - -void make_display_process(); - -FILE *play_count_file = NULL; -void flush_counts(); -void print_count_standard_deviation(); - -void print_stats() { - fprintf(logout, "nplays = %d, ", nplays); - fprintf(logout, "nloopplays = %d, ", nloopplays); - fprintf(logout, "nrestarts = %d, ", nrestarts); - fprintf(logout, "ncached_sheep = %d\n", ncached_sheep); - if (nplays) - fprintf(logout, "restart_rate = %g\n", nrestarts / (double)nplays); - - print_count_standard_deviation(); -} - -void cleanup() { - if (debug) fprintf(logout, "cleanup.\n"); - - if (debug && !strcmp(thread_name, "display")) - print_stats(); - - if (play_count_file) flush_counts(); - - if (avi_name[0]) unlink(avi_name); - if (cps_name[0]) unlink(cps_name); - if (jpg_name[0]) unlink(jpg_name); - unlink(fifo_name); -} - -void handle_sig_term(int sig) { - if (debug) - fprintf(logout, "handle_sig_term %s %d\n", - (thread_name ? thread_name : "(nyet)"), sig); - - cleanup(); - - /* remove handler to prevent infinite loop */ - signal(SIGTERM, SIG_DFL); - - /* terminate process group, ie self & all children */ - kill(0, SIGTERM); -} - -void cleanup_and_exit(int status) { - if (debug) fprintf(logout, "cleanup_and_exit %d\n", status); - handle_sig_term(0); -} - - - - -/* not fatal if subprocess fails */ -void mysystem2(char *cmd, char *msg) { - int n; - if (0) fprintf(logout, "subprocess; (%s)\n", cmd); - if (0 != (n = interruptable_system(cmd))) { - if (SIGINT != n) - fprintf(logout, "subprocess failure: %s, %d=%d<<8+%d\n", - msg, n, n>>8, n&255); - else - fprintf(logout, "control-c during %s\n", msg); - } -} - -void timestamp(char *prefix) { - time_t t; - prefix = prefix ? prefix : ""; - if (debug) { - time(&t); - fprintf(logout, "time %s %s", prefix, ctime(&t)); - } -} - - - -void print_sheep(char *name, sheep_t *an, int nanims) { - int i; - fprintf(logout, "print_sheep %s=%d\n", name, nanims); - char bb[100]; - for (i = 0; i < nanims; i++) { - strcpy(bb, ctime(&an[i].mtime)); - bb[24] = 0; - fprintf(logout, "[%05d] gen=%d id=%d deleted=%d readonly=%d " - "type=%d mtime=%d atime=%d size=%d rating=%d nplays=%d rank=%g" - "first=%d last=%d path=%s url=%s mtime=%s atime=%s", - i, an[i].generation, - an[i].id, an[i].deleted, an[i].readonly, an[i].type, - (int)an[i].mtime, (int)an[i].atime, an[i].size, - an[i].rating, an[i].nplays, an[i].rank, an[i].first, - an[i].last, an[i].path, an[i].url, bb, ctime(&an[i].atime)); - } -} - -int filename_is_avi(char *name) { - int n = strlen(name); - return !(n <= 4 || 0 != strcmp(&name[n-4], ".avi")); -} - -int filename_is_xxx(char *name) { - int n = strlen(name); - return !(n <= 4 || 0 != strcmp(&name[n-4], ".xxx")); -} - -void touch_file(char *name) { - char tbuf[MAXBUF]; - FILE *touch; - snprintf(tbuf, MAXBUF, "%s%s", leave_prefix, name); - touch = fopen(tbuf, "w"); - if (NULL == touch) { - perror(tbuf); - exit(1); - } - fclose(touch); -} - -int zap_download_marker() { - char dbuf[MAXBUF]; - FILE *mfp; - snprintf(dbuf, MAXBUF, "%s%s", leave_prefix, "downloaded"); - mfp = fopen(dbuf, "r"); - if (NULL == mfp) { - return 0; - } - fclose(mfp); - if (debug) fprintf(logout, "zapping %s\n", dbuf); - unlink(dbuf); - return 1; -} - -int bad_sheep(int idx) { - return - cached_sheep[idx].deleted - || (0 == cached_sheep[idx].size); -} - -void update_cached_sheep_path(char *path) { - DIR *d; - struct dirent *e; - struct stat sbuf; - char fbuf[MAXBUF]; - - if (debug) fprintf(logout, "updating cache path=%s\n", path); - - d = opendir(path); - if (!d) { - perror(path); - cleanup_and_exit(1); - } - while ((e = readdir(d))) { - sheep_t *an = &cached_sheep[ncached_sheep]; - int i; - if (e->d_name[0] == '.') continue; - /* what happens if there's an xxx file and an avi file with the - same name/numbers? */ - if (filename_is_xxx(e->d_name)) { - if (4 != sscanf(e->d_name, "%d=%d=%d=%d.xxx", - &an->generation, &an->id, - &an->first, &an->last)) { - continue; - } - an->deleted = 1; - for (i = 0; i < nserver_sheep; i++) { - if (server_sheep[i].id == an->id) { - break; - } - } - if (i == nserver_sheep && nserver_sheep) { - snprintf(fbuf, MAXBUF, "%s%s", path, e->d_name); - if (debug) - fprintf(logout, "removing marker %s nserver_sheep=%d\n", - fbuf, nserver_sheep); - unlink(fbuf); - rmdir(path); /* cheesy but legal not to test for empty */ - continue; - } - ncached_sheep++; - cached_sheep = realloc(cached_sheep, (1+ncached_sheep)*sizeof(sheep_t)); - continue; - } - - snprintf(fbuf, PATH_MAX, "%s%s", path, e->d_name); - if (-1 == stat(fbuf, &sbuf)) continue; - - if (S_ISDIR(sbuf.st_mode)) { - strncat(fbuf, "/", PATH_MAX); - update_cached_sheep_path(fbuf); - continue; - } - - if (!filename_is_avi(e->d_name)) continue; - - if (4 != sscanf(e->d_name, "%d=%d=%d=%d.avi", - &an->generation, &an->id, &an->first, &an->last)) { - continue; - } - - /* i have a feeling these should also be done in bad_sheep */ - - if ((bracket_begin_id != -1 && an->id < bracket_begin_id) || - (bracket_end_id != -1 && an->id > bracket_end_id)) - continue; - - if ((bracket_begin_time != (time_t)(-1) && - sbuf.st_mtime < bracket_begin_time) || - (bracket_end_time != (time_t)(-1) && - sbuf.st_mtime > bracket_end_time)) - continue; - - an->rating = 0; - for (i = 0; i < nserver_sheep; i++) { - if (server_sheep[i].id == an->id) { - an->rating = server_sheep[i].rating; - break; - } - } - - an->deleted = 0; - an->readonly = !((sbuf.st_mode & S_IWUSR) && - (sbuf.st_uid == getuid())); - an->size = sbuf.st_size; - an->mtime = sbuf.st_mtime; - an->atime = sbuf.st_atime; - an->nplays = 0; - an->url[0] = 0; - an->type = 0; - strncpy(an->path, path, PATH_MAX); - ncached_sheep++; - cached_sheep = realloc(cached_sheep, (1+ncached_sheep)*sizeof(sheep_t)); - } - closedir(d); -} - -#define max_sheep 100000 -#define max_play_count ((1<<16)-1) -#define log_page_size 10 -#define log_count_size (log_page_size-1) -#define play_count_size (1<>log_count_size)) -unsigned short play_counts[max_sheep]; -char play_dirty[n_dirty_bits]; -#define play_write_rate 10 -int changed_count; - -void print_play_counts() { - if (debug) { - int i; - fprintf(logout, "play counts:"); - for (i = 0; i < max_sheep; i++) { - if (play_counts[i]) - fprintf(logout, " %d:%d", i, play_counts[i]); - } - fprintf(logout, "\n"); - } -} - -void play_count_init() { - int nread; - char fn[PATH_MAX]; - - if (debug) fprintf(logout, "play_counts init, thread=%s\n", thread_name); - snprintf(fn, PATH_MAX, "%splay_counts", leave_prefix); - memset(play_counts, 0, max_sheep * sizeof(unsigned short)); - memset(play_dirty, 0, n_dirty_bits); - play_count_file = fopen(fn, "r+b"); - if (NULL == play_count_file) { - if (debug) fprintf(logout, "creating play_counts, thread=%s\n", thread_name); - play_count_file = fopen(fn, "w+b"); - if (NULL == play_count_file) { - perror(fn); - if (debug) fprintf(logout, "running without play_counts\n"); - } - if (max_sheep != fwrite(play_counts, sizeof(unsigned short), - max_sheep, play_count_file)) { - perror(fn); - cleanup_and_exit(1); - } - fflush(play_count_file); - return; - } - nread = fread(play_counts, sizeof(unsigned short), max_sheep, play_count_file); - if (nread < max_sheep) { - perror(fn); - cleanup_and_exit(1); - } - changed_count = 0; - print_play_counts(); -} - -void flush_counts() { - int i; - if (debug) fprintf(logout, "writing play counts\n"); - for (i = 0; i < n_dirty_bits; i++) { - if (play_dirty[i]) { - if (debug) fprintf(logout, "writing dirty page %d\n", i); - if (0 != fseek(play_count_file, - i * (1 << log_page_size), SEEK_SET)) { - fprintf(logout, "error seeking play counts, dismissing.\n"); - perror("fseek"); - fclose(play_count_file); - play_count_file = NULL; - return; - } - if (play_count_size != - fwrite(play_counts + i * play_count_size, - sizeof(unsigned short), - play_count_size, play_count_file)) { - fprintf(logout, "error writing play counts, dismissing.\n"); - perror("fwrite"); - fclose(play_count_file); - play_count_file = NULL; - return; - } - fflush(play_count_file); - play_dirty[i] = 0; - } - } -} - -void play_count(int idx) { - if (NULL == play_count_file) return; - if (play_counts[idx] < max_play_count) { - int z = ++play_counts[idx]; - if (debug) fprintf(logout, "bumped %d to %d, page=%d\n", idx, z, - idx>>log_count_size); - } else { - if (debug) fprintf(logout, "ntbumped %d\n", idx); - } - play_dirty[idx>>log_count_size] = 1; - changed_count++; - if (changed_count < 4 || (0 == changed_count%play_write_rate)) - flush_counts(); -} - -void print_count_standard_deviation() { - int i; - double n = 0.0, s = 0.0, ss = 0.0, t, sd; - for (i = 0; i < ncached_sheep; i++) { - if (bad_sheep(i)) continue; - n += 1.0; - t = (double)play_counts[cached_sheep[i].id]; - s += t; - ss += t*t; - } - if (0.0 == n) { - fprintf(logout, "count standard deviation undefined\n"); - return; - } - t = s / n; - sd = sqrt(ss/n - t*t); - fprintf(logout, "count standard deviation = %g, n = %g\n", sd, n); - fprintf(logout, "count average = %g\n", t); -} - -int compare_ints(const void *p1, const void *p2) { - int a, b; - a = * (int *) p1; - b = * (int *) p2; - if (a < b) return -1; - if (b < a) return 1; - return 0; -} - -void compute_play_ranks(double rank) { - int i, median, n = 0; - int ncheck = 0; - int *tms; - if (debug) { - fprintf(logout, "thread %s compute ranks\n", thread_name); - } - tms = (int *) malloc(ncached_sheep * sizeof(int)); - for (i = 0; i < ncached_sheep; i++) { - if (!bad_sheep(i)) { - tms[n] = play_counts[cached_sheep[i].id]; - if (debug > 1) - fprintf(logout, "n=%d i=%d:%d play_count=%d\n", - n, i, cached_sheep[i].id, tms[n]); - n++; - } - } - if (n < 1) { - if (debug) { - fprintf(logout, "median rank undefined\n"); - } - return; - } - qsort(tms, n, sizeof(int), compare_ints); - if (0 && debug) { - for (i = 0; i < n; i++) - fprintf(logout, "%d %d\n", i, tms[i]); - } - median = tms[(int)(n * rank)]; - if (debug) - fprintf(logout, "median rank %g n = %d plays = %d\n", rank, n, median); - for (i = 0; i < ncached_sheep; i++) { - if (play_counts[cached_sheep[i].id] > median) { - cached_sheep[i].rank = 1.0; - ncheck++; - } else { - cached_sheep[i].rank = 0.0; - } - } - if (debug) - fprintf(logout, "ncheck = %d/%d\n", ncheck, ncached_sheep); - free(tms); -} - -void update_cached_sheep() { - ncached_sheep = 0; - if (NULL == cached_sheep) - cached_sheep = malloc(sizeof(sheep_t)); - update_cached_sheep_path(leave_prefix); - if (debug > 1) { - print_sheep("ncached_sheep", cached_sheep, ncached_sheep); - } - compute_play_ranks(0.8); -} - -static int irandom(int n) { - return random()%n; -} - -void cached_file_name(char *buf, sheep_t *an) { - snprintf(buf, MAXBUF, "%s%05d=%05d=%05d=%05d.avi", - an->path, an->generation, an->id, an->first, an->last); -} - -void deleted_file_name(char *buf, sheep_t *an) { - snprintf(buf, MAXBUF, "%s%05d=%05d=%05d=%05d.xxx", - an->path, an->generation, an->id, an->first, an->last); -} - -int check_for_eddy(playback_t *pb) { - int i, j, c = 0, n = pb->history_size; - if (n > 50) n = 50; - for (i = 0; i < n; i++) { - int diff = 1; - if (-1 == pb->path_history[i]) break; - if (debug > 1) - fprintf(logout, "edd checking %d %d %d\n", c, i, pb->path_history[i]); - for (j = 0; j < i; j++) { - if (pb->path_history[j] == pb->path_history[i]) - diff = 0; - } - c += diff; - if (c <= i/3) { - if (debug) fprintf(logout, "eddy %d/%d\n", c, i); - return 1; - } - } - return 0; -} - -void copy_out_file(char *fname) { - AVOutputFormat *ofmt; - AVFormatContext *ictx; - int input_stream_index; - int j; - struct stat sbuf; - - if (debug) fprintf(logout, "playing %s\n", fname); - - if (-1 == stat(fname, &sbuf)) { - perror(fname); - return; - } - if (0 == sbuf.st_size) { - if (debug) fprintf(logout, "zero %s\n", fname); - return; - } - - if (0 > av_open_input_file(&ictx, fname, NULL, 0, NULL)) { - perror(fname); - exit(1); - } - - if (0 > av_find_stream_info(ictx)) { - fprintf(logout, "%s: could not find codec parameters\n", fname); - exit(1); - } - - input_stream_index = -1; - for (j = 0; j < ictx->nb_streams; j++) { - AVCodecContext *enc = ictx->streams[j]->codec; - if (CODEC_TYPE_VIDEO == enc->codec_type) { - input_stream_index = j; - break; - } - } - if (-1 == input_stream_index) { - fprintf(logout, "%s: no video found\n", fname); - exit(1); - } - - if (NULL == output_ctx) { - AVCodecContext *codec, *icodec; - AVStream *st; - char pipe[20]; - if (1) - sprintf(pipe, "pipe:%d", fileno(avi_pipe)); - else { - strcpy(pipe, "pipe:"); - if (-1 == dup2(fileno(avi_pipe), STDOUT_FILENO)) { - perror("dup2p"); - cleanup_and_exit(1); - } - } - - output_ctx = avformat_alloc_context(); - - ofmt = guess_format(NULL, fname, NULL); - if (!ofmt) { - fprintf(logout, "could not determine format from %s.\n", fname); - exit(1); - } - output_ctx->oformat = ofmt; - - st = av_new_stream(output_ctx, output_ctx->nb_streams); - st->stream_copy = 1; - av_set_parameters(output_ctx, NULL); - - icodec = ictx->streams[input_stream_index]->codec; - codec = output_ctx->streams[0]->codec; - - codec->codec_id = icodec->codec_id; - codec->codec_type = icodec->codec_type; - if(!codec->codec_tag) - codec->codec_tag = icodec->codec_tag; - codec->bit_rate = icodec->bit_rate; - codec->extradata= icodec->extradata; - codec->extradata_size= icodec->extradata_size; - - codec->time_base = icodec->time_base; - codec->width = icodec->width; - codec->height = icodec->height; - codec->has_b_frames = icodec->has_b_frames; - - if (url_fopen(&output_ctx->pb, pipe, URL_WRONLY) < 0) { - fprintf(logout, "Could not open '%s'\n", pipe); - exit(1); - } - - av_write_header(output_ctx); - } - - while (1) { - AVPacket ipkt; - AVPacket opkt; - if (0 > av_read_frame(ictx, &ipkt)) break; - av_init_packet(&opkt); - if (av_parser_change(ictx->streams[input_stream_index]->parser, output_ctx->streams[0]->codec, - &opkt.data, &opkt.size, ipkt.data, ipkt.size, - ipkt.flags & PKT_FLAG_KEY)) - opkt.destruct= av_destruct_packet; - - if (-1 == av_interleaved_write_frame(output_ctx, &opkt)) { - perror("av_interleaved_write_frame"); - exit(1); - } - av_free_packet(&opkt); - av_free_packet(&ipkt); - } - av_close_input_file(ictx); -} - -time_t search_time; -int max_ply; -int *search_history; - -double search_next_sheep(int idx, int ply, int *ret_best_idx) { - int i, j, sym = cached_sheep[idx].last; - int edged = sym != cached_sheep[idx].first; - int gen = cached_sheep[idx].generation; - double try, best, lbest, self; - int best_idx = -1; - int lbest_idx = -1; - int d = search_time - cached_sheep[idx].atime; - - self = (double) d; - - if (debug) - fprintf(logout, "self ply=%d %d=%d\n", ply, idx, cached_sheep[idx].id); - - if (max_ply == ply) { - fprintf(logout, "search_history ="); - for (j = 0; j < ply; j++) - fprintf(logout, " %d:%d", search_history[j], cached_sheep[search_history[j]].id); - fprintf(logout, "\n"); - - if (debug) - fprintf(logout, "return %g\n", self); - return self; - } - - search_history[ply] = idx; - - for (i = 0; i < ncached_sheep; i++) { - if (!cached_sheep[i].deleted && - (cached_sheep[i].generation == gen) && - cached_sheep[i].first == sym) { - if (debug > 1) fprintf(logout, "succ x=%d id=%d\n", i, cached_sheep[i].id); - for (j = 0; j < ply; j++) - if (search_history[j] == idx) { - if (debug > 1) fprintf(logout, "found in history %d\n", j); - break; - } - if (j < ply) { - if (debug > 1) fprintf(logout, "skipping %d\n", j); - continue; - } - try = search_next_sheep(i, ply + 1, NULL); - if (-1 == best_idx || try > best) { - best_idx = i; - best = try; - } - if (cached_sheep[i].first == cached_sheep[i].last) { - if (-1 == lbest_idx || try > lbest) { - lbest_idx = i; - lbest = try; - } - } - } - } - if (edged && lbest_idx >= 0) { - if (debug) - fprintf(logout, "replacing best=%g with lbest=%g lbest_idx=%d\n", best, lbest, lbest_idx); - best = lbest; - best_idx = lbest_idx; - } else if (-1 == best_idx) { - if (debug) - fprintf(logout, "no successor found %g\n", self); - return -1.0; - } - - if (self > best) { - if (debug) - fprintf(logout, "replacing best=%g with self=%g\n", best, self); - best = self; - } - - if (debug) - fprintf(logout, "search best %d=%d %g self=%g ret=%g\n", - best_idx, cached_sheep[best_idx].id, best, self, best); - if (ret_best_idx) *ret_best_idx = best_idx; - return best; -} - -int start_search_next_sheep(int idx) { - int best; - double score; - search_time = time(0); - max_ply = 5; - search_history = malloc(sizeof(int) * max_ply); - score = search_next_sheep(idx, 0, &best); - free(search_history); - if (debug) - fprintf(logout, "finish search best %d=%d %g\n", - best, cached_sheep[best].id, score); - return best; -} - -int play_evenly(int idx) { - double v = irandom(100)/100.0; - int r = v >= cached_sheep[idx].rank * prefs.play_evenly; - if (0) - fprintf(logout, "play_evenly %d %d=%d r=%g v=%g pe=%g\n", - r, idx, cached_sheep[idx].id, cached_sheep[idx].rank, - v, prefs.play_evenly); - return r; -} - -int next_sheep(playback_t *pb, int idx) { - int i, succ = -1; - int lsucc = -1; - int sym = cached_sheep[idx].last; - int edged = sym != cached_sheep[idx].first; - int next_idx; - - if (0 == pb->reset_fuse-- - || pb->nrepeated >= pb->max_repeats - || check_for_eddy(pb)) { - if (debug) fprintf(logout, "reset nrepeated=%d reset_fuse=%d\n", - pb->nrepeated, pb->reset_fuse); - pb->reset_fuse = pb->reset_fuse_length; - if (pb->history_size > 1) pb->path_history[1] = -1; - return -1; - } - - - if (0) { - return start_search_next_sheep(idx); - } - for (i = 0; i < ncached_sheep; i++) { - if (!cached_sheep[i].deleted && - (cached_sheep[i].generation == cached_sheep[idx].generation) && - cached_sheep[i].first == sym) { - - if (!play_evenly(i)) { - if (debug) - fprintf(logout, "suppressed %d=%d\n", i, cached_sheep[i].id); - continue; - } - - if (debug > 1) fprintf(logout, "succ x=%d id=%d\n", i, cached_sheep[i].id); - - if (-1 == succ || - cached_sheep[i].atime < cached_sheep[succ].atime) - succ = i; - - if (cached_sheep[i].first == cached_sheep[i].last) { - - if (-1 == lsucc || - cached_sheep[i].atime < cached_sheep[lsucc].atime) - lsucc = i; - } - } - } - - if (edged && lsucc >= 0) { - next_idx = lsucc; - if (debug) fprintf(logout, "lsuccto %d\n", cached_sheep[next_idx].id); - } else if (succ >= 0) { - next_idx = succ; - if (debug) fprintf(logout, "esuccto %d\n", cached_sheep[next_idx].id); - } else { - if (debug) fprintf(logout, "no succ\n"); - next_idx = -1; - } - - return next_idx; -} - -int start_sheep() { - int idx = -1; - if (read_only) { - /* random sheep. read_only generally means we have started more - than one client, like for multiple screens, and we don't want to - play the same sheep sequence on each screen. */ - do { - idx = irandom(ncached_sheep); - if (debug) fprintf(logout, "idx=%d ncached_sheep=%d random\n", idx, ncached_sheep); - } while (bad_sheep(idx)); - } else { - int i; - /* least recently accessed sheep */ - time_t best_atime = -1; - for (i = 0; i < ncached_sheep; i++) { - if (!bad_sheep(i) && - (-1 == best_atime - || cached_sheep[i].atime < best_atime)) { - best_atime = cached_sheep[i].atime; - idx = i; - } - } - } - if (debug) - fprintf(logout, "idx=%d ncached_sheep=%d best_atime\n", idx, ncached_sheep); - return idx; -} - -void play_update_history(playback_t *pb, int id) { - int h; - for (h = pb->history_size - 1; h > 0; h--) { - pb->path_history[h] = pb->path_history[h-1]; - } - pb->path_history[0] = id; - - if (debug > 1) { - fprintf(logout, "history ="); - for (h = 0; h < pb->history_size; h++) { - if (-1 == pb->path_history[h]) - break; - else - fprintf(logout, " %d", pb->path_history[h]); - } - fprintf(logout, "\n"); - } - - if (pb->last_sheep == id) - pb->nrepeated++; - else - pb->nrepeated = 0; - pb->last_sheep = id; -} - - - - -/* traverse the graph of sheep, and concatenates the avi files into stdin - of the child. another process decodes the avi and displays it on - the screen. */ -void do_display() { - int i; - int idx, nidx; - int niters; - char fbuf[MAXBUF]; - - - if (start_id >= 0) { - current_anim_id = start_id; - start_id = -1; - } - - idx = -1; - if (-1 != current_anim_id) { - for (i = 0; i < ncached_sheep; i++) { - if (!cached_sheep[i].deleted && - cached_sheep[i].id == current_anim_id) { - idx = i; - break; - } - } - } - - if (idx != -1 && bad_sheep(idx)) idx = -1; - - /* XXX this could spin if there there are only bad sheep? */ - while (-1 == idx) { - int n = 0; - for (i = 0; i < ncached_sheep; i++) { - if (!bad_sheep(i)) n++; - } - if (0 == n) { - /* XXX danger of burn-in from static video in case server is never reached */ - /* conflicts with -cache 8192 option to mplayer */ - // copy_out_file(PACKAGE_DATA_DIR "/electricsheep-wait.avi"); - sleep(2); - update_cached_sheep(); - fprintf(stderr, "downloading sheep, please wait...\n"); - return; - } - idx = start_sheep(); - - if (-1 == idx) { - if (debug) fprintf(logout, "failed to find new anim!\n"); - } else { - current_anim_id = cached_sheep[idx].id; - if (debug) fprintf(logout, "found new anim id=%d.\n", current_anim_id); - } - } - - if (cached_sheep[idx].first == cached_sheep[idx].last) { - niters = prefs.nrepeats; - } else { - niters = 1; - } - - if (1) { - // play an anim - int i; - time_t now; - - if (debug) fprintf(logout, "play anim x=%d id=%d iters=%d path=%s\n", - idx, current_anim_id, niters, - cached_sheep[idx].path); - if (stats) print_stats(); - - nplays++; - if (cached_sheep[idx].first == cached_sheep[idx].last) { - nloopplays++; - } - - now = cached_sheep[idx].atime = time(0); - - play_count(current_anim_id); - - play_update_history(&playback, current_anim_id); - - cached_file_name(fbuf, &cached_sheep[idx]); - - /* since relatime is default, explicitly set atime */ - if (1) { - struct utimbuf tbuf; - struct stat sbuf; - if (-1 == stat(fbuf, &sbuf)) { - fprintf(logout, "utime prestat error: "); - perror(fbuf); - } - tbuf.actime = now; - tbuf.modtime = sbuf.st_mtime; - if (-1 == utime(fbuf, &tbuf)) { - if (debug) { - fprintf(logout, "utime error: "); - perror(fbuf); - } - } - if (debug) fprintf(logout, "set atime of %d to %u\n", - idx, (unsigned)now); - } - - for (i = 0; i < niters; i++) - copy_out_file(fbuf); - } - - nidx = next_sheep(&playback, idx); - if (-1 == nidx) { - nrestarts++; - current_anim_id = -1; - } else { - current_anim_id = cached_sheep[nidx].id; - } - -} - -int cache_overflow(double bytes) { - struct STATFS buf; - int result; - - if (-1 == STATFS(leave_prefix, &buf)) { - perror(leave_prefix); - cleanup_and_exit(1); - } - - /* use of min_megabytes means if another process fills the disk, - the sheep will sacrifice themselves to try to keep open space. - good? maybe this criterion should only apply if downloading - is unlimited */ - result = (prefs.cache_size && - (bytes > (1024.0 * 1024 * prefs.cache_size))) || - (min_megabytes && - ((buf.f_bavail * (double) buf.f_bsize) < - (min_megabytes * 1024.0 * 1024))); - if (debug > 1) - fprintf(logout, "cache_overflow(%g)=%d\n", bytes, result); - return result; -} - -double cache_used() { - double total = 0; - int i; - for (i = 0; i < ncached_sheep; i++) { - if (cached_sheep[i].deleted || - cached_sheep[i].readonly) continue; - if (debug > 1) - fprintf(logout, "summing total=%g id=%d rating=%d\n", - total, cached_sheep[i].id, cached_sheep[i].rating); - - total += cached_sheep[i].size; - } - return total; -} - -int compare_times(const void *p1, const void *p2) { - time_t a, b; - a = * (time_t *) p1; - b = * (time_t *) p2; - if (a < b) return -1; - if (b < a) return 1; - return 0; -} - -time_t median_mtime(double rank) { - int i, n = 0; - time_t *tms; - time_t median; - if (0 == ncached_sheep) { - if (debug) fprintf(logout, "median of no sheep error\n"); - return -1; - } - tms = (time_t *) malloc(ncached_sheep * sizeof(time_t)); - for (i = 0; i < ncached_sheep; i++) { - if (!bad_sheep(i)) - tms[n++] = cached_sheep[i].mtime; - } - qsort(tms, n, sizeof(time_t), compare_times); - if (debug > 1) { - fprintf(logout, "median sort %d\n", n); - for (i = 0; i < n; i++) - fprintf(logout, "%d %u %s", i, (unsigned)tms[i], ctime(&tms[i])); - } - median = tms[(int)(n * rank)]; - free(tms); - if (debug) fprintf(logout, "median = %u = %s", - (unsigned)median, ctime(&median)); - return median; -} - -/* choose a sheep to kill */ -int reap_sheep() { - int best = -1; - if (0 && irandom(2)) { - /* of the sheep with the lowest rating, pick the oldest */ - time_t oldest_time = 0; - int worst_rating = 0; - int i; - - if (debug) fprintf(logout, "deleting lowest/oldest\n"); - - for (i = 0; i < ncached_sheep; i++) { - if (cached_sheep[i].deleted || cached_sheep[i].readonly) continue; - - if (!oldest_time || - (cached_sheep[i].rating < worst_rating) || - ((cached_sheep[i].rating == worst_rating) && - (cached_sheep[i].mtime < oldest_time))) { - best = i; - oldest_time = cached_sheep[i].mtime; - worst_rating = cached_sheep[i].rating; - } - } - } else if (1) { - /* use the play counts to delete most played sheep */ - int i; - time_t med; - if (debug) fprintf(logout, "deleting highest play count\n"); - - med = median_mtime(1.0 - protected_flock_fraction); - for (i = 0; i < ncached_sheep; i++) { - if (cached_sheep[i].deleted || cached_sheep[i].readonly) continue; - if (cached_sheep[i].mtime > med) continue; - if (best < 0 || - (play_counts[cached_sheep[i].id] > - play_counts[cached_sheep[best].id])) { - best = i; - } - } - } else { - /* of the sheep with the lowest rating AND creation times - older than media, pick the most commonly played - as estimated by simulation */ - int max_plays = 0; - int worst_rating = 0; - int h, i, idx; - time_t med; - - playback_t search = playback; - - search.path_history = malloc(sizeof(int) * search.history_size); - for (h = 0; h < search.history_size; h++) - search.path_history[h] = -1; - - if (debug) fprintf(logout, "begin histogram\n"); - for (i = 0; i < ncached_sheep; i++) { - cached_sheep[i].nplays = 0; - } - /* newest 20 percent are protected */ - med = median_mtime(1.0 - protected_flock_fraction); - - idx = -1; - for (i = 0; i < 10000; i++) { - if (idx >= 0) { - int nm = cached_sheep[idx].nplays++; - int id = cached_sheep[idx].id; - cached_sheep[idx].atime = simulated_time++; - if (debug) fprintf(logout, "simulating %d nplays %d\n", id, nm); - - /* check readonly too */ - if (cached_sheep[idx].mtime <= med) { - if (!max_plays || - (cached_sheep[idx].rating < worst_rating) || - ((cached_sheep[idx].rating == worst_rating) && - (nm > max_plays))) { - best = idx; - max_plays = nm; - worst_rating = cached_sheep[idx].rating; - if (debug) - fprintf(logout, "best=%d plays=%d rating=%d\n", - cached_sheep[best].id, max_plays, - worst_rating); - } - } - - play_update_history(&search, id); - idx = next_sheep(&search, idx); - } else { - idx = start_sheep(); - } - } - - if (debug > 1) - print_sheep("hist", cached_sheep, ncached_sheep); - - /* what if best hasn't been set? XXX */ - if (debug) fprintf(logout, "end histogram best=%d plays=%d\n", - cached_sheep[best].id, max_plays); - - free(search.path_history); - } - return best; -} - -void delete_sheep(int idx); - -void delete_terminals_recursively(int idx) { - int i, id = cached_sheep[idx].id; - int first = cached_sheep[idx].first; - int last = cached_sheep[idx].last; - int nfirst = 0, nlast = 0; - if (debug) fprintf(logout, "delete terminals id=%d first=%d last=%d\n", id, first, last); - for (i = 0; i < ncached_sheep; i++) { - if (cached_sheep[i].deleted) continue; - if (cached_sheep[i].first == first) { - nfirst++; - if (debug) fprintf(logout, "found first %d\n", cached_sheep[i].id); - } - if (cached_sheep[i].last == last) { - nlast++; - if (debug) fprintf(logout, "found last %d\n", cached_sheep[i].id); - } - if (nfirst && nlast) { - if (debug) fprintf(logout, "delete terminals none needed\n"); - return; - } - } - if (!nfirst) { - for (i = 0; i < ncached_sheep; i++) { - if (cached_sheep[i].deleted) continue; - if (cached_sheep[i].last == first) { - if (debug) fprintf(logout, "got0 %d\n", cached_sheep[i].id); - delete_sheep(i); - } - } - } - if (!nlast) { - for (i = 0; i < ncached_sheep; i++) { - if (cached_sheep[i].deleted) continue; - if (cached_sheep[i].first == last) { - if (debug) fprintf(logout, "got1 %d\n", cached_sheep[i].id); - delete_sheep(i); - } - } - } - if (debug) fprintf(logout, "delete terminals done\n"); -} - -void delete_sheep(int idx) { - int fd; - char buf[MAXBUF]; - - cached_file_name(buf, &cached_sheep[idx]); - if (debug) fprintf(logout, "deleting %s\n", buf); - cached_sheep[idx].deleted = 1; - - delete_terminals_recursively(idx); - - if (-1 == unlink(buf)) { - perror(buf); - return; - } - deleted_file_name(buf, &cached_sheep[idx]); - if (-1 == (fd = creat(buf, S_IRUSR|S_IWUSR))) { - perror(buf); - exit(1); - } - close(fd); -} - -/* make enough room in cache to download SIZE more bytes */ -void delete_cached(int size) { - double total; - if (debug) fprintf(logout, "begin delete cached %d\n", size); - - /* XXX loop? */ - while (ncached_sheep) { - total = size + cache_used(); - if (cache_overflow(total)) { - if (debug) fprintf(logout, "cache overflow %g\n", total); - int best = reap_sheep(); - if (best >= 0 && cache_overflow(total)) { - delete_sheep(best); - } - } else - return; - } - if (debug) fprintf(logout, "nothing cached\n"); -} - -void download_anim(int idx) { - char pbuf[MAXBUF]; - char tfb[MAXBUF]; - char cfb[MAXBUF]; - struct stat sbuf; - - if (debug) fprintf(logout, "download %d id=%d\n", idx, server_sheep[idx].id); - - cached_file_name(cfb, &server_sheep[idx]); - snprintf(tfb, MAXBUF, "%s.tmp", cfb); - strcpy(avi_name, tfb); - - snprintf(pbuf, MAXBUF, "%s --output %s %s", - curl_cmd, tfb, server_sheep[idx].url); - - if (debug) fprintf(logout, "about to %s\n", pbuf); - - mysystem(pbuf, "anim download"); - - if (-1 == stat(tfb, &sbuf)) { - if (!prefs.hide_errors) - fprintf(logout, "download failed of sheep %d\n", - server_sheep[idx].id); - unlink(tfb); - avi_name[0] = 0; - sleep(tryagain); - return; - } - if (sbuf.st_size != server_sheep[idx].size) { - - if (debug) - fprintf(logout, "deleted incomplete sheep id=%d got=%ld want=%ld\n", - server_sheep[idx].id, (long)sbuf.st_size, - (long)server_sheep[idx].size); - - unlink(tfb); - avi_name[0] = 0; - sleep(tryagain); - return; - } - - if (-1 == rename(tfb, cfb)) { - perror("move download temp to cache"); - fprintf(logout, "move %s to %s\n", tfb, cfb); - cleanup_and_exit(1); - } - avi_name[0] = 0; - if (debug) fprintf(logout, "download complete %d id=%d\n", - idx, server_sheep[idx].id); - touch_file("downloaded"); -} - -void -get_control_points(char *buf, int buf_size) { - int n; - char pbuf[MAXBUF]; - FILE *cp; - - snprintf(pbuf, MAXBUF, "%s 'http://%s/cgi/get?" - "n=%s&w=%s&v=%s&u=%s&r=%.3g&c=%.3g' | gunzip -c %s", - curl_cmd, server, nick_buf, - url_buf, client_version, prefs.uid, 1.0, 1.0, - hide_stderr); - - if (debug) fprintf(logout, "get_control_points %s\n", pbuf); - - cp = popen(pbuf, "r"); - - if (NULL == cp) { - perror("could not fork/pipe\n"); - cleanup_and_exit(1); - } - - while ((n = fread(buf, 1, buf_size, cp))) { - buf += n; - buf_size -= n; - if (1 >= buf_size) { - fprintf(logout, "cp buffer overflow - the server is spamming me!\n"); - cleanup_and_exit(1); - } - } - *buf = 0; /* null terminate */ - - if (ferror(cp)) { - perror("get pipe error\n"); - cleanup_and_exit(1); - } - - if (-1 == pclose(cp)) { - perror("pclose of get failed\n"); - cleanup_and_exit(1); - } -} - -void -put_image(char *fname, int job, int anim_id, int gen) { - char pbuf[MAXBUF]; - struct stat sbuf; - - if (-1 == stat(fname, &sbuf)) { - perror(fname); - cleanup_and_exit(1); - } - - snprintf(pbuf, MAXBUF, "%s --upload-file %s " - "'http://%s/cgi/put?j=%d&id=%d&s=%ld&g=%d&v=%s&u=%s'", - curl_cmd, fname, server, job, anim_id, - (long)sbuf.st_size, gen, client_version, prefs.uid); - if (debug) fprintf(logout, "about to put %s\n", pbuf); - mysystem(pbuf, "put image"); -} - -int get_gen; -int get_id; -int get_job; - -int got_sheep = 0; - - -void -get_start_element(void *userData, const char *name, const char **atts) { - int i = 0; - if (!strcmp("get", name)) { - while (atts[i]) { - const char *a = atts[i+1]; - if (!strcmp(atts[i], "gen")) { - get_gen = atoi(a); - } else if (!strcmp(atts[i], "id")) { - get_id = atoi(a); - } else if (!strcmp(atts[i], "job")) { - get_job = atoi(a); - } else if (!strcmp(atts[i], "retry")) { - get_tryagain = atoi(atts[i+1]); - if (get_tryagain <= 0) { - fprintf(logout, "get_tryagain must be positive.\n"); - cleanup_and_exit(1); - } - } - i += 2; - } - } else if (!strcmp("args", name)) { - while (atts[i]) { - const char *a = atts[i+1]; - if (strlen(atts[i]) < 32 && - strlen(a) < 256) { - if (setenv(atts[i], a, 1)) { - perror("setenv"); - cleanup_and_exit(1); - } - } else { - fprintf(logout, "oversized envar %s=%s.\n", atts[i], a); - cleanup_and_exit(1); - } - i += 2; - } - } else if (!strcmp("message", name)) { - in_message = 1; - } else if (!strcmp("flame", name)) { - got_sheep = 1; - } else if (!strcmp("error", name)) { - server_error = 1; - while (atts[i]) { - if (!strcmp(atts[i], "type")) { - strncpy(server_error_type, atts[i+1], MAXBUF); - } - i += 2; - } - } -} - -void do_render() { - char sheep_text[max_cp_size]; - char *cp_text; - int cps_fd, jpg_fd; - XML_Parser parser; - - timestamp("do_render"); - - get_control_points(sheep_text, max_cp_size); - - if (0 == sheep_text[0]) { - if (!prefs.hide_errors) - fprintf(logout, - "lost contact with %s, cannot render frames.\n", - server); - sleep(tryagain); - return; - } - - get_gen = get_id = get_job = -1; - - parser = XML_ParserCreate(NULL); - XML_SetElementHandler(parser, get_start_element, get_end_element); - XML_SetCharacterDataHandler(parser, character_handler); - in_message = 0; - server_error = 0; - got_sheep = 0; - if (!XML_Parse(parser, sheep_text, strlen(sheep_text), 1)) { - fprintf(logout, "%s at line %u\n", - XML_ErrorString(XML_GetErrorCode(parser)), - (unsigned)XML_GetCurrentLineNumber(parser)); - XML_ParserFree(parser); - fputs(sheep_text, logout); - sleep(get_tryagain); - return; - } - XML_ParserFree(parser); - if (server_error) { - fprintf(logout, "server reported error for get: %s\n", - server_error_type); - sleep(get_tryagain); - return; - } - if (!got_sheep) { - if (debug) fprintf(logout, "nothing to render, will try again later.\n"); - sleep(get_tryagain); - return; - } - - cp_text = sheep_text; - - strcpy(cps_name, "/tmp/electricsheep.cps.XXXXXX"); - cps_fd = mkstemp(cps_name); - - if (strlen(cp_text) != write(cps_fd, cp_text, strlen(cp_text))) { - perror(cps_name); - cleanup_and_exit(1); - } - - strcpy(jpg_name, "/tmp/electricsheep.XXXXXX"); - jpg_fd = mkstemp(jpg_name); - - { - char b[MAXBUF]; - snprintf(b, MAXBUF, "nice -n %d env verbose=0 nthreads=1 in=%s out=%s flam3-animate", - nice_level, cps_name, jpg_name); - if (debug) fprintf(logout, "about to render %s\n", b); - if (mysystem(b, "render")) { - if (debug) fprintf(logout, "render failed, trying again later\n"); - unlink(jpg_name); - jpg_name[0] = 0; - close(jpg_fd); - unlink(cps_name); - cps_name[0] = 0; - close(cps_fd); - sleep(tryagain); - return; - } - } - - put_image(jpg_name, get_job, get_id, get_gen); - - close(cps_fd); - close(jpg_fd); - - /* hm should we close after unlink? */ - - if (prefs.save_frames) { - /* Copy frame to the leave_prefix area with the proper extension */ - char b[MAXBUF]; - char *imtype; - - imtype = getenv("format"); - snprintf(b, MAXBUF, "cp %s %s/%d.%05d.%05d.%s", - jpg_name, leave_prefix, get_gen, get_id, get_job, imtype?imtype:"png"); - - if (debug) fprintf(logout, "copying image to save dir\n"); - if (mysystem(b, "copyimage")) { - if (debug) fprintf(logout, "copy image failed. skipping.\n"); - } - } - - if (unlink(jpg_name)) { - perror(jpg_name); - cleanup_and_exit(1); - } - jpg_name[0] = 0; - if (unlink(cps_name)) { - perror(cps_name); - cleanup_and_exit(1); - } - cps_name[0] = 0; -} - -void -list_start_element(void *userData, const char *name, const char **atts) { - int i = 0; - if (!strcmp("list", name)) { - while (atts[i]) { - if (!strcmp(atts[i], "gen")) { - generation = atoi(atts[i+1]); - if (generation <= 0) { - fprintf(logout, "generation must be positive.\n"); - cleanup_and_exit(1); - } - } else if (!strcmp(atts[i], "retry")) { - tryagain = atoi(atts[i+1]); - if (tryagain <= 0) { - fprintf(logout, "tryagain must be positive.\n"); - cleanup_and_exit(1); - } - } - i += 2; - } - } else if (!strcmp("sheep", name)) { - sheep_t *an = &server_sheep[nserver_sheep]; - const char *state = NULL; - if (-1 == generation) { - fprintf(logout, "malformed list. " - "received sheep without generation set.\n"); - cleanup_and_exit(1); - } - memset(an, 0, sizeof(sheep_t)); - an->generation = generation; - an->rank = 0.0; - strncpy(an->path, leave_prefix, PATH_MAX); - while (atts[i]) { - const char *a = atts[i+1]; - if (!strcmp(atts[i], "id")) { - an->id = atoi(a); - } else if (!strcmp(atts[i], "type")) { - an->type = atoi(a); - } else if (!strcmp(atts[i], "time")) { - an->mtime = (time_t) atoi(a); - } else if (!strcmp(atts[i], "size")) { - an->size = atoi(a); - } else if (!strcmp(atts[i], "rating")) { - an->rating = atoi(a); - } else if (!strcmp(atts[i], "first")) { - an->first = atoi(a); - } else if (!strcmp(atts[i], "last")) { - an->last = atoi(a); - } else if (!strcmp(atts[i], "state")) { - state = a; - } else if (!strcmp(atts[i], "url")) { - strncpy(an->url, a, max_url_length); - an->url[max_url_length-1] = 0; - } - i += 2; - } - if (!strcmp(state, "done") && (0 == an->type)) { - nserver_sheep++; - server_sheep = realloc(server_sheep, (1+nserver_sheep) * sizeof(sheep_t)); - } else if (!strcmp(state, "expunge")) { - char buf[MAXBUF]; - if (debug) fprintf(logout, "expunging id=%d.\n", an->id); - cached_file_name(buf, an); - // ok to fail - unlink(buf); - } - } else if (!strcmp("message", name)) { - in_message = 1; - } else if (!strcmp("error", name)) { - server_error = 1; - while (atts[i]) { - if (!strcmp(atts[i], "type")) { - strncpy(server_error_type, atts[i+1], MAXBUF); - } - i += 2; - } - } -} - -time_t server_sheep_timestamp = -1; - -void update_server_sheep() { - char pbuf[MAXBUF]; - FILE *lf; - int done; - XML_Parser parser; - - if (-1 == server_sheep_timestamp) - server_sheep_timestamp = time(0); - else { - time_t now = time(0); - if ((now - server_sheep_timestamp) < list_freshness) { - if (debug) fprintf(logout, "skipping cgi/list\n"); - return; - } - server_sheep_timestamp = now; - } - - parser = XML_ParserCreate(NULL); - XML_SetElementHandler(parser, list_start_element, get_end_element); - XML_SetCharacterDataHandler(parser, character_handler); - in_message = 0; - server_error = 0; - - init_list_cmd(pbuf); - - if (debug) fprintf(logout, "list %s\n", pbuf); - - lf = popen(pbuf, "r"); - - if (NULL == lf) { - perror("could not fork/pipe\n"); - cleanup_and_exit(1); - } - - nserver_sheep = 0; - if (NULL == server_sheep) - server_sheep = malloc(sizeof(sheep_t)); - - generation = -1; - - do { - size_t len = fread(pbuf, 1, MAXBUF, lf); - done = len < MAXBUF; - if (0 == len) { - // lost contact, no data to parse - break; - } - if (!XML_Parse(parser, pbuf, len, done)) { - fprintf(logout, "%s at line %u\n", - XML_ErrorString(XML_GetErrorCode(parser)), - (unsigned)XML_GetCurrentLineNumber(parser)); - break; - } - if (debug > 1) fprintf(logout, "list read loop len=%d\n", len); - } while (!done); - XML_ParserFree(parser); - - pclose(lf); - - if (server_error) { - fprintf(logout, - "server reported error for list: %s\n", - server_error_type); - sleep(tryagain); - return; - } - - if (-1 == generation) { - if (!prefs.hide_errors) - fprintf(logout, - "lost contact with %s, cannot retrieve sheep.\n", - server); - sleep(tryagain); - return; - } - if (debug) fprintf(logout, "update_server_sheep done\n"); -} - - - - -/* download anims, delete old anims, update cache */ -void -do_http_download() { - int i, j; - int best_rating; - time_t best_mtime = 0; - int best_anim = -1; - - timestamp("do_http_download"); - - update_server_sheep(); - - if (debug > 1) { - print_sheep("nserver_sheep", server_sheep, nserver_sheep); - } else if (debug) { - fprintf(logout, "nserver_sheep=%d\n", nserver_sheep); - } - update_cached_sheep(); - if (debug) { - fprintf(logout, "ncached_sheep=%d\n", ncached_sheep); - } - - for (i = 0; i < nserver_sheep; i++) { - for (j = 0; j < ncached_sheep; j++) { - if (server_sheep[i].id == cached_sheep[j].id) - break; - } - if ((j == ncached_sheep) && - !cache_overflow((double)server_sheep[i].size)) { - /* anim on the server fits in cache but is not in cache */ - if (best_mtime == 0 || - (server_sheep[i].rating > best_rating) || - (server_sheep[i].rating == best_rating && - server_sheep[i].mtime < best_mtime)) { - best_rating = server_sheep[i].rating; - best_mtime = server_sheep[i].mtime; - best_anim = i; - } - } - } - if (-1 != best_anim) { - if (debug) - fprintf(logout, "best_anim=%d best_anim_id=%d " - "best_rating=%d best_mtime=%d\n", - best_anim, server_sheep[best_anim].id, - best_rating, (int)best_mtime); - delete_cached(server_sheep[best_anim].size); - download_anim(best_anim); - } else { - if (debug) fprintf(logout, "nothing to download, sleeping for %d.\n", tryagain); - sleep(tryagain); - } -} - -void make_download_process() { - - if (-1 == (downloader_pid = fork())) - perror("downloader fork"); - else if (0 == downloader_pid) { - /* child */ -#ifdef HAVE_SETPROCTITLE - setproctitle("download"); -#endif - thread_name = "download"; - if (ncached_sheep > 2) { - sleep(init_delay_list); - } - init_curl_cmd(1); - while (1) { - do_http_download(); - } - } - /* parent returns */ -} - -void make_render_process() { - pid_t p; - - sleep(init_delay); - - while (nthreads-- > 1) { - if (-1 == (p = fork())) - perror("render fork"); - else if (0 == p) { - break; - } - sleep(10); - } - - if (debug) fprintf(logout, "entering render loop %d\n", nthreads); -#ifdef HAVE_SETPROCTITLE - setproctitle("render #%d", nthreads); -#endif - thread_name = "render"; - while (1) { - do_render(); - } -} - -/* fork off two processes, one to traverse the graph of sheep, and the - other to decode and display them. the two are connected by - pipes. the decoder is an external program that we just exec. */ - -void -make_display_process() { - int h; - int cnt; - pid_t generator_pid; - for (h = 0; h < playback.history_size; h++) - playback.path_history[h] = -1; - - if (-1 == (displayer_pid = fork())) - perror("displayer fork"); - else if (0 == displayer_pid) { - /* child */ - int pipe_fds[2]; - char fps[25]; - if (-1 == pipe(pipe_fds)) { - perror("pipe1"); - cleanup_and_exit(1); - } - if (-1 == (decoder_pid = fork())) { - perror("decoder fork"); - } else if (0 == decoder_pid) { - char *argv[25]; - int c = 0; - /* child */ - snprintf(fps, 24, "%g", prefs.frame_rate); - if (1) { - int devnull = open("/dev/null", O_WRONLY); - if (-1 == devnull) { - perror("/dev/null"); - cleanup_and_exit(1); - } - if (-1 == dup2(devnull, STDOUT_FILENO)) { - perror("dup2a"); - cleanup_and_exit(1); - } - if (-1 == dup2(devnull, STDERR_FILENO)) { - perror("dup2b"); - cleanup_and_exit(1); - } - argv[c++] = "mplayer"; - argv[c++] = "-nolirc"; - argv[c++] = "-cache"; - argv[c++] = "8192"; - argv[c++] = "-really-quiet"; - if (window_id) { - argv[c++] = "-monitoraspect"; - argv[c++] = monitoraspect; - } - argv[c++] = "-fps"; - argv[c++] = fps; - if (prefs.video_driver && prefs.video_driver[0]) { - argv[c++] = "-vo"; - argv[c++] = prefs.video_driver; - } - if (NULL != window_id) { - argv[c++] = "-wid"; - argv[c++] = window_id; - argv[c++] = "-nostop-xscreensaver"; - } else if (on_root) { - argv[c++] = "-rootwin"; - argv[c++] = "-nostop-xscreensaver"; - } - argv[c++] = "-"; - argv[c++] = NULL; - - } - if (0) { - int i; - fprintf(logout, "decoder execvp "); - for (i = 0; i < c-1; i++) { - fprintf(logout, "%s ", argv[i]); - } - fprintf(logout, "\n"); - } - if (-1 == dup2(pipe_fds[0], STDIN_FILENO)) { - perror("decoder child dup2 1"); - cleanup_and_exit(1); - } - /* for some reason this makes it start more reliably */ - usleep(300000); - execvp("mplayer", argv); - perror("mplayer"); - cleanup_and_exit(1); - } else { -#ifdef HAVE_SETPROCTITLE - setproctitle("display"); -#endif - thread_name = "display"; - avi_pipe = fdopen(pipe_fds[1], "w"); - if (NULL == avi_pipe) { - perror("fdopen 1"); - cleanup_and_exit(1); - } - - if ((generator_pid=fork())==0) { - - update_cached_sheep(); - cnt = 0; - av_register_all(); - while (1) { - timestamp("display loop"); - do_display(); - if (!prefs.standalone && (zap_download_marker() || - !(++cnt%cache_update_delay))) { - update_cached_sheep(); - } else if (debug) { - fprintf(logout, "skipping update cache %d/%d\n", - cnt, cache_update_delay); - } - } - /* child never gets here */ - } else { - /* wait end of decoder pid (kill window, e.g. screensaver stop on KDE) */ - thread_name = "waiter"; - if (-1 == waitpid(decoder_pid, 0, 0)) { - perror("waitpid decoder_pid"); - exit(1); - } - /* XXX SIGTERM too harsh. should exit without error. */ - cleanup_and_exit(1); - } - - } - } - /* parent returns */ -} - -/* set the number of threads by reading /proc/cpuinfo */ -void -auto_nthreads() { -#ifndef _SC_NPROCESSORS_ONLN - char line[MAXBUF]; - FILE *f = fopen("/proc/cpuinfo", "r"); - if (NULL == f) goto def; - nthreads = 0; - while (fgets(line, MAXBUF, f)) { - if (!strncmp("processor\t:", line, 11)) - nthreads++; - } - fclose(f); - if (nthreads < 1) goto def; - return; - def: - fprintf(logout, - "could not read /proc/cpuinfo, using one render thread.\n"); - nthreads = 1; -#else - nthreads = sysconf(_SC_NPROCESSORS_ONLN); - if (nthreads < 1) nthreads = 1; -#endif -} - -void parse_bracket(char *arg, int *bracket_id, time_t *bracket_time) { - int i, id, n; - if (0 == arg || 0 == arg[0]) return; - n = strlen(arg); - for (i = 0; i < n; i++) { - if (!isdigit(arg[i])) { - if (-1 == (*bracket_time = get_date(arg, NULL))) { - fprintf(logout, "warning: badly formatted date ignored: %s\n", arg); - } - return; - } - } - if (1 == sscanf(arg, "%d", &id)) { - *bracket_id = id; - return; - } - fprintf(logout, "bad conversion of %s\n", arg); -} - -#define iarg(oname, vname) \ -if (!strcmp(oname, o)) { \ - if (*argc > 2) \ - vname = atoi((*argv)[2]); \ - else goto fail; \ - (*argc)-=2; \ - (*argv)+=2; \ - } - -#define darg(oname, vname) \ -if (!strcmp(oname, o)) { \ - if (*argc > 2) \ - vname = atof((*argv)[2]); \ - else goto fail; \ - (*argc)-=2; \ - (*argv)+=2; \ - } - -#define sarg(oname, vname) \ -if (!strcmp(oname, o)) { \ - if (*argc > 2) \ - vname = (*argv)[2]; \ - else goto fail; \ - (*argc)-=2; \ - (*argv)+=2; \ - } - -char *help_string = -"electric sheep v%s - the collective dream of sleeping\n" -" computers from all over the internet.\n" -" see http://electricsheep.org\n" -"\n" -"usage: electricsheep [options]\n" -"electricsheep-preferences to set default options\n" -"\n" -"--preferences file (the location for the preferences,\n" -" the default is ~/.electricsheep/preferences.xml)\n" -"--nick name (credit frames to this name on the server, default is none)\n" -"--url url (in server credit, link name to this url, default is none)\n" -"--password string (authenticate yourself to the server)\n" -"--nthreads N (number of rendering threads, default is 1)\n" -"--frame-rate N (frames/second)\n" -"--timeout N (seconds, default is 401)\n" -"--tryagain N (seconds between retries to server, default is 696)\n" -"--no-animation 0/1 (invisibility if 1, default 0)\n" -"--standalone 0/1 (disables render & download, default 0)\n" -"--save-dir path (directory in which to save anims)\n" -"--save-frames 0/1 (keeps images rendered in the saved anim directory)\n" -"--max-megabytes N (maximum disk space used to save anims in megabytes,\n" -" default is 2000, 0 means no limit)\n" -"--min-megabytes N (minimum disk space to leave free in megabytes,\n" -" default is 100, 0 means no limit)\n" -"--nice n (priority adjustment for render process, default 10)\n" -"--nrepeats n (number of times to repeat loopable animations, default 2)\n" -"--proxy url (connect to server through proxy (see curl(1)))\n" -"--proxy-user user:password (proxy account (see curl(1)))\n" -"--start-sheep id (play this sheep first)\n" -"--root 0/1 (display on root window, default 0)\n" -"-window-id id (display in an existing window, note single dash!)\n" -"--debug 0/1 (prints additional info)\n" -"--bracket-begin id/date (play no sheep before this one or this time)\n" -"--bracket-end id/date (play no sheep after this one or this time)\n" -"--data-dir dir (directory to find splash images and other data files)\n" -"--logfile file (file to write the log instead of stdout)\n" -"--video-driver name (passed on to mplayer -vo, try \"x11\" and \"gl\")\n" -; - - -char rc_file_name[PATH_MAX]; - - - -void -flags_init(int *argc, char ***argv) { - char *arg0 = (*argv)[0]; - char *bracket_begin = 0; - char *bracket_end = 0; - while (*argc > 1 && - (*argv)[1][0] == '-') { - char *o = (*argv)[1]; - if (!strcmp("--help", o)) { - printf(help_string, VERSION); - exit(0); - } - else iarg("--frame-rate", prefs.frame_rate) - else iarg("--timeout", timeout) - else iarg("--tryagain", tryagain) - else sarg("--nick", prefs.nick) - else sarg("--url", prefs.url) - else sarg("--save-dir", leave_prefix) - else iarg("--max-megabytes", prefs.cache_size) - else iarg("--min-megabytes", min_megabytes) - else iarg("--no-animation", prefs.no_animation) - else iarg("--parasite", parasite) - else iarg("--standalone", prefs.standalone) - else iarg("--nrepeats", prefs.nrepeats) - else iarg("--max-repeats", playback.max_repeats) - else iarg("--nthreads", nthreads) - else iarg("--debug", debug) - else sarg("--proxy", prefs.proxy_name) - else iarg("--start-sheep", start_id) - else sarg("--proxy-user", prefs.proxy_user) - else sarg("-window-id", window_id) - else iarg("--root", on_root) - else iarg("--read-only",read_only) - else iarg("--hide-errors",prefs.hide_errors) - else sarg("--bracket-begin",bracket_begin) - else sarg("--bracket-end",bracket_end) - else sarg("--logfile",logfile) - else sarg("--video-driver",prefs.video_driver) - else sarg("--password", prefs.password) - else iarg("--save-frames", prefs.save_frames) - else if (!strcmp("--preferences", o)) { - /* skip it */ - (*argc)-=2; - (*argv)+=2; - } else { - fprintf(logout, "bad option: %s, try --help\n", o); - exit(1); - } - } - (*argv)[0] = arg0; - - parse_bracket(bracket_begin, &bracket_begin_id, &bracket_begin_time); - parse_bracket(bracket_end, &bracket_end_id, &bracket_end_time); - - if (window_id && strlen(window_id) > 20) { - fprintf(logout, "window-id too long: %s.\n", window_id); - exit(1); - } - - if (leave_prefix && strlen(leave_prefix) > PATH_MAX) { - fprintf(logout, "save-dir too long: %s.\n", leave_prefix); - exit(1); - } - - if (prefs.proxy_user && strlen(prefs.proxy_user) > 100) { - fprintf(logout, "proxy-user too long: %s.\n", prefs.proxy_user); - exit(1); - } - - if (prefs.proxy_name && strlen(prefs.proxy_name) > 100) { - fprintf(logout, "proxy-name too long: %s.\n", prefs.proxy_name); - exit(1); - } - - if (on_root && window_id) { - on_root = 0; - } - - if (window_id && prefs.zoom) { - prefs.zoom = 0; - } - - if (playback.history_size <= 0) { - fprintf(logout, "history must be positive, not %d.\n", - playback.history_size); - exit(1); - } - playback.path_history = malloc(sizeof(int) * playback.history_size); - - if (-1 == nthreads) { - nthreads = 1; - } else if (0 > nthreads) { - auto_nthreads(); - } - - if (debug) { - hide_stderr = ""; - } - - if (!leave_prefix) { - char b[MAXBUF]; - char *hom = getenv("HOME"); - if (!hom) { - fprintf(logout, "HOME envar not defined\n"); - cleanup_and_exit(1); - } - if (strlen(hom) > PATH_MAX) { - fprintf(logout, "HOME envar too long: %s.\n", hom); - cleanup_and_exit(1); - } - snprintf(b, MAXBUF, "%s/.electricsheep/", hom); - leave_prefix = strdup(b); - } else if (leave_prefix[strlen(leave_prefix)-1] != '/') { - char b[MAXBUF]; - snprintf(b, MAXBUF, "%s/", leave_prefix); - leave_prefix = strdup(b); - } - if (setenv("sheep_leave_prefix", leave_prefix, 1)) { - fprintf(logout, - "warning: unable to set envar sheep_leave_prefix to %s.\n", - leave_prefix); - } - - if (strlen(prefs.nick)*3 > bufmax-3) { - fprintf(logout, "nick_name too long."); - cleanup_and_exit(1); - } - - if (strlen(prefs.url)*3 > bufmax-3) { - fprintf(logout, "url_name too long."); - cleanup_and_exit(1); - } - encode(url_buf, prefs.url); - - return; - fail: - fprintf(logout, "no argument to %s\n", (*argv)[1]); - exit(1); -} - -void -do_lock() { - char fn[MAXBUF]; - int fd; - - struct flock fl; - - snprintf(fn, MAXBUF, "%slock", leave_prefix); - if (-1 == (fd = creat(fn, S_IRWXU))) { - perror(fn); - cleanup_and_exit(1); - } - - fl.l_type = F_WRLCK; - fl.l_whence = SEEK_SET; - fl.l_start = 0; - fl.l_len = 0; - - if (-1 == fcntl(fd, F_SETLK, &fl)) { - if ((EAGAIN == errno) || (EACCES == errno)) { - fprintf(logout, "detected another electricsheep process.\n" - "using read only access, ie disabling " - "downloading and rendering of sheep.\n"); - parasite = 1; - read_only = 1; - } else { - perror(fn); - cleanup_and_exit(1); - } - } - /* leave the file open & locked until our process terminates */ -} - -void set_monitoraspect(char *wid) { - int i, w=0, h; - FILE *p; - char cb[MAXBUF]; - int delay = 100 * 1000; - - for (i = 0; i < 3; i++) { - snprintf(cb, MAXBUF, "xwininfo -id %s | egrep '(Width|Height)'", wid); - - p = popen(cb, "r"); - if (NULL == p) { - fprintf(logout, "xwininfo pipe failed\n"); - break; - } - - if (2 != fscanf(p, " Width: %d Height: %d", &w, &h)) { - fprintf(logout, "scanning window dimensions failed, try again in %dus\n", delay); - usleep(delay); - delay *= 2; - continue; - } - if (w <= 1 || h <= 1) { - if (debug) fprintf(logout, "waiting for window %dus\n", delay); - usleep(delay); - delay *= 2; - continue; - } - } - if (w > 1) { - sprintf(monitoraspect, "%d:%d", w, h); - if (debug) fprintf(logout, "monitoraspect=%s\n", monitoraspect); - } else { - strcpy(monitoraspect, "4:3"); - if (debug) fprintf(logout, "could not read monitoraspect, assuming 4:3"); - } -} - -int main(int argc, char **argv) { - // would like to write this into argv[0] so it shows - // up in ps output, but not clear to me how to allocate - // the space for that. assigning argv[0] doesn't work. - thread_name = "main"; - logout = stderr; - - /* create our own group so all workers/children may - be killed together without hassle */ -#ifdef SETPGRP_VOID - if (-1 == setpgrp()) perror("setpgrp"); -#else - if (-1 == setpgrp(getpid(), getpid())) perror("setpgrp"); -#endif - signal(SIGTERM, handle_sig_term); - signal(SIGINT, handle_sig_term); - - if (1) { - playback.history_size = 50; - playback.last_sheep = -1; - playback.nrepeated = 0; - playback.max_repeats = 1; - playback.reset_fuse = 0; - playback.reset_fuse_length = -1; /* disabled */ - } - - set_rc_file(rc_file_name, argc, argv); - default_rc(&prefs); - read_rc(&prefs, rc_file_name); - flags_init(&argc, &argv); - - if (logfile && logfile[0]) { - logout = fopen(logfile, "a"); - if (NULL == logout) { - logout = stderr; - perror(logfile); - } else - setlinebuf(logout); - } - - if (debug) { - fprintf(logout, "=====================================\n" - "electric sheep v%s\n", VERSION); - timestamp("start"); - } - - if (NULL == window_id) - window_id = getenv("XSCREENSAVER_WINDOW"); - - if (window_id) set_monitoraspect(window_id); - - - encode(nick_buf, prefs.nick); - do_lock(); - playback.reset_fuse = playback.reset_fuse_length; - init_curl_cmd(0); - srandom(time(0) + getpid()); - - play_count_init(); - - if (!prefs.no_animation) { - make_display_process(); - } - - - simulated_time = time(0); - - if (!read_only) { - - update_cached_sheep(); - delete_cached(0); - if (!prefs.standalone) { - make_download_process(); - } - } - - if (!parasite && !prefs.standalone) - make_render_process(); // does not return - - if (displayer_pid) { - if (-1 == waitpid(displayer_pid, 0, 0)) { - perror("waitpid displayer_pid"); - exit(1); - } - } - if (downloader_pid) { - if (-1 == waitpid(displayer_pid, 0, 0)) { - perror("waitpid downloader_pid"); - exit(1); - } - } - if (ui_pid) { - if (-1 == waitpid(ui_pid, 0, 0)) { - perror("waitpid ui_pid"); - exit(1); - } - } - exit(0); -} diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep.desktop.in electricsheep-3.0.2-git20180325/electricsheep.desktop.in --- electricsheep-2.7~b12+svn20091224/electricsheep.desktop.in 2008-06-26 02:23:18.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep.desktop.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ - -[Desktop Entry] -Encoding=UTF-8 -Name=ElectricSheep -Comment=Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. See www.electricsheep.org. This is version @VERSION@ -TryExec=electricsheep-saver -Exec=electricsheep-saver -StartupNotify=false -Terminal=false -Type=Application -Categories=Screensaver diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep.desktop.kde electricsheep-3.0.2-git20180325/electricsheep.desktop.kde --- electricsheep-2.7~b12+svn20091224/electricsheep.desktop.kde 2009-01-02 20:07:44.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep.desktop.kde 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -[Desktop Entry] -Exec=electricsheep -Icon=kscreensaver -Type=Service -X-KDE-ServiceTypes=ScreenSaver -TryExec=xscreensaver -Actions=InWindow;Root;Setup; -X-KDE-Category=Fractals Screen Savers -X-KDE-Type=xv -Name=ElectricSheep - -[Desktop Action Setup] -Exec=electricsheep-preferences -Name=Setup... - -[Desktop Action InWindow] -Exec=electricsheep -window-id %w -Name=Display in Specified Window -NoDisplay=true - -[Desktop Action Root] -Exec=electricsheep -window-id %w -Name=Display in Root Window -NoDisplay=true - -X-Ubuntu-Gettext-Domain=desktop_kdeartwork Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/electricsheep-frown.png and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/electricsheep-frown.png differ diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep.h electricsheep-3.0.2-git20180325/electricsheep.h --- electricsheep-2.7~b12+svn20091224/electricsheep.h 2009-12-24 23:03:01.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -/* - electricsheep - a collaborative screensaver - Copyright (C) 1999-2008 Spotworks LLC - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -*/ - - -typedef struct { - char *nick; - char *url; - char *password; - int cache_size; - char *uid; - char *video_driver; - double frame_rate; - int nrepeats; - double play_evenly; - int zoom; - int no_animation; - int standalone; - int hide_errors; - char *proxy_name; - char *proxy_user; - int save_frames; -} prefs_t; - -#define MAXBUF (5*PATH_MAX) -#define bufmax 300 - -extern prefs_t prefs; -extern char curl_cmd[MAXBUF]; -extern char nick_buf[bufmax]; -extern char url_buf[bufmax]; -extern FILE *logout; -/* -extern char *dream_server; -extern char *registered_server; -*/ -extern char *server; -extern char *client_version; -extern char *hide_stderr; - -// by default xscreensaver starts us at priority 10. -// everything but the avi decoder runs at that (10) plus this: -#define nice_level 10 - -extern int in_message; -extern int server_error; -extern char server_error_type[]; - -void set_rc_file(char *rc_file, int argc, char **argv); -void read_rc(prefs_t *prefs, char *file_name); -void write_rc(prefs_t *prefs, char *file_name); -void default_rc(prefs_t *prefs); -int mysystem(char *cmd, char *msg); -int interruptable_system(char *command); -void cleanup_and_exit(int status); -void encode(char *dst, char *src); -void init_curl_cmd(int registration); -void init_list_cmd (char *buf); -void get_end_element(void *userData, const char *name); -void character_handler(void *userData, const XML_Char *s, int len); -char *encry(char *pw, char *nick); diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep.man.in electricsheep-3.0.2-git20180325/electricsheep.man.in --- electricsheep-2.7~b12+svn20091224/electricsheep.man.in 2008-05-16 19:56:20.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep.man.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -.TH ElectricSheep 1 "" "X Version 11" -.SH NAME -electricsheep - a distributed screen-saver (version @VERSION@) - -electricsheep-preferences - GUI to edit defaults for electricsheep -.SH SYNOPSIS -.B electricsheep -[\--preferences \fIfile\fP] -[\--nick \fIname\fP] -[\--password \fIstring\fP] -[\--url \fIurl\fP] -[\--nrepeats \fIN\fP] -[\--max-repeats \fIN\fP] -[\--frame-rate \fIN\fP] -[\--nthreads \fIN\fP] -[\--server \fIhost/path\fP] -[\--display-anim \fI0/1\fP] -[\--show-errors \fI0/1\fP] -[\--standalone \fI0/1\fP] -[\--save-dir \fIpath\fP] -[\--reset-fuse \fIN\fP] -[\--nice \fIN\fP] -[\--proxy \fIURL\fP] -[\--proxy-user \fIuser:password\fP] -[\--timeout \fIN\fP] -[\--start-sheep \fIN\fP] -[\--debug \fI0/1\fP] -[\-window-id \fIid\fP] -[\--bracket-begin \fIdate/id\fP] -[\--bracket-end \fIdate/id\fP] -[\--data-dir \fIdir\fP] -[\--logfile \fIfile\fP] -[\--video-driver \fIname\fP] - -.B electricsheep-preferences -[\--preferences \fI\fP] - -.SH DESCRIPTION - - -Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. It requires a high-bandwidth, always-on connection to the internet such as DSL or cable-modem. - -The first time it runs, it normally takes about 10 minutes before a sheep (as the animations are called) is downloaded and displayed. After that, it should come up immediately. You can use BitTorrent to download more sheep faster, see the web site below for how. - -If you have installed a screen-saver that supports passing key-presses onto the graphics hack and this feature is enabled, then pressing the up (or down) arrow-key transmits a vote for (or against) the currently displayed sheep to the server. Vote for the sheep you like, and they will mate, reproduce, and evolve! (this feature is missing from the beta) - -The shepherds (those who wrote the software and run the server) use some of the sheep for commercial purposes in order to support the network and develop it further. For example there's the Spotworks DVD, and "Dreams in High Fidelity", a painting that evolves. Some jobs rendered by the network may be for images or animations which are not sheep at all, and will not appear in the screen-saver. - -Users may not subvert the protocol of the sheep server. If you want to change how the client communicates with the server, contact the server's administrators first. - - - -.SH OPTIONS -.TP 8 -.B \--preferences \fIfile\fP -Give the location for the preferences. The default is ~/.electricsheep/preferences.xml. -.TP 8 -.B \--bracket-begin \fIdate/id\fP -Play no sheep before this one or this time. -.TP 8 -.B \--bracket-end \fIdate/id\fP -Play no sheep after this one or this time. -.TP 8 -.B \--data-dir \fIdir\fP -Set the directory to find splash images and other data files. -.TP 8 -.B \--debug \fI0/1\fP -If 1 then print copious debug information. The default is 0. -.TP 8 -.B \--display-anim \fI0/1\fP -If 1 then display the animated sheep, if 0 then do not. Not -displaying the sheep allows one to contribute rendering more rendering -cycles because no CPU time is spent on display. It also allows one to -run on a computer without an X display at all. The default is 1. -.TP 8 -.B \--frame-rate \fIN\fP -Specify the frame-rate for sheep display in frames per second. The -default is 23. If your client is having trouble completing frames -because it is spending all its CPU time in the display process then -decreasing this might help. Or increase it if you have extra CPU for -smoother display. -.TP 8 -.B \--logfile \fIfile\fP -Write errors and diagnostics to this file instead of stderr and stdout. -.TP 8 -.B \--max-megabytes \fIN\fP -Specify the maximum number of megabytes of disk storage to use to -store sheep (in the directory specified with --save-dir). The default -is 2000. Zero (0) means there is no maximum. -.TP 8 -.B \--max-repeats \fIN\fP -Maximum number of times to repeat any sheep. The default is 3. -.TP 8 -.B \--min-megabytes \fIN\fP -Specify the minimum number of megabytes of disk storage to leave free. -The default is 2000. Zero (0) means there is no minimum. -.TP 8 -.B \--nice \fIN\fP -Specify the priority adjustment for render process and all non-display -processes. The default is 10. -.TP 8 -.B \--nick \fIname\fP -Specify a nickname. The server keeps credits the frames according to -nickname and ranks nicknames according to who contributes the most. -.TP 8 -.B \--password \fIstring\fP -Authenticate to the server using this password. Note: the password is -not encrypted! -.TP 8 -.B \--nrepeats \fIN\fP -Number of times to repeat each sheep. The default is 1. Transitions -between sheep are not repeated. -.TP 8 -.B \--nthreads \fIN\fP -Specify the number of rendering threads. By default there is one (1). -.TP 8 -.B \--proxy \fIURL\fP -Specify a proxy as per curl(1). -.TP 8 -.B \--proxy-user \fIuser:password\fP -Specify a proxy user and password as per curl(1). -.TP 8 -.B \--save-dir \fIpath\fP -Specifies a directory to save the sheep in. The default is ~/.electricsheep. -.TP 8 -.B \--show-errors \fI0/1\fP -If 0 then do not report problems connecting to server. The default is 1. -.TP 8 -.B \--standalone \fI0/1\fP -If 1 then run without connecting to the internet at all, just displays -the sheep already downloaded and do no rendering. The default is 0. -.TP 8 -.B \--start-sheep \fIN\fP -Specify the ID of the sheep to display first. The default is to -display a random sheep. -.TP 8 -.B \--timeout \fIN\fP -Specify the timeout in seconds for server operations. The default is -401. -.TP 8 -.B \--tryagain \fIN\fP -Specify the time in seconds to wait before retrying to contact the -server. The default is 696. -.TP 8 -.B \--url \fIname\fP -Specify a vanity URL to go with with the nickname. -.TP 8 -.B \--video-driver \fIname\fP -Passed on to mplayer -vo, try "gl" and "x11" and "xv" or leave it -blank for the default. -.TP 8 -.B \--voting \fI0/1\fP -If 1 then enable the voting interface, which is broken in this beta. -.TP 8 -.B \-window-id \fIX\fP -Specify in hex the window ID to draw into. Note the single leading -dash (this option's syntax is required by xscreensaver). The default -is to display in a new window. If both --root and -window-id are -specified then -window-id takes precedence. -.SH ENVIRONMENT -.PP -.TP 8 -.B DISPLAY -to get the default host and display number. -.SH SEE ALSO -.BR http://electricsheep.org, -.BR gnome-screensaver (1), -.BR xscreensaver (1), -.SH AUTHOR -spot aka Scott Draves diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep-preferences.c electricsheep-3.0.2-git20180325/electricsheep-preferences.c --- electricsheep-2.7~b12+svn20091224/electricsheep-preferences.c 2009-12-24 23:03:01.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep-preferences.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,298 +0,0 @@ -/* - electricsheep - a collaborative screensaver - Copyright (C) 1999-2008 Spotworks LLC - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ - -static char *electricsheep_preferences_c_id = -"@(#) $Id: electricsheep-preferences.c,v 1.4 2008-05-16 19:44:08 spotspot Exp $"; - -#include -#include -#include -#include -#include -#include - -#include "electricsheep.h" -#include "config.h" - -char rc_file_name[PATH_MAX]; - -char *pw_marker = " 31E671r91:96"; - -prefs_t prefs; - -int debug = 0; - -GtkLabel *title_label; -GtkLabel *test_label; -GtkEntry *nick_entry; -GtkEntry *url_entry; -GtkEntry *password_entry; -GtkEntry *video_driver_entry; -GtkSpinButton *frame_rate_spin; -GtkSpinButton *nrepeats_spin; -GtkSpinButton *cache_spin; -GtkCheckButton *no_animation_check; -GtkCheckButton *standalone_check; -GtkCheckButton *hide_errors_check; -GtkCheckButton *save_frames_check; -GtkButton *test_button; - -void clear_prefs(prefs_t *prefs) { - free(prefs->nick); - prefs->nick = NULL; - free(prefs->url); - prefs->url = NULL; - free(prefs->password); - prefs->password = NULL; - free(prefs->video_driver); - prefs->video_driver = NULL; - prefs->cache_size = -1; - free(prefs->uid); - prefs->uid = NULL; - prefs->frame_rate = -1.0; - prefs->play_evenly = 1.0; - prefs->nrepeats = -1; - prefs->zoom = 1; - prefs->no_animation = -1; - prefs->standalone = -1; - prefs->hide_errors = -1; - prefs->save_frames = -1; -} - -void init_ui() { - gtk_label_set_text(title_label, "Electric Sheep v" VERSION); - if (prefs.nick) - gtk_entry_set_text(nick_entry, prefs.nick); - if (prefs.url) - gtk_entry_set_text(url_entry, prefs.url); - if (prefs.password) - gtk_entry_set_text(password_entry, prefs.password[0] ? pw_marker : ""); - if (prefs.video_driver) - gtk_entry_set_text(video_driver_entry, prefs.video_driver); - if (prefs.frame_rate > 0.0) - gtk_spin_button_set_value(frame_rate_spin, prefs.frame_rate); - if (prefs.nrepeats >= 0) - gtk_spin_button_set_value(nrepeats_spin, prefs.nrepeats); - if (prefs.cache_size >= 0) - gtk_spin_button_set_value(cache_spin, prefs.cache_size); - if (prefs.no_animation >= 0) - gtk_toggle_button_set_active((GtkToggleButton *) no_animation_check, prefs.no_animation); - if (prefs.standalone >= 0) - gtk_toggle_button_set_active((GtkToggleButton *) standalone_check, prefs.standalone); - if (prefs.hide_errors >= 0) - gtk_toggle_button_set_active((GtkToggleButton *) hide_errors_check, prefs.hide_errors); - if (prefs.save_frames >= 0) - gtk_toggle_button_set_active((GtkToggleButton *) save_frames_check, prefs.save_frames); -} - -void read_ui() { - prefs.nick = (char*)gtk_entry_get_text(nick_entry); - prefs.url = (char*)gtk_entry_get_text(url_entry); - if (0 == prefs.nick[0]) { - prefs.password = strdup(""); - } else { - char *pw = (char*)gtk_entry_get_text(password_entry); - pw = strdup(pw); - if (strcmp(pw, pw_marker)) - prefs.password = encry(pw, prefs.nick); - } - prefs.video_driver = (char*)gtk_entry_get_text(video_driver_entry); - prefs.frame_rate = gtk_spin_button_get_value(frame_rate_spin); - prefs.nrepeats = (int) gtk_spin_button_get_value(nrepeats_spin); - prefs.cache_size = (int) gtk_spin_button_get_value(cache_spin); - prefs.no_animation = (int) gtk_toggle_button_get_active((GtkToggleButton *) no_animation_check); - prefs.standalone = (int) gtk_toggle_button_get_active((GtkToggleButton *) standalone_check); - prefs.hide_errors = (int) gtk_toggle_button_get_active((GtkToggleButton *) hide_errors_check); - prefs.save_frames = (int) gtk_toggle_button_get_active((GtkToggleButton *) save_frames_check); -} - - - -void on_cancelButton_clicked(GtkWidget *widget, gpointer user_data) { - exit(0); -} - -void on_saveButton_clicked(GtkWidget *widget, gpointer user_data) { - read_ui(); - write_rc(&prefs, rc_file_name); - exit(0); -} - -void on_helpButton_clicked(GtkWidget *widget, gpointer user_data) { - if (system("gnome-open http://electricsheep.org/client/LNX_" VERSION ".html &")) - perror("gnome-open"); -} - -static void tick() { - while (gtk_events_pending ()) - gtk_main_iteration (); -} - -void on_testButton_clicked(GtkWidget *widget, gpointer user_data) { - char buf[MAXBUF]; - FILE *lf; - int talking = 0; - - gtk_label_set_text(test_label, "testing..."); - tick(); - read_ui(); - init_curl_cmd(1); - encode(url_buf, prefs.url); - encode(nick_buf, prefs.nick); - - snprintf(buf, MAXBUF, "%s 'http://%s/'", curl_cmd, server); - lf = popen(buf, "r"); - if (NULL == lf) { - perror("could not fork/pipe0\n"); - cleanup_and_exit(1); - } - while (fgets(buf, MAXBUF, lf)) { - if (!strcmp(buf, "\n")) { - gtk_label_set_text(test_label, "talking..."); - fclose(lf); - tick(); - talking = 1; - break; - } - } - if (!talking) { - gtk_label_set_text(test_label, "failure"); - fclose(lf); - return; - } - - read_ui(); - init_curl_cmd(1); - init_list_cmd(buf); - if (debug) fprintf(logout, "test list %s\n", buf); - lf = popen(buf, "r"); - if (NULL == lf) { - perror("could not fork/pipe\n"); - cleanup_and_exit(1); - } - gtk_label_set_text(test_label, "talking...."); - tick(); - while (fgets(buf, MAXBUF, lf)) { - if (!strcmp(buf, "\n")) { - if (prefs.password && prefs.password[0]) - gtk_label_set_text(test_label, "good, registered"); - else - gtk_label_set_text(test_label, "good, anonymous"); - fclose(lf); - return; - } - } - if (prefs.password && prefs.password[0]) - gtk_label_set_text(test_label, "login failure"); - else - gtk_label_set_text(test_label, "failure to connect 2"); - fclose(lf); -} - -void get_widgets(GladeXML *xml) { - title_label = (GtkLabel *) glade_xml_get_widget(xml, "titleLabel"); - if (NULL == title_label) { - fprintf(logout, "titleLabel not found\n"); - exit(1); - } - test_label = (GtkLabel *) glade_xml_get_widget(xml, "testLabel"); - if (NULL == test_label) { - fprintf(logout, "testLabel not found\n"); - exit(1); - } - test_button = (GtkButton *) glade_xml_get_widget(xml, "testButton"); - if (NULL == test_button) { - fprintf(logout, "testButton not found\n"); - exit(1); - } - nick_entry = (GtkEntry *) glade_xml_get_widget(xml, "nickEntry"); - if (NULL == nick_entry) { - fprintf(logout, "nickEntry not found\n"); - exit(1); - } - url_entry = (GtkEntry *) glade_xml_get_widget(xml, "urlEntry"); - if (NULL == url_entry) { - fprintf(logout, "urlEntry not found\n"); - exit(1); - } - password_entry = (GtkEntry *) glade_xml_get_widget(xml, "passEntry"); - if (NULL == password_entry) { - fprintf(logout, "passEntry not found\n"); - exit(1); - } - video_driver_entry = (GtkEntry *) glade_xml_get_widget(xml, "vdEntry"); - if (NULL == video_driver_entry) { - fprintf(logout, "vdEntry not found\n"); - exit(1); - } - frame_rate_spin = (GtkSpinButton *) glade_xml_get_widget(xml, "frameSpin"); - if (NULL == frame_rate_spin) { - fprintf(logout, "frameSpin not found\n"); - exit(1); - } - nrepeats_spin = (GtkSpinButton *) glade_xml_get_widget(xml, "repeatSpin"); - if (NULL == nrepeats_spin) { - fprintf(logout, "repeatSpin not found\n"); - exit(1); - } - cache_spin = (GtkSpinButton *) glade_xml_get_widget(xml, "cacheSpin"); - if (NULL == cache_spin) { - fprintf(logout, "cacheSpin not found\n"); - exit(1); - } - no_animation_check = (GtkCheckButton *) glade_xml_get_widget(xml, "noanimCheck"); - if (NULL == no_animation_check) { - fprintf(logout, "noanimCheck not found\n"); - exit(1); - } - standalone_check = (GtkCheckButton *) glade_xml_get_widget(xml, "standaloneCheck"); - if (NULL == standalone_check) { - fprintf(logout, "standaloneCheck not found\n"); - exit(1); - } - hide_errors_check = (GtkCheckButton *) glade_xml_get_widget(xml, "hideCheck"); - if (NULL == hide_errors_check) { - fprintf(logout, "hideCheck not found\n"); - exit(1); - } - save_frames_check = (GtkCheckButton *) glade_xml_get_widget(xml, "saveCheck"); - if (NULL == save_frames_check) { - fprintf(logout, "saveCheck not found\n"); - exit(1); - } -} - -void cleanup_and_exit(int status) { - exit(status); -} - -int main(int argc, char *argv[]) { - GladeXML *xml; - logout = stderr; - gtk_init(&argc, &argv); - clear_prefs(&prefs); - set_rc_file(rc_file_name, argc, argv); - read_rc(&prefs, rc_file_name); - xml = glade_xml_new(PACKAGE_DATA_DIR "/electricsheep-preferences.glade", NULL, NULL); - get_widgets(xml); - init_ui(); - glade_xml_signal_autoconnect(xml); - gtk_main(); - return 0; -} diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep-preferences.glade electricsheep-3.0.2-git20180325/electricsheep-preferences.glade --- electricsheep-2.7~b12+svn20091224/electricsheep-preferences.glade 2009-01-20 16:40:46.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep-preferences.glade 1970-01-01 00:00:00.000000000 +0000 @@ -1,683 +0,0 @@ - - - - - - - True - Electricsheep Preferences - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 0 - - - - True - False - 0 - - - - True - Electric Sheep vX.Y - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 10 - True - True - - - - - - True - True - Online Help - True - GTK_RELIEF_NORMAL - True - - - - 20 - True - True - - - - - 10 - True - True - - - - - - True - 4 - 2 - False - 0 - 0 - - - - True - Password: - False - False - GTK_JUSTIFY_RIGHT - False - False - 0.949999988079 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - - - - - - - True - URL: - False - False - GTK_JUSTIFY_RIGHT - False - False - 0.949999988079 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - - - - - - - True - Nickname: - False - False - GTK_JUSTIFY_RIGHT - False - False - 0.949999988079 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - - - - - - - True - True - True - True - 0 - - True - - False - - - 1 - 2 - 0 - 1 - 20 - - - - - - - True - True - True - True - 0 - - True - - False - - - 1 - 2 - 1 - 2 - 20 - - - - - - - True - True - True - False - 0 - - True - - False - - - 1 - 2 - 2 - 3 - 20 - - - - - - - True - True - 0 - - - - True - True - Test Connection - True - GTK_RELIEF_NORMAL - True - - - - 0 - True - True - - - - - - True - untested - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - 1 - 2 - 3 - 4 - 20 - - - - - 10 - True - True - - - - - - True - False - 0 - - - - True - 3 - 2 - False - 0 - 0 - - - - True - Repeats: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.949999988079 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - - - - - - - - True - Frame Rate: - False - False - GTK_JUSTIFY_RIGHT - False - False - 0.949999988079 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - - - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 21 1 100 1 10 0 - - - 1 - 2 - 0 - 1 - - - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 2 0 10 1 10 0 - - - 1 - 2 - 1 - 2 - - - - - - - - True - True - 1 - 0 - False - GTK_UPDATE_ALWAYS - False - False - 1000 0 100000 100 1000 0 - - - 1 - 2 - 2 - 3 - - - - - - - - True - Cache Megabytes: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.949999988079 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - - - - - - - 20 - True - True - - - - - - True - False - 0 - - - - True - True - No Animation - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Standalone - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Hide Errors - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - True - Save Frames - True - GTK_RELIEF_NORMAL - True - False - False - True - - - 0 - False - False - - - - - - True - False - 0 - - - - True - Video Driver: - False - False - GTK_JUSTIFY_RIGHT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - 30 - True - True - True - True - 0 - - True - - False - - - 0 - True - True - - - - - 0 - True - True - - - - - 30 - True - True - - - - - 0 - True - True - - - - - - True - False - 0 - - - - 20 - True - True - Cancel - True - GTK_RELIEF_NORMAL - True - - - - - 0 - True - True - - - - - - 20 - True - True - OK - True - GTK_RELIEF_NORMAL - True - - - - - 0 - True - True - - - - - 0 - False - False - - - - - - - diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep-saver electricsheep-3.0.2-git20180325/electricsheep-saver --- electricsheep-2.7~b12+svn20091224/electricsheep-saver 2008-06-30 04:43:35.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep-saver 2018-05-17 14:40:33.000000000 +0000 @@ -1,2 +1 @@ -#!/bin/sh -exec electricsheep --root 1 +exec electricsheep --root 1 $@ diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep-saver-gnome electricsheep-3.0.2-git20180325/electricsheep-saver-gnome --- electricsheep-2.7~b12+svn20091224/electricsheep-saver-gnome 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep-saver-gnome 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,2 @@ +#!/bin/sh +exec electricsheep --root 1 Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/electricsheep-smile.png and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/electricsheep-smile.png differ diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep.spec.in electricsheep-3.0.2-git20180325/electricsheep.spec.in --- electricsheep-2.7~b12+svn20091224/electricsheep.spec.in 2006-08-12 06:08:52.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep.spec.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,36 +0,0 @@ -Summary: collaborative screen-saver -Name: electricsheep -Version: @VERSION@ -Release: 1 -License: GPL -Group: Graphics -Source: http://electricsheep.org/electricsheep-@VERSION@.tar.gz -Url: http://electricsheep.org -Packager: Scott Draves -Requires: xscreensaver, expat, curl -%description - -Electric Sheep is a screen-saver that realizes the collective dream of -sleeping computers from all over the internet. - -%prep -%setup -./configure - -%build -make - -%install -make install - -%undefine __check_files - -%files -/usr/local/bin/electricsheep -/usr/local/bin/electricsheep-voter -/usr/local/bin/flam3-animate -/usr/local/bin/mpeg2dec_onroot -/usr/local/share/electricsheep/electricsheep-smile.png -/usr/local/share/electricsheep/electricsheep-frown.png -/usr/share/control-center/screensavers/electricsheep.xml -/usr/local/man/man1/electricsheep.1 diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep-voter.c electricsheep-3.0.2-git20180325/electricsheep-voter.c --- electricsheep-2.7~b12+svn20091224/electricsheep-voter.c 2005-07-11 07:22:18.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep-voter.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,284 +0,0 @@ -/* - electricsheep - collaborative screensaver - Copyright (C) 1999-2003 Scott Draves - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -static char *electricsheep_voter_c_id = -"@(#) $Id: electricsheep-voter.c,v 1.8 2005-07-11 07:22:17 spotspot Exp $"; - -/* - * When an arrow key is pressed transmit a vote to the server. - */ - -#include -#include -#include -#include -#include -#include "config.h" - -char *client_version = "LNX_" VERSION; - -/* instead of watching for X events, watch for - griffin powermate button presses */ -#define POWERMATE 0 - -/* instead of wathing for X events, - just pop up logos */ -#define FLYINGLOGOS 0 - - -#if POWERMATE -#include -#include -#include -#include -#include -#elif !FLYINGLOGOS -#include -#include -#include "mpeg2dec/libvo/vroot.h" -#endif - -char *nick, *url, *uid; -char *history_file; -char *dream_server; -char *leave_prefix; - -char *splash_prefix = PACKAGE_DATA_DIR "/electricsheep"; - -void vote(int how) { - FILE *hf; - char sheep_name[1000]; - char vote_file_name[MAXPATHLEN]; - char pbuf[MAXPATHLEN]; - hf = fopen(history_file, "rb"); - if (NULL == hf) { - perror(history_file); - return; - } - if (NULL == fgets(sheep_name, 1000, hf)) { - fprintf(stderr, "could not read sheep name from history file.\n"); - fclose(hf); - return; - } - fclose(hf); - if (strlen(sheep_name) > 1) { - sheep_name[strlen(sheep_name)-1] = 0; /* chop newline */ - - if (0 == fork()) { - sprintf(pbuf, "echo '!%s-%s.png 10 30 30' > " - "%soverlay_fifo", splash_prefix, - (how>0)?"smile":"frown", leave_prefix); - system(pbuf); - exit(0); - } - sprintf(pbuf, "curl 'http://%s/cgi/vote?id=%s&vote=%d&u=%s&v=%s' >& /dev/null", - dream_server, sheep_name, how, uid, client_version); - if (0 == fork()) { - system(pbuf); - exit(0); - } - } else { - fprintf(stderr, "empty sheep name.\n"); - } -} - -#if POWERMATE - -#define NUM_VALID_PREFIXES 2 - -static const char *valid_prefix[NUM_VALID_PREFIXES] = { - "Griffin PowerMate", - "Griffin SoundKnob" -}; - -#define NUM_EVENT_DEVICES 16 - -int open_powermate(const char *dev, int mode) -{ - int fd = open(dev, mode); - int i; - char name[255]; - - if(fd < 0){ - fprintf(stderr, "Unable to open \"%s\": %s\n", dev, strerror(errno)); - return -1; - } - - if(ioctl(fd, EVIOCGNAME(sizeof(name)), name) < 0){ - fprintf(stderr, "\"%s\": EVIOCGNAME failed: %s\n", dev, strerror(errno)); - close(fd); - return -1; - } - - // it's the correct device if the prefix matches what we expect it to be: - for(i=0; itype, ev->code, (int)ev->value); -#endif - - switch(ev->type){ - case EV_KEY: - if (ev->value) vote(1); - break; - } -} - -#define BUFFER_SIZE 32 -void watch_powermate(int fd) -{ - struct input_event ibuffer[BUFFER_SIZE]; - int r, events, i; - - while(1){ - r = read(fd, ibuffer, sizeof(struct input_event) * BUFFER_SIZE); - if( r > 0 ){ - events = r / sizeof(struct input_event); - for(i=0; i= 0) - return r; - } - - return -1; -} -#endif - -void fly_logo(char *cmd) { - char buf[MAXPATHLEN]; - sprintf(buf, "echo '%s' > %soverlay_fifo", cmd, leave_prefix); - system(buf); -} - - -int main(int argc, char **argv) { - int window; -#if POWERMATE - int powermate = -1; -#elif !FLYINGLOGOS - Display *display; - XWindowAttributes xgwa; -#endif - - if (argc != 8) { - printf("usage: electricsheep-voter window nick url " - "history_file dream_server leave_prefix uid\n"); - printf("%d\n", argc); - return 0; - } - window = strtol(argv[1], NULL, 0); - nick = argv[2]; - url = argv[3]; - history_file = argv[4]; - dream_server = argv[5]; - leave_prefix = argv[6]; - uid = argv[7]; - -#if POWERMATE - - - powermate = find_powermate(O_RDONLY); - - - if(powermate < 0){ - fprintf(stderr, "Unable to locate powermate\n"); - return 1; - } - - watch_powermate(powermate); - - close(powermate); - -#elif FLYINGLOGOS - while (1) { - sleep(10); - fly_logo("!/home/sheep/smile.ppm 30 60 30"); - sleep(10); - fly_logo("!/home/sheep/frown.ppm 30 60 30"); - } -#else - display = XOpenDisplay(NULL); - if (NULL == display) { - fprintf(stderr, "error: cannot open display.\n"); - return EXIT_FAILURE; - } - - if (window == -3 || window == -2) { - /* monitor the (virtual) root window */ - window = DefaultRootWindow (display); - } else if (window == -1) { - fprintf(stderr, "error: voting not allowed in separate window.\n"); - return EXIT_FAILURE; - } - - XGetWindowAttributes(display, window, &xgwa); - xgwa.your_event_mask = KeyPressMask; - XSelectInput(display, window, xgwa.your_event_mask); - - while (1) { - XEvent event; - char s[2]; - int size; - KeySym keysym; - XNextEvent(display, &event); - if (event.type != KeyPress) continue; - size = XLookupString ((XKeyEvent *) &event, s, 1, &keysym, 0); - switch (keysym) { - case XK_Up: - vote(1); - break; - case XK_Down: - vote(-1); - break; - } - } - -#endif - - /* not reached */ - return EXIT_SUCCESS; -} Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/electricsheep-wait.avi and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/electricsheep-wait.avi differ diff -Nru electricsheep-2.7~b12+svn20091224/ElectricSheep.workspace electricsheep-3.0.2-git20180325/ElectricSheep.workspace --- electricsheep-2.7~b12+svn20091224/ElectricSheep.workspace 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/ElectricSheep.workspace 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/electricsheep.xml.in electricsheep-3.0.2-git20180325/electricsheep.xml.in --- electricsheep-2.7~b12+svn20091224/electricsheep.xml.in 2007-12-19 22:41:12.000000000 +0000 +++ electricsheep-3.0.2-git20180325/electricsheep.xml.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,24 +0,0 @@ - - - - - - - - - <_description>Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. It requires a high-bandwidth, always-on connection to the internet such as DSL or cable-modem. - -The first time it runs, it normally takes about 10 minutes before a sheep (as the animations are called) is downloaded and displayed. After that, it should come up immediately. You can use BitTorrent to download more sheep faster, see the web site below for how. - -The shepherds (those who wrote the software and run the server) use some of the sheep for commercial purposes in order to support the network and develop it further. For example there's the Spotworks DVD, and "Dreams in High Fidelity", a painting that evolves. Some jobs rendered by the network may be for images or animations which are not sheep at all, and will not appear in the screen-saver. - -Users may not subvert the protocol of the sheep server. If you want to change how the client communicates with the server, contact the server's administrators first. - -Use "electricsheep-preferences" for configuration rather than the panel on the left. - -See http://electricsheep.org for more information. This is version -@VERSION@. - - - - diff -Nru electricsheep-2.7~b12+svn20091224/getdate.c electricsheep-3.0.2-git20180325/getdate.c --- electricsheep-2.7~b12+svn20091224/getdate.c 2005-02-07 09:47:04.000000000 +0000 +++ electricsheep-3.0.2-git20180325/getdate.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,2460 +0,0 @@ -/* A Bison parser, made by GNU Bison 1.875a. */ - -/* Skeleton parser for Yacc-like parsing with Bison, - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - - 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, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* Written by Richard Stallman by simplifying the original so called - ``semantic'' parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Using locations. */ -#define YYLSP_NEEDED 0 - - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - tAGO = 258, - tDST = 259, - tDAY = 260, - tDAY_UNIT = 261, - tDAYZONE = 262, - tHOUR_UNIT = 263, - tLOCAL_ZONE = 264, - tMERIDIAN = 265, - tMINUTE_UNIT = 266, - tMONTH = 267, - tMONTH_UNIT = 268, - tSEC_UNIT = 269, - tYEAR_UNIT = 270, - tZONE = 271, - tSNUMBER = 272, - tUNUMBER = 273 - }; -#endif -#define tAGO 258 -#define tDST 259 -#define tDAY 260 -#define tDAY_UNIT 261 -#define tDAYZONE 262 -#define tHOUR_UNIT 263 -#define tLOCAL_ZONE 264 -#define tMERIDIAN 265 -#define tMINUTE_UNIT 266 -#define tMONTH 267 -#define tMONTH_UNIT 268 -#define tSEC_UNIT 269 -#define tYEAR_UNIT 270 -#define tZONE 271 -#define tSNUMBER 272 -#define tUNUMBER 273 - - - - -/* Copy the first part of user declarations. */ -#line 1 "getdate.y" - -/* Parse a string into an internal time stamp. - Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. - - 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, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* Originally written by Steven M. Bellovin while - at the University of North Carolina at Chapel Hill. Later tweaked by - a couple of people on Usenet. Completely overhauled by Rich $alz - and Jim Berets in August, 1990. - - Modified by Paul Eggert in August 1999 to do - the right thing about local DST. Unlike previous versions, this - version is reentrant. */ - -#ifdef HAVE_CONFIG_H -# include -# ifdef HAVE_ALLOCA_H -# include -# endif -#endif - -/* Since the code of getdate.y is not included in the Emacs executable - itself, there is no need to #define static in this file. Even if - the code were included in the Emacs executable, it probably - wouldn't do any harm to #undef it here; this will only cause - problems if we try to write to a static variable, which I don't - think this code needs to do. */ -#ifdef emacs -# undef static -#endif - -#include - -#if HAVE_STDLIB_H -# include /* for `free'; used by Bison 1.27 */ -#endif - -#if STDC_HEADERS || (! defined isascii && ! HAVE_ISASCII) -# define IN_CTYPE_DOMAIN(c) 1 -#else -# define IN_CTYPE_DOMAIN(c) isascii (c) -#endif - -#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c)) -#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c)) -#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c)) -#define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) - -/* ISDIGIT differs from ISDIGIT_LOCALE, as follows: - - Its arg may be any int or unsigned int; it need not be an unsigned char. - - It's guaranteed to evaluate its argument exactly once. - - It's typically faster. - POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to - ISDIGIT_LOCALE unless it's important to use the locale's definition - of `digit' even when the host does not conform to POSIX. */ -#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9) - -#if STDC_HEADERS || HAVE_STRING_H -# include -#endif - -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__ -# define __attribute__(x) -#endif - -#ifndef ATTRIBUTE_UNUSED -# define ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -#endif - -#define EPOCH_YEAR 1970 -#define TM_YEAR_BASE 1900 - -#define HOUR(x) ((x) * 60) - -/* An integer value, and the number of digits in its textual - representation. */ -typedef struct -{ - int value; - int digits; -} textint; - -/* An entry in the lexical lookup table. */ -typedef struct -{ - char const *name; - int type; - int value; -} table; - -/* Meridian: am, pm, or 24-hour style. */ -enum { MERam, MERpm, MER24 }; - -/* Information passed to and from the parser. */ -typedef struct -{ - /* The input string remaining to be parsed. */ - const char *input; - - /* N, if this is the Nth Tuesday. */ - int day_ordinal; - - /* Day of week; Sunday is 0. */ - int day_number; - - /* tm_isdst flag for the local zone. */ - int local_isdst; - - /* Time zone, in minutes east of UTC. */ - int time_zone; - - /* Style used for time. */ - int meridian; - - /* Gregorian year, month, day, hour, minutes, and seconds. */ - textint year; - int month; - int day; - int hour; - int minutes; - int seconds; - - /* Relative year, month, day, hour, minutes, and seconds. */ - int rel_year; - int rel_month; - int rel_day; - int rel_hour; - int rel_minutes; - int rel_seconds; - - /* Counts of nonterminals of various flavors parsed so far. */ - int dates_seen; - int days_seen; - int local_zones_seen; - int rels_seen; - int times_seen; - int zones_seen; - - /* Table of local time zone abbrevations, terminated by a null entry. */ - table local_time_zone_table[3]; -} parser_control; - -#define PC (* (parser_control *) parm) -#define YYLEX_PARAM parm -#define YYPARSE_PARAM parm - -static int yyerror (); -static int yylex (); - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 172 "getdate.y" -typedef union YYSTYPE { - int intval; - textint textintval; -} YYSTYPE; -/* Line 191 of yacc.c. */ -#line 281 "getdate.c" -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -# define YYSTYPE_IS_TRIVIAL 1 -#endif - - - -/* Copy the second part of user declarations. */ - - -/* Line 214 of yacc.c. */ -#line 293 "getdate.c" - -#if ! defined (yyoverflow) || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# else -# ifndef YYSTACK_USE_ALLOCA -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -# define YYSTACK_ALLOC malloc -# define YYSTACK_FREE free -# endif -#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */ - - -#if (! defined (yyoverflow) \ - && (! defined (__cplusplus) \ - || (YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - short yyss; - YYSTYPE yyvs; - }; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAXIMUM) - -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - register YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (0) -# endif -# endif - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif - -#if defined (__STDC__) || defined (__cplusplus) - typedef signed char yysigned_char; -#else - typedef short yysigned_char; -#endif - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 2 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 52 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 22 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 12 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 54 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 64 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 273 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const unsigned char yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 20, 2, 2, 21, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 19, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const unsigned char yyprhs[] = -{ - 0, 0, 3, 4, 7, 9, 11, 13, 15, 17, - 19, 21, 24, 29, 34, 41, 48, 50, 53, 55, - 57, 60, 62, 65, 68, 72, 78, 82, 86, 89, - 94, 97, 101, 104, 106, 109, 112, 114, 117, 120, - 122, 125, 128, 130, 133, 136, 138, 141, 144, 146, - 149, 152, 154, 156, 157 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yysigned_char yyrhs[] = -{ - 23, 0, -1, -1, 23, 24, -1, 25, -1, 26, - -1, 27, -1, 29, -1, 28, -1, 30, -1, 32, - -1, 18, 10, -1, 18, 19, 18, 33, -1, 18, - 19, 18, 17, -1, 18, 19, 18, 19, 18, 33, - -1, 18, 19, 18, 19, 18, 17, -1, 9, -1, - 9, 4, -1, 16, -1, 7, -1, 16, 4, -1, - 5, -1, 5, 20, -1, 18, 5, -1, 18, 21, - 18, -1, 18, 21, 18, 21, 18, -1, 18, 17, - 17, -1, 18, 12, 17, -1, 12, 18, -1, 12, - 18, 20, 18, -1, 18, 12, -1, 18, 12, 18, - -1, 31, 3, -1, 31, -1, 18, 15, -1, 17, - 15, -1, 15, -1, 18, 13, -1, 17, 13, -1, - 13, -1, 18, 6, -1, 17, 6, -1, 6, -1, - 18, 8, -1, 17, 8, -1, 8, -1, 18, 11, - -1, 17, 11, -1, 11, -1, 18, 14, -1, 17, - 14, -1, 14, -1, 18, -1, -1, 10, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const unsigned short yyrline[] = -{ - 0, 188, 188, 190, 194, 196, 198, 200, 202, 204, - 206, 210, 217, 224, 232, 239, 251, 253, 258, 260, - 262, 267, 272, 277, 285, 290, 310, 317, 325, 330, - 336, 341, 350, 359, 363, 365, 367, 369, 371, 373, - 375, 377, 379, 381, 383, 385, 387, 389, 391, 393, - 395, 397, 402, 439, 440 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE -/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "tAGO", "tDST", "tDAY", "tDAY_UNIT", - "tDAYZONE", "tHOUR_UNIT", "tLOCAL_ZONE", "tMERIDIAN", "tMINUTE_UNIT", - "tMONTH", "tMONTH_UNIT", "tSEC_UNIT", "tYEAR_UNIT", "tZONE", "tSNUMBER", - "tUNUMBER", "':'", "','", "'/'", "$accept", "spec", "item", "time", - "local_zone", "zone", "day", "date", "rel", "relunit", "number", - "o_merid", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const unsigned short yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 58, - 44, 47 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const unsigned char yyr1[] = -{ - 0, 22, 23, 23, 24, 24, 24, 24, 24, 24, - 24, 25, 25, 25, 25, 25, 26, 26, 27, 27, - 27, 28, 28, 28, 29, 29, 29, 29, 29, 29, - 29, 29, 30, 30, 31, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, - 31, 31, 32, 33, 33 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const unsigned char yyr2[] = -{ - 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, - 1, 2, 4, 4, 6, 6, 1, 2, 1, 1, - 2, 1, 2, 2, 3, 5, 3, 3, 2, 4, - 2, 3, 2, 1, 2, 2, 1, 2, 2, 1, - 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, - 2, 1, 1, 0, 1 -}; - -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const unsigned char yydefact[] = -{ - 2, 0, 1, 21, 42, 19, 45, 16, 48, 0, - 39, 51, 36, 18, 0, 52, 3, 4, 5, 6, - 8, 7, 9, 33, 10, 22, 17, 28, 20, 41, - 44, 47, 38, 50, 35, 23, 40, 43, 11, 46, - 30, 37, 49, 34, 0, 0, 0, 32, 0, 27, - 31, 26, 53, 24, 29, 54, 13, 0, 12, 0, - 53, 25, 15, 14 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yysigned_char yydefgoto[] = -{ - -1, 1, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 58 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -17 -static const yysigned_char yypact[] = -{ - -17, 0, -17, 1, -17, -17, -17, 19, -17, -14, - -17, -17, -17, 32, 26, 14, -17, -17, -17, -17, - -17, -17, -17, 27, -17, -17, -17, 22, -17, -17, - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -16, -17, -17, -17, 29, 25, 30, -17, 31, -17, - -17, -17, 28, 23, -17, -17, -17, 33, -17, 34, - -7, -17, -17, -17 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yysigned_char yypgoto[] = -{ - -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, - -17, -10 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const unsigned char yytable[] = -{ - 2, 49, 50, 55, 27, 3, 4, 5, 6, 7, - 62, 8, 9, 10, 11, 12, 13, 14, 15, 35, - 36, 25, 37, 26, 38, 39, 40, 41, 42, 43, - 47, 44, 29, 45, 30, 46, 28, 31, 55, 32, - 33, 34, 48, 52, 59, 56, 51, 57, 53, 54, - 63, 60, 61 -}; - -static const unsigned char yycheck[] = -{ - 0, 17, 18, 10, 18, 5, 6, 7, 8, 9, - 17, 11, 12, 13, 14, 15, 16, 17, 18, 5, - 6, 20, 8, 4, 10, 11, 12, 13, 14, 15, - 3, 17, 6, 19, 8, 21, 4, 11, 10, 13, - 14, 15, 20, 18, 21, 17, 17, 19, 18, 18, - 60, 18, 18 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const unsigned char yystos[] = -{ - 0, 23, 0, 5, 6, 7, 8, 9, 11, 12, - 13, 14, 15, 16, 17, 18, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 20, 4, 18, 4, 6, - 8, 11, 13, 14, 15, 5, 6, 8, 10, 11, - 12, 13, 14, 15, 17, 19, 21, 3, 20, 17, - 18, 17, 18, 18, 18, 10, 17, 19, 33, 21, - 18, 18, 17, 33 -}; - -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ - -#define YYFAIL goto yyerrlab - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ - goto yybackup; \ - } \ - else \ - { \ - yyerror ("syntax error: cannot back up");\ - YYERROR; \ - } \ -while (0) - -#define YYTERROR 1 -#define YYERRCODE 256 - -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). */ - -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - Current.first_line = Rhs[1].first_line; \ - Current.first_column = Rhs[1].first_column; \ - Current.last_line = Rhs[N].last_line; \ - Current.last_column = Rhs[N].last_column; -#endif - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (0) - -# define YYDSYMPRINT(Args) \ -do { \ - if (yydebug) \ - yysymprint Args; \ -} while (0) - -# define YYDSYMPRINTF(Title, Token, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yysymprint (stderr, \ - Token, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (0) - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (cinluded). | -`------------------------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_stack_print (short *bottom, short *top) -#else -static void -yy_stack_print (bottom, top) - short *bottom; - short *top; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (/* Nothing. */; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (0) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yy_reduce_print (int yyrule) -#else -static void -yy_reduce_print (yyrule) - int yyrule; -#endif -{ - int yyi; - unsigned int yylineno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ", - yyrule - 1, yylineno); - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++) - YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]); - YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]); -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (Rule); \ -} while (0) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YYDSYMPRINT(Args) -# define YYDSYMPRINTF(Title, Token, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#if YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) -yystrlen (const char *yystr) -# else -yystrlen (yystr) - const char *yystr; -# endif -{ - register const char *yys = yystr; - - while (*yys++ != '\0') - continue; - - return yys - yystr - 1; -} -# endif -# endif - -# ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -static char * -# if defined (__STDC__) || defined (__cplusplus) -yystpcpy (char *yydest, const char *yysrc) -# else -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif -{ - register char *yyd = yydest; - register const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -#endif /* !YYERROR_VERBOSE */ - - - -#if YYDEBUG -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep) -#else -static void -yysymprint (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - if (yytype < YYNTOKENS) - { - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); -# ifdef YYPRINT - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# endif - } - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - switch (yytype) - { - default: - break; - } - YYFPRINTF (yyoutput, ")"); -} - -#endif /* ! YYDEBUG */ -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -#if defined (__STDC__) || defined (__cplusplus) -static void -yydestruct (int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yytype, yyvaluep) - int yytype; - YYSTYPE *yyvaluep; -#endif -{ - /* Pacify ``unused variable'' warnings. */ - (void) yyvaluep; - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM); -# else -int yyparse (); -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - - - - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -int yyparse (void *YYPARSE_PARAM) -# else -int yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -# endif -#else /* ! YYPARSE_PARAM */ -#if defined (__STDC__) || defined (__cplusplus) -int -yyparse (void) -#else -int -yyparse () - -#endif -#endif -{ - /* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Number of syntax errors so far. */ -int yynerrs; - - register int yystate; - register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yytoken = 0; - - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; - - - -#define YYPOPSTACK (yyvsp--, yyssp--) - - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyoverflowlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyoverflowlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - short *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ - - /* First try to decide what to do without reference to lookahead token. */ - - yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; - - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - yystate = yyn; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 4: -#line 195 "getdate.y" - { PC.times_seen++; } - break; - - case 5: -#line 197 "getdate.y" - { PC.local_zones_seen++; } - break; - - case 6: -#line 199 "getdate.y" - { PC.zones_seen++; } - break; - - case 7: -#line 201 "getdate.y" - { PC.dates_seen++; } - break; - - case 8: -#line 203 "getdate.y" - { PC.days_seen++; } - break; - - case 9: -#line 205 "getdate.y" - { PC.rels_seen++; } - break; - - case 11: -#line 211 "getdate.y" - { - PC.hour = yyvsp[-1].textintval.value; - PC.minutes = 0; - PC.seconds = 0; - PC.meridian = yyvsp[0].intval; - } - break; - - case 12: -#line 218 "getdate.y" - { - PC.hour = yyvsp[-3].textintval.value; - PC.minutes = yyvsp[-1].textintval.value; - PC.seconds = 0; - PC.meridian = yyvsp[0].intval; - } - break; - - case 13: -#line 225 "getdate.y" - { - PC.hour = yyvsp[-3].textintval.value; - PC.minutes = yyvsp[-1].textintval.value; - PC.meridian = MER24; - PC.zones_seen++; - PC.time_zone = yyvsp[0].textintval.value % 100 + (yyvsp[0].textintval.value / 100) * 60; - } - break; - - case 14: -#line 233 "getdate.y" - { - PC.hour = yyvsp[-5].textintval.value; - PC.minutes = yyvsp[-3].textintval.value; - PC.seconds = yyvsp[-1].textintval.value; - PC.meridian = yyvsp[0].intval; - } - break; - - case 15: -#line 240 "getdate.y" - { - PC.hour = yyvsp[-5].textintval.value; - PC.minutes = yyvsp[-3].textintval.value; - PC.seconds = yyvsp[-1].textintval.value; - PC.meridian = MER24; - PC.zones_seen++; - PC.time_zone = yyvsp[0].textintval.value % 100 + (yyvsp[0].textintval.value / 100) * 60; - } - break; - - case 16: -#line 252 "getdate.y" - { PC.local_isdst = yyvsp[0].intval; } - break; - - case 17: -#line 254 "getdate.y" - { PC.local_isdst = yyvsp[-1].intval < 0 ? 1 : yyvsp[-1].intval + 1; } - break; - - case 18: -#line 259 "getdate.y" - { PC.time_zone = yyvsp[0].intval; } - break; - - case 19: -#line 261 "getdate.y" - { PC.time_zone = yyvsp[0].intval + 60; } - break; - - case 20: -#line 263 "getdate.y" - { PC.time_zone = yyvsp[-1].intval + 60; } - break; - - case 21: -#line 268 "getdate.y" - { - PC.day_ordinal = 1; - PC.day_number = yyvsp[0].intval; - } - break; - - case 22: -#line 273 "getdate.y" - { - PC.day_ordinal = 1; - PC.day_number = yyvsp[-1].intval; - } - break; - - case 23: -#line 278 "getdate.y" - { - PC.day_ordinal = yyvsp[-1].textintval.value; - PC.day_number = yyvsp[0].intval; - } - break; - - case 24: -#line 286 "getdate.y" - { - PC.month = yyvsp[-2].textintval.value; - PC.day = yyvsp[0].textintval.value; - } - break; - - case 25: -#line 291 "getdate.y" - { - /* Interpret as YYYY/MM/DD if the first value has 4 or more digits, - otherwise as MM/DD/YY. - The goal in recognizing YYYY/MM/DD is solely to support legacy - machine-generated dates like those in an RCS log listing. If - you want portability, use the ISO 8601 format. */ - if (4 <= yyvsp[-4].textintval.digits) - { - PC.year = yyvsp[-4].textintval; - PC.month = yyvsp[-2].textintval.value; - PC.day = yyvsp[0].textintval.value; - } - else - { - PC.month = yyvsp[-4].textintval.value; - PC.day = yyvsp[-2].textintval.value; - PC.year = yyvsp[0].textintval; - } - } - break; - - case 26: -#line 311 "getdate.y" - { - /* ISO 8601 format. YYYY-MM-DD. */ - PC.year = yyvsp[-2].textintval; - PC.month = -yyvsp[-1].textintval.value; - PC.day = -yyvsp[0].textintval.value; - } - break; - - case 27: -#line 318 "getdate.y" - { - /* e.g. 17-JUN-1992. */ - PC.day = yyvsp[-2].textintval.value; - PC.month = yyvsp[-1].intval; - PC.year.value = -yyvsp[0].textintval.value; - PC.year.digits = yyvsp[0].textintval.digits; - } - break; - - case 28: -#line 326 "getdate.y" - { - PC.month = yyvsp[-1].intval; - PC.day = yyvsp[0].textintval.value; - } - break; - - case 29: -#line 331 "getdate.y" - { - PC.month = yyvsp[-3].intval; - PC.day = yyvsp[-2].textintval.value; - PC.year = yyvsp[0].textintval; - } - break; - - case 30: -#line 337 "getdate.y" - { - PC.day = yyvsp[-1].textintval.value; - PC.month = yyvsp[0].intval; - } - break; - - case 31: -#line 342 "getdate.y" - { - PC.day = yyvsp[-2].textintval.value; - PC.month = yyvsp[-1].intval; - PC.year = yyvsp[0].textintval; - } - break; - - case 32: -#line 351 "getdate.y" - { - PC.rel_seconds = -PC.rel_seconds; - PC.rel_minutes = -PC.rel_minutes; - PC.rel_hour = -PC.rel_hour; - PC.rel_day = -PC.rel_day; - PC.rel_month = -PC.rel_month; - PC.rel_year = -PC.rel_year; - } - break; - - case 34: -#line 364 "getdate.y" - { PC.rel_year += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 35: -#line 366 "getdate.y" - { PC.rel_year += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 36: -#line 368 "getdate.y" - { PC.rel_year += yyvsp[0].intval; } - break; - - case 37: -#line 370 "getdate.y" - { PC.rel_month += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 38: -#line 372 "getdate.y" - { PC.rel_month += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 39: -#line 374 "getdate.y" - { PC.rel_month += yyvsp[0].intval; } - break; - - case 40: -#line 376 "getdate.y" - { PC.rel_day += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 41: -#line 378 "getdate.y" - { PC.rel_day += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 42: -#line 380 "getdate.y" - { PC.rel_day += yyvsp[0].intval; } - break; - - case 43: -#line 382 "getdate.y" - { PC.rel_hour += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 44: -#line 384 "getdate.y" - { PC.rel_hour += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 45: -#line 386 "getdate.y" - { PC.rel_hour += yyvsp[0].intval; } - break; - - case 46: -#line 388 "getdate.y" - { PC.rel_minutes += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 47: -#line 390 "getdate.y" - { PC.rel_minutes += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 48: -#line 392 "getdate.y" - { PC.rel_minutes += yyvsp[0].intval; } - break; - - case 49: -#line 394 "getdate.y" - { PC.rel_seconds += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 50: -#line 396 "getdate.y" - { PC.rel_seconds += yyvsp[-1].textintval.value * yyvsp[0].intval; } - break; - - case 51: -#line 398 "getdate.y" - { PC.rel_seconds += yyvsp[0].intval; } - break; - - case 52: -#line 403 "getdate.y" - { - if (PC.dates_seen - && ! PC.rels_seen && (PC.times_seen || 2 < yyvsp[0].textintval.digits)) - PC.year = yyvsp[0].textintval; - else - { - if (4 < yyvsp[0].textintval.digits) - { - PC.dates_seen++; - PC.day = yyvsp[0].textintval.value % 100; - PC.month = (yyvsp[0].textintval.value / 100) % 100; - PC.year.value = yyvsp[0].textintval.value / 10000; - PC.year.digits = yyvsp[0].textintval.digits - 4; - } - else - { - PC.times_seen++; - if (yyvsp[0].textintval.digits <= 2) - { - PC.hour = yyvsp[0].textintval.value; - PC.minutes = 0; - } - else - { - PC.hour = yyvsp[0].textintval.value / 100; - PC.minutes = yyvsp[0].textintval.value % 100; - } - PC.seconds = 0; - PC.meridian = MER24; - } - } - } - break; - - case 53: -#line 439 "getdate.y" - { yyval.intval = MER24; } - break; - - case 54: -#line 441 "getdate.y" - { yyval.intval = yyvsp[0].intval; } - break; - - - } - -/* Line 999 of yacc.c. */ -#line 1593 "getdate.c" - - yyvsp -= yylen; - yyssp -= yylen; - - - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (YYPACT_NINF < yyn && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - int yytype = YYTRANSLATE (yychar); - char *yymsg; - int yyx, yycount; - - yycount = 0; - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - yysize += yystrlen (yytname[yyx]) + 15, yycount++; - yysize += yystrlen ("syntax error, unexpected ") + 1; - yysize += yystrlen (yytname[yytype]); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "syntax error, unexpected "); - yyp = yystpcpy (yyp, yytname[yytype]); - - if (yycount < 5) - { - yycount = 0; - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); - yyx++) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - const char *yyq = ! yycount ? ", expecting " : " or "; - yyp = yystpcpy (yyp, yyq); - yyp = yystpcpy (yyp, yytname[yyx]); - yycount++; - } - } - yyerror (yymsg); - YYSTACK_FREE (yymsg); - } - else - yyerror ("syntax error; also virtual memory exhausted"); - } - else -#endif /* YYERROR_VERBOSE */ - yyerror ("syntax error"); - } - - - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - /* Return failure if at end of input. */ - if (yychar == YYEOF) - { - /* Pop the error token. */ - YYPOPSTACK; - /* Pop the rest of the stack. */ - while (yyss < yyssp) - { - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[*yyssp], yyvsp); - YYPOPSTACK; - } - YYABORT; - } - - YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc); - yydestruct (yytoken, &yylval); - yychar = YYEMPTY; - - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*----------------------------------------------------. -| yyerrlab1 -- error raised explicitly by an action. | -`----------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp); - yydestruct (yystos[yystate], yyvsp); - yyvsp--; - yystate = *--yyssp; - - YY_STACK_PRINT (yyss, yyssp); - } - - if (yyn == YYFINAL) - YYACCEPT; - - YYDPRINTF ((stderr, "Shifting error token, ")); - - *++yyvsp = yylval; - - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#ifndef yyoverflow -/*----------------------------------------------. -| yyoverflowlab -- parser overflow comes here. | -`----------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif - return yyresult; -} - - -#line 444 "getdate.y" - - -/* Include this file down here because bison inserts code above which - may define-away `const'. We want the prototype for get_date to have - the same signature as the function definition. */ -#include "getdate.h" - - -#ifndef gmtime -struct tm *gmtime (); -#endif -#ifndef localtime -struct tm *localtime (); -#endif -#ifndef mktime -time_t mktime (); -#endif - -static table const meridian_table[] = -{ - { "AM", tMERIDIAN, MERam }, - { "A.M.", tMERIDIAN, MERam }, - { "PM", tMERIDIAN, MERpm }, - { "P.M.", tMERIDIAN, MERpm }, - { 0, 0, 0 } -}; - -static table const dst_table[] = -{ - { "DST", tDST, 0 } -}; - -static table const month_and_day_table[] = -{ - { "JANUARY", tMONTH, 1 }, - { "FEBRUARY", tMONTH, 2 }, - { "MARCH", tMONTH, 3 }, - { "APRIL", tMONTH, 4 }, - { "MAY", tMONTH, 5 }, - { "JUNE", tMONTH, 6 }, - { "JULY", tMONTH, 7 }, - { "AUGUST", tMONTH, 8 }, - { "SEPTEMBER",tMONTH, 9 }, - { "SEPT", tMONTH, 9 }, - { "OCTOBER", tMONTH, 10 }, - { "NOVEMBER", tMONTH, 11 }, - { "DECEMBER", tMONTH, 12 }, - { "SUNDAY", tDAY, 0 }, - { "MONDAY", tDAY, 1 }, - { "TUESDAY", tDAY, 2 }, - { "TUES", tDAY, 2 }, - { "WEDNESDAY",tDAY, 3 }, - { "WEDNES", tDAY, 3 }, - { "THURSDAY", tDAY, 4 }, - { "THUR", tDAY, 4 }, - { "THURS", tDAY, 4 }, - { "FRIDAY", tDAY, 5 }, - { "SATURDAY", tDAY, 6 }, - { 0, 0, 0 } -}; - -static table const time_units_table[] = -{ - { "YEAR", tYEAR_UNIT, 1 }, - { "MONTH", tMONTH_UNIT, 1 }, - { "FORTNIGHT",tDAY_UNIT, 14 }, - { "WEEK", tDAY_UNIT, 7 }, - { "DAY", tDAY_UNIT, 1 }, - { "HOUR", tHOUR_UNIT, 1 }, - { "MINUTE", tMINUTE_UNIT, 1 }, - { "MIN", tMINUTE_UNIT, 1 }, - { "SECOND", tSEC_UNIT, 1 }, - { "SEC", tSEC_UNIT, 1 }, - { 0, 0, 0 } -}; - -/* Assorted relative-time words. */ -static table const relative_time_table[] = -{ - { "TOMORROW", tMINUTE_UNIT, 24 * 60 }, - { "YESTERDAY",tMINUTE_UNIT, - (24 * 60) }, - { "TODAY", tMINUTE_UNIT, 0 }, - { "NOW", tMINUTE_UNIT, 0 }, - { "LAST", tUNUMBER, -1 }, - { "THIS", tUNUMBER, 0 }, - { "NEXT", tUNUMBER, 1 }, - { "FIRST", tUNUMBER, 1 }, -/*{ "SECOND", tUNUMBER, 2 }, */ - { "THIRD", tUNUMBER, 3 }, - { "FOURTH", tUNUMBER, 4 }, - { "FIFTH", tUNUMBER, 5 }, - { "SIXTH", tUNUMBER, 6 }, - { "SEVENTH", tUNUMBER, 7 }, - { "EIGHTH", tUNUMBER, 8 }, - { "NINTH", tUNUMBER, 9 }, - { "TENTH", tUNUMBER, 10 }, - { "ELEVENTH", tUNUMBER, 11 }, - { "TWELFTH", tUNUMBER, 12 }, - { "AGO", tAGO, 1 }, - { 0, 0, 0 } -}; - -/* The time zone table. This table is necessarily incomplete, as time - zone abbreviations are ambiguous; e.g. Australians interpret "EST" - as Eastern time in Australia, not as US Eastern Standard Time. - You cannot rely on getdate to handle arbitrary time zone - abbreviations; use numeric abbreviations like `-0500' instead. */ -static table const time_zone_table[] = -{ - { "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */ - { "UT", tZONE, HOUR ( 0) }, /* Universal (Coordinated) */ - { "UTC", tZONE, HOUR ( 0) }, - { "WET", tZONE, HOUR ( 0) }, /* Western European */ - { "WEST", tDAYZONE, HOUR ( 0) }, /* Western European Summer */ - { "BST", tDAYZONE, HOUR ( 0) }, /* British Summer */ - { "ART", tZONE, -HOUR ( 3) }, /* Argentina */ - { "BRT", tZONE, -HOUR ( 3) }, /* Brazil */ - { "BRST", tDAYZONE, -HOUR ( 3) }, /* Brazil Summer */ - { "NST", tZONE, -(HOUR ( 3) + 30) }, /* Newfoundland Standard */ - { "NDT", tDAYZONE,-(HOUR ( 3) + 30) }, /* Newfoundland Daylight */ - { "AST", tZONE, -HOUR ( 4) }, /* Atlantic Standard */ - { "ADT", tDAYZONE, -HOUR ( 4) }, /* Atlantic Daylight */ - { "CLT", tZONE, -HOUR ( 4) }, /* Chile */ - { "CLST", tDAYZONE, -HOUR ( 4) }, /* Chile Summer */ - { "EST", tZONE, -HOUR ( 5) }, /* Eastern Standard */ - { "EDT", tDAYZONE, -HOUR ( 5) }, /* Eastern Daylight */ - { "CST", tZONE, -HOUR ( 6) }, /* Central Standard */ - { "CDT", tDAYZONE, -HOUR ( 6) }, /* Central Daylight */ - { "MST", tZONE, -HOUR ( 7) }, /* Mountain Standard */ - { "MDT", tDAYZONE, -HOUR ( 7) }, /* Mountain Daylight */ - { "PST", tZONE, -HOUR ( 8) }, /* Pacific Standard */ - { "PDT", tDAYZONE, -HOUR ( 8) }, /* Pacific Daylight */ - { "AKST", tZONE, -HOUR ( 9) }, /* Alaska Standard */ - { "AKDT", tDAYZONE, -HOUR ( 9) }, /* Alaska Daylight */ - { "HST", tZONE, -HOUR (10) }, /* Hawaii Standard */ - { "HAST", tZONE, -HOUR (10) }, /* Hawaii-Aleutian Standard */ - { "HADT", tDAYZONE, -HOUR (10) }, /* Hawaii-Aleutian Daylight */ - { "SST", tZONE, -HOUR (12) }, /* Samoa Standard */ - { "WAT", tZONE, HOUR ( 1) }, /* West Africa */ - { "CET", tZONE, HOUR ( 1) }, /* Central European */ - { "CEST", tDAYZONE, HOUR ( 1) }, /* Central European Summer */ - { "MET", tZONE, HOUR ( 1) }, /* Middle European */ - { "MEZ", tZONE, HOUR ( 1) }, /* Middle European */ - { "MEST", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ - { "MESZ", tDAYZONE, HOUR ( 1) }, /* Middle European Summer */ - { "EET", tZONE, HOUR ( 2) }, /* Eastern European */ - { "EEST", tDAYZONE, HOUR ( 2) }, /* Eastern European Summer */ - { "CAT", tZONE, HOUR ( 2) }, /* Central Africa */ - { "SAST", tZONE, HOUR ( 2) }, /* South Africa Standard */ - { "EAT", tZONE, HOUR ( 3) }, /* East Africa */ - { "MSK", tZONE, HOUR ( 3) }, /* Moscow */ - { "MSD", tDAYZONE, HOUR ( 3) }, /* Moscow Daylight */ - { "IST", tZONE, (HOUR ( 5) + 30) }, /* India Standard */ - { "SGT", tZONE, HOUR ( 8) }, /* Singapore */ - { "KST", tZONE, HOUR ( 9) }, /* Korea Standard */ - { "JST", tZONE, HOUR ( 9) }, /* Japan Standard */ - { "GST", tZONE, HOUR (10) }, /* Guam Standard */ - { "NZST", tZONE, HOUR (12) }, /* New Zealand Standard */ - { "NZDT", tDAYZONE, HOUR (12) }, /* New Zealand Daylight */ - { 0, 0, 0 } -}; - -/* Military time zone table. */ -static table const military_table[] = -{ - { "A", tZONE, -HOUR ( 1) }, - { "B", tZONE, -HOUR ( 2) }, - { "C", tZONE, -HOUR ( 3) }, - { "D", tZONE, -HOUR ( 4) }, - { "E", tZONE, -HOUR ( 5) }, - { "F", tZONE, -HOUR ( 6) }, - { "G", tZONE, -HOUR ( 7) }, - { "H", tZONE, -HOUR ( 8) }, - { "I", tZONE, -HOUR ( 9) }, - { "K", tZONE, -HOUR (10) }, - { "L", tZONE, -HOUR (11) }, - { "M", tZONE, -HOUR (12) }, - { "N", tZONE, HOUR ( 1) }, - { "O", tZONE, HOUR ( 2) }, - { "P", tZONE, HOUR ( 3) }, - { "Q", tZONE, HOUR ( 4) }, - { "R", tZONE, HOUR ( 5) }, - { "S", tZONE, HOUR ( 6) }, - { "T", tZONE, HOUR ( 7) }, - { "U", tZONE, HOUR ( 8) }, - { "V", tZONE, HOUR ( 9) }, - { "W", tZONE, HOUR (10) }, - { "X", tZONE, HOUR (11) }, - { "Y", tZONE, HOUR (12) }, - { "Z", tZONE, HOUR ( 0) }, - { 0, 0, 0 } -}; - - - -static int -to_hour (int hours, int meridian) -{ - switch (meridian) - { - case MER24: - return 0 <= hours && hours < 24 ? hours : -1; - case MERam: - return 0 < hours && hours < 12 ? hours : hours == 12 ? 0 : -1; - case MERpm: - return 0 < hours && hours < 12 ? hours + 12 : hours == 12 ? 12 : -1; - default: - abort (); - } - /* NOTREACHED */ -} - -static int -to_year (textint textyear) -{ - int year = textyear.value; - - if (year < 0) - year = -year; - - /* XPG4 suggests that years 00-68 map to 2000-2068, and - years 69-99 map to 1969-1999. */ - if (textyear.digits == 2) - year += year < 69 ? 2000 : 1900; - - return year; -} - -static table const * -lookup_zone (parser_control const *pc, char const *name) -{ - table const *tp; - - /* Try local zone abbreviations first; they're more likely to be right. */ - for (tp = pc->local_time_zone_table; tp->name; tp++) - if (strcmp (name, tp->name) == 0) - return tp; - - for (tp = time_zone_table; tp->name; tp++) - if (strcmp (name, tp->name) == 0) - return tp; - - return 0; -} - -#if ! HAVE_TM_GMTOFF -/* Yield the difference between *A and *B, - measured in seconds, ignoring leap seconds. - The body of this function is taken directly from the GNU C Library; - see src/strftime.c. */ -static int -tm_diff (struct tm const *a, struct tm const *b) -{ - /* Compute intervening leap days correctly even if year is negative. - Take care to avoid int overflow in leap day calculations, - but it's OK to assume that A and B are close to each other. */ - int a4 = (a->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (a->tm_year & 3); - int b4 = (b->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (b->tm_year & 3); - int a100 = a4 / 25 - (a4 % 25 < 0); - int b100 = b4 / 25 - (b4 % 25 < 0); - int a400 = a100 >> 2; - int b400 = b100 >> 2; - int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400); - int years = a->tm_year - b->tm_year; - int days = (365 * years + intervening_leap_days - + (a->tm_yday - b->tm_yday)); - return (60 * (60 * (24 * days + (a->tm_hour - b->tm_hour)) - + (a->tm_min - b->tm_min)) - + (a->tm_sec - b->tm_sec)); -} -#endif /* ! HAVE_TM_GMTOFF */ - -static table const * -lookup_word (parser_control const *pc, char *word) -{ - char *p; - char *q; - size_t wordlen; - table const *tp; - int i; - int abbrev; - - /* Make it uppercase. */ - for (p = word; *p; p++) - if (ISLOWER ((unsigned char) *p)) - *p = toupper ((unsigned char) *p); - - for (tp = meridian_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - - /* See if we have an abbreviation for a month. */ - wordlen = strlen (word); - abbrev = wordlen == 3 || (wordlen == 4 && word[3] == '.'); - - for (tp = month_and_day_table; tp->name; tp++) - if ((abbrev ? strncmp (word, tp->name, 3) : strcmp (word, tp->name)) == 0) - return tp; - - if ((tp = lookup_zone (pc, word))) - return tp; - - if (strcmp (word, dst_table[0].name) == 0) - return dst_table; - - for (tp = time_units_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - - /* Strip off any plural and try the units table again. */ - if (word[wordlen - 1] == 'S') - { - word[wordlen - 1] = '\0'; - for (tp = time_units_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - word[wordlen - 1] = 'S'; /* For "this" in relative_time_table. */ - } - - for (tp = relative_time_table; tp->name; tp++) - if (strcmp (word, tp->name) == 0) - return tp; - - /* Military time zones. */ - if (wordlen == 1) - for (tp = military_table; tp->name; tp++) - if (word[0] == tp->name[0]) - return tp; - - /* Drop out any periods and try the time zone table again. */ - for (i = 0, p = q = word; (*p = *q); q++) - if (*q == '.') - i = 1; - else - p++; - if (i && (tp = lookup_zone (pc, word))) - return tp; - - return 0; -} - -static int -yylex (YYSTYPE *lvalp, parser_control *pc) -{ - unsigned char c; - int count; - - for (;;) - { - while (c = *pc->input, ISSPACE (c)) - pc->input++; - - if (ISDIGIT (c) || c == '-' || c == '+') - { - char const *p; - int sign; - int value; - if (c == '-' || c == '+') - { - sign = c == '-' ? -1 : 1; - c = *++pc->input; - if (! ISDIGIT (c)) - /* skip the '-' sign */ - continue; - } - else - sign = 0; - p = pc->input; - value = 0; - do - { - value = 10 * value + c - '0'; - c = *++p; - } - while (ISDIGIT (c)); - lvalp->textintval.value = sign < 0 ? -value : value; - lvalp->textintval.digits = p - pc->input; - pc->input = p; - return sign ? tSNUMBER : tUNUMBER; - } - - if (ISALPHA (c)) - { - char buff[20]; - char *p = buff; - table const *tp; - - do - { - if (p < buff + sizeof buff - 1) - *p++ = c; - c = *++pc->input; - } - while (ISALPHA (c) || c == '.'); - - *p = '\0'; - tp = lookup_word (pc, buff); - if (! tp) - return '?'; - lvalp->intval = tp->value; - return tp->type; - } - - if (c != '(') - return *pc->input++; - count = 0; - do - { - c = *pc->input++; - if (c == '\0') - return c; - if (c == '(') - count++; - else if (c == ')') - count--; - } - while (count > 0); - } -} - -/* Do nothing if the parser reports an error. */ -static int -yyerror (char *s ATTRIBUTE_UNUSED) -{ - return 0; -} - -/* Parse a date/time string P. Return the corresponding time_t value, - or (time_t) -1 if there is an error. P can be an incomplete or - relative time specification; if so, use *NOW as the basis for the - returned time. */ -time_t -get_date (const char *p, const time_t *now) -{ - time_t Start = now ? *now : time (0); - struct tm *tmp = localtime (&Start); - struct tm tm; - struct tm tm0; - parser_control pc; - - if (! tmp) - return -1; - - pc.input = p; - pc.year.value = tmp->tm_year + TM_YEAR_BASE; - pc.year.digits = 4; - pc.month = tmp->tm_mon + 1; - pc.day = tmp->tm_mday; - pc.hour = tmp->tm_hour; - pc.minutes = tmp->tm_min; - pc.seconds = tmp->tm_sec; - tm.tm_isdst = tmp->tm_isdst; - - pc.meridian = MER24; - pc.rel_seconds = 0; - pc.rel_minutes = 0; - pc.rel_hour = 0; - pc.rel_day = 0; - pc.rel_month = 0; - pc.rel_year = 0; - pc.dates_seen = 0; - pc.days_seen = 0; - pc.rels_seen = 0; - pc.times_seen = 0; - pc.local_zones_seen = 0; - pc.zones_seen = 0; - -#if HAVE_STRUCT_TM_TM_ZONE - pc.local_time_zone_table[0].name = tmp->tm_zone; - pc.local_time_zone_table[0].type = tLOCAL_ZONE; - pc.local_time_zone_table[0].value = tmp->tm_isdst; - pc.local_time_zone_table[1].name = 0; - - /* Probe the names used in the next three calendar quarters, looking - for a tm_isdst different from the one we already have. */ - { - int quarter; - for (quarter = 1; quarter <= 3; quarter++) - { - time_t probe = Start + quarter * (90 * 24 * 60 * 60); - struct tm *probe_tm = localtime (&probe); - if (probe_tm && probe_tm->tm_zone - && probe_tm->tm_isdst != pc.local_time_zone_table[0].value) - { - { - pc.local_time_zone_table[1].name = probe_tm->tm_zone; - pc.local_time_zone_table[1].type = tLOCAL_ZONE; - pc.local_time_zone_table[1].value = probe_tm->tm_isdst; - pc.local_time_zone_table[2].name = 0; - } - break; - } - } - } -#else -#if HAVE_TZNAME - { -# ifndef tzname - extern char *tzname[]; -# endif - int i; - for (i = 0; i < 2; i++) - { - pc.local_time_zone_table[i].name = tzname[i]; - pc.local_time_zone_table[i].type = tLOCAL_ZONE; - pc.local_time_zone_table[i].value = i; - } - pc.local_time_zone_table[i].name = 0; - } -#else - pc.local_time_zone_table[0].name = 0; -#endif -#endif - - if (pc.local_time_zone_table[0].name && pc.local_time_zone_table[1].name - && ! strcmp (pc.local_time_zone_table[0].name, - pc.local_time_zone_table[1].name)) - { - /* This locale uses the same abbrevation for standard and - daylight times. So if we see that abbreviation, we don't - know whether it's daylight time. */ - pc.local_time_zone_table[0].value = -1; - pc.local_time_zone_table[1].name = 0; - } - - if (yyparse (&pc) != 0 - || 1 < pc.times_seen || 1 < pc.dates_seen || 1 < pc.days_seen - || 1 < (pc.local_zones_seen + pc.zones_seen) - || (pc.local_zones_seen && 1 < pc.local_isdst)) - return -1; - - tm.tm_year = to_year (pc.year) - TM_YEAR_BASE + pc.rel_year; - tm.tm_mon = pc.month - 1 + pc.rel_month; - tm.tm_mday = pc.day + pc.rel_day; - if (pc.times_seen || (pc.rels_seen && ! pc.dates_seen && ! pc.days_seen)) - { - tm.tm_hour = to_hour (pc.hour, pc.meridian); - if (tm.tm_hour < 0) - return -1; - tm.tm_min = pc.minutes; - tm.tm_sec = pc.seconds; - } - else - { - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - } - - /* Let mktime deduce tm_isdst if we have an absolute time stamp, - or if the relative time stamp mentions days, months, or years. */ - if (pc.dates_seen | pc.days_seen | pc.times_seen | pc.rel_day - | pc.rel_month | pc.rel_year) - tm.tm_isdst = -1; - - /* But if the input explicitly specifies local time with or without - DST, give mktime that information. */ - if (pc.local_zones_seen) - tm.tm_isdst = pc.local_isdst; - - tm0 = tm; - - Start = mktime (&tm); - - if (Start == (time_t) -1) - { - - /* Guard against falsely reporting errors near the time_t boundaries - when parsing times in other time zones. For example, if the min - time_t value is 1970-01-01 00:00:00 UTC and we are 8 hours ahead - of UTC, then the min localtime value is 1970-01-01 08:00:00; if - we apply mktime to 1970-01-01 00:00:00 we will get an error, so - we apply mktime to 1970-01-02 08:00:00 instead and adjust the time - zone by 24 hours to compensate. This algorithm assumes that - there is no DST transition within a day of the time_t boundaries. */ - if (pc.zones_seen) - { - tm = tm0; - if (tm.tm_year <= EPOCH_YEAR - TM_YEAR_BASE) - { - tm.tm_mday++; - pc.time_zone += 24 * 60; - } - else - { - tm.tm_mday--; - pc.time_zone -= 24 * 60; - } - Start = mktime (&tm); - } - - if (Start == (time_t) -1) - return Start; - } - - if (pc.days_seen && ! pc.dates_seen) - { - tm.tm_mday += ((pc.day_number - tm.tm_wday + 7) % 7 - + 7 * (pc.day_ordinal - (0 < pc.day_ordinal))); - tm.tm_isdst = -1; - Start = mktime (&tm); - if (Start == (time_t) -1) - return Start; - } - - if (pc.zones_seen) - { - int delta = pc.time_zone * 60; -#ifdef HAVE_TM_GMTOFF - delta -= tm.tm_gmtoff; -#else - struct tm *gmt = gmtime (&Start); - if (! gmt) - return -1; - delta -= tm_diff (&tm, gmt); -#endif - if ((Start < Start - delta) != (delta < 0)) - return -1; /* time_t overflow */ - Start -= delta; - } - - /* Add relative hours, minutes, and seconds. Ignore leap seconds; - i.e. "+ 10 minutes" means 600 seconds, even if one of them is a - leap second. Typically this is not what the user wants, but it's - too hard to do it the other way, because the time zone indicator - must be applied before relative times, and if mktime is applied - again the time zone will be lost. */ - { - time_t t0 = Start; - long d1 = 60 * 60 * (long) pc.rel_hour; - time_t t1 = t0 + d1; - long d2 = 60 * (long) pc.rel_minutes; - time_t t2 = t1 + d2; - int d3 = pc.rel_seconds; - time_t t3 = t2 + d3; - if ((d1 / (60 * 60) ^ pc.rel_hour) - | (d2 / 60 ^ pc.rel_minutes) - | ((t0 + d1 < t0) ^ (d1 < 0)) - | ((t1 + d2 < t1) ^ (d2 < 0)) - | ((t2 + d3 < t2) ^ (d3 < 0))) - return -1; - Start = t3; - } - - return Start; -} - -#if TEST - -#include - -int -main (int ac, char **av) -{ - char buff[BUFSIZ]; - time_t d; - - printf ("Enter date, or blank line to exit.\n\t> "); - fflush (stdout); - - buff[BUFSIZ - 1] = 0; - while (fgets (buff, BUFSIZ - 1, stdin) && buff[0]) - { - d = get_date (buff, 0); - if (d == (time_t) -1) - printf ("Bad format - couldn't convert.\n"); - else - printf ("%s", ctime (&d)); - printf ("\t> "); - fflush (stdout); - } - return 0; -} -#endif /* defined TEST */ - - diff -Nru electricsheep-2.7~b12+svn20091224/getdate.h electricsheep-3.0.2-git20180325/getdate.h --- electricsheep-2.7~b12+svn20091224/getdate.h 2005-02-07 09:47:04.000000000 +0000 +++ electricsheep-3.0.2-git20180325/getdate.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,46 +0,0 @@ -/* Copyright (C) 1995, 1997, 1998 Free Software Foundation, Inc. - - 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, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -#if HAVE_CONFIG_H -# include -#endif - -#ifndef PARAMS -# if defined PROTOTYPES || (defined __STDC__ && __STDC__) -# define PARAMS(Args) Args -# else -# define PARAMS(Args) () -# endif -#endif - -#ifdef vms -# include -# include -#else -# include -# if TIME_WITH_SYS_TIME -# include -# include -# else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif -# endif -#endif /* defined (vms) */ - -time_t get_date PARAMS ((const char *p, const time_t *now)); diff -Nru electricsheep-2.7~b12+svn20091224/.gitignore electricsheep-3.0.2-git20180325/.gitignore --- electricsheep-2.7~b12+svn20091224/.gitignore 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/.gitignore 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,5 @@ +client_generic/boost/include/boost +client_generic/boost/include +client_generic/MacBuild/build +client_generic/MacBuild/ElectricSheep.xcodeproj/xcuserdata +client_generic/MacBuild/ElectricSheep.xcodeproj/project.xcworkspace diff -Nru electricsheep-2.7~b12+svn20091224/InstallerMSVC/nsis_installer.nsi electricsheep-3.0.2-git20180325/InstallerMSVC/nsis_installer.nsi --- electricsheep-2.7~b12+svn20091224/InstallerMSVC/nsis_installer.nsi 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/InstallerMSVC/nsis_installer.nsi 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,397 @@ +; Script generated by the HM NIS Edit Script Wizard. + +; HM NIS Edit Wizard helper defines +!define PRODUCT_NAME "Electric Sheep" +!define PRODUCT_SCR_STRING "es.scr" +!define PRODUCT_EXE_STRING "es.exe" +!define PRODUCT_VERSION "3.0" +!define PRODUCT_PUBLISHER "Electricsheep" +!define PRODUCT_WEB_SITE "http://www.electricsheep.org" +!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Flam3.exe" +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" +!define PRODUCT_UNINST_ROOT_KEY "HKLM" + +SetCompressor /SOLID /FINAL zlib +XPStyle on +;Icon "..\client\app.ico" ; must be 32x32x16 +;UninstallIcon "..\client\app.ico" +;AllowSkipFiles off +RequestExecutionLevel admin + +; MUI 1.67 compatible ------ +!include "MUI.nsh" +!include "readme.nsh" +;!include "addtopath.nsh" + +; MUI Settings +!define MUI_ABORTWARNING +!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico" +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" + +; Welcome page +!insertmacro MUI_PAGE_WELCOME + +; Readme page +!insertmacro MUI_PAGE_README "..\Runtime\Instructions.rtf" + +; License page +!insertmacro MUI_PAGE_LICENSE "..\Runtime\License.rtf" + +; Directory page +!insertmacro MUI_PAGE_DIRECTORY + +; Instfiles page +!insertmacro MUI_PAGE_INSTFILES + +; Finish page +;!define MUI_PAGE_CUSTOMFUNCTION_PRE CustomOptions +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_INSTFILES + +; Language files +!insertmacro MUI_LANGUAGE "English" + +; MUI end ------ + +Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" +OutFile "Setup.exe" +InstallDir "$PROGRAMFILES\Electric Sheep" +InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" +ShowInstDetails show +ShowUnInstDetails show + +Section "MainSection" SEC01 + SetOverwrite on + SetOutPath "$TEMP" ; DirectX SDK components + File "..\RuntimeMSVC\Jun2010_D3DCompiler_43_x86.cab" + File "..\RuntimeMSVC\Jun2010_d3dx9_43_x86.cab" + File "..\RuntimeMSVC\dsetup32.dll" + File "..\RuntimeMSVC\DSETUP.dll" + File "..\RuntimeMSVC\dxdllreg_x86.cab" + File "..\RuntimeMSVC\dxnt.cab" + File "..\RuntimeMSVC\DXSETUP.exe" + File "..\RuntimeMSVC\dxupdate.cab" + + ExecWait '"$TEMP\DXSETUP.exe" /silent' + Delete "..\RuntimeMSVC\Jun2010_D3DCompiler_43_x86.cab" + Delete "..\RuntimeMSVC\Jun2010_d3dx9_43_x86.cab" + Delete "..\RuntimeMSVC\dsetup32.dll" + Delete "..\RuntimeMSVC\DSETUP.dll" + Delete "..\RuntimeMSVC\dxdllreg_x86.cab" + Delete "..\RuntimeMSVC\dxnt.cab" + Delete "..\RuntimeMSVC\DXSETUP.exe" + Delete "..\RuntimeMSVC\dxupdate.cab" + + SetOutPath "$WINDIR" + File "..\RuntimeMSVC\${PRODUCT_EXE_STRING}" + File "..\RuntimeMSVC\${PRODUCT_SCR_STRING}" + File "..\RuntimeMSVC\exchndl.dll" ; RPT debugging + + File "..\RuntimeMSVC\pthreadGC2.dll" ; for flam3 + + File "..\RuntimeMSVC\avcodec-57.dll" ; for ffmpeg + File "..\RuntimeMSVC\avformat-57.dll" ; for ffmpeg + File "..\RuntimeMSVC\avutil-55.dll" ; for ffmpeg + File "..\RuntimeMSVC\swresample-2.dll" ; for ffmpeg + File "..\RuntimeMSVC\swscale-4.dll" ; for ffmpeg + + SetOutPath "$INSTDIR" + + CreateShortCut "$INSTDIR\SheepConfig.lnk" "$INSTDIR\settingsgui.exe" + + File "..\RuntimeMSVC\setacl.exe" + + File "..\RuntimeMSVC\electricsheep-smile.png" + File "..\RuntimeMSVC\electricsheep-frown.png" + File "..\RuntimeMSVC\electricsheep-attr.png" + File "..\RuntimeMSVC\Instructions.rtf" + File "..\RuntimeMSVC\License.rtf" + File "..\RuntimeMSVC\logo.png" + ;exe files + File "..\RuntimeMSVC\flam3-animate.exe" + File "..\RuntimeMSVC\settingsgui.exe" + ;scripts + SetOutPath "$INSTDIR\Scripts" + File "..\RuntimeMSVC\Scripts\class.lua" + File "..\RuntimeMSVC\Scripts\histogram.lua" + File "..\RuntimeMSVC\Scripts\playlist.lua" + File "..\RuntimeMSVC\Scripts\pq.lua" + File "..\RuntimeMSVC\Scripts\serialize.lua" + SetOutPath "$INSTDIR\Scripts\logging" + File "..\RuntimeMSVC\Scripts\logging\console.lua" + File "..\RuntimeMSVC\Scripts\logging\file.lua" + File "..\RuntimeMSVC\Scripts\logging\localized.lua" + File "..\RuntimeMSVC\Scripts\logging\logging.lua" + File "..\RuntimeMSVC\Scripts\logging\null.lua" + + SetShellVarContext all + CreateDirectory "$APPDATA\ElectricSheep" + AccessControl::GrantOnFile "$APPDATA\ElectricSheep" "(S-1-1-0)" "FullAccess" + CreateDirectory "$APPDATA\ElectricSheep\Logs" + AccessControl::GrantOnFile "$APPDATA\ElectricSheep\Logs" "(S-1-1-0)" "FullAccess" + CreateDirectory "$APPDATA\ElectricSheep\content" + AccessControl::GrantOnFile "$APPDATA\ElectricSheep\content" "(S-1-1-0)" "FullAccess" + AccessControl::GrantOnFile "$WINDIR\${PRODUCT_SCR_STRING}" "(S-1-1-0)" "GenericRead" + AccessControl::GrantOnFile "$WINDIR\${PRODUCT_SCR_STRING}" "(S-1-1-0)" "GenericExecute" + ;CreateDirectory "$APPDATA\ElectricSheep\content\mpeg" + ;AccessControl::GrantOnFile "$APPDATA\ElectricSheep\content\mpeg" "(S-1-1-0)" "FullAccess" + + ;SetOutPath "$APPDATA\ElectricSheep\content\mpeg" + ;File "..\flock100mb\00244=02682=02229=02370.avi" + ;File "..\flock100mb\00244=02710=02370=02256.avi" + ;File "..\flock100mb\00244=02719=02373=02371.avi" + ;File "..\flock100mb\00244=02753=02375=02373.avi" + ;File "..\flock100mb\00244=04027=04027=04027.avi" + ;File "..\flock100mb\00244=04668=02603=02619.avi" + ;File "..\flock100mb\00244=04669=02619=02603.avi" + ;File "..\flock100mb\00244=04822=02619=02378.avi" + ;File "..\flock100mb\00244=04846=02378=04843.avi" + ;File "..\flock100mb\00244=04918=02378=02375.avi" + ;File "..\flock100mb\00244=06309=02764=02619.avi" + ;File "..\flock100mb\00244=06748=02767=02619.avi" + ;File "..\flock100mb\00244=06888=02619=02768.avi" + ;File "..\flock100mb\00244=10482=10482=10482.avi" + ;File "..\flock100mb\00244=11008=02768=05036.avi" + ;File "..\flock100mb\00244=11065=03714=04027.avi" + ;File "..\flock100mb\00244=11066=04027=05963.avi" + ;File "..\flock100mb\00244=11105=11103=04027.avi" + ;File "..\flock100mb\00244=11243=04027=11242.avi" + ;File "..\flock100mb\00244=11843=10482=10461.avi" + ;File "..\flock100mb\00244=11844=05963=10478.avi" + ;File "..\flock100mb\00244=12041=10939=10482.avi" + ;File "..\flock100mb\00244=12049=12047=10939.avi" + ;File "..\flock100mb\00244=12097=12097=12097.avi" + ;File "..\flock100mb\00244=12830=12830=12830.avi" + ;File "..\flock100mb\00244=20602=12079=12098.avi" + ;File "..\flock100mb\00244=20611=20609=12098.avi" + ;File "..\flock100mb\00244=20649=12098=12102.avi" + ;File "..\flock100mb\00244=20678=12102=12830.avi" + ;File "..\flock100mb\00244=20695=12097=12832.avi" + ;File "..\flock100mb\00244=20696=12832=12830.avi" + ;File "..\flock100mb\00244=20730=10478=12835.avi" + ;File "..\flock100mb\00244=20731=12830=02370.avi" + ;File "..\flock100mb\00244=20742=20740=12830.avi" + + SetShellVarContext current + + SetOutPath "$INSTDIR" + Call OptionDestopShortcut + Call OptionCurrentScreensaver + +SectionEnd + +Section -AdditionalIcons + SetShellVarContext all + WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" + CreateDirectory "$SMPROGRAMS\Electric Sheep " + CreateShortCut "$SMPROGRAMS\Electric Sheep\Settings.lnk" "$INSTDIR\settingsgui.exe" + CreateShortCut "$SMPROGRAMS\Electric Sheep\Run Fullscreen.lnk" "$WINDIR\${PRODUCT_EXE_STRING}" "-R" + CreateShortCut "$SMPROGRAMS\Electric Sheep\Run in a window.lnk" "$WINDIR\${PRODUCT_EXE_STRING}" "-X" + CreateShortCut "$SMPROGRAMS\Electric Sheep\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" + CreateShortCut "$SMPROGRAMS\Electric Sheep\Uninstall.lnk" "$INSTDIR\uninst.exe" + SetShellVarContext current +SectionEnd + +Section -Post + WriteUninstaller "$INSTDIR\uninst.exe" + WriteRegStr HKLM SOFTWARE\ElectricSheep "InstallDir" "$INSTDIR" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$WINDIR\es.exe" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" +SectionEnd + + +Function un.onUninstSuccess + HideWindow + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." +FunctionEnd + +Function un.onInit + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 + Abort +FunctionEnd + +Section Uninstall + SetShellVarContext all + MessageBox MB_YESNO "Would you like to save your sheeps?" IDYES SkipSheepDelete + RMDir /r "$APPDATA\ElectricSheep" + SkipSheepDelete: + + Delete "$WINDIR\${PRODUCT_EXE_STRING}" + Delete "$WINDIR\${PRODUCT_SCR_STRING}" + Delete "$WINDIR\exchndl.dll" + + Delete "$WINDIR\pthreadGC2.dll" + +;delete ffmpeg;s dll + Delete "$WINDIR\avcodec-57.dll" + Delete "$WINDIR\avformat-57.dll" + Delete "$WINDIR\avutil-55.dll" + Delete "$WINDIR\swresample-2.dll" + Delete "$WINDIR\swscale-4.dll" + + RMDir /r "$INSTDIR" + +; Push $INSTDIR +; Call un.RemoveFromPath + + + Delete "$APPDATA\ElectricSheep\ElectricSheep.cfg" + RMDir /r "$APPDATA\ElectricSheep\Logs" + RMDir /r "$APPDATA\ElectricSheep\Content\xml" + RMDir /r "$APPDATA\ElectricSheep\Content\jpeg" + Delete "$APPDATA\ElectricSheep\Content\play_counts.*" + + + Delete "$DESKTOP\Electric Sheep.lnk" + Delete "$SMPROGRAMS\Electric Sheep\Settings.lnk" + Delete "$SMPROGRAMS\Electric Sheep\Run Fullscreen.lnk" + Delete "$SMPROGRAMS\Electric Sheep\Run in a window.lnk" + Delete "$SMPROGRAMS\Electric Sheep\Website.lnk" + Delete "$SMPROGRAMS\Electric Sheep\Uninstall.lnk" + RMDir "$SMPROGRAMS\Electric Sheep" + SetShellVarContext current + + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" + DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" + DeleteRegKey HKLM SOFTWARE\ElectricSheep + SetAutoClose true +SectionEnd + +Function OptionDestopShortcut + MessageBox MB_YESNO "Would you like a shortcut on the desktop to start ElectricSheep screensaver?" IDYES +2 + Return + SetShellVarContext all + CreateShortCut "$DESKTOP\Electric Sheep.lnk" "$INSTDIR\settingsgui.exe" + SetShellVarContext current + +FunctionEnd + +Function OptionCurrentScreensaver + MessageBox MB_YESNO "Would you like to make ElectricSheep your current screensaver?" IDYES +2 + Return + WriteRegStr HKCU "Control Panel\Desktop" "ScreenSaveActive" 1 + + call GetWindowsVersion + Pop $R0 + StrCmp $R0 'Vista' lbl_vista + + StrCpy $R0 "$WINDIR\${PRODUCT_SCR_STRING}" + StrCpy $R1 ${NSIS_MAX_STRLEN} + + System::Call 'KERNEL32.DLL::GetShortPathNameA(t, t, i) i(R0., .R0, R1) .R2' + + StrCmp $R2 "0" +2 + WriteRegStr HKCU "Control Panel\Desktop" "SCRNSAVE.EXE" "$R0" + Return + + lbl_vista: + WriteRegStr HKCU "Control Panel\Desktop" "SCRNSAVE.EXE" "$WINDIR\${PRODUCT_SCR_STRING}" + +FunctionEnd + +; GetWindowsVersion +; +; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/ +; Updated by Joost Verburg +; +; Returns on top of stack +; +; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003, Vista) +; or +; '' (Unknown Windows Version) +; +; Usage: +; Call GetWindowsVersion +; Pop $R0 +; ; at this point $R0 is "NT 4.0" or whatnot + +Function GetWindowsVersion + + Push $R0 + Push $R1 + + ClearErrors + + ReadRegStr $R0 HKLM \ + "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + + IfErrors 0 lbl_winnt + + ; we are not NT + ReadRegStr $R0 HKLM \ + "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber + + StrCpy $R1 $R0 1 + StrCmp $R1 '4' 0 lbl_error + + StrCpy $R1 $R0 3 + + StrCmp $R1 '4.0' lbl_win32_95 + StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 + + lbl_win32_95: + StrCpy $R0 '95' + Goto lbl_done + + lbl_win32_98: + StrCpy $R0 '98' + Goto lbl_done + + lbl_win32_ME: + StrCpy $R0 'ME' + Goto lbl_done + + lbl_winnt: + + StrCpy $R1 $R0 1 + + StrCmp $R1 '3' lbl_winnt_x + StrCmp $R1 '4' lbl_winnt_x + + StrCpy $R1 $R0 3 + + StrCmp $R1 '5.0' lbl_winnt_2000 + StrCmp $R1 '5.1' lbl_winnt_XP + StrCmp $R1 '5.2' lbl_winnt_2003 + StrCmp $R1 '6.0' lbl_winnt_vista + StrCmp $R1 '6.1' lbl_winnt_vista lbl_error + + lbl_winnt_x: + StrCpy $R0 "NT $R0" 6 + Goto lbl_done + + lbl_winnt_2000: + Strcpy $R0 '2000' + Goto lbl_done + + lbl_winnt_XP: + Strcpy $R0 'XP' + Goto lbl_done + + lbl_winnt_2003: + Strcpy $R0 '2003' + Goto lbl_done + + lbl_winnt_vista: + Strcpy $R0 'Vista' + Goto lbl_done + + lbl_error: + Strcpy $R0 '' + lbl_done: + + Pop $R1 + Exch $R0 + +FunctionEnd + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/InstallerMSVC/readme.nsh electricsheep-3.0.2-git20180325/InstallerMSVC/readme.nsh --- electricsheep-2.7~b12+svn20091224/InstallerMSVC/readme.nsh 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/InstallerMSVC/readme.nsh 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,60 @@ +# MUI_EXTRAPAGES.nsh +# By Red Wine Jan 2007 + +!verbose push +!verbose 3 + +!ifndef _MUI_EXTRAPAGES_NSH +!define _MUI_EXTRAPAGES_NSH + +!ifmacrondef MUI_EXTRAPAGE_README & MUI_PAGE_README & MUI_UNPAGE_README & ReadmeLangStrings + +!macro MUI_EXTRAPAGE_README UN ReadmeFile +!verbose push +!verbose 3 + !define MUI_PAGE_HEADER_TEXT "$(${UN}ReadmeHeader)" + !define MUI_PAGE_HEADER_SUBTEXT "$(${UN}ReadmeSubHeader)" + !define MUI_LICENSEPAGE_TEXT_TOP "$(${UN}ReadmeTextTop)" + !define MUI_LICENSEPAGE_TEXT_BOTTOM "$(${UN}ReadmeTextBottom)" + !define MUI_LICENSEPAGE_BUTTON "$(^NextBtn)" + !insertmacro MUI_${UN}PAGE_LICENSE "${ReadmeFile}" +!verbose pop +!macroend + +!define ReadmeRun "!insertmacro MUI_EXTRAPAGE_README" + + +!macro MUI_PAGE_README ReadmeFile +!verbose push +!verbose 3 + ${ReadmeRun} "" "${ReadmeFile}" +!verbose pop +!macroend + + +!macro MUI_UNPAGE_README ReadmeFile +!verbose push +!verbose 3 + ${ReadmeRun} "UN" "${ReadmeFile}" +!verbose pop +!macroend + + +!macro ReadmeLangStrings UN MUI_LANG ReadmeHeader ReadmeSubHeader ReadmeTextTop ReadmeTextBottom +!verbose push +!verbose 3 + LangString ${UN}ReadmeHeader ${MUI_LANG} "${ReadmeHeader}" + LangString ${UN}ReadmeSubHeader ${MUI_LANG} "${ReadmeSubHeader}" + LangString ${UN}ReadmeTextTop ${MUI_LANG} "${ReadmeTextTop}" + LangString ${UN}ReadmeTextBottom ${MUI_LANG} "${ReadmeTextBottom}" +!verbose pop +!macroend + +!define ReadmeLanguage `!insertmacro ReadmeLangStrings ""` + +!define Un.ReadmeLanguage `!insertmacro ReadmeLangStrings "UN"` + +!endif +!endif + +!verbose pop \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/install-sh electricsheep-3.0.2-git20180325/install-sh --- electricsheep-2.7~b12+svn20091224/install-sh 2002-12-12 09:33:34.000000000 +0000 +++ electricsheep-3.0.2-git20180325/install-sh 1970-01-01 00:00:00.000000000 +0000 @@ -1,250 +0,0 @@ -#!/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 diff -Nru electricsheep-2.7~b12+svn20091224/Launcher/main.cpp electricsheep-3.0.2-git20180325/Launcher/main.cpp --- electricsheep-2.7~b12+svn20091224/Launcher/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Launcher/main.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,227 @@ +#ifndef LINUX_GNU +#include +#endif +#include +#include + +// Grab a string from the registry. +HRESULT RegGetString( HKEY hKey, LPCTSTR szValueName, LPTSTR * lpszResult ) +{ + #define MAXBUF 4096 + + // Given a HKEY and value name returns a string from the registry. + // Upon successful return the string should be freed using free(). + // eg. RegGetString(hKey, TEXT("my value"), &szString); + + DWORD dwType = 0, dwDataSize = 0, dwBufSize = 0; + LONG lResult; + + // In case we fail set the return string to null... + if( lpszResult != NULL ) + *lpszResult = NULL; + + // Check input parameters... + if( hKey == NULL || lpszResult == NULL ) + return E_INVALIDARG; + + // Get the length of the string in bytes (placed in dwDataSize)... + lResult = RegQueryValueEx(hKey, szValueName, 0, &dwType, NULL, &dwDataSize ); + + // Check result and make sure the registry value is a string(REG_SZ)... + if( lResult != ERROR_SUCCESS ) + return HRESULT_FROM_WIN32( lResult ); + else if( dwType != REG_SZ ) + return DISP_E_TYPEMISMATCH; + + // Allocate memory for string - We add space for a null terminating character... + dwBufSize = dwDataSize + (1 * sizeof(TCHAR) ); + *lpszResult = (TCHAR *)malloc( dwBufSize ); + + if( *lpszResult == NULL ) + return E_OUTOFMEMORY; + + // Now get the actual string from the registry... + lResult = RegQueryValueEx( hKey, szValueName, 0, &dwType, (LPBYTE)*lpszResult, &dwDataSize ); + + // Check result and type again. If we fail here we must free the memory we allocated... + if( lResult != ERROR_SUCCESS ) + { + free( *lpszResult ); + return HRESULT_FROM_WIN32( lResult ); + } + else if( dwType != REG_SZ ) + { + free( *lpszResult ); + return DISP_E_TYPEMISMATCH; + } + + // We are not guaranteed a null terminated string from RegQueryValueEx so explicitly null terminate the returned string... + (*lpszResult)[ (dwBufSize / sizeof(TCHAR)) - 1 ] = TEXT( '\0' ); + + return NOERROR; +} + + +// Get the application installation directory from the registry. (stored by the installer). +std::string InstallationDirectory() +{ + std::string appdir = ".\\"; + + HKEY key; + if( !RegOpenKey( HKEY_LOCAL_MACHINE, "SOFTWARE\\ElectricSheep", &key ) ) + { + LPTSTR temp; + if( RegGetString( key, TEXT("InstallDir"), &temp ) == NOERROR ) + { + appdir = temp; + free( temp ); + } + else + printf( "Unable to fetch SOFTWARE\\ElectricSheep\\InstallDir" ); + } + else + printf( "Unable to fetch SOFTWARE\\ElectricSheep" ); + + + size_t len = appdir.size(); + if( appdir[ len - 1 ] != '\\' ) + appdir.append( "\\" ); + + return appdir; +} + +// Remove exename from params. +char *ParseCmdLine() +{ + char *lpszCommandLine = GetCommandLine(); + printf( "Cmdline %s\n", lpszCommandLine ); + + // Skip past program name (first token in command line). + if( *lpszCommandLine == '"' ) + { + // Scan, and skip over, subsequent characters until another double-quote or a null is encountered. + while( *lpszCommandLine && (*lpszCommandLine != '"') ) + lpszCommandLine++; + + // If we stopped on a double-quote (usual case), skip over it. + if( *lpszCommandLine == '"' ) + lpszCommandLine++; + } + else + { + // First token wasn't a quote. + while ( *lpszCommandLine > ' ' ) + lpszCommandLine++; + } + + // Skip past any white space preceeding the second token. + while ( *lpszCommandLine && (*lpszCommandLine <= ' ') ) + lpszCommandLine++; + + return lpszCommandLine; +} + +// +HWND g_ClientWin; +int CALLBACK EnumWindowsProc( HWND hwnd, LPARAM param ) +{ + DWORD pID; + DWORD TpID = GetWindowThreadProcessId( hwnd, &pID ); + if( TpID == (DWORD)param ) + { + g_ClientWin = hwnd; + return false; + } + return true; +} + +// +int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) +{ + FILE *stream ; + if( (stream = freopen( "c:\\es_launcher.log", "w", stdout ) ) == NULL ) + exit(-1); + + time_t curTime; + char timeStamp[32] = { 0 }; + + STARTUPINFO si; + PROCESS_INFORMATION pi; + + ZeroMemory( &si, sizeof(si) ); + si.cb = sizeof(si); + ZeroMemory( &pi, sizeof(pi) ); + + std::string appdir = InstallationDirectory(); + std::string starter = appdir + "Client.exe"; + + char *c = ParseCmdLine(); + char cmdLine[ MAX_PATH ]; + _snprintf( cmdLine, MAX_PATH, " %s", c ); + + bool bConfig = false; + if( *c == 0 ) + bConfig = true; + else + { + if( *c=='-' || *c=='/' ) + c++; + + if( *c=='c' || *c=='C' ) + bConfig = true; + } + + if( bConfig == true ) + { + starter = appdir + "wlua.exe"; + _snprintf( cmdLine, MAX_PATH, " %s", "./Scripts/wx_config.lua" ); + } + + time( &curTime ); strftime( timeStamp, sizeof(timeStamp), "%H:%M:%S", localtime( &curTime ) ); + printf( "[%s] Launching %s %s\n", timeStamp, starter.c_str(), cmdLine ); + fflush( stdout ); + + // Start the child process. + if( !CreateProcess( starter.c_str(), + cmdLine, // Command line + NULL, // Process handle not inheritable + NULL, // Thread handle not inheritable + FALSE, // Set handle inheritance to FALSE + IDLE_PRIORITY_CLASS, // No creation flags + NULL, // Use parent's environment block + appdir.c_str(), // Use parent's starting directory + &si, // Pointer to STARTUPINFO structure + &pi ) // Pointer to PROCESS_INFORMATION structure + ) + { + printf( "CreateProcess failed (%d)\n", GetLastError() ); + fflush( stdout ); + fclose( stream ); + return 0; + } + + time( &curTime ); strftime( timeStamp, sizeof(timeStamp), "%H:%M:%S", localtime( &curTime ) ); + printf( "[%s] WaitForInputIdle...\n", timeStamp ); + WaitForInputIdle( pi.hProcess, INFINITE ); + + time( &curTime ); strftime( timeStamp, sizeof(timeStamp), "%H:%M:%S", localtime( &curTime ) ); + printf( "[%s] EnumWindows...\n", timeStamp ); + EnumWindows( &EnumWindowsProc, pi.dwThreadId ); + //SetParent( g_ClientWin, GetParent( NULL ) ); + + time( &curTime ); strftime( timeStamp, sizeof(timeStamp), "%H:%M:%S", localtime( &curTime ) ); + printf( "[%s] WaitForSingleObject...\n", timeStamp ); + // Wait until child process exits. + WaitForSingleObject( pi.hProcess, INFINITE ); + + time( &curTime ); strftime( timeStamp, sizeof(timeStamp), "%H:%M:%S", localtime( &curTime ) ); + printf( "[%s] Done...\n", timeStamp ); + + // Close process and thread handles. + CloseHandle( pi.hProcess ); + CloseHandle( pi.hThread ); + + fclose( stream ); + + return 0; +} diff -Nru electricsheep-2.7~b12+svn20091224/Makefile.am electricsheep-3.0.2-git20180325/Makefile.am --- electricsheep-2.7~b12+svn20091224/Makefile.am 2009-07-06 01:25:33.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Makefile.am 2018-05-17 14:40:33.000000000 +0000 @@ -1,39 +1,100 @@ -AUTOMAKE_OPTIONS = foreign no-dependencies +## Process this file with automake to produce Makefile.in -AM_CFLAGS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" +AUTOMAKE_OPTIONS = 1.7 -electricsheep_LDADD = -lavformat -lavcodec -lavutil -lm -lz +MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in \ + stamp-h.in config.log config.cache config.status -bin_PROGRAMS = electricsheep electricsheep-preferences +SUBDIRS = Client MSVC/SettingsGUI -pkgdata_DATA = electricsheep-wait.avi electricsheep-preferences.glade - -electricsheep_preferences_CFLAGS = @libglade_CFLAGS@ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -electricsheep_preferences_LDFLAGS = @libglade_LIBS@ -export-dynamic -electricsheep_preferences_SOURCES = electricsheep-preferences.c utils.c md5.c +docdir = $(prefix)/share/doc/$(PACKAGE)-$(VERSION) +sharedir = $(prefix)/share + +gnome_screensaver_dir = /usr/lib/gnome-screensaver + +# add documentation files here +doc_DATA = AUTHORS README NEWS ChangeLog Runtime/Instructions.rtf Runtime/License.rtf + +# extra files to be included in distributions +EXTRA_DIST = \ + configure \ + COPYING \ + INSTALL \ + electricsheep-saver \ + electricsheep-saver-gnome \ + Runtime/Scripts/*.lua \ + Runtime/Scripts/Dictionary/*.lua \ + Runtime/Scripts/logging/*.lua \ + menu-entries/ElectricSheep.desktop \ + menu-entries/electricsheep-saver.desktop \ + menu-entries/electricsheep.xpm \ + Runtime/electricsheep-attr.png \ + Runtime/electricsheep-frown.png \ + Runtime/electricsheep-smile.png \ + Runtime/TrebuchetMS-20.glf \ + Runtime/TrebuchetMS-24.glf \ + Runtime/sheep_logo.xpm \ + Runtime/sheep_logo2.xpm \ + wxWidgets-2.9.1 \ + $(doc_DATA) + + +dist-hook: + rm -rf `find $(distdir)/wxWidgets-2.9.1 -name svn` + + +installdirs: + mkinstalldirs + $(srcdir)/mkinstalldirs + mkdir -p $(DESTDIR)$(bindir) + mkdir -p $(DESTDIR)$(sharedir)/electricsheep/Scripts + mkdir -p $(DESTDIR)$(sharedir)/applications + mkdir -p $(DESTDIR)$(sharedir)/pixmaps + mkdir -p $(DESTDIR)$(sharedir)/electricsheep/icons + mkdir -p $(DESTDIR)$(gnome_screensaver_dir) +install-data-local: + mkdir -p $(DESTDIR)$(bindir) + mkdir -p $(DESTDIR)$(sharedir)/electricsheep/Scripts + mkdir -p $(DESTDIR)$(sharedir)/applications + mkdir -p $(DESTDIR)$(sharedir)/pixmaps + mkdir -p $(DESTDIR)$(sharedir)/electricsheep/icons + mkdir -p $(DESTDIR)$(gnome_screensaver_dir) + cp -rf $(srcdir)/Runtime/Scripts $(DESTDIR)$(sharedir)/electricsheep + mkdir -p $(DESTDIR)$(sharedir)/applications/ + cp -f $(srcdir)/menu-entries/ElectricSheep.desktop.kde $(DESTDIR)$(sharedir)/applications/ElectricSheep.desktop + mkdir -p $(DESTDIR)$(sharedir)/pixmaps/ + cp -f $(srcdir)/menu-entries/electricsheep.xpm $(DESTDIR)$(sharedir)/pixmaps/ + cp -f $(srcdir)/Runtime/electricsheep-attr.png $(DESTDIR)$(sharedir)/electricsheep/ + cp -f $(srcdir)/Runtime/electricsheep-frown.png $(DESTDIR)$(sharedir)/electricsheep/ + cp -f $(srcdir)/Runtime/electricsheep-smile.png $(DESTDIR)$(sharedir)/electricsheep/ + cp -f $(srcdir)/Runtime/TrebuchetMS-20.glf $(DESTDIR)$(sharedir)/electricsheep/ + cp -f $(srcdir)/Runtime/TrebuchetMS-24.glf $(DESTDIR)$(sharedir)/electricsheep/ + mkdir -p $(DESTDIR)$(bindir) + cp -f $(srcdir)/electricsheep-saver $(DESTDIR)$(bindir) && chmod a+rx $(DESTDIR)$(bindir)/electricsheep-saver + mkdir -p $(DESTDIR)/usr/share/applications/screensavers/ + cp -f $(srcdir)/menu-entries/electricsheep-saver.desktop $(DESTDIR)/usr/share/applications/screensavers/electricsheep.desktop + mkdir -p $(DESTDIR)$(gnome_screensaver_dir) + cp -f $(srcdir)/electricsheep-saver-gnome $(DESTDIR)$(gnome_screensaver_dir)/electricsheep-saver && chmod a+rx $(DESTDIR)$(gnome_screensaver_dir)/electricsheep-saver -electricsheep_SOURCES = electricsheep.c getdate.c utils.c md5.c -man1_MANS = electricsheep.man -EXTRA_DIST = $(man1_MANS) $(pkgdata_DATA) electricsheep.man.in md5.h \ - electricsheep.xml.in electricsheep.spec.in mkinstalldirs getdate.h \ - electricsheep-preferences.glade electricsheep.h electricsheep-saver \ - 16_electricsheep +# install-exec stuff goes here +install-exec-local: -GNOME_SCREENSAVER_DATADIR = $(shell pkg-config --variable themesdir gnome-screensaver) -GNOME_SCREENSAVER_PRIVEXEDIR = $(shell pkg-config --variable privlibexecdir gnome-screensaver) - -install-data-local: - -$(INSTALL) electricsheep.desktop $(GNOME_SCREENSAVER_DATADIR) - -$(INSTALL) electricsheep-saver $(GNOME_SCREENSAVER_PRIVEXEDIR) - -$(INSTALL) -d $(pkgdatadir) - -$(INSTALL) 16_electricsheep /usr/share/gconf/defaults - -update-gconf-defaults +# uninstall stuff goes here uninstall-local: - -rm /usr/share/gconf/defaults/16_electricsheep - -rm -rf $(pkgdatadir) - -rm $(GNOME_SCREENSAVER_PRIVEXEDIR)/electricsheep-saver - -rm $(GNOME_SCREENSAVER_DATADIR)/electricsheep.desktop - -update-gconf-defaults + rm -rf $(DESTDIR)$(bindir)/electricsheep + rm -rf $(DESTDIR)$(bindir)/electricsheep-preferences + rm -rf $(DESTDIR)$(bindir)/electricsheep-saver + rm -rf $(DESTDIR)$(docdir) + rm -rf $(DESTDIR)$(sharedir)/electricsheep + rm -rf $(DESTDIR)$(sharedir)/pixmaps/electricsheep.xmp + rm -rf $(DESTDIR)$(sharedir)/applications/ElectricSheep.desktop + rm -rf $(DESTDIR)/usr/share/applications/screensavers/electricsheep.desktop + rm -rf $(DESTDIR)$(gnome_screensaver_dir)/electricsheep-saver + +# anything to be cleaned up for distro ? +DISTCLEANFILES = +# flags to pass to automake +ACLOCAL_AMFLAGS = -I m4 diff -Nru electricsheep-2.7~b12+svn20091224/Makefile.in electricsheep-3.0.2-git20180325/Makefile.in --- electricsheep-2.7~b12+svn20091224/Makefile.in 2009-07-06 01:25:33.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Makefile.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,707 +0,0 @@ -# Makefile.in generated by automake 1.10.2 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008 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. - -@SET_MAKE@ - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -bin_PROGRAMS = electricsheep$(EXEEXT) \ - electricsheep-preferences$(EXEEXT) -subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/electricsheep.desktop.in \ - $(srcdir)/electricsheep.man.in $(srcdir)/electricsheep.spec.in \ - $(srcdir)/electricsheep.xml.in $(top_srcdir)/configure COPYING \ - config.guess config.sub install-sh missing mkinstalldirs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = electricsheep.desktop electricsheep.xml \ - electricsheep.spec electricsheep.man -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ - "$(DESTDIR)$(pkgdatadir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_electricsheep_OBJECTS = electricsheep.$(OBJEXT) getdate.$(OBJEXT) \ - utils.$(OBJEXT) md5.$(OBJEXT) -electricsheep_OBJECTS = $(am_electricsheep_OBJECTS) -electricsheep_DEPENDENCIES = -am_electricsheep_preferences_OBJECTS = \ - electricsheep_preferences-electricsheep-preferences.$(OBJEXT) \ - electricsheep_preferences-utils.$(OBJEXT) \ - electricsheep_preferences-md5.$(OBJEXT) -electricsheep_preferences_OBJECTS = \ - $(am_electricsheep_preferences_OBJECTS) -electricsheep_preferences_LDADD = $(LDADD) -electricsheep_preferences_LINK = $(CCLD) \ - $(electricsheep_preferences_CFLAGS) $(CFLAGS) \ - $(electricsheep_preferences_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = -am__depfiles_maybe = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(electricsheep_SOURCES) \ - $(electricsheep_preferences_SOURCES) -DIST_SOURCES = $(electricsheep_SOURCES) \ - $(electricsheep_preferences_SOURCES) -man1dir = $(mandir)/man1 -NROFF = nroff -MANS = $(man1_MANS) -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -pkgdataDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgdata_DATA) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PKG_CONFIG = @PKG_CONFIG@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -X11_SHARE = @X11_SHARE@ -XMKMF = @XMKMF@ -X_CFLAGS = @X_CFLAGS@ -X_EXTRA_LIBS = @X_EXTRA_LIBS@ -X_LIBS = @X_LIBS@ -X_PRE_LIBS = @X_PRE_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build_alias = @build_alias@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -libglade_CFLAGS = @libglade_CFLAGS@ -libglade_LIBS = @libglade_LIBS@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign no-dependencies -AM_CFLAGS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -electricsheep_LDADD = -lavformat -lavcodec -lavutil -lm -lz -pkgdata_DATA = electricsheep-wait.avi electricsheep-preferences.glade -electricsheep_preferences_CFLAGS = @libglade_CFLAGS@ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -electricsheep_preferences_LDFLAGS = @libglade_LIBS@ -export-dynamic -electricsheep_preferences_SOURCES = electricsheep-preferences.c utils.c md5.c -electricsheep_SOURCES = electricsheep.c getdate.c utils.c md5.c -man1_MANS = electricsheep.man -EXTRA_DIST = $(man1_MANS) $(pkgdata_DATA) electricsheep.man.in md5.h \ - electricsheep.xml.in electricsheep.spec.in mkinstalldirs getdate.h \ - electricsheep-preferences.glade electricsheep.h electricsheep-saver \ - 16_electricsheep - -GNOME_SCREENSAVER_DATADIR = $(shell pkg-config --variable themesdir gnome-screensaver) -GNOME_SCREENSAVER_PRIVEXEDIR = $(shell pkg-config --variable privlibexecdir gnome-screensaver) -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ - cd $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -electricsheep.desktop: $(top_builddir)/config.status $(srcdir)/electricsheep.desktop.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -electricsheep.xml: $(top_builddir)/config.status $(srcdir)/electricsheep.xml.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -electricsheep.spec: $(top_builddir)/config.status $(srcdir)/electricsheep.spec.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -electricsheep.man: $(top_builddir)/config.status $(srcdir)/electricsheep.man.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ - else :; fi; \ - done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done - -clean-binPROGRAMS: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -electricsheep$(EXEEXT): $(electricsheep_OBJECTS) $(electricsheep_DEPENDENCIES) - @rm -f electricsheep$(EXEEXT) - $(LINK) $(electricsheep_OBJECTS) $(electricsheep_LDADD) $(LIBS) -electricsheep-preferences$(EXEEXT): $(electricsheep_preferences_OBJECTS) $(electricsheep_preferences_DEPENDENCIES) - @rm -f electricsheep-preferences$(EXEEXT) - $(electricsheep_preferences_LINK) $(electricsheep_preferences_OBJECTS) $(electricsheep_preferences_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -.c.o: - $(COMPILE) -c $< - -.c.obj: - $(COMPILE) -c `$(CYGPATH_W) '$<'` - -electricsheep_preferences-electricsheep-preferences.o: electricsheep-preferences.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(electricsheep_preferences_CFLAGS) $(CFLAGS) -c -o electricsheep_preferences-electricsheep-preferences.o `test -f 'electricsheep-preferences.c' || echo '$(srcdir)/'`electricsheep-preferences.c - -electricsheep_preferences-electricsheep-preferences.obj: electricsheep-preferences.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(electricsheep_preferences_CFLAGS) $(CFLAGS) -c -o electricsheep_preferences-electricsheep-preferences.obj `if test -f 'electricsheep-preferences.c'; then $(CYGPATH_W) 'electricsheep-preferences.c'; else $(CYGPATH_W) '$(srcdir)/electricsheep-preferences.c'; fi` - -electricsheep_preferences-utils.o: utils.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(electricsheep_preferences_CFLAGS) $(CFLAGS) -c -o electricsheep_preferences-utils.o `test -f 'utils.c' || echo '$(srcdir)/'`utils.c - -electricsheep_preferences-utils.obj: utils.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(electricsheep_preferences_CFLAGS) $(CFLAGS) -c -o electricsheep_preferences-utils.obj `if test -f 'utils.c'; then $(CYGPATH_W) 'utils.c'; else $(CYGPATH_W) '$(srcdir)/utils.c'; fi` - -electricsheep_preferences-md5.o: md5.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(electricsheep_preferences_CFLAGS) $(CFLAGS) -c -o electricsheep_preferences-md5.o `test -f 'md5.c' || echo '$(srcdir)/'`md5.c - -electricsheep_preferences-md5.obj: md5.c - $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(electricsheep_preferences_CFLAGS) $(CFLAGS) -c -o electricsheep_preferences-md5.obj `if test -f 'md5.c'; then $(CYGPATH_W) 'md5.c'; else $(CYGPATH_W) '$(srcdir)/md5.c'; fi` -install-man1: $(man1_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $$i; then file=$$i; \ - else file=$(srcdir)/$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ - done -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ - done -install-pkgdataDATA: $(pkgdata_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" - @list='$(pkgdata_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \ - $(pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \ - done - -uninstall-pkgdataDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgdata_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) config.h -installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgdatadir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-data-local install-man install-pkgdataDATA - -install-dvi: install-dvi-am - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-info: install-info-am - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-local uninstall-man \ - uninstall-pkgdataDATA - -uninstall-man: uninstall-man1 - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ - clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-zip distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-local install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-man1 install-pdf \ - install-pdf-am install-pkgdataDATA install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-local uninstall-man uninstall-man1 \ - uninstall-pkgdataDATA - - -install-data-local: - -$(INSTALL) electricsheep.desktop $(GNOME_SCREENSAVER_DATADIR) - -$(INSTALL) electricsheep-saver $(GNOME_SCREENSAVER_PRIVEXEDIR) - -$(INSTALL) -d $(pkgdatadir) - -$(INSTALL) 16_electricsheep /usr/share/gconf/defaults - -update-gconf-defaults - -uninstall-local: - -rm /usr/share/gconf/defaults/16_electricsheep - -rm -rf $(pkgdatadir) - -rm $(GNOME_SCREENSAVER_PRIVEXEDIR)/electricsheep-saver - -rm $(GNOME_SCREENSAVER_DATADIR)/electricsheep.desktop - -update-gconf-defaults -# 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: diff -Nru electricsheep-2.7~b12+svn20091224/md5.c electricsheep-3.0.2-git20180325/md5.c --- electricsheep-2.7~b12+svn20091224/md5.c 2009-07-08 21:32:42.000000000 +0000 +++ electricsheep-3.0.2-git20180325/md5.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,427 +0,0 @@ -/* - * md5.h - * - * by Ulrich Drepper , 1995. - * - * Modified by Gary Wong, 2000, 2001. - * - * Functions to compute MD5 message digest of files or memory blocks. - * according to the definition of MD5 in RFC 1321 from April 1992. - * Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id: md5.c,v 1.9 2007/07/02 12:46:38 ace Exp $ - */ - -/* License changed from the GNU LGPL to the GNU GPL (as permitted - under Term 3 of the GNU LGPL) by Gary Wong for distribution - with GNU Backgammon. */ - -#define STDC_HEADERS 1 -#define HAVE_MEMCPY 1 - -#if STDC_HEADERS -# include -# include -#else -# ifndef HAVE_MEMCPY -# define memcpy(d, s, n) bcopy ((s), (d), (n)) -# endif -#endif - -#include "md5.h" - -/* Be conservative and always perform explicit byte-ordering. This is - redundant on little-endian architectures, but is portable. */ -#define WRITE( p, n ) \ - ( ( (unsigned char *) (p) )[ 0 ] = ( (n) & 0xFF ), \ - ( (unsigned char *) (p) )[ 1 ] = ( (n) & 0xFF00 ) >> 8, \ - ( (unsigned char *) (p) )[ 2 ] = ( (n) & 0xFF0000 ) >> 16, \ - ( (unsigned char *) (p) )[ 3 ] = ( (n) & 0xFF000000 ) >> 24 ) - -#define READ( p ) \ - ( ( (unsigned char *) (p) )[ 0 ] | \ - ( (unsigned char *) (p) )[ 1 ] << 8 | \ - ( (unsigned char *) (p) )[ 2 ] << 16 | \ - ( (unsigned char *) (p) )[ 3 ] << 24 ) - -/* This array contains the bytes used to pad the buffer to the next - 64-byte boundary. (RFC 1321, 3.1: Step 1) */ -/* But this isn't used ???? */ -/*lint -e{785} Ignore not enough initilizer warning */ -static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; - - -/* Initialize structure containing state of computation. - (RFC 1321, 3.3: Step 3) */ -void -md5_init_ctx (struct md5_ctx *ctx) -{ - ctx->A = 0x67452301; - ctx->B = 0xefcdab89; - ctx->C = 0x98badcfe; - ctx->D = 0x10325476; - - ctx->total[0] = ctx->total[1] = 0; - ctx->buflen = 0; -} - -/* Put result from CTX in first 16 bytes following RESBUF. The result - must be in little endian byte order. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -void * -md5_read_ctx (const struct md5_ctx *ctx, void *resbuf) -{ - char *r = (char*)resbuf; - WRITE (r, ctx->A); - WRITE (r + 4, ctx->B); - WRITE (r + 8, ctx->C); - WRITE (r + 12, ctx->D); - - return resbuf; -} - -/* Process the remaining bytes in the internal buffer and the usual - prolog according to the standard and write the result to RESBUF. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -void * -md5_finish_ctx (struct md5_ctx *ctx, void *resbuf) -{ - /* Take yet unprocessed bytes into account. */ - md5_uint32 bytes = ctx->buflen; - size_t pad; - - /* Now count remaining bytes. */ - ctx->total[0] += bytes; - if (ctx->total[0] < bytes) - ++ctx->total[1]; - - pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; - memcpy (&ctx->buffer[bytes], fillbuf, pad); - - /* Put the 64-bit file length in *bits* at the end of the buffer. */ - WRITE( ctx->buffer + bytes + pad, ctx->total[0] << 3); - WRITE( ctx->buffer + bytes + pad + 4, ((ctx->total[1] << 3) | - (ctx->total[0] >> 29))); - - /* Process last bytes. */ - md5_process_block (ctx->buffer, bytes + pad + 8, ctx); - - return md5_read_ctx (ctx, resbuf); -} - -/* Compute MD5 message digest for bytes read from STREAM. The - resulting message digest number will be written into the 16 bytes - beginning at RESBLOCK. */ -int -md5_stream (FILE *stream, void *resblock) -{ - /* Important: BLOCKSIZE must be a multiple of 64. */ -#define BLOCKSIZE 4096 - struct md5_ctx ctx; - char buffer[BLOCKSIZE + 72]; - size_t sum; - - /* Initialize the computation context. */ - md5_init_ctx (&ctx); - - /* Iterate over full file contents. */ - for(;;) - { - /* We read the file in blocks of BLOCKSIZE bytes. One call of the - computation function processes the whole buffer so that with the - next round of the loop another block can be read. */ - size_t n; - sum = 0; - - /* Read block. Take care for partial reads. */ - do - { - n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); - - sum += n; - } - while (sum < BLOCKSIZE && n != 0); - if (n == 0 && ferror (stream)) - return 1; - - /* If end of file is reached, end the loop. */ - if (n == 0) - break; - - /* Process buffer with BLOCKSIZE bytes. Note that - BLOCKSIZE % 64 == 0 - */ - md5_process_block (buffer, BLOCKSIZE, &ctx); - } - - /* Add the last bytes if necessary. */ - if (sum > 0) - md5_process_bytes (buffer, sum, &ctx); - - /* Construct result in desired memory. */ - md5_finish_ctx (&ctx, resblock); - return 0; -} - -/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The - result is always in little endian byte order, so that a byte-wise - output yields to the wanted ASCII representation of the message - digest. */ -void * -md5_buffer (const char *buffer, size_t len, void *resblock) -{ - struct md5_ctx ctx; - - /* Initialize the computation context. */ - md5_init_ctx (&ctx); - - /* Process whole buffer but last len % 64 bytes. */ - md5_process_bytes (buffer, len, &ctx); - - /* Put result in desired memory area. */ - return md5_finish_ctx (&ctx, resblock); -} - - -void -md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) -{ - /* const void aligned_buffer = buffer; */ - - /* When we already have some bits in our internal buffer concatenate - both inputs first. */ - if (ctx->buflen != 0) - { - size_t left_over = ctx->buflen; - size_t add = 128 - left_over > len ? len : 128 - left_over; - - /* Only put full words in the buffer. */ - add -= add % sizeof (md5_uint32); - - memcpy (&ctx->buffer[left_over], buffer, add); - ctx->buflen += (md5_uint32)add; - - if (ctx->buflen > 64) - { - md5_process_block (ctx->buffer, ctx->buflen & ~63, ctx); - - ctx->buflen &= 63; - /* The regions in the following copy operation cannot overlap. */ - memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63], - ctx->buflen); - } - - buffer = (const char *) buffer + add; - len -= add; - } - - /* Process available complete blocks. */ - if (len > 64) - { - md5_process_block (buffer, len & ~63, ctx); - buffer = (const char *) buffer + (len & ~63); - len &= 63; - } - - /* Move remaining bytes in internal buffer. */ - if (len > 0) - { - size_t left_over = ctx->buflen; - - memcpy (&ctx->buffer[left_over], buffer, len); - left_over += len; - if (left_over >= 64) - { - md5_process_block (ctx->buffer, 64, ctx); - left_over -= 64; - memcpy (ctx->buffer, &ctx->buffer[64], left_over); - } - ctx->buflen = (md5_uint32)left_over; - } -} - - -/* These are the four functions used in the four steps of the MD5 algorithm - and defined in the RFC 1321. The first function is a little bit optimized - (as found in Colin Plumbs public domain implementation). */ -/* #define FF(b, c, d) ((b & c) | (~b & d)) */ -#define FF(b, c, d) (d ^ (b & (c ^ d))) -#define FG(b, c, d) FF (d, b, c) -#define FH(b, c, d) (b ^ c ^ d) -#define FI(b, c, d) (c ^ (b | ~d)) - -/* Process LEN bytes of BUFFER, accumulating context into CTX. - It is assumed that LEN % 64 == 0. */ - -void -md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx) -{ - md5_uint32 correct_words[16]; - const md5_uint32 *words = (const md5_uint32 *)buffer; - size_t nwords = len / sizeof (md5_uint32); - const md5_uint32 *endp = words + nwords; - md5_uint32 A = ctx->A; - md5_uint32 B = ctx->B; - md5_uint32 C = ctx->C; - md5_uint32 D = ctx->D; - - /* First increment the byte count. RFC 1321 specifies the possible - length of the file up to 2^64 bits. Here we only compute the - number of bytes. Do a double word increment. */ - ctx->total[0] += (md5_uint32)len; - if (ctx->total[0] < len) - ++ctx->total[1]; - - /* Process all bytes in the buffer with 64 bytes in each round of - the loop. */ - while (words < endp) - { - md5_uint32 *cwp = correct_words; - md5_uint32 A_save = A; - md5_uint32 B_save = B; - md5_uint32 C_save = C; - md5_uint32 D_save = D; - - /* First round: using the given function, the context and a constant - the next context is computed. Because the algorithms processing - unit is a 32-bit word and it is determined to work on words in - little endian byte order we perhaps have to change the byte order - before the computation. To reduce the work for the next steps - we store the swapped words in the array CORRECT_WORDS. */ - -#define OP(a, b, c, d, s, T) \ - do \ - { \ - a += FF (b, c, d) + (*cwp++ = READ (words)) + T; \ - ++words; \ - CYCLIC (a, s); \ - a += b; \ - } \ - while (0) - - /* It is unfortunate that C does not provide an operator for - cyclic rotation. Hope the C compiler is smart enough. */ -#define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s))) - - /* Before we start, one word to the strange constants. - They are defined in RFC 1321 as - - T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64 - */ - - /* Round 1. */ - /*lint --e{123, 717} Ignore macro warning */ - OP (A, B, C, D, 7, 0xd76aa478); - OP (D, A, B, C, 12, 0xe8c7b756); - OP (C, D, A, B, 17, 0x242070db); - OP (B, C, D, A, 22, 0xc1bdceee); - OP (A, B, C, D, 7, 0xf57c0faf); - OP (D, A, B, C, 12, 0x4787c62a); - OP (C, D, A, B, 17, 0xa8304613); - OP (B, C, D, A, 22, 0xfd469501); - OP (A, B, C, D, 7, 0x698098d8); - OP (D, A, B, C, 12, 0x8b44f7af); - OP (C, D, A, B, 17, 0xffff5bb1); - OP (B, C, D, A, 22, 0x895cd7be); - OP (A, B, C, D, 7, 0x6b901122); - OP (D, A, B, C, 12, 0xfd987193); - OP (C, D, A, B, 17, 0xa679438e); - OP (B, C, D, A, 22, 0x49b40821); - - /* For the second to fourth round we have the possibly swapped words - in CORRECT_WORDS. Redefine the macro to take an additional first - argument specifying the function to use. */ -#undef OP -#define OP(f, a, b, c, d, k, s, T) \ - do \ - { \ - a += f (b, c, d) + correct_words[k] + T; \ - CYCLIC (a, s); \ - a += b; \ - } \ - while (0) - - /* Round 2. */ - OP (FG, A, B, C, D, 1, 5, 0xf61e2562); - OP (FG, D, A, B, C, 6, 9, 0xc040b340); - OP (FG, C, D, A, B, 11, 14, 0x265e5a51); - OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa); - OP (FG, A, B, C, D, 5, 5, 0xd62f105d); - OP (FG, D, A, B, C, 10, 9, 0x02441453); - OP (FG, C, D, A, B, 15, 14, 0xd8a1e681); - OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8); - OP (FG, A, B, C, D, 9, 5, 0x21e1cde6); - OP (FG, D, A, B, C, 14, 9, 0xc33707d6); - OP (FG, C, D, A, B, 3, 14, 0xf4d50d87); - OP (FG, B, C, D, A, 8, 20, 0x455a14ed); - OP (FG, A, B, C, D, 13, 5, 0xa9e3e905); - OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8); - OP (FG, C, D, A, B, 7, 14, 0x676f02d9); - OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a); - - /* Round 3. */ - OP (FH, A, B, C, D, 5, 4, 0xfffa3942); - OP (FH, D, A, B, C, 8, 11, 0x8771f681); - OP (FH, C, D, A, B, 11, 16, 0x6d9d6122); - OP (FH, B, C, D, A, 14, 23, 0xfde5380c); - OP (FH, A, B, C, D, 1, 4, 0xa4beea44); - OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9); - OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60); - OP (FH, B, C, D, A, 10, 23, 0xbebfbc70); - OP (FH, A, B, C, D, 13, 4, 0x289b7ec6); - OP (FH, D, A, B, C, 0, 11, 0xeaa127fa); - OP (FH, C, D, A, B, 3, 16, 0xd4ef3085); - OP (FH, B, C, D, A, 6, 23, 0x04881d05); - OP (FH, A, B, C, D, 9, 4, 0xd9d4d039); - OP (FH, D, A, B, C, 12, 11, 0xe6db99e5); - OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8); - OP (FH, B, C, D, A, 2, 23, 0xc4ac5665); - - /* Round 4. */ - OP (FI, A, B, C, D, 0, 6, 0xf4292244); - OP (FI, D, A, B, C, 7, 10, 0x432aff97); - OP (FI, C, D, A, B, 14, 15, 0xab9423a7); - OP (FI, B, C, D, A, 5, 21, 0xfc93a039); - OP (FI, A, B, C, D, 12, 6, 0x655b59c3); - OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92); - OP (FI, C, D, A, B, 10, 15, 0xffeff47d); - OP (FI, B, C, D, A, 1, 21, 0x85845dd1); - OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f); - OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0); - OP (FI, C, D, A, B, 6, 15, 0xa3014314); - OP (FI, B, C, D, A, 13, 21, 0x4e0811a1); - OP (FI, A, B, C, D, 4, 6, 0xf7537e82); - OP (FI, D, A, B, C, 11, 10, 0xbd3af235); - OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb); - OP (FI, B, C, D, A, 9, 21, 0xeb86d391); - - /* Add the starting values of the context. */ - A += A_save; - B += B_save; - C += C_save; - D += D_save; - } - - /* Put checksum in context given as argument. */ - ctx->A = A; - ctx->B = B; - ctx->C = C; - ctx->D = D; -} diff -Nru electricsheep-2.7~b12+svn20091224/md5.h electricsheep-3.0.2-git20180325/md5.h --- electricsheep-2.7~b12+svn20091224/md5.h 2009-07-08 21:32:42.000000000 +0000 +++ electricsheep-3.0.2-git20180325/md5.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,167 +0,0 @@ -/* - * md5.h - * - * Declaration of functions and data types used for MD5 sum computing - * library functions. - * Copyright (C) 1995, 1996, 1997, 1999, 2000 Free Software Foundation, Inc. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 3 or later of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * $Id: md5.h,v 1.4 2007/07/02 12:46:38 ace Exp $ - */ - -/* License changed from the GNU LGPL to the GNU GPL (as permitted - under Term 3 of the GNU LGPL) by Gary Wong for distribution - with GNU Backgammon. */ - -#ifndef _MD5_H -#define _MD5_H 1 - -#include - -#if defined HAVE_LIMITS_H -# include -#endif - -/* The following contortions are an attempt to use the C preprocessor - to determine an unsigned integral type that is 32 bits wide. An - alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but - doing that would require that the configure script compile and *run* - the resulting executable. Locally running cross-compiled executables - is usually not possible. */ - -#ifdef _LIBC -# include -typedef u_int32_t md5_uint32; -#else -# if defined __STDC__ && __STDC__ -# define UINT_MAX_32_BITS 4294967295U -# else -# define UINT_MAX_32_BITS 0xFFFFFFFF -# endif - -/* If UINT_MAX isn't defined, assume it's a 32-bit type. - This should be valid for all systems GNU cares about because - that doesn't include 16-bit systems, and only modern systems - (that certainly have ) have 64+-bit integral types. */ - -# ifndef UINT_MAX -# define UINT_MAX UINT_MAX_32_BITS -# endif - -# if UINT_MAX == UINT_MAX_32_BITS - typedef unsigned int md5_uint32; -# else -# if USHRT_MAX == UINT_MAX_32_BITS - typedef unsigned short md5_uint32; -# else -# if ULONG_MAX == UINT_MAX_32_BITS - typedef unsigned long md5_uint32; -# else - /* The following line is intended to evoke an error. - Using #error is not portable enough. */ - "Cannot determine unsigned 32-bit data type." -# endif -# endif -# endif -#endif - -#undef __P -#if __STDC__ || _MSC_VER -# define __P(x) x -#else -# define __P(x) () -#endif - -#if !defined (__GNUC__) && !defined (__attribute__) -#define __attribute__(x) -#endif - -/* Structure to save state of computation between the single steps. */ -struct md5_ctx -{ - md5_uint32 A; - md5_uint32 B; - md5_uint32 C; - md5_uint32 D; - - md5_uint32 total[2]; - md5_uint32 buflen; - char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32)))); -}; - -#ifdef __cplusplus - extern "C" { -#endif - -/* - * The following three functions are build up the low level used in - * the functions `md5_stream' and `md5_buffer'. - */ - -/* Initialize structure containing state of computation. - (RFC 1321, 3.3: Step 3) */ -extern void md5_init_ctx __P ((struct md5_ctx *ctx)); - -/* Starting with the result of former calls of this function (or the - initialization function) update the context for the next LEN bytes - starting at BUFFER. - It is necessary that LEN is a multiple of 64!!! */ -extern void md5_process_block __P ((const void *buffer, size_t len, - struct md5_ctx *ctx)); - -/* Starting with the result of former calls of this function (or the - initialization function) update the context for the next LEN bytes - starting at BUFFER. - It is NOT required that LEN is a multiple of 64. */ -extern void md5_process_bytes __P ((const void *buffer, size_t len, - struct md5_ctx *ctx)); - -/* Process the remaining bytes in the buffer and put result from CTX - in first 16 bytes following RESBUF. The result is always in little - endian byte order, so that a byte-wise output yields to the wanted - ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf)); - - -/* Put result from CTX in first 16 bytes following RESBUF. The result is - always in little endian byte order, so that a byte-wise output yields - to the wanted ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *md5_read_ctx __P ((const struct md5_ctx *ctx, void *resbuf)); - - -/* Compute MD5 message digest for bytes read from STREAM. The - resulting message digest number will be written into the 16 bytes - beginning at RESBLOCK. */ -extern int md5_stream __P ((FILE *stream, void *resblock)); - -/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The - result is always in little endian byte order, so that a byte-wise - output yields to the wanted ASCII representation of the message - digest. */ -extern void *md5_buffer __P ((const char *buffer, size_t len, - void *resblock)); - -#ifdef __cplusplus - } -#endif - - -#endif /* md5.h */ diff -Nru electricsheep-2.7~b12+svn20091224/menu-entries/ElectricSheep.desktop electricsheep-3.0.2-git20180325/menu-entries/ElectricSheep.desktop --- electricsheep-2.7~b12+svn20091224/menu-entries/ElectricSheep.desktop 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/menu-entries/ElectricSheep.desktop 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=ElectricSheep +Comment=Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. See www.electricsheep.org. This is version 2.7b12 +TryExec=electricsheep +Exec=electricsheep +Terminal=false +Type=Application +Categories=AudioVideo; diff -Nru electricsheep-2.7~b12+svn20091224/menu-entries/ElectricSheep.desktop.kde electricsheep-3.0.2-git20180325/menu-entries/ElectricSheep.desktop.kde --- electricsheep-2.7~b12+svn20091224/menu-entries/ElectricSheep.desktop.kde 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/menu-entries/ElectricSheep.desktop.kde 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,114 @@ +[Desktop Entry] +Encoding=UTF-8 +Exec=electricsheep +TryExec=electricsheep +Icon=kscreensaver +Type=Service +Terminal=false +X-KDE-ServiceTypes=ScreenSaver +Actions=InWindow;Root;Setup; +X-KDE-Category=Fractals +Name=ElectricSheep +Comment=Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. See www.electricsheep.org. + +[Desktop Action Setup] +Exec=electricsheep-preferences +Name=Setup... + +[Desktop Action InWindow] +Exec=electricsheep -window-id %w +Name=Display in specified window +Name[af]=Vertoon in gespesifiseer venster +Name[bg]=Стартиране в избран прозорец +Name[br]=Diskwel er prenestr spisaet +Name[bs]=Prikaži u navedenom prozoru +Name[ca]=Mostra a la finestra especificada +Name[cs]=Zobrazit v určeném okně +Name[cy]=Dangos mewn ffenestr penodol +Name[da]=Visning i angivet vindue +Name[de]=In vorgegebenem Fenster anzeigen +Name[el]=Προβολή στο καθορισμένο παράθυρο +Name[eo]=Montru en indikita fenestro +Name[es]=Mostrar en la pantalla especificada +Name[et]=Määratud aknas näitamine +Name[fi]=Näytä määrätyssä ikkunassa +Name[fo]=Vís í givin gluggi +Name[fr]=Affichage dans la fenêtre spécifiée +Name[he]=הצג בחלון המצויין +Name[hu]=Megjelenítés a megadott ablakban +Name[is]=Birta í völdum glugga +Name[it]=Mostra nella finestra specificata +Name[ja]=特定のウィンドウで表示 +Name[lv]=Rādīt norādītajā logā +Name[mt]=Uri f'window speċifika +Name[nb]=Vis i angitt vindu +Name[nl]=In een gedefinieerd venster weergeven +Name[nn]=Vis i oppgitt vindauge +Name[nso]=Bontsha kago di-window tseo di bontshitswego +Name[pl]=Wyświetl w zadanym oknie +Name[pt]=Mostrar na janela especificada +Name[pt_BR]=Mostrar em janela especificada +Name[ro]=Afişează în fereastra specificată +Name[ru]=Отображать в указанном окне +Name[sk]=Zobraziť v zadanom okne +Name[sl]=Prikaz v določenemu oknu +Name[sr]=Прикажи у задатом прозору +Name[sv]=Visa i angivet fönster +Name[th]=แสดงในหน้าต่างที่กำหนด +Name[tr]=Belirtilen pencerede göster +Name[uk]=Відобразити у вказаному вікні +Name[ven]=Sumbedzani kha windo dzo bulwaho fhedzi +Name[xh]=Bonisa kwi window ekhankanyiweyo +Name[xx]=xxDisplay in specified windowxx +Name[zh_CN]=在指定的窗口中显示 +Name[zh_TW]=在指定的視窗中顯示 +Name[zu]=Veza kwi-window ecacisiwe +NoDisplay=true + +[Desktop Action Root] +Exec=electricsheep -window-id %w +Name=Display in root window +Name[af]=Vertoon in root venster +Name[bg]=Стартиране в главния прозорец +Name[bs]=Prikaži u korijenskom prozoru +Name[ca]=Mostra a la finestra arrel +Name[cs]=Zobrazit na pozadí plochy +Name[cy]=Dangos mewn ffenestr gwraidd +Name[da]=Visning i root-vindue +Name[de]=In Hintergrundfenster anzeigen +Name[el]=Προβολή στο βασικό παράθυρο +Name[eo]=Montru en radika fenestro +Name[es]=Mostrar en la ventana raíz +Name[et]=Juuraknas näitamine +Name[fi]=Näytä root-ikkunassa +Name[fo]=Vís á bakgrundini +Name[fr]=Affichage dans la fenêtre racine +Name[he]=הצג בחלון השורש +Name[hu]=Megjelenítés a gyökérablakban +Name[is]=Birta í bakgrunni skjáborðs +Name[it]=Mostra sullo sfondo +Name[ja]=ルートウィンドウで表示 +Name[lv]=Rādīt saknes logā +Name[mt]=Uri fuq l-isfond +Name[nb]=Vis i root-vindu +Name[nl]=In hoofdvenster weergeven +Name[nn]=Vis i rotvindauget +Name[nso]=Bontsha kago window ya modu +Name[pl]=Wyświetl w oknie pierwotnym +Name[pt]=Mostrar na janela de fundo +Name[pt_BR]=Mostrar na janela-raiz +Name[ru]=Отображать в корневом окне +Name[sk]=Zobraziť v koreňovom okne +Name[sl]=Prikaz v korenskem oknu +Name[sr]=Прикажи у главном (root) прозору +Name[sv]=Visa i rotfönstret +Name[th]=แสดงในหน้าต่างหลัก +Name[tr]=Kök pencerede göster +Name[uk]=Відобразити на тлі екрана +Name[ven]=Sumbedzani kha windo ya mudzi +Name[xh]=Bonisa kwingcambu ye window +Name[xx]=xxDisplay in root windowxx +Name[zh_CN]=在根窗口中显示 +Name[zh_TW]=在根視窗中顯示 +Name[zu]=Veza kwimpande ye-window +NoDisplay=true diff -Nru electricsheep-2.7~b12+svn20091224/menu-entries/electricsheep-saver.desktop electricsheep-3.0.2-git20180325/menu-entries/electricsheep-saver.desktop --- electricsheep-2.7~b12+svn20091224/menu-entries/electricsheep-saver.desktop 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/menu-entries/electricsheep-saver.desktop 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,11 @@ + +[Desktop Entry] +Encoding=UTF-8 +Name=ElectricSheep +Comment=Electric Sheep is a distributed screen-saver that harnesses idle computers into a render farm with the purpose of animating and evolving artificial life-forms. See www.electricsheep.org. This is version 2.7b12 +TryExec=electricsheep-saver +Exec=electricsheep-saver +StartupNotify=false +Terminal=false +Type=Application +Categories=Screensaver diff -Nru electricsheep-2.7~b12+svn20091224/menu-entries/electricsheep.xpm electricsheep-3.0.2-git20180325/menu-entries/electricsheep.xpm --- electricsheep-2.7~b12+svn20091224/menu-entries/electricsheep.xpm 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/menu-entries/electricsheep.xpm 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,274 @@ +/* XPM */ +static char *electricsheep[] = { +/* columns rows colors chars-per-pixel */ +"48 48 220 2 ", +" c #000000", +". c #010101", +"X c #020202", +"o c #030303", +"O c #040404", +"+ c #050505", +"@ c #060606", +"# c #070707", +"$ c #080808", +"% c #090909", +"& c #0A0A0A", +"* c #0B0B0B", +"= c #0C0C0C", +"- c #0D0D0D", +"; c #0E0E0E", +": c #0F0F0F", +"> c #101010", +", c #111111", +"< c #121212", +"1 c #131313", +"2 c #141414", +"3 c #151515", +"4 c #161616", +"5 c #171717", +"6 c #181818", +"7 c #191919", +"8 c #1A1A1A", +"9 c #1B1B1B", +"0 c #1C1C1C", +"q c #1D1D1D", +"w c #1E1E1E", +"e c #1F1F1F", +"r c #202020", +"t c #212121", +"y c #222222", +"u c #232323", +"i c #242424", +"p c #252525", +"a c #262626", +"s c #272727", +"d c #282828", +"f c #292929", +"g c #2A2A2A", +"h c #2B2B2B", +"j c #2C2C2C", +"k c #2E2E2E", +"l c #2F2F2F", +"z c #303030", +"x c #333333", +"c c #353535", +"v c #363636", +"b c #373737", +"n c #383838", +"m c #393939", +"M c #3A3A3A", +"N c #3B3B3B", +"B c #3C3C3C", +"V c #3D3D3D", +"C c #3E3E3E", +"Z c #3F3F3F", +"A c #404040", +"S c #414141", +"D c #434343", +"F c #444444", +"G c #464646", +"H c #474747", +"J c #484848", +"K c #494949", +"L c #4A4A4A", +"P c #4B4B4B", +"I c #4C4C4C", +"U c #4D4D4D", +"Y c #4E4E4E", +"T c #4F4F4F", +"R c #505050", +"E c #525252", +"W c #535353", +"Q c #545454", +"! c #565656", +"~ c #575757", +"^ c #585858", +"/ c #595959", +"( c #5A5A5A", +") c #5B5B5B", +"_ c #5C5C5C", +"` c #5E5E5E", +"' c #606060", +"] c #616161", +"[ c #626262", +"{ c #636363", +"} c #646464", +"| c #656565", +" . c #666666", +".. c #676767", +"X. c #696969", +"o. c #6A6A6A", +"O. c #6E6E6E", +"+. c #6F6F6F", +"@. c #707070", +"#. c #717171", +"$. c #727272", +"%. c #737373", +"&. c #747474", +"*. c #767676", +"=. c #777777", +"-. c #787878", +";. c #797979", +":. c #7A7A7A", +">. c #7B7B7B", +",. c #7C7C7C", +"<. c #7E7E7E", +"1. c #808080", +"2. c #818181", +"3. c #828282", +"4. c #848484", +"5. c #858585", +"6. c #868686", +"7. c #878787", +"8. c #888888", +"9. c #8B8B8B", +"0. c #8C8C8C", +"q. c #8D8D8D", +"w. c #919191", +"e. c #939393", +"r. c #959595", +"t. c #969696", +"y. c #979797", +"u. c #989898", +"i. c #999999", +"p. c #9A9A9A", +"a. c #9B9B9B", +"s. c #9C9C9C", +"d. c #9D9D9D", +"f. c #9E9E9E", +"g. c #9F9F9F", +"h. c #A1A1A1", +"j. c #A2A2A2", +"k. c #A3A3A3", +"l. c #A5A5A5", +"z. c #A6A6A6", +"x. c #A7A7A7", +"c. c #A8A8A8", +"v. c #A9A9A9", +"b. c #AAAAAA", +"n. c #ABABAB", +"m. c #ACACAC", +"M. c #ADADAD", +"N. c #AEAEAE", +"B. c #AFAFAF", +"V. c #B0B0B0", +"C. c #B1B1B1", +"Z. c #B2B2B2", +"A. c #B3B3B3", +"S. c #B4B4B4", +"D. c #B6B6B6", +"F. c #B7B7B7", +"G. c #B8B8B8", +"H. c #BABABA", +"J. c #BCBCBC", +"K. c #BDBDBD", +"L. c #BEBEBE", +"P. c #BFBFBF", +"I. c #C0C0C0", +"U. c #C1C1C1", +"Y. c #C2C2C2", +"T. c #C3C3C3", +"R. c #C4C4C4", +"E. c #C5C5C5", +"W. c #C6C6C6", +"Q. c #C7C7C7", +"!. c #C8C8C8", +"~. c #C9C9C9", +"^. c #CACACA", +"/. c #CCCCCC", +"(. c #CFCFCF", +"). c #D0D0D0", +"_. c #D1D1D1", +"`. c #D2D2D2", +"'. c #D4D4D4", +"]. c #D5D5D5", +"[. c #D6D6D6", +"{. c #D8D8D8", +"}. c #D9D9D9", +"|. c #DBDBDB", +" X c #DCDCDC", +".X c #DDDDDD", +"XX c #DEDEDE", +"oX c #DFDFDF", +"OX c #E0E0E0", +"+X c #E1E1E1", +"@X c #E2E2E2", +"#X c #E3E3E3", +"$X c #E4E4E4", +"%X c #E5E5E5", +"&X c #E6E6E6", +"*X c #E7E7E7", +"=X c #E9E9E9", +"-X c #EAEAEA", +";X c #EBEBEB", +":X c #ECECEC", +">X c #EDEDED", +",X c #EEEEEE", +", 1996. - -# 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, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit 0 - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit 0 - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case "$1" in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff -Nru electricsheep-2.7~b12+svn20091224/mk/autoconf/acx_pthread.m4 electricsheep-3.0.2-git20180325/mk/autoconf/acx_pthread.m4 --- electricsheep-2.7~b12+svn20091224/mk/autoconf/acx_pthread.m4 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/mk/autoconf/acx_pthread.m4 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,235 @@ +dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +dnl +dnl This macro figures out how to build C programs using POSIX threads. +dnl It sets the PTHREAD_LIBS output variable to the threads library and +dnl linker flags, and the PTHREAD_CFLAGS output variable to any special +dnl C compiler flags that are needed. (The user can also force certain +dnl compiler flags/libs to be tested by setting these environment +dnl variables.) +dnl +dnl Also sets PTHREAD_CC to any special C compiler that is needed for +dnl multi-threaded programs (defaults to the value of CC otherwise). +dnl (This is necessary on AIX to use the special cc_r compiler alias.) +dnl +dnl NOTE: You are assumed to not only compile your program with these +dnl flags, but also link it with them as well. e.g. you should link +dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS +dnl $LIBS +dnl +dnl If you are only building threads programs, you may wish to use +dnl these variables in your default LIBS, CFLAGS, and CC: +dnl +dnl LIBS="$PTHREAD_LIBS $LIBS" +dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" +dnl CC="$PTHREAD_CC" +dnl +dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute +dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to +dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). +dnl +dnl ACTION-IF-FOUND is a list of shell commands to run if a threads +dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to +dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the +dnl default action will define HAVE_PTHREAD. +dnl +dnl Please let the authors know if this macro fails on any platform, or +dnl if you have any other suggestions or comments. This macro was based +dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with +dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros +dnl posted by Alejandro Forero Cuervo to the autoconf macro repository. +dnl We are also grateful for the helpful feedback of numerous users. +dnl +dnl @category InstalledPackages +dnl @author Steven G. Johnson +dnl @version 2005-01-14 +dnl @license GPLWithACException + +AC_DEFUN([ACX_PTHREAD], [ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_SAVE +AC_LANG_C +acx_pthread_ok=no + +# We used to check for pthread.h first, but this fails if pthread.h +# requires special compiler flags (e.g. on True64 or Sequent). +# It gets checked for in the link test anyway. + +# First of all, check if the user has set any of the PTHREAD_LIBS, +# etcetera environment variables, and if threads linking works using +# them: +if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) + AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) + AC_MSG_RESULT($acx_pthread_ok) + if test x"$acx_pthread_ok" = xno; then + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" + fi + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" +fi + +# We must check for the threads library under a number of different +# names; the ordering is very important because some systems +# (e.g. DEC) have both -lpthread and -lpthreads, where one of the +# libraries is broken (non-POSIX). + +# Create a list of thread flags to try. Items starting with a "-" are +# C compiler flags, and other items are library names, except for "none" +# which indicates that we try without any flags at all, and "pthread-config" +# which is a program returning the flags for the Pth emulation library. + +acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" + +# The ordering *is* (sometimes) important. Some notes on the +# individual items follow: + +# pthreads: AIX (must check this before -lpthread) +# none: in case threads are in libc; should be tried before -Kthread and +# other compiler flags to prevent continual compiler warnings +# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) +# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) +# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) +# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) +# -pthreads: Solaris/gcc +# -mthreads: Mingw32/gcc, Lynx/gcc +# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it +# doesn't hurt to check since this sometimes defines pthreads too; +# also defines -D_REENTRANT) +# pthread: Linux, etcetera +# --thread-safe: KAI C++ +# pthread-config: use pthread-config program (for GNU Pth library) + +case "${host_cpu}-${host_os}" in + *solaris*) + + # On Solaris (at least, for some versions), libc contains stubbed + # (non-functional) versions of the pthreads routines, so link-based + # tests will erroneously succeed. (We need to link with -pthread or + # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather + # a function called by this macro, so we could check for that, but + # who knows whether they'll stub that too in a future libc.) So, + # we'll just look for -pthreads and -lpthread first: + + acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" + ;; +esac + +if test x"$acx_pthread_ok" = xno; then +for flag in $acx_pthread_flags; do + + case $flag in + none) + AC_MSG_CHECKING([whether pthreads work without any flags]) + ;; + + -*) + AC_MSG_CHECKING([whether pthreads work with $flag]) + PTHREAD_CFLAGS="$flag" + ;; + + pthread-config) + AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) + if test x"$acx_pthread_config" = xno; then continue; fi + PTHREAD_CFLAGS="`pthread-config --cflags`" + PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" + ;; + + *) + AC_MSG_CHECKING([for the pthreads library -l$flag]) + PTHREAD_LIBS="-l$flag" + ;; + esac + + save_LIBS="$LIBS" + save_CFLAGS="$CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Check for various functions. We must include pthread.h, + # since some functions may be macros. (On the Sequent, we + # need a special flag -Kthread to make this header compile.) + # We check for pthread_join because it is in -lpthread on IRIX + # while pthread_create is in libc. We check for pthread_attr_init + # due to DEC craziness with -lpthreads. We check for + # pthread_cleanup_push because it is one of the few pthread + # functions on Solaris that doesn't have a non-functional libc stub. + # We try pthread_create on general principles. + AC_TRY_LINK([#include ], + [pthread_t th; pthread_join(th, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], + [acx_pthread_ok=yes]) + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + AC_MSG_RESULT($acx_pthread_ok) + if test "x$acx_pthread_ok" = xyes; then + break; + fi + + PTHREAD_LIBS="" + PTHREAD_CFLAGS="" +done +fi + +# Various other checks: +if test "x$acx_pthread_ok" = xyes; then + save_LIBS="$LIBS" + LIBS="$PTHREAD_LIBS $LIBS" + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + + # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. + AC_MSG_CHECKING([for joinable pthread attribute]) + attr_name=unknown + for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do + AC_TRY_LINK([#include ], [int attr=$attr;], + [attr_name=$attr; break]) + done + AC_MSG_RESULT($attr_name) + if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then + AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, + [Define to necessary symbol if this constant + uses a non-standard name on your system.]) + fi + + AC_MSG_CHECKING([if more special flags are required for pthreads]) + flag=no + case "${host_cpu}-${host_os}" in + *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; + *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; + esac + AC_MSG_RESULT(${flag}) + if test "x$flag" != xno; then + PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" + fi + + LIBS="$save_LIBS" + CFLAGS="$save_CFLAGS" + + # More AIX lossage: must compile with cc_r + AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) +else + PTHREAD_CC="$CC" +fi + +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_CC) + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$acx_pthread_ok" = xyes; then + ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) + : +else + acx_pthread_ok=no + $2 +fi +AC_LANG_RESTORE +])dnl ACX_PTHREAD diff -Nru electricsheep-2.7~b12+svn20091224/mkinstalldirs electricsheep-3.0.2-git20180325/mkinstalldirs --- electricsheep-2.7~b12+svn20091224/mkinstalldirs 2002-12-12 09:33:34.000000000 +0000 +++ electricsheep-3.0.2-git20180325/mkinstalldirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.1.1.1 2002-12-12 09:32:56 spotspot Exp $ - -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 diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/BackBufDD.cpp electricsheep-3.0.2-git20180325/MSVC/BackBufDD.cpp --- electricsheep-2.7~b12+svn20091224/MSVC/BackBufDD.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/BackBufDD.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,602 @@ +#ifdef _MSC_VER +// Copyleft 2005 Chris Korda +// 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 any later version. +/* + chris korda + + revision history: + rev date comments + 00 10may05 initial version + 01 11may05 add error strings + 02 12may05 adapt for DX7 + 03 20may05 make DX7 optional + 04 05jun05 add mirror blit + 05 22jun05 add SetOptions + 06 29jun05 add mirror precision option + 07 10jul05 add auto memory option + 08 14oct05 add exclusive mode + 09 14oct05 kill DirectDraw's leaky timer + 10 19oct05 in SetExclusive, save/restore window placement + 11 26oct05 don't set position before restoring placement + 12 05may06 add GetErrorString + + DirectDraw back buffer for off-screen drawing + +*/ +#include +#include "BackBufDD.h" +#include "log.h" + +#define DIRDRAWERR(x) {x, #x}, +const CBackBufDD::ERRTRAN CBackBufDD::m_ErrTran[] = { +#include "DirDrawErrs.h" +{0, NULL}}; + +CBackBufDD::CBackBufDD() +{ + m_dd = NULL; + m_Front = NULL; + m_Back = NULL; + m_Mirror = NULL; + m_DrawBuf = NULL; + m_Clipper = NULL; + m_Main = NULL; + m_View = NULL; + m_hr = 0; + m_Width = 0; + m_Height = 0; + m_IsMirrored = FALSE; + m_IsExclusive = FALSE; + m_ContextsUsed = true; + m_Options = OPT_AUTO_MEMORY | OPT_MIRROR_PRECISE; + ZeroMemory(&m_PreExcl, sizeof(m_PreExcl)); +} + +CBackBufDD::~CBackBufDD() +{ + Destroy(); +} + +BOOL CBackBufDD::Create(HWND Main, HWND View, GUID *Driver, bool Exclusive) +{ + //OutputDebugStringA("CBackBufDD::Create"); + Destroy(); + + if (FAILED(m_hr = DirectDrawCreateEx(Driver, (VOID **)&m_dd, IID_IDirectDraw7, NULL))) + { + //OutputDebugStringA("CBackBufDD::Create DirectDrawCreateEx"); + return(FALSE); + } + + m_IsExclusive = Exclusive; // order matters + int mode = Exclusive ? (DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN) : DDSCL_NORMAL; + if (FAILED(m_hr = m_dd->SetCooperativeLevel(Exclusive ? Main : NULL, mode))) + { + //OutputDebugStringA("SetCooperativeLevel"); + return(FALSE); + } + // In exclusive mode, DirectDraw creates a 1.5 second periodic timer for + // unknown reasons. If the app is switched to exclusive mode and back in + // less than 1.5 seconds, DirectDraw fails to clean up the timer, and the + // app's main window receives spurious timer messages for timer ID 16962. + // KillTimer(Main, 16962); // nuke it, seems to work fine + m_Main = Main; + m_View = View; + return(TRUE); +} + +void CBackBufDD::Destroy() +{ + DeleteSurface(); + if (!IsCreated()) + return; + m_dd->Release(); + m_dd = NULL; +} + +bool CBackBufDD::CreateSurface(int Width, int Height) +{ + //OutputDebugStringA("CBackBufDD::CreateSurface"); + //g_Log->Info("m_dd.create width %u height %u",Width,Height); + if (!IsCreated()) + { + //OutputDebugStringA("m_dd == NULL"); + return(FALSE); + } + Width = (std::max)(Width, 1); // CreateSurface won't accept zero + Height = (std::max)(Height, 1); + DeleteSurface(); + DDSURFACEDESC2 sd = {0}; + sd.dwSize = sizeof(sd); + if (m_IsExclusive) { + sd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT; + sd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX; + sd.dwBackBufferCount = 2; // prevents tearing + if (FAILED(m_hr = m_dd->CreateSurface(&sd, &m_Front, NULL))) + return(FALSE); + DDSCAPS2 caps = {0}; + caps.dwCaps = DDSCAPS_BACKBUFFER; + if (FAILED(m_hr = m_Front->GetAttachedSurface(&caps, &m_Back))) + return(FALSE); + sd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + sd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE + | DDSCAPS_SYSTEMMEMORY; // draw to system memory in mirror mode + sd.dwWidth = Width >> 1; // only need upper-left quadrant + sd.dwHeight = Height >> 1; + if (FAILED(m_hr = m_dd->CreateSurface(&sd, &m_Mirror, NULL))) + return(FALSE); + m_DrawBuf = m_IsMirrored ? m_Mirror : m_Back; + } else { + sd.dwFlags = DDSD_CAPS; + sd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; + if (FAILED(m_hr = m_dd->CreateSurface(&sd, &m_Front, NULL))) + { + //OutputDebugStringA("m_dd->CreateSurface(&sd, &m_Front, NULL) 1"); + return(FALSE); + } + sd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + // NOTE: must specify DDSCAPS_3DDEVICE to use Direct3D hardware + sd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; + // NOTE: mirroring may not work if DDSCAPS_VIDEOMEMORY is specified + bool UseVideoMem; + if (m_Options & OPT_AUTO_MEMORY) + UseVideoMem = !m_IsMirrored; + else + UseVideoMem = (m_Options & OPT_USE_VIDEO_MEM) != 0; + if (UseVideoMem) + sd.ddsCaps.dwCaps |= DDSCAPS_VIDEOMEMORY; + else + sd.ddsCaps.dwCaps |= DDSCAPS_SYSTEMMEMORY; + if (m_IsMirrored) { + sd.dwWidth = (Width + 1) >> 1; // only need upper-left quadrant + sd.dwHeight = (Height + 1) >> 1; + if (FAILED(m_hr = m_dd->CreateSurface(&sd, &m_Back, NULL))) + { + //OutputDebugStringA("m_dd->CreateSurface(&sd, &m_Back, NULL) 2"); + return(FALSE); + } + if (m_Options & OPT_MIRROR_PRECISE) { // mirror to intermediate surface + sd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE + | DDSCAPS_VIDEOMEMORY; + sd.dwWidth = Width; + sd.dwHeight = Height; + if (FAILED(m_hr = m_dd->CreateSurface(&sd, &m_Mirror, NULL))) + { + //OutputDebugStringA("m_dd->CreateSurface(&sd, &m_Mirror, NULL) 3"); + return(FALSE); + } + } + } else { + sd.dwWidth = Width; + sd.dwHeight = Height; + if (FAILED(m_hr = m_dd->CreateSurface(&sd, &m_Back, NULL))) + { + //OutputDebugStringA("m_dd->CreateSurface(&sd, &m_Back, NULL) 4"); + return(FALSE); + } + } + + m_DrawBuf = m_Back; + + if (FAILED(m_hr = m_dd->CreateClipper(0, &m_Clipper, NULL))) + { + //OutputDebugStringA("CBackBufDD::SetClipper1"); + return(FALSE); + } + if (FAILED(m_hr = m_Clipper->SetHWnd(0, m_View))) + { + //OutputDebugStringA("CBackBufDD::SetClipper2"); + return(FALSE); + } + //RECT wrect; + ////GetWindowRect(m_View, &wrect); + //GetClientRect(m_View, &wrect); + //ClientToScreen(m_View, (LPPOINT)&wrect.left); + //ClientToScreen(m_View, (LPPOINT)&wrect.right); + //LPRGNDATA rgn = new RGNDATA[sizeof(RGNDATAHEADER)+sizeof(RECT)]; + //RECT *rect = (RECT*)rgn->Buffer ; + //rect->bottom = wrect.bottom; + //rect->left = wrect.left; + //rect->right = wrect.right; + //rect->top = wrect.top; + //rgn->rdh.dwSize = sizeof (RGNDATAHEADER); + //rgn->rdh.iType = RDH_RECTANGLES; + //rgn->rdh.nCount = 1; + //rgn->rdh.nRgnSize = sizeof(RECT); + //m_Clipper->SetClipList(rgn, 0); + if (FAILED(m_hr = m_Front->SetClipper(m_Clipper))) + { + //OutputDebugStringA("CBackBufDD::SetClipper3"); + return(FALSE); + } + //m_Clipper->Release(); + } + m_Width = Width; + m_Height = Height; + return(TRUE); +} + +void CBackBufDD::DeleteSurface() +{ + //OutputDebugStringA("delete surface"); + if (m_Front != NULL) + { + //OutputDebugStringA("m_Front != NULL"); + if (m_Back != NULL) { + m_Back->Release(); + m_Back = NULL; + } + if (m_Mirror != NULL) { + m_Mirror->Release(); + m_Mirror = NULL; + } + + m_Front->Release(); + m_Front = NULL; + + if (m_Clipper != NULL) { + //OutputDebugStringA("delete surface - releasing clipper"); + m_Clipper->Release(); + m_Clipper = NULL; + } + + } + m_DrawBuf = NULL; +} + +bool CBackBufDD::Blt() +{ + if (!IsCreated()) + return false; + //OutputDebugStringA("CBackBufDD::Blt()"); + enum { + WAIT = DDBLT_WAIT, + WAITFX = DDBLT_WAIT | DDBLT_DDFX + }; + while (1) { + HRESULT hRet; + if (m_IsExclusive) { + if (m_IsMirrored) { // mirrored blit + int w = m_Width >> 1; + int h = m_Height >> 1; + RECT r = {0, 0, w, h}; + DDBLTFX fx = {0}; + fx.dwSize = sizeof(fx); + hRet = m_Back->Blt(&r, m_Mirror, NULL, WAIT, &fx); // upper left + if (hRet == DD_OK) { + fx.dwDDFX = DDBLTFX_MIRRORLEFTRIGHT; + r.left += w; + r.right += w; + hRet = m_Back->Blt(&r, m_Mirror, NULL, WAITFX, &fx); // upper right + if (hRet == DD_OK) { + fx.dwDDFX = DDBLTFX_MIRRORUPDOWN | DDBLTFX_MIRRORLEFTRIGHT; + r.bottom +=h; + r.top +=h; + hRet = m_Back->Blt(&r, m_Mirror, NULL, WAITFX, &fx); // lower right + if (hRet == DD_OK) { + fx.dwDDFX = DDBLTFX_MIRRORUPDOWN; + r.left -= w; + r.right -= w; + hRet = m_Back->Blt(&r, m_Mirror, NULL, WAITFX, &fx); // lower left + if (hRet == DD_OK) + hRet = m_Front->Flip(NULL, DDFLIP_WAIT); // update display + } + } + } + } else + hRet = m_Front->Flip(NULL, DDFLIP_WAIT); // update display + } else { + POINT org = {0, 0}; + ClientToScreen(m_View, &org); + if (m_IsMirrored) { // mirrored blit + RECT r = {0, 0, (m_Width + 1) >> 1, (m_Height + 1) >> 1}; + int w = (m_Width >> 1); + int h = (m_Height >> 1); + DDBLTFX fx = {0}; + fx.dwSize = sizeof(fx); + if (m_Mirror != NULL) { // mirror to intermediate surface + hRet = m_Mirror->Blt(&r, m_Back, NULL, WAIT, NULL); // upper left + if (hRet == DD_OK) { + fx.dwDDFX = DDBLTFX_MIRRORLEFTRIGHT; + r.left += w; + r.right += w; + hRet = m_Mirror->Blt(&r, m_Back, NULL, WAITFX, &fx); // upper right + if (hRet == DD_OK) { + fx.dwDDFX = DDBLTFX_MIRRORUPDOWN | DDBLTFX_MIRRORLEFTRIGHT; + r.top += h; + r.bottom += h; + hRet = m_Mirror->Blt(&r, m_Back, NULL, WAITFX, &fx); // lower right + if (hRet == DD_OK) { + fx.dwDDFX = DDBLTFX_MIRRORUPDOWN; + r.left -= w; + r.right -= w; + hRet = m_Mirror->Blt(&r, m_Back, NULL, WAITFX, &fx); // lower left + if (hRet == DD_OK) { // blit mirrored image to display + RECT wr = {0, 0, m_Width, m_Height}; + wr.left += org.x; + wr.right += org.x; + wr.top += org.y; + wr.bottom += org.y; + hRet = m_Front->Blt(&wr, m_Mirror, NULL, WAIT, NULL); + } + } + } + } + } else { // mirror directly to display; quick and dirty + r.left += org.x; + r.right += org.x; + r.top += org.y; + r.bottom += org.y; + hRet = m_Front->Blt(&r, m_Back, NULL, WAIT, NULL); // upper left + if (hRet == DD_OK) { + fx.dwDDFX = DDBLTFX_MIRRORLEFTRIGHT; + r.left += w; + r.right += w; + hRet = m_Front->Blt(&r, m_Back, NULL, WAITFX, &fx); // upper right + if (hRet == DD_OK) { + fx.dwDDFX = DDBLTFX_MIRRORUPDOWN | DDBLTFX_MIRRORLEFTRIGHT; + r.top += h; + r.bottom += h; + hRet = m_Front->Blt(&r, m_Back, NULL, WAITFX, &fx); // lower right + if (hRet == DD_OK) { + fx.dwDDFX = DDBLTFX_MIRRORUPDOWN; + r.left -= w; + r.right -= w; + hRet = m_Front->Blt(&r, m_Back, NULL, WAITFX, &fx); // lower left + } + } + } + } + } else { // ordinary blit + RECT r = {0, 0, m_Width, m_Height}; + r.left += org.x; + r.right += org.x; + r.top += org.y; + r.bottom += org.y; + hRet = m_Front->Blt(&r, m_Back, NULL, WAIT, NULL); + } + } + if (hRet == DD_OK) + break; + else if (hRet == DDERR_SURFACELOST) { + if (FAILED(m_Front->Restore()) || FAILED(m_Back->Restore())) + return(FALSE); + } else if (hRet != DDERR_WASSTILLDRAWING) + return(FALSE); + } + return(TRUE); +} + +LPCSTR CBackBufDD::GetErrorString(HRESULT hr) +{ + for (int i = 0; m_ErrTran[i].Text != NULL; i++) { + if (m_ErrTran[i].Code == hr) + return(m_ErrTran[i].Text); + } + return("unknown error"); +} + +void CBackBufDD::SetMirror(bool Enable) +{ + if (m_IsExclusive) + m_DrawBuf = Enable ? m_Mirror : m_Back; + m_IsMirrored = Enable; +} + +void CBackBufDD::SetOptions(int Options) +{ + m_Options = Options; +} + +bool CBackBufDD::SetExclusive(HWND Main, HWND View, bool Enable) +{ + GUID MonGuid, *Device = NULL; + RECT rc; + if (Enable) { // if exclusive mode + GetWindowPlacement(Main, &m_PreExcl); // save window placement + // get rect and handle of monitor that this window is mostly on + HMONITOR hMon = GetFullScreenRect(View, rc); + if (GetMonitorGUID(hMon, MonGuid)) // if monitor's GUID is available + Device = &MonGuid; // pass GUID to Create for hardware acceleration + m_Width = rc.right - rc.left; + m_Height = rc.bottom - rc.top; + } + if (!Create(Main, View, Device, Enable)) + return(FALSE); + if (!CreateSurface(m_Width, m_Height)) + return(FALSE); + if (Enable) { + SetWindowPos(Main, HWND_TOPMOST, // set topmost attribute + rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, 0); // and go full-screen + } else { + SetWindowPos(Main, HWND_NOTOPMOST, // clear topmost attribute + 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); // but don't set position + SetWindowPlacement(Main, &m_PreExcl); // restore previous placement + } + return(TRUE); +} + +HMONITOR CBackBufDD::GetFullScreenRect(HWND hWnd, RECT& rc) +{ + RECT wr; + ::GetWindowRect(hWnd, &wr); + // try to get screen size from monitor API in case we're dual-monitor + MONITORINFO mi; + mi.cbSize = sizeof(mi); + HMONITOR hMon = MonitorFromRect(&wr, MONITOR_DEFAULTTONEAREST); + if (hMon != NULL && GetMonitorInfo(hMon, &mi)) { + rc = mi.rcMonitor; + } else { // fall back to older API + rc.bottom = GetSystemMetrics(SM_CYSCREEN); + rc.left = 0; + rc.right = GetSystemMetrics(SM_CXSCREEN); + rc.top = 0; + } + return(hMon); +} + +BOOL WINAPI CBackBufDD::DDEnumCallbackEx(GUID FAR *lpGUID, LPTSTR lpDriverDescription, + LPTSTR lpDriverName, LPVOID lpContext, HMONITOR hm) +{ + MONGUID *mg = (MONGUID *)lpContext; + if (hm == mg->Mon) { // if it's the monitor we're looking for + mg->Guid = *lpGUID; // pass its GUID to caller + mg->Valid = TRUE; // tell caller we found it + return(DDENUMRET_CANCEL); // stop enumerating + } + return(DDENUMRET_OK); // continue enumerating +} + +bool CBackBufDD::GetMonitorGUID(HMONITOR hMon, GUID& MonGuid) +{ + // DirectDrawEnumerateEx has to be manually imported from the DirectDraw DLL + HINSTANCE h = LoadLibrary(L"ddraw.dll"); + if (!h) + return(FALSE); + LPDIRECTDRAWENUMERATEEX lpDDEnumEx; + lpDDEnumEx = (LPDIRECTDRAWENUMERATEEXW)GetProcAddress(h, "DirectDrawEnumerateExW"); + bool retc = FALSE; + if (lpDDEnumEx) { // if the function was imported + MONGUID mg = {0}; + mg.Mon = hMon; // tell callback which monitor to look for + lpDDEnumEx(DDEnumCallbackEx, &mg, DDENUM_ATTACHEDSECONDARYDEVICES); + if (mg.Valid) { // if callback found the monitor + MonGuid = mg.Guid; // pass its GUID to caller + retc = TRUE; + } + } + FreeLibrary(h); + return(retc); +} + +void CBackBufDD::DrawQuad(const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const Base::Math::CRect &_uvrect ) +{ + if (!IsCreated()) + return; + //OutputDebugStringA("CBackBufDD::DrawQuad()"); + if (m_ContextsUsed == false && m_DrawBuf != NULL) + { + HDC hdc; + if (m_DrawBuf->GetDC(&hdc) == DD_OK) + { + while (m_Tex.size() > 0) + { + LPDIRECTDRAWSURFACE7 curtex = m_Tex.front(); + m_Tex.pop(); + int curwidth = m_SrcWidth.front(); + m_SrcWidth.pop(); + int curheight = m_SrcHeight.front(); + m_SrcHeight.pop(); + //RECT coords; + //coords.left = int(_rect.m_X0 * m_Width); + //coords.top = int(_rect.m_Y0 * m_Height); + //coords.right = int(_rect.m_X1 * m_Width); + //coords.bottom = int(_rect.m_Y1 * m_Height); + //m_DrawBuf->Blt(&coords, curtex, NULL, 0, NULL); + HDC sdc; + if (curtex->GetDC(&sdc) == DD_OK) + { + SetStretchBltMode(hdc, COLORONCOLOR); + StretchBlt(hdc, + int(_rect.m_X0 * m_Width), + int(_rect.m_Y0 * m_Height), + int((_rect.m_X1 - _rect.m_X0) * m_Width), + int((_rect.m_Y1 - _rect.m_Y0) * m_Height), + sdc, 0, 0, curwidth, curheight, SRCCOPY); + curtex->ReleaseDC(sdc); + curtex->Release(); + } + } + m_DrawBuf->ReleaseDC(hdc); + } + while (m_Tex.size() > 100) + { + m_Tex.front()->Release(); + m_Tex.pop(); + m_SrcWidth.pop(); + m_SrcHeight.pop(); + } + m_ContextsUsed = true; + } +} + + +void CBackBufDD::SetContexts(LPDIRECTDRAWSURFACE7 _tex, int _SrcWidth, int _SrcHeight) +{ + if (!IsCreated()) + return; + //OutputDebugStringA("CBackBufDD::SetContexts()"); + m_ContextsUsed = false; + m_Tex.push(_tex); + m_SrcWidth.push(_SrcWidth); + m_SrcHeight.push(_SrcHeight); +} + +HRESULT CBackBufDD::GetDC(HDC FAR *lphDC) +{ + if (m_DrawBuf != NULL) + return(m_DrawBuf->GetDC(lphDC)); + else + return DDERR_GENERIC; +} + +HRESULT CBackBufDD::ReleaseDC(HDC hDC) +{ + if (m_DrawBuf != NULL) + return(m_DrawBuf->ReleaseDC(hDC)); + else + return DDERR_GENERIC; +} + +HRESULT CBackBufDD::GetLastError() const +{ + return(m_hr); +} + +LPCSTR CBackBufDD::GetLastErrorString() const +{ + return(GetErrorString(GetLastError())); +} + +bool CBackBufDD::IsCreated() const +{ + return(m_dd != NULL); +} + +bool CBackBufDD::IsMirrored() const +{ + return(m_IsMirrored); +} + +int CBackBufDD::GetOptions() const +{ + return(m_Options); +} + +SIZE CBackBufDD::GetSize() const +{ + SIZE temp = {m_Width, m_Height}; + return temp; +} + +bool CBackBufDD::IsExclusive() const +{ + return(m_IsExclusive); +} + +bool CBackBufDD::IsSurface() const +{ + return(m_Back != NULL); +} + +HRESULT CBackBufDD::CreateSurface(LPDDSURFACEDESC2 SurfaceDesc, LPDIRECTDRAWSURFACE7 FAR *Surface) +{ + if (m_dd != NULL) + return(m_dd->CreateSurface(SurfaceDesc, Surface, NULL)); + else + return DDERR_GENERIC; +} + +#endif \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/BackBufDD.h electricsheep-3.0.2-git20180325/MSVC/BackBufDD.h --- electricsheep-2.7~b12+svn20091224/MSVC/BackBufDD.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/BackBufDD.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,97 @@ +#pragma once +// Copyleft 2005 Chris Korda +// 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 any later version. +/* + chris korda + + revision history: + rev date comments + 00 10may05 initial version + 01 05may06 add CreateSurface wrapper + + DirectDraw back buffer for off-screen drawing + +*/ +#include "base.h" +#include "rect.h" +#include "vector4.h" +#include "wobject.h" +#include +#include + +class CBackBufDD +{ +public: + enum { + OPT_AUTO_MEMORY = 0x01, // automatically decide back buffer location; + // otherwise OPT_USE_VIDEO_MEM sets location + OPT_USE_VIDEO_MEM = 0x02, // if specified, create back buffer in video + // memory, else create it in system memory; + // ignored if OPT_AUTO_MEMORY is specified + OPT_MIRROR_PRECISE = 0x04 // make mirroring more precise at the expense + // of mirroring to an intermediate back buffer + }; + CBackBufDD(); + ~CBackBufDD(); + BOOL Create(HWND Main, HWND View, GUID *Driver = NULL, bool Exclusive = FALSE); + void Destroy(); + void DeleteSurface(); + bool CreateSurface(int Width, int Height); + void DrawQuad(const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const Base::Math::CRect &_uvrect ); + void SetContexts(LPDIRECTDRAWSURFACE7 _tex, int _SrcWidth, int _SrcHeight); + HRESULT GetDC(HDC FAR *lphDC); + HRESULT ReleaseDC(HDC hDC); + bool Blt(); + HRESULT GetLastError() const; + LPCSTR GetLastErrorString() const; + bool IsCreated() const; + void SetMirror(bool Enable); + bool IsMirrored() const; + void SetOptions(int Options); + int GetOptions() const; + bool SetExclusive(HWND Main, HWND View, bool Enable); + SIZE GetSize() const; + bool IsExclusive() const; + bool IsSurface() const; + static HMONITOR GetFullScreenRect(HWND hWnd, RECT& rc); + static bool GetMonitorGUID(HMONITOR hMon, GUID& MonGuid); + static LPCSTR GetErrorString(HRESULT hr); + HRESULT CreateSurface(LPDDSURFACEDESC2 SurfaceDesc, LPDIRECTDRAWSURFACE7 FAR *Surface); + +private: + typedef struct tagERRTRAN { + HRESULT Code; + LPCSTR Text; + } ERRTRAN; + typedef struct tagMONGUID { + HMONITOR Mon; + GUID Guid; + BOOL Valid; + } MONGUID; + static const ERRTRAN m_ErrTran[]; // map DirectDraw error codes to text + LPDIRECTDRAW7 m_dd; // pointer to DirectDraw instance + LPDIRECTDRAWSURFACE7 m_Front; // pointer to front buffer + LPDIRECTDRAWSURFACE7 m_Back; // pointer to back buffer surface + LPDIRECTDRAWSURFACE7 m_Mirror; // pointer to mirroring buffer + LPDIRECTDRAWSURFACE7 m_DrawBuf; // pointer to buffer we draw to + LPDIRECTDRAWCLIPPER m_Clipper; // pointer to clipper + HWND m_Main; // top-level owner + HWND m_View; // window to clip to + HRESULT m_hr; // most recent DirectDraw result code + int m_Width; // width of window, in client coords + int m_Height; // height of window, in client coords + bool m_IsMirrored; // true if we're mirroring + bool m_IsExclusive; // true if we're in full-screen exclusive mode + int m_Options; // display options; see enum above + + std::queue m_Tex; + std::queue m_SrcWidth; + std::queue m_SrcHeight; + bool m_ContextsUsed; + WINDOWPLACEMENT m_PreExcl; // window placement before exclusive mode + + static BOOL WINAPI DDEnumCallbackEx(GUID FAR *lpGUID, LPTSTR lpDriverDescription, + LPTSTR lpDriverName, LPVOID lpContext, HMONITOR hm); +}; \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/cpu_usage_win32.h electricsheep-3.0.2-git20180325/MSVC/cpu_usage_win32.h --- electricsheep-2.7~b12+svn20091224/MSVC/cpu_usage_win32.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/cpu_usage_win32.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,89 @@ +#pragma once +#include "base.h" +#include "MathBase.h" + +#include "windows.h" +#include "../msvc/msvc_fix.h" +#include +#include +#include +#include "Timer.h" + +class ESCpuUsage +{ +private: + FILETIME m_LastIdleTime; + FILETIME m_LastKernelTime; + FILETIME m_LastUserTime; + FILETIME m_LastESKernelTime; + FILETIME m_LastESUserTime; + Base::CTimer m_Timer; + fp8 m_LastCPUCheckTime; +public: + ESCpuUsage(): m_LastCPUCheckTime(0) + { + m_Timer.Reset(); + m_LastCPUCheckTime = m_Timer.Time(); + GetSystemTimes( &m_LastIdleTime, &m_LastKernelTime, &m_LastUserTime ); + } + bool GetCpuUsage(int &_total, int &_es) + { + FILETIME dummy1; + FILETIME dummy2; + FILETIME idleTime; + FILETIME kernelTime; + FILETIME userTime; + LARGE_INTEGER usr; + LARGE_INTEGER ker; + LARGE_INTEGER idl; + + SYSTEM_INFO sysinfo; + GetSystemInfo( &sysinfo ); + + fp8 newtime = m_Timer.Time(); + if (GetProcessTimes(GetCurrentProcess(), &dummy1, &dummy2, &kernelTime, &userTime ) != 0) + { + usr.LowPart = userTime.dwLowDateTime - m_LastESUserTime.dwLowDateTime; + usr.HighPart = userTime.dwHighDateTime- m_LastESUserTime.dwHighDateTime; + ker.LowPart = kernelTime.dwLowDateTime - m_LastESKernelTime.dwLowDateTime; + ker.HighPart = kernelTime.dwHighDateTime - m_LastESKernelTime.dwHighDateTime; + + fp8 period = newtime - m_LastCPUCheckTime; + if (period > 0.) + { + _es = int ( (ker.QuadPart + usr.QuadPart) * 100. / (period*1e+7) / sysinfo.dwNumberOfProcessors ); + } + else + _es = 0; + _es = ::Base::Math::Clamped(_es, 0, 100); + m_LastESKernelTime = kernelTime; + m_LastESUserTime = userTime; + } else + return false; + m_LastCPUCheckTime = newtime; + + if (GetSystemTimes( &idleTime, &kernelTime, &userTime ) != 0) + { + usr.LowPart = userTime.dwLowDateTime - m_LastUserTime.dwLowDateTime; + usr.HighPart = userTime.dwHighDateTime- m_LastUserTime.dwHighDateTime; + ker.LowPart = kernelTime.dwLowDateTime - m_LastKernelTime.dwLowDateTime; + ker.HighPart = kernelTime.dwHighDateTime - m_LastKernelTime.dwHighDateTime; + idl.LowPart = idleTime.dwLowDateTime - m_LastIdleTime.dwLowDateTime; + idl.HighPart = idleTime.dwHighDateTime - m_LastIdleTime.dwHighDateTime; + + if (ker.QuadPart + usr.QuadPart != 0) + { + _total = int ( (ker.QuadPart + usr.QuadPart - idl.QuadPart) * 100 / (ker.QuadPart + usr.QuadPart) ); + } + else + _total = 0; + _total = ::Base::Math::Clamped(_total, 0, 100); + m_LastIdleTime = idleTime; + m_LastKernelTime = kernelTime; + m_LastUserTime = userTime; + } + else + return false; + return true; + } +}; \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/DirDrawErrs.h electricsheep-3.0.2-git20180325/MSVC/DirDrawErrs.h --- electricsheep-2.7~b12+svn20091224/MSVC/DirDrawErrs.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/DirDrawErrs.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,125 @@ +#ifdef _MSC_VER +// Copyleft 2005 Chris Korda +// 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 any later version. +/* + chris korda + + revision history: + rev date comments + 00 10may05 initial version + + DirectDraw error codes + +*/ + +DIRDRAWERR( DDERR_ALREADYINITIALIZED) +DIRDRAWERR( DDERR_CANNOTATTACHSURFACE) +DIRDRAWERR( DDERR_CANNOTDETACHSURFACE) +DIRDRAWERR( DDERR_CURRENTLYNOTAVAIL) +DIRDRAWERR( DDERR_EXCEPTION) +DIRDRAWERR( DDERR_GENERIC) +DIRDRAWERR( DDERR_HEIGHTALIGN) +DIRDRAWERR( DDERR_INCOMPATIBLEPRIMARY) +DIRDRAWERR( DDERR_INVALIDCAPS) +DIRDRAWERR( DDERR_INVALIDCLIPLIST) +DIRDRAWERR( DDERR_INVALIDMODE) +DIRDRAWERR( DDERR_INVALIDOBJECT) +DIRDRAWERR( DDERR_INVALIDPARAMS) +DIRDRAWERR( DDERR_INVALIDPIXELFORMAT) +DIRDRAWERR( DDERR_INVALIDRECT) +DIRDRAWERR( DDERR_LOCKEDSURFACES) +DIRDRAWERR( DDERR_NO3D) +DIRDRAWERR( DDERR_NOALPHAHW) +DIRDRAWERR( DDERR_NOCLIPLIST) +DIRDRAWERR( DDERR_NOCOLORCONVHW) +DIRDRAWERR( DDERR_NOCOOPERATIVELEVELSET) +DIRDRAWERR( DDERR_NOCOLORKEY) +DIRDRAWERR( DDERR_NOCOLORKEYHW) +DIRDRAWERR( DDERR_NODIRECTDRAWSUPPORT) +DIRDRAWERR( DDERR_NOEXCLUSIVEMODE) +DIRDRAWERR( DDERR_NOFLIPHW) +DIRDRAWERR( DDERR_NOGDI) +DIRDRAWERR( DDERR_NOMIRRORHW) +DIRDRAWERR( DDERR_NOTFOUND) +DIRDRAWERR( DDERR_NOOVERLAYHW) +DIRDRAWERR( DDERR_NORASTEROPHW) +DIRDRAWERR( DDERR_NOROTATIONHW) +DIRDRAWERR( DDERR_NOSTRETCHHW) +DIRDRAWERR( DDERR_NOT4BITCOLOR) +DIRDRAWERR( DDERR_NOT4BITCOLORINDEX) +DIRDRAWERR( DDERR_NOT8BITCOLOR) +DIRDRAWERR( DDERR_NOTEXTUREHW) +DIRDRAWERR( DDERR_NOVSYNCHW) +DIRDRAWERR( DDERR_NOZBUFFERHW) +DIRDRAWERR( DDERR_NOZOVERLAYHW) +DIRDRAWERR( DDERR_OUTOFCAPS) +DIRDRAWERR( DDERR_OUTOFMEMORY) +DIRDRAWERR( DDERR_OUTOFVIDEOMEMORY) +DIRDRAWERR( DDERR_OVERLAYCANTCLIP) +DIRDRAWERR( DDERR_OVERLAYCOLORKEYONLYONEACTIVE) +DIRDRAWERR( DDERR_PALETTEBUSY) +DIRDRAWERR( DDERR_COLORKEYNOTSET) +DIRDRAWERR( DDERR_SURFACEALREADYATTACHED) +DIRDRAWERR( DDERR_SURFACEALREADYDEPENDENT) +DIRDRAWERR( DDERR_SURFACEBUSY) +DIRDRAWERR( DDERR_CANTLOCKSURFACE) +DIRDRAWERR( DDERR_SURFACEISOBSCURED) +DIRDRAWERR( DDERR_SURFACELOST) +DIRDRAWERR( DDERR_SURFACENOTATTACHED) +DIRDRAWERR( DDERR_TOOBIGHEIGHT) +DIRDRAWERR( DDERR_TOOBIGSIZE) +DIRDRAWERR( DDERR_TOOBIGWIDTH) +DIRDRAWERR( DDERR_UNSUPPORTED) +DIRDRAWERR( DDERR_UNSUPPORTEDFORMAT) +DIRDRAWERR( DDERR_UNSUPPORTEDMASK) +DIRDRAWERR( DDERR_VERTICALBLANKINPROGRESS) +DIRDRAWERR( DDERR_WASSTILLDRAWING) +DIRDRAWERR( DDERR_XALIGN) +DIRDRAWERR( DDERR_INVALIDDIRECTDRAWGUID) +DIRDRAWERR( DDERR_DIRECTDRAWALREADYCREATED) +DIRDRAWERR( DDERR_NODIRECTDRAWHW) +DIRDRAWERR( DDERR_PRIMARYSURFACEALREADYEXISTS) +DIRDRAWERR( DDERR_NOEMULATION) +DIRDRAWERR( DDERR_REGIONTOOSMALL) +DIRDRAWERR( DDERR_CLIPPERISUSINGHWND) +DIRDRAWERR( DDERR_NOCLIPPERATTACHED) +DIRDRAWERR( DDERR_NOHWND) +DIRDRAWERR( DDERR_HWNDSUBCLASSED) +DIRDRAWERR( DDERR_HWNDALREADYSET) +DIRDRAWERR( DDERR_NOPALETTEATTACHED) +DIRDRAWERR( DDERR_NOPALETTEHW) +DIRDRAWERR( DDERR_BLTFASTCANTCLIP) +DIRDRAWERR( DDERR_NOBLTHW) +DIRDRAWERR( DDERR_NODDROPSHW) +DIRDRAWERR( DDERR_OVERLAYNOTVISIBLE) +DIRDRAWERR( DDERR_NOOVERLAYDEST) +DIRDRAWERR( DDERR_INVALIDPOSITION) +DIRDRAWERR( DDERR_NOTAOVERLAYSURFACE) +DIRDRAWERR( DDERR_EXCLUSIVEMODEALREADYSET) +DIRDRAWERR( DDERR_NOTFLIPPABLE) +DIRDRAWERR( DDERR_CANTDUPLICATE) +DIRDRAWERR( DDERR_NOTLOCKED) +DIRDRAWERR( DDERR_CANTCREATEDC) +DIRDRAWERR( DDERR_NODC) +DIRDRAWERR( DDERR_WRONGMODE) +DIRDRAWERR( DDERR_IMPLICITLYCREATED) +DIRDRAWERR( DDERR_NOTPALETTIZED) +DIRDRAWERR( DDERR_UNSUPPORTEDMODE) +DIRDRAWERR( DDERR_NOMIPMAPHW) +DIRDRAWERR( DDERR_INVALIDSURFACETYPE) +DIRDRAWERR( DDERR_NOOPTIMIZEHW) +DIRDRAWERR( DDERR_NOTLOADED) +DIRDRAWERR( DDERR_NOFOCUSWINDOW) +DIRDRAWERR( DDERR_DCALREADYCREATED) +DIRDRAWERR( DDERR_NONONLOCALVIDMEM) +DIRDRAWERR( DDERR_CANTPAGELOCK) +DIRDRAWERR( DDERR_CANTPAGEUNLOCK) +DIRDRAWERR( DDERR_NOTPAGELOCKED) +DIRDRAWERR( DDERR_MOREDATA) +DIRDRAWERR( DDERR_VIDEONOTACTIVE) +DIRDRAWERR( DDERR_DEVICEDOESNTOWNSURFACE) +DIRDRAWERR( DDERR_NOTINITIALIZED) + +#endif \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/DirectX_DLL_functions.h electricsheep-3.0.2-git20180325/MSVC/DirectX_DLL_functions.h --- electricsheep-2.7~b12+svn20091224/MSVC/DirectX_DLL_functions.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/DirectX_DLL_functions.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,167 @@ +#pragma once +#include "base.h" +#include "log.h" +#include "SmartPtr.h" +#include "Singleton.h" +#include +#include + +namespace Base +{ +MakeSmartPointers( DXDLLFun ); + +class DXDLLFun : public CSingleton +{ + friend class CSingleton; + + // Private constructor accessible only to CSingleton. + DXDLLFun():d3dx9_hmodule(NULL), D3DXCompileShader_fun(NULL), D3DXGetVertexShaderProfile_fun(NULL), + D3DXCreateFontA_fun(NULL), D3DXCreateSprite_fun(NULL), D3DXMatrixMultiply_fun(NULL), + D3DXGetPixelShaderProfile_fun(NULL), m_bInitDone(false) + { + } + virtual ~DXDLLFun() + { + } + + // No copy constructor or assignment operator. + NO_CLASS_STANDARDS( DXDLLFun ); + + typedef HRESULT (WINAPI *D3DXCreateFontA_fun_type)( + LPDIRECT3DDEVICE9 pDevice, + INT Height, + UINT Width, + UINT Weight, + UINT MipLevels, + BOOL Italic, + DWORD CharSet, + DWORD OutputPrecision, + DWORD Quality, + DWORD PitchAndFamily, + LPCSTR pFaceName, + LPD3DXFONT* ppFont) ; + + typedef HRESULT (WINAPI *D3DXCreateSprite_fun_type)( + LPDIRECT3DDEVICE9 pDevice, + LPD3DXSPRITE* ppSprite); + + typedef D3DXMATRIX* (WINAPI *D3DXMatrixMultiply_fun_type) + ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2 ); + + typedef LPCSTR (WINAPI *D3DXGetPixelShaderProfile_fun_type)( + LPDIRECT3DDEVICE9 pDevice); + + typedef LPCSTR (WINAPI *D3DXGetVertexShaderProfile_fun_type)( + LPDIRECT3DDEVICE9 pDevice); + + typedef HRESULT (WINAPI + *D3DXCompileShader_fun_type)( + LPCSTR pSrcData, + UINT SrcDataLen, + CONST D3DXMACRO* pDefines, + LPD3DXINCLUDE pInclude, + LPCSTR pFunctionName, + LPCSTR pProfile, + DWORD Flags, + LPD3DXBUFFER* ppShader, + LPD3DXBUFFER* ppErrorMsgs, + LPD3DXCONSTANTTABLE* ppConstantTable); + + HMODULE d3dx9_hmodule; + bool m_bInitDone; +public: + D3DXCompileShader_fun_type D3DXCompileShader_fun; + D3DXGetVertexShaderProfile_fun_type D3DXGetVertexShaderProfile_fun; + D3DXCreateFontA_fun_type D3DXCreateFontA_fun; + D3DXCreateSprite_fun_type D3DXCreateSprite_fun; + D3DXMatrixMultiply_fun_type D3DXMatrixMultiply_fun; + D3DXGetPixelShaderProfile_fun_type D3DXGetPixelShaderProfile_fun; + + bool Init() + { + g_Log->Info("Searching for d3dx9 dll..."); + m_bInitDone = true; + static const std::string suffix[20] = {"24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42","43"}; + for (size_t ii = 20; ii > 0; --ii) + { + std::string modname = "d3dx9_" + suffix[ii-1] + ".dll"; + d3dx9_hmodule = LoadLibraryA(modname.c_str()); + if (d3dx9_hmodule == NULL) + { + g_Log->Error("Unable to load module %s",modname.c_str()); + } + else + { + g_Log->Info("Using module %s",modname.c_str()); + break; + } + } + if (d3dx9_hmodule == NULL) + { + g_Log->Error("Unable to find d3dx9_24.dll-d3dx9_43.dll"); + return false; + } + D3DXCreateFontA_fun = (D3DXCreateFontA_fun_type)GetProcAddress(d3dx9_hmodule, "D3DXCreateFontA"); + if (D3DXCreateFontA_fun == NULL) + { + g_Log->Error("Unable to load D3DXCreateFontA_fun"); + return false; + } + D3DXCreateSprite_fun= (D3DXCreateSprite_fun_type)GetProcAddress(d3dx9_hmodule, "D3DXCreateSprite"); + if (D3DXCreateSprite_fun == NULL) + { + g_Log->Error("Unable to load D3DXCreateSprite_fun"); + return false; + } + D3DXMatrixMultiply_fun = (D3DXMatrixMultiply_fun_type)GetProcAddress(d3dx9_hmodule, "D3DXMatrixMultiply"); + if (D3DXMatrixMultiply_fun == NULL) + { + g_Log->Error("Unable to load D3DXMatrixMultiply_fun"); + return false; + } + D3DXGetPixelShaderProfile_fun = (D3DXGetPixelShaderProfile_fun_type)GetProcAddress(d3dx9_hmodule, "D3DXGetPixelShaderProfile"); + if (D3DXGetPixelShaderProfile_fun == NULL) + { + g_Log->Error("Unable to load D3DXGetPixelShaderProfile_fun"); + return false; + } + D3DXGetVertexShaderProfile_fun = (D3DXGetVertexShaderProfile_fun_type)GetProcAddress(d3dx9_hmodule, "D3DXGetVertexShaderProfile"); + if (D3DXGetVertexShaderProfile_fun == NULL) + { + g_Log->Error("Unable to load D3DXGetVertexShaderProfile_fun"); + return false; + } + D3DXCompileShader_fun = (D3DXCompileShader_fun_type)GetProcAddress(d3dx9_hmodule, "D3DXCompileShader"); + if (D3DXCompileShader_fun == NULL) + { + g_Log->Error("Unable to load D3DXCompileShader_fun"); + return false; + } + return true; + } + + const char *Description() + { + return "DXDLLFun"; + } + bool Shutdown(void) + { + if (d3dx9_hmodule != NULL) + FreeLibrary(d3dx9_hmodule); + return true; + } + + static DXDLLFun *Instance() + { + static DXDLLFun dllfun; + + if( dllfun.SingletonActive() == false ) + printf( "Trying to access shutdown singleton dllfun"); + + return( &dllfun ); + } +}; + +}; + +#define g_DLLFun ::Base::DXDLLFun::Instance() \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/DisplayDD.cpp electricsheep-3.0.2-git20180325/MSVC/DisplayDD.cpp --- electricsheep-2.7~b12+svn20091224/MSVC/DisplayDD.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/DisplayDD.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,417 @@ +#ifdef WIN32 +#ifdef _MSC_VER + +#include +#include +#include "DisplayDD.h" +#include "Log.h" + +namespace DisplayOutput +{ +bool m_bWaitForInputIdleDS = false; +CBackBufDD CDisplayDD::m_dd; +CDisplayDD::CDisplayDD() : CDisplayOutput() +{ + m_WindowHandle = NULL; + m_ParentWindowHandle = NULL; + m_bScreensaver = false; + m_bWaitForInputIdleDS = false; +} + + +CDisplayDD::~CDisplayDD() +{ +} + +bool CDisplayDD::InitDD(HWND hWnd) +{ + if (m_bFullScreen) + { + return m_dd.SetExclusive(hWnd, hWnd, true); + } + else + { + if (m_bPreview) + { + if (m_dd.Create(hWnd, m_ParentWindowHandle) == FALSE || m_dd.CreateSurface(m_Width, m_Height) == FALSE) + { + g_Log->Info(m_dd.GetLastErrorString()); + return false; + } + } + else + if (m_dd.Create(hWnd, m_ParentWindowHandle) == FALSE || m_dd.CreateSurface(m_Width, m_Height) == FALSE) + { + g_Log->Info(m_dd.GetLastErrorString()); + return false; + } + } + return true; +} + +LRESULT CALLBACK CDisplayDD::wndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ) +{ + PAINTSTRUCT ps; + + switch( msg ) + { + case WM_USER: + // All initialization messages have gone through. Allow 500ms of idle time, then proceed with initialization. + SetTimer( hWnd, 1, 500, NULL ); + g_Log->Info( "Starting 500ms preview timer" ); + break; + + case WM_TIMER: + // Initial idle time is done, proceed with initialization. + m_bWaitForInputIdleDS = false; + g_Log->Info( "500ms preview timer done" ); + KillTimer( hWnd, 1 ); + break; + + case WM_PAINT: + { + if (BeginPaint( hWnd, &ps ) != NULL) + EndPaint( hWnd, &ps ); + return 0; + } + + case WM_CLOSE: + DestroyWindow(hWnd); + break; + + case WM_DESTROY: + m_dd.Destroy(); + PostQuitMessage(0); + break; + + case WM_KEYUP: + { + CKeyEvent *spEvent = new CKeyEvent(); + spEvent->m_bPressed = true; + + switch( wParam ) + { + case VK_TAB: spEvent->m_Code = CKeyEvent::KEY_TAB; break; + case VK_LWIN: spEvent->m_Code = CKeyEvent::KEY_LALT; break; + case VK_MENU: spEvent->m_Code = CKeyEvent::KEY_MENU; break; + case VK_LEFT: spEvent->m_Code = CKeyEvent::KEY_LEFT; break; + case VK_RIGHT: spEvent->m_Code = CKeyEvent::KEY_RIGHT; break; + case VK_UP: spEvent->m_Code = CKeyEvent::KEY_UP; break; + case VK_DOWN: spEvent->m_Code = CKeyEvent::KEY_DOWN; break; + case VK_SPACE: spEvent->m_Code = CKeyEvent::KEY_SPACE; break; + case 0x46: spEvent->m_Code = CKeyEvent::KEY_F; break; + case VK_CONTROL:spEvent->m_Code = CKeyEvent::KEY_CTRL; break; + case VK_F1: spEvent->m_Code = CKeyEvent::KEY_F1; break; + case VK_F2: spEvent->m_Code = CKeyEvent::KEY_F2; break; + case VK_F3: spEvent->m_Code = CKeyEvent::KEY_F3; break; + case VK_F4: spEvent->m_Code = CKeyEvent::KEY_F4; break; + case VK_F8: spEvent->m_Code = CKeyEvent::KEY_F8; break; + case VK_ESCAPE: spEvent->m_Code = CKeyEvent::KEY_Esc; break; + } + + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_LBUTTONUP: + { + CMouseEvent *spEvent = new CMouseEvent(); + spEvent->m_Code = CMouseEvent::Mouse_LEFT; + spEvent->m_X = MAKEPOINTS( lParam ).x; + spEvent->m_Y = MAKEPOINTS( lParam ).y; + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_RBUTTONUP: + { + CMouseEvent *spEvent = new CMouseEvent(); + spEvent->m_Code = CMouseEvent::Mouse_RIGHT; + spEvent->m_X = MAKEPOINTS( lParam ).x; + spEvent->m_Y = MAKEPOINTS( lParam ).y; + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_MOUSEMOVE: + { + CMouseEvent *spEvent = new CMouseEvent(); + spEvent->m_Code = CMouseEvent::Mouse_MOVE; + + spEvent->m_X = MAKEPOINTS( lParam ).x; + spEvent->m_Y = MAKEPOINTS( lParam ).y; + + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + break; + + case WM_POWERBROADCAST: + switch( LOWORD( wParam ) ) + { + case PBT_APMBATTERYLOW: + case PBT_APMSUSPEND: + { + CPowerEvent *spEvent = new CPowerEvent(); + spCEvent e = spEvent; + m_EventQueue.push( e ); + } + } + break; + case WM_SIZE: + { + RECT rc; + GetClientRect( hWnd, &rc ); + if (!m_dd.IsExclusive()) + m_dd.CreateSurface(rc.right - rc.left, rc.bottom - rc.top); + } + break; + + default: + { + return DefWindowProc( hWnd, msg, wParam, lParam ); + } + } + return 0; +} + + +HWND CDisplayDD::createwindow( uint32 _w, uint32 _h, const bool _bFullscreen ) +{ + m_bFullScreen = _bFullscreen; + HMODULE hInstance = GetModuleHandle(NULL); + + if( _bFullscreen ) + { + WNDCLASS cls = {0}; + + cls.hCursor = NULL;//LoadCursor( NULL, IDC_ARROW ); + cls.hIcon = LoadIcon (GetModuleHandle(NULL), MAKEINTRESOURCE(1)); + cls.lpszMenuName = NULL; + cls.lpszClassName = TEXT("ElectricsheepWndClass"); + cls.hbrBackground = (HBRUSH) GetStockObject( BLACK_BRUSH ); + cls.hInstance = hInstance; + cls.style = CS_VREDRAW | CS_HREDRAW; + cls.lpfnWndProc = (WNDPROC)CDisplayDD::wndProc; + cls.cbWndExtra = 0; + cls.cbClsExtra = 0; + RegisterClass( &cls ); + + RECT rc = {0}; + DWORD dwStyle; + + dwStyle = WS_VISIBLE | WS_POPUP; + HWND hWnd = CreateWindowEx( WS_EX_TOPMOST, L"ElectricsheepWndClass", L"Electricsheep", dwStyle, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInstance, NULL ); + m_ParentWindowHandle = hWnd; + return hWnd; + } + + WNDCLASS wndclass; + RECT windowRect; + SetRect( &windowRect, 0, 0, _w, _h ); + + ZeroMemory( &wndclass, sizeof(WNDCLASS) ); + + wndclass.style = CS_HREDRAW | CS_VREDRAW; + wndclass.lpfnWndProc = (WNDPROC)CDisplayDD::wndProc; + wndclass.cbClsExtra = 0; + wndclass.cbWndExtra = 0; + wndclass.hInstance = hInstance; + wndclass.hIcon = LoadIcon (GetModuleHandle(NULL), MAKEINTRESOURCE(1)); + wndclass.hCursor = NULL;//LoadCursor (NULL, IDC_ARROW); + wndclass.hbrBackground = NULL; + wndclass.lpszMenuName = NULL; + wndclass.lpszClassName = L"ElectricsheepWndClass"; + + if( !RegisterClass (&wndclass) ) + { + g_Log->Info("Failed to register window class"); + return 0; + } + + unsigned long exStyle; + unsigned long style; + + exStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; + style = WS_OVERLAPPEDWINDOW | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; + + AdjustWindowRectEx( &windowRect, style, false, exStyle ); + _w = windowRect.right - windowRect.left; + _h = windowRect.bottom - windowRect.top; + HWND hWnd = CreateWindowEx( exStyle, L"ElectricsheepWndClass", L"Electricsheep", style, 0, 0, _w, _h, NULL, NULL, hInstance, NULL ); + m_ParentWindowHandle = hWnd; + return hWnd; +} + +bool CDisplayDD::Initialize( HWND _hWnd, bool _bPreview ) +{ + m_bScreensaver = true; + m_bPreview = _bPreview; + + HMODULE hInstance = GetModuleHandle( NULL ); + + WNDCLASS wc = {0}; + + wc.style = CS_VREDRAW | CS_HREDRAW; + wc.lpfnWndProc = (WNDPROC)CDisplayDD::wndProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = hInstance; + wc.hIcon = LoadIcon (GetModuleHandle(NULL), MAKEINTRESOURCE(1)); + wc.hCursor = NULL; + wc.hbrBackground = NULL; + wc.lpszMenuName = NULL; + wc.lpszClassName = L"ElectricsheepWndClass"; + RegisterClass( &wc ); + + if( _bPreview ) + { + RECT rc; + //GetWindowRect( _hWnd, &rc ); + GetClientRect( _hWnd, &rc ); + int32 cx = rc.right - rc.left; + int32 cy = rc.bottom - rc.top; + + g_Log->Info( "rc: %d, %d", cx, cy ); + + DWORD dwStyle = WS_VISIBLE | WS_CHILD; + AdjustWindowRect( &rc, dwStyle, FALSE ); + m_ParentWindowHandle = _hWnd; + m_WindowHandle = CreateWindow( L"ElectricsheepWndClass", L"Preview", dwStyle, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, _hWnd, NULL, hInstance, this ); + + if( m_WindowHandle == NULL ) + return false; + + m_Width = cx; + m_Height = cy; + + g_Log->Info( "Screensaver preview (%dx%d)", cx, cy ); + + // In preview mode, "pause" (enter a limited message loop) briefly before proceeding, so the display control panel knows to update itself. + m_bWaitForInputIdleDS = true; + + // Post a message to mark the end of the initial group of window messages + PostMessage( m_WindowHandle, WM_USER, 0, 0 ); + + InvalidateRect( GetParent( _hWnd ), NULL, FALSE ); // Invalidate the hwnd so it gets drawn + UpdateWindow( GetParent( _hWnd ) ); + UpdateWindow( GetParent( _hWnd ) ); + MSG msg; + while( m_bWaitForInputIdleDS ) + { + if( !GetMessage( &msg, m_WindowHandle, 0, 0 ) ) + { + PostQuitMessage(0); + break; + } + + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } + InitDD( _hWnd ); + SetFocus( _hWnd ); + ShowCursor( true ); + } + else + { + RECT rc; + GetWindowRect( _hWnd, &rc ); + m_Width = rc.right; + m_Height = rc.bottom; + + m_WindowHandle = _hWnd; + m_ParentWindowHandle = _hWnd; + if( m_WindowHandle == NULL ) + return false; + + g_Log->Info( "Screensaver (%dx%d)", m_Width, m_Height ); + + // Hide cursor. + ShowCursor( false ); + + InitDD( m_WindowHandle ); + } + + return true; +} + + +HWND CDisplayDD::Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ) +{ + m_WindowHandle = createwindow( _width, _height, _bFullscreen ); + m_ParentWindowHandle = m_WindowHandle; + if( m_WindowHandle == 0 ) + return 0; + + // Show or Hide cursor. + ShowCursor( !_bFullscreen ); + + if (!_bFullscreen) + { + RECT rcClient, rcWindow; + POINT ptDiff; + GetClientRect(m_WindowHandle, &rcClient); + GetWindowRect(m_WindowHandle, &rcWindow); + ptDiff.x = (rcWindow.right - rcWindow.left) - rcClient.right; + ptDiff.y = (rcWindow.bottom - rcWindow.top) - rcClient.bottom; + MoveWindow(m_WindowHandle, rcWindow.left, rcWindow.top, _width + ptDiff.x, _height + ptDiff.y, TRUE); + } + // Get window dimensions. + RECT rect; + GetClientRect( m_WindowHandle, &rect ); + m_Width = rect.right; + m_Height = rect.bottom; + + ShowWindow( m_WindowHandle, SW_SHOW ); + SetForegroundWindow( m_WindowHandle ); + SetFocus( m_WindowHandle ); + + InitDD(m_WindowHandle); + + if (m_Width == 0 && m_Height == 0) + { + m_Width = m_dd.GetSize().cx; + m_Height = m_dd.GetSize().cy; + } + + return m_WindowHandle; +} + +// +void CDisplayDD::Title( const std::string &_title ) +{ + SetWindowTextA( m_WindowHandle, _title.c_str() ); +} + +// +void CDisplayDD::Update() +{ + MSG msg; + + //if( m_bPreview ) + //{ + // //g_Log->Info( "Invalidating" ); + // InvalidateRect( m_WindowHandle, NULL, FALSE ); // Invalidate the hwnd so it gets drawn + // UpdateWindow( m_WindowHandle ); + //} + + while( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) ) + { + if( GetMessage( &msg, NULL, 0, 0) <= 0 ) // error or WM_QUIT + { + m_bClosed = true; + return; + } + + TranslateMessage( &msg ); + DispatchMessage( &msg ); + } +} + +}; + +#endif +#endif \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/DisplayDD.h electricsheep-3.0.2-git20180325/MSVC/DisplayDD.h --- electricsheep-2.7~b12+svn20091224/MSVC/DisplayDD.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/DisplayDD.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,50 @@ +#pragma once +#include "../msvc/BackBufDD.h" +#include "DisplayOutput.h" + +namespace DisplayOutput +{ + +class CDisplayDD : public CDisplayOutput +{ + HWND m_WindowHandle; + HWND m_ParentWindowHandle; + + HWND createwindow( uint32 _w, uint32 _h, const bool _bFullscreen ); + + // Only valid when running as a screensaver. + bool m_bScreensaver; + bool m_bPreview; + + static CBackBufDD m_dd; + + public: + CDisplayDD(); + virtual ~CDisplayDD(); + + static LRESULT CALLBACK wndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ); + + static char *Description() { return "Windows DirectDraw display"; }; + virtual HWND Initialize( const uint32 _width, const uint32 _height, const bool _bFullscreen ); + + virtual bool InitDD(HWND hWnd); + HWND WindowHandle( void ) { return m_WindowHandle; }; + + // This is used when running as a screensaver, where the hwnd might already be provided. + virtual bool Initialize( HWND _hWnd, bool _bPreview ); + CBackBufDD *GetBackBufferPtr() + { + return (CBackBufDD*)(&m_dd); + } + // + virtual void Title( const std::string &_title ); + virtual void Update(); + + virtual bool HasShaders() { return false; }; + void SwapBuffers() { + } +}; + +MakeSmartPointers( CDisplayDD ); + +}; \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/electricsheep.sln electricsheep-3.0.2-git20180325/MSVC/electricsheep.sln --- electricsheep-2.7~b12+svn20091224/MSVC/electricsheep.sln 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/electricsheep.sln 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "es", "electricsheep.vcxproj", "{C117F50C-4724-48CF-8C5C-193FB1A0F26A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C117F50C-4724-48CF-8C5C-193FB1A0F26A}.Debug|Win32.ActiveCfg = Debug|Win32 + {C117F50C-4724-48CF-8C5C-193FB1A0F26A}.Debug|Win32.Build.0 = Debug|Win32 + {C117F50C-4724-48CF-8C5C-193FB1A0F26A}.Debug|x64.ActiveCfg = Debug|x64 + {C117F50C-4724-48CF-8C5C-193FB1A0F26A}.Debug|x64.Build.0 = Debug|x64 + {C117F50C-4724-48CF-8C5C-193FB1A0F26A}.Release|Win32.ActiveCfg = Release|Win32 + {C117F50C-4724-48CF-8C5C-193FB1A0F26A}.Release|Win32.Build.0 = Release|Win32 + {C117F50C-4724-48CF-8C5C-193FB1A0F26A}.Release|x64.ActiveCfg = Release|x64 + {C117F50C-4724-48CF-8C5C-193FB1A0F26A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/electricsheep.vcxproj electricsheep-3.0.2-git20180325/MSVC/electricsheep.vcxproj --- electricsheep-2.7~b12+svn20091224/MSVC/electricsheep.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/electricsheep.vcxproj 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,625 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + es + {C117F50C-4724-48CF-8C5C-193FB1A0F26A} + electricsheep + Win32Proj + 8.1 + + + + Application + Unicode + true + v140 + + + Application + Unicode + true + Windows7.1SDK + + + Application + Unicode + v140 + + + Application + Unicode + Windows7.1SDK + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(Configuration)x64d\ + true + true + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(Configuration)x64\ + false + false + C:\boost_1_64_0\stage\lib;$(DXSDK_DIR)Lib\x86;$(LibraryPath) + C:\boost_1_45_0_x64\stage\lib;$(DXSDK_DIR)Lib\x64;$(LibraryPath) + C:\boost_1_64_0;$(DXSDK_DIR)Include;$(IncludePath) + C:\boost_1_45_0_x64;$(DXSDK_DIR)Include;$(IncludePath) + C:\boost_1_64_0;$(DXSDK_DIR)Include;$(IncludePath) + C:\boost_1_45_0_x64;$(DXSDK_DIR)Include;$(IncludePath) + $(ProjectName)d + $(ProjectName)d + C:\boost_1_64_0\stage\lib;$(DXSDK_DIR)Lib\x86;$(LibraryPath) + C:\boost_1_45_0_x64\stage\lib;$(DXSDK_DIR)Lib\x64;$(LibraryPath) + .scr + .scr + + + + mkdir ..\runtimemsvc\scripts +mkdir ..\runtimemsvc\scripts\dictionary +mkdir ..\runtimemsvc\scripts\logging +copy ..\runtime\scripts\*.* ..\runtimemsvc\scripts\*.* /y +copy ..\runtime\scripts\dictionary\*.* ..\runtimemsvc\scripts\Dictionary\*.* /y +copy ..\runtime\scripts\logging\*.* ..\runtimemsvc\scripts\logging\*.* /y +copy ..\runtime\electricsheep-frown.png ..\runtimemsvc /y +copy ..\runtime\electricsheep-smile.png ..\runtimemsvc /y +copy ..\runtime\electricsheep-attr.png ..\runtimemsvc /y +copy ..\runtime\exchndl.dll ..\runtimemsvc /y +copy ..\runtime\flam3-animate.exe ..\runtimemsvc /y +copy ..\runtime\Instructions.rtf ..\runtimemsvc /y +copy ..\runtime\License.rtf ..\runtimemsvc /y +copy ..\runtime\logo.png ..\runtimemsvc /y +copy ..\runtime\pthreadGC2.dll ..\runtimemsvc /y + + + + Disabled + ..\ffmpeg\ffmpeg-static\include;..\curl\include;..\ContentDownloader;..\Client;..\Common;..\Common\Math;..\ContentDecoder;..\DisplayOutput\Renderer;..\DisplayOutput;..\libxml\include;..\lua5.1\include;..\Networking;..\tinyXml;..\TupleStorage;..\DisplayOutput\DirectX;..\DisplayOutput\OpenGL;C:\wxWidgets\include;C:\wxWidgets\include\msvc;C:\wxWidgets\src\zlib;C:\wxWidgets\src\png;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;NOMINMAX;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;D3D_DEBUG_INFO;COMPILE_MULTIMON_STUBS;BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + avcodec.lib;avutil.lib;avfilter.lib;swscale.lib;avdevice.lib;avformat.lib;user32.lib;shlwapi.lib;wxzlibd.lib;wxpngd.lib;libcurld.lib;tinyxmld.lib;lua5.1d.lib;d3d9.lib;ws2_32.lib;wldap32.lib;ddraw.lib;dxguid.lib;psapi.lib;delayimp.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)d.exe + ..\curl\lib\debug-ssl-zlib;..\tinyXml\Debugtinyxml;..\lua5.1\lib\static;..\ffmpeg\ffmpeg-static\lib;..\openssl-1.0.2k\out32;C:\wxWidgets\lib\vc_lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + d3d9.dll;ddraw.dll;wldap32.dll;ws2_32.dll;%(DelayLoadDLLs) + true + Windows + MachineX86 + false + + + copy .\debug\esd.exe ..\RuntimeMSVC /y + + + + + mkdir ..\runtimemsvc\scripts +mkdir ..\runtimemsvc\scripts\dictionary +mkdir ..\runtimemsvc\scripts\logging +copy ..\runtime\scripts\*.* ..\runtimemsvc\scripts\*.* /y +copy ..\runtime\scripts\dictionary\*.* ..\runtimemsvc\scripts\Dictionary\*.* /y +copy ..\runtime\scripts\logging\*.* ..\runtimemsvc\scripts\logging\*.* /y +copy ..\runtime\electricsheep-frown.png ..\runtimemsvc /y +copy ..\runtime\electricsheep-smile.png ..\runtimemsvc /y +copy ..\runtime\electricsheep-attr.png ..\runtimemsvc /y +copy ..\runtime\exchndl.dll ..\runtimemsvc /y +copy ..\runtime\flam3-animate.exe ..\runtimemsvc /y +copy ..\runtime\Instructions.rtf ..\runtimemsvc /y +copy ..\runtime\License.rtf ..\runtimemsvc /y +copy ..\runtime\logo.png ..\runtimemsvc /y +copy ..\runtime\pthreadGC2.dll ..\runtimemsvc /y + + + + Disabled + ..\ffmpeg\ffmpeg-static\include;..\curl\include;..\ContentDownloader;..\Client;..\Common;..\Common\Math;..\ContentDecoder;..\DisplayOutput\Renderer;..\DisplayOutput;..\libxml\include;..\lua5.1-x64\include;..\Networking;..\tinyXml-x64;..\TupleStorage;..\DisplayOutput\DirectX;..\DisplayOutput\OpenGL;C:\wxWidgets-2.9.1-x64\include;C:\wxWidgets-2.9.1-x64\include\msvc;C:\wxWidgets-2.9.1-x64\src\zlib;C:\wxWidgets-2.9.1-x64\src\png;%(AdditionalIncludeDirectories) + WIN32;_WIN64;_DEBUG;_WINDOWS;NOMINMAX;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;D3D_DEBUG_INFO;COMPILE_MULTIMON_STUBS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + StreamingSIMDExtensions2 + + + libavcodec.lib;libavutil.lib;libavfilter.lib;libswscale.lib;libavdevice.lib;libavformat.lib;user32.lib;shlwapi.lib;wxzlibd.lib;wxpngd.lib;libcurld.lib;tinyxmld.lib;lua5.1d.lib;d3d9.lib;ws2_32.lib;wldap32.lib;dxguid.lib;psapi.lib;delayimp.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName)d.exe + ..\curl-x64\lib\debug-zlib;..\tinyXml-x64\Debug;..\lua5.1-x64\lib\static;..\ffmpeg\ffmpeg-static\libx64;C:\wxWidgets-2.9.1-x64\lib\vc_lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + d3d9.dll;wldap32.dll;ws2_32.dll;%(DelayLoadDLLs) + true + Windows + false + + + + + copy .\debug\esd.exe ..\RuntimeMSVC\esdx64.exe /y + + + + + mkdir ..\runtimemsvc\scripts +mkdir ..\runtimemsvc\scripts\dictionary +mkdir ..\runtimemsvc\scripts\logging +copy ..\runtime\scripts\*.* ..\runtimemsvc\scripts\*.* +copy ..\runtime\scripts\dictionary\*.* ..\runtimemsvc\scripts\Dictionary\*.* +copy ..\runtime\scripts\logging\*.* ..\runtimemsvc\scripts\logging\*.* +copy ..\runtime\electricsheep-frown.png ..\runtimemsvc +copy ..\runtime\electricsheep-smile.png ..\runtimemsvc +copy ..\runtime\electricsheep-attr.png ..\runtimemsvc +copy ..\runtime\exchndl.dll ..\runtimemsvc +copy ..\runtime\flam3-animate.exe ..\runtimemsvc +copy ..\runtime\Instructions.rtf ..\runtimemsvc +copy ..\runtime\License.rtf ..\runtimemsvc +copy ..\runtime\logo.png ..\runtimemsvc +copy ..\runtime\pthreadGC2.dll ..\runtimemsvc + + + + MaxSpeed + AnySuitable + true + Speed + false + true + true + ..\ffmpeg\ffmpeg-static\include;..\curl\include;..\ContentDownloader;..\Client;..\Common;..\Common\Math;..\ContentDecoder;..\DisplayOutput\Renderer;..\DisplayOutput;..\lua5.1\include;..\Networking;..\tinyXml;..\TupleStorage;..\DisplayOutput\DirectX;..\DisplayOutput\OpenGL;C:\wxWidgets\include\msvc;C:\wxWidgets\include;C:\wxWidgets\src\png;C:\wxWidgets\src\zlib;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;NOMINMAX;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;COMPILE_MULTIMON_STUBS;BOOST_NUMERIC_CONVERSION_RELAX_BUILT_IN_CAST_TRAITS;%(PreprocessorDefinitions) + true + MultiThreaded + false + NotSet + Precise + + + Level3 + ProgramDatabase + true + + + 0x0409 + + + avcodec.lib;avutil.lib;avfilter.lib;swscale.lib;avdevice.lib;avformat.lib;wxzlib.lib;wxpng.lib;kernel32.lib;user32.lib;shlwapi.lib;libcurl.lib;tinyxml.lib;lua5.1.lib;d3d9.lib;ws2_32.lib;wldap32.lib;ddraw.lib;dxguid.lib;psapi.lib;delayimp.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + NotSet + $(OutDir)$(ProjectName).scr + ..\curl\lib\release-ssl-zlib;..\tinyXml\Releasetinyxml;..\lua5.1\lib\static;..\ffmpeg\ffmpeg-static\lib;..\openssl-1.0.2k\out32;C:\wxWidgets\lib\vc_lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + + + d3d9.dll;ddraw.dll;wldap32.dll;ws2_32.dll;%(DelayLoadDLLs) + true + + + true + es.map + true + Windows + + + true + true + UseLinkTimeCodeGeneration + true + MachineX86 + true + false + + + copy .\release\es.scr ..\RuntimeMSVC\es.scr /y +copy .\release\es.scr ..\RuntimeMSVC\es.exe /y + + + + true + + + + + mkdir ..\runtimemsvc\scripts +mkdir ..\runtimemsvc\scripts\dictionary +mkdir ..\runtimemsvc\scripts\logging +copy ..\runtime\scripts\*.* ..\runtimemsvc\scripts\*.* +copy ..\runtime\scripts\dictionary\*.* ..\runtimemsvc\scripts\Dictionary\*.* +copy ..\runtime\scripts\logging\*.* ..\runtimemsvc\scripts\logging\*.* +copy ..\runtime\electricsheep-frown.png ..\runtimemsvc +copy ..\runtime\electricsheep-smile.png ..\runtimemsvc +copy ..\runtime\electricsheep-attr.png ..\runtimemsvc +copy ..\runtime\exchndl.dll ..\runtimemsvc +copy ..\runtime\flam3-animate.exe ..\runtimemsvc +copy ..\runtime\Instructions.rtf ..\runtimemsvc +copy ..\runtime\License.rtf ..\runtimemsvc +copy ..\runtime\logo.png ..\runtimemsvc +copy ..\runtime\pthreadGC2.dll ..\runtimemsvc + + + + MaxSpeed + AnySuitable + true + Speed + false + true + true + ..\ffmpeg\ffmpeg-static\include;..\curl-x64\include;..\ContentDownloader;..\Client;..\Common;..\Common\Math;..\ContentDecoder;..\DisplayOutput\Renderer;..\DisplayOutput;..\lua5.1-x64\include;..\Networking;..\tinyXml-x64;..\TupleStorage;..\DisplayOutput\DirectX;..\DisplayOutput\OpenGL;C:\wxWidgets-2.9.1-x64\include\msvc;C:\wxWidgets-2.9.1-x64\include;C:\wxWidgets-2.9.1-x64\src\png;C:\wxWidgets-2.9.1-x64\src\zlib;%(AdditionalIncludeDirectories) + WIN32;_WIN64;NDEBUG;_WINDOWS;NOMINMAX;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;COMPILE_MULTIMON_STUBS;%(PreprocessorDefinitions) + true + MultiThreaded + false + StreamingSIMDExtensions2 + Precise + + + Level3 + ProgramDatabase + true + + + 0x0409 + + + libavcodec.lib;libavformat.lib;libswscale.lib;libavdevice.lib;libavutil.lib;wxzlib.lib;wxpng.lib;kernel32.lib;user32.lib;shlwapi.lib;libcurl.lib;tinyxml.lib;lua5.1.lib;d3d9.lib;ws2_32.lib;wldap32.lib;dxguid.lib;psapi.lib;delayimp.lib;%(AdditionalDependencies) + NotSet + $(OutDir)$(ProjectName).scr + ..\curl-x64\lib\release-zlib;..\tinyXml-x64\Release;..\lua5.1-x64\lib\static;..\ffmpeg\ffmpeg-static\libx64;C:\wxWidgets-2.9.1-x64\lib\vc_lib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + + + d3d9.dll;wldap32.dll;ws2_32.dll;%(DelayLoadDLLs) + true + + + true + es.map + true + Windows + + + true + true + UseLinkTimeCodeGeneration + true + + + + + copy .\release\es.scr ..\RuntimeMSVC\esx64.scr /y +copy .\release\es.scr ..\RuntimeMSVC\esx64.exe /y + + + + + + + + + + + + + + + + + + + + + CompileAsCpp + CompileAsCpp + + + + + + true + true + + + true + true + + + + + + true + true + + + true + true + true + true + + + true + true + true + true + + + true + true + + + true + true + true + true + + + + + + + + + + + + + + + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + + + + + + + + + + + + + + + true + true + + + + true + true + + + true + true + + + true + true + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + + + true + true + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + + + + + + + + + + + + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + true + true + true + true + + + + + + + + + + + + + + 0x0409 + 0x0409 + + + + + + \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/electricsheep.vcxproj.filters electricsheep-3.0.2-git20180325/MSVC/electricsheep.vcxproj.filters --- electricsheep-2.7~b12+svn20091224/MSVC/electricsheep.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/electricsheep.vcxproj.filters 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,552 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {59f31480-a5ea-4f5e-a49f-659057e2afe4} + + + {8fd82334-b1bf-4e38-833c-b98470cf4fcd} + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {16d8ce8b-93a0-4f19-b13c-36905127b21c} + + + {e8275963-7410-4e9f-a801-5b022bba66b0} + + + {c9094536-c2f4-4759-b096-987386c83854} + + + {a868cbca-1716-40c5-b6c0-019d9743219b} + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + {bd39a8de-e3b8-4609-bbcd-0689ea2cd3e1} + + + {921e8fba-88ee-438c-93b3-a0711a260efd} + + + {8ec07090-3f70-47fb-b9a9-a8d252bcc3ee} + + + {f057081d-4450-4ef7-924e-a3db80b98198} + + + {5bde099f-f601-4a68-a5d3-5bfa67aa31fb} + + + {2b0b1b4b-cee0-4595-a5c3-87d937faf88c} + + + {5eda84c0-acc4-4c73-bf03-416303ebc56a} + + + {6d7dfb46-f151-4d2f-95d4-ca8a56c5a53a} + + + {8cc0b87d-45a9-4f88-9375-6132e691a22a} + + + {15840962-d6d6-4d0d-bff5-d532373704ee} + + + {a3f74fc0-9096-490e-800a-57cd695420fc} + + + {e83ae6a5-d039-44d4-af4c-b18df9a0f110} + + + {214405d8-9f27-415c-ac3d-bd713518b582} + + + + + ContentDownloader\Code + + + ContentDownloader\Code + + + ContentDownloader\Code + + + ContentDownloader\Code + + + ContentDownloader\Code + + + ContentDownloader\Code + + + Common\Math + + + Common\Code + + + Common\Code + + + Common\Code + + + Common\Code + + + Common\Code + + + Common\Code + + + Common\Code + + + Common\Code + + + Common\ISAAC + + + ContentDecoder\Code + + + Client\Code + + + Client\Code + + + Client\Code + + + Client\Code + + + Client\Code + + + Client\SettingsGUI + + + Client\SettingsGUI + + + Client\SettingsGUI + + + DisplayOutput + + + DisplayOutput + + + DisplayOutput + + + DisplayOutput + + + DisplayOutput\DirectX9 + + + DisplayOutput\DirectX9 + + + DisplayOutput\DirectX9 + + + DisplayOutput\DirectX9 + + + DisplayOutput\DirectX9 + + + DisplayOutput\Renderer + + + DisplayOutput\Renderer + + + DisplayOutput\Renderer + + + DisplayOutput\Renderer + + + DisplayOutput\Renderer + + + DisplayOutput\DirectX10 + + + DisplayOutput\DirectX10 + + + DisplayOutput\DirectX10 + + + DisplayOutput\DirectX10 + + + DisplayOutput\DirectX10 + + + Networking + + + Networking + + + Networking + + + TupleStorage + + + TupleStorage + + + TupleStorage + + + DisplayOutput\DirectX7 + + + DisplayOutput\DirectX7 + + + DisplayOutput\DirectX7 + + + DisplayOutput\DirectX7 + + + + + ContentDownloader\Headers + + + ContentDownloader\Headers + + + ContentDownloader\Headers + + + ContentDownloader\Headers + + + ContentDownloader\Headers + + + ContentDownloader\Headers + + + Common + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Math + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\Headers + + + Common\ISAAC + + + Common\ISAAC + + + ContentDecoder\Headers + + + ContentDecoder\Headers + + + ContentDecoder\Headers + + + ContentDecoder\Headers + + + ContentDecoder\Headers + + + ContentDecoder\Headers + + + ContentDecoder\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + Client\Headers + + + DisplayOutput + + + DisplayOutput + + + DisplayOutput\DirectX9 + + + DisplayOutput\DirectX9 + + + DisplayOutput\DirectX9 + + + DisplayOutput\DirectX9 + + + DisplayOutput\DirectX9 + + + DisplayOutput\DirectX9 + + + DisplayOutput\Renderer + + + DisplayOutput\Renderer + + + DisplayOutput\Renderer + + + DisplayOutput\Renderer + + + DisplayOutput\Renderer + + + Networking + + + TupleStorage + + + TupleStorage + + + TupleStorage + + + TupleStorage + + + Client\Headers + + + DisplayOutput\DirectX7 + + + DisplayOutput\DirectX7 + + + DisplayOutput\DirectX7 + + + DisplayOutput\DirectX7 + + + DisplayOutput\DirectX7 + + + DisplayOutput\DirectX7 + + + DisplayOutput\DirectX7 + + + + + Common + + + Common + + + + + Common + + + + + Client\SettingsGUI + + + Client\SettingsGUI + + + Client\SettingsGUI + + + DisplayOutput\DirectX10 + + + DisplayOutput\DirectX10 + + + DisplayOutput\DirectX10 + + + DisplayOutput\DirectX10 + + + DisplayOutput\DirectX10 + + + \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/FontDD.h electricsheep-3.0.2-git20180325/MSVC/FontDD.h --- electricsheep-2.7~b12+svn20091224/MSVC/FontDD.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/FontDD.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,74 @@ +#pragma once +#ifndef _FONTDD_H_ +#define _FONTDD_H_ + +#include "base.h" +#include "SmartPtr.h" +#include "Font.h" +#include + +namespace DisplayOutput +{ + +/* + CFontDX. + +*/ +class CFontDD : public CBaseFont +{ + HFONT m_pDDFont; + + public: + CFontDD( ) + { + m_pDDFont = NULL; + } + virtual ~CFontDD() + { + if (m_pDDFont != NULL) + { + DeleteObject(m_pDDFont); + m_pDDFont = NULL; + } + } + + bool Create() + { + LOGFONTA logfont = {0}; + switch ( m_FontDescription.Style() ) + { + case CFontDescription::Thin: logfont.lfWeight |= FW_THIN; break; + case CFontDescription::Light: logfont.lfWeight |= FW_LIGHT; break; + case CFontDescription::Normal: logfont.lfWeight |= FW_NORMAL; break; + case CFontDescription::Bold: logfont.lfWeight |= FW_BOLD; break; + case CFontDescription::UberBold: logfont.lfWeight |= FW_EXTRABOLD; break; + } + logfont.lfHeight = m_FontDescription.Height(); + //HDC hdc = GetDC(NULL); + //if (hdc != NULL) + //{ + // logfont.lfHeight = -MulDiv(m_FontDescription.Height(), GetDeviceCaps(hdc ,LOGPIXELSY), 72); + // ReleaseDC(NULL, hdc); + // logfont.lfHeight = -MulDiv(m_FontDescription.Height(), 72, 72) - 1; + //} + //else + //{ + // logfont.lfHeight = -MulDiv(m_FontDescription.Height(), 72, 72) - 1; + //} + logfont.lfItalic = m_FontDescription.Italic(); + logfont.lfQuality = m_FontDescription.AntiAliased() ? ANTIALIASED_QUALITY : NONANTIALIASED_QUALITY; + strcpy_s(logfont.lfFaceName, 32, m_FontDescription.TypeFace().c_str()); + + m_pDDFont = CreateFontIndirectA(&logfont); + + return true; + } + + HFONT GetDDFont( void ) { return( m_pDDFont ); }; +}; + +MakeSmartPointers( CFontDD ); + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/msvc_fix.cpp electricsheep-3.0.2-git20180325/MSVC/msvc_fix.cpp --- electricsheep-2.7~b12+svn20091224/MSVC/msvc_fix.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/msvc_fix.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,76 @@ +#include "msvc_fix.h" +#include +#include +#include +#ifdef _WIN64 +#include +#endif +extern "C" +{ + +#if !defined(_MSC_VER) || (_MSC_VER < 1900) +int snprintf(char *buffer, size_t count, const char *fmt, ...) +{ + va_list ap; + int ret; + + va_start(ap, fmt); + ret = _vsnprintf(buffer, count-1, fmt, ap); + if (ret < 0) + buffer[count-1] = '\0'; + va_end(ap); + return ret; +} +#endif + +#ifdef _WIN64 +void ___chkstk() // remove after ffmpeg stops using too big arrays on stack +{ +} + +void usleep(int ms) +{ + Sleep(ms); +} + +double __strtod(const char *_Str, char **_EndPtr) +{ + return strtod(_Str, _EndPtr); +} + +int gettimeofday(struct timeval *tv, struct timezone *tz) +{ + FILETIME ft; + unsigned __int64 tmpres = 0; + static int tzflag; + + if (NULL != tv) + { + GetSystemTimeAsFileTime(&ft); + + tmpres |= ft.dwHighDateTime; + tmpres <<= 32; + tmpres |= ft.dwLowDateTime; + + tmpres -= 11644473600000000Ui64; + tmpres /= 10; + tv->tv_sec = (long)(tmpres / 1000000UL); + tv->tv_usec = (long)(tmpres % 1000000UL); + } + + if (NULL != tz) + { + if (!tzflag) + { + _tzset(); + tzflag++; + } + tz->tz_minuteswest = _timezone / 60; + tz->tz_dsttime = _daylight; + } + + return 0; +} +#endif + +}; \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/msvc_fix.h electricsheep-3.0.2-git20180325/MSVC/msvc_fix.h --- electricsheep-2.7~b12+svn20091224/MSVC/msvc_fix.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/msvc_fix.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,34 @@ +#pragma once +#include +#include +#include +#include + +extern "C" +{ + +#if !defined(_MSC_VER) || (_MSC_VER < 1900) + int snprintf(char *buffer, size_t count, const char *fmt, ...); +#endif +#ifdef _WIN64 + void ___chkstk(); + void usleep(int ms); + double __strtod(const char *_Str, char **_EndPtr); + + struct timezone + { + int tz_minuteswest; /* minutes W of Greenwich */ + int tz_dsttime; /* type of dst correction */ + }; + + int gettimeofday(struct timeval *tv, struct timezone *tz); +#endif + +}; + +//#ifdef _DEBUG +//#include +//#define DEBUG_NEW new(_NORMAL_BLOCK ,__FILE__, __LINE__) +//#else +//#define DEBUG_NEW new +//#endif \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/RendererDD.cpp electricsheep-3.0.2-git20180325/MSVC/RendererDD.cpp --- electricsheep-2.7~b12+svn20091224/MSVC/RendererDD.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/RendererDD.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,188 @@ +#ifdef _MSC_VER +#include + +#include "d3d9.h" +#include "DisplayDD.h" +#include "RendererDD.h" +#include "TextureFlatDD.h" +#include "Matrix.h" +#include "FontDD.h" + +namespace DisplayOutput +{ + +CRendererDD::CRendererDD() : CRenderer() +{ +} + + +CRendererDD::~CRendererDD() +{ +} + +bool CRendererDD::Initialize( spCDisplayOutput _spDisplay ) +{ + if( !CRenderer::Initialize( _spDisplay ) ) + return false; + + spCDisplayDD m_spDisplay = (spCDisplayDD)_spDisplay; + + m_WindowHandle = m_spDisplay->WindowHandle(); + m_BackBufferPtr = m_spDisplay->GetBackBufferPtr(); + + + Defaults(); + + return true; +} + + +void CRendererDD::Defaults() +{ + g_Log->Info( "CRendererDD::Defaults()" ); + +} + + +spCTextureFlat CRendererDD::NewTextureFlat( spCImage _spImage, const uint32 _flags ) +{ + spCTextureFlat spTex = new CTextureFlatDS(m_BackBufferPtr, _flags ); + spTex->Upload( _spImage ); + return spTex; +} + +spCTextureFlat CRendererDD::NewTextureFlat( const uint32 _flags ) +{ + spCTextureFlat spTex = new CTextureFlatDS(m_BackBufferPtr, _flags ); + return spTex; +} + +spCShader CRendererDD::NewShader( const char *_pVertexShader, const char *_pFragmentShader ) +{ + return NULL; +} + +spCBaseFont CRendererDD::NewFont( CFontDescription &_desc ) +{ + CBaseFont *pFont = new CFontDD(); + pFont->FontDescription( _desc ); + pFont->Create(); + return pFont; +} + +Base::Math::CVector2 CRendererDD::GetTextExtent( spCBaseFont _spFont, const std::string &_text ) +{ + ASSERT( _text != "" ); + + Base::Math::CVector2 result; + + if( _spFont == NULL ) + return result; + + uint32 width = 0; + uint32 height = 0; + + fp4 dispWidth = (fp4)m_spDisplay->Width(); + fp4 dispHeight = (fp4)m_spDisplay->Height(); + + spCFontDD spDDFont = _spFont; + HFONT pDDFont = spDDFont->GetDDFont(); + + // Make a copy of `text' and extend it by `.'. + uint32 textLength = _text.length(); + ASSERT( textLength < 2048 ); + + static char pTmp[ 2048 ]; + strcpy( pTmp, (const char *)_text.c_str() ); + pTmp[ textLength ] = '.'; + pTmp[ textLength + 1 ] = '\0'; + + // Determine extents of `.'. + RECT dotRect = { 0, 0, LONG(dispWidth), LONG(dispHeight) }; + + HDC xdc; + if (FAILED(m_BackBufferPtr->GetDC(&xdc))) + { + return Base::Math::CVector2( 0, 0 ); + } + + + HFONT hOldFont; + if (hOldFont = (HFONT)SelectObject(xdc, pDDFont)) + { + //SetTextColor(xdc,ddColor); + SetTextColor(xdc, 0x00ffffff); + SetBkMode(xdc, TRANSPARENT); + + int32 h = DrawTextA(xdc, ".", -1, &dotRect, DT_LEFT | DT_WORDBREAK | DT_NOCLIP | DT_CALCRECT); + int32 dotWidth = dotRect.right - dotRect.left; + + RECT rect = {0, 0, LONG(dispWidth), LONG(dispHeight) }; + h = DrawTextA(xdc, pTmp, -1, &rect, DT_LEFT | DT_WORDBREAK | DT_NOCLIP | DT_CALCRECT); + + width = rect.right - rect.left - dotWidth; + height = rect.bottom - rect.top; + + result = Base::Math::CVector2( (fp4(width) / dispWidth), (fp4(height) / dispHeight) ); + + SelectObject(xdc, hOldFont); + } + m_BackBufferPtr->ReleaseDC(xdc); + + return( result ); +} + +void CRendererDD::Text( spCBaseFont _spFont, const std::string &_text, const Base::Math::CVector4 &_color, const Base::Math::CRect &_rect, uint32 _flags ) +{ + ASSERT( _text != "" ); + + const fp4 w05 = (fp4)m_spDisplay->Width() * 0.5f; + const fp4 h05 = (fp4)m_spDisplay->Height() * 0.5f; + Base::Math::CRect _r( lerpMacro( -w05, w05, _rect.m_X0 ), lerpMacro( -h05, h05, _rect.m_Y0 ), lerpMacro( -w05, w05, _rect.m_X1 ), lerpMacro( -h05, h05, _rect.m_Y1 ) ); + + RECT r = { (LONG)_r.m_X0, (LONG)_r.m_Y0, (LONG)_r.m_X1, (LONG)_r.m_Y1, }; + + //COLORREF ddColor = D3DCOLOR_COLORVALUE( _color.m_X, _color.m_Y, _color.m_Z, _color.m_W ); + + HDC xdc; + if (FAILED(m_BackBufferPtr->GetDC(&xdc))) + { + return; + } + + spCFontDD spDDFont = _spFont; + HFONT hFont = spDDFont->GetDDFont(); + HFONT hOldFont; + if (hOldFont = (HFONT)SelectObject(xdc, hFont)) + { + //SetTextColor(xdc,ddColor); + SetTextColor(xdc, 0x00ffffff); + SetBkMode(xdc, TRANSPARENT); + r.left = (LONG)w05 + r.left; + r.top = (LONG)h05 + r.top; + + r.right = (LONG)w05 + r.right; + r.bottom = (LONG)h05 + r.bottom; + + DrawTextA(xdc, _text.c_str(), -1, &r, DT_WORDBREAK); + + SelectObject(xdc, hOldFont); + } + m_BackBufferPtr->ReleaseDC(xdc); +} + + +void CRendererDD::DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const Base::Math::CRect &_uvrect ) +{ + m_BackBufferPtr->DrawQuad( _rect, _color, _uvrect ); +} + +bool CRendererDD::EndFrame( bool drawn ) +{ + m_BackBufferPtr->Blt(); + return true ; +}; + +} + +#endif \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/RendererDD.h electricsheep-3.0.2-git20180325/MSVC/RendererDD.h --- electricsheep-2.7~b12+svn20091224/MSVC/RendererDD.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/RendererDD.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,52 @@ +#ifdef _MSC_VER +#ifndef _RENDERERDS_H_ +#define _RENDERERDS_H_ + +#include +#include "base.h" +#include "SmartPtr.h" +#include "Renderer.h" +#include "Image.h" +#include "Vector4.h" +#include "DisplayDD.h" + + +namespace DisplayOutput +{ + + +class CRendererDD : public CRenderer +{ + HWND m_WindowHandle; + CBackBufDD *m_BackBufferPtr; + + public: + CRendererDD(); + virtual ~CRendererDD(); + + virtual eRenderType Type( void ) const { return eDX9; }; + virtual const std::string Description( void ) const { return "DirectX 7"; }; + + virtual bool Initialize( spCDisplayOutput _spDisplay ); + + void Defaults(); + + spCTextureFlat NewTextureFlat( const uint32 flags = 0 ); + spCTextureFlat NewTextureFlat( spCImage _spImage, const uint32 flags = 0 ); + + spCBaseFont NewFont( CFontDescription &_desc ); + virtual void Text( spCBaseFont _spFont, const std::string &_text, const Base::Math::CVector4 &_color, const Base::Math::CRect &_rect, uint32 _flags ); + virtual Base::Math::CVector2 GetTextExtent( spCBaseFont _spFont, const std::string &_text ); + + spCShader NewShader( const char *_pVertexShader, const char *_pFragmentShader ); + + void DrawQuad( const Base::Math::CRect &_rect, const Base::Math::CVector4 &_color, const Base::Math::CRect &_uvRect ); + virtual bool CRendererDD::EndFrame( bool drawn = true ); +}; + +MakeSmartPointers( CRendererDD ); + +} + +#endif +#endif \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/resource.h electricsheep-3.0.2-git20180325/MSVC/resource.h --- electricsheep-2.7~b12+svn20091224/MSVC/resource.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/resource.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,3 @@ +#define WIN32_LEAN_AND_MEAN +#include +#define IDS_DESCRIPTION 1 diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/config.cpp electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/config.cpp --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/config.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/config.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,726 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 8 2010) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "config.h" + +#ifdef LINUX_GNU +#include "../../Runtime/sheep_logo2.xpm" +#endif + +/////////////////////////////////////////////////////////////////////////// + +MyDialog2::MyDialog2( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + wxImage::AddHandler(new wxPNGHandler); + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer1; + bSizer1 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer2; + bSizer2 = new wxBoxSizer( wxHORIZONTAL ); +#ifdef LINUX_GNU + m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxBitmap(eslogo), wxDefaultPosition, wxDefaultSize, 0 ); +#else + m_bitmap12 = new wxStaticBitmap( this, wxID_ANY, wxBitmap( wxT("logo.png"), wxBITMAP_TYPE_ANY ), wxDefaultPosition, wxDefaultSize, 0 ); +#endif + bSizer2->Add( m_bitmap12, 0, wxALL, 5 ); + + m_staticText4 = new wxStaticText( this, wxID_ANY, wxT("Electric Sheep"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText4->Wrap( -1 ); + m_staticText4->SetFont( wxFont( 20, 70, 93, 92, false, wxT("Nice") ) ); + + bSizer2->Add( m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticVersion = new wxStaticText( this, wxID_ANY, wxT("version"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticVersion->Wrap( -1 ); + m_staticVersion->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 93, 90, false, wxEmptyString ) ); + + bSizer2->Add( m_staticVersion, 0, wxALL, 5 ); + + bSizer1->Add( bSizer2, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer3; + bSizer3 = new wxBoxSizer( wxHORIZONTAL ); + + m_RunButton = new wxButton( this, wxID_ANY, wxT("Run"), wxDefaultPosition, wxDefaultSize, 0 ); + m_RunButton->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 90, false, wxEmptyString ) ); + m_RunButton->SetToolTip( wxT("Run in a window") ); + + bSizer3->Add( m_RunButton, 0, wxALL, 1 ); + + m_HelpButton = new wxButton( this, wxID_ANY, wxT("Help"), wxDefaultPosition, wxDefaultSize, 0 ); + m_HelpButton->SetToolTip( wxT("Launch online help") ); + + bSizer3->Add( m_HelpButton, 0, wxALL, 1 ); + + bSizer1->Add( bSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxVERTICAL ); + + m_notebook2 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_Basic = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer5; + bSizer5 = new wxBoxSizer( wxVERTICAL ); + + m_staticText22 = new wxStaticText( m_Basic, wxID_ANY, wxT("While sheep are playing, press F1 for onscreen help with interaction"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText22->Wrap( -1 ); + bSizer5->Add( m_staticText22, 0, wxALL, 5 ); + + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_Basic, wxID_ANY, wxT("Sign In") ), wxVERTICAL ); + + wxBoxSizer* bSizer6; + bSizer6 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText3 = new wxStaticText(m_Basic, wxID_ANY, wxT("E-mail:"), wxDefaultPosition, wxDefaultSize, 0); + m_staticText3->Wrap( -1 ); + bSizer6->Add( m_staticText3, 0, wxALL, 5 ); + + m_textDrupalName = new wxTextCtrl( m_Basic, wxID_DRUPAL_NAME, wxEmptyString, wxDefaultPosition, wxSize( 256,-1 ), wxTE_CENTRE ); + m_textDrupalName->SetMaxLength( 256 ); + m_textDrupalName->SetToolTip( wxT("your username from\nthe web site") ); + + bSizer6->Add( m_textDrupalName, 0, wxALL|wxFIXED_MINSIZE, 5 ); + + sbSizer1->Add( bSizer6, 0, wxALIGN_RIGHT, 5 ); + + wxBoxSizer* bSizer7; + bSizer7 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText41 = new wxStaticText( m_Basic, wxID_ANY, wxT("Password:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText41->Wrap( -1 ); + bSizer7->Add( m_staticText41, 0, wxALL, 5 ); + + m_textDrupalPassword = new wxTextCtrl( m_Basic, wxID_DRUPAL_PASSWORD, wxEmptyString, wxDefaultPosition, wxSize( 256,-1 ), wxTE_CENTRE|wxTE_PASSWORD ); + m_textDrupalPassword->SetMaxLength( 256 ); + m_textDrupalPassword->SetToolTip( wxT("the password from\nyour account") ); + + bSizer7->Add( m_textDrupalPassword, 0, wxALL|wxFIXED_MINSIZE, 5 ); + + sbSizer1->Add( bSizer7, 0, wxALIGN_RIGHT, 5 ); + + wxBoxSizer* bSizer8; + bSizer8 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer47; + bSizer47 = new wxBoxSizer( wxVERTICAL ); + + m_staticText6 = new wxStaticText( m_Basic, wxID_ANY, wxT("not yet tested"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE ); + m_staticText6->Wrap( -1 ); + m_staticText6->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 93, 90, false, wxEmptyString ) ); + m_staticText6->SetToolTip( wxT("Authentication status") ); + + bSizer47->Add( m_staticText6, 0, wxALIGN_LEFT|wxALL, 5 ); + + bSizer8->Add( bSizer47, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer481; + bSizer481 = new wxBoxSizer( wxVERTICAL ); + + m_TestAccountButton = new wxButton( m_Basic, wxID_ANY, wxT("Sign In"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer481->Add( m_TestAccountButton, 0, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer8->Add( bSizer481, 1, wxEXPAND, 5 ); + + sbSizer1->Add( bSizer8, 1, wxEXPAND, 5 ); + + bSizer5->Add( sbSizer1, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer5; + sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( m_Basic, wxID_ANY, wxT("Register") ), wxVERTICAL ); + + wxBoxSizer* bSizer51; + bSizer51 = new wxBoxSizer( wxVERTICAL ); + + m_staticText25 = new wxStaticText(m_Basic, wxID_ANY, wxT("Create an account on the server and upgrade to Gold for higher \nresolution and other benefits.\n"), wxDefaultPosition, wxDefaultSize, 0); + m_staticText25->Wrap( -1 ); + bSizer51->Add( m_staticText25, 0, wxALL, 5 ); + + sbSizer5->Add( bSizer51, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer50; + bSizer50 = new wxBoxSizer( wxVERTICAL ); + + m_CreateAccountButton = new wxButton( m_Basic, wxID_ANY, wxT("Learn More"), wxDefaultPosition, wxDefaultSize, 0 ); + m_CreateAccountButton->SetFont( wxFont( 10, 70, 90, wxBOLD, false, wxEmptyString ) ); + + bSizer50->Add( m_CreateAccountButton, 0, wxALIGN_RIGHT|wxALL, 5 ); + + sbSizer5->Add( bSizer50, 0, wxEXPAND, 5 ); + + bSizer5->Add( sbSizer5, 0, wxEXPAND, 5 ); + + m_Basic->SetSizer( bSizer5 ); + m_Basic->Layout(); + bSizer5->Fit( m_Basic ); + m_notebook2->AddPage( m_Basic, wxT("Account"), true ); + m_Flock = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer52; + bSizer52 = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer2; + sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_Flock, wxID_ANY, wxT("Local Flock") ), wxVERTICAL ); + + wxBoxSizer* bSizer35; + bSizer35 = new wxBoxSizer( wxVERTICAL ); + + m_staticTextFlockSize = new wxStaticText( m_Flock, wxID_ANY, wxT("New sheep are created everyday. When the screensaver runs,\nit tries to download them, and saves them on your hard disk,\ndeleting old ones to make room. Login to get more sheep.\nIt is currently using 0 MBs"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFlockSize->Wrap( -1 ); + bSizer35->Add( m_staticTextFlockSize, 0, 0, 5 ); + + sbSizer2->Add( bSizer35, 0, wxALIGN_RIGHT, 5 ); + + wxBoxSizer* bSizer9; + bSizer9 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText7 = new wxStaticText( m_Flock, wxID_ANY, wxT("Max disk space:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText7->Wrap( -1 ); + bSizer9->Add( m_staticText7, 0, wxALL, 5 ); + + m_spinCache = new wxTextCtrl( m_Flock, wxID_FREE_FLOCK_MAX_SPACE, wxT("2000"), wxDefaultPosition, wxSize( 64,-1 ), wxTE_CENTRE ); + m_spinCache->SetMaxLength( 5 ); + m_spinCache->SetToolTip( wxT("After the maximum is reached,\nold sheep are deleted to make\nroom for new ones") ); + + bSizer9->Add( m_spinCache, 0, wxALL|wxSHAPED, 3 ); + + m_staticText10 = new wxStaticText( m_Flock, wxID_ANY, wxT("MB"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText10->Wrap( -1 ); + bSizer9->Add( m_staticText10, 0, wxALL, 5 ); + + sbSizer2->Add( bSizer9, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer28; + bSizer28 = new wxBoxSizer( wxVERTICAL ); + + m_checkUnlimitedCache = new wxCheckBox( m_Flock, wxID_ANY, wxT("No Maximum"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_checkUnlimitedCache->SetToolTip( wxT("Do not delete old sheep") ); + + bSizer28->Add( m_checkUnlimitedCache, 0, wxALIGN_RIGHT|wxALL, 5 ); + + sbSizer2->Add( bSizer28, 10, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer52->Add( sbSizer2, 0, wxEXPAND, 5 ); + + m_GoldFlockStaticSizer = new wxStaticBoxSizer( new wxStaticBox( m_Flock, wxID_ANY, wxT("Gold Flock") ), wxVERTICAL ); + + wxBoxSizer* bSizer44; + bSizer44 = new wxBoxSizer( wxVERTICAL ); + + m_staticTextGoldFlockSize = new wxStaticText( m_Flock, wxID_ANY, wxT("It is currently using 0 MBs"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextGoldFlockSize->Wrap( -1 ); + bSizer44->Add( m_staticTextGoldFlockSize, 0, 0, 5 ); + + m_GoldFlockStaticSizer->Add( bSizer44, 0, wxALIGN_RIGHT, 5 ); + + wxBoxSizer* bSizer43; + bSizer43 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText20 = new wxStaticText( m_Flock, wxID_ANY, wxT("Max disk space:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText20->Wrap( -1 ); + bSizer43->Add( m_staticText20, 0, wxALL, 5 ); + + m_spinGoldCache = new wxTextCtrl( m_Flock, wxID_GOLD_FLOCK_MAX_SPACE, wxT("2000"), wxDefaultPosition, wxSize( 64,-1 ), wxTE_CENTRE ); + m_spinGoldCache->SetMaxLength( 5 ); + m_spinGoldCache->SetToolTip( wxT("After the maximum is reached,\nold sheep are deleted to make\nroom for new ones") ); + + bSizer43->Add( m_spinGoldCache, 0, wxALL|wxSHAPED, 3 ); + + m_staticText21 = new wxStaticText( m_Flock, wxID_ANY, wxT("MB"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText21->Wrap( -1 ); + bSizer43->Add( m_staticText21, 0, wxALL, 5 ); + + m_GoldFlockStaticSizer->Add( bSizer43, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer281; + bSizer281 = new wxBoxSizer( wxVERTICAL ); + + m_checkGoldUnlimitedCache = new wxCheckBox( m_Flock, wxID_ANY, wxT("No Maximum"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_checkGoldUnlimitedCache->SetToolTip( wxT("Do not delete old sheep") ); + + bSizer281->Add( m_checkGoldUnlimitedCache, 0, wxALIGN_RIGHT|wxALL, 5 ); + + m_GoldFlockStaticSizer->Add( bSizer281, 1, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer52->Add( m_GoldFlockStaticSizer, 0, wxEXPAND, 5 ); + + m_Flock->SetSizer( bSizer52 ); + m_Flock->Layout(); + bSizer52->Fit( m_Flock ); + m_notebook2->AddPage( m_Flock, wxT("Flock"), false ); + m_Playback = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer40; + bSizer40 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText8 = new wxStaticText( m_Playback, wxID_ANY, wxT("Sheep Playback Speed:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText8->Wrap( -1 ); + bSizer10->Add( m_staticText8, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_spinDecodeFps = new wxTextCtrl( m_Playback, wxID_SHEEP_PLAYBACK_SPEED, wxT("15"), wxDefaultPosition, wxSize( 42,-1 ), wxTE_CENTRE ); + m_spinDecodeFps->SetMaxLength( 5 ); + m_spinDecodeFps->SetToolTip( wxT("Frames per second (FPS)") ); + + bSizer10->Add( m_spinDecodeFps, 0, wxALIGN_RIGHT|wxALL|wxSHAPED, 3 ); + + m_staticText11 = new wxStaticText( m_Playback, wxID_ANY, wxT("FPS"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + bSizer10->Add( m_staticText11, 0, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer40->Add( bSizer10, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + wxBoxSizer* bSizer11; + bSizer11 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText9 = new wxStaticText( m_Playback, wxID_ANY, wxT("Repeat loops"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( -1 ); + bSizer11->Add( m_staticText9, 0, wxALL, 5 ); + + m_spinRepeatLoops = new wxSpinCtrl( m_Playback, wxID_REPEAT_LOOPS, wxT("2"), wxDefaultPosition, wxSize( 50,-1 ), wxSP_ARROW_KEYS, 0, 100, 2 ); + m_spinRepeatLoops->SetToolTip( wxT("Play the sheep that are\nloops this many times") ); + + bSizer11->Add( m_spinRepeatLoops, 0, wxALL|wxSHAPED, 3 ); + + m_staticText12 = new wxStaticText( m_Playback, wxID_ANY, wxT("times"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + bSizer11->Add( m_staticText12, 0, wxALL, 5 ); + + bSizer40->Add( bSizer11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + wxBoxSizer* bSizer23; + bSizer23 = new wxBoxSizer( wxHORIZONTAL ); + + m_SeamlessPlayback = new wxCheckBox( m_Playback, wxID_ANY, wxT("Seamless playback"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_SeamlessPlayback->SetToolTip( wxT("avoid sheep that lead\nto hard cuts") ); + + bSizer23->Add( m_SeamlessPlayback, 0, wxALL, 5 ); + + bSizer40->Add( bSizer23, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + m_Playback->SetSizer( bSizer40 ); + m_Playback->Layout(); + bSizer40->Fit( m_Playback ); + m_notebook2->AddPage( m_Playback, wxT("Playback"), false ); + m_Display = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer77; + bSizer77 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer25; + bSizer25 = new wxBoxSizer( wxHORIZONTAL ); + + wxString m_radioMultiDisplayModeChoices[] = { wxT("Cloned"), wxT("Independent"), wxT("Single") }; + int m_radioMultiDisplayModeNChoices = sizeof( m_radioMultiDisplayModeChoices ) / sizeof( wxString ); + m_radioMultiDisplayMode = new wxRadioBox( m_Display, wxID_ANY, wxT("Multi Monitor Mode"), wxDefaultPosition, wxDefaultSize, m_radioMultiDisplayModeNChoices, m_radioMultiDisplayModeChoices, 1, wxRA_SPECIFY_ROWS ); + m_radioMultiDisplayMode->SetSelection( 0 ); + m_radioMultiDisplayMode->SetToolTip( wxT("How to handle\nmultiple screens") ); + + bSizer25->Add( m_radioMultiDisplayMode, 0, wxALL|wxEXPAND, 5 ); + + bSizer77->Add( bSizer25, 0, wxALIGN_RIGHT, 5 ); + + wxBoxSizer* bSizer14; + bSizer14 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText13 = new wxStaticText( m_Display, wxID_ANY, wxT("Display Monitor"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText13->Wrap( -1 ); + bSizer14->Add( m_staticText13, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_spinMonitor = new wxSpinCtrl( m_Display, wxID_DISPLAY_MONITOR, wxT("0"), wxDefaultPosition, wxSize( 50,-1 ), wxSP_ARROW_KEYS, 0, 3, 0 ); + m_spinMonitor->SetToolTip( wxT("If you have multiple monitors and\nare in single mode, then display on\nthis monitor") ); + + bSizer14->Add( m_spinMonitor, 0, wxALL, 5 ); + + m_staticText111 = new wxStaticText( m_Display, wxID_ANY, wxT("Display speed"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText111->Wrap( -1 ); + bSizer14->Add( m_staticText111, 3, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + m_spinDisplayFps = new wxTextCtrl( m_Display, wxID_DISPLAY_SPEED, wxT("60"), wxDefaultPosition, wxSize( 42,-1 ), wxTE_CENTRE ); + m_spinDisplayFps->SetMaxLength( 5 ); + m_spinDisplayFps->SetToolTip( wxT("When Interpolation is Linear or\nCubic then the video is upsampled\nto this rate") ); + + bSizer14->Add( m_spinDisplayFps, 0, wxALL, 5 ); + + m_staticText19 = new wxStaticText( m_Display, wxID_ANY, wxT("FPS"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText19->Wrap( -1 ); + bSizer14->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + bSizer77->Add( bSizer14, 0, wxALIGN_RIGHT, 5 ); + + wxBoxSizer* bSizer16; + bSizer16 = new wxBoxSizer( wxHORIZONTAL ); + + wxString m_radioDisplayModeChoices[] = { wxT("Off"), wxT("Linear"), wxT("Cubic") }; + int m_radioDisplayModeNChoices = sizeof( m_radioDisplayModeChoices ) / sizeof( wxString ); + m_radioDisplayMode = new wxRadioBox( m_Display, wxID_ANY, wxT("Interpolation"), wxDefaultPosition, wxDefaultSize, m_radioDisplayModeNChoices, m_radioDisplayModeChoices, 1, wxRA_SPECIFY_ROWS ); + m_radioDisplayMode->SetSelection( 1 ); + m_radioDisplayMode->SetToolTip( wxT("Linear and Cubic interpolation\nallow display speed (above) to\nbe higher than decode speed\n(under the Playback tab)") ); + + bSizer16->Add( m_radioDisplayMode, 0, wxALIGN_RIGHT|wxALL|wxEXPAND, 5 ); + + bSizer77->Add( bSizer16, 0, wxALIGN_RIGHT, 5 ); + + wxBoxSizer* bSizer331; + bSizer331 = new wxBoxSizer( wxVERTICAL ); + + m_VerticalSync = new wxCheckBox( m_Display, wxID_ANY, wxT("V-Sync"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_VerticalSync->SetToolTip( wxT("Off to improve multiple monitor\ndisplay performance, On to\nprevent image tearing") ); + + bSizer331->Add( m_VerticalSync, 0, wxALL, 5 ); + + bSizer77->Add( bSizer331, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer341; + bSizer341 = new wxBoxSizer( wxVERTICAL ); + + m_ReverseDisplays = new wxCheckBox( m_Display, wxID_ANY, wxT("Reverse monitor order"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_ReverseDisplays->SetToolTip( wxT("Experimental switch to\nincrease multimon\nperformance") ); + + bSizer341->Add( m_ReverseDisplays, 0, wxALL, 5 ); + + bSizer77->Add( bSizer341, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer27; + bSizer27 = new wxBoxSizer( wxHORIZONTAL ); + + m_DirectDraw = new wxCheckBox( m_Display, wxID_ANY, wxT("DirectDraw mode"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_DirectDraw->SetToolTip( wxT("only for compatibility with very old graphics chips") ); + + bSizer27->Add( m_DirectDraw, 0, wxALL, 5 ); + + bSizer77->Add( bSizer27, 1, wxALIGN_RIGHT|wxALL, 5 ); + + m_Display->SetSizer( bSizer77 ); + m_Display->Layout(); + bSizer77->Fit( m_Display ); + m_notebook2->AddPage( m_Display, wxT("Display"), false ); + m_Proxy = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer36; + bSizer36 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer61; + bSizer61 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText31 = new wxStaticText( m_Proxy, wxID_ANY, wxT("Hostname:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText31->Wrap( -1 ); + bSizer61->Add( m_staticText31, 0, wxALL, 5 ); + + m_textProxyHost = new wxTextCtrl( m_Proxy, wxID_PROXY_HOST_NAME, wxEmptyString, wxDefaultPosition, wxSize( 256,-1 ), wxTE_CENTRE ); + m_textProxyHost->SetMaxLength( 256 ); + bSizer61->Add( m_textProxyHost, 0, wxALL|wxFIXED_MINSIZE, 5 ); + + bSizer36->Add( bSizer61, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer71; + bSizer71 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText411 = new wxStaticText( m_Proxy, wxID_ANY, wxT("User:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText411->Wrap( -1 ); + bSizer71->Add( m_staticText411, 0, wxALL, 5 ); + + m_textProxyUser = new wxTextCtrl( m_Proxy, wxID_PROXY_USER_NAME, wxEmptyString, wxDefaultPosition, wxSize( 256,-1 ), wxTE_CENTRE|wxTE_PASSWORD ); + m_textProxyUser->SetMaxLength( 256 ); + bSizer71->Add( m_textProxyUser, 0, wxALL|wxFIXED_MINSIZE, 5 ); + + bSizer36->Add( bSizer71, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer72; + bSizer72 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText412 = new wxStaticText( m_Proxy, wxID_ANY, wxT("Password:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText412->Wrap( -1 ); + bSizer72->Add( m_staticText412, 0, wxALL, 5 ); + + m_textProxyPassword = new wxTextCtrl( m_Proxy, wxID_PROXY_PASSWORD, wxEmptyString, wxDefaultPosition, wxSize( 256,-1 ), wxTE_CENTRE|wxTE_PASSWORD ); + m_textProxyPassword->SetMaxLength( 256 ); + bSizer72->Add( m_textProxyPassword, 0, wxALL|wxFIXED_MINSIZE, 5 ); + + bSizer36->Add( bSizer72, 0, wxALIGN_RIGHT|wxALL, 5 ); + + m_Proxy->SetSizer( bSizer36 ); + m_Proxy->Layout(); + bSizer36->Fit( m_Proxy ); + m_notebook2->AddPage( m_Proxy, wxT("Proxy"), false ); + m_Advanced = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + m_Advanced->SetToolTip( wxT("Advanced client settings") ); + + wxBoxSizer* bSizer12; + bSizer12 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer13; + bSizer13 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer33; + bSizer33 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer31; + bSizer31 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer17; + bSizer17 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkHttp = new wxCheckBox( m_Advanced, wxID_ANY, wxT("HTTP download"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_checkHttp->SetValue(true); + m_checkHttp->SetToolTip( wxT("Enables/Disables the downloading of\nnew sheep from the server via the\nHTTP protocol") ); + + bSizer17->Add( m_checkHttp, 0, wxALL, 5 ); + + bSizer31->Add( bSizer17, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer18; + bSizer18 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkRenderFrames = new wxCheckBox( m_Advanced, wxID_ANY, wxT("Render frames"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_checkRenderFrames->SetValue(true); + m_checkRenderFrames->SetToolTip( wxT("Enables/Disables your computer\nto contribute to the flock by\nrendering new frames") ); + + bSizer18->Add( m_checkRenderFrames, 0, wxALL, 5 ); + + bSizer31->Add( bSizer18, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer19; + bSizer19 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkMulticore = new wxCheckBox( m_Advanced, wxID_ANY, wxT("Multicore rendering"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_checkMulticore->Hide(); + m_checkMulticore->SetToolTip( wxT("Use all the processor cores available in your computer to render sheep frames.\nNote that this will take quite a bit of cpu, and the display may not be able to update at full framerate!") ); + + bSizer19->Add( m_checkMulticore, 0, wxALL, 5 ); + + bSizer31->Add( bSizer19, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer20; + bSizer20 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkKeepFrames = new wxCheckBox( m_Advanced, wxID_ANY, wxT("Keep rendered frames"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_checkKeepFrames->SetValue(true); + m_checkKeepFrames->SetToolTip( wxT("Stores the rendered\nframes on your harddrive") ); + + bSizer20->Add( m_checkKeepFrames, 0, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer31->Add( bSizer20, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer21; + bSizer21 = new wxBoxSizer( wxHORIZONTAL ); + + m_checkNegVoteDeletes = new wxCheckBox( m_Advanced, wxID_ANY, wxT("Negative vote deletes sheep"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_checkNegVoteDeletes->SetValue(true); + m_checkNegVoteDeletes->SetToolTip( wxT("If you press the down arrow key,\nthen delete the currently displayed\nsheep in addition to notifying the\nserver not to make more sheep like it") ); + + bSizer21->Add( m_checkNegVoteDeletes, 0, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer31->Add( bSizer21, 0, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer33->Add( bSizer31, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer34; + bSizer34 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer271; + bSizer271 = new wxBoxSizer( wxHORIZONTAL ); + + m_QuietMode = new wxCheckBox( m_Advanced, wxID_ANY, wxT("Quiet mode"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_QuietMode->SetValue(true); + m_QuietMode->SetToolTip( wxT("Do not show connection\nerror messages") ); + + bSizer271->Add( m_QuietMode, 0, wxALL, 5 ); + + bSizer34->Add( bSizer271, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer24; + bSizer24 = new wxBoxSizer( wxVERTICAL ); + + m_DebugLog = new wxCheckBox( m_Advanced, wxID_ANY, wxT("Debugging log"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_DebugLog->SetToolTip( wxT("Log errors, warnings\nand info messages") ); + + bSizer24->Add( m_DebugLog, 0, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer34->Add( bSizer24, 0, wxALIGN_RIGHT|wxALL, 5 ); + + wxBoxSizer* bSizer32; + bSizer32 = new wxBoxSizer( wxVERTICAL ); + + m_checkAttributionPNG = new wxCheckBox( m_Advanced, wxID_ANY, wxT("Show Attribution"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT ); + m_checkAttributionPNG->SetToolTip( wxT("Every 10 minutes show\na watermark for attribution") ); + + bSizer32->Add( m_checkAttributionPNG, 0, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer34->Add( bSizer32, 0, wxALIGN_RIGHT|wxALL, 5 ); + + bSizer33->Add( bSizer34, 1, wxEXPAND, 5 ); + + bSizer13->Add( bSizer33, 1, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer3; + sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_Advanced, wxID_ANY, wxT("Content directory") ), wxHORIZONTAL ); + + m_dirContent = new wxDirPickerCtrl( m_Advanced, wxID_CONTENT_DIRECTORY, wxT(",90,90,-1,70,0"), wxT("Select a folder"), wxDefaultPosition, wxDefaultSize, wxDIRP_DEFAULT_STYLE|wxDIRP_DIR_MUST_EXIST ); + sbSizer3->Add( m_dirContent, 0, wxALL, 5 ); + + m_buttonOpenContent = new wxButton( m_Advanced, wxID_ANY, wxT("Open this folder"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOpenContent->SetToolTip( wxT("Opens the content directory\nin an external exporer window") ); + + sbSizer3->Add( m_buttonOpenContent, 0, wxALL, 5 ); + + bSizer13->Add( sbSizer3, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizer6; + sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( m_Advanced, wxID_ANY, wxT("Flock choice") ), wxVERTICAL ); + + wxString m_choicePlaybackMixingModeChoices[] = { wxT("if there are any gold sheep then play only gold sheep"), wxT("free sheep only"), wxT("play all sheep") }; + int m_choicePlaybackMixingModeNChoices = sizeof( m_choicePlaybackMixingModeChoices ) / sizeof( wxString ); + m_choicePlaybackMixingMode = new wxChoice( m_Advanced, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePlaybackMixingModeNChoices, m_choicePlaybackMixingModeChoices, 0 ); + m_choicePlaybackMixingMode->SetSelection( 0 ); + sbSizer6->Add( m_choicePlaybackMixingMode, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + bSizer13->Add( sbSizer6, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 5 ); + + bSizer12->Add( bSizer13, 0, wxALL|wxEXPAND, 5 ); + + m_Advanced->SetSizer( bSizer12 ); + m_Advanced->Layout(); + bSizer12->Fit( m_Advanced ); + m_notebook2->AddPage( m_Advanced, wxT("Advanced"), false ); + m_About = new wxPanel( m_notebook2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); + wxBoxSizer* bSizer48; + bSizer48 = new wxBoxSizer( wxVERTICAL ); + + m_AboutText = new wxRichTextCtrl( m_About, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_AUTO_URL|wxTE_READONLY|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS ); + bSizer48->Add( m_AboutText, 1, wxEXPAND | wxALL, 5 ); + + m_About->SetSizer( bSizer48 ); + m_About->Layout(); + bSizer48->Fit( m_About ); + m_notebook2->AddPage( m_About, wxT("About"), false ); + + bSizer4->Add( m_notebook2, 1, wxALL, 5 ); + + bSizer1->Add( bSizer4, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_TOP|wxALL, 5 ); + + wxBoxSizer* bSizer22; + bSizer22 = new wxBoxSizer( wxHORIZONTAL ); + + m_Ok = new wxButton( this, wxID_ANY, wxT("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_Ok->SetDefault(); + m_Ok->SetToolTip( wxT("Confirm all changes and exit") ); + + bSizer22->Add( m_Ok, 0, wxALL, 5 ); + + m_Cancel = new wxButton( this, wxID_ANY, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_Cancel->SetToolTip( wxT("Discard all changes and exit") ); + + bSizer22->Add( m_Cancel, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + bSizer1->Add( bSizer22, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 5 ); + + this->SetSizerAndFit( bSizer1 ); + this->Layout(); + + // Connect Events + this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MyDialog2::OnDialogClose ) ); + this->Connect( wxEVT_CHAR_HOOK, wxKeyEventHandler( MyDialog2::OnDialogCharHook ), NULL, this ); + this->Connect( wxEVT_IDLE, wxIdleEventHandler( MyDialog2::OnIdle ) ); + m_RunButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnRunClick ), NULL, this ); + m_HelpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnHelpClick ), NULL, this ); + m_textDrupalName->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textDrupalName->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textDrupalName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MyDialog2::OnDrupalNameTextEnter ), NULL, this ); + m_textDrupalPassword->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textDrupalPassword->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textDrupalPassword->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MyDialog2::OnDrupalPasswordTextEnter ), NULL, this ); + m_TestAccountButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnTestAccountButtonClick ), NULL, this ); + m_CreateAccountButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnCreateClick ), NULL, this ); + m_spinCache->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinCache->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_checkUnlimitedCache->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MyDialog2::OnUnlimitedCacheCheck ), NULL, this ); + m_spinGoldCache->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinGoldCache->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_checkGoldUnlimitedCache->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MyDialog2::OnGoldUnlimitedCacheCheck ), NULL, this ); + m_spinDecodeFps->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MyDialog2::OnDecodeFpsKillFocus ), NULL, this ); + m_spinDecodeFps->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinDecodeFps->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_spinDecodeFps->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MyDialog2::OnDecodeFpsTextUpdated ), NULL, this ); + m_spinRepeatLoops->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinRepeatLoops->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_spinMonitor->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinMonitor->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_spinDisplayFps->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MyDialog2::OnPlayerFpsKillFocus ), NULL, this ); + m_spinDisplayFps->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinDisplayFps->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_spinDisplayFps->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MyDialog2::OnPlayerFpsTextUpdated ), NULL, this ); + m_textProxyHost->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textProxyHost->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textProxyHost->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyDialog2::OnProxyTextEnter ), NULL, this ); + m_textProxyUser->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textProxyUser->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textProxyUser->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyDialog2::OnProxyUserNameEnter ), NULL, this ); + m_textProxyPassword->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textProxyPassword->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textProxyPassword->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyDialog2::OnProxyPasswordEnter ), NULL, this ); + m_dirContent->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MyDialog2::OnContentDirChanged ), NULL, this ); + m_dirContent->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_dirContent->Connect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_buttonOpenContent->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnOpenClick ), NULL, this ); + m_AboutText->Connect( wxEVT_COMMAND_TEXT_URL, wxTextUrlEventHandler( MyDialog2::OnAboutUrl ), NULL, this ); + m_Ok->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnClickOk ), NULL, this ); + m_Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnCancelClick ), NULL, this ); +} + +MyDialog2::~MyDialog2() +{ + // Disconnect Events + this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( MyDialog2::OnDialogClose ) ); + this->Disconnect( wxEVT_CHAR_HOOK, wxKeyEventHandler( MyDialog2::OnDialogCharHook ), NULL, this ); + this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( MyDialog2::OnIdle ) ); + m_RunButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnRunClick ), NULL, this ); + m_HelpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnHelpClick ), NULL, this ); + m_textDrupalName->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textDrupalName->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textDrupalName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MyDialog2::OnDrupalNameTextEnter ), NULL, this ); + m_textDrupalPassword->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textDrupalPassword->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textDrupalPassword->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MyDialog2::OnDrupalPasswordTextEnter ), NULL, this ); + m_TestAccountButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnTestAccountButtonClick ), NULL, this ); + m_CreateAccountButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnCreateClick ), NULL, this ); + m_spinCache->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinCache->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_checkUnlimitedCache->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MyDialog2::OnUnlimitedCacheCheck ), NULL, this ); + m_spinGoldCache->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinGoldCache->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_checkGoldUnlimitedCache->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( MyDialog2::OnGoldUnlimitedCacheCheck ), NULL, this ); + m_spinDecodeFps->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MyDialog2::OnDecodeFpsKillFocus ), NULL, this ); + m_spinDecodeFps->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinDecodeFps->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_spinDecodeFps->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MyDialog2::OnDecodeFpsTextUpdated ), NULL, this ); + m_spinRepeatLoops->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinRepeatLoops->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_spinMonitor->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinMonitor->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_spinDisplayFps->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( MyDialog2::OnPlayerFpsKillFocus ), NULL, this ); + m_spinDisplayFps->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_spinDisplayFps->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_spinDisplayFps->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( MyDialog2::OnPlayerFpsTextUpdated ), NULL, this ); + m_textProxyHost->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textProxyHost->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textProxyHost->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyDialog2::OnProxyTextEnter ), NULL, this ); + m_textProxyUser->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textProxyUser->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textProxyUser->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyDialog2::OnProxyUserNameEnter ), NULL, this ); + m_textProxyPassword->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_textProxyPassword->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_textProxyPassword->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( MyDialog2::OnProxyPasswordEnter ), NULL, this ); + m_dirContent->Disconnect( wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( MyDialog2::OnContentDirChanged ), NULL, this ); + m_dirContent->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( MyDialog2::OnTextLeftUp ), NULL, this ); + m_dirContent->Disconnect( wxEVT_SET_FOCUS, wxFocusEventHandler( MyDialog2::OnTextSetFocus ), NULL, this ); + m_buttonOpenContent->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnOpenClick ), NULL, this ); + m_AboutText->Disconnect( wxEVT_COMMAND_TEXT_URL, wxTextUrlEventHandler( MyDialog2::OnAboutUrl ), NULL, this ); + m_Ok->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnClickOk ), NULL, this ); + m_Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( MyDialog2::OnCancelClick ), NULL, this ); + +} diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/config.fbp electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/config.fbp --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/config.fbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/config.fbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,4592 @@ + + + + + + C++ + 1 + source_name + 0 + UTF-8 + connect + config + 1000 + none + 0 + electricsheepgui + + . + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + impl_virtual + + + + + wxID_ANY + + + MyDialog2 + + 400,512 + wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER + + Electric Sheep Settings + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + OnDialogClose + + + + + OnIdle + + + + + + + + + + + + + + + + + + + + + + + + bSizer1 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + + bSizer2 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + logo.png; Load From File + + 1 + 1 + + + + wxID_ANY + + + m_bitmap12 + protected + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + + + 1 + 1 + + Nice,93,92,20,70,0 + + wxID_ANY + Electric Sheep + + + m_staticText4 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + 1 + + ,93,90,-1,70,0 + + wxID_ANY + version + + + m_staticVersion + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + + bSizer3 + wxHORIZONTAL + none + + 1 + wxALL + 0 + + + + 1 + 0 + 1 + + ,90,90,-1,70,0 + + wxID_ANY + Run + + + m_RunButton + protected + + + + + Run in a window + + wxFILTER_NONE + wxDefaultValidator + + + + + OnRunClick + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + wxALL + 0 + + + + 1 + 0 + 1 + + + + wxID_ANY + Help + + + m_HelpButton + protected + + + + + Launch online help + + wxFILTER_NONE + wxDefaultValidator + + + + + OnHelpClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_TOP|wxALL + 1 + + + bSizer4 + wxVERTICAL + none + + 5 + wxALL + 1 + + + + + 1 + 1 + + + + wxID_ANY + + + m_notebook2 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Account + 1 + + + + 1 + 1 + + + + wxID_ANY + + + m_Basic + protected + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer5 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + While sheep are playing, press F1 for onscreen help with interaction + + + m_staticText22 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Sign In + + sbSizer1 + wxVERTICAL + none + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer6 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + User Name: + + + m_staticText3 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxFIXED_MINSIZE + 0 + + + + 1 + 1 + + + + wxID_DRUPAL_NAME + + 256 + + m_textDrupalName + protected + + 256,-1 + wxTE_CENTRE + + your username from the web site + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + OnDrupalNameTextEnter + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer7 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + Password: + + + m_staticText41 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxFIXED_MINSIZE + 0 + + + + 1 + 1 + + + + wxID_DRUPAL_PASSWORD + + 256 + + m_textDrupalPassword + protected + + 256,-1 + wxTE_CENTRE|wxTE_PASSWORD + + the password from your account + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + OnDrupalPasswordTextEnter + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer8 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer47 + wxVERTICAL + none + + 5 + wxALIGN_LEFT|wxALL + 0 + + + + 1 + 1 + + ,93,90,-1,70,0 + + wxID_ANY + not yet tested + + + m_staticText6 + protected + + + wxALIGN_CENTRE + + Authentication status + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer481 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + + 1 + 0 + 1 + + + 0 + wxID_ANY + Sign In + + + m_TestAccountButton + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnTestAccountButtonClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Register + + sbSizer5 + wxVERTICAL + none + + + 5 + wxEXPAND + 0 + + + bSizer51 + wxVERTICAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + Become a member for access to our private server with more sheep, higher resolution sheep, and other interactive features. + + + m_staticText25 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer50 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + + 1 + 0 + 1 + + ,90,92,10,70,0 + + wxID_ANY + Learn More + + + m_CreateAccountButton + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnCreateClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Flock + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + + + m_Flock + protected + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer52 + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + wxID_ANY + Local Flock + + sbSizer2 + wxVERTICAL + none + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer35 + wxVERTICAL + none + + 5 + + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + New sheep are created everyday. When the screensaver runs, it tries to download them, and saves them on your hard disk, deleting old ones to make room. Login to get more sheep. It is currently using 0 MBs + + + m_staticTextFlockSize + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer9 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + Max disk space: + + + m_staticText7 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALL|wxSHAPED + 0 + + + + 1 + 1 + + + + wxID_FREE_FLOCK_MAX_SPACE + + 5 + + m_spinCache + protected + + 64,-1 + wxTE_CENTRE + + After the maximum is reached, old sheep are deleted to make room for new ones + + wxFILTER_NONE + wxDefaultValidator + + 2000 + + + + + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + MB + + + m_staticText10 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 10 + + + bSizer28 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 0 + + 1 + 1 + + + 0 + wxID_ANY + No Maximum + + + m_checkUnlimitedCache + protected + + + wxALIGN_RIGHT + + Do not delete old sheep + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnUnlimitedCacheCheck + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + wxID_ANY + Gold Flock + + m_GoldFlockStaticSizer + wxVERTICAL + none + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer44 + wxVERTICAL + none + + 5 + + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + It is currently using 0 MBs + + + m_staticTextGoldFlockSize + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer43 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + Max disk space: + + + m_staticText20 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALL|wxSHAPED + 0 + + + + 1 + 1 + + + 0 + wxID_GOLD_FLOCK_MAX_SPACE + + 5 + + m_spinGoldCache + protected + + 64,-1 + wxTE_CENTRE + + After the maximum is reached, old sheep are deleted to make room for new ones + + wxFILTER_NONE + wxDefaultValidator + + 2000 + + + + + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + MB + + + m_staticText21 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 1 + + + bSizer281 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 0 + + 1 + 1 + + + 0 + wxID_ANY + No Maximum + + + m_checkGoldUnlimitedCache + protected + + + wxALIGN_RIGHT + + Do not delete old sheep + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnGoldUnlimitedCacheCheck + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Playback + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + + + m_Playback + protected + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer40 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + + bSizer10 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + Sheep Playback Speed: + + + m_staticText8 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALIGN_RIGHT|wxALL|wxSHAPED + 0 + + + + 1 + 1 + + + + wxID_SHEEP_PLAYBACK_SPEED + + 25 + + m_spinDecodeFps + protected + + 42,-1 + wxTE_CENTRE + + Frames per second (FPS) + + wxFILTER_NONE + wxDefaultValidator + + 15 + + + + + + + + + OnDecodeFpsKillFocus + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + OnDecodeFpsTextUpdated + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + FPS + + + m_staticText11 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + + bSizer11 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + Repeat loops + + + m_staticText9 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + wxALL|wxSHAPED + 0 + + + + 1 + 1 + + + + wxID_REPEAT_LOOPS + 2 + 100 + + 0 + + m_spinRepeatLoops + protected + + 50,-1 + wxSP_ARROW_KEYS + + Play the sheep that are loops this many times + + wxFILTER_NONE + wxDefaultValidator + + 2 + + + + + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + + + + + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + times + + + m_staticText12 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + + bSizer23 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + 1 + + + 0 + wxID_ANY + Seamless playback + + + m_SeamlessPlayback + protected + + + wxALIGN_RIGHT + + avoid sheep that lead to hard cuts + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Display + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + + + m_Display + protected + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer77 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT + 0 + + + bSizer25 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 0 + + + "Cloned" "Independent" "Single" + + 1 + 1 + + + 0 + wxID_ANY + Multi Monitor Mode + 1 + + + m_radioMultiDisplayMode + protected + + 0 + + wxRA_SPECIFY_ROWS + + How to handle multiple screens + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer14 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + Display Monitor + + + m_staticText13 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_DISPLAY_MONITOR + 0 + 3 + + 0 + + m_spinMonitor + protected + + 50,-1 + wxSP_ARROW_KEYS + + If you have multiple monitors and are in single mode, then display on this monitor + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 3 + + + + 1 + 1 + + + + wxID_ANY + Display speed + + + m_staticText111 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_DISPLAY_SPEED + + 5 + + m_spinDisplayFps + protected + + 42,-1 + wxTE_CENTRE + + When Interpolation is Linear or Cubic then the video is upsampled to this rate + + wxFILTER_NONE + wxDefaultValidator + + 60 + + + + + + + + + OnPlayerFpsKillFocus + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + OnPlayerFpsTextUpdated + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + FPS + + + m_staticText19 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT + 0 + + + bSizer16 + wxHORIZONTAL + none + + 5 + wxALIGN_RIGHT|wxALL|wxEXPAND + 0 + + + "Off" "Linear" "Cubic" + + 1 + 1 + + + + wxID_ANY + Interpolation + 1 + + + m_radioDisplayMode + protected + + 1 + + wxRA_SPECIFY_ROWS + + Linear and Cubic interpolation allow display speed (above) to be higher than decode speed (under the Playback tab) + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer331 + wxVERTICAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + 1 + + + 0 + wxID_ANY + V-Sync + + + m_VerticalSync + protected + + + wxALIGN_RIGHT + + Off to improve multiple monitor display performance, On to prevent image tearing + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer341 + wxVERTICAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + 1 + + + 0 + wxID_ANY + Reverse monitor order + + + m_ReverseDisplays + protected + + + wxALIGN_RIGHT + + Experimental switch to increase multimon performance + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 1 + + + bSizer27 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + 1 + + + 0 + wxID_ANY + DirectDraw mode + + + m_DirectDraw + protected + + + wxALIGN_RIGHT + + only for compatibility with very old graphics chips + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Proxy + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + + + m_Proxy + protected + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer36 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer61 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + Hostname: + + + m_staticText31 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxFIXED_MINSIZE + 0 + + + + 1 + 1 + + + + wxID_PROXY_HOST_NAME + + 256 + + m_textProxyHost + protected + + 256,-1 + wxTE_CENTRE + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + OnProxyTextEnter + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer71 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + User: + + + m_staticText411 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxFIXED_MINSIZE + 0 + + + + 1 + 1 + + + + wxID_PROXY_USER_NAME + + 256 + + m_textProxyUser + protected + + 256,-1 + wxTE_CENTRE|wxTE_PASSWORD + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + OnProxyUserNameEnter + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer72 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_ANY + Password: + + + m_staticText412 + protected + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxFIXED_MINSIZE + 0 + + + + 1 + 1 + + + + wxID_PROXY_PASSWORD + + 256 + + m_textProxyPassword + protected + + 256,-1 + wxTE_CENTRE|wxTE_PASSWORD + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + OnProxyPasswordEnter + + + + + + + + + + + + + Advanced + 0 + + + + 1 + 1 + + + + wxID_ANY + + + m_Advanced + protected + + + + Advanced client settings + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer12 + wxVERTICAL + none + + 5 + wxALL|wxEXPAND + 0 + + + bSizer13 + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 1 + + + bSizer33 + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizer31 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer17 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + 1 + 1 + + + + wxID_ANY + HTTP download + + + m_checkHttp + protected + + + wxALIGN_RIGHT + + Enables/Disables the downloading of new sheep from the server via the HTTP protocol + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer18 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + 1 + 1 + + + + wxID_ANY + Render frames + + + m_checkRenderFrames + protected + + + wxALIGN_RIGHT + + Enables/Disables your computer to contribute to the flock by rendering new frames + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer19 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 0 + + 1 + 1 + + + 1 + wxID_ANY + Multicore rendering + + + m_checkMulticore + protected + + + wxALIGN_RIGHT + + Use all the processor cores available in your computer to render sheep frames. Note that this will take quite a bit of cpu, and the display may not be able to update at full framerate! + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer20 + wxHORIZONTAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 1 + + 1 + 1 + + + + wxID_ANY + Keep rendered frames + + + m_checkKeepFrames + protected + + + wxALIGN_RIGHT + + Stores the rendered frames on your harddrive + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer21 + wxHORIZONTAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 1 + + 1 + 1 + + + + wxID_ANY + Negative vote deletes sheep + + + m_checkNegVoteDeletes + protected + + + wxALIGN_RIGHT + + If you press the down arrow key, then delete the currently displayed sheep in addition to notifying the server not to make more sheep like it + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizer34 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer271 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + 1 + + 1 + 1 + + + 0 + wxID_ANY + Quiet mode + + + m_QuietMode + protected + + + wxALIGN_RIGHT + + Do not show connection error messages + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer24 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 0 + + 1 + 1 + + + 0 + wxID_ANY + Debugging log + + + m_DebugLog + protected + + + wxALIGN_RIGHT + + Log errors, warnings and info messages + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + bSizer32 + wxVERTICAL + none + + 5 + wxALIGN_RIGHT|wxALL + 0 + + + 0 + + 1 + 1 + + + 0 + wxID_ANY + Show Attribution + + + m_checkAttributionPNG + protected + + + wxALIGN_RIGHT + + Every 10 minutes show a watermark for attribution + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND + 0 + + wxID_ANY + Content directory + + sbSizer3 + wxHORIZONTAL + none + + + 5 + wxALL + 0 + + + + 1 + 1 + + + + wxID_CONTENT_DIRECTORY + + Select a folder + + m_dirContent + protected + + + wxDIRP_DEFAULT_STYLE|wxDIRP_DIR_MUST_EXIST + + + + wxFILTER_NONE + wxDefaultValidator + + ,90,90,-1,70,0 + + + + + OnContentDirChanged + + + + + + + + + OnTextLeftUp + + + + + + + + + + + OnTextSetFocus + + + + + + 5 + wxALL + 0 + + + + 1 + 0 + 1 + + + + wxID_ANY + Open this folder + + + m_buttonOpenContent + protected + + + + + Opens the content directory in an external exporer window + + wxFILTER_NONE + wxDefaultValidator + + + + + OnOpenClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND + 0 + + wxID_ANY + Flock choice + + sbSizer6 + wxVERTICAL + none + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + + "if there are any gold sheep then play only gold sheep" "free sheep only" "play all sheep" + + 1 + 1 + + + 0 + wxID_ANY + + + m_choicePlaybackMixingMode + protected + + 0 + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + About + 0 + + + + 1 + 1 + + + 0 + wxID_ANY + + + m_About + protected + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer48 + wxVERTICAL + none + + 5 + wxEXPAND | wxALL + 1 + + + + 1 + 1 + + + 0 + wxID_ANY + + + m_AboutText + protected + + + wxTE_AUTO_URL|wxTE_READONLY + + + + wxFILTER_NONE + wxDefaultValidator + + + + wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnAboutUrl + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + + bSizer22 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + + + 1 + 1 + 1 + + + + wxID_ANY + OK + + + m_Ok + protected + + + + + Confirm all changes and exit + + wxFILTER_NONE + wxDefaultValidator + + + + + OnClickOk + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + + + 1 + 0 + 1 + + + + wxID_ANY + Cancel + + + m_Cancel + protected + + + + + Discard all changes and exit + + wxFILTER_NONE + wxDefaultValidator + + + + + OnCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/config.h electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/config.h --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/config.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/config.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,171 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 8 2010) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __config__ +#define __config__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define wxID_DRUPAL_NAME 10010 +#define wxID_DRUPAL_PASSWORD 10011 +#define wxID_FREE_FLOCK_MAX_SPACE 10012 +#define wxID_GOLD_FLOCK_MAX_SPACE 10013 +#define wxID_SHEEP_PLAYBACK_SPEED 10014 +#define wxID_REPEAT_LOOPS 10015 +#define wxID_DISPLAY_MONITOR 10016 +#define wxID_DISPLAY_SPEED 10017 +#define wxID_PROXY_HOST_NAME 10018 +#define wxID_PROXY_USER_NAME 10019 +#define wxID_PROXY_PASSWORD 10020 +#define wxID_CONTENT_DIRECTORY 10021 +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class MyDialog2 +/////////////////////////////////////////////////////////////////////////////// +class MyDialog2 : public wxDialog +{ + private: + + protected: + wxStaticBitmap* m_bitmap12; + wxStaticText* m_staticText4; + wxStaticText* m_staticVersion; + wxButton* m_RunButton; + wxButton* m_HelpButton; + wxNotebook* m_notebook2; + wxPanel* m_Basic; + wxStaticText* m_staticText22; + wxStaticText* m_staticText3; + wxTextCtrl* m_textDrupalName; + wxStaticText* m_staticText41; + wxTextCtrl* m_textDrupalPassword; + wxStaticText* m_staticText6; + wxButton* m_TestAccountButton; + wxStaticText* m_staticText25; + wxButton* m_CreateAccountButton; + wxPanel* m_Flock; + wxStaticText* m_staticTextFlockSize; + wxStaticText* m_staticText7; + wxTextCtrl* m_spinCache; + wxStaticText* m_staticText10; + wxCheckBox* m_checkUnlimitedCache; + wxStaticText* m_staticTextGoldFlockSize; + wxStaticText* m_staticText20; + wxTextCtrl* m_spinGoldCache; + wxStaticText* m_staticText21; + wxCheckBox* m_checkGoldUnlimitedCache; + wxPanel* m_Playback; + wxStaticText* m_staticText8; + wxTextCtrl* m_spinDecodeFps; + wxStaticText* m_staticText11; + wxStaticText* m_staticText9; + wxSpinCtrl* m_spinRepeatLoops; + wxStaticText* m_staticText12; + wxCheckBox* m_SeamlessPlayback; + wxPanel* m_Display; + wxRadioBox* m_radioMultiDisplayMode; + wxStaticText* m_staticText13; + wxSpinCtrl* m_spinMonitor; + wxStaticText* m_staticText111; + wxTextCtrl* m_spinDisplayFps; + wxStaticText* m_staticText19; + wxRadioBox* m_radioDisplayMode; + wxCheckBox* m_VerticalSync; + wxCheckBox* m_ReverseDisplays; + wxCheckBox* m_DirectDraw; + wxPanel* m_Proxy; + wxStaticText* m_staticText31; + wxTextCtrl* m_textProxyHost; + wxStaticText* m_staticText411; + wxTextCtrl* m_textProxyUser; + wxStaticText* m_staticText412; + wxTextCtrl* m_textProxyPassword; + wxPanel* m_Advanced; + wxCheckBox* m_checkHttp; + wxCheckBox* m_checkRenderFrames; + wxCheckBox* m_checkMulticore; + wxCheckBox* m_checkKeepFrames; + wxCheckBox* m_checkNegVoteDeletes; + wxCheckBox* m_QuietMode; + wxCheckBox* m_DebugLog; + wxCheckBox* m_checkAttributionPNG; + wxDirPickerCtrl* m_dirContent; + wxButton* m_buttonOpenContent; + wxChoice* m_choicePlaybackMixingMode; + wxPanel* m_About; + wxRichTextCtrl* m_AboutText; + wxButton* m_Ok; + wxButton* m_Cancel; + wxStaticBoxSizer* m_GoldFlockStaticSizer; + + // Virtual event handlers, overide them in your derived class + virtual void OnDialogClose( wxCloseEvent& event ) { event.Skip(); } + virtual void OnIdle( wxIdleEvent& event ) { event.Skip(); } + virtual void OnRunClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnHelpClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnTextLeftUp( wxMouseEvent& event ) { event.Skip(); } + virtual void OnTextSetFocus( wxFocusEvent& event ) { event.Skip(); } + virtual void OnDrupalNameTextEnter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDrupalPasswordTextEnter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnTestAccountButtonClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCreateClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnUnlimitedCacheCheck( wxCommandEvent& event ) { event.Skip(); } + virtual void OnGoldUnlimitedCacheCheck( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDecodeFpsKillFocus( wxFocusEvent& event ) { event.Skip(); } + virtual void OnDecodeFpsTextUpdated( wxCommandEvent& event ) { event.Skip(); } + virtual void OnPlayerFpsKillFocus( wxFocusEvent& event ) { event.Skip(); } + virtual void OnPlayerFpsTextUpdated( wxCommandEvent& event ) { event.Skip(); } + virtual void OnProxyTextEnter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnProxyUserNameEnter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnProxyPasswordEnter( wxCommandEvent& event ) { event.Skip(); } + virtual void OnContentDirChanged( wxFileDirPickerEvent& event ) { event.Skip(); } + virtual void OnOpenClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnAboutUrl( wxTextUrlEvent& event ) { event.Skip(); } + virtual void OnClickOk( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + + virtual void OnDialogCharHook( wxKeyEvent& e ) + { + e.Skip(); + if (e.GetKeyCode() == WXK_ESCAPE) + { + this->Show( false ); + this->Destroy(); + } + } + + public: + + MyDialog2( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Electric Sheep Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 400,512 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER ); + ~MyDialog2(); + +}; + +#endif //__config__ diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/electricsheepguiMyDialog2.cpp electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/electricsheepguiMyDialog2.cpp --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/electricsheepguiMyDialog2.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/electricsheepguiMyDialog2.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,984 @@ +#include "electricsheepguiMyDialog2.h" +#include +#include + +#ifdef WIN32 +#include +#include +#include +#include "../../msvc/msvc_fix.h" +#endif + +#include "../../TupleStorage/Settings.h" +#include "../../Common/md5.h" +#include "../../Common/clientversion.h" +#include "../../Common/ProcessForker.h" +#include "../../tinyXml/tinyxml.h" + +#include +#include + +#ifdef WIN32 +#define CLIENT_HELP_LINKW L"http://electricsheep.org/client/WIN_3.0.1" +#define CLIENT_HELP_LINK "http://electricsheep.org/client/WIN_3.0.1" +#endif + +#ifdef LINUX_GNU +#define CLIENT_HELP_LINK "http://electricsheep.org/client/LNX_2.7b28" +#endif + +static electricsheepguiMyDialog2 *sMainDialog = NULL; + +std::string computeMD5( const std::string& str ) +{ + unsigned char digest[16]; //md5 digest size is 16 + + md5_buffer( str.c_str(), str.size(), digest ); + + std::string md5Str; + + for (int i = 0; i < sizeof(digest); i++) + { + const char *hex_digits = "0123456789ABCDEF"; + + md5Str += hex_digits[ digest[i] >> 4 ]; + md5Str += hex_digits[ digest[i] & 0x0F ]; + } + + return md5Str; +} + +static std::string generateID() +{ + uint8 *salt; + uint32 u; + char id[17]; + id[16] = 0; + +#ifdef WIN32 + SYSTEMTIME syst; + GetSystemTime(&syst); + salt = ((unsigned char *)&syst) + sizeof(SYSTEMTIME) - 8; +#else + timeval cur_time; + gettimeofday(&cur_time, NULL); + + salt = (unsigned char*)&cur_time; +#endif + + for( u=0; u<16; u++ ) + { + unsigned r = rand(); + r = r ^ (salt[u>>1] >> ((u&1)<<2)); + r &= 15; + if( r < 10 ) + r += '0'; + else + r += 'A' - 10; + + id[u] = r; + } + + return std::string( id ); +} + +std::string Encode( const std::string &_src ) +{ + const int8 dec2hex[ 16 + 1 ] = "0123456789ABCDEF"; + const uint8 *pSrc = (const uint8 *)_src.c_str(); + const int32 srcLen= _src.length(); + uint8 *const pStart = new uint8[ srcLen * 3 ]; + uint8 *pEnd = pStart; + const uint8 * const srcEnd = pSrc + srcLen; + + for( ; pSrc> 4 ]; + *pEnd++ = dec2hex[ *pSrc & 0x0F ]; + } + } + + std::string sResult( (char *)pStart, (char *)pEnd ); + delete [] pStart; + return sResult; +} + +DEFINE_EVENT_TYPE(EVT_TYPE_LOGINSTATUSUPDATE) +DEFINE_EVENT_TYPE(EVT_TYPE_LOGININFOUPDATE) + +IMPLEMENT_DYNAMIC_CLASS(LoginStatusUpdateEvent, wxEvent) + +LoginStatusUpdateEvent::LoginStatusUpdateEvent(const wxString &text): m_text(text) +{ + SetEventType(EVT_TYPE_LOGINSTATUSUPDATE); + SetEventObject(NULL); +} + +IMPLEMENT_DYNAMIC_CLASS(LoginInfoUpdateEvent, wxEvent) + +LoginInfoUpdateEvent::LoginInfoUpdateEvent(const wxString &text): m_text(text) +{ + SetEventType(EVT_TYPE_LOGININFOUPDATE); + SetEventObject(NULL); +} + +BEGIN_EVENT_TABLE(electricsheepguiMyDialog2, wxDialog) + EVT_UPDATE_LOGIN_STATUS(electricsheepguiMyDialog2::OnLoginStatusUpdate) + EVT_UPDATE_LOGIN_INFO(electricsheepguiMyDialog2::OnLoginInfoUpdate) +END_EVENT_TABLE() + +void electricsheepguiMyDialog2::SaveSettings() +{ + g_Settings()->Set("settings.app.log", m_DebugLog->GetValue()); + g_Settings()->Set("settings.app.attributionpng", m_checkAttributionPNG->GetValue()); + + long temp = 0; + double tempd = 0.; + + m_spinCache->GetValue().ToLong(&temp); + g_Settings()->Set("settings.content.cache_size", (int32)temp); + + m_spinGoldCache->GetValue().ToLong(&temp); + g_Settings()->Set("settings.content.cache_size_gold", (int32)temp); + + wxString tempstr = m_spinDecodeFps->GetValue(); + //tempstr.Replace(wxT(","), wxT(".")); + tempstr.ToDouble(&tempd); + g_Settings()->Set("settings.player.player_fps", tempd); + + g_Settings()->Set("settings.player.screen", m_spinMonitor->GetValue()); + g_Settings()->Set("settings.player.LoopIterations", m_spinRepeatLoops->GetValue()); + + tempstr = m_spinDisplayFps->GetValue(); + //tempstr.Replace(wxT(","), wxT(".")); + tempstr.ToDouble(&tempd); + g_Settings()->Set("settings.player.display_fps", tempd); + + g_Settings()->Set("settings.player.PlaybackMixingMode", m_choicePlaybackMixingMode->GetSelection()); + g_Settings()->Set("settings.player.SeamlessPlayback", m_SeamlessPlayback->GetValue()); + g_Settings()->Set("settings.player.quiet_mode", m_QuietMode->GetValue()); + g_Settings()->Set("settings.player.directdraw", m_DirectDraw->GetValue()); + g_Settings()->Set( "settings.player.force_windowed_directx", m_ForceWindowedDX ); + + g_Settings()->Set("settings.content.unlimited_cache", m_checkUnlimitedCache->IsChecked()); + + g_Settings()->Set("settings.content.unlimited_cache_gold", m_checkGoldUnlimitedCache->IsChecked()); + + g_Settings()->Set("settings.content.download_mode", m_checkHttp->GetValue()); + g_Settings()->Set("settings.generator.enabled", m_checkRenderFrames->GetValue()); + g_Settings()->Set("settings.generator.all_cores", m_checkMulticore->GetValue()); + g_Settings()->Set("settings.generator.save_frames", m_checkKeepFrames->GetValue()); + + g_Settings()->Set("settings.content.negvotedeletes", m_checkNegVoteDeletes->GetValue()); + g_Settings()->Set("settings.player.vbl_sync", m_VerticalSync->GetValue()); + g_Settings()->Set("settings.player.reversedisplays", m_ReverseDisplays->GetValue()); + + g_Settings()->Set("settings.generator.nickname", std::string(m_textDrupalName->GetValue())); + + if (g_Settings()->Get("settings.content.password_md5", std::string("")) != "") + g_Settings()->Set("settings.content.password", g_Settings()->Get("settings.content.password_md5", std::string(""))); + + g_Settings()->Set("settings.player.DisplayMode", m_radioDisplayMode->GetSelection()); + g_Settings()->Set("settings.player.MultiDisplayMode", m_radioMultiDisplayMode->GetSelection()); + + g_Settings()->Set( "settings.content.sheepdir", std::string( m_dirContent->GetPath() ) ); + + g_Settings()->Set( "settings.content.proxy", std::string( m_textProxyHost->GetValue() ) ); + g_Settings()->Set( "settings.content.proxy_username", std::string( m_textProxyUser->GetValue() ) ); + g_Settings()->Set( "settings.content.proxy_password", std::string( m_textProxyPassword->GetValue() ) ); + + if (m_textProxyHost->GetValue() != wxT("")) + g_Settings()->Set( "settings.content.use_proxy", true); + else + g_Settings()->Set( "settings.content.use_proxy", false); + + g_Settings()->Storage()->Commit(); +} + +#include +using namespace boost::filesystem; + +uint64 GetFlockSizeBytes(wxString mpegpath, int sheeptype) +{ + if (mpegpath.substr(mpegpath.size() - 1, 1) != wxT("/")) + mpegpath += wxT("/"); + uint64 retval = 0; + + try { + boost::filesystem::path p(mpegpath.ToStdString()); + + directory_iterator end_itr; // default construction yields past-the-end + for ( directory_iterator itr( p ); + itr != end_itr; + ++itr ) + { + if (!is_directory(itr->status())) + { + std::string fname(itr->path().filename().string()); + if (itr->path().extension() == std::string(".avi")) + { + int generation; + int id; + int first; + int last; + + if( 4 == sscanf( fname.c_str(), "%d=%d=%d=%d.avi", &generation, &id, &first, &last ) ) + { + if ( (generation >= 10000 && sheeptype == 1) || (generation < 10000 && sheeptype == 0) ) + { + struct stat sbuf; + + if (stat( (mpegpath + wxT("/") +fname).c_str(), &sbuf ) == 0) + retval += sbuf.st_size; + } + } + } + } + else + retval += GetFlockSizeBytes(itr->path().string(), sheeptype); + } + + } + catch(boost::filesystem::filesystem_error& err) + { + g_Log->Error( "Path enumeration threw error: %s", err.what() ); + return 0; + } + return retval; +} + +size_t GetFlockSizeMBs(wxString mpegpath, int sheeptype) +{ + return GetFlockSizeBytes(mpegpath, sheeptype)/1024/1024; + +} + +void electricsheepguiMyDialog2::LoadSettings() +{ + m_UniqueId = g_Settings()->Get( "settings.content.unique_id", generateID() ); + m_DebugLog->SetValue(g_Settings()->Get("settings.app.log", false)); + m_checkAttributionPNG->SetValue(g_Settings()->Get("settings.app.attributionpng", true)); + m_spinCache->SetValue(wxString::Format(wxT("%d"), g_Settings()->Get("settings.content.cache_size", 2000))); + m_spinGoldCache->SetValue(wxString::Format(wxT("%d"), g_Settings()->Get("settings.content.cache_size_gold", 2000))); + m_spinDecodeFps->SetValue(wxString::Format(wxT("%.2lf"), g_Settings()->Get("settings.player.player_fps", 20.))); + m_spinMonitor->SetValue(wxString::Format(wxT("%d"), g_Settings()->Get("settings.player.screen", 0))); + m_spinRepeatLoops->SetValue(wxString::Format(wxT("%d"), g_Settings()->Get("settings.player.LoopIterations", 2))); + m_spinDisplayFps->SetValue(wxString::Format(wxT("%.2lf"), g_Settings()->Get("settings.player.display_fps", 60.))); + m_ForceWindowedDX = g_Settings()->Get( "settings.player.force_windowed_directx", true ); + + if (g_Settings()->Get( "settings.content.unlimited_cache", false) == true) + { + m_checkUnlimitedCache->SetValue(true); + m_spinCache->Enable(false); + } + long temp = 0; + m_spinCache->GetValue().ToLong(&temp); + if (temp == 0) + { + m_checkUnlimitedCache->SetValue(true); + m_spinCache->Enable(false); + } + + if (g_Settings()->Get( "settings.content.unlimited_cache_gold", false) == true) + { + m_checkGoldUnlimitedCache->SetValue(true); + m_spinGoldCache->Enable(false); + } + + m_spinGoldCache->GetValue().ToLong(&temp); + if (temp == 0) + { + m_checkGoldUnlimitedCache->SetValue(true); + m_spinGoldCache->Enable(false); + } + + m_checkHttp->SetValue( g_Settings()->Get( "settings.content.download_mode", true ) ); + m_checkRenderFrames->SetValue( g_Settings()->Get( "settings.generator.enabled", true ) ); + m_checkMulticore->SetValue( g_Settings()->Get( "settings.generator.all_cores", false ) ); + m_choicePlaybackMixingMode->SetSelection( g_Settings()->Get( "settings.player.PlaybackMixingMode", 0 ) ); + m_SeamlessPlayback->SetValue( g_Settings()->Get( "settings.player.SeamlessPlayback", false ) ); + m_QuietMode->SetValue( g_Settings()->Get( "settings.player.quiet_mode", true) ); + m_DirectDraw->SetValue( g_Settings()->Get( "settings.player.directdraw", false) ); + m_checkKeepFrames->SetValue( g_Settings()->Get( "settings.generator.save_frames", false ) ); + m_checkNegVoteDeletes->SetValue( g_Settings()->Get( "settings.content.negvotedeletes", true ) ); + m_VerticalSync->SetValue( g_Settings()->Get( "settings.player.vbl_sync", false ) ); + m_ReverseDisplays->SetValue( g_Settings()->Get( "settings.player.reversedisplays", false ) ); + + m_textDrupalName->ChangeValue( g_Settings()->Get( "settings.generator.nickname", std::string("") ) ); + if (m_textDrupalName->GetValue() != wxEmptyString) + m_textDrupalPassword->ChangeValue( g_Settings()->Get( "settings.content.password_md5", std::string("") ) ); + + /*if (g_Settings()->Get( "settings.content.registered", false ) == true ) + { + m_staticText6->SetLabel( "...logged in!..." ); + m_CreateAccountButton->Enable( false ); + } + else + { + m_staticText6->SetLabel( "...not logged in!..." ); + m_CreateAccountButton->Enable( true ); + }*/ + + m_radioDisplayMode->SetSelection( g_Settings()->Get( "settings.player.DisplayMode", 2 ) ); + m_radioMultiDisplayMode->SetSelection( g_Settings()->Get( "settings.player.MultiDisplayMode", 0 ) ); + + m_textProxyHost->SetValue( g_Settings()->Get( "settings.content.proxy", std::string("")) ); + m_textProxyUser->SetValue( g_Settings()->Get( "settings.content.proxy_username", std::string("")) ); + m_textProxyPassword->SetValue( g_Settings()->Get( "settings.content.proxy_password", std::string("")) ); + + if (m_textProxyHost->GetValue() != wxT("")) + g_Settings()->Set( "settings.content.use_proxy", true); + else + g_Settings()->Set( "settings.content.use_proxy", false); + +#ifdef WIN32 + wxString tmpstr = g_Settings()->Get( "settings.content.sheepdir", std::string(szPath) + "content" ); + while (tmpstr.size() > 1 && (tmpstr.at(tmpstr.size()-1) == '/' || tmpstr.at(tmpstr.size()-1) == '\\')) + tmpstr.erase(tmpstr.size()-1); + m_dirContent->SetPath( tmpstr ); +#else + m_dirContent->SetPath( g_Settings()->Get( "settings.content.sheepdir", std::string(szPath) + "content" ) ); +#endif + wxString newlabel = wxT("New sheep are created everyday. When the screensaver runs,\nit tries to download them, and saves them on your hard disk,\ndeleting old ones to make room. Login to get more sheep.\nIt is currently using "); + wxString newlabelgold = wxT("It is currently using "); + +#ifdef WIN32 + int freeflocksizembs = (int)GetFlockSizeMBs(m_dirContent->GetPath()+"\\mpeg", 0); + int goldflocksizembs = (int)GetFlockSizeMBs(m_dirContent->GetPath()+"\\mpeg", 1); +#else + int freeflocksizembs = (int)GetFlockSizeMBs(m_dirContent->GetPath()+"/mpeg", 0); + int goldflocksizembs = (int)GetFlockSizeMBs(m_dirContent->GetPath()+"/mpeg", 1); +#endif + int totalflocksizembs = freeflocksizembs + goldflocksizembs; + + newlabel += wxString::Format(wxT("%d %s %d%s"), freeflocksizembs, wxT("MB (of"), totalflocksizembs, wxT("MB total).")); + newlabelgold += wxString::Format(wxT("%d %s %d%s"), goldflocksizembs, wxT("MB (of"), totalflocksizembs, wxT("MB total).")); + + m_staticTextFlockSize->SetLabel(newlabel); + m_staticTextGoldFlockSize->SetLabel(newlabelgold); + m_staticTextGoldFlockSize->Fit(); + m_GoldFlockStaticSizer->Layout(); +} + +int32 customWrite( void *_pBuffer, size_t _size, size_t _nmemb, void *_pUserData ) +{ + ((electricsheepguiMyDialog2*)_pUserData)->m_Response.append( (char *)_pBuffer, _size * _nmemb ); + return _size*_nmemb; // dummy +} + +void electricsheepguiMyDialog2::Login() +{ + curl_global_init(CURL_GLOBAL_DEFAULT); + CURL *pCurl = curl_easy_init(); + + std::string nickencoded = Encode( g_Settings()->Get("settings.generator.nickname", std::string("")) ); + std::string passencoded = Encode( g_Settings()->Get("settings.content.password_md5", std::string("")) ); + + + if (nickencoded == std::string("") || passencoded == std::string("")) + { + wxMutexGuiEnter(); + FireLoginStatusUpdateEvent(""); + FireLoginInfoUpdateEvent("Create an account on the server and upgrade to Gold for higher \nresolution and other benefits.\n"); + wxMutexGuiLeave(); + curl_easy_cleanup( pCurl ); + curl_global_cleanup(); + return; + } + + curl_easy_setopt(pCurl, CURLOPT_USERPWD, std::string( nickencoded + std::string(":") + passencoded ).c_str()); + + curl_easy_setopt(pCurl, CURLOPT_WRITEFUNCTION, &customWrite); + curl_easy_setopt(pCurl, CURLOPT_WRITEDATA, this); + curl_easy_setopt(pCurl, CURLOPT_NOPROGRESS, true); + + curl_slist *slist=NULL; + slist = curl_slist_append(slist, "Connection: Keep-Alive"); + slist = curl_slist_append(slist, "Accept-Language: en-us"); + + curl_easy_setopt(pCurl, CURLOPT_HTTPHEADER, slist); + + char url[ 1024*5 ]; + snprintf( url, 1024*5, "http://%s/query.php?q=redir&u=%s&p=%s&v=%s&i=%s", + REDIRECT_SERVER, + nickencoded.c_str(), + passencoded.c_str(), + CLIENT_VERSION, + m_UniqueId.c_str()); + + curl_easy_setopt(pCurl, CURLOPT_URL, url); + curl_easy_setopt(pCurl, CURLOPT_CONNECTTIMEOUT, 15); + + wxMutexGuiEnter(); + FireLoginStatusUpdateEvent("...talking..."); + wxMutexGuiLeave(); + + m_Role == "error"; + long code = 0; + m_Response.clear(); + if (code = curl_easy_perform(pCurl) == CURLE_OK) + { + if (curl_easy_getinfo(pCurl, CURLINFO_RESPONSE_CODE, &code) == CURLE_OK) + { + if (code == 200) + { + //TinyXML has problems with string not terminated by \n + m_Response += "\n"; + + TiXmlDocument doc; + if ( doc.Parse(m_Response.c_str(), NULL, TIXML_ENCODING_UTF8 ) ) + { + TiXmlHandle hDoc(&doc); + TiXmlElement* listElement; + const char *host = NULL; + const char *role = NULL; + + listElement=hDoc.FirstChild( "query" ).FirstChild( "redir" ).Element(); + + if ( listElement != NULL ) + { + host = listElement->Attribute("host"); + role = listElement->Attribute("role"); + } + + if ( host != NULL && *host != 0 && role != NULL && *role != 0 ) + { + m_Role = role; + + wxMutexGuiEnter(); + if (m_Role == "error" || m_Role == "none") + { + FireLoginInfoUpdateEvent("Create an account on the server and upgrade to Gold for higher \nresolution and other benefits.\n"); + } else + if (m_Role == "registered") + { + FireLoginInfoUpdateEvent("Thank you for registering, you may become a member for access to\nour private server with more sheep, higher resolution sheep,\nand other interactive features."); + } else + if (m_Role == "member") + { + FireLoginInfoUpdateEvent("Create an account on the server and upgrade to Gold for higher \nresolution and other benefits.\n"); + } else + if (m_Role == "gold") + { + FireLoginInfoUpdateEvent("Thank you for your membership. Please access the server to manage \nyour account."); + } + + if (m_Role == "gold") + { + FireLoginStatusUpdateEvent("Logged in (role: "+m_Role+")."); + + g_Settings()->Set("settings.content.registered", true); + wxMutexGuiLeave(); + + curl_slist_free_all(slist); + curl_easy_cleanup( pCurl ); + curl_global_cleanup(); + + return; + } + + wxMutexGuiLeave(); + + } + } + } + } + } + g_Settings()->Set("settings.content.registered", false); + wxMutexGuiEnter(); + if (m_Role == "error") FireLoginStatusUpdateEvent("Not logged in."); + else FireLoginStatusUpdateEvent("Logged in but not gold"); + wxMutexGuiLeave(); + + curl_slist_free_all(slist); + curl_easy_cleanup( pCurl ); + curl_global_cleanup(); + return; +} + +electricsheepguiMyDialog2::~electricsheepguiMyDialog2() +{ + if (m_LoginThread != NULL) + { + m_TestLogin = false; + m_LoginThread->Delete(); + delete m_LoginThread; + } + g_Settings()->Shutdown(); +} + +void electricsheepguiMyDialog2::OnIdle( wxIdleEvent& event ) +{ + if (m_TestLogin) + { + if (m_LoginThread == NULL) + { + m_LoginThread = new LoginThread(); + m_LoginThread->Create(); + m_LoginThread->Run(); + } + else + { + if (!m_LoginThread->IsRunning()) + { + m_TestLogin = false; + m_LoginThread->Delete(); + delete m_LoginThread; + m_LoginThread = new LoginThread(); + + m_LoginThread->Create(); + m_LoginThread->Run(); + } + } + } +} + +void electricsheepguiMyDialog2::DeleteListXml() +{ + std::string path = g_Settings()->Get( "settings.content.sheepdir", g_Settings()->Root() + "content" ); + remove( (path + std::string("\\xml\\list.xml")).c_str() ); +} + +electricsheepguiMyDialog2::electricsheepguiMyDialog2( wxWindow* parent ) +: +MyDialog2( parent ) +{ + sMainDialog = this; + m_TestLogin = true; + m_NewFocus = true; + m_LoginThread = NULL; +#ifndef LINUX_GNU +if( SUCCEEDED( SHGetFolderPathA( NULL, CSIDL_COMMON_APPDATA, NULL, 0, szPath ) ) ) + PathAppendA( szPath, "\\ElectricSheep\\" ); + +g_Settings()->Init(szPath,".\\"); +#else + sprintf( szPath, "%s/.electricsheep/", getenv("HOME") ); + g_Settings()->Init(szPath, SHAREDIR); +#endif + +TupleStorage::IStorageInterface::CreateFullDirectory( std::string(szPath) + "Logs/" ); + +#ifdef LINUX_GNU +m_staticVersion->SetLabel(CLIENT_VERSION_PRETTY); +#endif +#ifdef WIN32 +m_staticVersion->SetLabel(CLIENT_VERSION_PRETTYW2); +#endif + +m_spinCache->SetValidator(wxTextValidator(wxFILTER_NUMERIC)); +m_spinDecodeFps->SetValidator(wxTextValidator(wxFILTER_NUMERIC)); +m_spinDisplayFps->SetValidator(wxTextValidator(wxFILTER_NUMERIC)); + + +wxRichTextAttr urlStyle; +urlStyle.SetTextColour(*wxBLUE); +urlStyle.SetFontUnderlined(true); + +// Fill rich text control on About tab +m_AboutText->BeginSuppressUndo(); +m_AboutText->BeginStyle(urlStyle); +m_AboutText->BeginURL(wxT("http://electricsheep.org/")); +m_AboutText->WriteText(wxT("Electric Sheep")); +m_AboutText->EndURL(); +m_AboutText->EndStyle(); + +m_AboutText->WriteText(wxT(" is a collaborative abstract artwork founded by Scott Draves. The thousands of computers it runs on work together as a supercomputer to render the animations (each frame takes about an hour). Everyone watching can influence what everyone sees by voting, and the more popular sheep mate with each other and reproduce according to a genetic algorithm, hence the flock evolves to satisfy human desire. You can also design your own sheep and upload them into the gene pool.")); +m_AboutText->LineBreak(); +m_AboutText->LineBreak(); + +m_AboutText->AppendText(wxT("You can buy high-quality limited edition artworks made with the Electric Sheep, as well as Blu-Rays, DVDs and T-shirts, from ")); + +m_AboutText->BeginStyle(urlStyle); +m_AboutText->BeginURL(wxT("http://scottdraves.com/for-sale.html")); +m_AboutText->WriteText(wxT("ScottDraves.com")); +m_AboutText->EndURL(); +m_AboutText->EndStyle(); + +m_AboutText->WriteText(wxT(". Proceeds from these sales keep the network free to the public.")); +m_AboutText->LineBreak(); +m_AboutText->LineBreak(); +m_AboutText->WriteText(wxT("Programmed by an ")); + +m_AboutText->BeginStyle(urlStyle); +m_AboutText->BeginURL(wxT("http://community.electricsheep.org/credits")); +m_AboutText->WriteText(wxT("Open Source team")); +m_AboutText->EndURL(); +m_AboutText->EndStyle(); + +m_AboutText->WriteText(wxT(" from all over the world.")); + +m_AboutText->EndSuppressUndo(); + +LoadSettings(); +} + +void electricsheepguiMyDialog2::OnDialogClose( wxCloseEvent& event ) +{ + this->Destroy(); +} +void* LoginThread::Entry() +{ + wxMilliSleep(1000); + if (sMainDialog->m_TestLogin) + return 0; + sMainDialog->Login(); + return 0; +} + +void electricsheepguiMyDialog2::FireLoginStatusUpdateEvent(const wxString &text) +{ + LoginStatusUpdateEvent event(text); + AddPendingEvent(event); +} + +void electricsheepguiMyDialog2::FireLoginInfoUpdateEvent(const wxString &text) +{ + LoginInfoUpdateEvent event(text); + AddPendingEvent(event); +} + +void electricsheepguiMyDialog2::OnRunClick( wxCommandEvent& event ) +{ + SaveSettings(); + //::Base::RecreateProcess(std::string("-x")); +#ifndef LINUX_GNU + wxString windir; + wxGetEnv(L"WINDIR", &windir); + wxExecute(windir + L"\\es.scr -x"); +#else + wxExecute("electricsheep"); +#endif +} + +void electricsheepguiMyDialog2::OnHelpClick( wxCommandEvent& event ) +{ + wxLaunchDefaultBrowser(CLIENT_HELP_LINK); +} + +void electricsheepguiMyDialog2::OnTextLeftUp( wxMouseEvent& event ) +{ + event.Skip(); + switch (event.GetId()) + { + case wxID_DRUPAL_NAME: + if (m_NewFocus == true) + { + m_textDrupalName->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_DRUPAL_PASSWORD: + if (m_NewFocus == true) + { + m_textDrupalPassword->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_FREE_FLOCK_MAX_SPACE: + if (m_NewFocus == true) + { + m_spinCache->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_GOLD_FLOCK_MAX_SPACE: + if (m_NewFocus == true) + { + m_spinGoldCache->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_SHEEP_PLAYBACK_SPEED: + if (m_NewFocus == true) + { + m_spinDecodeFps->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_REPEAT_LOOPS: + if (m_NewFocus == true) + { + m_spinRepeatLoops->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_DISPLAY_MONITOR: + if (m_NewFocus == true) + { + m_spinMonitor->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_DISPLAY_SPEED: + if (m_NewFocus == true) + { + m_spinDisplayFps->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_PROXY_HOST_NAME: + if (m_NewFocus == true) + { + m_textProxyHost->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_PROXY_USER_NAME: + if (m_NewFocus == true) + { + m_textProxyUser->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_PROXY_PASSWORD: + if (m_NewFocus == true) + { + m_textProxyPassword->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + case wxID_CONTENT_DIRECTORY: + if (m_NewFocus == true) + { + //m_dirContent->SetSelection(-1,-1); + m_NewFocus = false; + } + break; + + } +} + +void electricsheepguiMyDialog2::OnTextSetFocus( wxFocusEvent& event ) +{ + m_NewFocus = true; + event.Skip(); +} + +void electricsheepguiMyDialog2::OnDrupalNameTextEnter( wxCommandEvent& event ) +{ +//m_staticText6->SetLabel("...password changed, press 'Login' to verify..."); +m_CreateAccountButton->Enable( true ); + +g_Settings()->Set("settings.content.registered", false); + +g_Settings()->Set("settings.generator.nickname", std::string(m_textDrupalName->GetValue())); + +//DeleteListXml(); +m_textDrupalPassword->ChangeValue(wxEmptyString); +} + +void electricsheepguiMyDialog2::OnDrupalPasswordTextEnter( wxCommandEvent& event ) +{ +//m_staticText6->SetLabel("...password changed, press 'Login' to verify..."); +m_CreateAccountButton->Enable( true ); +g_Settings()->Set("settings.content.registered", false); +g_Settings()->Set("settings.content.password", std::string(m_textDrupalPassword->GetValue())); +g_Settings()->Set("settings.generator.nickname", std::string(m_textDrupalName->GetValue())); +g_Settings()->Set("settings.content.password_md5", + computeMD5( + g_Settings()->Get("settings.content.password", std::string("")) + + "sh33p" + + g_Settings()->Get("settings.generator.nickname", std::string("")) + ) + ); +//DeleteListXml(); +m_TestLogin = true; +} + +void electricsheepguiMyDialog2::OnTestAccountButtonClick( wxCommandEvent& event ) +{ + m_staticText6->SetLabel("...talking..."); + m_TestLogin = true; +} + +void electricsheepguiMyDialog2::OnCreateClick( wxCommandEvent& event ) +{ + std::string nickencoded = Encode( g_Settings()->Get("settings.generator.nickname", std::string("")) ); + std::string passencoded = Encode( g_Settings()->Get("settings.content.password_md5", std::string("")) ); + std::stringstream browserlink; + browserlink << "http://electricsheep.org/account/" << m_Role << "?u="<< nickencoded << "&p=" << passencoded; + ::wxLaunchDefaultBrowser(wxString(browserlink.str())); +} + +void electricsheepguiMyDialog2::OnUnlimitedCacheCheck( wxCommandEvent& event ) +{ + m_spinCache->Enable(true); + g_Settings()->Set("settings.content.unlimited_cache", false); + if (m_checkUnlimitedCache->IsChecked()) + { + g_Settings()->Set("settings.content.unlimited_cache", true); + m_spinCache->Enable(false); + } +} + +void electricsheepguiMyDialog2::OnGoldUnlimitedCacheCheck( wxCommandEvent& event ) +{ + m_spinGoldCache->Enable(true); + g_Settings()->Set("settings.content.unlimited_cache_gold", false); + if (m_checkGoldUnlimitedCache->IsChecked()) + { + g_Settings()->Set("settings.content.unlimited_cache_gold", true); + m_spinGoldCache->Enable(false); + } +} + +void electricsheepguiMyDialog2::OnContentDirChanged( wxFileDirPickerEvent& event ) +{ + g_Settings()->Set("settings.content.sheepdir", std::string(event.GetPath()) ); +#ifndef LINUX_GNU + wxString contentdir = event.GetPath(); + if (IsUserAnAdmin()) + { + wxExecute(wxString(L"SETACL.EXE -on \"") + contentdir + wxString(L"\" -ot file -actn ace -ace \"n:S-1-1-0;p:full,write_dacl;s:y;\"")); + } else + { + wxMessageBox(wxT("This action requires administrator rights"), wxT("Program is not currently running as admin"), wxICON_INFORMATION); + wxExecute(wxString(L"SETACL.EXE -on \"") + contentdir + wxString(L"\" -ot file -actn ace -ace \"n:S-1-1-0;p:full,write_dacl;s:y;\"")); + } +#endif +} + +void electricsheepguiMyDialog2::OnOpenClick( wxCommandEvent& event ) +{ +#ifndef LINUX_GNU + wxString tmpstr = m_dirContent->GetPath(); + while (tmpstr.size() > 1 && (tmpstr.at(tmpstr.size()-1) == '/' || tmpstr.at(tmpstr.size()-1) == '\\')) + tmpstr.erase(tmpstr.size()-1); + wxExecute(L"explorer " + tmpstr); +#else + int iReturn = wxExecute(L"nautilus " + m_dirContent->GetPath()); + if ( iReturn == -1 ) wxExecute(L"dolphin " + m_dirContent->GetPath()); +#endif +} + +void electricsheepguiMyDialog2::OnDecodeFpsKillFocus( wxFocusEvent& event ) +{ + if (m_spinDecodeFps->GetValue() == wxEmptyString) + m_spinDecodeFps->ChangeValue(wxT("20")); + double val = 0; + m_spinDecodeFps->GetValue().ToDouble(&val); + if (m_spinDecodeFps->GetValue().size() > 0) + { + if (val < 0.1 || val > 100) + { + m_spinDecodeFps->ChangeValue(wxT("20")); + } + } + event.Skip(); +} + +void electricsheepguiMyDialog2::OnDecodeFpsTextUpdated( wxCommandEvent& event ) +{ + /*if (m_spinDecodeFps != NULL) + { + long val = 0; + m_spinDecodeFps->GetValue().ToLong(&val); + if (m_spinDecodeFps->GetValue().size() > 0) + { + if (val <= 0.1 || val > 99) + { + m_spinDecodeFps->ChangeValue(wxT("23")); + } + } + }*/ + event.Skip(); +} + +void electricsheepguiMyDialog2::OnPlayerFpsKillFocus( wxFocusEvent& event ) +{ + if (m_spinDisplayFps->GetValue() == wxEmptyString) + m_spinDisplayFps->ChangeValue(wxT("60")); + double val = 0; + m_spinDisplayFps->GetValue().ToDouble(&val); + if (m_spinDisplayFps->GetValue().size() > 0) + { + if (val < 1 || val > 120) + { + m_spinDisplayFps->ChangeValue(wxT("60")); + } + } + event.Skip(); +} + +void electricsheepguiMyDialog2::OnPlayerFpsTextUpdated( wxCommandEvent& event ) +{ + /*if (m_spinDisplayFps != NULL) + { + long val = 0; + m_spinDisplayFps->GetValue().ToLong(&val); + if (m_spinDisplayFps->GetValue().size() > 0) + { + if (val <= 0.1 || val > 99) + { + m_spinDisplayFps->ChangeValue(wxT("60")); + } + } + }*/ + event.Skip(); +} + +void electricsheepguiMyDialog2::OnProxyTextEnter( wxCommandEvent& event ) +{ + g_Settings()->Set( "settings.content.proxy", std::string(m_textProxyHost->GetValue())); + if (m_textProxyHost->GetValue() != wxT("")) + g_Settings()->Set( "settings.content.use_proxy", true); + else + g_Settings()->Set( "settings.content.use_proxy", false); +} + +void electricsheepguiMyDialog2::OnProxyUserNameEnter( wxCommandEvent& event ) +{ + g_Settings()->Set( "settings.content.proxy_username", std::string(m_textProxyUser->GetValue())); +} + +void electricsheepguiMyDialog2::OnProxyPasswordEnter( wxCommandEvent& event ) +{ + g_Settings()->Set( "settings.content.proxy_password", std::string(m_textProxyPassword->GetValue())); +} + +void electricsheepguiMyDialog2::OnAboutUrl( wxTextUrlEvent& event ) +{ + wxLaunchDefaultBrowser(event.GetString()); +} + +void electricsheepguiMyDialog2::OnClickOk( wxCommandEvent& event ) +{ + SaveSettings(); + this->Destroy(); +} + +void electricsheepguiMyDialog2::OnCancelClick( wxCommandEvent& event ) +{ + this->Destroy(); +} + +void electricsheepguiMyDialog2::OnLoginStatusUpdate( LoginStatusUpdateEvent &event ) +{ + m_staticText6->SetLabel( event.getText() ); + Layout(); +} + +void electricsheepguiMyDialog2::OnLoginInfoUpdate( LoginInfoUpdateEvent &event ) +{ + m_staticText25->SetLabel( event.getText() ); + Layout(); +} + diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/electricsheepguiMyDialog2.h electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/electricsheepguiMyDialog2.h --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/electricsheepguiMyDialog2.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/electricsheepguiMyDialog2.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,144 @@ +#ifndef __electricsheepguiMyDialog2__ +#define __electricsheepguiMyDialog2__ + +/** +@file +Subclass of MyDialog2, which is generated by wxFormBuilder. +*/ + +#include "config.h" + +//// end generated include +#ifndef LINUX_GNU +#include +#include +#else +#include +#define MAX_PATH PATH_MAX +#endif +#include +#include +#include + +BEGIN_DECLARE_EVENT_TYPES() + DECLARE_EVENT_TYPE(EVT_TYPE_LOGINSTATUSUPDATE, 1) + DECLARE_EVENT_TYPE(EVT_TYPE_LOGININFOUPDATE, 2) +END_DECLARE_EVENT_TYPES() + +class LoginStatusUpdateEvent : public wxEvent +{ +public: + LoginStatusUpdateEvent(const wxString &text = wxString()); + + wxEvent *Clone() const { return new LoginStatusUpdateEvent(*this); } + + const wxString &getText() { return m_text; } + + DECLARE_DYNAMIC_CLASS(LoginStatusUpdateEvent) + +private: + wxString m_text; +}; + +typedef void (wxEvtHandler::*LoginStatusUpdateEventFun)(LoginStatusUpdateEvent &); + +#define EVT_UPDATE_LOGIN_STATUS(fun) \ + DECLARE_EVENT_TABLE_ENTRY(EVT_TYPE_LOGINSTATUSUPDATE, \ + -1, \ + -1, \ + (wxObjectEventFunction) \ + (LoginStatusUpdateEventFun) &fun, \ + static_cast(NULL)), + + +class LoginInfoUpdateEvent : public wxEvent +{ +public: + LoginInfoUpdateEvent(const wxString &text = wxString()); + + wxEvent *Clone() const { return new LoginInfoUpdateEvent(*this); } + + const wxString &getText() const { return m_text; } + + DECLARE_DYNAMIC_CLASS(LoginInfoUpdateEvent) + +private: + wxString m_text; +}; + +typedef void (wxEvtHandler::*LoginInfoUpdateEventFun)(LoginInfoUpdateEvent &); + +#define EVT_UPDATE_LOGIN_INFO(fun) \ + DECLARE_EVENT_TABLE_ENTRY(EVT_TYPE_LOGININFOUPDATE, \ + -1, \ + -1, \ + (wxObjectEventFunction) \ + (LoginInfoUpdateEventFun) &fun, \ + static_cast(NULL)), + +class LoginThread : public wxThread +{ +public: + LoginThread(wxThreadKind kind = wxTHREAD_JOINABLE): wxThread(kind) {}; + virtual ~LoginThread() {}; + void* Entry(); +}; + +/** Implementing MyDialog2 */ +class electricsheepguiMyDialog2 : public MyDialog2 +{ + DECLARE_EVENT_TABLE() + + protected: + // Handlers for MyDialog2 events. + void OnDialogClose( wxCloseEvent& event ); + void OnIdle( wxIdleEvent& event ); + void OnRunClick( wxCommandEvent& event ); + void OnHelpClick( wxCommandEvent& event ); + void OnTextLeftUp( wxMouseEvent& event ); + void OnTextSetFocus( wxFocusEvent& event ); + void OnDrupalNameTextEnter( wxCommandEvent& event ); + void OnDrupalPasswordTextEnter( wxCommandEvent& event ); + void OnTestAccountButtonClick( wxCommandEvent& event ); + void OnCreateClick( wxCommandEvent& event ); + void OnUnlimitedCacheCheck( wxCommandEvent& event ); + void OnGoldUnlimitedCacheCheck( wxCommandEvent& event ); + void OnDecodeFpsKillFocus( wxFocusEvent& event ); + void OnDecodeFpsTextUpdated( wxCommandEvent& event ); + void OnPlayerFpsKillFocus( wxFocusEvent& event ); + void OnPlayerFpsTextUpdated( wxCommandEvent& event ); + void OnProxyTextEnter( wxCommandEvent& event ); + void OnProxyUserNameEnter( wxCommandEvent& event ); + void OnProxyPasswordEnter( wxCommandEvent& event ); + void OnContentDirChanged( wxFileDirPickerEvent& event ); + void OnOpenClick( wxCommandEvent& event ); + void OnAboutUrl( wxTextUrlEvent& event ); + void OnClickOk( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); + void DeleteListXml(); + void OnLoginStatusUpdate( LoginStatusUpdateEvent &event ); + void OnLoginInfoUpdate( LoginInfoUpdateEvent &event ); + + public: + /** Constructor */ + electricsheepguiMyDialog2( wxWindow* parent ); + //// end generated class members + bool m_TestLogin; + void Login(); + virtual ~electricsheepguiMyDialog2(); + + std::string m_Response; + std::string m_Role; +private: + char szPath[ MAX_PATH ]; + void SaveSettings(); + void LoadSettings(); + inline void FireLoginStatusUpdateEvent(const wxString &text); + inline void FireLoginInfoUpdateEvent(const wxString &text); + std::string m_UniqueId; + bool m_ForceWindowedDX; + LoginThread *m_LoginThread; + bool m_NewFocus; +}; + +#endif // __electricsheepguiMyDialog2__ Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/logo.png and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/logo.png differ diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/main.cpp electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/main.cpp --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/main.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/main.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,33 @@ +#include "main.h" +#include +#include "electricsheepguiMyDialog2.h" + +#ifdef LINUX_GNU +#include "../../Runtime/sheep_logo.xpm" +#endif + +IMPLEMENT_APP(wxWidgetsApp) + +wxWidgetsApp::wxWidgetsApp() +{ +} + +wxWidgetsApp::~wxWidgetsApp() +{ +} + +bool wxWidgetsApp::OnInit() +{ + m_dialog = new electricsheepguiMyDialog2((wxWindow*)NULL); +#ifdef WIN32 + m_dialog->SetIcon(wxString(L"0")); +#endif +#ifdef LINUX_GNU + wxIcon myicon = wxIcon(eslogo); + m_dialog->SetIcon(myicon); +#endif + m_dialog->Centre(); + m_dialog->Show(true); + SetTopWindow(m_dialog); + return true; +} diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/main.h electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/main.h --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/main.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/main.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,16 @@ +#pragma once + +#include +#include "electricsheepguiMyDialog2.h" + +class wxWidgetsApp : public wxApp +{ +public: + wxWidgetsApp(); + virtual ~wxWidgetsApp(); + virtual bool OnInit(); +private: + electricsheepguiMyDialog2 *m_dialog; +}; + +DECLARE_APP(wxWidgetsApp) \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/Makefile.am electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/Makefile.am --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/Makefile.am 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,59 @@ +## Process this file with automake to produce Makefile.in + +if IS_LINUX_GNU +linux_CFLAGS=-DLINUX_GNU=1 -DSHAREDIR=\"$(prefix)/share/electricsheep/\" +endif + + + + +AM_CPPFLAGS = \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ + -DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \ + -I $(top_srcdir) \ + -I ../../DisplayOutput/OpenGL \ + -I ../../Common \ + -I ../../DisplayOutput \ + -I ../../DisplayOutput/Renderer \ + -I ../../Common/Math \ + -I ../../ContentDecoder \ + -I ../../TupleStorage \ + -I ../../ContentDownloader \ + -I ../../lua5.1/src \ + -I ../../Client \ + -I ../../Networking \ + -I ../../tinyXml \ + -I /usr/include/libswscale +# -I /usr/include/libavcodec \ +# -I /usr/include/libavformat \ +# -I /usr/include/libavutil + +bin_PROGRAMS = electricsheep-preferences + +electricsheep_preferences_SOURCES = \ + config.cpp \ + electricsheepguiMyDialog2.cpp \ + main.cpp \ + ../../tinyXml/tinyxmlparser.cpp \ + ../../tinyXml/tinyxml.cpp \ + ../../tinyXml/tinystr.cpp \ + ../../tinyXml/tinyxmlerror.cpp \ + ../../TupleStorage/diriterator.cpp \ + ../../TupleStorage/luastorage.cpp \ + ../../TupleStorage/storage.cpp \ + ../../Common/AlignedBuffer.cpp \ + ../../Common/Common.cpp \ + ../../Common/Exception.cpp \ + ../../Common/Log.cpp \ + ../../Common/LuaState.cpp \ + ../../Common/luaxml.cpp \ + ../../Common/md5.c \ + ../../Common/pool.cpp + +electricsheep_preferences_LDADD = -lboost_thread -lboost_filesystem $(CURL_LIBS) $(LUA_LIBS) -ltinyxml @WX_LDADD@ @BOOST_LDADD@ + +#AM_CXXFLAGS = $(linux_CFLAGS) -fpermissive @WX_CXXFLAGS@ +AM_CXXFLAGS = $(linux_CFLAGS) @WX_CXXFLAGS@ + + + diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/settingsgui.rc electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/settingsgui.rc --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/settingsgui.rc 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/settingsgui.rc 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1 @@ +0 ICON "..\\..\\RuntimeMSVC\\logo256256.ico" diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/SettingsGUI.sln electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/SettingsGUI.sln --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/SettingsGUI.sln 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/SettingsGUI.sln 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SettingsGUI", "SettingsGUI.vcxproj", "{8AA39198-AF69-41D8-BE34-EA79BC0549A0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Itanium = Debug|Itanium + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Itanium = Release|Itanium + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Debug|Itanium.ActiveCfg = Debug|x64 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Debug|Win32.ActiveCfg = Debug|Win32 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Debug|Win32.Build.0 = Debug|Win32 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Debug|x64.ActiveCfg = Debug|x64 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Debug|x64.Build.0 = Debug|x64 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Release|Itanium.ActiveCfg = Release|Win32 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Release|Itanium.Build.0 = Release|Win32 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Release|Win32.ActiveCfg = Release|Win32 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Release|Win32.Build.0 = Release|Win32 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Release|x64.ActiveCfg = Release|x64 + {8AA39198-AF69-41D8-BE34-EA79BC0549A0}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/SettingsGUI.vcxproj electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/SettingsGUI.vcxproj --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/SettingsGUI.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/SettingsGUI.vcxproj 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,255 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {8AA39198-AF69-41D8-BE34-EA79BC0549A0} + SettingsGUI + Win32Proj + 8.1 + + + + Application + Unicode + true + v140 + + + Application + Unicode + true + Windows7.1SDK + + + Application + Unicode + v140 + + + Application + Unicode + Windows7.1SDK + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(Configuration)\ + true + true + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(Configuration)\ + false + false + C:\boost_1_64_0;$(IncludePath) + C:\boost_1_45_0_x64;$(IncludePath) + C:\boost_1_64_0\stage\lib;$(LibraryPath) + C:\boost_1_45_0_x64\stage\lib;$(LibraryPath) + C:\boost_1_64_0;$(IncludePath) + C:\boost_1_45_0_x64;$(IncludePath) + C:\boost_1_64_0\stage\lib;$(LibraryPath) + C:\boost_1_45_0_x64\stage\lib;$(LibraryPath) + + + + Disabled + ..\..\common;..\..\tuplestorage;..\..\lua5.1\include;..\..\tinyXml;..\..\curl\include;..\..\ffmpeg\ffmpeg-static\include;C:\wxWidgets\include;C:\wxWidgets\include\msvc;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + + + Level3 + EditAndContinue + + + wxbase30ud.lib;wxmsw30ud_core.lib;comctl32.lib;wxpngd.lib;wxzlibd.lib;rpcrt4.lib;shlwapi.lib;lua5.1d.lib;tinyxmld.lib;libcurld.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + C:\wxWidgets\lib\vc_lib;..\..\lua5.1\lib\static;..\..\tinyXml\Debugtinyxml;..\..\curl\lib\debug-ssl-zlib;..\..\openssl-1.0.2k\out32;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + true + Windows + MachineX86 + + + copy .\debug\settingsgui.exe ..\..\RuntimeMSVC\settingsguid.exe /y + + + + + Disabled + ..\..\common;..\..\tuplestorage;..\..\lua5.1\include;..\..\tinyXml-x64;..\..\curl-x64\include;..\..\ffmpeg\ffmpeg-static\include;C:\wxWidgets-2.9.1-x64\include;C:\wxWidgets-2.9.1-x64\include\msvc;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebug + + + Level3 + ProgramDatabase + + + wxbase29ud.lib;wxmsw29ud_core.lib;comctl32.lib;wxpngd.lib;wxzlibd.lib;rpcrt4.lib;shlwapi.lib;lua5.1d.lib;tinyxmld.lib;libcurld.lib;ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + C:\wxWidgets-2.9.1-x64\lib\vc_lib;..\..\lua5.1-x64\lib\static;..\..\tinyXml-x64\Debug;..\..\curl-x64\lib\debug-zlib;%(AdditionalLibraryDirectories) + %(IgnoreSpecificDefaultLibraries) + true + Windows + + + copy .\debug\settingsgui.exe ..\..\RuntimeMSVC\settingsguid.exe /y + + + + + MaxSpeed + AnySuitable + true + Speed + true + ..\..\common;..\..\tuplestorage;..\..\lua5.1\include;..\..\ffmpeg\ffmpeg-static\include;..\..\tinyXml;..\..\curl\include;C:\wxWidgets\include;C:\wxWidgets\include\msvc;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + ProgramDatabase + + + wxbase30u.lib;wxmsw30u_core.lib;comctl32.lib;wxpng.lib;wxzlib.lib;rpcrt4.lib;shlwapi.lib;lua5.1.lib;tinyxml.lib;libcurl.lib;ws2_32.lib;wldap32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) + C:\wxWidgets\lib\vc_lib;..\..\lua5.1\lib\static;..\..\tinyXml\Releasetinyxml;..\..\curl\lib\release-ssl-zlib;..\..\openssl-1.0.2k\out32;%(AdditionalLibraryDirectories) + RequireAdministrator + %(IgnoreSpecificDefaultLibraries) + true + Windows + true + true + true + MachineX86 + + + copy .\release\settingsgui.exe ..\..\RuntimeMSVC /y + + + + + MaxSpeed + AnySuitable + true + Speed + true + ..\..\common;..\..\tuplestorage;..\..\lua5.1-x64\include;..\..\ffmpeg\ffmpeg-static\include;..\..\tinyXml-x64;..\..\curl-x64\include;C:\wxWidgets-2.9.1-x64\include\msvc;C:\wxWidgets-2.9.1-x64\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;CURL_STATICLIB;_CRT_SECURE_NO_WARNINGS;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;%(PreprocessorDefinitions) + true + MultiThreaded + true + + + Level3 + ProgramDatabase + + + wxbase29u.lib;wxmsw29u_core.lib;comctl32.lib;wxpng.lib;wxzlib.lib;rpcrt4.lib;shlwapi.lib;lua5.1.lib;tinyxml.lib;libcurl.lib;ws2_32.lib;wldap32.lib;%(AdditionalDependencies) + C:\wxWidgets-2.9.1-x64\lib\vc_lib;..\..\lua5.1-x64\lib\static;..\..\tinyXml-x64\Release;..\..\curl-x64\lib\release-zlib;%(AdditionalLibraryDirectories) + RequireAdministrator + %(IgnoreSpecificDefaultLibraries) + true + Windows + true + true + true + + + copy .\release\settingsgui.exe ..\..\RuntimeMSVC /y + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/SettingsGUI.vcxproj.filters electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/SettingsGUI.vcxproj.filters --- electricsheep-2.7~b12+svn20091224/MSVC/SettingsGUI/SettingsGUI.vcxproj.filters 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/SettingsGUI/SettingsGUI.vcxproj.filters 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,164 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + {464124f4-de39-48e1-8d54-dde3431edd59} + + + {ffedcfc2-4043-4702-80a5-0e016b195af1} + + + {d2d59116-63c2-4745-87d1-f456bd856896} + + + + + Source Files + + + Source Files + + + Source Files + + + TupleStorage + + + TupleStorage + + + TupleStorage + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + TupleStorage + + + TupleStorage + + + TupleStorage + + + TupleStorage + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Common + + + Header Files + + + + + Resource Files + + + \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/sheepicon.rc electricsheep-3.0.2-git20180325/MSVC/sheepicon.rc --- electricsheep-2.7~b12+svn20091224/MSVC/sheepicon.rc 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/sheepicon.rc 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,8 @@ +#include "resource.h" + +1 ICON "..\\RuntimeMSVC\\logo256256.ico" + +STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +BEGIN + IDS_DESCRIPTION "Electric Sheep" +END \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/TextureFlatDD.cpp electricsheep-3.0.2-git20180325/MSVC/TextureFlatDD.cpp --- electricsheep-2.7~b12+svn20091224/MSVC/TextureFlatDD.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/TextureFlatDD.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,102 @@ +#ifdef WIN32 +#ifdef _MSC_VER +#include +#include +#include + +#include "base.h" +#include "Log.h" +#include "MathBase.h" +#include "Exception.h" +#include "DisplayOutput.h" +#include "RendererDD.h" +#include "TextureFlatDD.h" + + +namespace DisplayOutput +{ + +CTextureFlatDS::CTextureFlatDS(CBackBufDD *backbuffer, const uint32 _flags ) : CTextureFlat( _flags ), m_pTextureDS(NULL), m_BackBuffer(backbuffer) +{ +} + + +CTextureFlatDS::~CTextureFlatDS() +{ + SAFE_RELEASE( m_pTextureDS ); +} + + +bool CTextureFlatDS::Upload( spCImage _spImage ) +{ + if( m_spImage == NULL ) + m_spImage = _spImage; + + CImageFormat format = m_spImage->GetFormat(); + + if( m_Size.iWidth() != (int32)_spImage->GetWidth() || + m_Size.iHeight() != (int32)_spImage->GetHeight() || + m_Format != format.getFormatEnum() ) + { + // Stuff changed, nuke old texture. + SAFE_RELEASE( m_pTextureDS ); + } + + if( !m_pTextureDS ) + { + DDSURFACEDESC2 sd = {0}; + sd.dwSize = sizeof(sd); + sd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; + sd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE | DDSCAPS_SYSTEMMEMORY; + sd.dwWidth = 1; + sd.dwHeight = 1; + + HRESULT hr = m_BackBuffer->CreateSurface(&sd, &m_pTextureDS); + g_Log->Info( "%s texture created, HR=%d", format.GetDescription().c_str(), hr); + + m_Size = Base::Math::CRect( fp4(m_spImage->GetWidth()), fp4(m_spImage->GetHeight()) ); + m_Format = format.getFormatEnum(); + + if (m_pTextureDS == NULL) + return false; + } + + return true; +} + +bool CTextureFlatDS::Bind( const uint32 _index ) +{ + if (m_pTextureDS == NULL) + return false; + DDSURFACEDESC2 sd = {0}; + sd.dwSize = sizeof(sd); + sd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PITCH | DDSD_LPSURFACE | DDSD_PIXELFORMAT; + sd.dwWidth = m_spImage->GetWidth(); + sd.dwHeight = m_spImage->GetHeight(); + sd.lPitch = m_spImage->GetWidth()*4; + sd.lpSurface = m_spImage->GetData( 0 ); + sd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT); + sd.ddpfPixelFormat.dwRGBBitCount = 32; + sd.ddpfPixelFormat.dwFlags = DDPF_RGB; + sd.ddpfPixelFormat.dwRBitMask = 0xff0000; + sd.ddpfPixelFormat.dwGBitMask = 0x00ff00; + sd.ddpfPixelFormat.dwBBitMask = 0x0000ff; + + if (FAILED(m_pTextureDS->SetSurfaceDesc(&sd, 0))) + return false; + + m_pTextureDS->AddRef(); + m_BackBuffer->SetContexts(m_pTextureDS, m_Size.iWidth(), m_Size.iHeight()); + + return true; +} + +bool CTextureFlatDS::Unbind( const uint32 _index ) +{ + return true; +} + + +} +#endif +#endif \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/TextureFlatDD.h electricsheep-3.0.2-git20180325/MSVC/TextureFlatDD.h --- electricsheep-2.7~b12+svn20091224/MSVC/TextureFlatDD.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/TextureFlatDD.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,36 @@ +#ifdef _MSC_VER +#ifdef WIN32 +#ifndef _TEXTUREFLATDS_H +#define _TEXTUREFLATDS_H + +#include "TextureFlat.h" + +namespace DisplayOutput +{ + +class CTextureFlatDS : public CTextureFlat +{ + LPDIRECTDRAWSURFACE7 m_pTextureDS; + + // Internal to keep track if size or format changed. + Base::Math::CRect m_Size; + DisplayOutput::eImageFormat m_Format; + CBackBufDD *m_BackBuffer; + HDC m_hdc; + HDC m_sdc; + public: + CTextureFlatDS(CBackBufDD *backbuffer = NULL, const uint32 _flags = 0 ); + virtual ~CTextureFlatDS(); + + virtual bool Upload( spCImage _spImage ); + virtual bool Bind( const uint32 _index ); + virtual bool Unbind( const uint32 _index ); +}; + +MakeSmartPointers( CTextureFlatDS ); + +} + +#endif +#endif +#endif \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/MSVC/WObject.h electricsheep-3.0.2-git20180325/MSVC/WObject.h --- electricsheep-2.7~b12+svn20091224/MSVC/WObject.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/MSVC/WObject.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,23 @@ +// Copyleft 2005 Chris Korda +// 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 any later version. +/* + chris korda + + revision history: + rev date comments + 00 15aug04 initial version + + minimal base class for objects not derived from CObject + +*/ + +class WObject { +public: + WObject() {} // default ctor required + +private: + WObject(const WObject&); // prevent bitwise copy + WObject& operator=(const WObject&); // prevent bitwise assignment +}; diff -Nru electricsheep-2.7~b12+svn20091224/Networking/Download.cpp electricsheep-3.0.2-git20180325/Networking/Download.cpp --- electricsheep-2.7~b12+svn20091224/Networking/Download.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Networking/Download.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,109 @@ +#include +#include +#include +#include +#include +#include "Log.h" +#include "Networking.h" + +namespace Network +{ + +/* + CFileDownloader(). + Constructor. +*/ +CFileDownloader::CFileDownloader( const std::string &_name ) : CCurlTransfer( _name ), m_Data() +{ + m_Data.reserve(10*1024*1024); +} + +/* + ~CFileDownloader(). + Destructor. +*/ +CFileDownloader::~CFileDownloader() +{ +} + +/* + customWrite(). + Appends incoming data to string. +*/ +int32 CFileDownloader::customWrite( void *_pBuffer, size_t _size, size_t _nmemb, void *_pUserData ) +{ + CFileDownloader *pOut = (CFileDownloader *)_pUserData; + if( !pOut ) + { + g_Log->Info( "Error, no _pUserData." ); + return -1; + } + + pOut->m_Data.append( (char *)_pBuffer, _size * _nmemb ); + return (int32)(_size * _nmemb); +} + + +/* + Perform(). + Download specific Perform function. +*/ +bool CFileDownloader::Perform( const std::string &_url ) +{ + m_Data = ""; + + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_WRITEDATA, this ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_WRITEFUNCTION, &CFileDownloader::customWrite ) ) ) return false; + + return CCurlTransfer::Perform( _url ); +} + +/* + Save(). + Saves completed data to file. +*/ +bool CFileDownloader::Save( const std::string &_output ) +{ + std::ofstream out( _output.c_str(), std::ios::out | std::ios::binary ); + if( out.bad() ) + { + g_Log->Info( "Failed to open output file." ); + return false; + } + + out << m_Data; + out.close(); + + g_Log->Info( "%s saved.", _output.c_str() ); + return true; +} + + +/* + CFileDownloader_TimeCondition(). + Constructor. +*/ +CFileDownloader_TimeCondition::CFileDownloader_TimeCondition( const std::string &_name ) : CFileDownloader( _name ) +{ +} + +/* + ~CFileDownloader_TimeCondition + Destructor. +*/ +CFileDownloader_TimeCondition::~CFileDownloader_TimeCondition() +{ +} + +/* + Perform(). + +*/ +bool CFileDownloader_TimeCondition::PerformDownloadWithTC( const std::string &_url, const time_t _lastTime ) +{ + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_TIMECONDITION, this ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_TIMEVALUE, _lastTime ) ) ) return false; + return CFileDownloader::Perform( _url ); +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/Networking/Networking.cbp electricsheep-3.0.2-git20180325/Networking/Networking.cbp --- electricsheep-2.7~b12+svn20091224/Networking/Networking.cbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Networking/Networking.cbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,48 @@ + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/Networking/Networking.cpp electricsheep-3.0.2-git20180325/Networking/Networking.cpp --- electricsheep-2.7~b12+svn20091224/Networking/Networking.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Networking/Networking.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,574 @@ +#include +#include +#include +#include +#include +#include +#include +#include "Log.h" +#include "Networking.h" + +namespace Network +{ + +/* + CCurlTransfer(). + Constructor. +*/ +CCurlTransfer::CCurlTransfer( const std::string &_name ) : m_Name( _name ), m_Status( "Idle" ), m_AverageSpeed("0 kb/s") +{ + g_Log->Info( "CCurlTransfer(%s)", _name.c_str() ); + memset(errorBuffer, 0, CURL_ERROR_SIZE); + m_pCurl = curl_easy_init(); + if( !m_pCurl ) + g_Log->Info( "Failed to init curl instance." ); + + m_pCurlM = curl_multi_init(); + if( !m_pCurlM ) + g_Log->Info( "Failed to init curl multi instance." ); + + if ( m_pCurl != NULL && m_pCurlM != NULL ) + curl_multi_add_handle( m_pCurlM, m_pCurl ); +} + +/* + ~CCurlTransfer(). + Destructor. +*/ +CCurlTransfer::~CCurlTransfer() +{ + //g_NetworkManager->Remove( this ); + g_Log->Info( "~CCurlTransfer()" ); + + if ( m_pCurlM != NULL && m_pCurl != NULL ) + curl_multi_remove_handle(m_pCurlM, m_pCurl); + + if( m_pCurl != NULL ) + { + curl_easy_cleanup( m_pCurl ); + m_pCurl = NULL; + } + + if ( m_pCurlM != NULL ) + { + curl_multi_cleanup( m_pCurlM ); + m_pCurlM = NULL; + } +} + +/* + Verify. + User throughout these classes to verify curl integrity. +*/ +bool CCurlTransfer::Verify( CURLcode _code ) +{ + g_Log->Info( "Verify(%d)", _code ); + + if( _code != CURLE_OK ) + { + Status( curl_easy_strerror( _code ) ); + return false; + } + + return true; +} + +/* + VerifyM. + User throughout these classes to verify curl multi integrity. +*/ +bool CCurlTransfer::VerifyM( CURLMcode _code ) +{ + g_Log->Info( "VerifyM(%d)", _code ); + + if( _code != CURLM_OK && _code != CURLM_CALL_MULTI_PERFORM) + { + Status( curl_multi_strerror( _code ) ); + return false; + } + + return true; +} + + +/* +*/ +int CCurlTransfer::customProgressCallback( void *_pUserData, fp8 _downTotal, fp8 _downNow, fp8 _upTotal, fp8 _upNow ) +{ + //g_Log->Info( "customProgressCallback()" ); + + if (!g_NetworkManager->SingletonActive() || g_NetworkManager->IsAborted()) + return -1; + + CCurlTransfer *pOut = static_cast(_pUserData); + if( !pOut ) + { + g_Log->Info( "Error, no _pUserData" ); + return -1; + } + + if (g_NetworkManager) + g_NetworkManager->UpdateProgress( pOut, ((_downTotal+_upTotal) > 0) ? ((_downNow+_upNow) / (_downTotal+_upTotal) * 100) : 0, _downNow + _upNow ); + return 0; +} + +/* + Proxy(). + Set proxy info used during transfer. +*/ +void CManager::Proxy( const std::string &_url, const std::string &_userName, const std::string &_password ) +{ + g_Log->Info( "Proxy()" ); + + if( _url == "" ) + return; + + boost::mutex::scoped_lock locker( m_Lock ); + + // Set proxy url now, which will allow a non-user/pass proxy to be used, as reported on the forum. + m_ProxyUrl = _url; + + if( _userName == "" || _password == "" ) + return; + + std::stringstream pu; + pu << _userName << ":" << _password; + m_ProxyUserPass = pu.str(); +} + +/* + Login(). + Set authentication user/pass for transfer. Default method is basic. +*/ +void CManager::Login( const std::string &_userName, const std::string &_password ) +{ + g_Log->Info( "Login()" ); + + if( _userName == "" || _password == "" ) + return; + + boost::mutex::scoped_lock locker( m_Lock ); + + std::stringstream pu; + pu << _userName << ":" << _password; + m_UserPass = pu.str(); +} + +/* + Logout(). + Clears authentication user/pass. +*/ +void CManager::Logout() +{ + g_Log->Info( "Logout()" ); + boost::mutex::scoped_lock locker( m_Lock ); + m_UserPass = ""; +} + +bool CCurlTransfer::InterruptiblePerform() +{ + CURLMcode _code; + int running_handles, running_handles_last; + fd_set fd_read, fd_write, fd_except; + int max_fd; + long timeout; + struct timeval tval, orig_tval; + + _code = curl_multi_perform( m_pCurlM, &running_handles ); + + if ( !VerifyM(_code) ) + return false; + + if ( running_handles == 0 ) + return true; + + running_handles_last = running_handles; + _code = CURLM_CALL_MULTI_PERFORM; + + while( 1 ) + { + while ( _code == CURLM_CALL_MULTI_PERFORM ) + { + if (!g_NetworkManager->SingletonActive() || g_NetworkManager->IsAborted()) + return false; + + _code = curl_multi_perform (m_pCurlM, &running_handles ); + } + + if ( !VerifyM( _code ) ) + return false; + + if ( running_handles < running_handles_last ) + break; + + FD_ZERO( &fd_read ); + FD_ZERO( &fd_write ); + FD_ZERO( &fd_except ); + + _code = curl_multi_fdset( m_pCurlM, &fd_read, &fd_write, &fd_except, &max_fd ); + + if ( !VerifyM( _code ) ) + return false; + + if (-1 == max_fd) + { + _code = CURLM_CALL_MULTI_PERFORM; + continue; + } + + timeout = -1; + +#ifdef CURL_MULTI_TIMEOUT + _code = curl_multi_timeout( m_pCurlM, &timeout ); + + if ( !VerifyM( _code ) ) + return false; +#endif + + if (timeout == -1) + timeout = 100; + + tval.tv_sec = timeout / 1000; + tval.tv_usec = timeout % 1000 * 1000; + + orig_tval = tval; + + int err; + + if (!g_NetworkManager->SingletonActive() || g_NetworkManager->IsAborted()) + return false; + + while ( ( err = select( max_fd + 1, &fd_read, &fd_write, &fd_except, &tval ) ) < 0 ) + { +#ifndef WIN32 + if ( errno != EINTR ) + { + return false; + } +#endif + if (!g_NetworkManager->SingletonActive() || g_NetworkManager->IsAborted()) + return false; + + //tval should be considered invalid after "select" returns + tval = orig_tval; + } + + _code = CURLM_CALL_MULTI_PERFORM; + } + + return true; +} + + +/* + Perform(). + Do the actual transfer. +*/ +bool CCurlTransfer::Perform( const std::string &_url ) +{ + if (!g_NetworkManager->SingletonActive() || g_NetworkManager->IsAborted()) + return false; + + std::string url = _url; + + g_Log->Info( "Perform(%s)", url.c_str() ); + if( !m_pCurl ) + return false; + + + g_Log->Info( "0x%x", m_pCurl ); + +#ifdef DEBUG + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_VERBOSE, 1 ) ) ) return false; +#endif + + // Ask manager to prepare this transfer for us. + if( !Verify( g_NetworkManager->Prepare( m_pCurl ) ) ) return false; + + g_Log->Info( "Performing '%s'", url.c_str() ); + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_URL, url.c_str() ) ) ) return false; + + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_NOPROGRESS, 0 ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_PROGRESSFUNCTION, &CCurlTransfer::customProgressCallback ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_PROGRESSDATA, this ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_ERRORBUFFER, errorBuffer ) ) ) return false; + + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_FOLLOWLOCATION, 1 ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_MAXREDIRS, 5 ) ) ) return false; + + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_SSL_VERIFYHOST, 0 ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_SSL_VERIFYPEER, 0 ) ) ) return false; + + Status( "Active" ); + + //if( !Verify( curl_easy_perform( m_pCurl ) ) ) + if ( !InterruptiblePerform() ) + { + g_Log->Warning( errorBuffer ); + Status( "Failed" ); + return false; + } + else + Status( "Completed" ); + + // Need to do this to trigger the strings to propagate. + g_NetworkManager->UpdateProgress( this, 100, 0 ); + + if( !Verify( curl_easy_getinfo( m_pCurl, CURLINFO_RESPONSE_CODE, &m_HttpCode ) ) ) return false; + if( m_HttpCode != 200 ) + { + // Check if the response code is allowed. + std::vector< uint32 >::const_iterator it = std::find( m_AllowedResponses.begin(), m_AllowedResponses.end(), m_HttpCode ); + if( it == m_AllowedResponses.end() ) + { + switch ( m_HttpCode ) + { + case 500: + Status("Internal Server Error\n"); + break; + case 401: + Status( "Authentication failed\n" ); + break; + + case 404: + Status( "File not found on server\n" ); + break; + + default: + { + std::stringstream st; + st << "Invalid server response [" << m_HttpCode << "]\n"; + + Status( st.str() ); + } + break; + } + + // Todo, (or not) print the remaining ones :) + return false; + } + } + + fp8 speedUp = 0; + fp8 speedDown = 0; + if( !Verify( curl_easy_getinfo( m_pCurl, CURLINFO_SPEED_UPLOAD, &speedDown ) ) ) return false; + if( !Verify( curl_easy_getinfo( m_pCurl, CURLINFO_SPEED_DOWNLOAD, &speedUp ) ) ) return false; + + std::stringstream statusres; + statusres << "~" << (uint32)((speedUp+speedDown)/1000) << " kb/s"; + m_AverageSpeed = statusres.str(); + + g_Log->Info( "Perform() complete" ); + + return true; +} + +/* + CManager(). + Constructor. +*/ +CManager::CManager() +{ +} + +/* + Startup(). + Init network manager. +*/ +bool CManager::Startup() +{ + curl_global_init( CURL_GLOBAL_DEFAULT ); + + m_UserPass = ""; + m_ProxyUrl = ""; + m_ProxyUserPass = ""; + + m_Aborted = false; + + return true; +} + +/* + Startup(). + De-init network manager. +*/ +bool CManager::Shutdown() +{ + curl_global_cleanup(); + return true; +} + +/* + Prepare()- + Called from CCurlTransfer::Perform(). + Sets proxy & http authentication. +*/ +CURLcode CManager::Prepare( CURL *_pCurl ) +{ + g_Log->Info( "Prepare()" ); + + boost::mutex::scoped_lock locker( m_Lock ); + + CURLcode code = CURLE_OK; + + // Set http authentication if there is one. + if( m_UserPass != "" ) + { + curl_easy_setopt(_pCurl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); + + code = curl_easy_setopt( _pCurl, CURLOPT_USERPWD, m_UserPass.c_str() ); + + if( code != CURLE_OK ) + return code; + } + + // Set proxy url and user/pass if they're defined. + if( m_ProxyUrl != "" ) + { + code = curl_easy_setopt( _pCurl, CURLOPT_PROXY, m_ProxyUrl.c_str() ); + if( code != CURLE_OK ) return code; + + if( m_ProxyUserPass != "" ) + code = curl_easy_setopt( _pCurl, CURLOPT_PROXYUSERPWD, m_ProxyUserPass.c_str() ); + } + + return code; +} + +/* + Abort(). + Sets the abort flags then used by any transfer to abort itself. +*/ +void CManager::Abort( void ) +{ + boost::mutex::scoped_lock locker( m_Lock ); + + m_Aborted = true; +} + +/* + Abort(). + Sets the abort flags then used by any transfer to abort itself. +*/ +bool CManager::IsAborted( void ) +{ + boost::mutex::scoped_lock locker( m_Lock ); + + return m_Aborted; +} + + +/* + UpdateProgress(). + Called from the callback of each CCurlTransfer instance to update progress. +*/ +void CManager::UpdateProgress( CCurlTransfer *_pTransfer, const fp8 _percentComplete, const fp8 _bytesTransferred ) +{ + boost::mutex::scoped_lock locker( m_Lock ); + + //g_Log->Info( "UpdateProgress()" ); + + if( !_pTransfer ) + return; + + std::stringstream tmp; + tmp << _pTransfer->Name() << " (" << _pTransfer->Status() << ")"; + if( _pTransfer->Status() == "Active" ) + { + tmp << ": " << (int32)_percentComplete << "%"; + if (_bytesTransferred > 1024 * 1024) + tmp << std::fixed << std::setprecision(1) << " (" << (_bytesTransferred/(1024.0 * 1024)) << " MB)"; + else if (_bytesTransferred > 1024) + tmp << std::fixed << std::setprecision(0) << " (" << (_bytesTransferred/(1024.0)) << " kB)"; + else + tmp << std::fixed << std::setprecision(0) << " (" << _bytesTransferred << " B)"; + } + + //g_Log->Info( "Setting progress!" ); + m_ProgressMap[ _pTransfer->Name() ] = tmp.str(); +} + +/* + Status(). + Creates a string with status for all active transfers. +*/ +std::string CManager::Status() +{ + boost::mutex::scoped_lock locker( m_Lock ); + + std::string res = ""; + + if( m_ProgressMap.size() == 0 ) + return res; + + std::map::iterator iter; + for( iter=m_ProgressMap.begin(); iter != m_ProgressMap.end(); ) + { + std::string s = iter->second; + + std::string::size_type loc = s.find( "Completed", 0 ); + if( loc != std::string::npos ) + { + std::map::iterator next = iter; + ++next; + m_ProgressMap.erase( iter ); + iter = next; + } + else + { + res += s + "\n"; + ++iter; + } + } + + if (res.size() > 0) + res.erase(res.size()-1); + return res; +} + +/* + Remove(). + Removes transfer from progressmap. +*/ +void CManager::Remove( CCurlTransfer *_pTransfer ) +{ + g_Log->Info( "Remove()" ); + boost::mutex::scoped_lock locker( m_Lock ); + m_ProgressMap.erase( _pTransfer->Name() ); +} + + +/* + Encode(). + Url encode a string, returns a new string. +*/ +std::string CManager::Encode( const std::string &_src ) +{ + g_Log->Info( "Encode()" ); + + const uint8 dec2hex[ 16 + 1 ] = "0123456789ABCDEF"; + const uint8 *pSrc = (const uint8 *)_src.c_str(); + const size_t srcLen= _src.length(); + uint8 *const pStart = new uint8[ srcLen * 3 ]; + uint8 *pEnd = pStart; + const uint8 * const srcEnd = pSrc + srcLen; + + for( ; pSrc> 4 ]; + *pEnd++ = dec2hex[ *pSrc & 0x0F ]; + } + } + + std::string sResult( (char *)pStart, (char *)pEnd ); + delete [] pStart; + return sResult; +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/Networking/Networking.h electricsheep-3.0.2-git20180325/Networking/Networking.h --- electricsheep-2.7~b12+svn20091224/Networking/Networking.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Networking/Networking.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,195 @@ +#ifndef _NETWORKING_H_ +#define _NETWORKING_H_ + +#include +#include +#include +#include +#include +#include + +#include "base.h" +#include "SmartPtr.h" +#include "Singleton.h" + +#ifdef LINUX_GNU +#undef Status +#endif + +namespace Network +{ + +/* + CCurlTransfer. + Baseclass for curl handled transfers. +*/ +class CCurlTransfer +{ + friend class CManager; + + + // Identifier; + std::string m_Name; + std::string m_Status; + std::string m_AverageSpeed; + long m_HttpCode; + char errorBuffer[ CURL_ERROR_SIZE ]; + + // Map of respons codes allowed. This is checkd on failed perform's. + std::vector< uint32 > m_AllowedResponses; + + protected: + CURL *m_pCurl; + CURLM *m_pCurlM; + + bool Verify( CURLcode _code ); + bool VerifyM( CURLMcode _code ); + void Status( const std::string &_status ) { m_Status = _status; }; + + public: + CCurlTransfer( const std::string &_name ); + virtual ~CCurlTransfer(); + + static int32 customProgressCallback( void *_pUserData, fp8 _downTotal, fp8 _downNow, fp8 _upTotal, fp8 _upNow ); + + virtual bool InterruptiblePerform(); + + virtual bool Perform( const std::string &_url ); + + // Add a response code to the list of allowed ones. + void Allow( const uint32 _code ) { m_AllowedResponses.push_back( _code ); } + + const std::string &Name() const { return m_Name; }; + const std::string &Status() const { return m_Status; }; + long ResponseCode() const { return m_HttpCode; }; + const std::string SpeedString() const { return m_AverageSpeed; }; +}; + +// +class CFileDownloader : public CCurlTransfer +{ + std::string m_Data; + + public: + static int32 customWrite( void *_pBuffer, size_t _size, size_t _nmemb, void *_pUserData ); + + CFileDownloader( const std::string &_name ); + virtual ~CFileDownloader(); + + virtual bool Perform( const std::string &_url ); + bool Save( const std::string &_output ); + + const std::string &Data() { return m_Data; }; +}; + +// +class CFileDownloader_TimeCondition : public CFileDownloader +{ + public: + CFileDownloader_TimeCondition( const std::string &_name ); + virtual ~CFileDownloader_TimeCondition(); + + bool PerformDownloadWithTC( const std::string &_url, const time_t _lastTime ); +}; + +// +class CFileUploader : public CCurlTransfer +{ + public: + CFileUploader( const std::string &_name ); + virtual ~CFileUploader(); + + bool PerformUpload( const std::string &_url, const std::string &_file, const uint32 _filesize ); +}; + +// Def some smart pointers for these. +MakeSmartPointers( CCurlTransfer ); +MakeSmartPointers( CFileDownloader ); +MakeSmartPointers( CFileDownloader_TimeCondition ); +MakeSmartPointers( CFileUploader ); + + +/* + CManager(). + The main manager. +*/ +MakeSmartPointers( CManager ); +class CManager : public Base::CSingleton +{ + friend class Base::CSingleton; + + boost::mutex m_Lock; + + // Private constructor accessible only to CSingleton. + CManager(); + + // No copy constructor or assignment operator. + NO_CLASS_STANDARDS( CManager ); + + // To keep track of progress. + std::map< std::string, std::string> m_ProgressMap; + + // User/password for http authentication. + std::string m_UserPass; + + // Proxy url and corresponding user/pass. + std::string m_ProxyUrl, m_ProxyUserPass; + + bool m_Aborted; + + public: + bool Startup(); + bool Shutdown(); + virtual ~CManager() {m_bSingletonActive = false;}; + + const char *Description() { return "Network manager"; }; + + // Called by CCurlTransfer destructors. + void Remove( CCurlTransfer *_pTransfer ); + + // Session wide proxy settings & user/pass. + void Proxy( const std::string &_url, const std::string &_userName, const std::string &_password ); + void Login( const std::string &_userName, const std::string &_password ); + void Logout(); + + // Called by CCurlTransfer prior to each Perform() call to handle proxy & authentication. + CURLcode Prepare( CURL *_pCurl ); + + // Used by the transfers to update progress. + void UpdateProgress( CCurlTransfer *_pTransfer, const fp8 _percentComplete, const fp8 _bytesTransferred ); + + // Used to abort any curl transfer + + void Abort( void ); + bool IsAborted( void ); + + // Fills in a vector of status strings for all active transfers. + std::string Status(); + + // Urlencode string. + static std::string Encode( const std::string &_src ); + + // Threadsafe. + static CManager *Instance( const char * /*_pFileStr*/, const uint32 /*_line*/, const char * /*_pFunc*/ ) + { + //printf( "g_NetworkManager( %s(%d): %s )\n", _pFileStr, _line, _pFunc ); + //fflush( stdout ); + + static CManager networkManager; + + if( networkManager.SingletonActive() == false ) + { + printf( "Trying to access shutdown singleton %s\n", networkManager.Description() ); + } + + return( &networkManager ); + } +}; + +}; + +// Helper for less typing... +#define g_NetworkManager Network::CManager::Instance( __FILE__, __LINE__, __FUNCTION__ ) + + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/Networking/Upload.cpp electricsheep-3.0.2-git20180325/Networking/Upload.cpp --- electricsheep-2.7~b12+svn20091224/Networking/Upload.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Networking/Upload.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,61 @@ +#include +#include +#include "Log.h" +#include "Networking.h" + +namespace Network +{ + +/* + CFileUploader(). + Constructor. +*/ +CFileUploader::CFileUploader( const std::string &_name ) : CCurlTransfer( _name ) +{ +} + +/* + ~CFileUploader(). + Destructor. +*/ +CFileUploader::~CFileUploader() +{ +} + +/* + Perform(). + Upload specific Perform function. +*/ +bool CFileUploader::PerformUpload( const std::string &_url, const std::string &_file, const uint32 _fileSize ) +{ + // Open input file to transfer. + FILE *pFile = fopen( _file.c_str(), "rb" ); + if( !pFile ) + { + g_Log->Info( "Failed to open %s", _file.c_str() ); + return false; + } + + struct curl_slist *slist = NULL; + slist = curl_slist_append(slist, "Expect:"); + if (slist != NULL) + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_HTTPHEADER, slist) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_INFILE, pFile ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_INFILESIZE, _fileSize ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_READFUNCTION, fread ) ) ) return false; + if( !Verify( curl_easy_setopt( m_pCurl, CURLOPT_UPLOAD, 1 ) ) ) return false; + + bool retval = CCurlTransfer::Perform( _url ); + if (pFile != NULL) + fclose(pFile); + + if (slist != NULL) + { + curl_slist_free_all(slist); + slist = NULL; + } + + return retval; +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/README electricsheep-3.0.2-git20180325/README --- electricsheep-2.7~b12+svn20091224/README 2009-07-06 01:25:33.000000000 +0000 +++ electricsheep-3.0.2-git20180325/README 2018-05-17 14:40:33.000000000 +0000 @@ -1,334 +0,0 @@ -electric sheep - a collaborative screen saver -by Scott Draves and Spotworks LLC -http://electricsheep.org and http://spotworks.com -see the file COPYING for the license covering this software. - - -Electric Sheep uses evolution and mathematics to create animated -abstract art. Everyone running the software participates in creating -what everyone sees via distributed computing and P2P networking. -Primarily, it works as a screensaver to harness idle compute cycles -into a cyborg mind. - -This program is recommended only if you have a high bandwidth -connection to the internet such as DSL or cable modem. - -As usual, to configure, build, and install: - - ./configure - make - sudo make install - -It should install itself as a module in gnome-screensaver. It also -works with xscreensaver. - -Configure it by running "electricsheep-preferences" from the command -line. After that you can test it by just running it from the -commandline without arguments, ie "electricsheep". After several -minutes of downloading a window will appear and the first sheep will -be drawn. - -For KDE, move the file electricsheep.desktop.kde to -/usr/share/kde4/services/ScreenSavers/electricsheep.desktop - ----- - -changelog: - -v2.7b12 print standard deviation of play counts if debugging. add - electricsheep.desktop.kde from javajazz. add play_evenly - preference to reduce playing of most played sheep. fix bug of - rescanning the local cache too often. add "-cache 8192" - options to mplayer because some newer versions require it when - reading stdin (suggested by Alien Bob aka Eric). Fix memory - leaks and remove hacked version of ffmpeg (thanks David - Leverton). Use query.php server redirection. Clean up - warnings. Store and transmit md5 hash of password instead of - cleartext. - -v2.7b11 11/2008 Keep track of how many times each sheep is played, and - delete sheep that are played most often (instead of using - simulation to estimate). Each flam3-animate process should - use only one thread. Change copyright from Draves to - Spotworks LLC. Fix to work with xscreensaver: prevent mplayer - from disabling xscreensaver. Print bad text if there is a - parse error. - -v2.7b10 09/2008 delay fork of mplayer by 300ms to make startup more - reliable (why?!). repeat 2x instead of 3x before breaking a - simple infinite loop. download immediately if there are 2 or - fewer sheep in the cache. to select sheep for deletion, - randomly half the time delete the oldest sheep instead of the - most-played according to simulation. - -v2.7b9 08/2008 change default nickname to empty string to protect user - privacy, instead of broadcasting USER envar. add a button to - the preferences dialog that tests the current network settings - (including if the user/password account is valid). use 20th - percentile instead of median for deletion limit, ie protect - fewer sheep. remove cvs version strings. follow http - redirections vi -L option to curl. enable basic authentication - (the user/password refers to the drupal on the sheep server). - put the client version into the URL for the help page. - -v2.7b8 07/17/2008 fix big bug picking sheep to delete by switching - from ctime to mtime. add new files to extra_dist. - -v2.7b7 07/2008 handle multiple monitors better by using xwininfo - instead of xdpyinfo to read the screen resolution. stagger - render thread start times. - -v2.7b6 06/2008 add version number and button to open web browser on - homepage to the preferences dialog. - -v2.7b5 06/2008 delete the most played sheep, instead of the oldest - sheep. when deleting, don't leave dangling sheep. removed - flam3, flame, mpeg2dec dependencies. include patched ffmpeg - code in source package. first packaged 2.7 version. - -v2.7b3 11/2007 fix hang on sheep deletion. - -v2.7b2 11/2007 use marker files to update cache sooner. global - generation no longer part of state. configure - gnome-screensaver during install using gconftool-2. start with - least recently accessed sheep instead of a random one. add - ffmpeg.patch to plug memory leak. ditch the .sheep/id file. - move to .electricsheep/* and preferences.xml and - electricsheep-preferences (a glade UI to the xml prefs). play - electricshep-wait.avi until first sheep arrives. settle on - mplayer. remove zoom option since mplayer always does - it. note: password is not secure. remove history from ui. - -v2.7b1 10/2007 new multi monitor patch from John Gibson (1640631 on - sf.net by John Gibson). fix video_out_x11.c:146 assumes cache - dir is .sheep. get tryagain parms from server. exit on - generation change to prevent mixing incompatible mpeg formats. - on file read error, rescan cache directory. allow unsetting - password. install panel in location where xscreensaver 5.0 can - find it, support --password and authenticated server, split - frame into time and job, move up to flam3 v2.7. upgrade to - mpeg4 wrapped in avi by using ffmpeg and mplayer. ditch - mpeg2dec_onroot. unbundle flam3. pick next sheep based on - least recently accessed instead of searching the history. - install binary where gnome can find it. - -v2.6.8 7/2006 use new libpng api, handle libpng errors properly (from - nix at esperi.org.uk). name the window. update - documentation. update use of AC_OUTPUT. handle readonly - parts of the cache. avoid playing files partially downloaded - by bittorrent. add --show-errors option. - -v2.6.7 4/2006 save sheep in the proper directory instead of ~ (from - tais.hansen at osd.dk). remove max_anims (more storage cleanup). - -v2.6.6 4/2006 remove nplays_by_id and its associated stats. make - anim_t arrays dynamically allocated (some kernels had - trouble with the 800M of static storage. ooops). when - changing generations only delete sheep from the generation we - are leaving. this allows users to keep archives of sheep in - their caches without fear of deletion. version to 2.6.6 - -v2.6.5 3/2006 support recursively searching cache directory to be - compatible with subscribers to the feed of torrents. - -v2.6.4 12/2005 protect again buffer overflows. remove use of tif and xsetbg. - -v2.6.3 7/2005 autogenerate electricsheep.spec and electricsheep.xml with - current version number. zoom down to fit in the xscreensaver - preview window. better logging. fix bug where special env - args to flam3-animate were not necessarily null-terminated! - update to latest flam3 library. make gcc4 happy & update - autotools. update man page. man page generated by configure. - fix bug where all sheep could be deleted because of network - errors! - -v2.6.2 6/2005 generate uniqueid in client and save in in .sheep/rc - instead of at install time in /usr/share/local... add - init_delay_list to be even nicer to servers. fix the RPM. - -v2.6.1 5/2005 update flam3. add init_delay and list_freshness to - avoid too many server accesses. - -v2.6 5/2005 replace voting icons. 2.6 final. - -v2.6b7 5/2005 pickup flam3 fixes, by default 1 render thread, default - is now 1000 megabyte cache. - -v2.6b4 4/2005 do not complain about partial downloads. use more - modern nice syntax. configuration improvements from nix at - esperi dot org dot uk. update flam3 module. - -v2.6b3 3/2005 voting now works much better: include a modified version - xscreensaver that passes keypresses onto the graphics hack. - and spawn a separate process to watch for up/down arrow on - the root window. and the mpeg decoder composites votes - over the video. use new flam3 tools. add bracket begin/end - options to limit display to sheep within a range of dates - or ID numbers. history is now 300. max_anims now 100000. - add logfile option. a default value for --max-megabytes is - stored in the .sheep directory. sheep are now stored with - the generation number in the filename. instead of - hardwired bits=32 and jpeg=90, specially parse these out of - the genome. - -v2.4 7/31/03 make history length a parameter and set the default to - 30 (it was 3). change splash screen to include a "wait - for download" message. -window-id disables --zoom 1, - this avoids a warning from xscreensaver-demo. - -v2.4b7 7/16/03 minor bug in flame interpolation. - -v2.4b6 7/10/03 major bug fixes in flame algorithm. change - --maxrepeats option to --max-repeats. - -v2.4b5 6/21/03 C1 continuous interpolation and symmetries in the flame - module, fullscreen zooming from Dan Nelson. - -v2.4b3 5/27/03 change server to sheepserver.net - -v2.4b2 5/7/03 fix the shared memory leak in mpeg2dec from Dan Nelson - (according to the comment it breaks solaris - compatibility). install xml configuration for redhat - 9 and redhat 8. make the default sheep cache be 100 - megabytes in the executable and in the xscreensaver - xml configuration file. add maxrepeats. - -v2.4b1 4/12/03 support mplayer directly. patches that fix bugs and - FreeBSD compatibility issues from Dan Nelson: memory - allocation bug where filenames were stored on the - stack after they left scope. more error information - from curl. off_t may not be an integer. use - setproctitle if supported. use statvfs as needed, and - call setpgrp with 0 or 2 arguments as appropriate. - include ctype.h. - -v2.3 2/23/03 done with beta! change the server back to 2.3 from - 2.3b. - -v2.3b12 2/10/03 remove the splash-prefix argument. increase the - default timeout. add the min-megabytes option. - remove the trailing slash splash_prefix (now it comes - from where it is used). if you give 0 to the - max-megabytes option then there is no maximum (except - as imposed by min-megabytes). there were also changes - to the flame module. - -v2.3b11 1/16/03 fix bug reported by Olin Shivers where even with - "--root 0" it was drawing the splash/logo on the root. - anim-flame now supports jpg directly so don't call - cjpeg. don't report the cache contents unless the - debug level is 2 or higher. - -v2.3b10 1/5/03 apply patch from Tal Kelrich that makes the voting - interface optional at runtime instead of compile time, - and adds an option to preserve the background - (--anim-only), and fixes a bug resulting in spinning - when trying to delete files from the local cache. - -v2.3b9 12/27/02 download older animations first (instead of newer). - fix problem of cache churn when client cache was - smaller than server cache. the symptom was the client - would delete and redownload sheep endlessly. the cure - is to remember the sheep that have been deleted from - the client until they are also deleted from the - server. the method is to use a zero-length file - blah.xxx to remember that blah.mpg has been deleted. - some of the code was 2-space indented. reformat back - to 4 spaces. - -v2.3b8 12/22/02 change domain name back to electricsheep.org! - in the flame module: handle numbers of samples that - overflow 32 bits. better error detection and - reporting. removed hard limits. renamed hqi.c to - hqi-flame.c and added it to the makefile so it is - built & installed (though not used by electric sheep). - -v2.3b7 12/18/02 change domain name to just electric-sheep.org. - update my email address everywhere. - -v2.3b6 12/16/02 patch from Dan Nelson fixing lack of null-termination - of string from server in anim-flame.c - -v2.3b5 12/16/02 p.k. dick's birthday is today! fix formatting of - source to fit in 80 columns. improve error reporting - when disconnected from the server. - -v2.3b4 12/15/02 report text messages from the server specified by the - element. and deal with . and an - empty tag means there are no sheep to render. - -v2.3b3 12/13/02 applied patch from Dan Nelson to improve how the - number of CPUs is calculated. put into CVS (added $Id - strings). smarter encoding of nick and url (don't - escape everything). add URL option to graphical - config. put flame subdirectory under autoconf and - automake. added flam3.com as alternate server. check - for presence of expat in configure. - -v2.3b2 12/9/02 redid how frame rate was maintained in mpeg2dec, and - added a lock so that multiple executables do not - conflict (thanks to Jonathan Morton for pointing out - these problems). removed unused directories from - mpeg2dec tree. - -v2.3b1 12/5/02 substantial release after too many moons. replaced - mpegplay with mpeg2dec, ie play mpeg2 instead of mpeg1. - protocol is now compressed xml instead of ad hoc - crud. updated to work with redhat 8, that is, with - xscreensaver-demo and its xml config file. many small - changes. - -v2.1 7/3/01 vibrant colors, hue rotation, background color added. bug - fixed by Matt Reda : the wrong file was - getting deleted when it tried to reduce cache size! - added reset fuse, statistics reporting, proxy - argument. patch from rockear@hive-mind.net for powerpc. - handle network disconnection and bad anim files gracefully. - -v2.0 5/16/01 the big change from the 0.x to 2.x series is the - introduction of connectivity and transitions, so the - animation is always smoothly changing, there are no cuts - (unless it gets stuck and it has to). also: multiple - rendering threads, a separate download thread, voting - (via xscreensaver or just a named pipe), support for - rendering single hirez frames of many tiles instead of - animations of many frames, theoretical support for - rendering modules other than anim. - -v1.10 not released. - -v1.9 reconstituted, private pre2.0 release. - -v0.5 (not released) removed empty AC_CONFIG_SUBDIRS from configure.in - and added return 0 to anim.c (bugfixes from Martin Pool). - added net-present and parasite options, various - bulletproofing. - -v0.4 7/31/00 create ~/.sheep directory if needed (bug report by jai - young kim). i'm not bumping the version number since 0.4 - hasn't been distributed yet. - -v0.4 6/29/00 by default now save the mpeg files in ~/.sheep/ (it keeps - the last 50 megabytes), and switch between them instead - of cycling the same one. mpeg-play now exits more - gracefully when it is unable to read the input file, - preventing evil xscreensaver crashes i hope. minor - cleanup. - -v0.3 12/24/99 removed curl from distribution (since no longer - distributing libc5). bugfix to anim.c from Steinar - H. Gunderson and Evan Martin. made more robust in face - of network failures (thanks to Will Luo for pointing out - this problem). automatically installs gnome screensaver - control panel files. - -v0.2.1 10/17/99 splash page error no longer fatal. added dependencies - for xloadimage and xscreensaver to rpm spec. should - take curl out & use a dependency, but it's too painful - with libc5/6. - -v0.2 10/16/99 adopt curl, separate client & server, adopt automake & - autoconf, gamma is now 1 on the client side, misc - features & bugs. - -v0.1 10/2/99 first version. private beta release. diff -Nru electricsheep-2.7~b12+svn20091224/readme.txt electricsheep-3.0.2-git20180325/readme.txt --- electricsheep-2.7~b12+svn20091224/readme.txt 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/readme.txt 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,10 @@ +Copyright Spotworks LLC +GPL2 Licensed see https://github.com/scottdraves/electricsheep/blob/master/client_generic/COPYING + +2015.05 moved from code.google.com repo +2011.01.30 based on revision 1546 on sf.net + +The Electric Sheep is a cyborg mind. It harnesses the collective intelligence of 450,000 computers and people to create abstract art with mathematics and Darwinian evolution. The result is seamless, organic, and infinite. See also http://electricsheep.org and http://scottdraves.com. + +The rendering engine is a separate project at https://github.com/scottdraves/flam3 + diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/config.xrc electricsheep-3.0.2-git20180325/Runtime/config.xrc --- electricsheep-2.7~b12+svn20091224/Runtime/config.xrc 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/config.xrc 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,585 @@ + + + + + 400,-1 + Configuration + + wxVERTICAL + + + wxEXPAND + 5 + + wxHORIZONTAL + + + wxALL + 5 + + logo.png + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + 20 + default + + bold + 0 + Nice + + + + + + + wxALL + 5 + + + default + + normal + 0 + + + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 1 + + + default + + normal + 0 + + Start the client in standalone mode + + 0 + + + + + wxALL + 1 + + Launch the online help + + 0 + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_TOP|wxALL + 5 + + wxVERTICAL + + + wxALL + 5 + + + + 1 + + + Basic client settings + + wxVERTICAL + + + wxEXPAND + 5 + + wxVERTICAL + + + + wxALIGN_RIGHT + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxFIXED_MINSIZE + 5 + + + 256,-1 + Your Drupal login name + + 256 + + + + + + + wxALIGN_RIGHT + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxFIXED_MINSIZE + 5 + + + 256,-1 + Your Drupal login password + + 256 + + + + + + + wxALIGN_LEFT|wxSHAPED + 5 + + wxHORIZONTAL + + + wxALIGN_CENTER|wxALL + 5 + + Test the connection to verify that authentication worked + + 0 + + + + + wxALIGN_CENTER|wxALL + 5 + + + + default + + normal + 0 + + Authentication status + + + + + + + + + + wxEXPAND + 5 + + wxVERTICAL + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxSHAPED + 3 + + + 64,-1 + Maximum amount of storage allowed by the sheep on your harddrive + 2000 + 5 + + + + + wxALL + 5 + + + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxSHAPED + 3 + + + 32,-1 + The rate at which sheep are decoded + 23 + 2 + + + + + wxALL + 5 + + + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxSHAPED + 3 + + + The number of times a loop will repeat itself before continuing + 2 + 0 + 100 + + + + + wxALL + 5 + + + + + + + + + + + + + + 0 + + + Advanced client settings + + wxVERTICAL + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + wxALIGN_RIGHT + 5 + + wxHORIZONTAL + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + + wxALL + 5 + + + All monitors will be black except this one.\n0 is the primary monitor, and the rest are subject to \nyour current display configuration.\nIf you have one additional display, such as a secondary monitor or a projector, that will be 1.\nIf you only have one monitor enabled, this setting is redundant. + 0 + 0 + 3 + + + + + + + wxALIGN_RIGHT + 3 + + wxHORIZONTAL + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + + wxALL + 5 + + + 32,-1 + This is only used by the linear _ cubic display modes. Normal more will display at the same rate as the video is decoded(see the Basic tab). + 60 + 3 + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 5 + + wxHORIZONTAL + + + wxALL|wxEXPAND + 5 + + + 'Normal' displays decoded video at the same rate it's decoded.\n'Piecewise Linear' mode will interpolate between two decoded videoframes at the display framerate,\nand 'Piecewise Cubic' will interpolate over four decoded videoframes \nusing a Mitchell-Natravali reconstruction curve, \nand will provide the best experience, especially if the video decoding rate is set low. \nBoth Linear _ Cubic modes use pixelshaders, so you need a decent GPU for this. + + 1 + + Normal + Piecewise Linear + Piecewise Cubic + + 1 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + Enables/Disables the downloading of new sheep from the server via the HTTP protocol + + 1 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + Enables/Disables your computer to contribute to the flock by rendering new frames + + 1 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + Use all the processor cores available in your computer to render sheep frames.\nNote that this will take quite a bit of cpu, and the display may not be able to update at full framerate! + + 0 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALIGN_RIGHT|wxALL + 5 + + + Stores the rendered frames on your harddrive + + 1 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + If you press the down arrow key, then delete the currently displayed sheep in addition to notifying the server not to make more sheep like it + + 1 + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 5 + + wxHORIZONTAL + + + + wxALL + 5 + + + Select a folder + + + + + + wxALL + 5 + + Opens the content directory in an external exporer window + + 0 + + + + + + + + + + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxALL + 5 + + wxHORIZONTAL + + + wxALIGN_CENTER_HORIZONTAL|wxALL + 5 + + Discard all changes and exit + + 0 + + + + + wxALL + 5 + + Confirm all changes and exit + + 1 + + + + + + + Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/Runtime/electricsheep-attr.png and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/Runtime/electricsheep-attr.png differ Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/Runtime/electricsheep-frown.png and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/Runtime/electricsheep-frown.png differ Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/Runtime/electricsheep-smile.png and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/Runtime/electricsheep-smile.png differ Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/Runtime/flam3-animate and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/Runtime/flam3-animate differ diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Instructions.rtf electricsheep-3.0.2-git20180325/Runtime/Instructions.rtf --- electricsheep-2.7~b12+svn20091224/Runtime/Instructions.rtf 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Instructions.rtf 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,68 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 +{\fonttbl\f0\fswiss\fcharset0 ArialMT;} +{\colortbl;\red255\green255\blue255;} +\vieww12000\viewh15520\viewkind0 +\deftab720 +\pard\pardeftab720\ql\qnatural + +\f0\fs20 \cf0 Electric Sheep (http://electricsheep.org) is a distributed\ +screensaver, which means that everyone who runs the screensaver also\ +participates in its creation. While the screensaver is running, your\ +computer will contact the server (sheepserver.net and others)\ +to download AVI animations with HTTP.\ +\ +Until it downloads its first animation, the screensaver displays just\ +a black screen and a logo. This takes several minutes, and depending\ +on network conditions and server load, perhaps much longer.\ +\ +The downloaded AVIs are kept on your hard disk, by default taking up\ +to 2GB. The disk cache's size and location as well as other\ +parameters and options can be adjusted from the Windows screensaver\ +control panel by clicking "Settings" and on the Mac screensaver\ +System Preferences by clicking "Options".\ +\ +While you are watching the screensaver, you may vote for or against\ +sheep by pushing the up or down arrow key. These votes are transmitted\ +to the server and used to drive the evolution of the flock: sheep that\ +receive more votes live longer and reproduce with each other, and\ +creating offspring with a family resemblance.\ +\ +If you are interested you can have more direct influence over the\ +sheep by downloading additional software to design your own sheep and\ +posting them into the gene pool. They will then be rendered by the\ +network and eventually appear on screens all over the world. If they\ +prove popular, they will interbreed with the rest of the population,\ +and variations on them will appear too.\ +\ +The Electric Sheep are distributed under a Creative Commons\ +license, which means you can reuse and remix them under\ +certain terms. The rules are on the web at:\ +http://community.electricsheep.org/reuse.\ + \ +The sheep (as the AVI animations are called) are drawn algorithmically\ +and are extremely processor-intensive. Because it would take a single\ +computer a day to render one second of the animation on its own, the\ +sheep that you get have been rendered by users of the screensaver all\ +over the world working together as a virtual supercomputer.\ +\ +Your computer too will participate in this rendering effort, but only\ +while the screensaver is running. So not only will your computer\ +download sheep to play for your enjoyment, but it will also download\ +genomes, render them into JPEG/PNG frames, and upload the results to\ +the server. No other information is sent to the server: the Electric\ +Sheep respect your privacy.\ +\ +The founder of the Electric Sheep Project, Scott Draves, is a\ +contemporary software artist who sells limited edition fine art, some\ +of which is rendered by the network. His company, Spotworks LLC,\ +develops the Electric Sheep and provides access to the server free of\ +charge, as well as carrying out commercial activities to offset our\ +costs. Therefore some jobs rendered by the network may be for images\ +or animations which are not sheep at all, and will not appear in the\ +screen-saver.\ +\ +If you would like to support the Electric Sheep by purchasing art\ +based on the sheep genomes, please visit http://www.scottdraves.com\ +\ +Thanks for your participation!\ +} \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/License.rtf electricsheep-3.0.2-git20180325/Runtime/License.rtf --- electricsheep-2.7~b12+svn20091224/Runtime/License.rtf 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/License.rtf 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,342 @@ +{\rtf1\ansi\ansicpg1252\deff0\deflang1053{\fonttbl{\f0\fswiss\fcharset0 Arial;}} +{\*\generator Msftedit 5.41.21.2508;}\viewkind4\uc1\pard\f0\fs20\tab\tab GNU GENERAL PUBLIC LICENSE\par +\tab\tab Version 2, June 1991\par +\par + Copyright (C) 1989, 1991 Free Software Foundation, Inc.,\par + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\par + Everyone is permitted to copy and distribute verbatim copies\par + of this license document, but changing it is not allowed.\par +\par +\tab\tab\tab Preamble\par +\par + The licenses for most software are designed to take away your\par +freedom to share and change it. By contrast, the GNU General Public\par +License is intended to guarantee your freedom to share and change free\par +software--to make sure the software is free for all its users. This\par +General Public License applies to most of the Free Software\par +Foundation's software and to any other program whose authors commit to\par +using it. (Some other Free Software Foundation software is covered by\par +the GNU Lesser General Public License instead.) You can apply it to\par +your programs, too.\par +\par + When we speak of free software, we are referring to freedom, not\par +price. Our General Public Licenses are designed to make sure that you\par +have the freedom to distribute copies of free software (and charge for\par +this service if you wish), that you receive source code or can get it\par +if you want it, that you can change the software or use pieces of it\par +in new free programs; and that you know you can do these things.\par +\par + To protect your rights, we need to make restrictions that forbid\par +anyone to deny you these rights or to ask you to surrender the rights.\par +These restrictions translate to certain responsibilities for you if you\par +distribute copies of the software, or if you modify it.\par +\par + For example, if you distribute copies of such a program, whether\par +gratis or for a fee, you must give the recipients all the rights that\par +you have. You must make sure that they, too, receive or can get the\par +source code. And you must show them these terms so they know their\par +rights.\par +\par + We protect your rights with two steps: (1) copyright the software, and\par +(2) offer you this license which gives you legal permission to copy,\par +distribute and/or modify the software.\par +\par + Also, for each author's protection and ours, we want to make certain\par +that everyone understands that there is no warranty for this free\par +software. If the software is modified by someone else and passed on, we\par +want its recipients to know that what they have is not the original, so\par +that any problems introduced by others will not reflect on the original\par +authors' reputations.\par +\par + Finally, any free program is threatened constantly by software\par +patents. We wish to avoid the danger that redistributors of a free\par +program will individually obtain patent licenses, in effect making the\par +program proprietary. To prevent this, we have made it clear that any\par +patent must be licensed for everyone's free use or not licensed at all.\par +\par + The precise terms and conditions for copying, distribution and\par +modification follow.\par +\par +\tab\tab GNU GENERAL PUBLIC LICENSE\par + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\par +\par + 0. This License applies to any program or other work which contains\par +a notice placed by the copyright holder saying it may be distributed\par +under the terms of this General Public License. The "Program", below,\par +refers to any such program or work, and a "work based on the Program"\par +means either the Program or any derivative work under copyright law:\par +that is to say, a work containing the Program or a portion of it,\par +either verbatim or with modifications and/or translated into another\par +language. (Hereinafter, translation is included without limitation in\par +the term "modification".) Each licensee is addressed as "you".\par +\par +Activities other than copying, distribution and modification are not\par +covered by this License; they are outside its scope. The act of\par +running the Program is not restricted, and the output from the Program\par +is covered only if its contents constitute a work based on the\par +Program (independent of having been made by running the Program).\par +Whether that is true depends on what the Program does.\par +\par + 1. You may copy and distribute verbatim copies of the Program's\par +source code as you receive it, in any medium, provided that you\par +conspicuously and appropriately publish on each copy an appropriate\par +copyright notice and disclaimer of warranty; keep intact all the\par +notices that refer to this License and to the absence of any warranty;\par +and give any other recipients of the Program a copy of this License\par +along with the Program.\par +\par +You may charge a fee for the physical act of transferring a copy, and\par +you may at your option offer warranty protection in exchange for a fee.\par +\par + 2. You may modify your copy or copies of the Program or any portion\par +of it, thus forming a work based on the Program, and copy and\par +distribute such modifications or work under the terms of Section 1\par +above, provided that you also meet all of these conditions:\par +\par + a) You must cause the modified files to carry prominent notices\par + stating that you changed the files and the date of any change.\par +\par + b) You must cause any work that you distribute or publish, that in\par + whole or in part contains or is derived from the Program or any\par + part thereof, to be licensed as a whole at no charge to all third\par + parties under the terms of this License.\par +\par + c) If the modified program normally reads commands interactively\par + when run, you must cause it, when started running for such\par + interactive use in the most ordinary way, to print or display an\par + announcement including an appropriate copyright notice and a\par + notice that there is no warranty (or else, saying that you provide\par + a warranty) and that users may redistribute the program under\par + these conditions, and telling the user how to view a copy of this\par + License. (Exception: if the Program itself is interactive but\par + does not normally print such an announcement, your work based on\par + the Program is not required to print an announcement.)\par +\par +These requirements apply to the modified work as a whole. If\par +identifiable sections of that work are not derived from the Program,\par +and can be reasonably considered independent and separate works in\par +themselves, then this License, and its terms, do not apply to those\par +sections when you distribute them as separate works. But when you\par +distribute the same sections as part of a whole which is a work based\par +on the Program, the distribution of the whole must be on the terms of\par +this License, whose permissions for other licensees extend to the\par +entire whole, and thus to each and every part regardless of who wrote it.\par +\par +Thus, it is not the intent of this section to claim rights or contest\par +your rights to work written entirely by you; rather, the intent is to\par +exercise the right to control the distribution of derivative or\par +collective works based on the Program.\par +\par +In addition, mere aggregation of another work not based on the Program\par +with the Program (or with a work based on the Program) on a volume of\par +a storage or distribution medium does not bring the other work under\par +the scope of this License.\par +\par + 3. You may copy and distribute the Program (or a work based on it,\par +under Section 2) in object code or executable form under the terms of\par +Sections 1 and 2 above provided that you also do one of the following:\par +\par + a) Accompany it with the complete corresponding machine-readable\par + source code, which must be distributed under the terms of Sections\par + 1 and 2 above on a medium customarily used for software interchange; or,\par +\par + b) Accompany it with a written offer, valid for at least three\par + years, to give any third party, for a charge no more than your\par + cost of physically performing source distribution, a complete\par + machine-readable copy of the corresponding source code, to be\par + distributed under the terms of Sections 1 and 2 above on a medium\par + customarily used for software interchange; or,\par +\par + c) Accompany it with the information you received as to the offer\par + to distribute corresponding source code. (This alternative is\par + allowed only for noncommercial distribution and only if you\par + received the program in object code or executable form with such\par + an offer, in accord with Subsection b above.)\par +\par +The source code for a work means the preferred form of the work for\par +making modifications to it. For an executable work, complete source\par +code means all the source code for all modules it contains, plus any\par +associated interface definition files, plus the scripts used to\par +control compilation and installation of the executable. However, as a\par +special exception, the source code distributed need not include\par +anything that is normally distributed (in either source or binary\par +form) with the major components (compiler, kernel, and so on) of the\par +operating system on which the executable runs, unless that component\par +itself accompanies the executable.\par +\par +If distribution of executable or object code is made by offering\par +access to copy from a designated place, then offering equivalent\par +access to copy the source code from the same place counts as\par +distribution of the source code, even though third parties are not\par +compelled to copy the source along with the object code.\par +\par + 4. You may not copy, modify, sublicense, or distribute the Program\par +except as expressly provided under this License. Any attempt\par +otherwise to copy, modify, sublicense or distribute the Program is\par +void, and will automatically terminate your rights under this License.\par +However, parties who have received copies, or rights, from you under\par +this License will not have their licenses terminated so long as such\par +parties remain in full compliance.\par +\par + 5. You are not required to accept this License, since you have not\par +signed it. However, nothing else grants you permission to modify or\par +distribute the Program or its derivative works. These actions are\par +prohibited by law if you do not accept this License. Therefore, by\par +modifying or distributing the Program (or any work based on the\par +Program), you indicate your acceptance of this License to do so, and\par +all its terms and conditions for copying, distributing or modifying\par +the Program or works based on it.\par +\par + 6. Each time you redistribute the Program (or any work based on the\par +Program), the recipient automatically receives a license from the\par +original licensor to copy, distribute or modify the Program subject to\par +these terms and conditions. You may not impose any further\par +restrictions on the recipients' exercise of the rights granted herein.\par +You are not responsible for enforcing compliance by third parties to\par +this License.\par +\par + 7. If, as a consequence of a court judgment or allegation of patent\par +infringement or for any other reason (not limited to patent issues),\par +conditions are imposed on you (whether by court order, agreement or\par +otherwise) that contradict the conditions of this License, they do not\par +excuse you from the conditions of this License. If you cannot\par +distribute so as to satisfy simultaneously your obligations under this\par +License and any other pertinent obligations, then as a consequence you\par +may not distribute the Program at all. For example, if a patent\par +license would not permit royalty-free redistribution of the Program by\par +all those who receive copies directly or indirectly through you, then\par +the only way you could satisfy both it and this License would be to\par +refrain entirely from distribution of the Program.\par +\par +If any portion of this section is held invalid or unenforceable under\par +any particular circumstance, the balance of the section is intended to\par +apply and the section as a whole is intended to apply in other\par +circumstances.\par +\par +It is not the purpose of this section to induce you to infringe any\par +patents or other property right claims or to contest validity of any\par +such claims; this section has the sole purpose of protecting the\par +integrity of the free software distribution system, which is\par +implemented by public license practices. Many people have made\par +generous contributions to the wide range of software distributed\par +through that system in reliance on consistent application of that\par +system; it is up to the author/donor to decide if he or she is willing\par +to distribute software through any other system and a licensee cannot\par +impose that choice.\par +\par +This section is intended to make thoroughly clear what is believed to\par +be a consequence of the rest of this License.\par +\par + 8. If the distribution and/or use of the Program is restricted in\par +certain countries either by patents or by copyrighted interfaces, the\par +original copyright holder who places the Program under this License\par +may add an explicit geographical distribution limitation excluding\par +those countries, so that distribution is permitted only in or among\par +countries not thus excluded. In such case, this License incorporates\par +the limitation as if written in the body of this License.\par +\par + 9. The Free Software Foundation may publish revised and/or new versions\par +of the General Public License from time to time. Such new versions will\par +be similar in spirit to the present version, but may differ in detail to\par +address new problems or concerns.\par +\par +Each version is given a distinguishing version number. If the Program\par +specifies a version number of this License which applies to it and "any\par +later version", you have the option of following the terms and conditions\par +either of that version or of any later version published by the Free\par +Software Foundation. If the Program does not specify a version number of\par +this License, you may choose any version ever published by the Free Software\par +Foundation.\par +\par + 10. If you wish to incorporate parts of the Program into other free\par +programs whose distribution conditions are different, write to the author\par +to ask for permission. For software which is copyrighted by the Free\par +Software Foundation, write to the Free Software Foundation; we sometimes\par +make exceptions for this. Our decision will be guided by the two goals\par +of preserving the free status of all derivatives of our free software and\par +of promoting the sharing and reuse of software generally.\par +\par +\tab\tab\tab NO WARRANTY\par +\par + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\par +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\par +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\par +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED\par +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\par +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS\par +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE\par +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,\par +REPAIR OR CORRECTION.\par +\par + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\par +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\par +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,\par +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING\par +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED\par +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY\par +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER\par +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE\par +POSSIBILITY OF SUCH DAMAGES.\par +\par +\tab\tab END OF TERMS AND CONDITIONS\par +\par +\tab How to Apply These Terms to Your New Programs\par +\par + If you develop a new program, and you want it to be of the greatest\par +possible use to the public, the best way to achieve this is to make it\par +free software which everyone can redistribute and change under these terms.\par +\par + To do so, attach the following notices to the program. It is safest\par +to attach them to the start of each source file to most effectively\par +convey the exclusion of warranty; and each file should have at least\par +the "copyright" line and a pointer to where the full notice is found.\par +\par + \par + Copyright (C) \par +\par + This program is free software; you can redistribute it and/or modify\par + it under the terms of the GNU General Public License as published by\par + the Free Software Foundation; either version 2 of the License, or\par + (at your option) any later version.\par +\par + This program is distributed in the hope that it will be useful,\par + but WITHOUT ANY WARRANTY; without even the implied warranty of\par + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\par + GNU General Public License for more details.\par +\par + You should have received a copy of the GNU General Public License along\par + with this program; if not, write to the Free Software Foundation, Inc.,\par + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\par +\par +Also add information on how to contact you by electronic and paper mail.\par +\par +If the program is interactive, make it output a short notice like this\par +when it starts in an interactive mode:\par +\par + Gnomovision version 69, Copyright (C) year name of author\par + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\par + This is free software, and you are welcome to redistribute it\par + under certain conditions; type `show c' for details.\par +\par +The hypothetical commands `show w' and `show c' should show the appropriate\par +parts of the General Public License. Of course, the commands you use may\par +be called something other than `show w' and `show c'; they could even be\par +mouse-clicks or menu items--whatever suits your program.\par +\par +You should also get your employer (if you work as a programmer) or your\par +school, if any, to sign a "copyright disclaimer" for the program, if\par +necessary. Here is a sample; alter the names:\par +\par + Yoyodyne, Inc., hereby disclaims all copyright interest in the program\par + `Gnomovision' (which makes passes at compilers) written by James Hacker.\par +\par + , 1 April 1989\par + Ty Coon, President of Vice\par +\par +This General Public License does not permit incorporating your program into\par +proprietary programs. If your program is a subroutine library, you may\par +consider it more useful to permit linking proprietary applications with the\par +library. If this is what you want to do, use the GNU Lesser General\par +Public License instead of this License.\par +} + \ No newline at end of file Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/Runtime/logo.png and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/Runtime/logo.png differ Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/Runtime/pthreadGC2.dll and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/Runtime/pthreadGC2.dll differ diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/class.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/class.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/class.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/class.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,31 @@ +module( ..., package.seeall ) + +-- +function create( _members ) + + members = _members or {} + + local mt = { + __metatable = members; + __index = members; + } + + local function new( _, _init ) + return setmetatable( _init or {}, mt ) + end + + local function copy( _obj, ... ) + local newobj = _obj:new( unpack( arg ) ) + + for n,v in pairs( _obj ) do + newobj[n] = v + end + + return newobj + end + + members.new = members.new or new + members.copy = members.copy or copy + + return mt +end diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/curltest.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/curltest.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/curltest.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/curltest.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,88 @@ +require "table" +require "os" +require "io" +require "math" +require "string" + +require "serialize" +require "luaXML" +require "luacurl" +require "luazlib" + + +function newCurl() + + local c = curl.new() + + -- Set all password etc stuff here + + --c:setopt( curl.OPT_PROXY, "yadda.org:1234" ) + + return c +end + + + +-- Download compressed file, return data. +function DownloadCompressed( _url ) + + print( "Downloading " .. _url .. "\n" ) + + local c = newCurl() + + c:setopt( curl.OPT_WRITEFUNCTION, function ( stream, buffer ) + print( tostring(stream) ) + --if stream:write( buffer ) then + --return string.len( buffer ) + --end + end ); + + local instream = "->" --io.open( "data.gzip", "wb" ) + + c:setopt( curl.OPT_WRITEDATA, instream ) + + c:setopt( curl.OPT_NOPROGRESS, false ) + c:setopt( curl.OPT_PROGRESSFUNCTION, function ( _, dltotal, dlnow, uptotal, upnow ) + print( dltotal, dlnow, uptotal, upnow ) + end ) + + c:setopt( curl.OPT_HTTPHEADER, "Connection: Keep-Alive", "Accept-Language: en-us" ) + c:setopt( curl.OPT_URL, _url ) + c:setopt( curl.OPT_CONNECTTIMEOUT, 15 ) + + c:perform() + c:close() + + --instream:close() + + local f = assert( io.open( "data.gzip", "rb" ) ) + local data = f:read( "*a" ) + f:close() + + local out = assert(io.open( "temp.gzip", "wb" ) ) + out:write( data ) + out:close() + + + local res, l = zlib.gzuncompress( data ) + if not res then print( l ) end + + print( "uncompressed size: " .. tostring(l) .. "\n" ) + + -- Return uncompressed data. + return res +end + + +local serverName = "v2d7c.sheepserver.net" +local CLIENT_VERSION = "WIN_2.7b11" +local clientID = g_GenerateID() + + +local xmldata = DownloadCompressed( "http://" .. serverName .. "/cgi/list?v=".. CLIENT_VERSION .."&u=" .. clientID ) + +-- Convert xml to regular lua table... +local xmltable = luaXML.parseData( xmldata ) + + +table.save( xmltable, "test.lua" ) diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/desc.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/desc.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/desc.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/desc.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,30 @@ +module( ... ) +vars = { + +-- player +--fullscreen = { type="bool" }, +LoopIterations = { type="int", min=0, max=8 }, +PieceWiseLinear = { type="bool" }, +player_fps = { type="int", min=5, max=60 }, +BufferLength = { type="int", min=1, max=200 }, + +-- content +server = { type="string" }, +sheepdir = { type="string" }, +download_mode = { type="bool" }, +--use_bittorrent = { type="bool" }, +registered = { type="bool" }, +password = { type="pass" }, +use_proxy = { type="bool" }, +proxy = { type="string" }, +proxy_username = { type="string" }, +proxy_password = { type="pass" }, + +-- generator +demo_mode = { type="bool" }, +all_cores = { type="bool" }, +save_frames = { type="bool" }, +nickname = { type="string" }, +user_url = { type="string" }, + +} diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/Dictionary/Deutsch.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/Dictionary/Deutsch.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/Dictionary/Deutsch.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/Dictionary/Deutsch.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,4 @@ +module( ... ) +messages = { +} + diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/Dictionary/English.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/Dictionary/English.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/Dictionary/English.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/Dictionary/English.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,63 @@ +module( ... ) +messages = { + +-- +help = "Help", +apply = "Apply", +cancel = "Cancel", + +-- Notify to restart. +restartLanguage = "Please reopen screensaver configuration to change language to ''${Language}''", + +-- About tab. +aboutTab = "About", + +-- Player tab. +playerTab = "Display", +playerDesc = "These settings affect the visual presentation of the sheep on screen", +fullscreen = "Fullscreen display (no need to change this except for debugging purposes)", +LoopIterations = "The number of times to display a looping sheep", +PieceWiseLinear = "Piecewise linear display. Produces smoother playback by interpolating across frames.", +player_fps = "The number of times per second at which to decode a fresh frame from the sheep.\nLower this value if your machine isn't fast enough to keep up", +BufferLength = "How many complete frames to buffer in advance.\nLower this value if ram is an issue.", + + +-- Content tab. +contentTab = "Server", +contentDesc = "These settings define how to communicate with the sheep server", +server = "The sheep server", +sheepdir = "Location of your sheep cache", +cache_size = "The amount of disk space the sheep may consume", +download_mode = "Enables the downloading of new sheep", +use_bittorrent = "Use BitTorrent peer-to-peer downloading (disabled in beta)", +registered = "Are you a registered user?", +password = "Your password", +unique_id = "Your unique client ID", +use_proxy = "Use a proxy server?", +proxy = "Proxy server ip address", +proxy_username = "Proxy server username", +proxy_password = "Proxy server password", + +-- Generator tab. +generatorTab = "Renderer", +generatorDesc = "These settings affect how your client renders new sheep", +demo_mode = "Demo mode (disable rendering of sheep frames)", +all_cores = "Use all available processor cores to render sheep", +save_frames = "Save completed frames", +nickname = "Your user nickname", +user_url = "Link to your homepage", + +-- Logs tab. +logsTab = "Logs", +logsDesc = "Logging information", + +-- Statistics tab. +statsTab = "Statistics", +statsDesc = "Your sheep statistics", + +-- Uninstall. +delSettings = "Delete settings", +delSheep = "Delete downloaded sheep", +delFrames = "Delete rendered frames" + +} diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/Dictionary/Portuguese.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/Dictionary/Portuguese.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/Dictionary/Portuguese.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/Dictionary/Portuguese.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,48 @@ +module( ... ) +messages = { + +-- About tab. +aboutDesc = "Sobre", + +-- Display tab. +displayTab = "Display", +displayDesc = "Estas definies afetam a apresentao visual dos ovelhas na tela", +Fullscreen = "Apresentao em tela cheia (no h necessidade de mudar esta exceto para fins de depurao)", +Iterations = "O nmero de vezes para exibir uma looping ovelha", +Piecewise = "Apresentao linear por partes. Produz reproduo suave por interpolao entre quadros.", +Fps = "O nmero de vezes por segundo a decodificar um novo quadro a partir da ovelha.\nDiminua esse valor se a sua mquina no rpida o suficiente", +BufferLen = "O nmero de quadros armazenados com antecedncia.\nDiminua esse valor se memria RAM for um problema.", + +-- Server tab. +serverTab = "Servidor", +serverDesc = "Essas configuraes definem a forma de comunicar com o servidor de ovelhas", +ServerUrl = "O servidor de ovelhas", +SheepDir = "Localizao de seus cache de ovelhas", +CacheSize = "A quantidade de espao em disco que as ovelhas podem consumir", +DownloadMode = "Permite o download de novas ovelhas", +UseTorrent = "Usar BitTorrent peer-to-peer download (desativada em verso beta)", +Registered = "Voc um usurio registrado?", +Password = "Sua senha", +UniqueID = "O seu ID de cliente", +UseProxy = "Usar um servidor proxy?", +Proxy = "endereo IP do servidor proxy", +Proxy_User = "nome de usurio no servidor proxy", +Proxy_Pass = "senha no servidor proxy", + +-- Renderer tab. +rendererTab = "Renderizador", +rendererDesc = "Estas definies afetam como o seu cliente apresenta novas ovelhas", +DemoMode = "Ativar renderizao de quadros de ovelhas", +AllCores = "Utilizar todos os ncleos do processador para renderizar ovelhas", +SaveFrames = "Salvar quadros concludos", +Nickname = "Seu nickname", +UserUrl = "Link para a sua pgina web inicial", + +-- Logs tab. +logsTab = "Logs", +logsDesc = "Logging informao", + +-- Statistics tab. +statsTab = "Estatsticas", +statsDesc = "Suas estatsticas sobre ovelhas" +} \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/Dictionary/Svenska.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/Dictionary/Svenska.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/Dictionary/Svenska.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/Dictionary/Svenska.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,59 @@ +module( ... ) +messages = { + +-- Notify to restart. +restartLanguage = "Please reopen screensaver configuration to switch to ''${Language}''", + +-- About tab. +aboutTab = "About", + +-- Player tab. +playerTab = "Display", +playerDesc = "These settings affect the visual presentation of the sheep on screen", +fullscreen = "Fullscreen rendering (no need to change this except for debugging purposes)", +LoopIterations = "The number of times to display a looping sheep", +PieceWiseLinear = "Piecewise linear display. Produces smoother playback by interpolating across frames.", +player_fps = "The number of times per second at which to decode a fresh frame from the sheep.\nLower this value if your machine isn't fast enough to keep up", +BufferLength = "How many complete frames to buffer in advance.\nLower this value if ram is an issue.", + + +-- Content tab. +contentTab = "Server", +contentDesc = "These settings define how to communicate with the sheep server", +server = "The sheep server", +sheepdir = "Location of your sheep cache", +cache_size = "The amount of disk space the sheep may consume", +download_mode = "Enables the downloading of new sheep", +use_bittorrent = "Use BitTorrent peer-to-peer downloading (disabled in beta)", +registered = "Are you a registered user?", +password = "Your password", +unique_id = "Your unique client ID", +use_proxy = "Use a proxy server?", +proxy = "Proxy server ip address", +proxy_username = "Proxy server username", +proxy_password = "Proxy server password", + +-- Generator tab. +generatorTab = "Renderer", +generatorDesc = "These settings affect how your client renders new sheep", +demo_mode = "Demo mode (disable rendering of sheep frames)", +all_cores = "Use all available processor cores to render sheep", +save_frames = "Save completed frames", +nickname = "Your user nickname", +user_url = "Link to your homepage", + +-- Logs tab. +logsTab = "Logs", +logsDesc = "Logging information", + +-- Statistics tab. +statsTab = "Statistics", +statsDesc = "Your sheep statistics", + +-- Uninstall. +delSettings = "Delete settings", +delSheep = "Delete downloaded sheep", +delFrames = "Delete rendered frames" + + +} diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/histogram.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/histogram.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/histogram.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/histogram.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,37 @@ +require "class" + +module( ..., package.seeall ) + +local _mt = class.create( _M ) + +-- Return new instance. +function _M:new( _len ) + return setmetatable( { m_Len = _len, m_History = {} }, _mt ) +end + +-- Insert into queue. +function _M:insert( _v ) + -- Insert first. + table.insert( self.m_History, 1, _v ) + + -- Remove 'oldest' element. + if #self.m_History > self.m_Len then + table.remove( self.m_History ) + end +end + +-- +function _M:clear() + -- yay for gc... + self.m_History = {} +end + +-- Check if an element exists in the histogram +function _M:contains( _v ) + for k, v in ipairs( self.m_History ) do + if v == _v then + return true + end + end + return false +end diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/iup_config.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/iup_config.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/iup_config.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/iup_config.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,156 @@ +require( "table" ) +require( "os" ) +require( "math" ) +require( "string" ) +require "logging.null" +require "logging.localized" +require "desc" + +local normalFont = "HELVETICA_NORMAL_10" +local boldFont = "HELVETICA_NORMAL_10" +local largeBoldFont = "HELVETICA_NORMAL_12" + + +local information = +[[ +Electric Sheep is a distributed screen-saver. +During normal operation it uses the internet to contact the server (sheepserver.net) to download AVI animations, both with HTTP on port 80 and 8080, and also by BitTorrent(disabled in beta), which has been integrated into the client. + +Until it downloads its first animation, the screen-saver displays just a black screen and a logo. This takes several minutes, and depending on network conditions and server load, perhaps much longer. Please be patient, and let it run overnight before concluding there is a problem. + +The sheep (as the AVI animations are called) that you get have been rendered by users of the screen-saver all over the world. They are distributed under a Creative Commons license, which means you can reuse and remix them as long as you give credit to the Electric Sheep as their origin. + +Your computer too will participate in this rendering effort. So not only will your computer download sheep, but also download sheep genomes, render them into JPEG/PNG frames, and upload the results to the server. No other information is sent to the server: the Electric Sheep respect your privacy. + +The shepherds (those who wrote the software and run the server) use the sheep for commercial purposes in order to support the network and develop it further. For example there's the Spotworks DVD, and "Dreams in High Fidelity", a painting that evolves. Some jobs rendered by the network may be for images or animations which are not sheep at all, and will not appear in the screen-saver. + +While you are watching the screen-saver, if you see a sheep you like (or dislike) you may vote for it by pushing the up (or down) arrow key. These votes are transmitted to the server and used to drive the evolution of the sheep: sheep that receive more votes live longer and have sex with each other, producing offspring with a family resemblance. + +If you are interested you can have more direct influence over the sheep by downloading additional software to design your own sheep and post them into the gene pool. They will then be rendered by the network and eventually appear on screens all over the world. If they prove popular, they will interbreed with the rest of the population,and variations on them will appear too. ]] + + +-- Create an iterator that iterates in alphabetical order... +function pairsByKeys( t, f ) + local a = {} + + for n in pairs( t ) do + table.insert( a, n ) + end + + table.sort( a, f ) + + local i = 0 -- iterator variable + local iter = function () -- iterator function + i = i + 1 + if a[i] == nil then + return nil + else + return a[i], t[ a[i] ] + end + end + + return iter +end + +-- Main func. +function CreateUI() + + -- Language settings. + local languageName = "English" + local localized = logging.localized( 'Dictionary.' .. languageName, 'Dictionary.English', logging.null() ) + function localize( _what ) return localized:info( _what ) end + + -- Create a string thing. + function CreateString( _name, _value, _parent, _isPassword ) + return iup.hbox + { + GAP = 100, + iup.label{ title = localize( {id=_name} ) .. ": " }, + iup.text{ nc = 32, size = 132, value = _value, password = _isPassword, action = function( self, _c, _data ) _parent[_name] = _data end }, + iup.fill{}, + } + end + + -- Create a checkbox toggler. + function CreateToggle( _name, _value, _parent ) + local state = "OFF" + if _value == 1 then state = "ON" end + return iup.hbox { GAP = 100, iup.toggle { title = localize( {id=_name} ), value = state, action = function( self, _state ) _parent[ _name ] = _state end }, iup.fill{}, } + end + + -- Create a slider between _min & _max. + function CreateNumber( _name, _value, _parent, _min, _max ) + local indicator = iup.label{ title=_value, ALIGNMENT="ALEFT:ABOTTOM" } + local hbox = iup.hbox { + GAP = 10, + indicator, + iup.val { "HORIZONTAL"; RASTERSIZE="124x28", min=_min, max=_max, value=math.floor(_value), mousemove_cb = function( self, _val ) local v = math.floor(_val) indicator.title = v; _parent[ _name ] = v end }, + iup.label{ title = localize( {id=_name} ) }, + } + return hbox + end + + -- Create a tab. + function CreateTabBox( _key, _value ) + local entries = {} + for k, v in pairsByKeys( _value ) do + local vardesc = desc.vars[ k ] -- Only add variable if there's a description for it. + if vardesc then + if vardesc.type == "string" then table.insert( entries, CreateString( k, v, _value, "no" ) ) end + if vardesc.type == "pass" then table.insert( entries, CreateString( k, v, _value, "yes" ) ) end + if vardesc.type == "bool" then table.insert( entries, CreateToggle( k, v, _value ) ) end + if vardesc.type == "int" then table.insert( entries, CreateNumber( k, v, _value, vardesc.min, vardesc.max ) ) end + end + end + + local box = iup.vbox{ gap = 10, iup.label{ title = localize( {id=_key .. "Desc"}), FONT=largeBoldFont }, unpack( entries ) } + box.tabtitle = localize( {id=_key .. "Tab"} ) + return box + end + + -- Build a sorted list of tabs from the settings. + boxes = {} + for k,v in pairsByKeys( g_Settings.settings ) do + if k ~= "app" then + table.insert( boxes, CreateTabBox( k, v ) ) + end + end + + -- Creates dialog with tabs. + dlg = iup.dialog { + title = "Electric Sheep Config", size="600x280", RESIZE="NO", MAXBOX="NO", MINBOX="NO", MENUBOX="NO", MODAL="YES", + iup.vbox + { + iup.tabs + { + -- First the about-tab, since it's not part of the settings... + iup.hbox{ tabtitle = localize( { id="aboutTab" } ), iup.multiline{ font=normalFont, wordwrap="YES", size="420x170", value = information, READONLY="YES" }, iup.fill{}}, + -- ... then unpack the table of tabs built above... + unpack(boxes) + }, + + iup.fill{}, + iup.hbox + { + iup.label{ title = g_ClientVersion or 'Unknown version!', font=boldFont, ALIGNMENT="ACENTER:ACENTER" }, + iup.fill{}, + iup.hbox + { + iup.button{ title = localize( {id="help"} ), action = function() os.execute( 'start ' .. g_HelpLink ) end }, + iup.button{ title = localize( {id="apply"} ), action = function() table.save( g_Settings, g_Root .. "settings.lua" ) os.exit() end }, + iup.button{ title = localize( {id="cancel"} ), action = function() os.exit() end }, + }, + } + }, + } + + -- Shows dialog in the center of the screen + dlg:showxy( iup.CENTER, iup.CENTER ) +end + +-- Build everything. +local status, err = pcall( CreateUI ) +if status == false then iup.Message( "Failure", err ) end + +-- Spin here until we're complete. +iup.MainLoop() diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/console.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/console.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/console.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/console.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,21 @@ +------------------------------------------------------------------------------- +-- $Id: console.lua,v 1.1 2006/08/07 14:58:46 stefan Exp $ +-- +-- Prints logging information to console +-- +-- Authors: +-- Thiago Costa Ponte (thiago@ideais.com.br) +-- +-- Copyright (c) 2004 Kepler Project +------------------------------------------------------------------------------- + +require"logging" + +function logging.console(logPattern) + + return logging.new( function(self, level, message) + io.stdout:write(logging.prepareLogMsg(logPattern, os.date(), level, message)) + return true + end + ) +end \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/file.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/file.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/file.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/file.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,33 @@ +------------------------------------------------------------------------------- +-- $Id: file.lua,v 1.1 2006/08/07 14:58:46 stefan Exp $ +-- +-- Saves logging information in a file +-- +-- Authors: +-- Thiago Costa Ponte (thiago@ideais.com.br) +-- +-- Copyright (c) 2004 Kepler Project +------------------------------------------------------------------------------- + +require"logging" + +function logging.file(filename, datePattern, logPattern) + + if type(filename) ~= "string" then + filename = "lualogging.log" + end + filename = string.format(filename, os.date(datePattern)) + + return logging.new( function(self, level, message) + local f = io.open(filename, "a") + if not f then + return nil, string.format("file `%s' could not be opened for writing", filename) + end + local s = message .. "\n"--logging.prepareLogMsg(logPattern, os.date(), level, message) + f:write(s) + f:close() + + return true + end + ) +end diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/localized.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/localized.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/localized.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/localized.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,63 @@ +require"logging" + +-- +function logging.localized( _language, _fallback, _output ) + + local concat = table.concat + local function check( _template, _logtable ) + local used = { id = true } + + for key in _template:gmatch( '${(%w+)}' ) do + used[key] = true + end + + local buf = {} + for k, v in pairs( _logtable ) do + if not used[k] then + buf[ #buf + 1 ] = k .. ': ' .. v + end + end + + if #buf > 0 then + return ' (' .. concat( buf, ', ' ) .. ')' + else + return '' + end + end + + -- + function TranslateMessage( _lingo, _logTab ) + + -- If it's not a table, make it a string. + if type( _logTab ) ~= "table" then + _logTab = { id = logging.tostring( _logTab ) } + end + + -- If it is a table, but no id, the it has nothing to do with localization. + if not _logTab.id then + return _logTab + end + + local template = _lingo.messages[ _logTab.id ] or _logTab.id + + local extra = check( template, _logTab ) + return template:gsub( '${(%w+)}', _logTab ) .. extra + end + + local logger = _output + + return logging.new( function( self, level, message ) + local lingo = require( _language ) + + -- Set metatable to fallback. + if _fallback ~= _language then + local fallback = require( _fallback ) + local langinherit_mt = {} + setmetatable( lingo.messages, langinherit_mt ) + langinherit_mt.__index = function( _t, _key ) return fallback.messages[ _key ] end + langinherit_mt.__mode = "k" + end + + return logger:info( TranslateMessage( lingo, message ) ) + end, true ) +end \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/logging.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/logging.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/logging.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/logging.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,155 @@ +local Public, Private = {}, {} +logging = Public + +-- Meta information +Public._COPYRIGHT = "Copyright (C) 2004 Kepler Project" +Public._DESCRIPTION = "A simple API to use logging features in Lua" +Public._NAME = "LuaLogging" +Public._VERSION = "1.1.0" + +-- The DEBUG Level designates fine-grained instring.formational events that are most +-- useful to debug an application +Public.DEBUG = "DEBUG" + +-- The INFO level designates instring.formational messages that highlight the +-- progress of the application at coarse-grained level +Public.INFO = "INFO" + +-- The WARN level designates potentially harmful situations +Public.WARN = "WARN" + +-- The ERROR level designates error events that might still allow the +-- application to continue running +Public.ERROR = "ERROR" + +-- The FATAL level designates very severe error events that will presumably +-- lead the application to abort +Public.FATAL = "FATAL" + +Private.LEVEL = { + [Public.DEBUG] = 1, + [Public.INFO] = 2, + [Public.WARN] = 3, + [Public.ERROR] = 4, + [Public.FATAL] = 5, +} + + +------------------------------------------------------------------------------- +-- Creates a new logger object +------------------------------------------------------------------------------- +function Public.new( append, _ignoreStringConversion ) + + if type( append ) ~= "function" then + return nil, "Appender must be a function." + end + + local logger = {} + logger.level = Public.DEBUG + logger.append = append + logger.ignoreStringConversion = _ignoreStringConversion + + logger.setLevel = function (self, level) + assert(Private.LEVEL[level], string.format("undefined level `%s'", tostring(level))) + self.level = level + end + + logger.log = function( self, level, message ) + assert(Private.LEVEL[level], string.format("undefined level `%s'", tostring(level))) + if Private.LEVEL[level] < Private.LEVEL[self.level] then + return + end + + -- The logger has requested to not have it's params converted to string, so lets not. + if not self.ignoreStringConversion then + if type(message) ~= "string" then + message = Public.tostring(message) + end + end + + return logger:append( level, message ) + end + + logger.debug = function (logger, message) return logger:log(Public.DEBUG, message) end + logger.info = function (logger, message) return logger:log(Public.INFO, message) end + logger.warn = function (logger, message) return logger:log(Public.WARN, message) end + logger.error = function (logger, message) return logger:log(Public.ERROR, message) end + logger.fatal = function (logger, message) return logger:log(Public.FATAL, message) end + + return logger +end + + +------------------------------------------------------------------------------- +-- Prepares the log message +------------------------------------------------------------------------------- +function Public.prepareLogMsg(pattern, dt, level, message) + + if pattern == "" then + return message + end + + local logMsg = pattern or "%date %level %message\n" + logMsg = string.gsub(logMsg, "%%date", dt) + logMsg = string.gsub(logMsg, "%%level", level) + logMsg = string.gsub(logMsg, "%%message", message) + return logMsg +end + + +------------------------------------------------------------------------------- +-- Converts a Lua value to a string +-- +-- Converts Table fields in alphabetical order +------------------------------------------------------------------------------- +function Public.tostring( value, _indent ) + + local indent = _indent or "" + local str = indent + + if( type(value) ~= 'table' ) then + if( type(value) == 'string' ) then + if( string.find( value, '"' ) ) then + str = '[[' .. value .. ']]' + else + str = '"' .. value .. '"' + end + else + str = tostring( value ) + end + else + local auxTable = {} + + table.foreach( value, function(i, v) + if( tonumber(i) ~= i ) then + table.insert( auxTable, i ) + else + table.insert( auxTable, tostring(i) ) + end + end ) + + table.sort( auxTable ) + + str = str .. '\n' .. indent .. '{\n' + + local separator = "" + local entry = "" + + table.foreachi( auxTable, function( i, fieldName ) + entry = indent .. "\t" .. '"'..fieldName..'"'.." = " + + if( (tonumber(fieldName)) and (tonumber(fieldName) > 0) ) then + entry = entry .. Public.tostring( value[ tonumber( fieldName ) ], indent .. "\t" ) + else + entry = entry .. Public.tostring( value[ fieldName ], indent .. "\t" ) + end + + str = str .. separator .. entry + separator = "\n" + end ) + + str = str .. '\n' .. indent .. '}\n' + end + + return str +end \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/null.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/null.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/logging/null.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/logging/null.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,7 @@ +require"logging" + +function logging.null() + return logging.new( function( self, level, message ) + return message + end, true ) +end \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/playlist.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/playlist.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/playlist.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/playlist.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,670 @@ +require "table" +require "os" +require "io" +require "pq" +require "math" +--require "serialize" +--require "luaXML" +require "histogram" +require "os" + +local dump = g_Log +--local dump = print +--local dump = function( _ ) end + +context = {} + +-- Set the rootpath for content, and the default fallback-sheep +function Init( _path, _numLoopIterations, _seamlessPlayback, _playEvenly, _medianlevel, _autoMedianLevel, _randomMedianLevel ) + + dump( "Init: " .. _path ) + + context.root = _path + -- Add a trailing '/', if it's missing.. Something boost apparently only does under linux.. + local s = string.find( context.root, "/", -1, true ) + if s ~= context.root:len() then + context.root = context.root .. "/" + end + + context.sheep = {} + context.allsheep = {} + context.FirstLastCnt ={} + --context.pq = pq:new() + context.pq = {} + context.histogram = histogram:new( 50 ) + context.CurrentSheep = nil + context.LoopIterations = _numLoopIterations + context.dirty = false + context.SeamlessPlayback = _seamlessPlayback + context.PlayEvenly = _playEvenly + context.MaturityTreshold = 1.0 + context.AlertShown = false + context.MedianLevel = _medianlevel + + if context.MedianLevel > 1.0 then + context.MedianLevel = 1.0 + end + + if context.MedianLevel < 0.0 then + context.MedianLevel = 0.0 + end + context.AutoMedianLevel = _autoMedianLevel + context.RandomMedianLevel = _randomMedianLevel + +end + +-- Add a sheep to the context, called from the directory-scanner in lua_playlist.h +function Add( _filepath, _file, _generation, _id, _first, _last, _atime ) + + local loopable = _first == _last; + + if context.allsheep[ _id ] == nil and (loopable == false or context.LoopIterations > 0) then + --dump ( "Adding " .. _id ) + context.dirty = true + + context.allsheep[ _id ] = {} + context.allsheep[ _id ].generation = _generation + context.allsheep[ _id ].playCount = g_PlayCount( _generation, _id ) or 0 + context.allsheep[ _id ].file = _file + context.allsheep[ _id ].filepath = _filepath + context.allsheep[ _id ].id = _id + context.allsheep[ _id ].first = _first + context.allsheep[ _id ].last = _last + context.allsheep[ _id ].loopable = loopable + context.allsheep[ _id ].atime = _atime + context.allsheep[ _id ].rank = 0 + context.allsheep[ _id ].deleted = false + + if context.allsheep[ _id ].playCount > context.MaturityTreshold then + context.allsheep[ _id ].maturity = 1.0 + else + context.allsheep[ _id ].maturity = context.allsheep[ _id ].playCount / context.MaturityTreshold + end + + context.sheep[ _id ] = context.allsheep[ _id ] + end + +end + +-- Clear sheep context. +function Clear( _medianLevel ) + dump( "Clear" ) + context.sheep = {} + context.allsheep = {} + context.MedianLevel = _medianLevel + + if context.MedianLevel > 1.0 then + context.MedianLevel = 1.0 + end + + if context.MedianLevel < 0.0 then + context.MedianLevel = 0.0 + end +end + +-- +function Override( _id ) + dump( "Override" ) + context.OverrideID = _id +end + +-- +function Delete( _id ) + dump( tostring( _id ) .. ' marked for deletion...' ) + -- Create new .xxx files. + + -- Create a new empty file with ext .xxx so it wont get downloaded again. + local newfile = string.gsub( context.sheep[_id].file, ".avi", ".xxx", 1 ) + local fh, msg = io.open( context.sheep[_id].filepath .. newfile, "w" ) + if fh == nil then + dump( msg ) + else + io.close( fh ) + end + + + -- Add to deathrow + context.deathrow = context.deathrow or {} + table.insert( context.deathrow, _id ) + + context.sheep[ _id ].deleted = true +end + +function RebuildConnections() + + for k, v in pairs( context.FirstLastCnt ) do + v.firstcnt = 0 + v.lastcnt = 0 + end + + for k, v in pairs( context.sheep ) do + + if 0.999 >= v.rank * context.PlayEvenly then + + if context.FirstLastCnt[ v.first ] == nil then + context.FirstLastCnt[ v.first ] = {} + context.FirstLastCnt[ v.first ].firstcnt = 1 + context.FirstLastCnt[ v.first ].lastcnt = 0 + else + context.FirstLastCnt[ v.first ].firstcnt = context.FirstLastCnt[ v.first ].firstcnt + 1 + end + + if context.FirstLastCnt[ v.last ] == nil then + context.FirstLastCnt[ v.last ] = {} + context.FirstLastCnt[ v.last ].firstcnt = 0 + context.FirstLastCnt[ v.last ].lastcnt = 1 + else + context.FirstLastCnt[ v.last ].lastcnt = context.FirstLastCnt[ v.last ].lastcnt + 1 + end + end + end + +end + +function UpdateSheep() + dump( "UpdateSheep" ) + + local count = 0; + + for k, v in pairs( context.sheep ) do + v.playCount = g_PlayCount( v.generation, v.id ) + + if v.playCount > context.MaturityTreshold then + v.maturity = 1.0 + else + v.maturity = v.playCount / context.MaturityTreshold + end + + v.atime = g_AccessTime( v.filepath .. v.file ) + + count = count + 1 + end + + return count +end + + +function UpdateRanks() + dump( "UpdateRanks" ) + + a = {} + + for k, v in pairs( context.sheep ) do + table.insert( a, v.playCount ) + end + + table.sort( a ) + local currentmedian = context.MedianLevel + if context.RandomMedianLevel == true then + currentmedian = context.MedianLevel + g_CRand() * (1. - context.MedianLevel) + dump( "RandomMedian: " .. currentmedian) + end + local median = a[ math.floor( #a * currentmedian ) ] + + if median == nil then + if #a > 0 then + median = a[ 1 ] + else + median = 0 + end + end + + dump ( "median: " .. median .. " - " .. math.floor( #a * currentmedian ) ) + g_ClearMedianSurvivorsStats() + for k, v in pairs( context.sheep ) do + if v.playCount > median then + v.rank = 1.0 + else + g_IncMedianCutSurvivors() + v.rank = 0.0 + end + end +end + +function PlayEvenly( _rank ) + + if g_CRand() >= _rank * context.PlayEvenly then + return true + end + + return false +end + +function RemoveBrokenLoops() + + local change = true + while change == true do + change = false + for k, v in pairs( context.sheep ) do + local minimum + + if v.loopable then + minimum = 2 + else + minimum = 1 + end + + if context.FirstLastCnt[ v.first ] == nil or context.FirstLastCnt[ v.first ].lastcnt < minimum then + --dump( "Broken: id=" .. tostring(v.id) .. ",first=" .. tostring(v.first) .. ",last=" .. tostring(v.last) .. ",atime=" .. tostring(v.atime) ) + change = true + + if context.FirstLastCnt[ v.first ] ~= nil then + context.FirstLastCnt[ v.first ].firstcnt = context.FirstLastCnt[ v.first ].firstcnt - 1 + end + + if context.FirstLastCnt[ v.last ] ~= nil then + context.FirstLastCnt[ v.last ].lastcnt = context.FirstLastCnt[ v.last ].lastcnt - 1 + end + + context.sheep[ v.id ] = nil + end + + if context.FirstLastCnt[ v.last ] == nil or context.FirstLastCnt[ v.last ].firstcnt < minimum then + --dump( "Broken: id=" .. tostring(v.id) .. ",first=" .. tostring(v.first) .. ",last=" .. tostring(v.last) .. ",atime=" .. tostring(v.atime) ) + change = true + + if context.FirstLastCnt[ v.first ] ~= nil then + context.FirstLastCnt[ v.first ].firstcnt = context.FirstLastCnt[ v.first ].firstcnt - 1 + end + + if context.FirstLastCnt[ v.last ] ~= nil then + context.FirstLastCnt[ v.last ].lastcnt = context.FirstLastCnt[ v.last ].lastcnt - 1 + end + + context.sheep[ v.id ] = nil + end + end + end + + local count = 0 + + for k, v in pairs( context.sheep ) do + g_IncDeadEndCutSurvivors() + count = count + 1 + dump( "RemoveBrokenLoopsSurvivor: id=" .. tostring(v.id) .. ",first=" .. tostring(v.first) .. ",last=" .. tostring(v.last) .. ",atime=" .. tostring(v.atime) .. ",rank=" .. tostring(v.rank) ) + end + + if count == 0 then + dump( "RemoveBrokenLoops: There are no survivors - fallback to all sheep" ) + + local i = 0 + + local isloop = false + + for k, v in pairs( context.allsheep ) do + context.sheep[ v.id ] = v + + i = i + 1 + + if i == 1 then + if v.first == v.last then + isloop = true + end + end + end + + if ( i ~= 1 or isloop == false ) and context.AlertShown == false then + g_ErrorMessage( "Ignoring Seamless Playback. No closed loops found." ) + context.AlertShown = true + end + else + context.AlertShown = false + end +end + +-- +function Rebuild() + + dump( "Rebuild... " ) + + if context.deathrow ~= nil then + local preserveDeathrow = false + for k, v in pairs( context.deathrow ) do + -- Try to delete the file. + local res, msg = os.remove( context.sheep[v].filepath .. context.sheep[v].file ) + if res ~= true then + dump( msg ) + + -- Sheep was currently playing or something like that, so lets preserve deathrow until next rebuild. + preserveDeathrow = true + dump( "Preserving deathrow" ) + else + -- Remove from context list. + if preserveDeathrow == false then + dump( tostring( context.sheep[v].filepath ) .. tostring( context.sheep[v].file ) .. ' deleted due to negative vote...' ) + context.sheep[ v ] = nil + context.allsheep[ v ] = nil + context.dirty = true + end + end + end + + -- At least one sheep wasnt removed, so keep the list until next rebuild. + if preserveDeathrow == false then + context.deathrow = nil + end + end + + local origcount = UpdateSheep() + + if origcount == 0 then + return + end + + --if context.PlayEvenly > 0.0 then + UpdateRanks() + --end + + --if context.dirty == true then + + if context.SeamlessPlayback == true then + g_ClearDeadEndSurvivorsStats() + RebuildConnections() + RemoveBrokenLoops() + end + + context.dirty = false + --end + + + -- Fresh pq. + --context.pq:clear() + context.pq = {} + + local count = 0 + + for k, v in pairs( context.sheep ) do + --context.pq:insert( { prio = v.playCount, sheep = v } ) + --if v.loopable == true and v.rank < context.PlayEvenly then + if 0.999 >= v.rank * context.PlayEvenly then + table.insert( context.pq, 1, v ) + count = count + 1 + end + end + + dump( "Found " .. count .. " sheep..." ) +end + +-- Always something returned from this playlist.. +function Size() + return 1 +end + +-- +function GetRandomSheep() + + -- Make sure there is a queue... +-- if context.pq:empty() then + if #context.pq == 0 then + Rebuild() + end + + local s = nil + local evensheep = nil + + -- Return least played sheep. + --if not context.pq:empty() then + if #context.pq > 0 then + + retry = 0 + + while retry < 10 do + --local s = context.pq:remove() + local rndnum = g_CRand() + local rnd = math.floor( 1 + rndnum * #context.pq ) + dump("rnd = " .. rnd); + local s = context.pq[ rnd ] + + if PlayEvenly( s.rank ) then + evensheep = s + + if ( #context.pq < 20 ) or s.loopable or context.LoopIterations == 0 then + dump( "Picked new sheep " .. s.id .. " from pq (playcount " .. s.playCount .. " ) rnd=" .. tostring(rnd) .. " rndnum=" .. tostring(rndnum) ) + return s + end + end + retry = retry + 1 + end + end + + if evensheep ~= nil then + s = evensheep + end + + if s == nil then + dump( "Unable to grab a random sheep..." ) + else + dump( "Picked non-evenly new sheep " .. s.id .. " from pq (playcount " .. s.playCount .. " )" ) + end + + return s +end + +-- +function check_for_eddy() + + local c = 0 + + if #context.histogram.m_History == 0 then + return false + end + + --dump( #context.histogram.m_History .. " in history.." ) + + for i=1, #context.histogram.m_History do + + local diff = 1 + --dump( "edd checking " .. tostring(c) .. " " .. tostring(i) .. " " .. tostring(context.histogram.m_History[ i ].id) ) + + for j=1, i do + if i~=j then + if context.histogram.m_History[ j ].id == context.histogram.m_History[ i ].id then + diff = 0 + end + end + end + + c = c + diff + + if c <= i/3 then + dump( "eddy " .. c .. "/" .. i ) + context.histogram:clear() + return true + end + end + + --dump( "no eddy" ) + return false +end + + +-- Given a sheep, figure out where to go next. +function GraphAlgo( _currentSheep ) + + -- User wants something else? + if context.OverrideID then + dump( "Override: " .. context.OverrideID ) + local s = context.sheep[ context.OverrideID ] + context.OverrideID = nil + return s + end + + context.OverrideID = nil + + -- Nothing in, so nothing out... + if not _currentSheep then + dump( "GraphAlgo needs a starting point..." ) + return nil + end + + dump( "GraphAlgo: CurrentSheep = " .. _currentSheep.id ) + + local loops = pq:new() + local edges = pq:new() + local others = pq:new() + + local nextsheep = nil + + local tmpv = nil + + -- Build a list of loops & edges that the current sheep can jump to... + for k, v in pairs( context.sheep ) do + -- But not the same one since repeating loops are already dealt with above... + if ( v.deleted == false ) and ( v.id ~= _currentSheep.id ) then + if v.first == _currentSheep.last then --or v.last == _currentSheep.first then + if v.loopable == true then + loops:insert( { prio = v.atime * v.maturity, sheep = v } ) + else + edges:insert( { prio = v.atime * v.maturity, sheep = v } ) + end + else + others:insert( { prio = v.atime * v.maturity, sheep = v } ) + end + end + end + + local firstedge = nil + local firstloop = nil + + while not edges:empty() do + -- Pick edge from pq. + local edge = edges:remove().sheep + + if firstedge == nil then + firstedge = edge + end + + if PlayEvenly( edge.rank ) then + dump( "picking edge!" ) + nextsheep = edge + break + end + end + + if firstedge == nil then + dump( "no edges" ) + end + + while not loops:empty() do + -- Pick loop from pq. + local loop = loops:remove().sheep + + if firstloop == nil then + firstloop = loop + end + + if PlayEvenly( loop.rank ) then + dump( "picking loop!" ) + nextsheep = loop + break + end + end + + if firstloop == nil then + dump( "no loops" ) + end + + if nextsheep == nil and context.SeamlessPlayback == true then + if firstloop ~= nil then + nextsheep = firstloop + else + nextsheep = firstedge + end + dump( "choosing disabled sheep in emergency for seamless playback..." ) + end + + --while nextsheep == nil and not others:empty() do + -- local other = others:remove().sheep + -- + -- if PlayEvenly( other.rank ) then + -- dump( "picking other!" ) + -- nextsheep = other + -- break + -- end + --end + + -- Do we need to jump? + if nextsheep ~= nil then + + dump( "Picked connection " .. nextsheep.id .. " from pq (playcount " .. nextsheep.playCount .. " )" ) + + if check_for_eddy() == false then + return nextsheep + end + end + + -- Will trigger a random sheep. + dump( "No connections!" ) + return nil +end + +-- +function GetCurrentPlayingID() + if not context.CurrentSheep then + return 0 + end + + --dump( "GetCurrentPlayingID(): " .. tostring( context.CurrentSheep.id ) ) + + return context.CurrentSheep.id +end + +-- +function GetOldestSheep() + local atime = -1; + local retval = nil; + + -- Build a list of loops & edges that the current sheep can jump to... + for k, v in pairs( context.sheep ) do + if ( v.deleted == false ) and ( atime == -1 or ( v.atime * v.maturity ) < atime ) and PlayEvenly( v.rank ) then + atime = v.atime * v.maturity + retval = v + end + end + + return retval +end + + +-- Return next sheep. +function Next( _curID, _startByRandom ) + + local next = nil + + if context.sheep ~= nil then + context.CurrentSheep = context.sheep[ _curID ] + end + + if context.CurrentSheep == nil then + if _startByRandom == true then + next = GetRandomSheep() + else + next = GetOldestSheep() + end + else + next = GraphAlgo( context.CurrentSheep ) or GetRandomSheep() + end + + if next then + + dump("Next sheep chosen: " .. next.id .. " played " .. next. playCount .. " times") + + next.playCount = next.playCount + 1 + + if next.playCount > context.MaturityTreshold then + next.maturity = 1.0 + else + next.maturity = next.playCount / context.MaturityTreshold + end + + context.histogram:insert( next ) + + next.atime = os.time( os.date('*t') ) + + return next.filepath .. next.file + end + + dump( "No sheep chosen to play..." ) + context.CurrentSheep = nil + return "" +end diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/pq.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/pq.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/pq.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/pq.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,65 @@ +-- +-- Merge function implementing a skew heap. +-- The result is written to r.right. +-- +-- Skew heaps have an amortized complexity of O(log n) +-- and are simple to implement. The data structure +-- is a heap-ordered binary tree. The basic operation +-- is the merge operation which merges two heaps into one. +-- +require "class" + +module( ..., package.seeall ) + +local pq_mt = class.create( _M ) + +-- Return new instance. +function _M:new() + return setmetatable( { m_Queue = {} }, pq_mt ) +end + +-- +function _M:skew_merge( a, b, r ) + + if not b then + r.right = a + else + while a do + if a.prio <= b.prio then + r.right, r = a, a + a.left, a = a.right, a.left + else + r.right, r = b, b + b.left, a, b = b.right, b.left, a + end + end + + r.right = b + end +end + +-- Empty test +function _M:empty() + return self.m_Queue.right == nil +end + +-- Clear test +function _M:clear() + while not self:empty() do + self:remove() + end +end + +-- Insert into queue. Merge the new node indo the heap. +function _M:insert( v ) + _M:skew_merge( self.m_Queue.right, v, self.m_Queue ) +end + +-- Take the root from the heap. Merge its two children to obtain the new root +function _M:remove() + local r = self.m_Queue.right + assert( r ~= nil, "remove called on empty queue" ) + self:skew_merge( r.left, r.right, self.m_Queue ) + r.left, r.right = nil, nil + return r +end diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/Scripts/serialize.lua electricsheep-3.0.2-git20180325/Runtime/Scripts/serialize.lua --- electricsheep-2.7~b12+svn20091224/Runtime/Scripts/serialize.lua 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/Scripts/serialize.lua 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,183 @@ +require "table" +require "io" +require "string" + +-- +local function auto( tab, key ) + return setmetatable( {}, { + __index = auto, + __newindex = assign, + parent = tab, + key = key + }) +end + +local meta = { __index = auto } + +-- The if statement below prevents the table from being created if the value assigned is nil. +-- This is, I think, technically correct but it might be desirable to use assignment to nil to force a table into existence. +function assign( tab, key, val ) + -- if val ~= nil then + local oldmt = getmetatable( tab ) + oldmt.parent[ oldmt.key ] = tab + setmetatable( tab, meta ) + tab[ key ] = val + -- end +end + +-- +function AutoTable( _tab ) + return setmetatable( _tab, meta ) +end + + + + +-- exportstring( string ) +-- returns a "Lua" portable version of the string +local function exportstring( s ) + s = string.format( "%q",s ) + -- to replace + s = string.gsub( s,"\\\n","\\n" ) + s = string.gsub( s,"\r","\\r" ) + s = string.gsub( s,string.char(26),"\"..string.char(26)..\"" ) + return s +end + +-- The Save Function +function table.save( tbl,filename ) + + local charS,charE = " ","\n" + local file,err + -- create a pseudo file that writes to a string and return the string + if not filename then + file = { write = function( self,newstr ) self.str = self.str..newstr end, str = "" } + charS,charE = "","" + -- write table to tmpfile + elseif filename == true or filename == 1 then + charS,charE,file = "","",io.tmpfile() + -- write table to file + -- use io.open here rather than io.output, since in windows when clicking on a file opened with io.output will create an error + else + file,err = io.open( filename, "w" ) + if err then return _,err end + end + -- initiate variables for save procedure + local tables,lookup = { tbl },{ [tbl] = 1 } + file:write( "return {"..charE ) + for idx,t in ipairs( tables ) do + if filename and filename ~= true and filename ~= 1 then + file:write( "-- Table: {"..idx.."}"..charE ) + end + file:write( "{"..charE ) + local thandled = {} + for i,v in ipairs( t ) do + thandled[i] = true + -- escape functions and userdata + if type( v ) ~= "userdata" then + -- only handle value + if type( v ) == "table" then + if not lookup[v] then + table.insert( tables, v ) + lookup[v] = #tables + end + file:write( charS.."{"..lookup[v].."},"..charE ) + elseif type( v ) == "function" then + file:write( charS.."loadstring("..exportstring(string.dump( v )).."),"..charE ) + else + local value = ( type( v ) == "string" and exportstring( v ) ) or tostring( v ) + file:write( charS..value..","..charE ) + end + end + end + for i,v in pairs( t ) do + -- escape functions and userdata + if (not thandled[i]) and type( v ) ~= "userdata" then + -- handle index + if type( i ) == "table" then + if not lookup[i] then + table.insert( tables,i ) + lookup[i] = #tables + end + file:write( charS.."[{"..lookup[i].."}]=" ) + else + local index = ( type( i ) == "string" and "["..exportstring( i ).."]" ) or string.format( "[%d]",i ) + file:write( charS..index.."=" ) + end + -- handle value + if type( v ) == "table" then + if not lookup[v] then + table.insert( tables,v ) + lookup[v] = #tables + end + file:write( "{"..lookup[v].."},"..charE ) + elseif type( v ) == "function" then + file:write( "loadstring("..exportstring(string.dump( v )).."),"..charE ) + else + local value = ( type( v ) == "string" and exportstring( v ) ) or tostring( v ) + file:write( value..","..charE ) + end + end + end + file:write( "},"..charE ) + end + file:write( "}" ) + -- Return Values + -- return stringtable from string + if not filename then + -- set marker for stringtable + return file.str.."--|" + -- return stringttable from file + elseif filename == true or filename == 1 then + file:seek ( "set" ) + -- no need to close file, it gets closed and removed automatically + -- set marker for stringtable + return file:read( "*a" ).."--|" + -- close file and return 1 + else + file:close() + return 1 + end +end + +--// The Load Function +function table.load( sfile ) + -- catch marker for stringtable + if string.sub( sfile,-3,-1 ) == "--|" then + tables,err = loadstring( sfile ) + else + tables,err = loadfile( sfile ) + end + if err then return _,err + end + tables = tables() + + if tables == nil then + return _, "Config file is corrupted" + end + + for idx = 1,#tables do + local tolinkv,tolinki = {},{} + for i,v in pairs( tables[idx] ) do + if type( v ) == "table" and tables[v[1]] then + table.insert( tolinkv, { i,tables[v[1]] } ) + end + if type( i ) == "table" and tables[i[1]] then + table.insert( tolinki, { i,tables[i[1]] } ) + end + end + + -- we need to set AutoTable on every level, otherwise we get asserts for uknown settings + tables[idx] = AutoTable(tables[idx]) + + -- link values, first due to possible changes of indices + for _,v in ipairs( tolinkv ) do + tables[idx][v[1]] = v[2] + end + -- link indices + for _,v in ipairs( tolinki ) do + tables[idx][v[2]],tables[idx][v[1]] = tables[idx][v[1]],nil + end + end + return AutoTable(tables[1]) +end \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/Runtime/sheep_logo2.xpm electricsheep-3.0.2-git20180325/Runtime/sheep_logo2.xpm --- electricsheep-2.7~b12+svn20091224/Runtime/sheep_logo2.xpm 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/Runtime/sheep_logo2.xpm 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,278 @@ +/* XPM */ +static const char *eslogo[] = { +/* columns rows colors chars-per-pixel */ +"64 64 208 2 ", +" c #000000", +". c #010101", +"X c #020202", +"o c #030303", +"O c #040404", +"+ c #050505", +"@ c #060606", +"# c #070707", +"$ c #080808", +"% c #090909", +"& c #0A0A0A", +"* c #0B0B0B", +"= c #0C0C0C", +"- c #0D0D0D", +"; c #0E0E0E", +": c #0F0F0F", +"> c #101010", +", c #111111", +"< c #121212", +"1 c #131313", +"2 c #141414", +"3 c #151515", +"4 c #161616", +"5 c #171717", +"6 c #181818", +"7 c #191919", +"8 c #1A1A1A", +"9 c #1B1B1B", +"0 c #1C1C1C", +"q c #1D1D1D", +"w c #1E1E1E", +"e c #202020", +"r c #212121", +"t c #222222", +"y c #232323", +"u c #242424", +"i c #252525", +"p c #262626", +"a c #272727", +"s c #282828", +"d c #292929", +"f c #2A2A2A", +"g c #2B2B2B", +"h c #2C2C2C", +"j c #2D2D2D", +"k c #2E2E2E", +"l c #2F2F2F", +"z c #303030", +"x c #313131", +"c c #323232", +"v c #333333", +"b c #353535", +"n c #393939", +"m c #3A3A3A", +"M c #3B3B3B", +"N c #3C3C3C", +"B c #3E3E3E", +"V c #3F3F3F", +"C c #404040", +"Z c #414141", +"A c #424242", +"S c #434343", +"D c #444444", +"F c #454545", +"G c #464646", +"H c #494949", +"J c #4A4A4A", +"K c #4B4B4B", +"L c #4D4D4D", +"P c #4F4F4F", +"I c #505050", +"U c #515151", +"Y c #525252", +"T c #535353", +"R c #545454", +"E c #555555", +"W c #565656", +"Q c #575757", +"! c #595959", +"~ c #5C5C5C", +"^ c #5E5E5E", +"/ c #5F5F5F", +"( c #606060", +") c #616161", +"_ c #636363", +"` c #646464", +"' c #656565", +"] c #666666", +"[ c #676767", +"{ c #686868", +"} c #696969", +"| c #6A6A6A", +" . c #6B6B6B", +".. c #6C6C6C", +"X. c #6D6D6D", +"o. c #6E6E6E", +"O. c #6F6F6F", +"+. c #707070", +"@. c #727272", +"#. c #737373", +"$. c #747474", +"%. c #757575", +"&. c #767676", +"*. c #777777", +"=. c #7A7A7A", +"-. c #7C7C7C", +";. c #7D7D7D", +":. c #7F7F7F", +">. c #818181", +",. c #828282", +"<. c #838383", +"1. c #848484", +"2. c #868686", +"3. c #878787", +"4. c #888888", +"5. c #898989", +"6. c #8A8A8A", +"7. c #8B8B8B", +"8. c #8D8D8D", +"9. c #8E8E8E", +"0. c #8F8F8F", +"q. c #909090", +"w. c #919191", +"e. c #939393", +"r. c #959595", +"t. c #969696", +"y. c #979797", +"u. c #989898", +"i. c #999999", +"p. c #9A9A9A", +"a. c #9B9B9B", +"s. c #9D9D9D", +"d. c #9E9E9E", +"f. c #9F9F9F", +"g. c #A0A0A0", +"h. c #A1A1A1", +"j. c #A2A2A2", +"k. c #A4A4A4", +"l. c #A5A5A5", +"z. c #A6A6A6", +"x. c #A7A7A7", +"c. c #A8A8A8", +"v. c #ABABAB", +"b. c #ADADAD", +"n. c #AEAEAE", +"m. c #B0B0B0", +"M. c #B1B1B1", +"N. c #B3B3B3", +"B. c #B4B4B4", +"V. c #B7B7B7", +"C. c #B8B8B8", +"Z. c #B9B9B9", +"A. c #BABABA", +"S. c #BBBBBB", +"D. c #BCBCBC", +"F. c #BDBDBD", +"G. c #BEBEBE", +"H. c #C0C0C0", +"J. c #C2C2C2", +"K. c #C5C5C5", +"L. c #C7C7C7", +"P. c #CACACA", +"I. c #CCCCCC", +"U. c #CDCDCD", +"Y. c #CECECE", +"T. c #CFCFCF", +"R. c #D0D0D0", +"E. c #D1D1D1", +"W. c #D2D2D2", +"Q. c #D4D4D4", +"!. c #D7D7D7", +"~. c #D8D8D8", +"^. c #D9D9D9", +"/. c #DADADA", +"(. c #DCDCDC", +"). c #DDDDDD", +"_. c #DFDFDF", +"`. c #E0E0E0", +"'. c #E1E1E1", +"]. c #E2E2E2", +"[. c #E3E3E3", +"{. c #E4E4E4", +"}. c #E5E5E5", +"|. c #E6E6E6", +" X c #E7E7E7", +".X c #E8E8E8", +"XX c #EBEBEB", +"oX c #ECECEC", +"OX c #EDEDED", +"+X c #EEEEEE", +"@X c #EFEFEF", +"#X c #F0F0F0", +"$X c #F1F1F1", +"%X c #F2F2F2", +"&X c #F3F3F3", +"*X c #F4F4F4", +"=X c #F5F5F5", +"-X c #F6F6F6", +";X c #F7F7F7", +":X c #F8F8F8", +">X c #F9F9F9", +",X c #FAFAFA", +" include. Thanks + to Steve Lhomme for that. + +Changes in version 2.0.0 BETA +- Made the ToXXX() casts safe if 'this' is null. + When "LoadFile" is called with a filename, the value will correctly get set. + Thanks to Brian Yoder. +- Fixed bug where isalpha() and isalnum() would get called with a negative value for + high ascii numbers. Thanks to Alesky Aksenov. +- Fixed some errors codes that were not getting set. +- Made methods "const" that were not. +- Added a switch to enable or disable the ignoring of white space. ( TiXmlDocument::SetIgnoreWhiteSpace() ) +- Greater standardization and code re-use in the parser. +- Added a stream out operator. +- Added a stream in operator. +- Entity support, of predefined entites. &#x entities are untouched by input or output. +- Improved text out formatting. +- Fixed ReplaceChild bug, thanks to Tao Chen. + +Changes in version 2.0.1 +- Fixed hanging on loading a 0 length file. Thanks to Jeff Scozzafava. +- Fixed crashing on InsertBeforeChild and InsertAfterChild. Also possibility of bad links being + created by same function. Thanks to Frank De prins. +- Added missing licence text. Thanks to Lars Willemsens. +- Added include, at the suggestion of Steve Walters. + +Changes in version 2.1.0 +- Yves Berquin brings us the STL switch. The forum on SourceForge, and various emails to + me, have long debated all out STL vs. no STL at all. And now you can have it both ways. + TinyXml will compile either way. + +Changes in version 2.1.1 +- Compilation warnings. + +Changes in version 2.1.2 +- Uneeded code is not compiled in the STL case. +- Changed headers so that STL can be turned on or off in tinyxml.h + +Changes in version 2.1.3 +- Fixed non-const reference in API; now uses a pointer. +- Copy constructor of TiXmlString not checking for assignment to self. +- Nimrod Cohen found a truly evil bug in the STL implementation that occurs + when a string is converted to a c_str and then assigned to self. Search for + STL_STRING_BUG for a full description. I'm asserting this is a Microsoft STL + bug, since &string and string.c_str() should never be the same. Nevertheless, + the code works around it. +- Urivan Saaib pointed out a compiler conflict, where the C headers define + the isblank macro, which was wiping out the TiXmlString::isblank() method. + The method was unused and has been removed. + +Changes in version 2.1.4 +- Reworked the entity code. Entities were not correctly surving round trip input and output. + Will now automatically create entities for high ascii in output. + +Changes in version 2.1.5 +- Bug fix by kylotan : infinite loop on some input (tinyxmlparser.cpp rev 1.27) +- Contributed by Ivica Aracic (bytelord) : 1 new VC++ project to compile versions as static libraries (tinyxml_lib.dsp), + and an example usage in xmltest.dsp + (Patch request ID 678605) +- A suggestion by Ronald Fenner Jr (dormlock) to add #include and for Apple's Project Builder + (Patch request ID 697642) +- A patch from ohommes that allows to parse correctly dots in element names and attribute names + (Patch request 602600 and kylotan 701728) +- A patch from hermitgeek ( James ) and wasteland for improper error reporting +- Reviewed by Lee, with the following changes: + - Got sick of fighting the STL/non-STL thing in the windows build. Broke + them out as seperate projects. + - I have too long not included the dsw. Added. + - TinyXmlText had a protected Print. Odd. + - Made LinkEndChild public, with docs and appropriate warnings. + - Updated the docs. + +2.2.0 +- Fixed an uninitialized pointer in the TiXmlAttributes +- Fixed STL compilation problem in MinGW (and gcc 3?) - thanks Brian Yoder for finding this one +- Fixed a syntax error in TiXmlDeclaration - thanks Brian Yoder +- Fletcher Dunn proposed and submitted new error handling that tracked the row and column. Lee + modified it to not have performance impact. +- General cleanup suggestions from Fletcher Dunn. +- In error handling, general errors will no longer clear the error state of specific ones. +- Fix error in documentation : comments starting with ">) has now + been fixed. + +2.5.2 +- Lieven, and others, pointed out a missing const-cast that upset the Open Watcom compiler. + Should now be fixed. +- ErrorRow and ErrorCol should have been const, and weren't. Fixed thanks to Dmitry Polutov. + +2.5.3 +- zloe_zlo identified a missing string specialization for QueryValueAttribute() [ 1695429 ]. Worked + on this bug, but not sure how to fix it in a safe, cross-compiler way. +- increased warning level to 4 and turned on detect 64 bit portability issues for VC2005. + May address [ 1677737 ] VS2005: /Wp64 warnings +- grosheck identified several problems with the Document copy. Many thanks for [ 1660367 ] +- Nice catch, and suggested fix, be Gilad Novik on the Printer dropping entities. + "[ 1600650 ] Bug when printing xml text" is now fixed. +- A subtle fix from Nicos Gollan in the tinystring initializer: + [ 1581449 ] Fix initialiser of TiXmlString::nullrep_ +- Great catch, although there isn't a submitter for the bug. [ 1475201 ] TinyXML parses entities in comments. + Comments should not, in fact, parse entities. Fixed the code path and added tests. +- We were not catching all the returns from ftell. Thanks to Bernard for catching that. + +2.5.4 +- A TiXMLDocument can't be a sub-node. Block this from happening in the 'replace'. Thanks Noam. +- [ 1714831 ] TiXmlBase::location is not copied by copy-ctors, fix reported and suggested by Nicola Civran. +- Fixed possible memory overrun in the comment reading code - thanks gcarlton77 + +2.5.5 +- Alex van der Wal spotted incorrect types (lf) being used in print and scan. robertnestor pointed out some problems with the simple solution. Types updated. +- Johannes Hillert pointed out some bug typos. +- Christian Mueller identified inconsistent error handling with Attributes. +- olivier barthelemy also reported a problem with double truncation, also related to the %lf issue. +- zaelsius came up with a great (and simple) suggestion to fix QueryValueAttribute truncating strings. +- added some null pointer checks suggested by hansenk +- Sami Visnen found a (rare) buffer overrun that could occur in parsing. +- vi tri filed a bug that led to a refactoring of the attribute setting mess (as well as adding a missing SetDoubleAttribute() ) +- removed TIXML_ERROR_OUT_OF_MEMORY. TinyXML does not systematically address OOO, and the notion it does is misleading. +- vanneto, keithmarshall, others all reported the warning from IsWhiteSpace() usage. Cleaned this up - many thanks to everyone who reported this one. +- tibur found a bug in end tag parsing + + +2.6.2 +- Switched over to VC 2010 +- Fixed up all the build issues arising from that. (Lots of latent build problems.) +- Removed the old, now unmaintained and likely not working, build files. +- Fixed some static analysis issues reported by orbitcowboy from cppcheck. +- Bayard 95 sent in analysis from a different analyzer - fixes applied from that as well. +- Tim Kosse sent a patch fixing an infinite loop. +- Ma Anguo identified a doc issue. +- Eddie Cohen identified a missing qualifier resulting in a compilation error on some systems. +- Fixed a line ending bug. (What year is this? Can we all agree on a format for text files? Please? ...oh well.) + diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/Makefile electricsheep-3.0.2-git20180325/tinyXml/Makefile --- electricsheep-2.7~b12+svn20091224/tinyXml/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/Makefile 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,130 @@ +#**************************************************************************** +# +# Makefile for TinyXml test. +# Lee Thomason +# www.grinninglizard.com +# +# This is a GNU make (gmake) makefile +#**************************************************************************** + +# DEBUG can be set to YES to include debugging info, or NO otherwise +DEBUG := NO + +# PROFILE can be set to YES to include profiling info, or NO otherwise +PROFILE := NO + +# TINYXML_USE_STL can be used to turn on STL support. NO, then STL +# will not be used. YES will include the STL files. +TINYXML_USE_STL := NO + +#**************************************************************************** + +CC := gcc +CXX := g++ +LD := g++ +AR := ar rc +RANLIB := ranlib + +DEBUG_CFLAGS := -Wall -Wno-format -g -DDEBUG +RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-format -O3 + +LIBS := + +DEBUG_CXXFLAGS := ${DEBUG_CFLAGS} +RELEASE_CXXFLAGS := ${RELEASE_CFLAGS} + +DEBUG_LDFLAGS := -g +RELEASE_LDFLAGS := + +ifeq (YES, ${DEBUG}) + CFLAGS := ${DEBUG_CFLAGS} + CXXFLAGS := ${DEBUG_CXXFLAGS} + LDFLAGS := ${DEBUG_LDFLAGS} +else + CFLAGS := ${RELEASE_CFLAGS} + CXXFLAGS := ${RELEASE_CXXFLAGS} + LDFLAGS := ${RELEASE_LDFLAGS} +endif + +ifeq (YES, ${PROFILE}) + CFLAGS := ${CFLAGS} -pg -O3 + CXXFLAGS := ${CXXFLAGS} -pg -O3 + LDFLAGS := ${LDFLAGS} -pg +endif + +#**************************************************************************** +# Preprocessor directives +#**************************************************************************** + +ifeq (YES, ${TINYXML_USE_STL}) + DEFS := -DTIXML_USE_STL +else + DEFS := +endif + +#**************************************************************************** +# Include paths +#**************************************************************************** + +#INCS := -I/usr/include/g++-2 -I/usr/local/include +INCS := + + +#**************************************************************************** +# Makefile code common to all platforms +#**************************************************************************** + +CFLAGS := ${CFLAGS} ${DEFS} +CXXFLAGS := ${CXXFLAGS} ${DEFS} + +#**************************************************************************** +# Targets of the build +#**************************************************************************** + +OUTPUT := xmltest + +all: ${OUTPUT} + + +#**************************************************************************** +# Source files +#**************************************************************************** + +SRCS := tinyxml.cpp tinyxmlparser.cpp xmltest.cpp tinyxmlerror.cpp tinystr.cpp + +# Add on the sources for libraries +SRCS := ${SRCS} + +OBJS := $(addsuffix .o,$(basename ${SRCS})) + +#**************************************************************************** +# Output +#**************************************************************************** + +${OUTPUT}: ${OBJS} + ${LD} -o $@ ${LDFLAGS} ${OBJS} ${LIBS} ${EXTRA_LIBS} + +#**************************************************************************** +# common rules +#**************************************************************************** + +# Rules for compiling source files to object files +%.o : %.cpp + ${CXX} -c ${CXXFLAGS} ${INCS} $< -o $@ + +%.o : %.c + ${CC} -c ${CFLAGS} ${INCS} $< -o $@ + +dist: + bash makedistlinux + +clean: + -rm -f core ${OBJS} ${OUTPUT} + +depend: + #makedepend ${INCS} ${SRCS} + +tinyxml.o: tinyxml.h tinystr.h +tinyxmlparser.o: tinyxml.h tinystr.h +xmltest.o: tinyxml.h tinystr.h +tinyxmlerror.o: tinyxml.h tinystr.h diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/readme.txt electricsheep-3.0.2-git20180325/tinyXml/readme.txt --- electricsheep-2.7~b12+svn20091224/tinyXml/readme.txt 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/readme.txt 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,530 @@ +/** @mainpage + +

TinyXML

+ +TinyXML is a simple, small, C++ XML parser that can be easily +integrated into other programs. + +

What it does.

+ +In brief, TinyXML parses an XML document, and builds from that a +Document Object Model (DOM) that can be read, modified, and saved. + +XML stands for "eXtensible Markup Language." It allows you to create +your own document markups. Where HTML does a very good job of marking +documents for browsers, XML allows you to define any kind of document +markup, for example a document that describes a "to do" list for an +organizer application. XML is a very structured and convenient format. +All those random file formats created to store application data can +all be replaced with XML. One parser for everything. + +The best place for the complete, correct, and quite frankly hard to +read spec is at +http://www.w3.org/TR/2004/REC-xml-20040204/. An intro to XML +(that I really like) can be found at +http://skew.org/xml/tutorial. + +There are different ways to access and interact with XML data. +TinyXML uses a Document Object Model (DOM), meaning the XML data is parsed +into a C++ objects that can be browsed and manipulated, and then +written to disk or another output stream. You can also construct an XML document +from scratch with C++ objects and write this to disk or another output +stream. + +TinyXML is designed to be easy and fast to learn. It is two headers +and four cpp files. Simply add these to your project and off you go. +There is an example file - xmltest.cpp - to get you started. + +TinyXML is released under the ZLib license, +so you can use it in open source or commercial code. The details +of the license are at the top of every source file. + +TinyXML attempts to be a flexible parser, but with truly correct and +compliant XML output. TinyXML should compile on any reasonably C++ +compliant system. It does not rely on exceptions or RTTI. It can be +compiled with or without STL support. TinyXML fully supports +the UTF-8 encoding, and the first 64k character entities. + + +

What it doesn't do.

+ +TinyXML doesn't parse or use DTDs (Document Type Definitions) or XSLs +(eXtensible Stylesheet Language.) There are other parsers out there +(check out www.sourceforge.org, search for XML) that are much more fully +featured. But they are also much bigger, take longer to set up in +your project, have a higher learning curve, and often have a more +restrictive license. If you are working with browsers or have more +complete XML needs, TinyXML is not the parser for you. + +The following DTD syntax will not parse at this time in TinyXML: + +@verbatim + + ]> +@endverbatim + +because TinyXML sees this as a !DOCTYPE node with an illegally +embedded !ELEMENT node. This may be addressed in the future. + +

Tutorials.

+ +For the impatient, here is a tutorial to get you going. A great way to get started, +but it is worth your time to read this (very short) manual completely. + +- @subpage tutorial0 + +

Code Status.

+ +TinyXML is mature, tested code. It is very stable. If you find +bugs, please file a bug report on the sourceforge web site +(www.sourceforge.net/projects/tinyxml). We'll get them straightened +out as soon as possible. + +There are some areas of improvement; please check sourceforge if you are +interested in working on TinyXML. + +

Related Projects

+ +TinyXML projects you may find useful! (Descriptions provided by the projects.) + +
    +
  • TinyXPath (http://tinyxpath.sourceforge.net). TinyXPath is a small footprint + XPath syntax decoder, written in C++.
  • +
  • TinyXML++ (http://code.google.com/p/ticpp/). TinyXML++ is a completely new + interface to TinyXML that uses MANY of the C++ strengths. Templates, + exceptions, and much better error handling.
  • +
+ +

Features

+ +

Using STL

+ +TinyXML can be compiled to use or not use STL. When using STL, TinyXML +uses the std::string class, and fully supports std::istream, std::ostream, +operator<<, and operator>>. Many API methods have both 'const char*' and +'const std::string&' forms. + +When STL support is compiled out, no STL files are included whatsoever. All +the string classes are implemented by TinyXML itself. API methods +all use the 'const char*' form for input. + +Use the compile time #define: + + TIXML_USE_STL + +to compile one version or the other. This can be passed by the compiler, +or set as the first line of "tinyxml.h". + +Note: If compiling the test code in Linux, setting the environment +variable TINYXML_USE_STL=YES/NO will control STL compilation. In the +Windows project file, STL and non STL targets are provided. In your project, +It's probably easiest to add the line "#define TIXML_USE_STL" as the first +line of tinyxml.h. + +

UTF-8

+ +TinyXML supports UTF-8 allowing to manipulate XML files in any language. TinyXML +also supports "legacy mode" - the encoding used before UTF-8 support and +probably best described as "extended ascii". + +Normally, TinyXML will try to detect the correct encoding and use it. However, +by setting the value of TIXML_DEFAULT_ENCODING in the header file, TinyXML +can be forced to always use one encoding. + +TinyXML will assume Legacy Mode until one of the following occurs: +
    +
  1. If the non-standard but common "UTF-8 lead bytes" (0xef 0xbb 0xbf) + begin the file or data stream, TinyXML will read it as UTF-8.
  2. +
  3. If the declaration tag is read, and it has an encoding="UTF-8", then + TinyXML will read it as UTF-8.
  4. +
  5. If the declaration tag is read, and it has no encoding specified, then TinyXML will + read it as UTF-8.
  6. +
  7. If the declaration tag is read, and it has an encoding="something else", then TinyXML + will read it as Legacy Mode. In legacy mode, TinyXML will work as it did before. It's + not clear what that mode does exactly, but old content should keep working.
  8. +
  9. Until one of the above criteria is met, TinyXML runs in Legacy Mode.
  10. +
+ +What happens if the encoding is incorrectly set or detected? TinyXML will try +to read and pass through text seen as improperly encoded. You may get some strange results or +mangled characters. You may want to force TinyXML to the correct mode. + +You may force TinyXML to Legacy Mode by using LoadFile( TIXML_ENCODING_LEGACY ) or +LoadFile( filename, TIXML_ENCODING_LEGACY ). You may force it to use legacy mode all +the time by setting TIXML_DEFAULT_ENCODING = TIXML_ENCODING_LEGACY. Likewise, you may +force it to TIXML_ENCODING_UTF8 with the same technique. + +For English users, using English XML, UTF-8 is the same as low-ASCII. You +don't need to be aware of UTF-8 or change your code in any way. You can think +of UTF-8 as a "superset" of ASCII. + +UTF-8 is not a double byte format - but it is a standard encoding of Unicode! +TinyXML does not use or directly support wchar, TCHAR, or Microsoft's _UNICODE at this time. +It is common to see the term "Unicode" improperly refer to UTF-16, a wide byte encoding +of unicode. This is a source of confusion. + +For "high-ascii" languages - everything not English, pretty much - TinyXML can +handle all languages, at the same time, as long as the XML is encoded +in UTF-8. That can be a little tricky, older programs and operating systems +tend to use the "default" or "traditional" code page. Many apps (and almost all +modern ones) can output UTF-8, but older or stubborn (or just broken) ones +still output text in the default code page. + +For example, Japanese systems traditionally use SHIFT-JIS encoding. +Text encoded as SHIFT-JIS can not be read by TinyXML. +A good text editor can import SHIFT-JIS and then save as UTF-8. + +The Skew.org link does a great +job covering the encoding issue. + +The test file "utf8test.xml" is an XML containing English, Spanish, Russian, +and Simplified Chinese. (Hopefully they are translated correctly). The file +"utf8test.gif" is a screen capture of the XML file, rendered in IE. Note that +if you don't have the correct fonts (Simplified Chinese or Russian) on your +system, you won't see output that matches the GIF file even if you can parse +it correctly. Also note that (at least on my Windows machine) console output +is in a Western code page, so that Print() or printf() cannot correctly display +the file. This is not a bug in TinyXML - just an OS issue. No data is lost or +destroyed by TinyXML. The console just doesn't render UTF-8. + + +

Entities

+TinyXML recognizes the pre-defined "character entities", meaning special +characters. Namely: + +@verbatim + & & + < < + > > + " " + ' ' +@endverbatim + +These are recognized when the XML document is read, and translated to there +UTF-8 equivalents. For instance, text with the XML of: + +@verbatim + Far & Away +@endverbatim + +will have the Value() of "Far & Away" when queried from the TiXmlText object, +and will be written back to the XML stream/file as an ampersand. Older versions +of TinyXML "preserved" character entities, but the newer versions will translate +them into characters. + +Additionally, any character can be specified by its Unicode code point: +The syntax " " or " " are both to the non-breaking space characher. + +

Printing

+TinyXML can print output in several different ways that all have strengths and limitations. + +- Print( FILE* ). Output to a std-C stream, which includes all C files as well as stdout. + - "Pretty prints", but you don't have control over printing options. + - The output is streamed directly to the FILE object, so there is no memory overhead + in the TinyXML code. + - used by Print() and SaveFile() + +- operator<<. Output to a c++ stream. + - Integrates with standart C++ iostreams. + - Outputs in "network printing" mode without line breaks. Good for network transmission + and moving XML between C++ objects, but hard for a human to read. + +- TiXmlPrinter. Output to a std::string or memory buffer. + - API is less concise + - Future printing options will be put here. + - Printing may change slightly in future versions as it is refined and expanded. + +

Streams

+With TIXML_USE_STL on TinyXML supports C++ streams (operator <<,>>) streams as well +as C (FILE*) streams. There are some differences that you may need to be aware of. + +C style output: + - based on FILE* + - the Print() and SaveFile() methods + + Generates formatted output, with plenty of white space, intended to be as + human-readable as possible. They are very fast, and tolerant of ill formed + XML documents. For example, an XML document that contains 2 root elements + and 2 declarations, will still print. + +C style input: + - based on FILE* + - the Parse() and LoadFile() methods + + A fast, tolerant read. Use whenever you don't need the C++ streams. + +C++ style output: + - based on std::ostream + - operator<< + + Generates condensed output, intended for network transmission rather than + readability. Depending on your system's implementation of the ostream class, + these may be somewhat slower. (Or may not.) Not tolerant of ill formed XML: + a document should contain the correct one root element. Additional root level + elements will not be streamed out. + +C++ style input: + - based on std::istream + - operator>> + + Reads XML from a stream, making it useful for network transmission. The tricky + part is knowing when the XML document is complete, since there will almost + certainly be other data in the stream. TinyXML will assume the XML data is + complete after it reads the root element. Put another way, documents that + are ill-constructed with more than one root element will not read correctly. + Also note that operator>> is somewhat slower than Parse, due to both + implementation of the STL and limitations of TinyXML. + +

White space

+The world simply does not agree on whether white space should be kept, or condensed. +For example, pretend the '_' is a space, and look at "Hello____world". HTML, and +at least some XML parsers, will interpret this as "Hello_world". They condense white +space. Some XML parsers do not, and will leave it as "Hello____world". (Remember +to keep pretending the _ is a space.) Others suggest that __Hello___world__ should become +Hello___world. + +It's an issue that hasn't been resolved to my satisfaction. TinyXML supports the +first 2 approaches. Call TiXmlBase::SetCondenseWhiteSpace( bool ) to set the desired behavior. +The default is to condense white space. + +If you change the default, you should call TiXmlBase::SetCondenseWhiteSpace( bool ) +before making any calls to Parse XML data, and I don't recommend changing it after +it has been set. + + +

Handles

+ +Where browsing an XML document in a robust way, it is important to check +for null returns from method calls. An error safe implementation can +generate a lot of code like: + +@verbatim +TiXmlElement* root = document.FirstChildElement( "Document" ); +if ( root ) +{ + TiXmlElement* element = root->FirstChildElement( "Element" ); + if ( element ) + { + TiXmlElement* child = element->FirstChildElement( "Child" ); + if ( child ) + { + TiXmlElement* child2 = child->NextSiblingElement( "Child" ); + if ( child2 ) + { + // Finally do something useful. +@endverbatim + +Handles have been introduced to clean this up. Using the TiXmlHandle class, +the previous code reduces to: + +@verbatim +TiXmlHandle docHandle( &document ); +TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement(); +if ( child2 ) +{ + // do something useful +@endverbatim + +Which is much easier to deal with. See TiXmlHandle for more information. + + +

Row and Column tracking

+Being able to track nodes and attributes back to their origin location +in source files can be very important for some applications. Additionally, +knowing where parsing errors occured in the original source can be very +time saving. + +TinyXML can tracks the row and column origin of all nodes and attributes +in a text file. The TiXmlBase::Row() and TiXmlBase::Column() methods return +the origin of the node in the source text. The correct tabs can be +configured in TiXmlDocument::SetTabSize(). + + +

Using and Installing

+ +To Compile and Run xmltest: + +A Linux Makefile and a Windows Visual C++ .dsw file is provided. +Simply compile and run. It will write the file demotest.xml to your +disk and generate output on the screen. It also tests walking the +DOM by printing out the number of nodes found using different +techniques. + +The Linux makefile is very generic and runs on many systems - it +is currently tested on mingw and +MacOSX. You do not need to run 'make depend'. The dependecies have been +hard coded. + +

Windows project file for VC6

+
    +
  • tinyxml: tinyxml library, non-STL
  • +
  • tinyxmlSTL: tinyxml library, STL
  • +
  • tinyXmlTest: test app, non-STL
  • +
  • tinyXmlTestSTL: test app, STL
  • +
+ +

Makefile

+At the top of the makefile you can set: + +PROFILE, DEBUG, and TINYXML_USE_STL. Details (such that they are) are in +the makefile. + +In the tinyxml directory, type "make clean" then "make". The executable +file 'xmltest' will be created. + + + +

To Use in an Application:

+ +Add tinyxml.cpp, tinyxml.h, tinyxmlerror.cpp, tinyxmlparser.cpp, tinystr.cpp, and tinystr.h to your +project or make file. That's it! It should compile on any reasonably +compliant C++ system. You do not need to enable exceptions or +RTTI for TinyXML. + + +

How TinyXML works.

+ +An example is probably the best way to go. Take: +@verbatim + + + + Go to the Toy store! + Do bills + +@endverbatim + +Its not much of a To Do list, but it will do. To read this file +(say "demo.xml") you would create a document, and parse it in: +@verbatim + TiXmlDocument doc( "demo.xml" ); + doc.LoadFile(); +@endverbatim + +And its ready to go. Now lets look at some lines and how they +relate to the DOM. + +@verbatim + +@endverbatim + + The first line is a declaration, and gets turned into the + TiXmlDeclaration class. It will be the first child of the + document node. + + This is the only directive/special tag parsed by TinyXML. + Generally directive tags are stored in TiXmlUnknown so the + commands wont be lost when it is saved back to disk. + +@verbatim + +@endverbatim + + A comment. Will become a TiXmlComment object. + +@verbatim + +@endverbatim + + The "ToDo" tag defines a TiXmlElement object. This one does not have + any attributes, but does contain 2 other elements. + +@verbatim + +@endverbatim + + Creates another TiXmlElement which is a child of the "ToDo" element. + This element has 1 attribute, with the name "priority" and the value + "1". + +@verbatim +Go to the +@endverbatim + + A TiXmlText. This is a leaf node and cannot contain other nodes. + It is a child of the "Item" TiXmlElement. + +@verbatim + +@endverbatim + + + Another TiXmlElement, this one a child of the "Item" element. + +Etc. + +Looking at the entire object tree, you end up with: +@verbatim +TiXmlDocument "demo.xml" + TiXmlDeclaration "version='1.0'" "standalone=no" + TiXmlComment " Our to do list data" + TiXmlElement "ToDo" + TiXmlElement "Item" Attribtutes: priority = 1 + TiXmlText "Go to the " + TiXmlElement "bold" + TiXmlText "Toy store!" + TiXmlElement "Item" Attributes: priority=2 + TiXmlText "Do bills" +@endverbatim + +

Documentation

+ +The documentation is build with Doxygen, using the 'dox' +configuration file. + +

License

+ +TinyXML is released under the zlib license: + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. + +

References

+ +The World Wide Web Consortium is the definitive standard body for +XML, and their web pages contain huge amounts of information. + +The definitive spec: +http://www.w3.org/TR/2004/REC-xml-20040204/ + +I also recommend "XML Pocket Reference" by Robert Eckstein and published by +OReilly...the book that got the whole thing started. + +

Contributors, Contacts, and a Brief History

+ +Thanks very much to everyone who sends suggestions, bugs, ideas, and +encouragement. It all helps, and makes this project fun. A special thanks +to the contributors on the web pages that keep it lively. + +So many people have sent in bugs and ideas, that rather than list here +we try to give credit due in the "changes.txt" file. + +TinyXML was originally written by Lee Thomason. (Often the "I" still +in the documentation.) Lee reviews changes and releases new versions, +with the help of Yves Berquin, Andrew Ellerton, and the tinyXml community. + +We appreciate your suggestions, and would love to know if you +use TinyXML. Hopefully you will enjoy it and find it useful. +Please post questions, comments, file bugs, or contact us at: + +www.sourceforge.net/projects/tinyxml + +Lee Thomason, Yves Berquin, Andrew Ellerton +*/ diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/tinystr.cpp electricsheep-3.0.2-git20180325/tinyXml/tinystr.cpp --- electricsheep-2.7~b12+svn20091224/tinyXml/tinystr.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/tinystr.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,111 @@ +/* +www.sourceforge.net/projects/tinyxml + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TIXML_USE_STL + +#include "tinystr.h" + +// Error value for find primitive +const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1); + + +// Null rep. +TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } }; + + +void TiXmlString::reserve (size_type cap) +{ + if (cap > capacity()) + { + TiXmlString tmp; + tmp.init(length(), cap); + memcpy(tmp.start(), data(), length()); + swap(tmp); + } +} + + +TiXmlString& TiXmlString::assign(const char* str, size_type len) +{ + size_type cap = capacity(); + if (len > cap || cap > 3*(len + 8)) + { + TiXmlString tmp; + tmp.init(len); + memcpy(tmp.start(), str, len); + swap(tmp); + } + else + { + memmove(start(), str, len); + set_size(len); + } + return *this; +} + + +TiXmlString& TiXmlString::append(const char* str, size_type len) +{ + size_type newsize = length() + len; + if (newsize > capacity()) + { + reserve (newsize + capacity()); + } + memmove(finish(), str, len); + set_size(newsize); + return *this; +} + + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b) +{ + TiXmlString tmp; + tmp.reserve(a.length() + b.length()); + tmp += a; + tmp += b; + return tmp; +} + +TiXmlString operator + (const TiXmlString & a, const char* b) +{ + TiXmlString tmp; + TiXmlString::size_type b_len = static_cast( strlen(b) ); + tmp.reserve(a.length() + b_len); + tmp += a; + tmp.append(b, b_len); + return tmp; +} + +TiXmlString operator + (const char* a, const TiXmlString & b) +{ + TiXmlString tmp; + TiXmlString::size_type a_len = static_cast( strlen(a) ); + tmp.reserve(a_len + b.length()); + tmp.append(a, a_len); + tmp += b; + return tmp; +} + + +#endif // TIXML_USE_STL diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/tinystr.h electricsheep-3.0.2-git20180325/tinyXml/tinystr.h --- electricsheep-2.7~b12+svn20091224/tinyXml/tinystr.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/tinystr.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,305 @@ +/* +www.sourceforge.net/projects/tinyxml + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TIXML_USE_STL + +#ifndef TIXML_STRING_INCLUDED +#define TIXML_STRING_INCLUDED + +#include +#include + +/* The support for explicit isn't that universal, and it isn't really + required - it is used to check that the TiXmlString class isn't incorrectly + used. Be nice to old compilers and macro it here: +*/ +#if defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + #define TIXML_EXPLICIT explicit +#elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + #define TIXML_EXPLICIT explicit +#else + #define TIXML_EXPLICIT +#endif + + +/* + TiXmlString is an emulation of a subset of the std::string template. + Its purpose is to allow compiling TinyXML on compilers with no or poor STL support. + Only the member functions relevant to the TinyXML project have been implemented. + The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase + a string and there's no more room, we allocate a buffer twice as big as we need. +*/ +class TiXmlString +{ + public : + // The size type used + typedef size_t size_type; + + // Error value for find primitive + static const size_type npos; // = -1; + + + // TiXmlString empty constructor + TiXmlString () : rep_(&nullrep_) + { + } + + // TiXmlString copy constructor + TiXmlString ( const TiXmlString & copy) : rep_(0) + { + init(copy.length()); + memcpy(start(), copy.data(), length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0) + { + init( static_cast( strlen(copy) )); + memcpy(start(), copy, length()); + } + + // TiXmlString constructor, based on a string + TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0) + { + init(len); + memcpy(start(), str, len); + } + + // TiXmlString destructor + ~TiXmlString () + { + quit(); + } + + TiXmlString& operator = (const char * copy) + { + return assign( copy, (size_type)strlen(copy)); + } + + TiXmlString& operator = (const TiXmlString & copy) + { + return assign(copy.start(), copy.length()); + } + + + // += operator. Maps to append + TiXmlString& operator += (const char * suffix) + { + return append(suffix, static_cast( strlen(suffix) )); + } + + // += operator. Maps to append + TiXmlString& operator += (char single) + { + return append(&single, 1); + } + + // += operator. Maps to append + TiXmlString& operator += (const TiXmlString & suffix) + { + return append(suffix.data(), suffix.length()); + } + + + // Convert a TiXmlString into a null-terminated char * + const char * c_str () const { return rep_->str; } + + // Convert a TiXmlString into a char * (need not be null terminated). + const char * data () const { return rep_->str; } + + // Return the length of a TiXmlString + size_type length () const { return rep_->size; } + + // Alias for length() + size_type size () const { return rep_->size; } + + // Checks if a TiXmlString is empty + bool empty () const { return rep_->size == 0; } + + // Return capacity of string + size_type capacity () const { return rep_->capacity; } + + + // single char extraction + const char& at (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // [] operator + char& operator [] (size_type index) const + { + assert( index < length() ); + return rep_->str[ index ]; + } + + // find a char in a string. Return TiXmlString::npos if not found + size_type find (char lookup) const + { + return find(lookup, 0); + } + + // find a char in a string from an offset. Return TiXmlString::npos if not found + size_type find (char tofind, size_type offset) const + { + if (offset >= length()) return npos; + + for (const char* p = c_str() + offset; *p != '\0'; ++p) + { + if (*p == tofind) return static_cast< size_type >( p - c_str() ); + } + return npos; + } + + void clear () + { + //Lee: + //The original was just too strange, though correct: + // TiXmlString().swap(*this); + //Instead use the quit & re-init: + quit(); + init(0,0); + } + + /* Function to reserve a big amount of data when we know we'll need it. Be aware that this + function DOES NOT clear the content of the TiXmlString if any exists. + */ + void reserve (size_type cap); + + TiXmlString& assign (const char* str, size_type len); + + TiXmlString& append (const char* str, size_type len); + + void swap (TiXmlString& other) + { + Rep* r = rep_; + rep_ = other.rep_; + other.rep_ = r; + } + + private: + + void init(size_type sz) { init(sz, sz); } + void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\0'; } + char* start() const { return rep_->str; } + char* finish() const { return rep_->str + rep_->size; } + + struct Rep + { + size_type size, capacity; + char str[1]; + }; + + void init(size_type sz, size_type cap) + { + if (cap) + { + // Lee: the original form: + // rep_ = static_cast(operator new(sizeof(Rep) + cap)); + // doesn't work in some cases of new being overloaded. Switching + // to the normal allocation, although use an 'int' for systems + // that are overly picky about structure alignment. + const size_type bytesNeeded = sizeof(Rep) + cap; + const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int ); + rep_ = reinterpret_cast( new int[ intsNeeded ] ); + + rep_->str[ rep_->size = sz ] = '\0'; + rep_->capacity = cap; + } + else + { + rep_ = &nullrep_; + } + } + + void quit() + { + if (rep_ != &nullrep_) + { + // The rep_ is really an array of ints. (see the allocator, above). + // Cast it back before delete, so the compiler won't incorrectly call destructors. + delete [] ( reinterpret_cast( rep_ ) ); + } + } + + Rep * rep_; + static Rep nullrep_; + +} ; + + +inline bool operator == (const TiXmlString & a, const TiXmlString & b) +{ + return ( a.length() == b.length() ) // optimization on some platforms + && ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare +} +inline bool operator < (const TiXmlString & a, const TiXmlString & b) +{ + return strcmp(a.c_str(), b.c_str()) < 0; +} + +inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); } +inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; } +inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); } +inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); } + +inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; } +inline bool operator == (const char* a, const TiXmlString & b) { return b == a; } +inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); } +inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); } + +TiXmlString operator + (const TiXmlString & a, const TiXmlString & b); +TiXmlString operator + (const TiXmlString & a, const char* b); +TiXmlString operator + (const char* a, const TiXmlString & b); + + +/* + TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString. + Only the operators that we need for TinyXML have been developped. +*/ +class TiXmlOutStream : public TiXmlString +{ +public : + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const TiXmlString & in) + { + *this += in; + return *this; + } + + // TiXmlOutStream << operator. + TiXmlOutStream & operator << (const char * in) + { + *this += in; + return *this; + } + +} ; + +#endif // TIXML_STRING_INCLUDED +#endif // TIXML_USE_STL diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/tinyXml.cbp electricsheep-3.0.2-git20180325/tinyXml/tinyXml.cbp --- electricsheep-2.7~b12+svn20091224/tinyXml/tinyXml.cbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/tinyXml.cbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,81 @@ + + + + + + diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/tinyxml.cpp electricsheep-3.0.2-git20180325/tinyXml/tinyxml.cpp --- electricsheep-2.7~b12+svn20091224/tinyXml/tinyxml.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/tinyxml.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,1889 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include + +#ifdef TIXML_USE_STL +#include +#include +#endif + +#include "tinyxml.h" + +FILE* TiXmlFOpen( const char* filename, const char* mode ); + +bool TiXmlBase::condenseWhiteSpace = true; + +// Microsoft compiler security +FILE* TiXmlFOpen( const char* filename, const char* mode ) +{ + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + FILE* fp = 0; + errno_t err = fopen_s( &fp, filename, mode ); + if ( !err && fp ) + return fp; + return 0; + #else + return fopen( filename, mode ); + #endif +} + +void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString ) +{ + int i=0; + + while( i<(int)str.length() ) + { + unsigned char c = (unsigned char) str[i]; + + if ( c == '&' + && i < ( (int)str.length() - 2 ) + && str[i+1] == '#' + && str[i+2] == 'x' ) + { + // Hexadecimal character reference. + // Pass through unchanged. + // © -- copyright symbol, for example. + // + // The -1 is a bug fix from Rob Laveaux. It keeps + // an overflow from happening if there is no ';'. + // There are actually 2 ways to exit this loop - + // while fails (error case) and break (semicolon found). + // However, there is no mechanism (currently) for + // this function to return an error. + while ( i<(int)str.length()-1 ) + { + outString->append( str.c_str() + i, 1 ); + ++i; + if ( str[i] == ';' ) + break; + } + } + else if ( c == '&' ) + { + outString->append( entity[0].str, entity[0].strLength ); + ++i; + } + else if ( c == '<' ) + { + outString->append( entity[1].str, entity[1].strLength ); + ++i; + } + else if ( c == '>' ) + { + outString->append( entity[2].str, entity[2].strLength ); + ++i; + } + else if ( c == '\"' ) + { + outString->append( entity[3].str, entity[3].strLength ); + ++i; + } + else if ( c == '\'' ) + { + outString->append( entity[4].str, entity[4].strLength ); + ++i; + } + else if ( c < 32 ) + { + // Easy pass at non-alpha/numeric/symbol + // Below 32 is symbolic. + char buf[ 32 ]; + + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) ); + #else + sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) ); + #endif + + //*ME: warning C4267: convert 'size_t' to 'int' + //*ME: Int-Cast to make compiler happy ... + outString->append( buf, (int)strlen( buf ) ); + ++i; + } + else + { + //char realc = (char) c; + //outString->append( &realc, 1 ); + *outString += (char) c; // somewhat more efficient function call. + ++i; + } + } +} + + +TiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase() +{ + parent = 0; + type = _type; + firstChild = 0; + lastChild = 0; + prev = 0; + next = 0; +} + + +TiXmlNode::~TiXmlNode() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } +} + + +void TiXmlNode::CopyTo( TiXmlNode* target ) const +{ + target->SetValue (value.c_str() ); + target->userData = userData; + target->location = location; +} + + +void TiXmlNode::Clear() +{ + TiXmlNode* node = firstChild; + TiXmlNode* temp = 0; + + while ( node ) + { + temp = node; + node = node->next; + delete temp; + } + + firstChild = 0; + lastChild = 0; +} + + +TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node ) +{ + assert( node->parent == 0 || node->parent == this ); + assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() ); + + if ( node->Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + delete node; + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + node->parent = this; + + node->prev = lastChild; + node->next = 0; + + if ( lastChild ) + lastChild->next = node; + else + firstChild = node; // it was an empty list. + + lastChild = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis ) +{ + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + + return LinkEndChild( node ); +} + + +TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ) +{ + if ( !beforeThis || beforeThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->next = beforeThis; + node->prev = beforeThis->prev; + if ( beforeThis->prev ) + { + beforeThis->prev->next = node; + } + else + { + assert( firstChild == beforeThis ); + firstChild = node; + } + beforeThis->prev = node; + return node; +} + + +TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ) +{ + if ( !afterThis || afterThis->parent != this ) { + return 0; + } + if ( addThis.Type() == TiXmlNode::TINYXML_DOCUMENT ) + { + if ( GetDocument() ) + GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = addThis.Clone(); + if ( !node ) + return 0; + node->parent = this; + + node->prev = afterThis; + node->next = afterThis->next; + if ( afterThis->next ) + { + afterThis->next->prev = node; + } + else + { + assert( lastChild == afterThis ); + lastChild = node; + } + afterThis->next = node; + return node; +} + + +TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ) +{ + if ( !replaceThis ) + return 0; + + if ( replaceThis->parent != this ) + return 0; + + if ( withThis.ToDocument() ) { + // A document can never be a child. Thanks to Noam. + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + TiXmlNode* node = withThis.Clone(); + if ( !node ) + return 0; + + node->next = replaceThis->next; + node->prev = replaceThis->prev; + + if ( replaceThis->next ) + replaceThis->next->prev = node; + else + lastChild = node; + + if ( replaceThis->prev ) + replaceThis->prev->next = node; + else + firstChild = node; + + delete replaceThis; + node->parent = this; + return node; +} + + +bool TiXmlNode::RemoveChild( TiXmlNode* removeThis ) +{ + if ( !removeThis ) { + return false; + } + + if ( removeThis->parent != this ) + { + assert( 0 ); + return false; + } + + if ( removeThis->next ) + removeThis->next->prev = removeThis->prev; + else + lastChild = removeThis->prev; + + if ( removeThis->prev ) + removeThis->prev->next = removeThis->next; + else + firstChild = removeThis->next; + + delete removeThis; + return true; +} + +const TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = firstChild; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::LastChild( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = lastChild; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild(); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling(); + } +} + + +const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const +{ + if ( !previous ) + { + return FirstChild( val ); + } + else + { + assert( previous->parent == this ); + return previous->NextSibling( val ); + } +} + + +const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = next; node; node = node->next ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +const TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const +{ + const TiXmlNode* node; + for ( node = prev; node; node = node->prev ) + { + if ( strcmp( node->Value(), _value ) == 0 ) + return node; + } + return 0; +} + + +void TiXmlElement::RemoveAttribute( const char * name ) +{ + #ifdef TIXML_USE_STL + TIXML_STRING str( name ); + TiXmlAttribute* node = attributeSet.Find( str ); + #else + TiXmlAttribute* node = attributeSet.Find( name ); + #endif + if ( node ) + { + attributeSet.Remove( node ); + delete node; + } +} + +const TiXmlElement* TiXmlNode::FirstChildElement() const +{ + const TiXmlNode* node; + + for ( node = FirstChild(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = FirstChild( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement() const +{ + const TiXmlNode* node; + + for ( node = NextSibling(); + node; + node = node->NextSibling() ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const +{ + const TiXmlNode* node; + + for ( node = NextSibling( _value ); + node; + node = node->NextSibling( _value ) ) + { + if ( node->ToElement() ) + return node->ToElement(); + } + return 0; +} + + +const TiXmlDocument* TiXmlNode::GetDocument() const +{ + const TiXmlNode* node; + + for( node = this; node; node = node->parent ) + { + if ( node->ToDocument() ) + return node->ToDocument(); + } + return 0; +} + + +TiXmlElement::TiXmlElement (const char * _value) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} + + +#ifdef TIXML_USE_STL +TiXmlElement::TiXmlElement( const std::string& _value ) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + value = _value; +} +#endif + + +TiXmlElement::TiXmlElement( const TiXmlElement& copy) + : TiXmlNode( TiXmlNode::TINYXML_ELEMENT ) +{ + firstChild = lastChild = 0; + copy.CopyTo( this ); +} + + +TiXmlElement& TiXmlElement::operator=( const TiXmlElement& base ) +{ + ClearThis(); + base.CopyTo( this ); + return *this; +} + + +TiXmlElement::~TiXmlElement() +{ + ClearThis(); +} + + +void TiXmlElement::ClearThis() +{ + Clear(); + while( attributeSet.First() ) + { + TiXmlAttribute* node = attributeSet.First(); + attributeSet.Remove( node ); + delete node; + } +} + + +const char* TiXmlElement::Attribute( const char* name ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( node ) + return node->Value(); + return 0; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( attrib ) + return &attrib->ValueStr(); + return 0; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( i ) { + attrib->QueryIntValue( i ); + } + } + return result; +} +#endif + + +const char* TiXmlElement::Attribute( const char* name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const char* result = 0; + + if ( attrib ) { + result = attrib->Value(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} + + +#ifdef TIXML_USE_STL +const std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + const std::string* result = 0; + + if ( attrib ) { + result = &attrib->ValueStr(); + if ( d ) { + attrib->QueryDoubleValue( d ); + } + } + return result; +} +#endif + + +int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} + + +int TiXmlElement::QueryUnsignedAttribute( const char* name, unsigned* value ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + int ival = 0; + int result = node->QueryIntValue( &ival ); + *value = (unsigned)ival; + return result; +} + + +int TiXmlElement::QueryBoolAttribute( const char* name, bool* bval ) const +{ + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + int result = TIXML_WRONG_TYPE; + if ( StringEqual( node->Value(), "true", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "yes", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "1", true, TIXML_ENCODING_UNKNOWN ) ) + { + *bval = true; + result = TIXML_SUCCESS; + } + else if ( StringEqual( node->Value(), "false", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "no", true, TIXML_ENCODING_UNKNOWN ) + || StringEqual( node->Value(), "0", true, TIXML_ENCODING_UNKNOWN ) ) + { + *bval = false; + result = TIXML_SUCCESS; + } + return result; +} + + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryIntValue( ival ); +} +#endif + + +int TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} + + +#ifdef TIXML_USE_STL +int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const +{ + const TiXmlAttribute* attrib = attributeSet.Find( name ); + if ( !attrib ) + return TIXML_NO_ATTRIBUTE; + return attrib->QueryDoubleValue( dval ); +} +#endif + + +void TiXmlElement::SetAttribute( const char * name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& name, int val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetIntValue( val ); + } +} +#endif + + +void TiXmlElement::SetDoubleAttribute( const char * name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetDoubleAttribute( const std::string& name, double val ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( name ); + if ( attrib ) { + attrib->SetDoubleValue( val ); + } +} +#endif + + +void TiXmlElement::SetAttribute( const char * cname, const char * cvalue ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( cname ); + if ( attrib ) { + attrib->SetValue( cvalue ); + } +} + + +#ifdef TIXML_USE_STL +void TiXmlElement::SetAttribute( const std::string& _name, const std::string& _value ) +{ + TiXmlAttribute* attrib = attributeSet.FindOrCreate( _name ); + if ( attrib ) { + attrib->SetValue( _value ); + } +} +#endif + + +void TiXmlElement::Print( FILE* cfile, int depth ) const +{ + int i; + assert( cfile ); + for ( i=0; iNext() ) + { + fprintf( cfile, " " ); + attrib->Print( cfile, depth ); + } + + // There are 3 different formatting approaches: + // 1) An element without children is printed as a node + // 2) An element with only a text child is printed as text + // 3) An element with children is printed on multiple lines. + TiXmlNode* node; + if ( !firstChild ) + { + fprintf( cfile, " />" ); + } + else if ( firstChild == lastChild && firstChild->ToText() ) + { + fprintf( cfile, ">" ); + firstChild->Print( cfile, depth + 1 ); + fprintf( cfile, "", value.c_str() ); + } + else + { + fprintf( cfile, ">" ); + + for ( node = firstChild; node; node=node->NextSibling() ) + { + if ( !node->ToText() ) + { + fprintf( cfile, "\n" ); + } + node->Print( cfile, depth+1 ); + } + fprintf( cfile, "\n" ); + for( i=0; i", value.c_str() ); + } +} + + +void TiXmlElement::CopyTo( TiXmlElement* target ) const +{ + // superclass: + TiXmlNode::CopyTo( target ); + + // Element class: + // Clone the attributes, then clone the children. + const TiXmlAttribute* attribute = 0; + for( attribute = attributeSet.First(); + attribute; + attribute = attribute->Next() ) + { + target->SetAttribute( attribute->Name(), attribute->Value() ); + } + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + +bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this, attributeSet.First() ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +TiXmlNode* TiXmlElement::Clone() const +{ + TiXmlElement* clone = new TiXmlElement( Value() ); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +const char* TiXmlElement::GetText() const +{ + const TiXmlNode* child = this->FirstChild(); + if ( child ) { + const TiXmlText* childText = child->ToText(); + if ( childText ) { + return childText->Value(); + } + } + return 0; +} + + +TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + ClearError(); +} + +TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} + + +#ifdef TIXML_USE_STL +TiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + tabsize = 4; + useMicrosoftBOM = false; + value = documentName; + ClearError(); +} +#endif + + +TiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::TINYXML_DOCUMENT ) +{ + copy.CopyTo( this ); +} + + +TiXmlDocument& TiXmlDocument::operator=( const TiXmlDocument& copy ) +{ + Clear(); + copy.CopyTo( this ); + return *this; +} + + +bool TiXmlDocument::LoadFile( TiXmlEncoding encoding ) +{ + return LoadFile( Value(), encoding ); +} + + +bool TiXmlDocument::SaveFile() const +{ + return SaveFile( Value() ); +} + +bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding ) +{ + TIXML_STRING filename( _filename ); + value = filename; + + // reading in binary mode so that tinyxml can normalize the EOL + FILE* file = TiXmlFOpen( value.c_str (), "rb" ); + + if ( file ) + { + bool result = LoadFile( file, encoding ); + fclose( file ); + return result; + } + else + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } +} + +bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding ) +{ + if ( !file ) + { + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Delete the existing data: + Clear(); + location.Clear(); + + // Get the file size, so we can pre-allocate the string. HUGE speed impact. + long length = 0; + fseek( file, 0, SEEK_END ); + length = ftell( file ); + fseek( file, 0, SEEK_SET ); + + // Strange case, but good to handle up front. + if ( length <= 0 ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Subtle bug here. TinyXml did use fgets. But from the XML spec: + // 2.11 End-of-Line Handling + // + // + // ...the XML processor MUST behave as if it normalized all line breaks in external + // parsed entities (including the document entity) on input, before parsing, by translating + // both the two-character sequence #xD #xA and any #xD that is not followed by #xA to + // a single #xA character. + // + // + // It is not clear fgets does that, and certainly isn't clear it works cross platform. + // Generally, you expect fgets to translate from the convention of the OS to the c/unix + // convention, and not work generally. + + /* + while( fgets( buf, sizeof(buf), file ) ) + { + data += buf; + } + */ + + char* buf = new char[ length+1 ]; + buf[0] = 0; + + if ( fread( buf, length, 1, file ) != 1 ) { + delete [] buf; + SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN ); + return false; + } + + // Process the buffer in place to normalize new lines. (See comment above.) + // Copies from the 'p' to 'q' pointer, where p can advance faster if + // a newline-carriage return is hit. + // + // Wikipedia: + // Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or + // CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, 0x0D 0x0A)... + // * LF: Multics, Unix and Unix-like systems (GNU/Linux, AIX, Xenix, Mac OS X, FreeBSD, etc.), BeOS, Amiga, RISC OS, and others + // * CR+LF: DEC RT-11 and most other early non-Unix, non-IBM OSes, CP/M, MP/M, DOS, OS/2, Microsoft Windows, Symbian OS + // * CR: Commodore 8-bit machines, Apple II family, Mac OS up to version 9 and OS-9 + + const char* p = buf; // the read head + char* q = buf; // the write head + const char CR = 0x0d; + const char LF = 0x0a; + + buf[length] = 0; + while( *p ) { + assert( p < (buf+length) ); + assert( q <= (buf+length) ); + assert( q <= p ); + + if ( *p == CR ) { + *q++ = LF; + p++; + if ( *p == LF ) { // check for CR+LF (and skip LF) + p++; + } + } + else { + *q++ = *p++; + } + } + assert( q <= (buf+length) ); + *q = 0; + + Parse( buf, 0, encoding ); + + delete [] buf; + return !Error(); +} + + +bool TiXmlDocument::SaveFile( const char * filename ) const +{ + // The old c stuff lives on... + FILE* fp = TiXmlFOpen( filename, "w" ); + if ( fp ) + { + bool result = SaveFile( fp ); + fclose( fp ); + return result; + } + return false; +} + + +bool TiXmlDocument::SaveFile( FILE* fp ) const +{ + if ( useMicrosoftBOM ) + { + const unsigned char TIXML_UTF_LEAD_0 = 0xefU; + const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; + const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + + fputc( TIXML_UTF_LEAD_0, fp ); + fputc( TIXML_UTF_LEAD_1, fp ); + fputc( TIXML_UTF_LEAD_2, fp ); + } + Print( fp, 0 ); + return (ferror(fp) == 0); +} + + +void TiXmlDocument::CopyTo( TiXmlDocument* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->error = error; + target->errorId = errorId; + target->errorDesc = errorDesc; + target->tabsize = tabsize; + target->errorLocation = errorLocation; + target->useMicrosoftBOM = useMicrosoftBOM; + + TiXmlNode* node = 0; + for ( node = firstChild; node; node = node->NextSibling() ) + { + target->LinkEndChild( node->Clone() ); + } +} + + +TiXmlNode* TiXmlDocument::Clone() const +{ + TiXmlDocument* clone = new TiXmlDocument(); + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlDocument::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + node->Print( cfile, depth ); + fprintf( cfile, "\n" ); + } +} + + +bool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const +{ + if ( visitor->VisitEnter( *this ) ) + { + for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() ) + { + if ( !node->Accept( visitor ) ) + break; + } + } + return visitor->VisitExit( *this ); +} + + +const TiXmlAttribute* TiXmlAttribute::Next() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} + +/* +TiXmlAttribute* TiXmlAttribute::Next() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( next->value.empty() && next->name.empty() ) + return 0; + return next; +} +*/ + +const TiXmlAttribute* TiXmlAttribute::Previous() const +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} + +/* +TiXmlAttribute* TiXmlAttribute::Previous() +{ + // We are using knowledge of the sentinel. The sentinel + // have a value or name. + if ( prev->value.empty() && prev->name.empty() ) + return 0; + return prev; +} +*/ + +void TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + TIXML_STRING n, v; + + EncodeString( name, &n ); + EncodeString( value, &v ); + + if (value.find ('\"') == TIXML_STRING::npos) { + if ( cfile ) { + fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "=\""; (*str) += v; (*str) += "\""; + } + } + else { + if ( cfile ) { + fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() ); + } + if ( str ) { + (*str) += n; (*str) += "='"; (*str) += v; (*str) += "'"; + } + } +} + + +int TiXmlAttribute::QueryIntValue( int* ival ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%d", ival ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +int TiXmlAttribute::QueryDoubleValue( double* dval ) const +{ + if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; +} + +void TiXmlAttribute::SetIntValue( int _value ) +{ + char buf [64]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value); + #else + sprintf (buf, "%d", _value); + #endif + SetValue (buf); +} + +void TiXmlAttribute::SetDoubleValue( double _value ) +{ + char buf [256]; + #if defined(TIXML_SNPRINTF) + TIXML_SNPRINTF( buf, sizeof(buf), "%g", _value); + #else + sprintf (buf, "%g", _value); + #endif + SetValue (buf); +} + +int TiXmlAttribute::IntValue() const +{ + return atoi (value.c_str ()); +} + +double TiXmlAttribute::DoubleValue() const +{ + return atof (value.c_str ()); +} + + +TiXmlComment::TiXmlComment( const TiXmlComment& copy ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) +{ + copy.CopyTo( this ); +} + + +TiXmlComment& TiXmlComment::operator=( const TiXmlComment& base ) +{ + Clear(); + base.CopyTo( this ); + return *this; +} + + +void TiXmlComment::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlComment::CopyTo( TiXmlComment* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlComment::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlComment::Clone() const +{ + TiXmlComment* clone = new TiXmlComment(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlText::Print( FILE* cfile, int depth ) const +{ + assert( cfile ); + if ( cdata ) + { + int i; + fprintf( cfile, "\n" ); + for ( i=0; i\n", value.c_str() ); // unformatted output + } + else + { + TIXML_STRING buffer; + EncodeString( value, &buffer ); + fprintf( cfile, "%s", buffer.c_str() ); + } +} + + +void TiXmlText::CopyTo( TiXmlText* target ) const +{ + TiXmlNode::CopyTo( target ); + target->cdata = cdata; +} + + +bool TiXmlText::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlText::Clone() const +{ + TiXmlText* clone = 0; + clone = new TiXmlText( "" ); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlDeclaration::TiXmlDeclaration( const char * _version, + const char * _encoding, + const char * _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} + + +#ifdef TIXML_USE_STL +TiXmlDeclaration::TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + version = _version; + encoding = _encoding; + standalone = _standalone; +} +#endif + + +TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy ) + : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) +{ + copy.CopyTo( this ); +} + + +TiXmlDeclaration& TiXmlDeclaration::operator=( const TiXmlDeclaration& copy ) +{ + Clear(); + copy.CopyTo( this ); + return *this; +} + + +void TiXmlDeclaration::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const +{ + if ( cfile ) fprintf( cfile, "" ); + if ( str ) (*str) += "?>"; +} + + +void TiXmlDeclaration::CopyTo( TiXmlDeclaration* target ) const +{ + TiXmlNode::CopyTo( target ); + + target->version = version; + target->encoding = encoding; + target->standalone = standalone; +} + + +bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlDeclaration::Clone() const +{ + TiXmlDeclaration* clone = new TiXmlDeclaration(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +void TiXmlUnknown::Print( FILE* cfile, int depth ) const +{ + for ( int i=0; i", value.c_str() ); +} + + +void TiXmlUnknown::CopyTo( TiXmlUnknown* target ) const +{ + TiXmlNode::CopyTo( target ); +} + + +bool TiXmlUnknown::Accept( TiXmlVisitor* visitor ) const +{ + return visitor->Visit( *this ); +} + + +TiXmlNode* TiXmlUnknown::Clone() const +{ + TiXmlUnknown* clone = new TiXmlUnknown(); + + if ( !clone ) + return 0; + + CopyTo( clone ); + return clone; +} + + +TiXmlAttributeSet::TiXmlAttributeSet() +{ + sentinel.next = &sentinel; + sentinel.prev = &sentinel; +} + + +TiXmlAttributeSet::~TiXmlAttributeSet() +{ + assert( sentinel.next == &sentinel ); + assert( sentinel.prev == &sentinel ); +} + + +void TiXmlAttributeSet::Add( TiXmlAttribute* addMe ) +{ + #ifdef TIXML_USE_STL + assert( !Find( TIXML_STRING( addMe->Name() ) ) ); // Shouldn't be multiply adding to the set. + #else + assert( !Find( addMe->Name() ) ); // Shouldn't be multiply adding to the set. + #endif + + addMe->next = &sentinel; + addMe->prev = sentinel.prev; + + sentinel.prev->next = addMe; + sentinel.prev = addMe; +} + +void TiXmlAttributeSet::Remove( TiXmlAttribute* removeMe ) +{ + TiXmlAttribute* node; + + if (removeMe == NULL) + return; + + for( node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node == removeMe ) + { + node->prev->next = node->next; + node->next->prev = node->prev; + node->next = 0; + node->prev = 0; + return; + } + } + assert( 0 ); // we tried to remove a non-linked attribute. +} + + +#ifdef TIXML_USE_STL +TiXmlAttribute* TiXmlAttributeSet::Find( const std::string& name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( node->name == name ) + return node; + } + return 0; +} + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const std::string& _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} +#endif + + +TiXmlAttribute* TiXmlAttributeSet::Find( const char* name ) const +{ + for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next ) + { + if ( strcmp( node->name.c_str(), name ) == 0 ) + return node; + } + return 0; +} + + +TiXmlAttribute* TiXmlAttributeSet::FindOrCreate( const char* _name ) +{ + TiXmlAttribute* attrib = Find( _name ); + if ( !attrib ) { + attrib = new TiXmlAttribute(); + Add( attrib ); + attrib->SetName( _name ); + } + return attrib; +} + + +#ifdef TIXML_USE_STL +std::istream& operator>> (std::istream & in, TiXmlNode & base) +{ + TIXML_STRING tag; + tag.reserve( 8 * 1000 ); + base.StreamIn( &in, &tag ); + + base.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING ); + return in; +} +#endif + + +#ifdef TIXML_USE_STL +std::ostream& operator<< (std::ostream & out, const TiXmlNode & base) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out << printer.Str(); + + return out; +} + + +std::string& operator<< (std::string& out, const TiXmlNode& base ) +{ + TiXmlPrinter printer; + printer.SetStreamPrinting(); + base.Accept( &printer ); + out.append( printer.Str() ); + + return out; +} +#endif + + +TiXmlHandle TiXmlHandle::FirstChild() const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChild( const char * value ) const +{ + if ( node ) + { + TiXmlNode* child = node->FirstChild( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement() const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement(); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::FirstChildElement( const char * value ) const +{ + if ( node ) + { + TiXmlElement* child = node->FirstChildElement( value ); + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild(); + for ( i=0; + child && iNextSibling(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::Child( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlNode* child = node->FirstChild( value ); + for ( i=0; + child && iNextSibling( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement(); + for ( i=0; + child && iNextSiblingElement(), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +TiXmlHandle TiXmlHandle::ChildElement( const char* value, int count ) const +{ + if ( node ) + { + int i; + TiXmlElement* child = node->FirstChildElement( value ); + for ( i=0; + child && iNextSiblingElement( value ), ++i ) + { + // nothing + } + if ( child ) + return TiXmlHandle( child ); + } + return TiXmlHandle( 0 ); +} + + +bool TiXmlPrinter::VisitEnter( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitExit( const TiXmlDocument& ) +{ + return true; +} + +bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ) +{ + DoIndent(); + buffer += "<"; + buffer += element.Value(); + + for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() ) + { + buffer += " "; + attrib->Print( 0, 0, &buffer ); + } + + if ( !element.FirstChild() ) + { + buffer += " />"; + DoLineBreak(); + } + else + { + buffer += ">"; + if ( element.FirstChild()->ToText() + && element.LastChild() == element.FirstChild() + && element.FirstChild()->ToText()->CDATA() == false ) + { + simpleTextPrint = true; + // no DoLineBreak()! + } + else + { + DoLineBreak(); + } + } + ++depth; + return true; +} + + +bool TiXmlPrinter::VisitExit( const TiXmlElement& element ) +{ + --depth; + if ( !element.FirstChild() ) + { + // nothing. + } + else + { + if ( simpleTextPrint ) + { + simpleTextPrint = false; + } + else + { + DoIndent(); + } + buffer += ""; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlText& text ) +{ + if ( text.CDATA() ) + { + DoIndent(); + buffer += ""; + DoLineBreak(); + } + else if ( simpleTextPrint ) + { + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + } + else + { + DoIndent(); + TIXML_STRING str; + TiXmlBase::EncodeString( text.ValueTStr(), &str ); + buffer += str; + DoLineBreak(); + } + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration ) +{ + DoIndent(); + declaration.Print( 0, 0, &buffer ); + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlComment& comment ) +{ + DoIndent(); + buffer += ""; + DoLineBreak(); + return true; +} + + +bool TiXmlPrinter::Visit( const TiXmlUnknown& unknown ) +{ + DoIndent(); + buffer += "<"; + buffer += unknown.Value(); + buffer += ">"; + DoLineBreak(); + return true; +} + diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/tinyxmlerror.cpp electricsheep-3.0.2-git20180325/tinyXml/tinyxmlerror.cpp --- electricsheep-2.7~b12+svn20091224/tinyXml/tinyxmlerror.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/tinyxmlerror.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,52 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include "tinyxml.h" + +// The goal of the seperate error file is to make the first +// step towards localization. tinyxml (currently) only supports +// english error messages, but the could now be translated. +// +// It also cleans up the code a bit. +// + +const char* TiXmlBase::errorString[ TiXmlBase::TIXML_ERROR_STRING_COUNT ] = +{ + "No error", + "Error", + "Failed to open file", + "Error parsing Element.", + "Failed to read Element name", + "Error reading Element value.", + "Error reading Attributes.", + "Error: empty tag.", + "Error reading end tag.", + "Error parsing Unknown.", + "Error parsing Comment.", + "Error parsing Declaration.", + "Error document empty.", + "Error null (0) or unexpected EOF found in input stream.", + "Error parsing CDATA.", + "Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.", +}; diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/tinyxml.h electricsheep-3.0.2-git20180325/tinyXml/tinyxml.h --- electricsheep-2.7~b12+svn20091224/tinyXml/tinyxml.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/tinyxml.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,1805 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + + +#ifndef TINYXML_INCLUDED +#define TINYXML_INCLUDED + +#ifdef _MSC_VER +#pragma warning( push ) +#pragma warning( disable : 4530 ) +#pragma warning( disable : 4786 ) +#endif + +#include +#include +#include +#include +#include + +// Help out windows: +#if defined( _DEBUG ) && !defined( DEBUG ) +#define DEBUG +#endif + +#ifdef TIXML_USE_STL + #include + #include + #include + #define TIXML_STRING std::string +#else + #include "tinystr.h" + #define TIXML_STRING TiXmlString +#endif + +// Deprecated library function hell. Compilers want to use the +// new safe versions. This probably doesn't fully address the problem, +// but it gets closer. There are too many compilers for me to fully +// test. If you get compilation troubles, undefine TIXML_SAFE +#define TIXML_SAFE + +#ifdef TIXML_SAFE + #if defined(_MSC_VER) && (_MSC_VER >= 1400 ) + // Microsoft visual studio, version 2005 and higher. + #define TIXML_SNPRINTF _snprintf_s + #define TIXML_SSCANF sscanf_s + #elif defined(_MSC_VER) && (_MSC_VER >= 1200 ) + // Microsoft visual studio, version 6 and higher. + //#pragma message( "Using _sn* functions." ) + #define TIXML_SNPRINTF _snprintf + #define TIXML_SSCANF sscanf + #elif defined(__GNUC__) && (__GNUC__ >= 3 ) + // GCC version 3 and higher.s + //#warning( "Using sn* functions." ) + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #else + #define TIXML_SNPRINTF snprintf + #define TIXML_SSCANF sscanf + #endif +#endif + +class TiXmlDocument; +class TiXmlElement; +class TiXmlComment; +class TiXmlUnknown; +class TiXmlAttribute; +class TiXmlText; +class TiXmlDeclaration; +class TiXmlParsingData; + +const int TIXML_MAJOR_VERSION = 2; +const int TIXML_MINOR_VERSION = 6; +const int TIXML_PATCH_VERSION = 2; + +/* Internal structure for tracking location of items + in the XML file. +*/ +struct TiXmlCursor +{ + TiXmlCursor() { Clear(); } + void Clear() { row = col = -1; } + + int row; // 0 based. + int col; // 0 based. +}; + + +/** + Implements the interface to the "Visitor pattern" (see the Accept() method.) + If you call the Accept() method, it requires being passed a TiXmlVisitor + class to handle callbacks. For nodes that contain other nodes (Document, Element) + you will get called with a VisitEnter/VisitExit pair. Nodes that are always leaves + are simply called with Visit(). + + If you return 'true' from a Visit method, recursive parsing will continue. If you return + false, no children of this node or its sibilings will be Visited. + + All flavors of Visit methods have a default implementation that returns 'true' (continue + visiting). You need to only override methods that are interesting to you. + + Generally Accept() is called on the TiXmlDocument, although all nodes suppert Visiting. + + You should never change the document from a callback. + + @sa TiXmlNode::Accept() +*/ +class TiXmlVisitor +{ +public: + virtual ~TiXmlVisitor() {} + + /// Visit a document. + virtual bool VisitEnter( const TiXmlDocument& /*doc*/ ) { return true; } + /// Visit a document. + virtual bool VisitExit( const TiXmlDocument& /*doc*/ ) { return true; } + + /// Visit an element. + virtual bool VisitEnter( const TiXmlElement& /*element*/, const TiXmlAttribute* /*firstAttribute*/ ) { return true; } + /// Visit an element. + virtual bool VisitExit( const TiXmlElement& /*element*/ ) { return true; } + + /// Visit a declaration + virtual bool Visit( const TiXmlDeclaration& /*declaration*/ ) { return true; } + /// Visit a text node + virtual bool Visit( const TiXmlText& /*text*/ ) { return true; } + /// Visit a comment node + virtual bool Visit( const TiXmlComment& /*comment*/ ) { return true; } + /// Visit an unknown node + virtual bool Visit( const TiXmlUnknown& /*unknown*/ ) { return true; } +}; + +// Only used by Attribute::Query functions +enum +{ + TIXML_SUCCESS, + TIXML_NO_ATTRIBUTE, + TIXML_WRONG_TYPE +}; + + +// Used by the parsing routines. +enum TiXmlEncoding +{ + TIXML_ENCODING_UNKNOWN, + TIXML_ENCODING_UTF8, + TIXML_ENCODING_LEGACY +}; + +const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN; + +/** TiXmlBase is a base class for every class in TinyXml. + It does little except to establish that TinyXml classes + can be printed and provide some utility functions. + + In XML, the document and elements can contain + other elements and other types of nodes. + + @verbatim + A Document can contain: Element (container or leaf) + Comment (leaf) + Unknown (leaf) + Declaration( leaf ) + + An Element can contain: Element (container or leaf) + Text (leaf) + Attributes (not on tree) + Comment (leaf) + Unknown (leaf) + + A Decleration contains: Attributes (not on tree) + @endverbatim +*/ +class TiXmlBase +{ + friend class TiXmlNode; + friend class TiXmlElement; + friend class TiXmlDocument; + +public: + TiXmlBase() : userData(0) {} + virtual ~TiXmlBase() {} + + /** All TinyXml classes can print themselves to a filestream + or the string class (TiXmlString in non-STL mode, std::string + in STL mode.) Either or both cfile and str can be null. + + This is a formatted print, and will insert + tabs and newlines. + + (For an unformatted stream, use the << operator.) + */ + virtual void Print( FILE* cfile, int depth ) const = 0; + + /** The world does not agree on whether white space should be kept or + not. In order to make everyone happy, these global, static functions + are provided to set whether or not TinyXml will condense all white space + into a single space or not. The default is to condense. Note changing this + value is not thread safe. + */ + static void SetCondenseWhiteSpace( bool condense ) { condenseWhiteSpace = condense; } + + /// Return the current white space setting. + static bool IsWhiteSpaceCondensed() { return condenseWhiteSpace; } + + /** Return the position, in the original source file, of this node or attribute. + The row and column are 1-based. (That is the first row and first column is + 1,1). If the returns values are 0 or less, then the parser does not have + a row and column value. + + Generally, the row and column value will be set when the TiXmlDocument::Load(), + TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set + when the DOM was created from operator>>. + + The values reflect the initial load. Once the DOM is modified programmatically + (by adding or changing nodes and attributes) the new values will NOT update to + reflect changes in the document. + + There is a minor performance cost to computing the row and column. Computation + can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value. + + @sa TiXmlDocument::SetTabSize() + */ + int Row() const { return location.row + 1; } + int Column() const { return location.col + 1; } ///< See Row() + + void SetUserData( void* user ) { userData = user; } ///< Set a pointer to arbitrary user data. + void* GetUserData() { return userData; } ///< Get a pointer to arbitrary user data. + const void* GetUserData() const { return userData; } ///< Get a pointer to arbitrary user data. + + // Table that returs, for a given lead byte, the total number of bytes + // in the UTF-8 sequence. + static const int utf8ByteTable[256]; + + virtual const char* Parse( const char* p, + TiXmlParsingData* data, + TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0; + + /** Expands entities in a string. Note this should not contian the tag's '<', '>', etc, + or they will be transformed into entities! + */ + static void EncodeString( const TIXML_STRING& str, TIXML_STRING* out ); + + enum + { + TIXML_NO_ERROR = 0, + TIXML_ERROR, + TIXML_ERROR_OPENING_FILE, + TIXML_ERROR_PARSING_ELEMENT, + TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, + TIXML_ERROR_READING_ELEMENT_VALUE, + TIXML_ERROR_READING_ATTRIBUTES, + TIXML_ERROR_PARSING_EMPTY, + TIXML_ERROR_READING_END_TAG, + TIXML_ERROR_PARSING_UNKNOWN, + TIXML_ERROR_PARSING_COMMENT, + TIXML_ERROR_PARSING_DECLARATION, + TIXML_ERROR_DOCUMENT_EMPTY, + TIXML_ERROR_EMBEDDED_NULL, + TIXML_ERROR_PARSING_CDATA, + TIXML_ERROR_DOCUMENT_TOP_ONLY, + + TIXML_ERROR_STRING_COUNT + }; + +protected: + + static const char* SkipWhiteSpace( const char*, TiXmlEncoding encoding ); + + inline static bool IsWhiteSpace( char c ) + { + return ( isspace( (unsigned char) c ) || c == '\n' || c == '\r' ); + } + inline static bool IsWhiteSpace( int c ) + { + if ( c < 256 ) + return IsWhiteSpace( (char) c ); + return false; // Again, only truly correct for English/Latin...but usually works. + } + + #ifdef TIXML_USE_STL + static bool StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ); + static bool StreamTo( std::istream * in, int character, TIXML_STRING * tag ); + #endif + + /* Reads an XML name into the string provided. Returns + a pointer just past the last character of the name, + or 0 if the function has an error. + */ + static const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding ); + + /* Reads text. Returns a pointer past the given end tag. + Wickedly complex options, but it keeps the (sensitive) code in one place. + */ + static const char* ReadText( const char* in, // where to start + TIXML_STRING* text, // the string read + bool ignoreWhiteSpace, // whether to keep the white space + const char* endTag, // what ends this text + bool ignoreCase, // whether to ignore case in the end tag + TiXmlEncoding encoding ); // the current encoding + + // If an entity has been found, transform it into a character. + static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding ); + + // Get a character, while interpreting entities. + // The length can be from 0 to 4 bytes. + inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding ) + { + assert( p ); + if ( encoding == TIXML_ENCODING_UTF8 ) + { + *length = utf8ByteTable[ *((const unsigned char*)p) ]; + assert( *length >= 0 && *length < 5 ); + } + else + { + *length = 1; + } + + if ( *length == 1 ) + { + if ( *p == '&' ) + return GetEntity( p, _value, length, encoding ); + *_value = *p; + return p+1; + } + else if ( *length ) + { + //strncpy( _value, p, *length ); // lots of compilers don't like this function (unsafe), + // and the null terminator isn't needed + for( int i=0; p[i] && i<*length; ++i ) { + _value[i] = p[i]; + } + return p + (*length); + } + else + { + // Not valid text. + return 0; + } + } + + // Return true if the next characters in the stream are any of the endTag sequences. + // Ignore case only works for english, and should only be relied on when comparing + // to English words: StringEqual( p, "version", true ) is fine. + static bool StringEqual( const char* p, + const char* endTag, + bool ignoreCase, + TiXmlEncoding encoding ); + + static const char* errorString[ TIXML_ERROR_STRING_COUNT ]; + + TiXmlCursor location; + + /// Field containing a generic user pointer + void* userData; + + // None of these methods are reliable for any language except English. + // Good for approximation, not great for accuracy. + static int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding ); + static int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding ); + inline static int ToLower( int v, TiXmlEncoding encoding ) + { + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( v < 128 ) return tolower( v ); + return v; + } + else + { + return tolower( v ); + } + } + static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ); + +private: + TiXmlBase( const TiXmlBase& ); // not implemented. + void operator=( const TiXmlBase& base ); // not allowed. + + struct Entity + { + const char* str; + unsigned int strLength; + char chr; + }; + enum + { + NUM_ENTITY = 5, + MAX_ENTITY_LENGTH = 6 + + }; + static Entity entity[ NUM_ENTITY ]; + static bool condenseWhiteSpace; +}; + + +/** The parent class for everything in the Document Object Model. + (Except for attributes). + Nodes have siblings, a parent, and children. A node can be + in a document, or stand on its own. The type of a TiXmlNode + can be queried, and it can be cast to its more defined type. +*/ +class TiXmlNode : public TiXmlBase +{ + friend class TiXmlDocument; + friend class TiXmlElement; + +public: + #ifdef TIXML_USE_STL + + /** An input stream operator, for every class. Tolerant of newlines and + formatting, but doesn't expect them. + */ + friend std::istream& operator >> (std::istream& in, TiXmlNode& base); + + /** An output stream operator, for every class. Note that this outputs + without any newlines or formatting, as opposed to Print(), which + includes tabs and new lines. + + The operator<< and operator>> are not completely symmetric. Writing + a node to a stream is very well defined. You'll get a nice stream + of output, without any extra whitespace or newlines. + + But reading is not as well defined. (As it always is.) If you create + a TiXmlElement (for example) and read that from an input stream, + the text needs to define an element or junk will result. This is + true of all input streams, but it's worth keeping in mind. + + A TiXmlDocument will read nodes until it reads a root element, and + all the children of that root element. + */ + friend std::ostream& operator<< (std::ostream& out, const TiXmlNode& base); + + /// Appends the XML node or attribute to a std::string. + friend std::string& operator<< (std::string& out, const TiXmlNode& base ); + + #endif + + /** The types of XML nodes supported by TinyXml. (All the + unsupported types are picked up by UNKNOWN.) + */ + enum NodeType + { + TINYXML_DOCUMENT, + TINYXML_ELEMENT, + TINYXML_COMMENT, + TINYXML_UNKNOWN, + TINYXML_TEXT, + TINYXML_DECLARATION, + TINYXML_TYPECOUNT + }; + + virtual ~TiXmlNode(); + + /** The meaning of 'value' changes for the specific type of + TiXmlNode. + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + + The subclasses will wrap this function. + */ + const char *Value() const { return value.c_str (); } + + #ifdef TIXML_USE_STL + /** Return Value() as a std::string. If you only use STL, + this is more efficient than calling Value(). + Only available in STL mode. + */ + const std::string& ValueStr() const { return value; } + #endif + + const TIXML_STRING& ValueTStr() const { return value; } + + /** Changes the value of the node. Defined as: + @verbatim + Document: filename of the xml file + Element: name of the element + Comment: the comment text + Unknown: the tag contents + Text: the text string + @endverbatim + */ + void SetValue(const char * _value) { value = _value;} + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Delete all the children of this node. Does not affect 'this'. + void Clear(); + + /// One step up the DOM. + TiXmlNode* Parent() { return parent; } + const TiXmlNode* Parent() const { return parent; } + + const TiXmlNode* FirstChild() const { return firstChild; } ///< The first child of this node. Will be null if there are no children. + TiXmlNode* FirstChild() { return firstChild; } + const TiXmlNode* FirstChild( const char * value ) const; ///< The first child of this node with the matching 'value'. Will be null if none found. + /// The first child of this node with the matching 'value'. Will be null if none found. + TiXmlNode* FirstChild( const char * _value ) { + // Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe) + // call the method, cast the return back to non-const. + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->FirstChild( _value )); + } + const TiXmlNode* LastChild() const { return lastChild; } /// The last child of this node. Will be null if there are no children. + TiXmlNode* LastChild() { return lastChild; } + + const TiXmlNode* LastChild( const char * value ) const; /// The last child of this node matching 'value'. Will be null if there are no children. + TiXmlNode* LastChild( const char * _value ) { + return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->LastChild( _value )); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* FirstChild( const std::string& _value ) const { return FirstChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* FirstChild( const std::string& _value ) { return FirstChild (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* LastChild( const std::string& _value ) const { return LastChild (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* LastChild( const std::string& _value ) { return LastChild (_value.c_str ()); } ///< STL std::string form. + #endif + + /** An alternate way to walk the children of a node. + One way to iterate over nodes is: + @verbatim + for( child = parent->FirstChild(); child; child = child->NextSibling() ) + @endverbatim + + IterateChildren does the same thing with the syntax: + @verbatim + child = 0; + while( child = parent->IterateChildren( child ) ) + @endverbatim + + IterateChildren takes the previous child as input and finds + the next one. If the previous child is null, it returns the + first. IterateChildren will return null when done. + */ + const TiXmlNode* IterateChildren( const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) ); + } + + /// This flavor of IterateChildren searches for children with a particular 'value' + const TiXmlNode* IterateChildren( const char * value, const TiXmlNode* previous ) const; + TiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) { return IterateChildren (_value.c_str (), previous); } ///< STL std::string form. + #endif + + /** Add a new node related to this. Adds a child past the LastChild. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertEndChild( const TiXmlNode& addThis ); + + + /** Add a new node related to this. Adds a child past the LastChild. + + NOTE: the node to be added is passed by pointer, and will be + henceforth owned (and deleted) by tinyXml. This method is efficient + and avoids an extra copy, but should be used with care as it + uses a different memory model than the other insert functions. + + @sa InsertEndChild + */ + TiXmlNode* LinkEndChild( TiXmlNode* addThis ); + + /** Add a new node related to this. Adds a child before the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis ); + + /** Add a new node related to this. Adds a child after the specified child. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis ); + + /** Replace a child of this node. + Returns a pointer to the new object or NULL if an error occured. + */ + TiXmlNode* ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis ); + + /// Delete a child of this node. + bool RemoveChild( TiXmlNode* removeThis ); + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling() const { return prev; } + TiXmlNode* PreviousSibling() { return prev; } + + /// Navigate to a sibling node. + const TiXmlNode* PreviousSibling( const char * ) const; + TiXmlNode* PreviousSibling( const char *_prev ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlNode* PreviousSibling( const std::string& _value ) const { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* PreviousSibling( const std::string& _value ) { return PreviousSibling (_value.c_str ()); } ///< STL std::string form. + const TiXmlNode* NextSibling( const std::string& _value) const { return NextSibling (_value.c_str ()); } ///< STL std::string form. + TiXmlNode* NextSibling( const std::string& _value) { return NextSibling (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Navigate to a sibling node. + const TiXmlNode* NextSibling() const { return next; } + TiXmlNode* NextSibling() { return next; } + + /// Navigate to a sibling node with the given 'value'. + const TiXmlNode* NextSibling( const char * ) const; + TiXmlNode* NextSibling( const char* _next ) { + return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement() const; + TiXmlElement* NextSiblingElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() ); + } + + /** Convenience function to get through elements. + Calls NextSibling and ToElement. Will skip all non-Element + nodes. Returns 0 if there is not another element. + */ + const TiXmlElement* NextSiblingElement( const char * ) const; + TiXmlElement* NextSiblingElement( const char *_next ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* NextSiblingElement( const std::string& _value) const { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* NextSiblingElement( const std::string& _value) { return NextSiblingElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement() const; + TiXmlElement* FirstChildElement() { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() ); + } + + /// Convenience function to get through elements. + const TiXmlElement* FirstChildElement( const char * _value ) const; + TiXmlElement* FirstChildElement( const char * _value ) { + return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) ); + } + + #ifdef TIXML_USE_STL + const TiXmlElement* FirstChildElement( const std::string& _value ) const { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + TiXmlElement* FirstChildElement( const std::string& _value ) { return FirstChildElement (_value.c_str ()); } ///< STL std::string form. + #endif + + /** Query the type (as an enumerated value, above) of this node. + The possible types are: TINYXML_DOCUMENT, TINYXML_ELEMENT, TINYXML_COMMENT, + TINYXML_UNKNOWN, TINYXML_TEXT, and TINYXML_DECLARATION. + */ + int Type() const { return type; } + + /** Return a pointer to the Document this node lives in. + Returns null if not in a document. + */ + const TiXmlDocument* GetDocument() const; + TiXmlDocument* GetDocument() { + return const_cast< TiXmlDocument* >( (const_cast< const TiXmlNode* >(this))->GetDocument() ); + } + + /// Returns true if this node has no children. + bool NoChildren() const { return !firstChild; } + + virtual const TiXmlDocument* ToDocument() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlElement* ToElement() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlComment* ToComment() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlUnknown* ToUnknown() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlText* ToText() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual const TiXmlDeclaration* ToDeclaration() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + virtual TiXmlDocument* ToDocument() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlElement* ToElement() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlComment* ToComment() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlText* ToText() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type. + + /** Create an exact duplicate of this node and return it. The memory must be deleted + by the caller. + */ + virtual TiXmlNode* Clone() const = 0; + + /** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the + XML tree will be conditionally visited and the host will be called back + via the TiXmlVisitor interface. + + This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse + the XML for the callbacks, so the performance of TinyXML is unchanged by using this + interface versus any other.) + + The interface has been based on ideas from: + + - http://www.saxproject.org/ + - http://c2.com/cgi/wiki?HierarchicalVisitorPattern + + Which are both good references for "visiting". + + An example of using Accept(): + @verbatim + TiXmlPrinter printer; + tinyxmlDoc.Accept( &printer ); + const char* xmlcstr = printer.CStr(); + @endverbatim + */ + virtual bool Accept( TiXmlVisitor* visitor ) const = 0; + +protected: + TiXmlNode( NodeType _type ); + + // Copy to the allocated object. Shared functionality between Clone, Copy constructor, + // and the assignment operator. + void CopyTo( TiXmlNode* target ) const; + + #ifdef TIXML_USE_STL + // The real work of the input operator. + virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0; + #endif + + // Figure out what is at *p, and parse it. Returns null if it is not an xml node. + TiXmlNode* Identify( const char* start, TiXmlEncoding encoding ); + + TiXmlNode* parent; + NodeType type; + + TiXmlNode* firstChild; + TiXmlNode* lastChild; + + TIXML_STRING value; + + TiXmlNode* prev; + TiXmlNode* next; + +private: + TiXmlNode( const TiXmlNode& ); // not implemented. + void operator=( const TiXmlNode& base ); // not allowed. +}; + + +/** An attribute is a name-value pair. Elements have an arbitrary + number of attributes, each with a unique name. + + @note The attributes are not TiXmlNodes, since they are not + part of the tinyXML document object model. There are other + suggested ways to look at this problem. +*/ +class TiXmlAttribute : public TiXmlBase +{ + friend class TiXmlAttributeSet; + +public: + /// Construct an empty attribute. + TiXmlAttribute() : TiXmlBase() + { + document = 0; + prev = next = 0; + } + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlAttribute( const std::string& _name, const std::string& _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + #endif + + /// Construct an attribute with a name and value. + TiXmlAttribute( const char * _name, const char * _value ) + { + name = _name; + value = _value; + document = 0; + prev = next = 0; + } + + const char* Name() const { return name.c_str(); } ///< Return the name of this attribute. + const char* Value() const { return value.c_str(); } ///< Return the value of this attribute. + #ifdef TIXML_USE_STL + const std::string& ValueStr() const { return value; } ///< Return the value of this attribute. + #endif + int IntValue() const; ///< Return the value of this attribute, converted to an integer. + double DoubleValue() const; ///< Return the value of this attribute, converted to a double. + + // Get the tinyxml string representation + const TIXML_STRING& NameTStr() const { return name; } + + /** QueryIntValue examines the value string. It is an alternative to the + IntValue() method with richer error checking. + If the value is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. + + A specialized but useful call. Note that for success it returns 0, + which is the opposite of almost all other TinyXml calls. + */ + int QueryIntValue( int* _value ) const; + /// QueryDoubleValue examines the value string. See QueryIntValue(). + int QueryDoubleValue( double* _value ) const; + + void SetName( const char* _name ) { name = _name; } ///< Set the name of this attribute. + void SetValue( const char* _value ) { value = _value; } ///< Set the value. + + void SetIntValue( int _value ); ///< Set the value from an integer. + void SetDoubleValue( double _value ); ///< Set the value from a double. + + #ifdef TIXML_USE_STL + /// STL std::string form. + void SetName( const std::string& _name ) { name = _name; } + /// STL std::string form. + void SetValue( const std::string& _value ) { value = _value; } + #endif + + /// Get the next sibling attribute in the DOM. Returns null at end. + const TiXmlAttribute* Next() const; + TiXmlAttribute* Next() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Next() ); + } + + /// Get the previous sibling attribute in the DOM. Returns null at beginning. + const TiXmlAttribute* Previous() const; + TiXmlAttribute* Previous() { + return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() ); + } + + bool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; } + bool operator<( const TiXmlAttribute& rhs ) const { return name < rhs.name; } + bool operator>( const TiXmlAttribute& rhs ) const { return name > rhs.name; } + + /* Attribute parsing starts: first letter of the name + returns: the next char after the value end quote + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + // Prints this Attribute to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + + // [internal use] + // Set the document pointer so the attribute can report errors. + void SetDocument( TiXmlDocument* doc ) { document = doc; } + +private: + TiXmlAttribute( const TiXmlAttribute& ); // not implemented. + void operator=( const TiXmlAttribute& base ); // not allowed. + + TiXmlDocument* document; // A pointer back to a document, for error reporting. + TIXML_STRING name; + TIXML_STRING value; + TiXmlAttribute* prev; + TiXmlAttribute* next; +}; + + +/* A class used to manage a group of attributes. + It is only used internally, both by the ELEMENT and the DECLARATION. + + The set can be changed transparent to the Element and Declaration + classes that use it, but NOT transparent to the Attribute + which has to implement a next() and previous() method. Which makes + it a bit problematic and prevents the use of STL. + + This version is implemented with circular lists because: + - I like circular lists + - it demonstrates some independence from the (typical) doubly linked list. +*/ +class TiXmlAttributeSet +{ +public: + TiXmlAttributeSet(); + ~TiXmlAttributeSet(); + + void Add( TiXmlAttribute* attribute ); + void Remove( TiXmlAttribute* attribute ); + + const TiXmlAttribute* First() const { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + TiXmlAttribute* First() { return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; } + const TiXmlAttribute* Last() const { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + TiXmlAttribute* Last() { return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; } + + TiXmlAttribute* Find( const char* _name ) const; + TiXmlAttribute* FindOrCreate( const char* _name ); + +# ifdef TIXML_USE_STL + TiXmlAttribute* Find( const std::string& _name ) const; + TiXmlAttribute* FindOrCreate( const std::string& _name ); +# endif + + +private: + //*ME: Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element), + //*ME: this class must be also use a hidden/disabled copy-constructor !!! + TiXmlAttributeSet( const TiXmlAttributeSet& ); // not allowed + void operator=( const TiXmlAttributeSet& ); // not allowed (as TiXmlAttribute) + + TiXmlAttribute sentinel; +}; + + +/** The element is a container class. It has a value, the element name, + and can contain other elements, text, comments, and unknowns. + Elements also contain an arbitrary number of attributes. +*/ +class TiXmlElement : public TiXmlNode +{ +public: + /// Construct an element. + TiXmlElement (const char * in_value); + + #ifdef TIXML_USE_STL + /// std::string constructor. + TiXmlElement( const std::string& _value ); + #endif + + TiXmlElement( const TiXmlElement& ); + + TiXmlElement& operator=( const TiXmlElement& base ); + + virtual ~TiXmlElement(); + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + */ + const char* Attribute( const char* name ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an integer, + the integer value will be put in the return 'i', if 'i' + is non-null. + */ + const char* Attribute( const char* name, int* i ) const; + + /** Given an attribute name, Attribute() returns the value + for the attribute of that name, or null if none exists. + If the attribute exists and can be converted to an double, + the double value will be put in the return 'd', if 'd' + is non-null. + */ + const char* Attribute( const char* name, double* d ) const; + + /** QueryIntAttribute examines the attribute - it is an alternative to the + Attribute() method with richer error checking. + If the attribute is an integer, it is stored in 'value' and + the call returns TIXML_SUCCESS. If it is not + an integer, it returns TIXML_WRONG_TYPE. If the attribute + does not exist, then TIXML_NO_ATTRIBUTE is returned. + */ + int QueryIntAttribute( const char* name, int* _value ) const; + /// QueryUnsignedAttribute examines the attribute - see QueryIntAttribute(). + int QueryUnsignedAttribute( const char* name, unsigned* _value ) const; + /** QueryBoolAttribute examines the attribute - see QueryIntAttribute(). + Note that '1', 'true', or 'yes' are considered true, while '0', 'false' + and 'no' are considered false. + */ + int QueryBoolAttribute( const char* name, bool* _value ) const; + /// QueryDoubleAttribute examines the attribute - see QueryIntAttribute(). + int QueryDoubleAttribute( const char* name, double* _value ) const; + /// QueryFloatAttribute examines the attribute - see QueryIntAttribute(). + int QueryFloatAttribute( const char* name, float* _value ) const { + double d; + int result = QueryDoubleAttribute( name, &d ); + if ( result == TIXML_SUCCESS ) { + *_value = (float)d; + } + return result; + } + + #ifdef TIXML_USE_STL + /// QueryStringAttribute examines the attribute - see QueryIntAttribute(). + int QueryStringAttribute( const char* name, std::string* _value ) const { + const char* cstr = Attribute( name ); + if ( cstr ) { + *_value = std::string( cstr ); + return TIXML_SUCCESS; + } + return TIXML_NO_ATTRIBUTE; + } + + /** Template form of the attribute query which will try to read the + attribute into the specified type. Very easy, very powerful, but + be careful to make sure to call this with the correct type. + + NOTE: This method doesn't work correctly for 'string' types that contain spaces. + + @return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE + */ + template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + + std::stringstream sstream( node->ValueStr() ); + sstream >> *outValue; + if ( !sstream.fail() ) + return TIXML_SUCCESS; + return TIXML_WRONG_TYPE; + } + + int QueryValueAttribute( const std::string& name, std::string* outValue ) const + { + const TiXmlAttribute* node = attributeSet.Find( name ); + if ( !node ) + return TIXML_NO_ATTRIBUTE; + *outValue = node->ValueStr(); + return TIXML_SUCCESS; + } + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char* name, const char * _value ); + + #ifdef TIXML_USE_STL + const std::string* Attribute( const std::string& name ) const; + const std::string* Attribute( const std::string& name, int* i ) const; + const std::string* Attribute( const std::string& name, double* d ) const; + int QueryIntAttribute( const std::string& name, int* _value ) const; + int QueryDoubleAttribute( const std::string& name, double* _value ) const; + + /// STL std::string form. + void SetAttribute( const std::string& name, const std::string& _value ); + ///< STL std::string form. + void SetAttribute( const std::string& name, int _value ); + ///< STL std::string form. + void SetDoubleAttribute( const std::string& name, double value ); + #endif + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetAttribute( const char * name, int value ); + + /** Sets an attribute of name to a given value. The attribute + will be created if it does not exist, or changed if it does. + */ + void SetDoubleAttribute( const char * name, double value ); + + /** Deletes an attribute with the given name. + */ + void RemoveAttribute( const char * name ); + #ifdef TIXML_USE_STL + void RemoveAttribute( const std::string& name ) { RemoveAttribute (name.c_str ()); } ///< STL std::string form. + #endif + + const TiXmlAttribute* FirstAttribute() const { return attributeSet.First(); } ///< Access the first attribute in this element. + TiXmlAttribute* FirstAttribute() { return attributeSet.First(); } + const TiXmlAttribute* LastAttribute() const { return attributeSet.Last(); } ///< Access the last attribute in this element. + TiXmlAttribute* LastAttribute() { return attributeSet.Last(); } + + /** Convenience function for easy access to the text inside an element. Although easy + and concise, GetText() is limited compared to getting the TiXmlText child + and accessing it directly. + + If the first child of 'this' is a TiXmlText, the GetText() + returns the character string of the Text node, else null is returned. + + This is a convenient method for getting the text of simple contained text: + @verbatim + This is text + const char* str = fooElement->GetText(); + @endverbatim + + 'str' will be a pointer to "This is text". + + Note that this function can be misleading. If the element foo was created from + this XML: + @verbatim + This is text + @endverbatim + + then the value of str would be null. The first child node isn't a text node, it is + another element. From this XML: + @verbatim + This is text + @endverbatim + GetText() will return "This is ". + + WARNING: GetText() accesses a child node - don't become confused with the + similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are + safe type casts on the referenced node. + */ + const char* GetText() const; + + /// Creates a new Element and returns it - the returned element is a copy. + virtual TiXmlNode* Clone() const; + // Print the Element to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: next char past '<' + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlElement* ToElement() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlElement* ToElement() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + + void CopyTo( TiXmlElement* target ) const; + void ClearThis(); // like clear, but initializes 'this' object as well + + // Used to be public [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + /* [internal use] + Reads the "value" of the element -- another element, or text. + This should terminate with the current end tag. + */ + const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + +private: + TiXmlAttributeSet attributeSet; +}; + + +/** An XML comment. +*/ +class TiXmlComment : public TiXmlNode +{ +public: + /// Constructs an empty comment. + TiXmlComment() : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) {} + /// Construct a comment from text. + TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::TINYXML_COMMENT ) { + SetValue( _value ); + } + TiXmlComment( const TiXmlComment& ); + TiXmlComment& operator=( const TiXmlComment& base ); + + virtual ~TiXmlComment() {} + + /// Returns a copy of this Comment. + virtual TiXmlNode* Clone() const; + // Write this Comment to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /* Attribtue parsing starts: at the ! of the !-- + returns: next char past '>' + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlComment* ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlComment* ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlComment* target ) const; + + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif +// virtual void StreamOut( TIXML_OSTREAM * out ) const; + +private: + +}; + + +/** XML text. A text node can have 2 ways to output the next. "normal" output + and CDATA. It will default to the mode it was parsed from the XML file and + you generally want to leave it alone, but you can change the output mode with + SetCDATA() and query it with CDATA(). +*/ +class TiXmlText : public TiXmlNode +{ + friend class TiXmlElement; +public: + /** Constructor for text element. By default, it is treated as + normal, encoded text. If you want it be output as a CDATA text + element, set the parameter _cdata to 'true' + */ + TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + virtual ~TiXmlText() {} + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TINYXML_TEXT) + { + SetValue( initValue ); + cdata = false; + } + #endif + + TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TINYXML_TEXT ) { copy.CopyTo( this ); } + TiXmlText& operator=( const TiXmlText& base ) { base.CopyTo( this ); return *this; } + + // Write this text object to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + /// Queries whether this represents text using a CDATA section. + bool CDATA() const { return cdata; } + /// Turns on or off a CDATA representation of text. + void SetCDATA( bool _cdata ) { cdata = _cdata; } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlText* ToText() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlText* ToText() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + /// [internal use] Creates a new Element and returns it. + virtual TiXmlNode* Clone() const; + void CopyTo( TiXmlText* target ) const; + + bool Blank() const; // returns true if all white space and new lines + // [internal use] + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + bool cdata; // true if this should be input and output as a CDATA style text element +}; + + +/** In correct XML the declaration is the first entry in the file. + @verbatim + + @endverbatim + + TinyXml will happily read or write files without a declaration, + however. There are 3 possible attributes to the declaration: + version, encoding, and standalone. + + Note: In this version of the code, the attributes are + handled as special cases, not generic attributes, simply + because there can only be at most 3 and they are always the same. +*/ +class TiXmlDeclaration : public TiXmlNode +{ +public: + /// Construct an empty declaration. + TiXmlDeclaration() : TiXmlNode( TiXmlNode::TINYXML_DECLARATION ) {} + +#ifdef TIXML_USE_STL + /// Constructor. + TiXmlDeclaration( const std::string& _version, + const std::string& _encoding, + const std::string& _standalone ); +#endif + + /// Construct. + TiXmlDeclaration( const char* _version, + const char* _encoding, + const char* _standalone ); + + TiXmlDeclaration( const TiXmlDeclaration& copy ); + TiXmlDeclaration& operator=( const TiXmlDeclaration& copy ); + + virtual ~TiXmlDeclaration() {} + + /// Version. Will return an empty string if none was found. + const char *Version() const { return version.c_str (); } + /// Encoding. Will return an empty string if none was found. + const char *Encoding() const { return encoding.c_str (); } + /// Is this a standalone document? + const char *Standalone() const { return standalone.c_str (); } + + /// Creates a copy of this Declaration and returns it. + virtual TiXmlNode* Clone() const; + // Print this declaration to a FILE stream. + virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const; + virtual void Print( FILE* cfile, int depth ) const { + Print( cfile, depth, 0 ); + } + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlDeclaration* ToDeclaration() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDeclaration* ToDeclaration() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* visitor ) const; + +protected: + void CopyTo( TiXmlDeclaration* target ) const; + // used to be public + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + + TIXML_STRING version; + TIXML_STRING encoding; + TIXML_STRING standalone; +}; + + +/** Any tag that tinyXml doesn't recognize is saved as an + unknown. It is a tag of text, but should not be modified. + It will be written back to the XML, unchanged, when the file + is saved. + + DTD tags get thrown into TiXmlUnknowns. +*/ +class TiXmlUnknown : public TiXmlNode +{ +public: + TiXmlUnknown() : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) {} + virtual ~TiXmlUnknown() {} + + TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::TINYXML_UNKNOWN ) { copy.CopyTo( this ); } + TiXmlUnknown& operator=( const TiXmlUnknown& copy ) { copy.CopyTo( this ); return *this; } + + /// Creates a copy of this Unknown and returns it. + virtual TiXmlNode* Clone() const; + // Print this Unknown to a FILE stream. + virtual void Print( FILE* cfile, int depth ) const; + + virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ); + + virtual const TiXmlUnknown* ToUnknown() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlUnknown* ToUnknown() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected: + void CopyTo( TiXmlUnknown* target ) const; + + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + +}; + + +/** Always the top level node. A document binds together all the + XML pieces. It can be saved, loaded, and printed to the screen. + The 'value' of a document node is the xml file name. +*/ +class TiXmlDocument : public TiXmlNode +{ +public: + /// Create an empty document, that has no name. + TiXmlDocument(); + /// Create a document with a name. The name of the document is also the filename of the xml. + TiXmlDocument( const char * documentName ); + + #ifdef TIXML_USE_STL + /// Constructor. + TiXmlDocument( const std::string& documentName ); + #endif + + TiXmlDocument( const TiXmlDocument& copy ); + TiXmlDocument& operator=( const TiXmlDocument& copy ); + + virtual ~TiXmlDocument() {} + + /** Load a file using the current document value. + Returns true if successful. Will delete any existing + document data before loading. + */ + bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the current document value. Returns true if successful. + bool SaveFile() const; + /// Load a file using the given filename. Returns true if successful. + bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given filename. Returns true if successful. + bool SaveFile( const char * filename ) const; + /** Load a file using the given FILE*. Returns true if successful. Note that this method + doesn't stream - the entire object pointed at by the FILE* + will be interpreted as an XML file. TinyXML doesn't stream in XML from the current + file location. Streaming may be added in the future. + */ + bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + /// Save a file using the given FILE*. Returns true if successful. + bool SaveFile( FILE* ) const; + + #ifdef TIXML_USE_STL + bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ) ///< STL std::string version. + { + return LoadFile( filename.c_str(), encoding ); + } + bool SaveFile( const std::string& filename ) const ///< STL std::string version. + { + return SaveFile( filename.c_str() ); + } + #endif + + /** Parse the given null terminated block of xml data. Passing in an encoding to this + method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml + to use that encoding, regardless of what TinyXml might otherwise try to detect. + */ + virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING ); + + /** Get the root element -- the only top level element -- of the document. + In well formed XML, there should only be one. TinyXml is tolerant of + multiple elements at the document level. + */ + const TiXmlElement* RootElement() const { return FirstChildElement(); } + TiXmlElement* RootElement() { return FirstChildElement(); } + + /** If an error occurs, Error will be set to true. Also, + - The ErrorId() will contain the integer identifier of the error (not generally useful) + - The ErrorDesc() method will return the name of the error. (very useful) + - The ErrorRow() and ErrorCol() will return the location of the error (if known) + */ + bool Error() const { return error; } + + /// Contains a textual (english) description of the error if one occurs. + const char * ErrorDesc() const { return errorDesc.c_str (); } + + /** Generally, you probably want the error string ( ErrorDesc() ). But if you + prefer the ErrorId, this function will fetch it. + */ + int ErrorId() const { return errorId; } + + /** Returns the location (if known) of the error. The first column is column 1, + and the first row is row 1. A value of 0 means the row and column wasn't applicable + (memory errors, for example, have no row/column) or the parser lost the error. (An + error in the error reporting, in that case.) + + @sa SetTabSize, Row, Column + */ + int ErrorRow() const { return errorLocation.row+1; } + int ErrorCol() const { return errorLocation.col+1; } ///< The column where the error occured. See ErrorRow() + + /** SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol()) + to report the correct values for row and column. It does not change the output + or input in any way. + + By calling this method, with a tab size + greater than 0, the row and column of each node and attribute is stored + when the file is loaded. Very useful for tracking the DOM back in to + the source file. + + The tab size is required for calculating the location of nodes. If not + set, the default of 4 is used. The tabsize is set per document. Setting + the tabsize to 0 disables row/column tracking. + + Note that row and column tracking is not supported when using operator>>. + + The tab size needs to be enabled before the parse or load. Correct usage: + @verbatim + TiXmlDocument doc; + doc.SetTabSize( 8 ); + doc.Load( "myfile.xml" ); + @endverbatim + + @sa Row, Column + */ + void SetTabSize( int _tabsize ) { tabsize = _tabsize; } + + int TabSize() const { return tabsize; } + + /** If you have handled the error, it can be reset with this call. The error + state is automatically cleared if you Parse a new XML block. + */ + void ClearError() { error = false; + errorId = 0; + errorDesc = ""; + errorLocation.row = errorLocation.col = 0; + //errorLocation.last = 0; + } + + /** Write the document to standard out using formatted printing ("pretty print"). */ + void Print() const { Print( stdout, 0 ); } + + /* Write the document to a string using formatted printing ("pretty print"). This + will allocate a character array (new char[]) and return it as a pointer. The + calling code pust call delete[] on the return char* to avoid a memory leak. + */ + //char* PrintToMemory() const; + + /// Print this Document to a FILE stream. + virtual void Print( FILE* cfile, int depth = 0 ) const; + // [internal use] + void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding ); + + virtual const TiXmlDocument* ToDocument() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + virtual TiXmlDocument* ToDocument() { return this; } ///< Cast to a more defined type. Will return null not of the requested type. + + /** Walk the XML tree visiting this node and all of its children. + */ + virtual bool Accept( TiXmlVisitor* content ) const; + +protected : + // [internal use] + virtual TiXmlNode* Clone() const; + #ifdef TIXML_USE_STL + virtual void StreamIn( std::istream * in, TIXML_STRING * tag ); + #endif + +private: + void CopyTo( TiXmlDocument* target ) const; + + bool error; + int errorId; + TIXML_STRING errorDesc; + int tabsize; + TiXmlCursor errorLocation; + bool useMicrosoftBOM; // the UTF-8 BOM were found when read. Note this, and try to write. +}; + + +/** + A TiXmlHandle is a class that wraps a node pointer with null checks; this is + an incredibly useful thing. Note that TiXmlHandle is not part of the TinyXml + DOM structure. It is a separate utility class. + + Take an example: + @verbatim + + + + + + + @endverbatim + + Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very + easy to write a *lot* of code that looks like: + + @verbatim + TiXmlElement* root = document.FirstChildElement( "Document" ); + if ( root ) + { + TiXmlElement* element = root->FirstChildElement( "Element" ); + if ( element ) + { + TiXmlElement* child = element->FirstChildElement( "Child" ); + if ( child ) + { + TiXmlElement* child2 = child->NextSiblingElement( "Child" ); + if ( child2 ) + { + // Finally do something useful. + @endverbatim + + And that doesn't even cover "else" cases. TiXmlHandle addresses the verbosity + of such code. A TiXmlHandle checks for null pointers so it is perfectly safe + and correct to use: + + @verbatim + TiXmlHandle docHandle( &document ); + TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement(); + if ( child2 ) + { + // do something useful + @endverbatim + + Which is MUCH more concise and useful. + + It is also safe to copy handles - internally they are nothing more than node pointers. + @verbatim + TiXmlHandle handleCopy = handle; + @endverbatim + + What they should not be used for is iteration: + + @verbatim + int i=0; + while ( true ) + { + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", i ).ToElement(); + if ( !child ) + break; + // do something + ++i; + } + @endverbatim + + It seems reasonable, but it is in fact two embedded while loops. The Child method is + a linear walk to find the element, so this code would iterate much more than it needs + to. Instead, prefer: + + @verbatim + TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild( "Child" ).ToElement(); + + for( child; child; child=child->NextSiblingElement() ) + { + // do something + } + @endverbatim +*/ +class TiXmlHandle +{ +public: + /// Create a handle from any node (at any depth of the tree.) This can be a null pointer. + TiXmlHandle( TiXmlNode* _node ) { this->node = _node; } + /// Copy constructor + TiXmlHandle( const TiXmlHandle& ref ) { this->node = ref.node; } + TiXmlHandle operator=( const TiXmlHandle& ref ) { if ( &ref != this ) this->node = ref.node; return *this; } + + /// Return a handle to the first child node. + TiXmlHandle FirstChild() const; + /// Return a handle to the first child node with the given name. + TiXmlHandle FirstChild( const char * value ) const; + /// Return a handle to the first child element. + TiXmlHandle FirstChildElement() const; + /// Return a handle to the first child element with the given name. + TiXmlHandle FirstChildElement( const char * value ) const; + + /** Return a handle to the "index" child with the given name. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( const char* value, int index ) const; + /** Return a handle to the "index" child. + The first child is 0, the second 1, etc. + */ + TiXmlHandle Child( int index ) const; + /** Return a handle to the "index" child element with the given name. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( const char* value, int index ) const; + /** Return a handle to the "index" child element. + The first child element is 0, the second 1, etc. Note that only TiXmlElements + are indexed: other types are not counted. + */ + TiXmlHandle ChildElement( int index ) const; + + #ifdef TIXML_USE_STL + TiXmlHandle FirstChild( const std::string& _value ) const { return FirstChild( _value.c_str() ); } + TiXmlHandle FirstChildElement( const std::string& _value ) const { return FirstChildElement( _value.c_str() ); } + + TiXmlHandle Child( const std::string& _value, int index ) const { return Child( _value.c_str(), index ); } + TiXmlHandle ChildElement( const std::string& _value, int index ) const { return ChildElement( _value.c_str(), index ); } + #endif + + /** Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* ToNode() const { return node; } + /** Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* ToElement() const { return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); } + /** Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* ToText() const { return ( ( node && node->ToText() ) ? node->ToText() : 0 ); } + /** Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* ToUnknown() const { return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); } + + /** @deprecated use ToNode. + Return the handle as a TiXmlNode. This may return null. + */ + TiXmlNode* Node() const { return ToNode(); } + /** @deprecated use ToElement. + Return the handle as a TiXmlElement. This may return null. + */ + TiXmlElement* Element() const { return ToElement(); } + /** @deprecated use ToText() + Return the handle as a TiXmlText. This may return null. + */ + TiXmlText* Text() const { return ToText(); } + /** @deprecated use ToUnknown() + Return the handle as a TiXmlUnknown. This may return null. + */ + TiXmlUnknown* Unknown() const { return ToUnknown(); } + +private: + TiXmlNode* node; +}; + + +/** Print to memory functionality. The TiXmlPrinter is useful when you need to: + + -# Print to memory (especially in non-STL mode) + -# Control formatting (line endings, etc.) + + When constructed, the TiXmlPrinter is in its default "pretty printing" mode. + Before calling Accept() you can call methods to control the printing + of the XML document. After TiXmlNode::Accept() is called, the printed document can + be accessed via the CStr(), Str(), and Size() methods. + + TiXmlPrinter uses the Visitor API. + @verbatim + TiXmlPrinter printer; + printer.SetIndent( "\t" ); + + doc.Accept( &printer ); + fprintf( stdout, "%s", printer.CStr() ); + @endverbatim +*/ +class TiXmlPrinter : public TiXmlVisitor +{ +public: + TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ), + buffer(), indent( " " ), lineBreak( "\n" ) {} + + virtual bool VisitEnter( const TiXmlDocument& doc ); + virtual bool VisitExit( const TiXmlDocument& doc ); + + virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute ); + virtual bool VisitExit( const TiXmlElement& element ); + + virtual bool Visit( const TiXmlDeclaration& declaration ); + virtual bool Visit( const TiXmlText& text ); + virtual bool Visit( const TiXmlComment& comment ); + virtual bool Visit( const TiXmlUnknown& unknown ); + + /** Set the indent characters for printing. By default 4 spaces + but tab (\t) is also useful, or null/empty string for no indentation. + */ + void SetIndent( const char* _indent ) { indent = _indent ? _indent : "" ; } + /// Query the indention string. + const char* Indent() { return indent.c_str(); } + /** Set the line breaking string. By default set to newline (\n). + Some operating systems prefer other characters, or can be + set to the null/empty string for no indenation. + */ + void SetLineBreak( const char* _lineBreak ) { lineBreak = _lineBreak ? _lineBreak : ""; } + /// Query the current line breaking string. + const char* LineBreak() { return lineBreak.c_str(); } + + /** Switch over to "stream printing" which is the most dense formatting without + linebreaks. Common when the XML is needed for network transmission. + */ + void SetStreamPrinting() { indent = ""; + lineBreak = ""; + } + /// Return the result. + const char* CStr() { return buffer.c_str(); } + /// Return the length of the result string. + size_t Size() { return buffer.size(); } + + #ifdef TIXML_USE_STL + /// Return the result. + const std::string& Str() { return buffer; } + #endif + +private: + void DoIndent() { + for( int i=0; i + + + + Debug + Win32 + + + Release + Win32 + + + + tinyxml + {C406DAEC-0886-4771-8DEA-9D7329B46CC1} + 8.1 + + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(IncludePath) + $(LibraryPath) + $(IncludePath) + $(LibraryPath) + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + + + $(ProjectName)d + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreaded + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0407 + + + true + + + true + + + + + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + true + Level4 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0407 + + + true + + + true + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/tinyxmlparser.cpp electricsheep-3.0.2-git20180325/tinyXml/tinyxmlparser.cpp --- electricsheep-2.7~b12+svn20091224/tinyXml/tinyxmlparser.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/tinyxmlparser.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,1638 @@ +/* +www.sourceforge.net/projects/tinyxml +Original code by Lee Thomason (www.grinninglizard.com) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include +#include + +#include "tinyxml.h" + +//#define DEBUG_PARSER +#if defined( DEBUG_PARSER ) +# if defined( DEBUG ) && defined( _MSC_VER ) +# include +# define TIXML_LOG OutputDebugString +# else +# define TIXML_LOG printf +# endif +#endif + +// Note tha "PutString" hardcodes the same list. This +// is less flexible than it appears. Changing the entries +// or order will break putstring. +TiXmlBase::Entity TiXmlBase::entity[ TiXmlBase::NUM_ENTITY ] = +{ + { "&", 5, '&' }, + { "<", 4, '<' }, + { ">", 4, '>' }, + { """, 6, '\"' }, + { "'", 6, '\'' } +}; + +// Bunch of unicode info at: +// http://www.unicode.org/faq/utf_bom.html +// Including the basic of this table, which determines the #bytes in the +// sequence from the lead byte. 1 placed for invalid sequences -- +// although the result will be junk, pass it through as much as possible. +// Beware of the non-characters in UTF-8: +// ef bb bf (Microsoft "lead bytes") +// ef bf be +// ef bf bf + +const unsigned char TIXML_UTF_LEAD_0 = 0xefU; +const unsigned char TIXML_UTF_LEAD_1 = 0xbbU; +const unsigned char TIXML_UTF_LEAD_2 = 0xbfU; + +const int TiXmlBase::utf8ByteTable[256] = +{ + // 0 1 2 3 4 5 6 7 8 9 a b c d e f + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x00 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x10 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x20 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x30 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x40 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x50 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x70 End of ASCII range + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x80 0x80 to 0xc1 invalid + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x90 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xa0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xb0 + 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xc0 0xc2 to 0xdf 2 byte + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xd0 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, // 0xe0 0xe0 to 0xef 3 byte + 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 // 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid +}; + + +void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length ) +{ + const unsigned long BYTE_MASK = 0xBF; + const unsigned long BYTE_MARK = 0x80; + const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + + if (input < 0x80) + *length = 1; + else if ( input < 0x800 ) + *length = 2; + else if ( input < 0x10000 ) + *length = 3; + else if ( input < 0x200000 ) + *length = 4; + else + { *length = 0; return; } // This code won't covert this correctly anyway. + + output += *length; + + // Scary scary fall throughs. + switch (*length) + { + case 4: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 3: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 2: + --output; + *output = (char)((input | BYTE_MARK) & BYTE_MASK); + input >>= 6; + case 1: + --output; + *output = (char)(input | FIRST_BYTE_MARK[*length]); + } +} + + +/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalpha( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalpha( anyByte ); +// } +} + + +/*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ ) +{ + // This will only work for low-ascii, everything else is assumed to be a valid + // letter. I'm not sure this is the best approach, but it is quite tricky trying + // to figure out alhabetical vs. not across encoding. So take a very + // conservative approach. + +// if ( encoding == TIXML_ENCODING_UTF8 ) +// { + if ( anyByte < 127 ) + return isalnum( anyByte ); + else + return 1; // What else to do? The unicode set is huge...get the english ones right. +// } +// else +// { +// return isalnum( anyByte ); +// } +} + + +class TiXmlParsingData +{ + friend class TiXmlDocument; + public: + void Stamp( const char* now, TiXmlEncoding encoding ); + + const TiXmlCursor& Cursor() const { return cursor; } + + private: + // Only used by the document! + TiXmlParsingData( const char* start, int _tabsize, int row, int col ) + { + assert( start ); + stamp = start; + tabsize = _tabsize; + cursor.row = row; + cursor.col = col; + } + + TiXmlCursor cursor; + const char* stamp; + int tabsize; +}; + + +void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding ) +{ + assert( now ); + + // Do nothing if the tabsize is 0. + if ( tabsize < 1 ) + { + return; + } + + // Get the current row, column. + int row = cursor.row; + int col = cursor.col; + const char* p = stamp; + assert( p ); + + while ( p < now ) + { + // Treat p as unsigned, so we have a happy compiler. + const unsigned char* pU = (const unsigned char*)p; + + // Code contributed by Fletcher Dunn: (modified by lee) + switch (*pU) { + case 0: + // We *should* never get here, but in case we do, don't + // advance past the terminating null character, ever + return; + + case '\r': + // bump down to the next line + ++row; + col = 0; + // Eat the character + ++p; + + // Check for \r\n sequence, and treat this as a single character + if (*p == '\n') { + ++p; + } + break; + + case '\n': + // bump down to the next line + ++row; + col = 0; + + // Eat the character + ++p; + + // Check for \n\r sequence, and treat this as a single + // character. (Yes, this bizarre thing does occur still + // on some arcane platforms...) + if (*p == '\r') { + ++p; + } + break; + + case '\t': + // Eat the character + ++p; + + // Skip to next tab stop + col = (col / tabsize + 1) * tabsize; + break; + + case TIXML_UTF_LEAD_0: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + if ( *(p+1) && *(p+2) ) + { + // In these cases, don't advance the column. These are + // 0-width spaces. + if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU ) + p += 3; + else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU ) + p += 3; + else + { p +=3; ++col; } // A normal character. + } + } + else + { + ++p; + ++col; + } + break; + + default: + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // Eat the 1 to 4 byte utf8 character. + int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)]; + if ( step == 0 ) + step = 1; // Error case from bad encoding, but handle gracefully. + p += step; + + // Just advance one column, of course. + ++col; + } + else + { + ++p; + ++col; + } + break; + } + } + cursor.row = row; + cursor.col = col; + assert( cursor.row >= -1 ); + assert( cursor.col >= -1 ); + stamp = p; + assert( stamp ); +} + + +const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding ) +{ + if ( !p || !*p ) + { + return 0; + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + while ( *p ) + { + const unsigned char* pU = (const unsigned char*)p; + + // Skip the stupid Microsoft UTF-8 Byte order marks + if ( *(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==TIXML_UTF_LEAD_1 + && *(pU+2)==TIXML_UTF_LEAD_2 ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbeU ) + { + p += 3; + continue; + } + else if(*(pU+0)==TIXML_UTF_LEAD_0 + && *(pU+1)==0xbfU + && *(pU+2)==0xbfU ) + { + p += 3; + continue; + } + + if ( IsWhiteSpace( *p ) ) // Still using old rules for white space. + ++p; + else + break; + } + } + else + { + while ( *p && IsWhiteSpace( *p ) ) + ++p; + } + + return p; +} + +#ifdef TIXML_USE_STL +/*static*/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag ) +{ + for( ;; ) + { + if ( !in->good() ) return false; + + int c = in->peek(); + // At this scope, we can't get to a document. So fail silently. + if ( !IsWhiteSpace( c ) || c <= 0 ) + return true; + + *tag += (char) in->get(); + } +} + +/*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag ) +{ + //assert( character > 0 && character < 128 ); // else it won't work in utf-8 + while ( in->good() ) + { + int c = in->peek(); + if ( c == character ) + return true; + if ( c <= 0 ) // Silent failure: can't get document at this scope + return false; + + in->get(); + *tag += (char) c; + } + return false; +} +#endif + +// One of TinyXML's more performance demanding functions. Try to keep the memory overhead down. The +// "assign" optimization removes over 10% of the execution time. +// +const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding ) +{ + // Oddly, not supported on some comilers, + //name->clear(); + // So use this: + *name = ""; + assert( p ); + + // Names start with letters or underscores. + // Of course, in unicode, tinyxml has no idea what a letter *is*. The + // algorithm is generous. + // + // After that, they can be letters, underscores, numbers, + // hyphens, or colons. (Colons are valid ony for namespaces, + // but tinyxml can't tell namespaces from names.) + if ( p && *p + && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) ) + { + const char* start = p; + while( p && *p + && ( IsAlphaNum( (unsigned char ) *p, encoding ) + || *p == '_' + || *p == '-' + || *p == '.' + || *p == ':' ) ) + { + //(*name) += *p; // expensive + ++p; + } + if ( p-start > 0 ) { + name->assign( start, p-start ); + } + return p; + } + return 0; +} + +const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding ) +{ + // Presume an entity, and pull it out. + TIXML_STRING ent; + int i; + *length = 0; + + if ( *(p+1) && *(p+1) == '#' && *(p+2) ) + { + unsigned long ucs = 0; + ptrdiff_t delta = 0; + unsigned mult = 1; + + if ( *(p+2) == 'x' ) + { + // Hexadecimal. + if ( !*(p+3) ) return 0; + + const char* q = p+3; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != 'x' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else if ( *q >= 'a' && *q <= 'f' ) + ucs += mult * (*q - 'a' + 10); + else if ( *q >= 'A' && *q <= 'F' ) + ucs += mult * (*q - 'A' + 10 ); + else + return 0; + mult *= 16; + --q; + } + } + else + { + // Decimal. + if ( !*(p+2) ) return 0; + + const char* q = p+2; + q = strchr( q, ';' ); + + if ( !q || !*q ) return 0; + + delta = q-p; + --q; + + while ( *q != '#' ) + { + if ( *q >= '0' && *q <= '9' ) + ucs += mult * (*q - '0'); + else + return 0; + mult *= 10; + --q; + } + } + if ( encoding == TIXML_ENCODING_UTF8 ) + { + // convert the UCS to UTF-8 + ConvertUTF32ToUTF8( ucs, value, length ); + } + else + { + *value = (char)ucs; + *length = 1; + } + return p + delta + 1; + } + + // Now try to match it. + for( i=0; iappend( cArr, len ); + } + } + else + { + bool whitespace = false; + + // Remove leading white space: + p = SkipWhiteSpace( p, encoding ); + while ( p && *p + && !StringEqual( p, endTag, caseInsensitive, encoding ) ) + { + if ( *p == '\r' || *p == '\n' ) + { + whitespace = true; + ++p; + } + else if ( IsWhiteSpace( *p ) ) + { + whitespace = true; + ++p; + } + else + { + // If we've found whitespace, add it before the + // new character. Any whitespace just becomes a space. + if ( whitespace ) + { + (*text) += ' '; + whitespace = false; + } + int len; + char cArr[4] = { 0, 0, 0, 0 }; + p = GetChar( p, cArr, &len, encoding ); + if ( len == 1 ) + (*text) += cArr[0]; // more efficient + else + text->append( cArr, len ); + } + } + } + if ( p && *p ) + p += strlen( endTag ); + return ( p && *p ) ? p : 0; +} + +#ifdef TIXML_USE_STL + +void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + // The basic issue with a document is that we don't know what we're + // streaming. Read something presumed to be a tag (and hope), then + // identify it, and call the appropriate stream method on the tag. + // + // This "pre-streaming" will never read the closing ">" so the + // sub-tag can orient itself. + + if ( !StreamTo( in, '<', tag ) ) + { + SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + while ( in->good() ) + { + int tagIndex = (int) tag->length(); + while ( in->good() && in->peek() != '>' ) + { + int c = in->get(); + if ( c <= 0 ) + { + SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + break; + } + (*tag) += (char) c; + } + + if ( in->good() ) + { + // We now have something we presume to be a node of + // some sort. Identify it, and call the node to + // continue streaming. + TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING ); + + if ( node ) + { + node->StreamIn( in, tag ); + bool isElement = node->ToElement() != 0; + delete node; + node = 0; + + // If this is the root element, we're done. Parsing will be + // done by the >> operator. + if ( isElement ) + { + return; + } + } + else + { + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + } + } + // We should have returned sooner. + SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN ); +} + +#endif + +const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding ) +{ + ClearError(); + + // Parse away, at the document level. Since a document + // contains nothing but other tags, most of what happens + // here is skipping white space. + if ( !p || !*p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + // Note that, for a document, this needs to come + // before the while space skip, so that parsing + // starts from the pointer we are given. + location.Clear(); + if ( prevData ) + { + location.row = prevData->cursor.row; + location.col = prevData->cursor.col; + } + else + { + location.row = 0; + location.col = 0; + } + TiXmlParsingData data( p, TabSize(), location.row, location.col ); + location = data.Cursor(); + + if ( encoding == TIXML_ENCODING_UNKNOWN ) + { + // Check for the Microsoft UTF-8 lead bytes. + const unsigned char* pU = (const unsigned char*)p; + if ( *(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0 + && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1 + && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 ) + { + encoding = TIXML_ENCODING_UTF8; + useMicrosoftBOM = true; + } + } + + p = SkipWhiteSpace( p, encoding ); + if ( !p ) + { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN ); + return 0; + } + + while ( p && *p ) + { + TiXmlNode* node = Identify( p, encoding ); + if ( node ) + { + p = node->Parse( p, &data, encoding ); + LinkEndChild( node ); + } + else + { + break; + } + + // Did we get encoding info? + if ( encoding == TIXML_ENCODING_UNKNOWN + && node->ToDeclaration() ) + { + TiXmlDeclaration* dec = node->ToDeclaration(); + const char* enc = dec->Encoding(); + assert( enc ); + + if ( *enc == 0 ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; + else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) ) + encoding = TIXML_ENCODING_UTF8; // incorrect, but be nice + else + encoding = TIXML_ENCODING_LEGACY; + } + + p = SkipWhiteSpace( p, encoding ); + } + + // Was this empty? + if ( !firstChild ) { + SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding ); + return 0; + } + + // All is well. + return p; +} + +void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + // The first error in a chain is more accurate - don't set again! + if ( error ) + return; + + assert( err > 0 && err < TIXML_ERROR_STRING_COUNT ); + error = true; + errorId = err; + errorDesc = errorString[ errorId ]; + + errorLocation.Clear(); + if ( pError && data ) + { + data->Stamp( pError, encoding ); + errorLocation = data->Cursor(); + } +} + + +TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding ) +{ + TiXmlNode* returnNode = 0; + + p = SkipWhiteSpace( p, encoding ); + if( !p || !*p || *p != '<' ) + { + return 0; + } + + p = SkipWhiteSpace( p, encoding ); + + if ( !p || !*p ) + { + return 0; + } + + // What is this thing? + // - Elements start with a letter or underscore, but xml is reserved. + // - Comments: "; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + if ( document ) + document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // [ 1475201 ] TinyXML parses entities in comments + // Oops - ReadText doesn't work, because we don't want to parse the entities. + // p = ReadText( p, &value, false, endTag, false, encoding ); + // + // from the XML spec: + /* + [Definition: Comments may appear anywhere in a document outside other markup; in addition, + they may appear within the document type declaration at places allowed by the grammar. + They are not part of the document's character data; an XML processor MAY, but need not, + make it possible for an application to retrieve the text of comments. For compatibility, + the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity + references MUST NOT be recognized within comments. + + An example of a comment: + + + */ + + value = ""; + // Keep all the white space. + while ( p && *p && !StringEqual( p, endTag, false, encoding ) ) + { + value.append( p, 1 ); + ++p; + } + if ( p && *p ) + p += strlen( endTag ); + + return p; +} + + +const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) return 0; + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + // Read the name, the '=' and the value. + const char* pErr = p; + p = ReadName( p, &name, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding ); + return 0; + } + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p || *p != '=' ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + ++p; // skip '=' + p = SkipWhiteSpace( p, encoding ); + if ( !p || !*p ) + { + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + + const char* end; + const char SINGLE_QUOTE = '\''; + const char DOUBLE_QUOTE = '\"'; + + if ( *p == SINGLE_QUOTE ) + { + ++p; + end = "\'"; // single quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else if ( *p == DOUBLE_QUOTE ) + { + ++p; + end = "\""; // double quote in string + p = ReadText( p, &value, false, end, false, encoding ); + } + else + { + // All attribute values should be in single or double quotes. + // But this is such a common error that the parser will try + // its best, even without them. + value = ""; + while ( p && *p // existence + && !IsWhiteSpace( *p ) // whitespace + && *p != '/' && *p != '>' ) // tag end + { + if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) { + // [ 1451649 ] Attribute values with trailing quotes not handled correctly + // We did not have an opening quote but seem to have a + // closing one. Give up and throw an error. + if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding ); + return 0; + } + value += *p; + ++p; + } + } + return p; +} + +#ifdef TIXML_USE_STL +void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->peek(); + if ( !cdata && (c == '<' ) ) + { + return; + } + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + + (*tag) += (char) c; + in->get(); // "commits" the peek made above + + if ( cdata && c == '>' && tag->size() >= 3 ) { + size_t len = tag->size(); + if ( (*tag)[len-2] == ']' && (*tag)[len-3] == ']' ) { + // terminator of cdata. + return; + } + } + } +} +#endif + +const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding ) +{ + value = ""; + TiXmlDocument* document = GetDocument(); + + if ( data ) + { + data->Stamp( p, encoding ); + location = data->Cursor(); + } + + const char* const startTag = ""; + + if ( cdata || StringEqual( p, startTag, false, encoding ) ) + { + cdata = true; + + if ( !StringEqual( p, startTag, false, encoding ) ) + { + if ( document ) + document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding ); + return 0; + } + p += strlen( startTag ); + + // Keep all the white space, ignore the encoding, etc. + while ( p && *p + && !StringEqual( p, endTag, false, encoding ) + ) + { + value += *p; + ++p; + } + + TIXML_STRING dummy; + p = ReadText( p, &dummy, false, endTag, false, encoding ); + return p; + } + else + { + bool ignoreWhite = true; + + const char* end = "<"; + p = ReadText( p, &value, ignoreWhite, end, false, encoding ); + if ( p && *p ) + return p-1; // don't truncate the '<' + return 0; + } +} + +#ifdef TIXML_USE_STL +void TiXmlDeclaration::StreamIn( std::istream * in, TIXML_STRING * tag ) +{ + while ( in->good() ) + { + int c = in->get(); + if ( c <= 0 ) + { + TiXmlDocument* document = GetDocument(); + if ( document ) + document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN ); + return; + } + (*tag) += (char) c; + + if ( c == '>' ) + { + // All is well. + return; + } + } +} +#endif + +const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding ) +{ + p = SkipWhiteSpace( p, _encoding ); + // Find the beginning, find the end, and look for + // the stuff in-between. + TiXmlDocument* document = GetDocument(); + if ( !p || !*p || !StringEqual( p, "SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding ); + return 0; + } + if ( data ) + { + data->Stamp( p, _encoding ); + location = data->Cursor(); + } + p += 5; + + version = ""; + encoding = ""; + standalone = ""; + + while ( p && *p ) + { + if ( *p == '>' ) + { + ++p; + return p; + } + + p = SkipWhiteSpace( p, _encoding ); + if ( StringEqual( p, "version", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + version = attrib.Value(); + } + else if ( StringEqual( p, "encoding", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + encoding = attrib.Value(); + } + else if ( StringEqual( p, "standalone", true, _encoding ) ) + { + TiXmlAttribute attrib; + p = attrib.Parse( p, data, _encoding ); + standalone = attrib.Value(); + } + else + { + // Read over whatever it is. + while( p && *p && *p != '>' && !IsWhiteSpace( *p ) ) + ++p; + } + } + return 0; +} + +bool TiXmlText::Blank() const +{ + for ( unsigned i=0; i + + + + Debug + Win32 + + + Release + Win32 + + + + {A3A84737-5017-4577-B8A2-79429A25B8B6} + 8.1 + + + + StaticLibrary + false + MultiByte + v140 + + + StaticLibrary + false + MultiByte + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(IncludePath) + $(LibraryPath) + $(IncludePath) + $(LibraryPath) + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + + + $(ProjectName)d + + + + Disabled + WIN32;_DEBUG;_LIB;TIXML_USE_STL;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + true + Level4 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + + + true + + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_LIB;TIXML_USE_STL;%(PreprocessorDefinitions) + true + MultiThreaded + true + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + true + + + true + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + + + + + + + + + + \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/tinyXmlTestSTL.vcxproj electricsheep-3.0.2-git20180325/tinyXml/tinyXmlTestSTL.vcxproj --- electricsheep-2.7~b12+svn20091224/tinyXml/tinyXmlTestSTL.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/tinyXmlTestSTL.vcxproj 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,141 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {53ED5965-5BCA-47B5-9EB0-EDD20882F22F} + 8.1 + + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + false + false + $(IncludePath) + $(LibraryPath) + $(IncludePath) + $(LibraryPath) + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + + + $(ProjectName)d + + + + .\tinyXmlTestSTL___Win32_Debug/tinyXmlTestSTL.tlb + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;TIXML_USE_STL;TUNE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + true + Level4 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + %(AdditionalDependencies) + true + true + Console + false + + + MachineX86 + + + true + + + + + .\tinyXmlTestSTL___Win32_Release/tinyXmlTestSTL.tlb + + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_CONSOLE;TIXML_USE_STL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + MultiThreaded + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + %(AdditionalDependencies) + true + Console + false + + + MachineX86 + + + true + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + {a3a84737-5017-4577-b8a2-79429a25b8b6} + false + + + + + + \ No newline at end of file diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/tinyXmlTest.vcxproj electricsheep-3.0.2-git20180325/tinyXml/tinyXmlTest.vcxproj --- electricsheep-2.7~b12+svn20091224/tinyXml/tinyXmlTest.vcxproj 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/tinyXmlTest.vcxproj 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,140 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {34719950-09E8-457E-BE23-8F1CE3A1F1F6} + 8.1 + + + + Application + false + MultiByte + v140 + + + Application + false + MultiByte + v140 + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + true + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + false + $(IncludePath) + $(LibraryPath) + $(SolutionDir)$(Configuration)$(ProjectName)\ + $(SolutionDir)$(Configuration)$(ProjectName)\ + + + $(ProjectName)d + + + + .\tinyXmlTest___Win32_Debug/tinyXmlTest.tlb + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;TUNE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebug + true + Level4 + true + EditAndContinue + + + _DEBUG;%(PreprocessorDefinitions) + 0x0409 + + + %(AdditionalDependencies) + true + true + Console + false + + + MachineX86 + + + true + + + + + .\tinyXmlTest___Win32_Release/tinyXmlTest.tlb + + + + + MaxSpeed + OnlyExplicitInline + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + MultiThreaded + true + true + Level3 + true + + + NDEBUG;%(PreprocessorDefinitions) + 0x0409 + + + %(AdditionalDependencies) + true + Console + false + + + MachineX86 + + + true + + + + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + + + + + {c406daec-0886-4771-8dea-9d7329b46cc1} + false + + + + + + \ No newline at end of file Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/tinyXml/utf8test.gif and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/tinyXml/utf8test.gif differ diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/utf8testverify.xml electricsheep-3.0.2-git20180325/tinyXml/utf8testverify.xml --- electricsheep-2.7~b12+svn20091224/tinyXml/utf8testverify.xml 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/utf8testverify.xml 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,11 @@ + + + The world has many languages + Мир имеет много языков + el mundo tiene muchos idiomas + 世界有很多语言 + <Русский название="name" ценность="value"><имеет> + <汉语 名字="name" 价值="value">世界有很多语言 + "Mëtæl!" + <ä>Umlaut Element + diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/utf8test.xml electricsheep-3.0.2-git20180325/tinyXml/utf8test.xml --- electricsheep-2.7~b12+svn20091224/tinyXml/utf8test.xml 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/utf8test.xml 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,11 @@ + + + The world has many languages + Мир имеет много языков + el mundo tiene muchos idiomas + 世界有很多语言 + <Русский название="name" ценность="value"><имеет> + <汉语 名字="name" 价值="value">世界有很多语言 + "Mëtæl!" + <ä>Umlaut Element + diff -Nru electricsheep-2.7~b12+svn20091224/tinyXml/xmltest.cpp electricsheep-3.0.2-git20180325/tinyXml/xmltest.cpp --- electricsheep-2.7~b12+svn20091224/tinyXml/xmltest.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/tinyXml/xmltest.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,1393 @@ +/* + Test program for TinyXML. +*/ + + +#ifdef TIXML_USE_STL + #include + #include + using namespace std; +#else + #include +#endif + +#if defined( WIN32 ) && defined( TUNE ) + #include + _CrtMemState startMemState; + _CrtMemState endMemState; +#endif + +#include "tinyxml.h" + +bool XmlTest (const char* testString, const char* expected, const char* found, bool noEcho = false); +bool XmlTest( const char* testString, int expected, int found, bool noEcho = false ); + +static int gPass = 0; +static int gFail = 0; + + + +bool XmlTest (const char* testString, const char* expected, const char* found, bool noEcho ) +{ + bool pass = !strcmp( expected, found ); + if ( pass ) + printf ("[pass]"); + else + printf ("[fail]"); + + if ( noEcho ) + printf (" %s\n", testString); + else + printf (" %s [%s][%s]\n", testString, expected, found); + + if ( pass ) + ++gPass; + else + ++gFail; + return pass; +} + + +bool XmlTest( const char* testString, int expected, int found, bool noEcho ) +{ + bool pass = ( expected == found ); + if ( pass ) + printf ("[pass]"); + else + printf ("[fail]"); + + if ( noEcho ) + printf (" %s\n", testString); + else + printf (" %s [%d][%d]\n", testString, expected, found); + + if ( pass ) + ++gPass; + else + ++gFail; + return pass; +} + + +void NullLineEndings( char* p ) +{ + while( p && *p ) { + if ( *p == '\n' || *p == '\r' ) { + *p = 0; + return; + } + ++p; + } +} + +// +// This file demonstrates some basic functionality of TinyXml. +// Note that the example is very contrived. It presumes you know +// what is in the XML file. But it does test the basic operations, +// and show how to add and remove nodes. +// + +int main() +{ + + // + // We start with the 'demoStart' todo list. Process it. And + // should hopefully end up with the todo list as illustrated. + // + const char* demoStart = + "\n" + "" + "\n" + "\n" + " Go to the Toy store!" + " Do bills " + " Look for Evil Dinosaurs! " + ""; + + { + + #ifdef TIXML_USE_STL + // What the todo list should look like after processing. + // In stream (no formatting) representation. + const char* demoEnd = + "" + "" + "" + "" + "Go to the" + "Toy store!" + "" + "" + "Talk to:" + "" + "" + "" + "" + "" + "" + "Do bills" + "" + ""; + #endif + + // The example parses from the character string (above): + #if defined( WIN32 ) && defined( TUNE ) + _CrtMemCheckpoint( &startMemState ); + #endif + + { + // Write to a file and read it back, to check file I/O. + + TiXmlDocument doc( "demotest.xml" ); + doc.Parse( demoStart ); + + if ( doc.Error() ) + { + printf( "Error in %s: %s\n", doc.Value(), doc.ErrorDesc() ); + exit( 1 ); + } + doc.SaveFile(); + } + + TiXmlDocument doc( "demotest.xml" ); + bool loadOkay = doc.LoadFile(); + + if ( !loadOkay ) + { + printf( "Could not load test file 'demotest.xml'. Error='%s'. Exiting.\n", doc.ErrorDesc() ); + exit( 1 ); + } + + printf( "** Demo doc read from disk: ** \n\n" ); + printf( "** Printing via doc.Print **\n" ); + doc.Print( stdout ); + + { + printf( "** Printing via TiXmlPrinter **\n" ); + TiXmlPrinter printer; + doc.Accept( &printer ); + fprintf( stdout, "%s", printer.CStr() ); + } + #ifdef TIXML_USE_STL + { + printf( "** Printing via operator<< **\n" ); + std::cout << doc; + } + #endif + TiXmlNode* node = 0; + TiXmlElement* todoElement = 0; + TiXmlElement* itemElement = 0; + + + // -------------------------------------------------------- + // An example of changing existing attributes, and removing + // an element from the document. + // -------------------------------------------------------- + + // Get the "ToDo" element. + // It is a child of the document, and can be selected by name. + node = doc.FirstChild( "ToDo" ); + assert( node ); + todoElement = node->ToElement(); + assert( todoElement ); + + // Going to the toy store is now our second priority... + // So set the "priority" attribute of the first item in the list. + node = todoElement->FirstChildElement(); // This skips the "PDA" comment. + assert( node ); + itemElement = node->ToElement(); + assert( itemElement ); + itemElement->SetAttribute( "priority", 2 ); + + // Change the distance to "doing bills" from + // "none" to "here". It's the next sibling element. + itemElement = itemElement->NextSiblingElement(); + assert( itemElement ); + itemElement->SetAttribute( "distance", "here" ); + + // Remove the "Look for Evil Dinosaurs!" item. + // It is 1 more sibling away. We ask the parent to remove + // a particular child. + itemElement = itemElement->NextSiblingElement(); + todoElement->RemoveChild( itemElement ); + + itemElement = 0; + + // -------------------------------------------------------- + // What follows is an example of created elements and text + // nodes and adding them to the document. + // -------------------------------------------------------- + + // Add some meetings. + TiXmlElement item( "Item" ); + item.SetAttribute( "priority", "1" ); + item.SetAttribute( "distance", "far" ); + + TiXmlText text( "Talk to:" ); + + TiXmlElement meeting1( "Meeting" ); + meeting1.SetAttribute( "where", "School" ); + + TiXmlElement meeting2( "Meeting" ); + meeting2.SetAttribute( "where", "Lunch" ); + + TiXmlElement attendee1( "Attendee" ); + attendee1.SetAttribute( "name", "Marple" ); + attendee1.SetAttribute( "position", "teacher" ); + + TiXmlElement attendee2( "Attendee" ); + attendee2.SetAttribute( "name", "Voel" ); + attendee2.SetAttribute( "position", "counselor" ); + + // Assemble the nodes we've created: + meeting1.InsertEndChild( attendee1 ); + meeting1.InsertEndChild( attendee2 ); + + item.InsertEndChild( text ); + item.InsertEndChild( meeting1 ); + item.InsertEndChild( meeting2 ); + + // And add the node to the existing list after the first child. + node = todoElement->FirstChild( "Item" ); + assert( node ); + itemElement = node->ToElement(); + assert( itemElement ); + + todoElement->InsertAfterChild( itemElement, item ); + + printf( "\n** Demo doc processed: ** \n\n" ); + doc.Print( stdout ); + + + #ifdef TIXML_USE_STL + printf( "** Demo doc processed to stream: ** \n\n" ); + cout << doc << endl << endl; + #endif + + // -------------------------------------------------------- + // Different tests...do we have what we expect? + // -------------------------------------------------------- + + int count = 0; + TiXmlElement* element; + + ////////////////////////////////////////////////////// + + #ifdef TIXML_USE_STL + cout << "** Basic structure. **\n"; + ostringstream outputStream( ostringstream::out ); + outputStream << doc; + XmlTest( "Output stream correct.", string( demoEnd ).c_str(), + outputStream.str().c_str(), true ); + #endif + + node = doc.RootElement(); + assert( node ); + XmlTest( "Root element exists.", true, ( node != 0 && node->ToElement() ) ); + XmlTest ( "Root element value is 'ToDo'.", "ToDo", node->Value()); + + node = node->FirstChild(); + XmlTest( "First child exists & is a comment.", true, ( node != 0 && node->ToComment() ) ); + node = node->NextSibling(); + XmlTest( "Sibling element exists & is an element.", true, ( node != 0 && node->ToElement() ) ); + XmlTest ( "Value is 'Item'.", "Item", node->Value() ); + + node = node->FirstChild(); + XmlTest ( "First child exists.", true, ( node != 0 && node->ToText() ) ); + XmlTest ( "Value is 'Go to the'.", "Go to the", node->Value() ); + + + ////////////////////////////////////////////////////// + printf ("\n** Iterators. **\n"); + + // Walk all the top level nodes of the document. + count = 0; + for( node = doc.FirstChild(); + node; + node = node->NextSibling() ) + { + count++; + } + XmlTest( "Top level nodes, using First / Next.", 3, count ); + + count = 0; + for( node = doc.LastChild(); + node; + node = node->PreviousSibling() ) + { + count++; + } + XmlTest( "Top level nodes, using Last / Previous.", 3, count ); + + // Walk all the top level nodes of the document, + // using a different syntax. + count = 0; + for( node = doc.IterateChildren( 0 ); + node; + node = doc.IterateChildren( node ) ) + { + count++; + } + XmlTest( "Top level nodes, using IterateChildren.", 3, count ); + + // Walk all the elements in a node. + count = 0; + for( element = todoElement->FirstChildElement(); + element; + element = element->NextSiblingElement() ) + { + count++; + } + XmlTest( "Children of the 'ToDo' element, using First / Next.", + 3, count ); + + // Walk all the elements in a node by value. + count = 0; + for( node = todoElement->FirstChild( "Item" ); + node; + node = node->NextSibling( "Item" ) ) + { + count++; + } + XmlTest( "'Item' children of the 'ToDo' element, using First/Next.", 3, count ); + + count = 0; + for( node = todoElement->LastChild( "Item" ); + node; + node = node->PreviousSibling( "Item" ) ) + { + count++; + } + XmlTest( "'Item' children of the 'ToDo' element, using Last/Previous.", 3, count ); + + #ifdef TIXML_USE_STL + { + cout << "\n** Parsing. **\n"; + istringstream parse0( "" ); + TiXmlElement element0( "default" ); + parse0 >> element0; + + XmlTest ( "Element parsed, value is 'Element0'.", "Element0", element0.Value() ); + XmlTest ( "Reads attribute 'attribute0=\"foo0\"'.", "foo0", element0.Attribute( "attribute0" )); + XmlTest ( "Reads incorrectly formatted 'attribute1=noquotes'.", "noquotes", element0.Attribute( "attribute1" ) ); + XmlTest ( "Read attribute with entity value '>'.", ">", element0.Attribute( "attribute2" ) ); + } + #endif + + { + const char* error = "\n" + "\n" + " \n" + ""; + + TiXmlDocument docTest; + docTest.Parse( error ); + XmlTest( "Error row", docTest.ErrorRow(), 3 ); + XmlTest( "Error column", docTest.ErrorCol(), 17 ); + //printf( "error=%d id='%s' row %d col%d\n", (int) doc.Error(), doc.ErrorDesc(), doc.ErrorRow()+1, doc.ErrorCol() + 1 ); + + } + + #ifdef TIXML_USE_STL + { + ////////////////////////////////////////////////////// + cout << "\n** Streaming. **\n"; + + // Round trip check: stream in, then stream back out to verify. The stream + // out has already been checked, above. We use the output + + istringstream inputStringStream( outputStream.str() ); + TiXmlDocument document0; + + inputStringStream >> document0; + + ostringstream outputStream0( ostringstream::out ); + outputStream0 << document0; + + XmlTest( "Stream round trip correct.", string( demoEnd ).c_str(), + outputStream0.str().c_str(), true ); + + std::string str; + str << document0; + + XmlTest( "String printing correct.", string( demoEnd ).c_str(), + str.c_str(), true ); + } + #endif + } + + { + const char* str = ""; + + TiXmlDocument doc; + doc.Parse( str ); + + TiXmlElement* ele = doc.FirstChildElement(); + + int iVal, result; + double dVal; + + result = ele->QueryDoubleAttribute( "attr0", &dVal ); + XmlTest( "Query attribute: int as double", result, TIXML_SUCCESS ); + XmlTest( "Query attribute: int as double", (int)dVal, 1 ); + result = ele->QueryDoubleAttribute( "attr1", &dVal ); + XmlTest( "Query attribute: double as double", (int)dVal, 2 ); + result = ele->QueryIntAttribute( "attr1", &iVal ); + XmlTest( "Query attribute: double as int", result, TIXML_SUCCESS ); + XmlTest( "Query attribute: double as int", iVal, 2 ); + result = ele->QueryIntAttribute( "attr2", &iVal ); + XmlTest( "Query attribute: not a number", result, TIXML_WRONG_TYPE ); + result = ele->QueryIntAttribute( "bar", &iVal ); + XmlTest( "Query attribute: does not exist", result, TIXML_NO_ATTRIBUTE ); + } + + { + const char* str = ""; + + TiXmlDocument doc; + doc.Parse( str ); + + TiXmlElement* ele = doc.FirstChildElement(); + + int iVal; + double dVal; + + ele->SetAttribute( "str", "strValue" ); + ele->SetAttribute( "int", 1 ); + ele->SetDoubleAttribute( "double", -1.0 ); + + const char* cStr = ele->Attribute( "str" ); + ele->QueryIntAttribute( "int", &iVal ); + ele->QueryDoubleAttribute( "double", &dVal ); + + XmlTest( "Attribute round trip. c-string.", "strValue", cStr ); + XmlTest( "Attribute round trip. int.", 1, iVal ); + XmlTest( "Attribute round trip. double.", -1, (int)dVal ); + } + + { + const char* str = "\t\t\n" + ""; + + TiXmlDocument doc; + doc.SetTabSize( 8 ); + doc.Parse( str ); + + TiXmlHandle docHandle( &doc ); + TiXmlHandle roomHandle = docHandle.FirstChildElement( "room" ); + + assert( docHandle.Node() ); + assert( roomHandle.Element() ); + + TiXmlElement* room = roomHandle.Element(); + assert( room ); + TiXmlAttribute* doors = room->FirstAttribute(); + assert( doors ); + + XmlTest( "Location tracking: Tab 8: room row", room->Row(), 1 ); + XmlTest( "Location tracking: Tab 8: room col", room->Column(), 49 ); + XmlTest( "Location tracking: Tab 8: doors row", doors->Row(), 1 ); + XmlTest( "Location tracking: Tab 8: doors col", doors->Column(), 55 ); + } + + { + const char* str = "\t\t\n" + " \n" + " A great door!\n" + "\t" + ""; + + TiXmlDocument doc; + doc.Parse( str ); + + TiXmlHandle docHandle( &doc ); + TiXmlHandle roomHandle = docHandle.FirstChildElement( "room" ); + TiXmlHandle commentHandle = docHandle.FirstChildElement( "room" ).FirstChild(); + TiXmlHandle textHandle = docHandle.FirstChildElement( "room" ).ChildElement( "door", 0 ).FirstChild(); + TiXmlHandle door0Handle = docHandle.FirstChildElement( "room" ).ChildElement( 0 ); + TiXmlHandle door1Handle = docHandle.FirstChildElement( "room" ).ChildElement( 1 ); + + assert( docHandle.Node() ); + assert( roomHandle.Element() ); + assert( commentHandle.Node() ); + assert( textHandle.Text() ); + assert( door0Handle.Element() ); + assert( door1Handle.Element() ); + + TiXmlDeclaration* declaration = doc.FirstChild()->ToDeclaration(); + assert( declaration ); + TiXmlElement* room = roomHandle.Element(); + assert( room ); + TiXmlAttribute* doors = room->FirstAttribute(); + assert( doors ); + TiXmlText* text = textHandle.Text(); + TiXmlComment* comment = commentHandle.Node()->ToComment(); + assert( comment ); + TiXmlElement* door0 = door0Handle.Element(); + TiXmlElement* door1 = door1Handle.Element(); + + XmlTest( "Location tracking: Declaration row", declaration->Row(), 1 ); + XmlTest( "Location tracking: Declaration col", declaration->Column(), 5 ); + XmlTest( "Location tracking: room row", room->Row(), 1 ); + XmlTest( "Location tracking: room col", room->Column(), 45 ); + XmlTest( "Location tracking: doors row", doors->Row(), 1 ); + XmlTest( "Location tracking: doors col", doors->Column(), 51 ); + XmlTest( "Location tracking: Comment row", comment->Row(), 2 ); + XmlTest( "Location tracking: Comment col", comment->Column(), 3 ); + XmlTest( "Location tracking: text row", text->Row(), 3 ); + XmlTest( "Location tracking: text col", text->Column(), 24 ); + XmlTest( "Location tracking: door0 row", door0->Row(), 3 ); + XmlTest( "Location tracking: door0 col", door0->Column(), 5 ); + XmlTest( "Location tracking: door1 row", door1->Row(), 4 ); + XmlTest( "Location tracking: door1 col", door1->Column(), 5 ); + } + + + // -------------------------------------------------------- + // UTF-8 testing. It is important to test: + // 1. Making sure name, value, and text read correctly + // 2. Row, Col functionality + // 3. Correct output + // -------------------------------------------------------- + printf ("\n** UTF-8 **\n"); + { + TiXmlDocument doc( "utf8test.xml" ); + doc.LoadFile(); + if ( doc.Error() && doc.ErrorId() == TiXmlBase::TIXML_ERROR_OPENING_FILE ) { + printf( "WARNING: File 'utf8test.xml' not found.\n" + "(Are you running the test from the wrong directory?)\n" + "Could not test UTF-8 functionality.\n" ); + } + else + { + TiXmlHandle docH( &doc ); + // Get the attribute "value" from the "Russian" element and check it. + TiXmlElement* element = docH.FirstChildElement( "document" ).FirstChildElement( "Russian" ).Element(); + const unsigned char correctValue[] = { 0xd1U, 0x86U, 0xd0U, 0xb5U, 0xd0U, 0xbdU, 0xd0U, 0xbdU, + 0xd0U, 0xbeU, 0xd1U, 0x81U, 0xd1U, 0x82U, 0xd1U, 0x8cU, 0 }; + + XmlTest( "UTF-8: Russian value.", (const char*)correctValue, element->Attribute( "value" ), true ); + XmlTest( "UTF-8: Russian value row.", 4, element->Row() ); + XmlTest( "UTF-8: Russian value column.", 5, element->Column() ); + + const unsigned char russianElementName[] = { 0xd0U, 0xa0U, 0xd1U, 0x83U, + 0xd1U, 0x81U, 0xd1U, 0x81U, + 0xd0U, 0xbaU, 0xd0U, 0xb8U, + 0xd0U, 0xb9U, 0 }; + const char russianText[] = "<\xD0\xB8\xD0\xBC\xD0\xB5\xD0\xB5\xD1\x82>"; + + TiXmlText* text = docH.FirstChildElement( "document" ).FirstChildElement( (const char*) russianElementName ).Child( 0 ).Text(); + XmlTest( "UTF-8: Browsing russian element name.", + russianText, + text->Value(), + true ); + XmlTest( "UTF-8: Russian element name row.", 7, text->Row() ); + XmlTest( "UTF-8: Russian element name column.", 47, text->Column() ); + + TiXmlDeclaration* dec = docH.Child( 0 ).Node()->ToDeclaration(); + XmlTest( "UTF-8: Declaration column.", 1, dec->Column() ); + XmlTest( "UTF-8: Document column.", 1, doc.Column() ); + + // Now try for a round trip. + doc.SaveFile( "utf8testout.xml" ); + + // Check the round trip. + char savedBuf[256]; + char verifyBuf[256]; + int okay = 1; + + FILE* saved = fopen( "utf8testout.xml", "r" ); + FILE* verify = fopen( "utf8testverify.xml", "r" ); + + //bool firstLineBOM=true; + if ( saved && verify ) + { + while ( fgets( verifyBuf, 256, verify ) ) + { + fgets( savedBuf, 256, saved ); + NullLineEndings( verifyBuf ); + NullLineEndings( savedBuf ); + + if ( /*!firstLineBOM && */ strcmp( verifyBuf, savedBuf ) ) + { + printf( "verify:%s<\n", verifyBuf ); + printf( "saved :%s<\n", savedBuf ); + okay = 0; + break; + } + //firstLineBOM = false; + } + } + if ( saved ) + fclose( saved ); + if ( verify ) + fclose( verify ); + XmlTest( "UTF-8: Verified multi-language round trip.", 1, okay ); + + // On most Western machines, this is an element that contains + // the word "resume" with the correct accents, in a latin encoding. + // It will be something else completely on non-wester machines, + // which is why TinyXml is switching to UTF-8. + const char latin[] = "r\x82sum\x82"; + + TiXmlDocument latinDoc; + latinDoc.Parse( latin, 0, TIXML_ENCODING_LEGACY ); + + text = latinDoc.FirstChildElement()->FirstChild()->ToText(); + XmlTest( "Legacy encoding: Verify text element.", "r\x82sum\x82", text->Value() ); + } + } + + ////////////////////// + // Copy and assignment + ////////////////////// + printf ("\n** Copy and Assignment **\n"); + { + TiXmlElement element( "foo" ); + element.Parse( "", 0, TIXML_ENCODING_UNKNOWN ); + + TiXmlElement elementCopy( element ); + TiXmlElement elementAssign( "foo" ); + elementAssign.Parse( "", 0, TIXML_ENCODING_UNKNOWN ); + elementAssign = element; + + XmlTest( "Copy/Assign: element copy #1.", "element", elementCopy.Value() ); + XmlTest( "Copy/Assign: element copy #2.", "value", elementCopy.Attribute( "name" ) ); + XmlTest( "Copy/Assign: element assign #1.", "element", elementAssign.Value() ); + XmlTest( "Copy/Assign: element assign #2.", "value", elementAssign.Attribute( "name" ) ); + XmlTest( "Copy/Assign: element assign #3.", true, ( 0 == elementAssign.Attribute( "foo" )) ); + + TiXmlComment comment; + comment.Parse( "", 0, TIXML_ENCODING_UNKNOWN ); + TiXmlComment commentCopy( comment ); + TiXmlComment commentAssign; + commentAssign = commentCopy; + XmlTest( "Copy/Assign: comment copy.", "comment", commentCopy.Value() ); + XmlTest( "Copy/Assign: comment assign.", "comment", commentAssign.Value() ); + + TiXmlUnknown unknown; + unknown.Parse( "<[unknown]>", 0, TIXML_ENCODING_UNKNOWN ); + TiXmlUnknown unknownCopy( unknown ); + TiXmlUnknown unknownAssign; + unknownAssign.Parse( "incorrect", 0, TIXML_ENCODING_UNKNOWN ); + unknownAssign = unknownCopy; + XmlTest( "Copy/Assign: unknown copy.", "[unknown]", unknownCopy.Value() ); + XmlTest( "Copy/Assign: unknown assign.", "[unknown]", unknownAssign.Value() ); + + TiXmlText text( "TextNode" ); + TiXmlText textCopy( text ); + TiXmlText textAssign( "incorrect" ); + textAssign = text; + XmlTest( "Copy/Assign: text copy.", "TextNode", textCopy.Value() ); + XmlTest( "Copy/Assign: text assign.", "TextNode", textAssign.Value() ); + + TiXmlDeclaration dec; + dec.Parse( "", 0, TIXML_ENCODING_UNKNOWN ); + TiXmlDeclaration decCopy( dec ); + TiXmlDeclaration decAssign; + decAssign = dec; + + XmlTest( "Copy/Assign: declaration copy.", "UTF-8", decCopy.Encoding() ); + XmlTest( "Copy/Assign: text assign.", "UTF-8", decAssign.Encoding() ); + + TiXmlDocument doc; + elementCopy.InsertEndChild( textCopy ); + doc.InsertEndChild( decAssign ); + doc.InsertEndChild( elementCopy ); + doc.InsertEndChild( unknownAssign ); + + TiXmlDocument docCopy( doc ); + TiXmlDocument docAssign; + docAssign = docCopy; + + #ifdef TIXML_USE_STL + std::string original, copy, assign; + original << doc; + copy << docCopy; + assign << docAssign; + XmlTest( "Copy/Assign: document copy.", original.c_str(), copy.c_str(), true ); + XmlTest( "Copy/Assign: document assign.", original.c_str(), assign.c_str(), true ); + + #endif + } + + ////////////////////////////////////////////////////// +#ifdef TIXML_USE_STL + printf ("\n** Parsing, no Condense Whitespace **\n"); + TiXmlBase::SetCondenseWhiteSpace( false ); + { + istringstream parse1( "This is \ntext" ); + TiXmlElement text1( "text" ); + parse1 >> text1; + + XmlTest ( "Condense white space OFF.", "This is \ntext", + text1.FirstChild()->Value(), + true ); + } + TiXmlBase::SetCondenseWhiteSpace( true ); +#endif + + ////////////////////////////////////////////////////// + // GetText(); + { + const char* str = "This is text"; + TiXmlDocument doc; + doc.Parse( str ); + const TiXmlElement* element = doc.RootElement(); + + XmlTest( "GetText() normal use.", "This is text", element->GetText() ); + + str = "This is text"; + doc.Clear(); + doc.Parse( str ); + element = doc.RootElement(); + + XmlTest( "GetText() contained element.", element->GetText() == 0, true ); + + str = "This is text"; + doc.Clear(); + TiXmlBase::SetCondenseWhiteSpace( false ); + doc.Parse( str ); + TiXmlBase::SetCondenseWhiteSpace( true ); + element = doc.RootElement(); + + XmlTest( "GetText() partial.", "This is ", element->GetText() ); + } + + + ////////////////////////////////////////////////////// + // CDATA + { + const char* str = "" + " the rules!\n" + "...since I make symbolic puns" + "]]>" + ""; + TiXmlDocument doc; + doc.Parse( str ); + doc.Print(); + + XmlTest( "CDATA parse.", doc.FirstChildElement()->FirstChild()->Value(), + "I am > the rules!\n...since I make symbolic puns", + true ); + + #ifdef TIXML_USE_STL + //cout << doc << '\n'; + + doc.Clear(); + + istringstream parse0( str ); + parse0 >> doc; + //cout << doc << '\n'; + + XmlTest( "CDATA stream.", doc.FirstChildElement()->FirstChild()->Value(), + "I am > the rules!\n...since I make symbolic puns", + true ); + #endif + + TiXmlDocument doc1 = doc; + //doc.Print(); + + XmlTest( "CDATA copy.", doc1.FirstChildElement()->FirstChild()->Value(), + "I am > the rules!\n...since I make symbolic puns", + true ); + } + { + // [ 1482728 ] Wrong wide char parsing + char buf[256]; + buf[255] = 0; + for( int i=0; i<255; ++i ) { + buf[i] = (char)((i>=32) ? i : 32); + } + TIXML_STRING str( ""; + + TiXmlDocument doc; + doc.Parse( str.c_str() ); + + TiXmlPrinter printer; + printer.SetStreamPrinting(); + doc.Accept( &printer ); + + XmlTest( "CDATA with all bytes #1.", str.c_str(), printer.CStr(), true ); + + #ifdef TIXML_USE_STL + doc.Clear(); + istringstream iss( printer.Str() ); + iss >> doc; + std::string out; + out << doc; + XmlTest( "CDATA with all bytes #2.", out.c_str(), printer.CStr(), true ); + #endif + } + { + // [ 1480107 ] Bug-fix for STL-streaming of CDATA that contains tags + // CDATA streaming had a couple of bugs, that this tests for. + const char* str = "" + "I am > the rules!\n" + "...since I make symbolic puns" + "]]>" + ""; + TiXmlDocument doc; + doc.Parse( str ); + doc.Print(); + + XmlTest( "CDATA parse. [ 1480107 ]", doc.FirstChildElement()->FirstChild()->Value(), + "I am > the rules!\n...since I make symbolic puns", + true ); + + #ifdef TIXML_USE_STL + + doc.Clear(); + + istringstream parse0( str ); + parse0 >> doc; + + XmlTest( "CDATA stream. [ 1480107 ]", doc.FirstChildElement()->FirstChild()->Value(), + "I am > the rules!\n...since I make symbolic puns", + true ); + #endif + + TiXmlDocument doc1 = doc; + //doc.Print(); + + XmlTest( "CDATA copy. [ 1480107 ]", doc1.FirstChildElement()->FirstChild()->Value(), + "I am > the rules!\n...since I make symbolic puns", + true ); + } + ////////////////////////////////////////////////////// + // Visit() + + + + ////////////////////////////////////////////////////// + printf( "\n** Fuzzing... **\n" ); + + const int FUZZ_ITERATION = 300; + + // The only goal is not to crash on bad input. + int len = (int) strlen( demoStart ); + for( int i=0; i" + "" + " " + ""; + + TiXmlDocument doc( "passages.xml" ); + doc.Parse( passages ); + TiXmlElement* psg = doc.RootElement()->FirstChildElement(); + const char* context = psg->Attribute( "context" ); + const char* expected = "Line 5 has \"quotation marks\" and 'apostrophe marks'. It also has <, >, and &, as well as a fake copyright \xC2\xA9."; + + XmlTest( "Entity transformation: read. ", expected, context, true ); + + FILE* textfile = fopen( "textfile.txt", "w" ); + if ( textfile ) + { + psg->Print( textfile, 0 ); + fclose( textfile ); + } + textfile = fopen( "textfile.txt", "r" ); + assert( textfile ); + if ( textfile ) + { + char buf[ 1024 ]; + fgets( buf, 1024, textfile ); + XmlTest( "Entity transformation: write. ", + "", + buf, + true ); + } + fclose( textfile ); + } + + { + FILE* textfile = fopen( "test5.xml", "w" ); + if ( textfile ) + { + fputs("", textfile); + fclose(textfile); + + TiXmlDocument doc; + doc.LoadFile( "test5.xml" ); + XmlTest( "dot in element attributes and names", doc.Error(), 0); + } + } + + { + FILE* textfile = fopen( "test6.xml", "w" ); + if ( textfile ) + { + fputs("1.1 Start easy ignore fin thickness ", textfile ); + fclose(textfile); + + TiXmlDocument doc; + bool result = doc.LoadFile( "test6.xml" ); + XmlTest( "Entity with one digit.", result, true ); + + TiXmlText* text = doc.FirstChildElement()->FirstChildElement()->FirstChild()->ToText(); + XmlTest( "Entity with one digit.", + text->Value(), "1.1 Start easy ignore fin thickness\n" ); + } + } + + { + // DOCTYPE not preserved (950171) + // + const char* doctype = + "" + "" + "" + "" + ""; + + TiXmlDocument doc; + doc.Parse( doctype ); + doc.SaveFile( "test7.xml" ); + doc.Clear(); + doc.LoadFile( "test7.xml" ); + + TiXmlHandle docH( &doc ); + TiXmlUnknown* unknown = docH.Child( 1 ).Unknown(); + XmlTest( "Correct value of unknown.", "!DOCTYPE PLAY SYSTEM 'play.dtd'", unknown->Value() ); + #ifdef TIXML_USE_STL + TiXmlNode* node = docH.Child( 2 ).Node(); + std::string str; + str << (*node); + XmlTest( "Correct streaming of unknown.", "", str.c_str() ); + #endif + } + + { + // [ 791411 ] Formatting bug + // Comments do not stream out correctly. + const char* doctype = + ""; + TiXmlDocument doc; + doc.Parse( doctype ); + + TiXmlHandle docH( &doc ); + TiXmlComment* comment = docH.Child( 0 ).Node()->ToComment(); + + XmlTest( "Comment formatting.", " Somewhat ", comment->Value() ); + #ifdef TIXML_USE_STL + std::string str; + str << (*comment); + XmlTest( "Comment streaming.", "", str.c_str() ); + #endif + } + + { + // [ 870502 ] White space issues + TiXmlDocument doc; + TiXmlText* text; + TiXmlHandle docH( &doc ); + + const char* doctype0 = " This has leading and trailing space "; + const char* doctype1 = "This has internal space"; + const char* doctype2 = " This has leading, trailing, and internal space "; + + TiXmlBase::SetCondenseWhiteSpace( false ); + doc.Clear(); + doc.Parse( doctype0 ); + text = docH.FirstChildElement( "element" ).Child( 0 ).Text(); + XmlTest( "White space kept.", " This has leading and trailing space ", text->Value() ); + + doc.Clear(); + doc.Parse( doctype1 ); + text = docH.FirstChildElement( "element" ).Child( 0 ).Text(); + XmlTest( "White space kept.", "This has internal space", text->Value() ); + + doc.Clear(); + doc.Parse( doctype2 ); + text = docH.FirstChildElement( "element" ).Child( 0 ).Text(); + XmlTest( "White space kept.", " This has leading, trailing, and internal space ", text->Value() ); + + TiXmlBase::SetCondenseWhiteSpace( true ); + doc.Clear(); + doc.Parse( doctype0 ); + text = docH.FirstChildElement( "element" ).Child( 0 ).Text(); + XmlTest( "White space condensed.", "This has leading and trailing space", text->Value() ); + + doc.Clear(); + doc.Parse( doctype1 ); + text = docH.FirstChildElement( "element" ).Child( 0 ).Text(); + XmlTest( "White space condensed.", "This has internal space", text->Value() ); + + doc.Clear(); + doc.Parse( doctype2 ); + text = docH.FirstChildElement( "element" ).Child( 0 ).Text(); + XmlTest( "White space condensed.", "This has leading, trailing, and internal space", text->Value() ); + } + + { + // Double attributes + const char* doctype = ""; + + TiXmlDocument doc; + doc.Parse( doctype ); + + XmlTest( "Parsing repeated attributes.", true, doc.Error() ); // is an error to tinyxml (didn't use to be, but caused issues) + //XmlTest( "Parsing repeated attributes.", "blue", doc.FirstChildElement( "element" )->Attribute( "attr" ) ); + } + + { + // Embedded null in stream. + const char* doctype = ""; + + TiXmlDocument doc; + doc.Parse( doctype ); + XmlTest( "Embedded null throws error.", true, doc.Error() ); + + #ifdef TIXML_USE_STL + istringstream strm( doctype ); + doc.Clear(); + doc.ClearError(); + strm >> doc; + XmlTest( "Embedded null throws error.", true, doc.Error() ); + #endif + } + + { + // Legacy mode test. (This test may only pass on a western system) + const char* str = + "" + "<>" + "Cntnt" + ""; + + TiXmlDocument doc; + doc.Parse( str ); + + TiXmlHandle docHandle( &doc ); + TiXmlHandle aHandle = docHandle.FirstChildElement( "" ); + TiXmlHandle tHandle = aHandle.Child( 0 ); + assert( aHandle.Element() ); + assert( tHandle.Text() ); + XmlTest( "ISO-8859-1 Parsing.", "Cntnt", tHandle.Text()->Value() ); + } + + { + // Empty documents should return TIXML_ERROR_PARSING_EMPTY, bug 1070717 + const char* str = " "; + TiXmlDocument doc; + doc.Parse( str ); + XmlTest( "Empty document error TIXML_ERROR_DOCUMENT_EMPTY", TiXmlBase::TIXML_ERROR_DOCUMENT_EMPTY, doc.ErrorId() ); + } + #ifndef TIXML_USE_STL + { + // String equality. [ 1006409 ] string operator==/!= no worky in all cases + TiXmlString temp; + XmlTest( "Empty tinyxml string compare equal", ( temp == "" ), true ); + + TiXmlString foo; + TiXmlString bar( "" ); + XmlTest( "Empty tinyxml string compare equal", ( foo == bar ), true ); + } + + #endif + { + // Bug [ 1195696 ] from marlonism + TiXmlBase::SetCondenseWhiteSpace(false); + TiXmlDocument xml; + xml.Parse("This hangs"); + XmlTest( "Test safe error return.", xml.Error(), false ); + } + + { + // Bug [ 1243992 ] - another infinite loop + TiXmlDocument doc; + doc.SetCondenseWhiteSpace(false); + doc.Parse("

test

"); + } + { + // Low entities + TiXmlDocument xml; + xml.Parse( "" ); + const char result[] = { 0x0e, 0 }; + XmlTest( "Low entities.", xml.FirstChildElement()->GetText(), result ); + xml.Print(); + } + { + // Bug [ 1451649 ] Attribute values with trailing quotes not handled correctly + TiXmlDocument xml; + xml.Parse( "" ); + XmlTest( "Throw error with bad end quotes.", xml.Error(), true ); + } + #ifdef TIXML_USE_STL + { + // Bug [ 1449463 ] Consider generic query + TiXmlDocument xml; + xml.Parse( "" ); + + TiXmlElement* ele = xml.FirstChildElement(); + double d; + int i; + float f; + bool b; + std::string str; + + XmlTest( "QueryValueAttribute", ele->QueryValueAttribute( "bar", &d ), TIXML_SUCCESS ); + XmlTest( "QueryValueAttribute", ele->QueryValueAttribute( "bar", &i ), TIXML_SUCCESS ); + XmlTest( "QueryValueAttribute", ele->QueryValueAttribute( "bar", &f ), TIXML_SUCCESS ); + XmlTest( "QueryValueAttribute", ele->QueryValueAttribute( "bar", &b ), TIXML_WRONG_TYPE ); + XmlTest( "QueryValueAttribute", ele->QueryValueAttribute( "nobar", &b ), TIXML_NO_ATTRIBUTE ); + XmlTest( "QueryValueAttribute", ele->QueryValueAttribute( "barStr", &str ), TIXML_SUCCESS ); + + XmlTest( "QueryValueAttribute", (d==3.0), true ); + XmlTest( "QueryValueAttribute", (i==3), true ); + XmlTest( "QueryValueAttribute", (f==3.0f), true ); + XmlTest( "QueryValueAttribute", (str==std::string( "a string" )), true ); + } + #endif + + #ifdef TIXML_USE_STL + { + // [ 1505267 ] redundant malloc in TiXmlElement::Attribute + TiXmlDocument xml; + xml.Parse( "" ); + TiXmlElement* ele = xml.FirstChildElement(); + double d; + int i; + + std::string bar = "bar"; + + const std::string* atrrib = ele->Attribute( bar ); + ele->Attribute( bar, &d ); + ele->Attribute( bar, &i ); + + XmlTest( "Attribute", atrrib->empty(), false ); + XmlTest( "Attribute", (d==3.0), true ); + XmlTest( "Attribute", (i==3), true ); + } + #endif + + { + // [ 1356059 ] Allow TiXMLDocument to only be at the top level + TiXmlDocument xml, xml2; + xml.InsertEndChild( xml2 ); + XmlTest( "Document only at top level.", xml.Error(), true ); + XmlTest( "Document only at top level.", xml.ErrorId(), TiXmlBase::TIXML_ERROR_DOCUMENT_TOP_ONLY ); + } + + { + // [ 1663758 ] Failure to report error on bad XML + TiXmlDocument xml; + xml.Parse(""); + XmlTest("Missing end tag at end of input", xml.Error(), true); + xml.Parse(" "); + XmlTest("Missing end tag with trailing whitespace", xml.Error(), true); + } + + { + // [ 1635701 ] fail to parse files with a tag separated into two lines + // I'm not sure this is a bug. Marked 'pending' for feedback. + TiXmlDocument xml; + xml.Parse( "<p>text</p\n><title>" ); + //xml.Print(); + //XmlTest( "Tag split by newline", xml.Error(), false ); + } + + #ifdef TIXML_USE_STL + { + // [ 1475201 ] TinyXML parses entities in comments + TiXmlDocument xml; + istringstream parse1( "<!-- declarations for <head> & <body> -->" + "<!-- far & away -->" ); + parse1 >> xml; + + TiXmlNode* e0 = xml.FirstChild(); + TiXmlNode* e1 = e0->NextSibling(); + TiXmlComment* c0 = e0->ToComment(); + TiXmlComment* c1 = e1->ToComment(); + + XmlTest( "Comments ignore entities.", " declarations for <head> & <body> ", c0->Value(), true ); + XmlTest( "Comments ignore entities.", " far & away ", c1->Value(), true ); + } + #endif + + { + // [ 1475201 ] TinyXML parses entities in comments + TiXmlDocument xml; + xml.Parse("<!-- declarations for <head> & <body> -->" + "<!-- far & away -->" ); + + TiXmlNode* e0 = xml.FirstChild(); + TiXmlNode* e1 = e0->NextSibling(); + TiXmlComment* c0 = e0->ToComment(); + TiXmlComment* c1 = e1->ToComment(); + + XmlTest( "Comments ignore entities.", " declarations for <head> & <body> ", c0->Value(), true ); + XmlTest( "Comments ignore entities.", " far & away ", c1->Value(), true ); + } + + { + TiXmlDocument xml; + xml.Parse( "<Parent>" + "<child1 att=''/>" + "<!-- With this comment, child2 will not be parsed! -->" + "<child2 att=''/>" + "</Parent>" ); + int count = 0; + + TiXmlNode* ele = 0; + while ( (ele = xml.FirstChildElement( "Parent" )->IterateChildren( ele ) ) != 0 ) { + ++count; + } + XmlTest( "Comments iterate correctly.", 3, count ); + } + + { + // trying to repro ]1874301]. If it doesn't go into an infinite loop, all is well. + unsigned char buf[] = "<?xml version=\"1.0\" encoding=\"utf-8\"?><feed><![CDATA[Test XMLblablablalblbl"; + buf[60] = 239; + buf[61] = 0; + + TiXmlDocument doc; + doc.Parse( (const char*)buf); + } + + + { + // bug 1827248 Error while parsing a little bit malformed file + // Actually not malformed - should work. + TiXmlDocument xml; + xml.Parse( "<attributelist> </attributelist >" ); + XmlTest( "Handle end tag whitespace", false, xml.Error() ); + } + + { + // This one must not result in an infinite loop + TiXmlDocument xml; + xml.Parse( "<infinite>loop" ); + XmlTest( "Infinite loop test.", true, true ); + } + + { + // 1709904 - can not repro the crash + { + TiXmlDocument xml; + xml.Parse( "<tag>/</tag>" ); + XmlTest( "Odd XML parsing.", xml.FirstChild()->Value(), "tag" ); + } + /* Could not repro. { + TiXmlDocument xml; + xml.LoadFile( "EQUI_Inventory.xml" ); + //XmlTest( "Odd XML parsing.", xml.FirstChildElement()->Value(), "XML" ); + TiXmlPrinter printer; + xml.Accept( &printer ); + fprintf( stdout, "%s", printer.CStr() ); + }*/ + } + + /* 1417717 experiment + { + TiXmlDocument xml; + xml.Parse("<text>Dan & Tracie</text>"); + xml.Print(stdout); + } + { + TiXmlDocument xml; + xml.Parse("<text>Dan &foo; Tracie</text>"); + xml.Print(stdout); + } + */ + + #if defined( WIN32 ) && defined( TUNE ) + _CrtMemCheckpoint( &endMemState ); + //_CrtMemDumpStatistics( &endMemState ); + + _CrtMemState diffMemState; + _CrtMemDifference( &diffMemState, &startMemState, &endMemState ); + _CrtMemDumpStatistics( &diffMemState ); + #endif + + printf ("\nPass %d, Fail %d\n", gPass, gFail); + return gFail; +} diff -Nru electricsheep-2.7~b12+svn20091224/TupleStorage/diriterator.cpp electricsheep-3.0.2-git20180325/TupleStorage/diriterator.cpp --- electricsheep-2.7~b12+svn20091224/TupleStorage/diriterator.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/TupleStorage/diriterator.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,135 @@ +#include <sys/stat.h> +#include <string> +#include <stdlib.h> + +#ifdef WIN32 +#include <direct.h> +#include <io.h> +#include <sys/locking.h> +#include <sys/utime.h> +#else +#include <unistd.h> +#include <dirent.h> +#include <fcntl.h> +#include <sys/types.h> +#include <utime.h> +#include <dirent.h> +#endif + + +#include "diriterator.h" + +using namespace std; + +namespace TupleStorage +{ + +/* + CDirectoryIterator(). + +*/ +CDirectoryIterator::CDirectoryIterator( const std::string &_path ) +{ +#ifdef WIN32 + m_pDirData = (dir_data *)malloc( sizeof( dir_data ) ); + m_pDirData->hFile = 0L; + if( _path.size() <= MAX_DIR_LENGTH ) + sprintf( m_pDirData->pattern, "%s/*", _path.c_str() ); +#else + m_pDirData = opendir( _path.c_str() ); +#endif + + m_Directory = _path; +} + +/* + ~CDirectoryIterator(). + +*/ +CDirectoryIterator::~CDirectoryIterator() +{ +#ifdef WIN32 + if( m_pDirData->hFile ) + { + _findclose( m_pDirData->hFile ); + free( m_pDirData ); + } +#else + if( m_pDirData ) + closedir( m_pDirData ); +#endif + + m_pDirData = NULL; +} + +#ifdef WIN32 + #ifndef S_ISDIR + #define S_ISDIR( _mode ) ( (_mode) & _S_IFDIR ) + #endif +#endif + +/* + isDirectory(). + +*/ +bool CDirectoryIterator::isDirectory( const std::string &_object ) +{ + struct stat info; + + std::string url = m_Directory + _object; + if( _object == "." || _object == ".." ) + return( false ); + + if( stat( url.c_str(), &info ) ) + return( false ); + + if( S_ISDIR( info.st_mode ) ) + return( true ); + + return( false ); +} + +/* + Next(). + +*/ +bool CDirectoryIterator::Next( std::string &_object ) +{ +#ifdef WIN32 + struct _finddata_t c_file; + if( m_pDirData->hFile == 0L ) + { + // First entry. + if( (m_pDirData->hFile = (long)_findfirst( m_pDirData->pattern, &c_file ) ) == -1L ) + { + return( false ); + } + else + { + _object = c_file.name; + return( true ); + } + } + else + { // Next entry. + if( _findnext( m_pDirData->hFile, &c_file ) == -1L ) + return( false ); + else + { + _object = c_file.name; + return( true ); + } + } +#else + struct dirent *entry; + if( ( entry = readdir( m_pDirData )) != NULL ) + { + _object = entry->d_name; + return( true ); + } + else + return( false ); +#endif +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/TupleStorage/diriterator.h electricsheep-3.0.2-git20180325/TupleStorage/diriterator.h --- electricsheep-2.7~b12+svn20091224/TupleStorage/diriterator.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/TupleStorage/diriterator.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,45 @@ +#ifndef _DIRITERATOR_H +#define _DIRITERATOR_H + +namespace TupleStorage +{ + +#ifdef WIN32 + +#define MAX_DIR_LENGTH 1023 + +typedef struct dir_data +{ + long hFile; + char pattern[ MAX_DIR_LENGTH + 1 ]; +} dir_data; + +#endif + +/* +*/ +class CDirectoryIterator +{ + +#ifdef WIN32 + dir_data *m_pDirData; +#else + DIR *m_pDirData; +#endif + + std::string m_Directory; + + public: + CDirectoryIterator( const std::string &_path ); + ~CDirectoryIterator(); + + // + bool Next( std::string &_object ); + bool isDirectory( const std::string &_object ); + +// POOLED( CDirectoryIterator, Memory::CLinkPool ); +}; + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/TupleStorage/luastorage.cpp electricsheep-3.0.2-git20180325/TupleStorage/luastorage.cpp --- electricsheep-2.7~b12+svn20091224/TupleStorage/luastorage.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/TupleStorage/luastorage.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,346 @@ +#include <sstream> +#include <string> + +#include "base.h" +#include "Log.h" +#include "Exception.h" +#include "luastorage.h" +#include "clientversion.h" + +#include "boost/filesystem/path.hpp" +#include "boost/filesystem/operations.hpp" +#include "boost/filesystem/convenience.hpp" + +using boost::filesystem::path; +using boost::filesystem::exists; +using boost::filesystem::directory_iterator; +using boost::filesystem::extension; + +using namespace std; + +// Lua. +extern "C" { +#include "lauxlib.h" +#include "lua.h" +#include "lualib.h" + +// IUP stuff. +//#include "iup.h" +//#include "iupcontrols.h" +//#include "iuplua.h" +//#include "iupluacontrols.h" +}; + +namespace TupleStorage +{ + + +/* + Set( [bool] ). + +*/ +bool CStorageLua::Set( const std::string &_entry, const bool _val ) +{ + assert( m_pState != NULL ); + std::stringstream s; + + if( _val == true ) + s << "g_Settings." << _entry << " = true"; + else + s << "g_Settings." << _entry << " = false"; + + m_pState->Execute( s.str().c_str() ); + Dirty( true ); + return( true ); +} + +/* + Set( [integer] ). + +*/ +bool CStorageLua::Set( const std::string &_entry, const int32 _val ) +{ + assert( m_pState != NULL ); + std::stringstream s; + s << "g_Settings." << _entry << " = " << _val; + m_pState->Execute( s.str().c_str() ); + Dirty( true ); + return( true ); +} + +/* + Set( [double] ). + +*/ +bool CStorageLua::Set( const std::string &_entry, const fp8 _val ) +{ + assert( m_pState != NULL ); + std::stringstream s; + s << "g_Settings." << _entry << " = [[" << _val << "]]"; + m_pState->Execute( s.str().c_str() ); + Dirty( true ); + return( true ); +} + +/* + Set( [string] ). + +*/ +bool CStorageLua::Set( const std::string &_entry, const std::string &_str ) +{ + assert( m_pState != NULL ); + std::stringstream s; + s << "g_Settings." << _entry << " = [[" << _str << "]]"; + m_pState->Execute( s.str().c_str() ); + Dirty( true ); + return( true ); +} + +/* + Get( &[bool] ). + +*/ +bool CStorageLua::Get( const std::string &_entry, bool &_val ) +{ + assert( m_pState != NULL ); + std::string s = "g_Settings." + _entry; + int32 bSuccess = 0; + bool ret = false; + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "g_GetSetting", "sb>ib", s.c_str(), 0, &bSuccess, &ret ) ); + _val = ret; + return( bSuccess !=0 ); +} + +/* + Get( &[integer] ). + +*/ +bool CStorageLua::Get( const std::string &_entry, int32 &_val ) +{ + assert( m_pState != NULL ); + std::string s = "g_Settings." + _entry; + int32 ret = 0, bSuccess = 0; + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "g_GetSetting", "si>ii", s.c_str(), 0, &bSuccess, &ret ) ); + _val = ret; + return( bSuccess !=0 ); +} + + +/* + Get( &[double] ). + +*/ +bool CStorageLua::Get( const std::string &_entry, fp8 &_val ) +{ + assert( m_pState != NULL ); + std::string s = "g_Settings." + _entry; + int32 bSuccess = 0; + char *ret = NULL; + m_pState->Pop( Base::Script::Call( m_pState->GetState(), "g_GetSetting", "ss>is", s.c_str(), "?", &bSuccess, &ret ) ); + if (bSuccess && ret != NULL) + { + std::stringstream tmp( ret ); + tmp >> _val; + } + + return( bSuccess !=0 ); +} + + +/* + Get( &[string] ). + +*/ +bool CStorageLua::Get( const std::string &_entry, std::string &_val ) +{ + assert( m_pState != NULL ); + std::string s = "g_Settings." + _entry; + std::string a = "?"; + + int32 bSuccess = 0; + char *ret = NULL; + int32 stackdelta = Base::Script::Call( m_pState->GetState(), "g_GetSetting", "ss>is", s.c_str(), "?", &bSuccess, &ret ); + + if (bSuccess && ret != NULL) + _val = std::string( ret ); + + // Clean up return string from stack. + m_pState->Pop( stackdelta ); + + return( bSuccess !=0 ); +} + +/* + Remove(). + No use for this yet. +*/ +bool CStorageLua::Remove( const std::string &_url ) +{ + assert( m_pState != NULL ); + + // This is never called, just added this log entry both to track usage, an to get rid of unused var warning... + g_Log->Warning( "CStorageLua::Remove( %s )\n", _url.c_str() ); + + Dirty( true ); + return( true ); +} + +/* + Commit. + +*/ +bool CStorageLua::Commit() +{ + assert( m_pState != NULL ); + + if( Dirty() && !m_bReadOnly) + { + std::string cfgfile = std::string("/") + CLIENT_SETTINGS + ".cfg"; + + g_Log->Info( "CLuaStorage::Commit()\n" ); + + std::stringstream s; // write client version as string + s << "g_Settings." << "settings.app.os_version" << " = [[" << CLIENT_VERSION << "]]"; + m_pState->Execute( s.str().c_str() ); + + time_t curTime; + time( &curTime ); + + std::stringstream temp; + std::string temptime = ctime( &curTime ); + temptime.erase(temptime.size() - 1); + + std::stringstream s2; // write client version as string + s2 << "g_Settings." << "settings.app.date_time" << " = [[" << temptime << "]]"; + m_pState->Execute( s2.str().c_str() ); + + path tmpPath = m_sRoot; + tmpPath /= cfgfile; + std::string tmp = "table.save( g_Settings, [[" + tmpPath.string() + "]] )"; + m_pState->Execute( tmp ); + Dirty( false ); + + g_Log->Info( "CLuaStorage::Commit() done\n" ); + } + + return( true ); +} + +// Simple function to use the logger.. +int CStorageLua::SettingsLogger( lua_State *_pState ) +{ + assert( _pState !=NULL ); + const char *pString = luaL_checkstring( _pState, 1 ); + g_Log->Info( "%s", pString ); + return(0); +} + +/* +*/ +bool CStorageLua::Initialise( const std::string &_sRoot, const std::string &_sWorkingDir, bool _bReadOnly ) +{ + g_Log->Info( "CStorageLua::Initialize( %s, %s )\n", _sRoot.c_str(), _sWorkingDir.c_str() ); + + m_bReadOnly = _bReadOnly; + path tmpPath = _sRoot; + m_sRoot = tmpPath.string(); + +#ifdef WIN32 + // For -some- reason, boost refuses to leave the trailing slash here, but does so in Linux... + size_t len = m_sRoot.size(); + if( m_sRoot[ len - 1 ] != '\\' ) + { + g_Log->Info( "Appending trailing slashes to m_sRoot..." ); + m_sRoot.append( "\\" ); + } +#endif + + + // Make sure directory is created. + if( IStorageInterface::CreateFullDirectory( m_sRoot.c_str() ) == false ) + { + g_Log->Error( "Unable to create structure %s...", m_sRoot.c_str() ); + return false; + } + + m_pState = new Base::Script::CLuaState(); + + tmpPath = _sWorkingDir + "Scripts"; + m_pState->Init( tmpPath.string().c_str() ); + + tmpPath = _sWorkingDir + "Scripts/serialize.lua"; + if (m_pState->Run( tmpPath.string().c_str() ) == false) + return false; + + // Logging... + lua_pushcfunction( m_pState->GetState(), CStorageLua::SettingsLogger ); + lua_setglobal( m_pState->GetState(), "g_Log" ); + + tmpPath = m_sRoot + CLIENT_SETTINGS + ".cfg"; + m_pState->Execute( "require( 'table' ) g_Settings, err = table.load( [[" + tmpPath.string() + "]] ) if g_Settings == nil then g_Log( err ) g_Settings = AutoTable( {} ) end" ); + + // Store root. + m_pState->Execute( "g_Root = [[" + m_sRoot + "]]" ); + + static const char *getSettings = "function g_GetSetting( _url, _default )\ + g_Log( 'g_GetSetting(' .. tostring(_url) .. ', ' .. tostring(_default) .. ')' )\ + local f = assert( loadstring( 'return ' .. _url ) )\ + if not f then\ + error( 'setting request failed to compile...' )\ + return 0, _default\ + end\ + local val = f()\ + if type(val) ~= type(_default) then\ + g_Log( 'returned type does not match, returning ' .. tostring(_default) )\ + return 0, _default\ + end\ + g_Log( 'g_GetSetting returned ' .. tostring(val) )\ + return 1, val\ + end"; + + // So we can use Base::Script::Call() instead of messing around with lua's C api... + m_pState->Execute( getSettings ); + + Dirty( false ); + + return( true ); +} + +/* +*/ +bool CStorageLua::Config( const std::string &_url ) +{ +#ifndef WIN32 + return true; +#else + + // Register IUP. +// lua_cpcall( m_pState->GetState(), iuplua_open, NULL ); +// lua_cpcall( m_pState->GetState(), iupcontrolslua_open, NULL ); + + // Store client version. + m_pState->Execute( std::string( "g_ClientVersion = '" ) + CLIENT_VERSION_PRETTY + "'" ); + m_pState->Execute( std::string( "g_HelpLink = 'http://electricsheep.org/client/" ) + CLIENT_VERSION + "'" ); + + m_pState->Run( _url ); + + // Close IUP again. +// IupControlsClose(); +// IupClose(); + + return true; +#endif +} + +/* + Finalise(). + +*/ +bool CStorageLua::Finalise() +{ + g_Log->Info( "CStorageLua::Finalise()\n" ); + SAFE_DELETE( m_pState ); + return( true ); +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/TupleStorage/luastorage.h electricsheep-3.0.2-git20180325/TupleStorage/luastorage.h --- electricsheep-2.7~b12+svn20091224/TupleStorage/luastorage.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/TupleStorage/luastorage.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,55 @@ +#ifndef _REGSTORAGE_H +#define _REGSTORAGE_H + +#include "storage.h" +#include "LuaState.h" + +namespace TupleStorage +{ + +/* + CStorageLua. + +*/ +class CStorageLua : public IStorageInterface +{ + // The lua state that will do all the work. + Base::Script::CLuaState *m_pState; + bool m_bReadOnly; + + static int SettingsLogger( lua_State *_pState ); + + public: + CStorageLua() {}; + virtual ~CStorageLua() {}; + + // + bool Initialise( const std::string &_sRoot, const std::string &_sWorkingDir, bool _bReadOnly = false ); + bool Finalise(); + + // + bool Set( const std::string &_entry, const bool _val ); + bool Set( const std::string &_entry, const int32 _val ); + bool Set( const std::string &_entry, const fp8 _val ); + bool Set( const std::string &_entry, const std::string &_str ); + + // + bool Get( const std::string &_entry, bool &_ret ); + bool Get( const std::string &_entry, int32 &_ret ); + bool Get( const std::string &_entry, fp8 &_ret ); + bool Get( const std::string &_entry, std::string &_ret ); + + // + bool Remove( const std::string &_entry ); + + // + bool Commit(); + + bool Config( const std::string &_url ); +}; + +MakeSmartPointers( CStorageLua ); + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/TupleStorage/Settings.h electricsheep-3.0.2-git20180325/TupleStorage/Settings.h --- electricsheep-2.7~b12+svn20091224/TupleStorage/Settings.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/TupleStorage/Settings.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,165 @@ +#ifndef _SETTINGS_H_ +#define _SETTINGS_H_ + +#include <boost/thread.hpp> +#include "base.h" +#include "SmartPtr.h" +#include "Singleton.h" +#include "storage.h" +#include "luastorage.h" +#include "Log.h" + +/** + CSettings. + Singleton class to handle application settings. +*/ +MakeSmartPointers( CSettings ); +class CSettings : public Base::CSingleton<CSettings> +{ + friend class Base::CSingleton<CSettings>; + + boost::mutex m_Lock; + + // Private constructor accessible only to CSingleton. + CSettings() + { + m_pStorage = NULL; + } + + // Private destructor accessible only to CSingleton. + virtual ~CSettings() + { + // Mark singleton as properly shutdown, to track unwanted access after this point. + SingletonActive( false ); + } + + // No copy constructor or assignment operator. + NO_CLASS_STANDARDS( CSettings ); + + // Threadsafe tuple storage object. + TupleStorage::IStorageInterface *m_pStorage; + + public: + const char *Description() { return( "Settings" ); }; + + bool Shutdown( void ) + { + g_Log->Info( "Shutdown()..." ); + + if( m_pStorage ) + { + m_pStorage->Commit(); + m_pStorage->Finalise(); + SAFE_DELETE( m_pStorage ); + } + + return true; + } + + // Root url. + std::string Root() + { + if( !m_pStorage ) + return "?"; + + return m_pStorage->Root(); + }; + + // Init. + bool Init( const std::string &_sRoot, const std::string &_workingDir, bool _bReadOnly = false ) + { + m_pStorage = new TupleStorage::CStorageLua(); + return m_pStorage->Initialise( _sRoot, _workingDir, _bReadOnly ); + } + + // Set 32bit integer, double precision floationg point, and string. + void Set( const std::string &_url, const bool _value ) { if( !m_pStorage ) return; boost::mutex::scoped_lock locker( m_Lock ); m_pStorage->Set( _url, _value ); } + void Set( const std::string &_url, const int32 _value ) { if( !m_pStorage ) return; boost::mutex::scoped_lock locker( m_Lock ); m_pStorage->Set( _url, _value ); } + void Set( const std::string &_url, const fp8 _value ) { if( !m_pStorage ) return; boost::mutex::scoped_lock locker( m_Lock ); m_pStorage->Set( _url, _value ); } + void Set( const std::string &_url, const std::string &_value ) { if( !m_pStorage ) return; boost::mutex::scoped_lock locker( m_Lock ); m_pStorage->Set( _url, _value ); } + + // Return boolean. + bool Get( const std::string &_url, const bool _default = false ) + { + boost::mutex::scoped_lock locker( m_Lock ); + + bool ret = _default; + if( m_pStorage && !m_pStorage->Get( _url, ret ) ) + { + m_pStorage->Set( _url, _default ); + m_pStorage->Commit(); + return _default; + } + return ret; + } + + // Return 32bit integer. + int32 Get( const std::string &_url, const int32 _default = 0 ) + { + boost::mutex::scoped_lock locker( m_Lock ); + + int32 ret = _default; + if( m_pStorage && !m_pStorage->Get( _url, ret ) ) + { + m_pStorage->Set( _url, _default ); + m_pStorage->Commit(); + return _default; + } + return ret; + } + + // Return double precision floating point. + fp8 Get( const std::string &_url, const fp8 _default = 0.0 ) + { + boost::mutex::scoped_lock locker( m_Lock ); + + fp8 ret = _default; + if( m_pStorage && !m_pStorage->Get( _url, ret ) ) + { + m_pStorage->Set( _url, _default ); + m_pStorage->Commit(); + return _default; + } + return ret; + } + + // Return string. + std::string Get( const std::string &_url, const std::string _default ) + { + boost::mutex::scoped_lock locker( m_Lock ); + + std::string ret = _default; + if( m_pStorage && !m_pStorage->Get( _url, ret ) ) + { + m_pStorage->Set( _url, _default ); + m_pStorage->Commit(); + return _default; + } + return ret; + } + + // Direct access to storage. + TupleStorage::IStorageInterface *Storage() { return m_pStorage; } + + + // Singleton instance method. + static CSettings *Instance() + { + static CSettings storage; + + if( storage.SingletonActive() == false ) + { + printf( "Trying to access shutdown singleton %s", storage.Description() ); + } + + return( &storage ); + } +}; + +/* + Helper for less typing... + +*/ +inline tpCSettings g_Settings( void ) { return( CSettings::Instance() ); } + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/TupleStorage/storage.cpp electricsheep-3.0.2-git20180325/TupleStorage/storage.cpp --- electricsheep-2.7~b12+svn20091224/TupleStorage/storage.cpp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/TupleStorage/storage.cpp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,222 @@ +#ifdef WIN32 + #include <windows.h> +#else + #include <sys/stat.h> + #include <errno.h> + #include <stddef.h> + #include <stdio.h> + #include <sys/types.h> + #include <dirent.h> +#endif + +#include <vector> +#include <string> + +#include "Log.h" +#include "storage.h" +#include "diriterator.h" + +using namespace std; + +namespace TupleStorage +{ + +/* + CreateDir(). + +*/ +bool IStorageInterface::CreateDir( const std::string &_sPath ) +{ +#ifdef WIN32 + if( CreateDirectoryA( _sPath.c_str(), NULL ) != 0 ) + { + const DWORD result=GetLastError(); + if( result == ERROR_ALREADY_EXISTS ) + return( true ); // This error is ok. + else + return( false ); + } +#else + if( mkdir( _sPath.c_str(), (S_IRWXU | S_IRWXG | S_IRWXO ) ) != 0 ) + { + if( errno == EEXIST ) + return( true ); // This error is ok. + } +#endif + + return( true ); +} + + +/* + RemoveDir(). + +*/ +bool IStorageInterface::RemoveDir( const std::string &_sPath ) +{ +#ifdef WIN32 + BOOL result = RemoveDirectoryA( _sPath.c_str() ); + if( !result ) + { + g_Log->Error( "%d...", GetLastError() ); + return( false ); + } + +#else + if( rmdir( _sPath.c_str() ) != 0 ) + { + g_Log->Error( "%d...", errno ); + return( false ); + } +#endif + + return( true ); +} + +/* + CreateFullDirectory(). + +*/ +bool IStorageInterface::CreateFullDirectory( const std::string &_sPath ) +{ + // Will be false once we're out of the "../../"'s, then we will actually create. + bool dotdot = true; + + for( unsigned int C=0; C<_sPath.size(); C++ ) + { + if( _sPath[C] == '/' || _sPath[C] == '\\' ) + { + if( dotdot == false ) + { + std::string subPath = _sPath.substr( 0, C ); + if( !CreateDir( subPath ) ) + { + return( false ); + } + // Path created. + } + } + else + { + if( _sPath[C] != '.' ) + dotdot = false; + } + } + + return true; +} + +/* + DirectoryEmpty(). + +*/ +bool IStorageInterface::DirectoryEmpty( const std::string &_sPath ) +{ + CDirectoryIterator iterator( _sPath ); + + std::string tmp; + + for( ;; ) + { + if( !iterator.Next( tmp ) ) + return( false ); + + if( tmp != "." && tmp != ".." ) + { + if( iterator.isDirectory( tmp ) ) + return( true ); + } + } + + return( false ); +} + + +/* + RemoveFullDirectory(). + +*/ +bool IStorageInterface::RemoveFullDirectory( const std::string &_sPath, const bool _bSubdirectories ) +{ + std::string path = _sPath; + + size_t len = path.size(); + if( path[ len - 1 ] != '/' ) + path.append( "/" ); + + CDirectoryIterator *pIterator = new CDirectoryIterator( path ); + + std::vector<std::string> dirlist; + std::vector<std::string> filelist; + + std::string tmp; + + for( ;; ) + { + if( !pIterator->Next( tmp ) ) + break; + + if( tmp != "." && tmp != ".." ) + { + std::string fullPath = path + tmp; + + if( pIterator->isDirectory( tmp ) && _bSubdirectories == true ) + dirlist.push_back( fullPath ); + else + filelist.push_back( fullPath.c_str() ); + } + } + + delete pIterator; + + std::vector<std::string>::iterator i; + for( i=filelist.begin(); i != filelist.end(); i++ ) + remove( i->c_str() ); + + filelist.clear(); + + for( i=dirlist.begin(); i != dirlist.end(); i++ ) + RemoveFullDirectory( i->c_str(), _bSubdirectories ); + + dirlist.clear(); + + // Remove ourselves. + RemoveDir( path ); + + return( true ); +} + + +/* + IoHierarchyHelper(). + +*/ +bool IStorageInterface::IoHierarchyHelper( const std::string &_uniformPath, std::string &_retPath, std::string &_retName ) +{ + std::string path = _uniformPath; + + // Convert '.' to '/' + for( size_t c=0; c<path.size(); c++ ) + { + if( path[c] == '.' ) + path[c] = '/'; + } + + // Make sure there is a triling "/" + size_t len = path.size(); + if( path[ len - 1 ] != '/' ) + path.append( "/" ); + + // Find actual nodename. + std::string temp = path.substr( 0, path.size()-1 ); + size_t offs = temp.find_last_of( "/\\", temp.size() ); + + // Todo: handle any errors here... + + _retPath = path; + _retName = temp.substr( offs+1, temp.size() ); + + return( true ); +} + +}; diff -Nru electricsheep-2.7~b12+svn20091224/TupleStorage/storage.h electricsheep-3.0.2-git20180325/TupleStorage/storage.h --- electricsheep-2.7~b12+svn20091224/TupleStorage/storage.h 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/TupleStorage/storage.h 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,70 @@ +#ifndef _STORAGE_H +#define _STORAGE_H + +#include "base.h" +#include "SmartPtr.h" +#include <string> + +namespace TupleStorage +{ + +/* + IStorageInterface. + +*/ +class IStorageInterface +{ + private: + bool m_bDirty; + + protected: + std::string m_sRoot; + + void Dirty( bool _state ) { m_bDirty = _state; }; + bool Dirty() { return m_bDirty; }; + + public: + IStorageInterface() : m_bDirty( false ), m_sRoot( "./.Reg" ) {}; + virtual ~IStorageInterface() {}; + + std::string Root() { return( m_sRoot ); }; + + // + virtual bool Initialise( const std::string &_sRoot, const std::string &_sWorkingDir, bool _bReadOnly = false) = PureVirtual; + virtual bool Finalise() = PureVirtual; + + // Set values. + virtual bool Set( const std::string &_entry, const bool _val ) = PureVirtual; + virtual bool Set( const std::string &_entry, const int32 _val ) = PureVirtual; + virtual bool Set( const std::string &_entry, const fp8 _val ) = PureVirtual; + virtual bool Set( const std::string &_entry, const std::string &_str ) = PureVirtual; + + // Get values. + virtual bool Get( const std::string &_entry, bool &_ret ) = PureVirtual; + virtual bool Get( const std::string &_entry, int32 &_ret ) = PureVirtual; + virtual bool Get( const std::string &_entry, fp8 &_ret ) = PureVirtual; + virtual bool Get( const std::string &_entry, std::string &_ret ) = PureVirtual; + + // Remove node from storage. + virtual bool Remove( const std::string &_entry ) = PureVirtual; + + // Persist changes. + virtual bool Commit() = PureVirtual; + + // Helpers. + static bool IoHierarchyHelper( const std::string &_uniformPath, std::string &_retPath, std::string &_retName ); + static bool CreateDir( const std::string &_sPath ); + static bool RemoveDir( const std::string &_sPath ); + static bool CreateFullDirectory( const std::string &_sPath ); + static bool RemoveFullDirectory( const std::string &_sPath, const bool _bSubdirectories = false ); + static bool DirectoryEmpty( const std::string &_sPath ); + + // Config. + virtual bool Config( const std::string &_url ) = PureVirtual; +}; + +MakeSmartPointers( IStorageInterface ); + +}; + +#endif diff -Nru electricsheep-2.7~b12+svn20091224/TupleStorage/TupleStorage.cbp electricsheep-3.0.2-git20180325/TupleStorage/TupleStorage.cbp --- electricsheep-2.7~b12+svn20091224/TupleStorage/TupleStorage.cbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/TupleStorage/TupleStorage.cbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<CodeBlocks_project_file> + <FileVersion major="1" minor="6" /> + <Project> + <Option title="TupleStorage" /> + <Option pch_mode="2" /> + <Option compiler="gcc" /> + <Build> + <Target title="Debug"> + <Option output="libTupleStorage" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="obj\Debug\" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-g" /> + <Add option="-DDEBUG" /> + <Add directory="\usr\include\lua5.1\" /> + <Add directory="..\iup\iup2_6_Linux26_lib\include" /> + </Compiler> + </Target> + <Target title="Release"> + <Option output="libTupleStorage" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="obj\Release\" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-O2" /> + <Add directory="\usr\include\lua5.1\" /> + <Add directory="..\iup\iup2_6_Linux26_lib\include" /> + </Compiler> + <Linker> + <Add option="-s" /> + </Linker> + </Target> + <Target title="Debug Win32"> + <Option output="libTupleStorage" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="obj\Debug\" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-g" /> + <Add option="-DDEBUG" /> + <Add option="-DWIN32" /> + <Add directory="..\iup\iup2_6_Win32_mingw4_lib\include" /> + <Add directory="..\lua5.1\include" /> + </Compiler> + </Target> + <Target title="Release Win32"> + <Option output="libTupleStorage" prefix_auto="1" extension_auto="1" /> + <Option working_dir="" /> + <Option object_output="obj\Release\" /> + <Option type="2" /> + <Option compiler="gcc" /> + <Option createDefFile="1" /> + <Compiler> + <Add option="-O3" /> + <Add option="-Wall" /> + <Add option="-g" /> + <Add option="-DWIN32" /> + <Add directory="..\iup\iup2_6_Win32_mingw4_lib\include" /> + <Add directory="..\lua5.1\include" /> + </Compiler> + </Target> + </Build> + <Compiler> + <Add option="-W" /> + <Add option="-DTIXML_USE_STL" /> + <Add directory="..\Common" /> + </Compiler> + <Unit filename="Settings.h" /> + <Unit filename="diriterator.cpp" /> + <Unit filename="diriterator.h" /> + <Unit filename="luastorage.cpp" /> + <Unit filename="luastorage.h" /> + <Unit filename="storage.cpp" /> + <Unit filename="storage.h" /> + <Extensions> + <code_completion /> + <envvars /> + <debugger /> + </Extensions> + </Project> +</CodeBlocks_project_file> diff -Nru electricsheep-2.7~b12+svn20091224/utils.c electricsheep-3.0.2-git20180325/utils.c --- electricsheep-2.7~b12+svn20091224/utils.c 2009-12-24 23:03:01.000000000 +0000 +++ electricsheep-3.0.2-git20180325/utils.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,488 +0,0 @@ -/* - electricsheep - a collaborative screensaver - Copyright (C) 1999-2009 Spotworks LLC - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -*/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <signal.h> -#include <limits.h> -#include <errno.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/time.h> -#include <time.h> -#include <sys/wait.h> -#include <stdint.h> -#include <expat.h> - -#include "electricsheep.h" -#include "config.h" - -#include "md5.h" - -extern int debug; - -int in_message = 0; -int server_error = 0; -char server_error_type[MAXBUF]; - -char *dream_server = "v2d7c.sheepserver.net"; -// char *dream_server = "test.sheepserver.net"; -char *redirection_server = "community.sheepserver.net"; -char *server; -FILE *logout = NULL; -char curl_cmd[MAXBUF]; -char nick_buf[bufmax]; -char url_buf[bufmax]; - -char *client_version = "LNX_" VERSION; -char *hide_stderr = "2> /dev/null"; - -void encode(char *dst, char *src) { - static char *hex = "0123456789ABCDEF"; - char t; - while ((t = *src++)) { - if (isalnum(t)) { - *dst++ = t; - } else { - *dst++ = '%'; - *dst++ = hex[(t >> 4) & 15]; - *dst++ = hex[t & 15]; - } - } -} - - -char *encry(char *pw, char *nick) { - static char *salt = "sh33p"; - unsigned char digest[16]; - char md5_pw[33]; - char *pw_salted = malloc(strlen(pw) + strlen(salt) + strlen(nick) + 1); - int i, j; - sprintf(pw_salted, "%s%s%s", pw, salt, nick); - md5_buffer(pw_salted, strlen(pw_salted), digest); - for (i = 0, j = 0; i < sizeof(digest); i++) { - char *hex_digits = "0123456789ABCDEF"; - md5_pw[j++] = hex_digits[digest[i] >> 4]; - md5_pw[j++] = hex_digits[digest[i] & 0x0F]; - } - md5_pw[j] = 0; - free(pw); - free(pw_salted); - return strdup(md5_pw); -} - -void rc_start_element(void *userData, const char *name, const char **atts) { - prefs_t *prefs = (prefs_t *) userData; - int i = 0; - if (!strcmp("preferences", name) || !strcmp("electricsheep_preferences", name)) { - while (atts[i]) { - if (!strcmp("nick", atts[i])) { - free(prefs->nick); - prefs->nick = strdup(atts[i+1]); - } else if (!strcmp("url", atts[i])) { - free(prefs->url); - prefs->url = strdup(atts[i+1]); - } else if (!strcmp("password", atts[i])) { - free(prefs->password); - /* assume nick comes before pw in the xml XXX */ - prefs->password = encry(strdup(atts[i+1]), prefs->nick); - } else if (!strcmp("password_md5", atts[i])) { - free(prefs->password); - prefs->password = strdup(atts[i+1]); - } else if (!strcmp("video_driver", atts[i])) { - free(prefs->video_driver); - prefs->video_driver = strdup(atts[i+1]); - } else if (!strcmp("uid", atts[i])) { - free(prefs->uid); - prefs->uid = strdup(atts[i+1]); - } else if (!strcmp("cache", atts[i])) { - prefs->cache_size = atoi(atts[i+1]); - } else if (!strcmp("zoom", atts[i])) { - prefs->zoom = atoi(atts[i+1]); - } else if (!strcmp("no_animation", atts[i])) { - prefs->no_animation = atoi(atts[i+1]); - } else if (!strcmp("standalone", atts[i])) { - prefs->standalone = atoi(atts[i+1]); - } else if (!strcmp("proxy", atts[i])) { - prefs->proxy_name = strdup(atts[i+1]); - } else if (!strcmp("proxy_user", atts[i])) { - prefs->proxy_user = strdup(atts[i+1]); - } else if (!strcmp("hide_errors", atts[i])) { - prefs->hide_errors = atoi(atts[i+1]); - } else if (!strcmp("save_frames", atts[i])) { - prefs->save_frames = atoi(atts[i+1]); - } else if (!strcmp("nrepeats", atts[i])) { - prefs->nrepeats = atoi(atts[i+1]); - } else if (!strcmp("frame_rate", atts[i])) { - prefs->frame_rate = atof(atts[i+1]); - } else if (!strcmp("play_evenly", atts[i])) { - prefs->play_evenly = atof(atts[i+1]); - } else if (!strcmp("version", atts[i])) { - // nothing to check - } else { - fprintf(logout, "ignoring attribute %s\n", atts[i]); - } - i += 2; - } - } -} - -void set_rc_file(char *rc_file, int argc, char **argv) { - char *hom; - if (argc > 1 && !strcmp(argv[1], "--preferences")) { - if (argc > 2) - strcpy(rc_file, argv[2]); - else { - fprintf(logout, - "%s: --preferences option requires a file name argument.\n", - argv[0]); - exit(1); - } - return; - } - hom = getenv("HOME"); - if (!hom) { - fprintf(logout, "%s: HOME envar not defined\n", argv[0]); - exit(1); - } - snprintf(rc_file, PATH_MAX, "%s/.electricsheep/preferences.xml", hom); -} - -void write_rc(prefs_t *prefs, char *fn) { - /* make sure if the file is created that - it has mode 600 */ - FILE *fp; - mode_t old_mask = umask(0); - umask(0077); - fp = fopen(fn, "w"); - umask(old_mask); - if (NULL == fp) { - perror(fn); - exit(1); - } - fprintf(fp, "<electricsheep_preferences\n"); - fprintf(fp, " version=\"%s\"\n", client_version); - fprintf(fp, " nick=\"%s\"\n", prefs->nick); - fprintf(fp, " url=\"%s\"\n", prefs->url); - fprintf(fp, " password_md5=\"%s\"\n", prefs->password); - fprintf(fp, " cache=\"%d\"\n", prefs->cache_size); - fprintf(fp, " nrepeats=\"%d\"\n", prefs->nrepeats); - fprintf(fp, " frame_rate=\"%g\"\n", prefs->frame_rate); - fprintf(fp, " play_evenly=\"%g\"\n", prefs->play_evenly); - fprintf(fp, " uid=\"%s\"\n", prefs->uid); - fprintf(fp, " zoom=\"%d\"\n", prefs->zoom); - fprintf(fp, " video_driver=\"%s\"\n", prefs->video_driver); - fprintf(fp, " no_animation=\"%d\"\n", prefs->no_animation); - fprintf(fp, " standalone=\"%d\"\n", prefs->standalone); - fprintf(fp, " hide_errors=\"%d\"\n", prefs->hide_errors); - fprintf(fp, " save_frames=\"%d\"\n", prefs->save_frames); - if (prefs->proxy_name) - fprintf(fp, " proxy=\"%s\"\n", prefs->proxy_name); - if (prefs->proxy_user) - fprintf(fp, " proxy_user=\"%s\"\n", prefs->proxy_user); - fprintf(fp, "/>\n"); - fclose(fp); -} - -/* 64 random bits encoded as ascii */ -void make_uniqueid(prefs_t *prefs) { - static char *rdevice = "/dev/urandom"; - uint32_t d[2]; - int rfd; - struct timeval tv; - char ub[17]; - - if (debug) printf("setting unique id.\n"); - rfd = open(rdevice, 0); - if (-1 == rfd) { - perror(rdevice); - exit(1); - } - if (8 != read(rfd, (void *) d, 8)) { - perror(rdevice); - exit(1); - } - if (-1 == gettimeofday(&tv, NULL)) { - perror("gettimeofday"); - exit(1); - } - d[0] ^= tv.tv_sec; - d[1] ^= tv.tv_usec; - snprintf(ub, 17, "%08lX%08lX", - (long unsigned int) d[0], - (long unsigned int) d[1]); - free(prefs->uid); - prefs->uid = strdup(ub); -} - -void default_rc(prefs_t *prefs) { - free(prefs->nick); - prefs->nick = strdup(""); - free(prefs->url); - prefs->url = strdup(""); - free(prefs->password); - prefs->password = strdup(""); - prefs->cache_size = 2000; - free(prefs->video_driver); - prefs->video_driver = strdup(""); - make_uniqueid(prefs); - prefs->frame_rate = 23.0; - prefs->nrepeats = 2; - prefs->play_evenly = 1.0; - prefs->zoom = 1; - prefs->no_animation = 0; - prefs->standalone = 0; - prefs->hide_errors = 0; - prefs->proxy_name = 0; - prefs->proxy_user = 0; - prefs->save_frames = 0; -} - -/* from the system(3) manpage */ -int interruptable_system(char *command) { - int pid, status; - - if (command == 0) - return 1; - pid = fork(); - if (pid == -1) - return -1; - if (pid == 0) { - char *argv[4]; - argv[0] = "sh"; - argv[1] = "-c"; - argv[2] = command; - argv[3] = 0; - execv("/bin/sh", argv); - exit(127); - } - do { - if (waitpid(pid, &status, 0) == -1) { - if (EINTR == errno) - cleanup_and_exit(0); - } else - return status; - } while(1); - // notreached -} - -int mysystem(char *cmd, char *msg) { - int n; - if (0) fprintf(logout, "subprocess; (%s)\n", cmd); - if (0 != (n = interruptable_system(cmd))) { - if (SIGINT != n) { - if (!prefs.hide_errors) - fprintf(logout, "subprocess error: %s, %d=%d<<8+%d\n", - msg, n, n>>8, n&255); - return 1; - } - fprintf(logout, "control-c during %s, exiting\n", msg); - cleanup_and_exit(1); - } - return 0; -} - -#define XML_BUFF_SIZE 4000 - -void read_rc(prefs_t *prefs, char *fn) { - FILE *fp; - XML_Parser parser; - parser = XML_ParserCreate(NULL); - XML_SetUserData(parser, prefs); - XML_SetElementHandler(parser, rc_start_element, NULL); - - fp = fopen(fn, "r"); - - if (NULL == fp) { - char *last_slash; - default_rc(prefs); - last_slash = strrchr(fn, '/'); - if (last_slash) { - char b[PATH_MAX + 100]; - strcpy(b, "mkdir -p "); - strncat(b, fn, last_slash - fn); - mysystem(b, "mkdir for preferences"); - } - - write_rc(prefs, fn); - return; - } - - while (1) { - int bytes_read; - void *buff = XML_GetBuffer(parser, XML_BUFF_SIZE); - if (buff == NULL) { - fprintf(logout, "unable to allocate buffer.\n"); - exit(1); - } - - bytes_read = fread(buff, 1, XML_BUFF_SIZE, fp); - if (bytes_read == 0) - break; - - if (! XML_ParseBuffer(parser, bytes_read, bytes_read == 0)) { - fprintf(logout, "parse error.\n"); - exit(1); - } - } - - XML_ParserFree(parser); -} - -void get_end_element(void *userData, const char *name) { - if (!strcmp("message", name)) { - in_message = 0; - } -} - -void character_handler(void *userData, const XML_Char *s, int len) { - if (in_message) { - if (len != fwrite(s, sizeof(XML_Char), len, logout)) { - perror("writing xml message"); - } - } -} - -void query_start_element(void *userData, const char *name, const char **atts) { - int i = 0; - if (!strcmp("redir", name)) { - while (atts[i]) { - if (!strcmp(atts[i], "host")) { - char *end; - const char *h = atts[i+1]; - if (!strncmp("http://", h, 7)) { - dream_server = strdup(h+7); - } else { - dream_server = strdup(h); - } - if (end = strrchr(dream_server, '/')) { - *end = 0; - } - if (debug) fprintf(logout, "set server to %s\n", dream_server); - } - i += 2; - } - } else if (!strcmp("message", name)) { - in_message = 1; - } else if (!strcmp("error", name)) { - server_error = 1; - while (atts[i]) { - if (!strcmp(atts[i], "type")) { - strncpy(server_error_type, atts[i+1], MAXBUF); - } - i += 2; - } - } -} - -char *query_redirection() { - char pbuf[MAXBUF]; - FILE *lf; - int done; - XML_Parser parser; - - parser = XML_ParserCreate(NULL); - XML_SetElementHandler(parser, query_start_element, get_end_element); - XML_SetCharacterDataHandler(parser, character_handler); - in_message = 0; - server_error = 0; - - /* XXX curl_cmd should not have use any auth */ - snprintf(pbuf, MAXBUF, "%s 'http://%s/query.php?q=redir&u=%s&p=%s&v=%s&i=%s'", - curl_cmd, redirection_server, nick_buf, prefs.password, client_version, prefs.uid); - - if (debug) fprintf(logout, "query %s\n", pbuf); - - lf = popen(pbuf, "r"); - - if (NULL == lf) { - perror("could not fork/pipe\n"); - cleanup_and_exit(1); - } - - do { - size_t len = fread(pbuf, 1, MAXBUF, lf); - done = len < MAXBUF; - if (0 == len) { - // lost contact, no data to parse - break; - } - if (!XML_Parse(parser, pbuf, len, done)) { - fprintf(logout, "%s at line %u\n", - XML_ErrorString(XML_GetErrorCode(parser)), - (unsigned)XML_GetCurrentLineNumber(parser)); - break; - } - if (debug > 1) fprintf(logout, "query read loop len=%d\n", len); - } while (!done); - XML_ParserFree(parser); - - pclose(lf); - - if (server_error) { - fprintf(logout, - "server reported error for query: %s\n", - server_error_type); - } -} - -void init_curl_cmd(int registration) { - - if (debug) fprintf(logout, "init_curl_cmd %d\n", registration); - - if (prefs.proxy_name) { - snprintf(curl_cmd, MAXBUF, "nice -n %d curl --location --proxy %s", - nice_level, prefs.proxy_name); - if (prefs.proxy_user) { - strcat(curl_cmd, " --proxy-user "); - strcat(curl_cmd, prefs.proxy_user); - } - } else - snprintf(curl_cmd, MAXBUF, "nice -n %d curl --location", nice_level); - strcat(curl_cmd, " --silent"); - if (!prefs.hide_errors) { - strcat(curl_cmd, " --show-error"); - } - if (registration && prefs.password && prefs.password[0]) { - query_redirection(); - strcat(curl_cmd, " --basic --user \'"); - strcat(curl_cmd, prefs.nick); - strcat(curl_cmd, ":"); - strcat(curl_cmd, prefs.password); - strcat(curl_cmd, "\'"); - if (debug) - fprintf(logout, "using authentication, pw=%s nick=%s\n", - prefs.password, prefs.nick); - if (strlen(prefs.password)*3 > bufmax-3) { - fprintf(logout, "password too long."); - cleanup_and_exit(1); - } - } - server = dream_server; - if (debug) fprintf(logout, "curl_cmd = %s\nserver = %s\n", curl_cmd, server); -} - -void init_list_cmd (char *buf) { - snprintf(buf, MAXBUF, "%s 'http://%s/cgi/list?v=%s&u=%s'" - "| gunzip -c %s", curl_cmd, server, - client_version, prefs.uid, hide_stderr); -} diff -Nru electricsheep-2.7~b12+svn20091224/wxConfig/config.fbp electricsheep-3.0.2-git20180325/wxConfig/config.fbp --- electricsheep-2.7~b12+svn20091224/wxConfig/config.fbp 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/wxConfig/config.fbp 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,2267 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<wxFormBuilder_Project> + <FileVersion major="1" minor="9" /> + <object class="Project" expanded="1"> + <property name="class_decoration"></property> + <property name="code_generation">XRC</property> + <property name="disconnect_events">1</property> + <property name="encoding">UTF-8</property> + <property name="event_generation">connect</property> + <property name="file"></property> + <property name="first_id">1000</property> + <property name="help_provider">none</property> + <property name="internationalize">0</property> + <property name="name">MyProject1</property> + <property name="namespace"></property> + <property name="path">.</property> + <property name="precompiled_header"></property> + <property name="relative_path">1</property> + <property name="use_enum">0</property> + <property name="use_microsoft_bom">0</property> + <object class="Dialog" expanded="1"> + <property name="bg"></property> + <property name="center"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="extra_style"></property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="maximum_size">400,-1</property> + <property name="minimum_size">400,-1</property> + <property name="name">MyDialog2</property> + <property name="pos"></property> + <property name="size">400,-1</property> + <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER</property> + <property name="subclass"></property> + <property name="title">Configuration</property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnActivate"></event> + <event name="OnActivateApp"></event> + <event name="OnChar"></event> + <event name="OnClose"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnHibernate"></event> + <event name="OnIconize"></event> + <event name="OnIdle"></event> + <event name="OnInitDialog"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size">-1,-1</property> + <property name="name">baseBox</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxEXPAND</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size">-1,64</property> + <property name="name">logoBox</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticBitmap" expanded="1"> + <property name="bg"></property> + <property name="bitmap">logo.png; Load From File</property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_bitmap12</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font">Nice,93,92,20,70,0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Electric Sheep</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText4</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font">,93,90,-1,70,0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">version</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticVersion</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size">-1,24</property> + <property name="name">helpBox</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">1</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxButton" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="default">0</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font">,90,90,-1,70,0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Run</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_RunButton</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size">-1,-1</property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip">Start the client in standalone mode</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnButtonClick"></event> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">1</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxButton" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="default">0</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Help</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_HelpButton</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size">-1,-1</property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip">Launch the online help</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnButtonClick"></event> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_TOP|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size">-1,-1</property> + <property name="name">tabBox</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">1</property> + <object class="wxNotebook" expanded="1"> + <property name="bg"></property> + <property name="bitmapsize"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_notebook2</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnNotebookPageChanged"></event> + <event name="OnNotebookPageChanging"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + <object class="notebookpage" expanded="1"> + <property name="bitmap"></property> + <property name="label">Basic</property> + <property name="select">1</property> + <object class="wxPanel" expanded="0"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_Basic</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="subclass"></property> + <property name="tooltip">Basic client settings</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style">wxTAB_TRAVERSAL</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer9</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxEXPAND</property> + <property name="proportion">0</property> + <object class="wxStaticBoxSizer" expanded="1"> + <property name="id">wxID_ANY</property> + <property name="label">Drupal authentication</property> + <property name="minimum_size"></property> + <property name="name">sbSizer1</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <event name="OnUpdateUI"></event> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer7</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Name:</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText3</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL|wxFIXED_MINSIZE</property> + <property name="proportion">0</property> + <object class="wxTextCtrl" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="maximum_size">256,-1</property> + <property name="maxlength">256</property> + <property name="minimum_size">256,-1</property> + <property name="name">m_textName</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size">256,-1</property> + <property name="style">wxTE_CENTRE</property> + <property name="subclass"></property> + <property name="tooltip">Your Drupal login name</property> + <property name="value"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnText"></event> + <event name="OnTextEnter"></event> + <event name="OnTextMaxLen"></event> + <event name="OnTextURL"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer91</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Password:</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText41</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL|wxFIXED_MINSIZE</property> + <property name="proportion">0</property> + <object class="wxTextCtrl" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="maximum_size">256,-1</property> + <property name="maxlength">256</property> + <property name="minimum_size">256,-1</property> + <property name="name">m_textPassword</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size">256,-1</property> + <property name="style">wxTE_CENTRE|wxTE_PASSWORD</property> + <property name="subclass"></property> + <property name="tooltip">Your Drupal login password</property> + <property name="value"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnText"></event> + <event name="OnTextEnter"></event> + <event name="OnTextMaxLen"></event> + <event name="OnTextURL"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_LEFT|wxSHAPED</property> + <property name="proportion">1</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer8</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER|wxALL</property> + <property name="proportion">0</property> + <object class="wxButton" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="default">0</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Login</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_DrupalTestButton</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip">Test the connection to verify that authentication worked</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnButtonClick"></event> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER|wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font">,93,90,-1,70,0</property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">...authentication unverified...</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText6</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxALIGN_CENTRE</property> + <property name="subclass"></property> + <property name="tooltip">Authentication status</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxEXPAND</property> + <property name="proportion">0</property> + <object class="wxStaticBoxSizer" expanded="1"> + <property name="id">wxID_ANY</property> + <property name="label">Misc</property> + <property name="minimum_size"></property> + <property name="name">sbSizer5</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <event name="OnUpdateUI"></event> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer10</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Max diskspace used by flock:</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText7</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">3</property> + <property name="flag">wxALL|wxSHAPED</property> + <property name="proportion">0</property> + <object class="wxSpinCtrl" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="initial">2000</property> + <property name="max">10000</property> + <property name="maximum_size"></property> + <property name="min">10</property> + <property name="minimum_size"></property> + <property name="name">m_spinCache</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxSP_ARROW_KEYS</property> + <property name="subclass"></property> + <property name="tooltip">Maximum amount of storage allowed by the sheep on your harddrive</property> + <property name="value"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnSpinCtrl"></event> + <event name="OnSpinCtrlText"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">MB </property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText10</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer11</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Video decoding rate:</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText8</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">3</property> + <property name="flag">wxALL|wxSHAPED</property> + <property name="proportion">0</property> + <object class="wxSpinCtrl" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="initial">23</property> + <property name="max">23</property> + <property name="maximum_size"></property> + <property name="min">5</property> + <property name="minimum_size"></property> + <property name="name">m_spinDecodeFps</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxSP_ARROW_KEYS</property> + <property name="subclass"></property> + <property name="tooltip">The rate at which sheep are decoded</property> + <property name="value"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnSpinCtrl"></event> + <event name="OnSpinCtrlText"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">fps </property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText11</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer13</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Repeat loops</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText9</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">3</property> + <property name="flag">wxALL|wxSHAPED</property> + <property name="proportion">0</property> + <object class="wxSpinCtrl" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="initial">2</property> + <property name="max">100</property> + <property name="maximum_size"></property> + <property name="min">0</property> + <property name="minimum_size"></property> + <property name="name">m_spinRepeatLoops</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxSP_ARROW_KEYS</property> + <property name="subclass"></property> + <property name="tooltip">The number of times a loop will repeat itself before continuing</property> + <property name="value"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnSpinCtrl"></event> + <event name="OnSpinCtrlText"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">times</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText12</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + <object class="notebookpage" expanded="1"> + <property name="bitmap"></property> + <property name="label">Advanced</property> + <property name="select">0</property> + <object class="wxPanel" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_Advanced</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="subclass"></property> + <property name="tooltip">Advanced client settings</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style">wxTAB_TRAVERSAL</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer25</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL|wxEXPAND</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer131</property> + <property name="orient">wxVERTICAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer221</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property> + <property name="proportion">0</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Display Monitor</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText13</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxSpinCtrl" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="initial">0</property> + <property name="max">3</property> + <property name="maximum_size"></property> + <property name="min">0</property> + <property name="minimum_size"></property> + <property name="name">m_spinMonitor</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxSP_ARROW_KEYS</property> + <property name="subclass"></property> + <property name="tooltip">All monitors will be black except this one. 0 is the primary monitor, and the rest are subject to your current display configuration. If you have one additional display, such as a secondary monitor or a projector, that will be 1. If you only have one monitor enabled, this setting is redundant.</property> + <property name="value"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnSpinCtrl"></event> + <event name="OnSpinCtrlText"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">3</property> + <property name="flag">wxALIGN_RIGHT</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer14</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property> + <property name="proportion">3</property> + <object class="wxStaticText" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Display framerate</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_staticText111</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <property name="wrap">-1</property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxSpinCtrl" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="initial">60</property> + <property name="max">120</property> + <property name="maximum_size"></property> + <property name="min">5</property> + <property name="minimum_size"></property> + <property name="name">m_spinDisplayFps</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxSP_ARROW_KEYS</property> + <property name="subclass"></property> + <property name="tooltip">This is only used by the linear & cubic display modes. Normal more will display at the same rate as the video is decoded(see the Basic tab).</property> + <property name="value"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnSpinCtrl"></event> + <event name="OnSpinCtrlText"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer15</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL|wxEXPAND</property> + <property name="proportion">0</property> + <object class="wxRadioBox" expanded="1"> + <property name="bg"></property> + <property name="choices">"Normal" "Piecewise Linear" "Piecewise Cubic"</property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Display mode</property> + <property name="majorDimension">1</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_radioDisplayMode</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="selection">1</property> + <property name="size"></property> + <property name="style">wxRA_SPECIFY_ROWS</property> + <property name="subclass"></property> + <property name="tooltip">'Normal' displays decoded video at the same rate it's decoded. 'Piecewise Linear' mode will interpolate between two decoded videoframes at the display framerate, and 'Piecewise Cubic' will interpolate over four decoded videoframes using a Mitchell-Natravali reconstruction curve, and will provide the best experience, especially if the video decoding rate is set low. Both Linear & Cubic modes use pixelshaders, so you need a decent GPU for this.</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRadioBox"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer20</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxCheckBox" expanded="1"> + <property name="bg"></property> + <property name="checked">1</property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">HTTP download</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_checkHttp</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxALIGN_RIGHT</property> + <property name="subclass"></property> + <property name="tooltip">Enables/Disables the downloading of new sheep from the server via the HTTP protocol</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnCheckBox"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer21</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxCheckBox" expanded="1"> + <property name="bg"></property> + <property name="checked">1</property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Render frames</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_checkRenderFrames</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxALIGN_RIGHT</property> + <property name="subclass"></property> + <property name="tooltip">Enables/Disables your computer to contribute to the flock by rendering new frames</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnCheckBox"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer22</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxCheckBox" expanded="1"> + <property name="bg"></property> + <property name="checked">0</property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Multicore rendering</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_checkMulticore</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxALIGN_RIGHT</property> + <property name="subclass"></property> + <property name="tooltip">Use all the processor cores available in your computer to render sheep frames. Note that this will take quite a bit of cpu, and the display may not be able to update at full framerate!</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnCheckBox"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="0"> + <property name="minimum_size"></property> + <property name="name">bSizer23</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT|wxALL</property> + <property name="proportion">0</property> + <object class="wxCheckBox" expanded="1"> + <property name="bg"></property> + <property name="checked">1</property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Keep rendered frames</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_checkKeepFrames</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxALIGN_RIGHT</property> + <property name="subclass"></property> + <property name="tooltip">Stores the rendered frames on your harddrive</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnCheckBox"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_RIGHT|wxALL</property> + <property name="proportion">1</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size"></property> + <property name="name">bSizer211</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxCheckBox" expanded="1"> + <property name="bg"></property> + <property name="checked">1</property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Negative vote deletes sheep</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_checkNegVoteDeletes</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxALIGN_RIGHT</property> + <property name="subclass"></property> + <property name="tooltip">If you press the down arrow key, then delete the currently displayed sheep in addition to notifying the server not to make more sheep like it</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnCheckBox"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND</property> + <property name="proportion">1</property> + <object class="wxStaticBoxSizer" expanded="1"> + <property name="id">wxID_ANY</property> + <property name="label">Content directory</property> + <property name="minimum_size"></property> + <property name="name">sbSizer3</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <event name="OnUpdateUI"></event> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxDirPickerCtrl" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="maximum_size"></property> + <property name="message">Select a folder</property> + <property name="minimum_size"></property> + <property name="name">m_dirContent</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style">wxDIRP_DEFAULT_STYLE|wxDIRP_DIR_MUST_EXIST</property> + <property name="subclass"></property> + <property name="tooltip"></property> + <property name="value"></property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnChar"></event> + <event name="OnDirChanged"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxButton" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="default">0</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Open this folder</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_buttonOpenContent</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip">Opens the content directory in an external exporer window</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnButtonClick"></event> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL</property> + <property name="proportion">0</property> + <object class="wxBoxSizer" expanded="1"> + <property name="minimum_size">-1,24</property> + <property name="name">confirmBox</property> + <property name="orient">wxHORIZONTAL</property> + <property name="permission">none</property> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALL</property> + <property name="proportion">0</property> + <object class="wxButton" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="default">0</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">Cancel</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_Cancel</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip">Discard all changes and exit</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnButtonClick"></event> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + <object class="sizeritem" expanded="1"> + <property name="border">5</property> + <property name="flag">wxALL</property> + <property name="proportion">0</property> + <object class="wxButton" expanded="1"> + <property name="bg"></property> + <property name="context_help"></property> + <property name="default">1</property> + <property name="enabled">1</property> + <property name="fg"></property> + <property name="font"></property> + <property name="hidden">0</property> + <property name="id">wxID_ANY</property> + <property name="label">OK</property> + <property name="maximum_size"></property> + <property name="minimum_size"></property> + <property name="name">m_Ok</property> + <property name="permission">protected</property> + <property name="pos"></property> + <property name="size"></property> + <property name="style"></property> + <property name="subclass"></property> + <property name="tooltip">Confirm all changes and exit</property> + <property name="window_extra_style"></property> + <property name="window_name"></property> + <property name="window_style"></property> + <event name="OnButtonClick"></event> + <event name="OnChar"></event> + <event name="OnEnterWindow"></event> + <event name="OnEraseBackground"></event> + <event name="OnKeyDown"></event> + <event name="OnKeyUp"></event> + <event name="OnKillFocus"></event> + <event name="OnLeaveWindow"></event> + <event name="OnLeftDClick"></event> + <event name="OnLeftDown"></event> + <event name="OnLeftUp"></event> + <event name="OnMiddleDClick"></event> + <event name="OnMiddleDown"></event> + <event name="OnMiddleUp"></event> + <event name="OnMotion"></event> + <event name="OnMouseEvents"></event> + <event name="OnMouseWheel"></event> + <event name="OnPaint"></event> + <event name="OnRightDClick"></event> + <event name="OnRightDown"></event> + <event name="OnRightUp"></event> + <event name="OnSetFocus"></event> + <event name="OnSize"></event> + <event name="OnUpdateUI"></event> + </object> + </object> + </object> + </object> + </object> + </object> + </object> +</wxFormBuilder_Project> diff -Nru electricsheep-2.7~b12+svn20091224/wxConfig/config.xrc electricsheep-3.0.2-git20180325/wxConfig/config.xrc --- electricsheep-2.7~b12+svn20091224/wxConfig/config.xrc 1970-01-01 00:00:00.000000000 +0000 +++ electricsheep-3.0.2-git20180325/wxConfig/config.xrc 2018-05-17 14:40:33.000000000 +0000 @@ -0,0 +1,585 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> +<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1"> + <object class="wxDialog" name="MyDialog2"> + <style>wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER</style> + <size>400,-1</size> + <title>Configuration + + wxVERTICAL + + + wxEXPAND + 5 + + wxHORIZONTAL + + + wxALL + 5 + + logo.png + + + + + wxALL|wxALIGN_CENTER_VERTICAL + 5 + + + 20 + default + + bold + 0 + Nice + + + + + + + wxALL + 5 + + + default + + normal + 0 + + + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 1 + + + default + + normal + 0 + + Start the client in standalone mode + + 0 + + + + + wxALL + 1 + + Launch the online help + + 0 + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_TOP|wxALL + 5 + + wxVERTICAL + + + wxALL + 5 + + + + 1 + + + Basic client settings + + wxVERTICAL + + + wxEXPAND + 5 + + wxVERTICAL + + + + wxALIGN_RIGHT + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxFIXED_MINSIZE + 5 + + + 256,-1 + Your Drupal login name + + 256 + + + + + + + wxALIGN_RIGHT + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxFIXED_MINSIZE + 5 + + + 256,-1 + Your Drupal login password + + 256 + + + + + + + wxALIGN_LEFT|wxSHAPED + 5 + + wxHORIZONTAL + + + wxALIGN_CENTER|wxALL + 5 + + Test the connection to verify that authentication worked + + 0 + + + + + wxALIGN_CENTER|wxALL + 5 + + + + default + + normal + 0 + + Authentication status + + + + + + + + + + wxEXPAND + 5 + + wxVERTICAL + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxSHAPED + 3 + + + Maximum amount of storage allowed by the sheep on your harddrive + 2000 + 10 + 10000 + + + + + wxALL + 5 + + + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxSHAPED + 3 + + + The rate at which sheep are decoded + 23 + 5 + 23 + + + + + wxALL + 5 + + + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + + + + + wxALL|wxSHAPED + 3 + + + The number of times a loop will repeat itself before continuing + 2 + 0 + 100 + + + + + wxALL + 5 + + + + + + + + + + + + + + 0 + + + Advanced client settings + + wxVERTICAL + + + wxALL|wxEXPAND + 5 + + wxVERTICAL + + + wxALIGN_RIGHT + 5 + + wxHORIZONTAL + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + + wxALL + 5 + + + All monitors will be black except this one.\n0 is the primary monitor, and the rest are subject to \nyour current display configuration.\nIf you have one additional display, such as a secondary monitor or a projector, that will be 1.\nIf you only have one monitor enabled, this setting is redundant. + 0 + 0 + 3 + + + + + + + wxALIGN_RIGHT + 3 + + wxHORIZONTAL + + + wxALIGN_CENTER_VERTICAL|wxALL + 5 + + + + + + + wxALL + 5 + + + This is only used by the linear _ cubic display modes. Normal more will display at the same rate as the video is decoded(see the Basic tab). + 60 + 5 + 120 + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 5 + + wxHORIZONTAL + + + wxALL|wxEXPAND + 5 + + + 'Normal' displays decoded video at the same rate it's decoded.\n'Piecewise Linear' mode will interpolate between two decoded videoframes at the display framerate,\nand 'Piecewise Cubic' will interpolate over four decoded videoframes \nusing a Mitchell-Natravali reconstruction curve, \nand will provide the best experience, especially if the video decoding rate is set low. \nBoth Linear _ Cubic modes use pixelshaders, so you need a decent GPU for this. + + 1 + + Normal + Piecewise Linear + Piecewise Cubic + + 1 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + Enables/Disables the downloading of new sheep from the server via the HTTP protocol + + 1 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + Enables/Disables your computer to contribute to the flock by rendering new frames + + 1 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + Use all the processor cores available in your computer to render sheep frames.\nNote that this will take quite a bit of cpu, and the display may not be able to update at full framerate! + + 0 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALIGN_RIGHT|wxALL + 5 + + + Stores the rendered frames on your harddrive + + 1 + + + + + + + wxALIGN_RIGHT|wxALL + 5 + + wxHORIZONTAL + + + wxALL + 5 + + + If you press the down arrow key, then delete the currently displayed sheep in addition to notifying the server not to make more sheep like it + + 1 + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxEXPAND + 5 + + wxHORIZONTAL + + + + wxALL + 5 + + + Select a folder + + + + + + wxALL + 5 + + Opens the content directory in an external exporer window + + 0 + + + + + + + + + + + + + + + + wxALIGN_CENTER_HORIZONTAL|wxALL + 5 + + wxHORIZONTAL + + + wxALIGN_CENTER_HORIZONTAL|wxALL + 5 + + Discard all changes and exit + + 0 + + + + + wxALL + 5 + + Confirm all changes and exit + + 1 + + + + + + + Binary files /tmp/tmpQJdsPD/zCYp5dmvyx/electricsheep-2.7~b12+svn20091224/wxConfig/logo.png and /tmp/tmpQJdsPD/8d7cwyFwT4/electricsheep-3.0.2-git20180325/wxConfig/logo.png differ