Browse Source

* remove, so it can be reinserted

peter 25 years ago
parent
commit
c251234c30
55 changed files with 0 additions and 18964 deletions
  1. 0 1326
      packages/opengl/Makefile
  2. 0 15
      packages/opengl/Makefile.fpc
  3. 0 58
      packages/opengl/README
  4. 0 1252
      packages/opengl/build/Makefile
  5. 0 13
      packages/opengl/build/Makefile.fpc
  6. 0 34
      packages/opengl/build/README
  7. 0 71
      packages/opengl/build/buildgl.pp
  8. 0 169
      packages/opengl/build/c_linuxd.pp
  9. 0 1062
      packages/opengl/build/gl.def
  10. 0 166
      packages/opengl/build/gl_linux.tpl
  11. 0 299
      packages/opengl/build/glext.def
  12. 0 242
      packages/opengl/build/glu.def
  13. 0 420
      packages/opengl/build/glut.def
  14. 0 121
      packages/opengl/build/glut_linux.tpl
  15. 0 112
      packages/opengl/build/glx.def
  16. 0 1268
      packages/opengl/build2/Makefile
  17. 0 31
      packages/opengl/build2/Makefile.fpc
  18. 0 71
      packages/opengl/build2/buildgl.pp
  19. 0 601
      packages/opengl/build2/c_gen.pp
  20. 0 98
      packages/opengl/build2/def2def.pas
  21. 0 1037
      packages/opengl/build2/gl.def
  22. 0 866
      packages/opengl/build2/gl10.def
  23. 0 176
      packages/opengl/build2/gl10ext.def
  24. 0 40
      packages/opengl/build2/gl10mesa.def
  25. 0 109
      packages/opengl/build2/gl10sgi.def
  26. 0 96
      packages/opengl/build2/gl11.def
  27. 0 58
      packages/opengl/build2/gl12.def
  28. 0 141
      packages/opengl/build2/gl_linux.tem
  29. 0 287
      packages/opengl/build2/gl_w32d.tem
  30. 0 221
      packages/opengl/build2/gl_w32s.tem
  31. 0 12
      packages/opengl/build2/glaux.def
  32. 0 502
      packages/opengl/build2/glaux_w32d.tem
  33. 0 502
      packages/opengl/build2/glaux_w32s.tem
  34. 0 300
      packages/opengl/build2/glext.def
  35. 0 196
      packages/opengl/build2/glu.def
  36. 0 120
      packages/opengl/build2/glu_w32d.tem
  37. 0 84
      packages/opengl/build2/glu_w32s.tem
  38. 0 268
      packages/opengl/build2/glut.def
  39. 0 99
      packages/opengl/build2/glut_linux.tem
  40. 0 69
      packages/opengl/build2/glut_w32d.tem
  41. 0 51
      packages/opengl/build2/glut_w32s.tem
  42. 0 108
      packages/opengl/build2/glx.def
  43. 0 122
      packages/opengl/build2/glx_w32d.tem
  44. 0 81
      packages/opengl/build2/glx_w32s.tem
  45. 0 53
      packages/opengl/build2/ogl_lind.gen
  46. 0 77
      packages/opengl/build2/ogl_w32d.gen
  47. 0 68
      packages/opengl/build2/ogl_w32s.gen
  48. 0 1281
      packages/opengl/examples/Makefile
  49. 0 15
      packages/opengl/examples/Makefile.fpc
  50. 0 169
      packages/opengl/examples/glutdemo.pp
  51. 0 1240
      packages/opengl/linux/Makefile
  52. 0 15
      packages/opengl/linux/Makefile.fpc
  53. 0 2240
      packages/opengl/linux/gl.pp
  54. 0 647
      packages/opengl/linux/glut.pp
  55. 0 185
      packages/opengl/linux/gtkglarea.pp

+ 0 - 1326
packages/opengl/Makefile

@@ -1,1326 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/09/01]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inlinux when running under linux
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
-	@echo You need the GNU utils package to use this Makefile!
-	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
-	@exit
-else
-inlinux=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-ifndef inlinux
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-endif
-endif
-
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inlinux
-ifndef inWinNT
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inlinux
-EXEEXT=
-else
-EXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inlinux
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-ifdef inOS2
-FPC=ppos2
-else
-FPC=ppc386
-endif
-endif
-endif
-override FPC:=$(subst $(EXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inlinux
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override DIROBJECTS+=$(wildcard linux build)
-override EXAMPLEDIROBJECTS+=examples
-
-# Clean
-
-
-# Install
-
-EXAMPLESUBDIR=opengl
-PACKAGENAME=opengl
-ZIPTARGET=install
-
-# Defaults
-
-
-# Directories
-
-
-# Packages
-
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inlinux
-INSTALL:=install -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inlinux
-INSTALLEXE:=install -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inlinux
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inlinux
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inlinux
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef inlinux
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all $(addsuffix _all,$(OS_TARGET))
-
-debug: fpc_debug $(addsuffix _debug,$(OS_TARGET))
-
-examples: fpc_examples
-
-test: fpc_test
-
-smart: fpc_smart $(addsuffix _smart,$(OS_TARGET))
-
-shared: fpc_shared $(addsuffix _shared,$(OS_TARGET))
-
-showinstall: fpc_showinstall $(addsuffix _showinstall,$(OS_TARGET))
-
-install: fpc_install $(addsuffix _install,$(OS_TARGET))
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean $(addsuffix _clean,$(DIROBJECTS)) $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-
-distclean: fpc_distclean $(addsuffix _distclean,$(DIROBJECTS))
-
-cleanall: fpc_cleanall $(addsuffix _cleanall,$(DIROBJECTS))
-
-require: $(addsuffix _require,$(DIROBJECTS))
-
-info: fpc_info
-
-.PHONY:  all debug examples test smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall require info
-
-#####################################################################
-# Examples
-#####################################################################
-
-.PHONY: fpc_examples fpc_test
-
-ifdef EXAMPLEOBJECTS
-override EXAMPLESOURCEFILES:=$(addsuffix $(PASEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEFILES:=$(addsuffix $(EXEEXT),$(EXAMPLEOBJECTS))
-override EXAMPLEOFILES:=$(addsuffix $(OEXT),$(EXAMPLEOBJECTS))
-
-override CLEANEXEFILES+=$(EXAMPLEFILES) $(EXAMPLEOFILES)
-endif
-
-fpc_examples: all $(EXAMPLEFILES) $(addsuffix _all,$(EXAMPLEDIROBJECTS))
-
-fpc_test: examples
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef inlinux
-ifndef LIBNAME
-	@$(ECHO) "LIBNAME not set"
-else
-	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
-	@$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef inlinux
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inlinux
-	ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(DATAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-	$(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
-	$(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inlinux
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inlinux
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
-	@$(ECHO) "Please specify ZIPNAME!"
-	@exit 1
-else
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
-	cd $(PACKDIR) ; $(TARPROG) c$(TAROPT) --file $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
-	cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-.PHONY:  fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY:  fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
-	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
-	-$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
-	@$(ECHO)
-	@$(ECHO)  == Configuration info ==
-	@$(ECHO)
-	@$(ECHO)  FPC....... $(FPC)
-	@$(ECHO)  Version... $(FPC_VERSION)
-	@$(ECHO)  CPU....... $(CPU_TARGET)
-	@$(ECHO)  Source.... $(OS_SOURCE)
-	@$(ECHO)  Target.... $(OS_TARGET)
-	@$(ECHO)
-
-fpc_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(ECHO)
-
-fpc_infoinstall:
-	@$(ECHO)
-	@$(ECHO)  == Install info ==
-	@$(ECHO)
-ifdef DATE
-	@$(ECHO)  DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
-	@$(ECHO)  PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
-	@$(ECHO)  PackageName.......... $(PACKAGENAME)
-endif
-	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
-	@$(ECHO)
-	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
-	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
-	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  DataInstallDir....... $(DATAINSTALLDIR)
-	@$(ECHO)
-	@$(ECHO)  DestZipDir........... $(DESTZIPDIR)
-	@$(ECHO)  ZipName.............. $(ZIPNAME)
-	@$(ECHO)
-
-#####################################################################
-# Directories
-#####################################################################
-
-OBJECTDIRLINUX=1
-OBJECTDIRBUILD=1
-
-# Dir linux
-
-ifdef OBJECTDIRLINUX
-.PHONY:  linux_all linux_debug linux_examples linux_test linux_smart linux_shared linux_showinstall linux_install linux_sourceinstall linux_exampleinstall linux_zipinstall linux_zipsourceinstall linux_zipexampleinstall linux_clean linux_distclean linux_cleanall linux_require linux_info
-
-linux_all:
-	$(MAKE) -C linux all
-
-linux_debug:
-	$(MAKE) -C linux debug
-
-linux_examples:
-	$(MAKE) -C linux examples
-
-linux_test:
-	$(MAKE) -C linux test
-
-linux_smart:
-	$(MAKE) -C linux smart
-
-linux_shared:
-	$(MAKE) -C linux shared
-
-linux_showinstall:
-	$(MAKE) -C linux showinstall
-
-linux_install:
-	$(MAKE) -C linux install
-
-linux_sourceinstall:
-	$(MAKE) -C linux sourceinstall
-
-linux_exampleinstall:
-	$(MAKE) -C linux exampleinstall
-
-linux_zipinstall:
-	$(MAKE) -C linux zipinstall
-
-linux_zipsourceinstall:
-	$(MAKE) -C linux zipsourceinstall
-
-linux_zipexampleinstall:
-	$(MAKE) -C linux zipexampleinstall
-
-linux_clean:
-	$(MAKE) -C linux clean
-
-linux_distclean:
-	$(MAKE) -C linux distclean
-
-linux_cleanall:
-	$(MAKE) -C linux cleanall
-
-linux_require:
-	$(MAKE) -C linux require
-
-linux_info:
-	$(MAKE) -C linux info
-endif
-
-# Dir build
-
-ifdef OBJECTDIRBUILD
-.PHONY:  build_all build_debug build_examples build_test build_smart build_shared build_showinstall build_install build_sourceinstall build_exampleinstall build_zipinstall build_zipsourceinstall build_zipexampleinstall build_clean build_distclean build_cleanall build_require build_info
-
-build_all:
-	$(MAKE) -C build all
-
-build_debug:
-	$(MAKE) -C build debug
-
-build_examples:
-	$(MAKE) -C build examples
-
-build_test:
-	$(MAKE) -C build test
-
-build_smart:
-	$(MAKE) -C build smart
-
-build_shared:
-	$(MAKE) -C build shared
-
-build_showinstall:
-	$(MAKE) -C build showinstall
-
-build_install:
-	$(MAKE) -C build install
-
-build_sourceinstall:
-	$(MAKE) -C build sourceinstall
-
-build_exampleinstall:
-	$(MAKE) -C build exampleinstall
-
-build_zipinstall:
-	$(MAKE) -C build zipinstall
-
-build_zipsourceinstall:
-	$(MAKE) -C build zipsourceinstall
-
-build_zipexampleinstall:
-	$(MAKE) -C build zipexampleinstall
-
-build_clean:
-	$(MAKE) -C build clean
-
-build_distclean:
-	$(MAKE) -C build distclean
-
-build_cleanall:
-	$(MAKE) -C build cleanall
-
-build_require:
-	$(MAKE) -C build require
-
-build_info:
-	$(MAKE) -C build info
-endif
-EXAMPLEDIREXAMPLES=1
-
-# Dir examples
-
-ifdef EXAMPLEDIREXAMPLES
-.PHONY:  examples_all examples_debug examples_examples examples_test examples_smart examples_shared examples_showinstall examples_install examples_sourceinstall examples_exampleinstall examples_zipinstall examples_zipsourceinstall examples_zipexampleinstall examples_clean examples_distclean examples_cleanall examples_require examples_info
-
-examples_all:
-	$(MAKE) -C examples all
-
-examples_debug:
-	$(MAKE) -C examples debug
-
-examples_examples:
-	$(MAKE) -C examples examples
-
-examples_test:
-	$(MAKE) -C examples test
-
-examples_smart:
-	$(MAKE) -C examples smart
-
-examples_shared:
-	$(MAKE) -C examples shared
-
-examples_showinstall:
-	$(MAKE) -C examples showinstall
-
-examples_install:
-	$(MAKE) -C examples install
-
-examples_sourceinstall:
-	$(MAKE) -C examples sourceinstall
-
-examples_exampleinstall:
-	$(MAKE) -C examples exampleinstall
-
-examples_zipinstall:
-	$(MAKE) -C examples zipinstall
-
-examples_zipsourceinstall:
-	$(MAKE) -C examples zipsourceinstall
-
-examples_zipexampleinstall:
-	$(MAKE) -C examples zipexampleinstall
-
-examples_clean:
-	$(MAKE) -C examples clean
-
-examples_distclean:
-	$(MAKE) -C examples distclean
-
-examples_cleanall:
-	$(MAKE) -C examples cleanall
-
-examples_require:
-	$(MAKE) -C examples require
-
-examples_info:
-	$(MAKE) -C examples info
-endif
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-

+ 0 - 15
packages/opengl/Makefile.fpc

@@ -1,15 +0,0 @@
-#
-#   Makefile.fpc for OpenGL for FPC
-#
-
-[targets]
-dirs=linux build
-exampledirs=examples
-
-[install]
-packagename=opengl
-examplesubdir=opengl
-
-[defaults]
-defaultbuilddir=$(OS_TARGET)
-defaultinstalldir=$(OS_TARGET)

+ 0 - 58
packages/opengl/README

@@ -1,58 +0,0 @@
-Free Pascal GL* (GL, GLU, GLUT, GLX) Units
-(c) 1999-2000 Sebastian Guenther, [email protected]
-
-
-subdirectory "build"
---------------------
-This directory contains tools which create the sources of the real GL* units
-based on some template files. It contains its own README file, look there for
-further informations.
-
-
-subdirectory "linux"
---------------------
-Contains the GL* units for Linux; currently you can use all GL, GLU and GLX
-functions as well as most GLUT functions. Automatic loading of GL extensions
-is not supported yet, but is planned for the future.
-Under Linux, the GL* units try to locate the underlying libraries at run-time;
-they search for the libraries in the following order:
-
-GL: (includes GLX)
-    1. libGL.so
-    2. libGL.so.1
-    3. libMesaGL.so.3
-
-GLU:
-    1. libGLU.so
-    2. libGLU.so.1
-    3. libMesaGLU.so.3
-
-GLUT:
-    1. libglut.so
-    2. libglut.so.3
-
-This should work on all more recent Linux installations.
-
-
-The GL unit has a variable called "GLDumpUnresolvedFunctions", and the GLUT
-unit one called "GLUTDumpUnresolvedFunctions". Set them to True in your
-applications if you want to get all function names dumped to the console
-which couldn't be resolved, i.e. which are not available in the loaded
-libraries.
-
-
-=== gtkglarea: ===
-
-Additionally, there is an adaption for the gtkglarea (GTK GL area widget)
-available; as gtkglarea uses the XLib it is only available for Linux here.
-
-
-subdirectory "examples"
------------------------
-Only contains a test program called "glutdemo" at the moment, which
-demonstrates the use of the GL and GLUT units.
-
-
-
-Have fun,
-Sebastian

+ 0 - 1252
packages/opengl/build/Makefile

@@ -1,1252 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/09/01]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inlinux when running under linux
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
-	@echo You need the GNU utils package to use this Makefile!
-	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
-	@exit
-else
-inlinux=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-ifndef inlinux
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-endif
-endif
-
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inlinux
-ifndef inWinNT
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inlinux
-EXEEXT=
-else
-EXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inlinux
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-ifdef inOS2
-FPC=ppos2
-else
-FPC=ppc386
-endif
-endif
-endif
-override FPC:=$(subst $(EXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Default FPCDIR
-ifeq ($(FPCDIR),wrong)
-override FPCDIR=../../..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inlinux
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override UNITOBJECTS+=buildgl
-override EXEOBJECTS+=c_linuxd
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-
-# Directories
-
-
-# Packages
-
-override PACKAGES+=rtl fcl
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inlinux
-INSTALL:=install -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inlinux
-INSTALLEXE:=install -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inlinux
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inlinux
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inlinux
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEFCL=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
-	$(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEFCL
-ifneq ($(wildcard $(FPCDIR)/fcl),)
-ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
-PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET)
-else
-PACKAGEDIR_FCL=$(FPCDIR)/fcl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fcl
-package_fcl:
-	$(MAKE) -C $(PACKAGEDIR_FCL) all
-endif
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
-else
-PACKAGEDIR_FCL=
-ifneq ($(wildcard $(UNITSDIR)/fcl),)
-ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),)
-UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET)
-else
-UNITDIR_FCL=$(UNITSDIR)/fcl
-endif
-else
-UNITDIR_FCL=
-endif
-endif
-ifdef UNITDIR_FCL
-override NEEDUNITDIR+=$(UNITDIR_FCL)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef inlinux
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY:  all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef inlinux
-ifndef LIBNAME
-	@$(ECHO) "LIBNAME not set"
-else
-	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
-	@$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef inlinux
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inlinux
-	ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(DATAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-	$(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
-	$(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inlinux
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inlinux
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
-	@$(ECHO) "Please specify ZIPNAME!"
-	@exit 1
-else
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
-	cd $(PACKDIR) ; $(TARPROG) c$(TAROPT) --file $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
-	cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-.PHONY:  fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY:  fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
-	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
-	-$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
-	@$(ECHO)
-	@$(ECHO)  == Configuration info ==
-	@$(ECHO)
-	@$(ECHO)  FPC....... $(FPC)
-	@$(ECHO)  Version... $(FPC_VERSION)
-	@$(ECHO)  CPU....... $(CPU_TARGET)
-	@$(ECHO)  Source.... $(OS_SOURCE)
-	@$(ECHO)  Target.... $(OS_TARGET)
-	@$(ECHO)
-
-fpc_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(ECHO)
-
-fpc_infoinstall:
-	@$(ECHO)
-	@$(ECHO)  == Install info ==
-	@$(ECHO)
-ifdef DATE
-	@$(ECHO)  DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
-	@$(ECHO)  PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
-	@$(ECHO)  PackageName.......... $(PACKAGENAME)
-endif
-	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
-	@$(ECHO)
-	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
-	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
-	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  DataInstallDir....... $(DATAINSTALLDIR)
-	@$(ECHO)
-	@$(ECHO)  DestZipDir........... $(DESTZIPDIR)
-	@$(ECHO)  ZipName.............. $(ZIPNAME)
-	@$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-

+ 0 - 13
packages/opengl/build/Makefile.fpc

@@ -1,13 +0,0 @@
-#
-#   Makefile.fpc for auto generation of OpenGL units
-#
-
-[targets]
-units=buildgl
-programs=c_linuxd
-
-[require]
-packages=fcl
-
-[dirs]
-fpcdir=../../..

+ 0 - 34
packages/opengl/build/README

@@ -1,34 +0,0 @@
-Free Pascal GL* Units
-(c) 1999-2000 Sebastian Guenther, [email protected]
-
-
-buildgl.pp
-----------
-This unit only contains the class "TDefReader", which reads .def files and
-holds the informations in the read .def file.
-
-
-c_linuxd.pp
------------
-This program creates the Linux units "linux/gl.pp" and "linux/glut.pp". It is
-a kind of template processor which reads in the Linux specific .tpl template
-files; at specially marked places within the template file it inserts
-converted data read in from .def files.
-
-
-*.def
------
-These are definition files, which hold all declarations common to all
-platforms. It may contain two sections:
-All lines between "%COPY_INTERFACE" and "%END" are just inserted into the
-interface section of generated units; the lines between "%PROCS" and "%END"
-are procedure and function definitions. Comments are preserved.
-Comments within the .def file (which don't appear in generated units) have
-a "#" character at the beginning of the line.
-
-
-*.tpl
------
-Template files; these files are the skeleton for the generated units. Within
-a template file, lines beginning with "%" mark special positions where the
-generator inserts its stuff read and possibly converted from .def files.

+ 0 - 71
packages/opengl/build/buildgl.pp

@@ -1,71 +0,0 @@
-{
-  $Id$
-
-  GL unit creation tool helpers
-  (c) 1999 Sebastian Guenther, [email protected]
-}
-
-{$MODE objfpc}
-{$H+}
-
-unit buildgl;
-
-interface
-uses SysUtils, Classes;
-
-type
-
-  TDefReader = class
-  protected
-    FInterfaceBlock, FProcs: TStringList;
-  public
-    constructor Create(const Filename: String);
-    property InterfaceBlock: TStringList read FInterfaceBlock;
-    property Procs: TStringList read FProcs;
-  end;
-
-
-implementation
-
-
-constructor TDefReader.Create(const Filename: String);
-type
-  TCurState = (stateNothing, stateCopyInterface, stateProcs);
-var
-  f: Text;
-  s: String;
-  state: TCurState;
-begin
-  state := stateNothing;
-  FInterfaceBlock := TStringList.Create;
-  FProcs := TStringList.Create;
-
-  Assign(f, Filename);
-  Reset(f);
-  while not EOF(f) do begin
-    ReadLn(f, s);
-    if Copy(s, 1, 1) = '#' then continue;  // Skip comments
-    if s = '%COPY_INTERFACE' then
-      state := stateCopyInterface
-    else if s = '%PROCS' then
-      state := stateProcs
-    else if s = '%END' then
-      state := stateNothing
-    else
-      case state of
-        stateCopyInterface: InterfaceBlock.Add(s);
-        stateProcs: Procs.Add(s);
-      end;
-  end;
-  Close(f);
-end;
-
-end.
-
-
-{
-  $Log$
-  Revision 1.2  2000-07-13 11:33:28  michael
-  + removed logs
- 
-}

+ 0 - 169
packages/opengl/build/c_linuxd.pp

@@ -1,169 +0,0 @@
-{
-  $Id$
-
-  GL unit creation tool for Linux dynamic version
-  (c) 1999-2000 Sebastian Guenther, [email protected]
-}
-
-
-program c_linuxd;
-
-{$MODE objfpc}
-{$H+}
-
-uses SysUtils, Classes, buildgl;
-
-var
-  f: Text;
-
-procedure PrintInterface(lines: TStringList; var dest: Text);
-var
-  i: Integer;
-begin
-  for i := 0 to lines.Count - 1 do
-    WriteLn(dest, lines.Strings[i]);
-end;
-
-procedure PrintProcDecls(procs: TStringList);
-var
-  i, j: Integer;
-  s: String;
-begin
-  for i := 0 to procs.Count - 1 do
-  begin
-    s := procs.Strings[i];
-    j := Pos('//', s);
-    if (Length(s) = 0) or ((j > 0) and (Trim(s)[1] = '/')) then
-      WriteLn(f, s)
-    else if j = 0 then
-      WriteLn(f, s, ' cdecl;')
-    else
-      WriteLn(f, TrimRight(Copy(s, 1, j - 1)), ' cdecl; ', Copy(s, j, Length(s)));
-  end;
-end;
-
-procedure PrintProcLoaders(procs: TStringList; const libname: String);
-var
-  i, j: Integer;
-  s: String;
-begin
-  for i := 0 to procs.Count - 1 do
-  begin
-    s := Trim(procs.Strings[i]);
-    j := Pos(':', s);
-    s := Trim(Copy(s, 1, j - 1));
-    if (Length(s) = 0) or (Pos('//', s) > 0) then continue;
-    WriteLn(f, '  ', s, ' := GetProc(', libname, ', ''', s, ''');');
-  end;
-end;
-
-procedure PrintCVSLogSection;
-begin
-  WriteLn(f);
-  WriteLn(f);
-  WriteLn(f, '{');
-  WriteLn(f, '  $', 'Log:$');  // this source file (c_linuxd.pp) is in CVS, too!
-  WriteLn(f, '}');
-end;
-
-var
-  DefGL, DefGLExt, DefGLU, DefGLX, DefGLUT: TDefReader;
-  tpl: Text;
-  s: String;
-begin
-  WriteLn('Template processor for OpenGL related Units');
-
-  // Load definition files
-
-  WriteLn('Loading definition files...');
-
-  DefGL    := TDefReader.Create('gl.def');
-  DefGLExt := TDefReader.Create('glext.def');
-  DefGLU   := TDefReader.Create('glu.def');
-  DefGLX   := TDefReader.Create('glx.def');
-  DefGLUT  := TDefReader.Create('glut.def');
-
-
-  // Build GL unit
-
-  WriteLn('Generating GL unit for Linux...');
-
-  Assign(f, '../linux/gl.pp');
-  Rewrite(f);
-  Assign(tpl, 'gl_linux.tpl');
-  Reset(tpl);
-  while not EOF(tpl) do
-  begin
-    ReadLn(tpl, s);
-    if Copy(s, 1, 1) = '%' then
-    begin
-      if s = '%GLDecls' then
-        PrintInterface(DefGL.InterfaceBlock, f)
-      else if s = '%GLProcs1' then
-        PrintProcDecls(DefGL.Procs)
-      else if s = '%GLProcs2' then
-        PrintProcLoaders(DefGL.Procs, 'libgl')
-      else if s = '%GLExtDecls' then
-        PrintInterface(DefGLExt.InterfaceBlock, f)
-      else if s = '%GLExtProcs1' then
-        PrintProcDecls(DefGLExt.Procs)
-      else if s = '%GLExtProcs2' then
-        PrintProcLoaders(DefGLExt.Procs, 'libgl')
-      else if s = '%GLUDecls' then
-        PrintInterface(DefGLU.InterfaceBlock, f)
-      else if s = '%GLUProcs1' then
-        PrintProcDecls(DefGLU.Procs)
-      else if s = '%GLUProcs2' then
-        PrintProcLoaders(DefGLU.Procs, 'libglu')
-      else if s = '%GLXDecls' then
-        PrintInterface(DefGLX.InterfaceBlock, f)
-      else if s = '%GLXProcs1' then
-        PrintProcDecls(DefGLX.Procs)
-      else if s = '%GLXProcs2' then
-        PrintProcLoaders(DefGLX.Procs, 'libglx')
-      else
-        WriteLn(f, '// ### c_linuxd: Don''t know what to insert here!: ', s);
-    end else if Copy(s, 1, 1) <> '#' then
-      WriteLn(f, s);
-  end;
-  PrintCVSLogSection;
-  Close(f);
-
-
-  // Build GLUT unit
-
-  WriteLn('Generating GLUT unit for Linux...');
-
-  Assign(f, '../linux/glut.pp');
-  Rewrite(f);
-  Assign(tpl, 'glut_linux.tpl');
-  Reset(tpl);
-  while not EOF(tpl) do
-  begin
-    ReadLn(tpl, s);
-    if Copy(s, 1, 1) = '%' then
-    begin
-      if s = '%GLUTDecls' then
-        PrintInterface(DefGLUT.InterfaceBlock, f)
-      else if s = '%GLUTProcs1' then
-        PrintProcDecls(DefGLUT.Procs)
-      else if s = '%GLUTProcs2' then
-        PrintProcLoaders(DefGLUT.Procs, 'libglut')
-      else
-        WriteLn(f, '// ### c_linuxd: Don''t know what to insert here!: ', s);
-    end else if Copy(s, 1, 1) <> '#' then
-      WriteLn(f, s);
-  end;
-  PrintCVSLogSection;
-  Close(f);
-
-  WriteLn('Done...');
-end.
-
-
-{
-  $Log$
-  Revision 1.2  2000-07-13 11:33:28  michael
-  + removed logs
- 
-}

+ 0 - 1062
packages/opengl/build/gl.def

@@ -1,1062 +0,0 @@
-# This is the definition file for all GL functions and types.
-
-%COPY_INTERFACE
-
-// C types
-type
-  SignedChar = ShortInt;
-  UnsignedChar = Byte;
-  Short = SmallInt;
-  SignedShort = Short;
-  UnsignedShort = Word;
-  Int = LongInt;
-  SignedInt = Int;
-  UnsignedInt = LongWord;
-  Float = Single;
-
-  PInt = ^Int;
-
-
-// ===================================================================
-//   GL consts, types and functions
-// ===================================================================
-
-
-// -------------------------------------------------------------------
-//   GL types
-// -------------------------------------------------------------------
-
-type
-
-  PGLvoid = Pointer;
-  GLboolean = Boolean;
-  GLbyte = SignedChar;		// 1-byte signed
-  GLshort = Short;		// 2-byte signed
-  GLint = Int;			// 4-byte signed
-  GLubyte = UnsignedChar;	// 1-byte unsigned
-  GLushort = UnsignedShort;	// 2-byte unsigned
-  GLuint = UnsignedInt;		// 4-byte unsigned
-  GLsizei = Int;		// 4-byte signed
-  GLfloat = Float;		// single precision float
-  GLclampf = Float;		// single precision float in [0,1]
-  GLdouble = Double;		// double precision float
-  GLclampd = Double;		// double precision float in [0,1]
-
-  PGLfloat = ^GLfloat;
-
-  GLenum = Integer;
-
-  GLbitfield = set of (GL_CURRENT_BIT, GL_POINT_BIT, GL_LINE_BIT,
-    GL_POLYGON_BIT, GL_POLYGON_STIPPLE_BIT, GL_PIXEL_MODE_BIT,
-    GL_LIGHTING_BIT, GL_FOG_BIT, GL_DEPTH_BUFFER_BIT, GL_ACCUM_BUFFER_BIT,
-    GL_STENCIL_BUFFER_BIT, GL_VIEWPORT_BIT, GL_TRANSFORM_BIT, GL_ENABLE_BIT,
-    GL_COLOR_BUFFER_BIT, GL_HINT_BIT, GL_EVAL_BIT, GL_LIST_BIT, GL_TEXTURE_BIT,
-    GL_SCISSOR_BIT);
-
-const
-  GL_ALL_ATTRIB_BITS = [Low(GLbitfield)..High(GLbitfield)];
-
-
-// -------------------------------------------------------------------
-//   GL constants
-// -------------------------------------------------------------------
-
-const
-  GL_NO_ERROR                           = 0;
-
-  // Boolean values
-  GL_FALSE                              = False;
-  GL_TRUE                               = True;
-
-  // Data types
-  GL_BYTE                               = $1400;
-  GL_UNSIGNED_BYTE                      = $1401;
-  GL_SHORT                              = $1402;
-  GL_UNSIGNED_SHORT                     = $1403;
-  GL_INT                                = $1404;
-  GL_UNSIGNED_INT                       = $1405;
-  GL_FLOAT                              = $1406;
-  GL_DOUBLE                             = $140A;
-  GL_2_BYTES                            = $1407;
-  GL_3_BYTES                            = $1408;
-  GL_4_BYTES                            = $1409;
-
-  // Primitives
-  GL_LINES                              = $0001;
-  GL_POINTS                             = $0000;
-  GL_LINE_STRIP                         = $0003;
-  GL_LINE_LOOP                          = $0002;
-  GL_TRIANGLES                          = $0004;
-  GL_TRIANGLE_STRIP                     = $0005;
-  GL_TRIANGLE_FAN                       = $0006;
-  GL_QUADS                              = $0007;
-  GL_QUAD_STRIP                         = $0008;
-  GL_POLYGON                            = $0009;
-  GL_EDGE_FLAG                          = $0B43;
-
-  // Vertex arrays
-  GL_VERTEX_ARRAY                       = $8074;
-  GL_NORMAL_ARRAY                       = $8075;
-  GL_COLOR_ARRAY                        = $8076;
-  GL_INDEX_ARRAY                        = $8077;
-  GL_TEXTURE_COORD_ARRAY                = $8078;
-  GL_EDGE_FLAG_ARRAY                    = $8079;
-  GL_VERTEX_ARRAY_SIZE                  = $807A;
-  GL_VERTEX_ARRAY_TYPE                  = $807B;
-  GL_VERTEX_ARRAY_STRIDE                = $807C;
-  GL_NORMAL_ARRAY_TYPE                  = $807E;
-  GL_NORMAL_ARRAY_STRIDE                = $807F;
-  GL_COLOR_ARRAY_SIZE                   = $8081;
-  GL_COLOR_ARRAY_TYPE                   = $8082;
-  GL_COLOR_ARRAY_STRIDE                 = $8083;
-  GL_INDEX_ARRAY_TYPE                   = $8085;
-  GL_INDEX_ARRAY_STRIDE                 = $8086;
-  GL_TEXTURE_COORD_ARRAY_SIZE           = $8088;
-  GL_TEXTURE_COORD_ARRAY_TYPE           = $8089;
-  GL_TEXTURE_COORD_ARRAY_STRIDE         = $808A;
-  GL_EDGE_FLAG_ARRAY_STRIDE             = $808C;
-  GL_VERTEX_ARRAY_POINTER               = $808E;
-  GL_NORMAL_ARRAY_POINTER               = $808F;
-  GL_COLOR_ARRAY_POINTER                = $8090;
-  GL_INDEX_ARRAY_POINTER                = $8091;
-  GL_TEXTURE_COORD_ARRAY_POINTER        = $8092;
-  GL_EDGE_FLAG_ARRAY_POINTER            = $8093;
-  GL_V2F                                = $2A20;
-  GL_V3F                                = $2A21;
-  GL_C4UB_V2F                           = $2A22;
-  GL_C4UB_V3F                           = $2A23;
-  GL_C3F_V3F                            = $2A24;
-  GL_N3F_V3F                            = $2A25;
-  GL_C4F_N3F_V3F                        = $2A26;
-  GL_T2F_V3F                            = $2A27;
-  GL_T4F_V4F                            = $2A28;
-  GL_T2F_C4UB_V3F                       = $2A29;
-  GL_T2F_C3F_V3F                        = $2A2A;
-  GL_T2F_N3F_V3F                        = $2A2B;
-  GL_T2F_C4F_N3F_V3F                    = $2A2C;
-  GL_T4F_C4F_N3F_V4F                    = $2A2D;
-
-  // Matrix Mode
-  GL_MATRIX_MODE                        = $0BA0;
-  GL_MODELVIEW                          = $1700;
-  GL_PROJECTION                         = $1701;
-  GL_TEXTURE                            = $1702;
-
-  // Points
-  GL_POINT_SMOOTH                       = $0B10;
-  GL_POINT_SIZE                         = $0B11;
-  GL_POINT_SIZE_GRANULARITY             = $0B13;
-  GL_POINT_SIZE_RANGE                   = $0B12;
-
-  // Lines
-  GL_LINE_SMOOTH                        = $0B20;
-  GL_LINE_STIPPLE                       = $0B24;
-  GL_LINE_STIPPLE_PATTERN               = $0B25;
-  GL_LINE_STIPPLE_REPEAT                = $0B26;
-  GL_LINE_WIDTH                         = $0B21;
-  GL_LINE_WIDTH_GRANULARITY             = $0B23;
-  GL_LINE_WIDTH_RANGE                   = $0B22;
-
-  // Polygons
-  GL_POINT                              = $1B00;
-  GL_LINE                               = $1B01;
-  GL_FILL                               = $1B02;
-  GL_CCW                                = $0901;
-  GL_CW                                 = $0900;
-  GL_FRONT                              = $0404;
-  GL_BACK                               = $0405;
-  GL_CULL_FACE                          = $0B44;
-  GL_CULL_FACE_MODE                     = $0B45;
-  GL_POLYGON_SMOOTH                     = $0B41;
-  GL_POLYGON_STIPPLE                    = $0B42;
-  GL_FRONT_FACE                         = $0B46;
-  GL_POLYGON_MODE                       = $0B40;
-  GL_POLYGON_OFFSET_FACTOR              = $8038;
-  GL_POLYGON_OFFSET_UNITS               = $2A00;
-  GL_POLYGON_OFFSET_POINT               = $2A01;
-  GL_POLYGON_OFFSET_LINE                = $2A02;
-  GL_POLYGON_OFFSET_FILL                = $8037;
-
-  // Display lists
-  GL_COMPILE                            = $1300;
-  GL_COMPILE_AND_EXECUTE                = $1301;
-  GL_LIST_BASE                          = $0B32;
-  GL_LIST_INDEX                         = $0B33;
-  GL_LIST_MODE                          = $0B30;
-
-  // Depth buffer
-  GL_NEVER                              = $0200;
-  GL_LESS                               = $0201;
-  GL_GEQUAL                             = $0206;
-  GL_LEQUAL                             = $0203;
-  GL_GREATER                            = $0204;
-  GL_NOTEQUAL                           = $0205;
-  GL_EQUAL                              = $0202;
-  GL_ALWAYS                             = $0207;
-  GL_DEPTH_TEST                         = $0B71;
-  GL_DEPTH_BITS                         = $0D56;
-  GL_DEPTH_CLEAR_VALUE                  = $0B73;
-  GL_DEPTH_FUNC                         = $0B74;
-  GL_DEPTH_RANGE                        = $0B70;
-  GL_DEPTH_WRITEMASK                    = $0B72;
-  GL_DEPTH_COMPONENT                    = $1902;
-
-  // Lighting
-  GL_LIGHTING                           = $0B50;
-  GL_LIGHT0                             = $4000;
-  GL_LIGHT1                             = $4001;
-  GL_LIGHT2                             = $4002;
-  GL_LIGHT3                             = $4003;
-  GL_LIGHT4                             = $4004;
-  GL_LIGHT5                             = $4005;
-  GL_LIGHT6                             = $4006;
-  GL_LIGHT7                             = $4007;
-  GL_SPOT_EXPONENT                      = $1205;
-  GL_SPOT_CUTOFF                        = $1206;
-  GL_CONSTANT_ATTENUATION               = $1207;
-  GL_LINEAR_ATTENUATION                 = $1208;
-  GL_QUADRATIC_ATTENUATION              = $1209;
-  GL_AMBIENT                            = $1200;
-  GL_DIFFUSE                            = $1201;
-  GL_SPECULAR                           = $1202;
-  GL_SHININESS                          = $1601;
-  GL_EMISSION                           = $1600;
-  GL_POSITION                           = $1203;
-  GL_SPOT_DIRECTION                     = $1204;
-  GL_AMBIENT_AND_DIFFUSE                = $1602;
-  GL_COLOR_INDEXES                      = $1603;
-  GL_LIGHT_MODEL_TWO_SIDE               = $0B52;
-  GL_LIGHT_MODEL_LOCAL_VIEWER           = $0B51;
-  GL_LIGHT_MODEL_AMBIENT                = $0B53;
-  GL_FRONT_AND_BACK                     = $0408;
-  GL_SHADE_MODEL                        = $0B54;
-  GL_FLAT                               = $1D00;
-  GL_SMOOTH                             = $1D01;
-  GL_COLOR_MATERIAL                     = $0B57;
-  GL_COLOR_MATERIAL_FACE                = $0B55;
-  GL_COLOR_MATERIAL_PARAMETER           = $0B56;
-  GL_NORMALIZE                          = $0BA1;
-
-  // User clipping planes
-  GL_CLIP_PLANE0                        = $3000;
-  GL_CLIP_PLANE1                        = $3001;
-  GL_CLIP_PLANE2                        = $3002;
-  GL_CLIP_PLANE3                        = $3003;
-  GL_CLIP_PLANE4                        = $3004;
-  GL_CLIP_PLANE5                        = $3005;
-
-  // Accumulation buffer
-  GL_ACCUM_RED_BITS                     = $0D58;
-  GL_ACCUM_GREEN_BITS                   = $0D59;
-  GL_ACCUM_BLUE_BITS                    = $0D5A;
-  GL_ACCUM_ALPHA_BITS                   = $0D5B;
-  GL_ACCUM_CLEAR_VALUE                  = $0B80;
-  GL_ACCUM                              = $0100;
-  GL_ADD                                = $0104;
-  GL_LOAD                               = $0101;
-  GL_MULT                               = $0103;
-  GL_RETURN                             = $0102;
-
-  // Alpha testing
-  GL_ALPHA_TEST                         = $0BC0;
-  GL_ALPHA_TEST_REF                     = $0BC2;
-  GL_ALPHA_TEST_FUNC                    = $0BC1;
-
-  // Blending
-  GL_BLEND                              = $0BE2;
-  GL_BLEND_SRC                          = $0BE1;
-  GL_BLEND_DST                          = $0BE0;
-  GL_ZERO                               = 0;
-  GL_ONE                                = 1;
-  GL_SRC_COLOR                          = $0300;
-  GL_ONE_MINUS_SRC_COLOR                = $0301;
-  GL_DST_COLOR                          = $0306;
-  GL_ONE_MINUS_DST_COLOR                = $0307;
-  GL_SRC_ALPHA                          = $0302;
-  GL_ONE_MINUS_SRC_ALPHA                = $0303;
-  GL_DST_ALPHA                          = $0304;
-  GL_ONE_MINUS_DST_ALPHA                = $0305;
-  GL_SRC_ALPHA_SATURATE                 = $0308;
-  GL_CONSTANT_COLOR                     = $8001;
-  GL_ONE_MINUS_CONSTANT_COLOR           = $8002;
-  GL_CONSTANT_ALPHA                     = $8003;
-  GL_ONE_MINUS_CONSTANT_ALPHA           = $8004;
-
-  // Render mode
-  GL_FEEDBACK                           = $1C01;
-  GL_RENDER                             = $1C00;
-  GL_SELECT                             = $1C02;
-
-  // Feedback
-  GL_2D                                 = $0600;
-  GL_3D                                 = $0601;
-  GL_3D_COLOR                           = $0602;
-  GL_3D_COLOR_TEXTURE                   = $0603;
-  GL_4D_COLOR_TEXTURE                   = $0604;
-  GL_POINT_TOKEN                        = $0701;
-  GL_LINE_TOKEN                         = $0702;
-  GL_LINE_RESET_TOKEN                   = $0707;
-  GL_POLYGON_TOKEN                      = $0703;
-  GL_BITMAP_TOKEN                       = $0704;
-  GL_DRAW_PIXEL_TOKEN                   = $0705;
-  GL_COPY_PIXEL_TOKEN                   = $0706;
-  GL_PASS_THROUGH_TOKEN                 = $0700;
-  GL_FEEDBACK_BUFFER_POINTER            = $0DF0;
-  GL_FEEDBACK_BUFFER_SIZE               = $0DF1;
-  GL_FEEDBACK_BUFFER_TYPE               = $0DF2;
-
-  // Selection
-  GL_SELECTION_BUFFER_POINTER           = $0DF3;
-  GL_SELECTION_BUFFER_SIZE              = $0DF4;
-
-  // Fog
-  GL_FOG                                = $0B60;
-  GL_FOG_MODE                           = $0B65;
-  GL_FOG_DENSITY                        = $0B62;
-  GL_FOG_COLOR                          = $0B66;
-  GL_FOG_INDEX                          = $0B61;
-  GL_FOG_START                          = $0B63;
-  GL_FOG_END                            = $0B64;
-  GL_LINEAR                             = $2601;
-  GL_EXP                                = $0800;
-  GL_EXP2                               = $0801;
-
-  // Logic ops
-  GL_LOGIC_OP                           = $0BF1;
-  GL_INDEX_LOGIC_OP                     = $0BF1;
-  GL_COLOR_LOGIC_OP                     = $0BF2;
-  GL_LOGIC_OP_MODE                      = $0BF0;
-  GL_CLEAR                              = $1500;
-  GL_SET                                = $150F;
-  GL_COPY                               = $1503;
-  GL_COPY_INVERTED                      = $150C;
-  GL_NOOP                               = $1505;
-  GL_INVERT                             = $150A;
-  GL_AND                                = $1501;
-  GL_NAND                               = $150E;
-  GL_OR                                 = $1507;
-  GL_NOR                                = $1508;
-  GL_XOR                                = $1506;
-  GL_EQUIV                              = $1509;
-  GL_AND_REVERSE                        = $1502;
-  GL_AND_INVERTED                       = $1504;
-  GL_OR_REVERSE                         = $150B;
-  GL_OR_INVERTED                        = $150D;
-
-  // Stencil
-  GL_STENCIL_TEST                       = $0B90;
-  GL_STENCIL_WRITEMASK                  = $0B98;
-  GL_STENCIL_BITS                       = $0D57;
-  GL_STENCIL_FUNC                       = $0B92;
-  GL_STENCIL_VALUE_MASK                 = $0B93;
-  GL_STENCIL_REF                        = $0B97;
-  GL_STENCIL_FAIL                       = $0B94;
-  GL_STENCIL_PASS_DEPTH_PASS            = $0B96;
-  GL_STENCIL_PASS_DEPTH_FAIL            = $0B95;
-  GL_STENCIL_CLEAR_VALUE                = $0B91;
-  GL_STENCIL_INDEX                      = $1901;
-  GL_KEEP                               = $1E00;
-  GL_REPLACE                            = $1E01;
-  GL_INCR                               = $1E02;
-  GL_DECR                               = $1E03;
-
-  // Buffers, Pixel Drawing/Reading
-  GL_NONE                               = 0;
-  GL_LEFT                               = $0406;
-  GL_RIGHT                              = $0407;
-  //GL_FRONT                            = $0404;
-  //GL_BACK                             = $0405;
-  //GL_FRONT_AND_BACK                   = $0408;
-  GL_FRONT_LEFT                         = $0400;
-  GL_FRONT_RIGHT                        = $0401;
-  GL_BACK_LEFT                          = $0402;
-  GL_BACK_RIGHT                         = $0403;
-  GL_AUX0                               = $0409;
-  GL_AUX1                               = $040A;
-  GL_AUX2                               = $040B;
-  GL_AUX3                               = $040C;
-  GL_COLOR_INDEX                        = $1900;
-  GL_RED                                = $1903;
-  GL_GREEN                              = $1904;
-  GL_BLUE                               = $1905;
-  GL_ALPHA                              = $1906;
-  GL_LUMINANCE                          = $1909;
-  GL_LUMINANCE_ALPHA                    = $190A;
-  GL_ALPHA_BITS                         = $0D55;
-  GL_RED_BITS                           = $0D52;
-  GL_GREEN_BITS                         = $0D53;
-  GL_BLUE_BITS                          = $0D54;
-  GL_INDEX_BITS                         = $0D51;
-  GL_SUBPIXEL_BITS                      = $0D50;
-  GL_AUX_BUFFERS                        = $0C00;
-  GL_READ_BUFFER                        = $0C02;
-  GL_DRAW_BUFFER                        = $0C01;
-  GL_DOUBLEBUFFER                       = $0C32;
-  GL_STEREO                             = $0C33;
-  GL_BITMAP                             = $1A00;
-  GL_COLOR                              = $1800;
-  GL_DEPTH                              = $1801;
-  GL_STENCIL                            = $1802;
-  GL_DITHER                             = $0BD0;
-  GL_RGB                                = $1907;
-  GL_RGBA                               = $1908;
-
-  // Implementation limits
-  GL_MAX_LIST_NESTING                   = $0B31;
-  GL_MAX_ATTRIB_STACK_DEPTH             = $0D35;
-  GL_MAX_MODELVIEW_STACK_DEPTH          = $0D36;
-  GL_MAX_NAME_STACK_DEPTH               = $0D37;
-  GL_MAX_PROJECTION_STACK_DEPTH         = $0D38;
-  GL_MAX_TEXTURE_STACK_DEPTH            = $0D39;
-  GL_MAX_EVAL_ORDER                     = $0D30;
-  GL_MAX_LIGHTS                         = $0D31;
-  GL_MAX_CLIP_PLANES                    = $0D32;
-  GL_MAX_TEXTURE_SIZE                   = $0D33;
-  GL_MAX_PIXEL_MAP_TABLE                = $0D34;
-  GL_MAX_VIEWPORT_DIMS                  = $0D3A;
-  GL_MAX_CLIENT_ATTRIB_STACK_DEPTH      = $0D3B;
-
-  // Gets
-  GL_ATTRIB_STACK_DEPTH                 = $0BB0;
-  GL_CLIENT_ATTRIB_STACK_DEPTH          = $0BB1;
-  GL_COLOR_CLEAR_VALUE                  = $0C22;
-  GL_COLOR_WRITEMASK                    = $0C23;
-  GL_CURRENT_INDEX                      = $0B01;
-  GL_CURRENT_COLOR                      = $0B00;
-  GL_CURRENT_NORMAL                     = $0B02;
-  GL_CURRENT_RASTER_COLOR               = $0B04;
-  GL_CURRENT_RASTER_DISTANCE            = $0B09;
-  GL_CURRENT_RASTER_INDEX               = $0B05;
-  GL_CURRENT_RASTER_POSITION            = $0B07;
-  GL_CURRENT_RASTER_TEXTURE_COORDS      = $0B06;
-  GL_CURRENT_RASTER_POSITION_VALID      = $0B08;
-  GL_CURRENT_TEXTURE_COORDS             = $0B03;
-  GL_INDEX_CLEAR_VALUE                  = $0C20;
-  GL_INDEX_MODE                         = $0C30;
-  GL_INDEX_WRITEMASK                    = $0C21;
-  GL_MODELVIEW_MATRIX                   = $0BA6;
-  GL_MODELVIEW_STACK_DEPTH              = $0BA3;
-  GL_NAME_STACK_DEPTH                   = $0D70;
-  GL_PROJECTION_MATRIX                  = $0BA7;
-  GL_PROJECTION_STACK_DEPTH             = $0BA4;
-  GL_RENDER_MODE                        = $0C40;
-  GL_RGBA_MODE                          = $0C31;
-  GL_TEXTURE_MATRIX                     = $0BA8;
-  GL_TEXTURE_STACK_DEPTH                = $0BA5;
-  GL_VIEWPORT                           = $0BA2;
-
-  // Evaluators
-  GL_AUTO_NORMAL                        = $0D80;
-  GL_MAP1_COLOR_4                       = $0D90;
-  GL_MAP1_GRID_DOMAIN                   = $0DD0;
-  GL_MAP1_GRID_SEGMENTS                 = $0DD1;
-  GL_MAP1_INDEX                         = $0D91;
-  GL_MAP1_NORMAL                        = $0D92;
-  GL_MAP1_TEXTURE_COORD_1               = $0D93;
-  GL_MAP1_TEXTURE_COORD_2               = $0D94;
-  GL_MAP1_TEXTURE_COORD_3               = $0D95;
-  GL_MAP1_TEXTURE_COORD_4               = $0D96;
-  GL_MAP1_VERTEX_3                      = $0D97;
-  GL_MAP1_VERTEX_4                      = $0D98;
-  GL_MAP2_COLOR_4                       = $0DB0;
-  GL_MAP2_GRID_DOMAIN                   = $0DD2;
-  GL_MAP2_GRID_SEGMENTS                 = $0DD3;
-  GL_MAP2_INDEX                         = $0DB1;
-  GL_MAP2_NORMAL                        = $0DB2;
-  GL_MAP2_TEXTURE_COORD_1               = $0DB3;
-  GL_MAP2_TEXTURE_COORD_2               = $0DB4;
-  GL_MAP2_TEXTURE_COORD_3               = $0DB5;
-  GL_MAP2_TEXTURE_COORD_4               = $0DB6;
-  GL_MAP2_VERTEX_3                      = $0DB7;
-  GL_MAP2_VERTEX_4                      = $0DB8;
-  GL_COEFF                              = $0A00;
-  GL_DOMAIN                             = $0A02;
-  GL_ORDER                              = $0A01;
-
-  // Hints
-  GL_FOG_HINT                           = $0C54;
-  GL_LINE_SMOOTH_HINT                   = $0C52;
-  GL_PERSPECTIVE_CORRECTION_HINT        = $0C50;
-  GL_POINT_SMOOTH_HINT                  = $0C51;
-  GL_POLYGON_SMOOTH_HINT                = $0C53;
-  GL_DONT_CARE                          = $1100;
-  GL_FASTEST                            = $1101;
-  GL_NICEST                             = $1102;
-
-  // Scissor box
-  GL_SCISSOR_TEST                       = $0C11;
-  GL_SCISSOR_BOX                        = $0C10;
-
-  // Pixel Mode / Transfer
-  GL_MAP_COLOR                          = $0D10;
-  GL_MAP_STENCIL                        = $0D11;
-  GL_INDEX_SHIFT                        = $0D12;
-  GL_INDEX_OFFSET                       = $0D13;
-  GL_RED_SCALE                          = $0D14;
-  GL_RED_BIAS                           = $0D15;
-  GL_GREEN_SCALE                        = $0D18;
-  GL_GREEN_BIAS                         = $0D19;
-  GL_BLUE_SCALE                         = $0D1A;
-  GL_BLUE_BIAS                          = $0D1B;
-  GL_ALPHA_SCALE                        = $0D1C;
-  GL_ALPHA_BIAS                         = $0D1D;
-  GL_DEPTH_SCALE                        = $0D1E;
-  GL_DEPTH_BIAS                         = $0D1F;
-  GL_PIXEL_MAP_S_TO_S_SIZE              = $0CB1;
-  GL_PIXEL_MAP_I_TO_I_SIZE              = $0CB0;
-  GL_PIXEL_MAP_I_TO_R_SIZE              = $0CB2;
-  GL_PIXEL_MAP_I_TO_G_SIZE              = $0CB3;
-  GL_PIXEL_MAP_I_TO_B_SIZE              = $0CB4;
-  GL_PIXEL_MAP_I_TO_A_SIZE              = $0CB5;
-  GL_PIXEL_MAP_R_TO_R_SIZE              = $0CB6;
-  GL_PIXEL_MAP_G_TO_G_SIZE              = $0CB7;
-  GL_PIXEL_MAP_B_TO_B_SIZE              = $0CB8;
-  GL_PIXEL_MAP_A_TO_A_SIZE              = $0CB9;
-  GL_PIXEL_MAP_S_TO_S                   = $0C71;
-  GL_PIXEL_MAP_I_TO_I                   = $0C70;
-  GL_PIXEL_MAP_I_TO_R                   = $0C72;
-  GL_PIXEL_MAP_I_TO_G                   = $0C73;
-  GL_PIXEL_MAP_I_TO_B                   = $0C74;
-  GL_PIXEL_MAP_I_TO_A                   = $0C75;
-  GL_PIXEL_MAP_R_TO_R                   = $0C76;
-  GL_PIXEL_MAP_G_TO_G                   = $0C77;
-  GL_PIXEL_MAP_B_TO_B                   = $0C78;
-  GL_PIXEL_MAP_A_TO_A                   = $0C79;
-  GL_PACK_ALIGNMENT                     = $0D05;
-  GL_PACK_LSB_FIRST                     = $0D01;
-  GL_PACK_ROW_LENGTH                    = $0D02;
-  GL_PACK_SKIP_PIXELS                   = $0D04;
-  GL_PACK_SKIP_ROWS                     = $0D03;
-  GL_PACK_SWAP_BYTES                    = $0D00;
-  GL_UNPACK_ALIGNMENT                   = $0CF5;
-  GL_UNPACK_LSB_FIRST                   = $0CF1;
-  GL_UNPACK_ROW_LENGTH                  = $0CF2;
-  GL_UNPACK_SKIP_PIXELS                 = $0CF4;
-  GL_UNPACK_SKIP_ROWS                   = $0CF3;
-  GL_UNPACK_SWAP_BYTES                  = $0CF0;
-  GL_ZOOM_X                             = $0D16;
-  GL_ZOOM_Y                             = $0D17;
-
-  // Texture mapping
-  GL_TEXTURE_ENV                        = $2300;
-  GL_TEXTURE_ENV_MODE                   = $2200;
-  GL_TEXTURE_1D                         = $0DE0;
-  GL_TEXTURE_2D                         = $0DE1;
-  GL_TEXTURE_WRAP_S                     = $2802;
-  GL_TEXTURE_WRAP_T                     = $2803;
-  GL_TEXTURE_MAG_FILTER                 = $2800;
-  GL_TEXTURE_MIN_FILTER                 = $2801;
-  GL_TEXTURE_ENV_COLOR                  = $2201;
-  GL_TEXTURE_GEN_S                      = $0C60;
-  GL_TEXTURE_GEN_T                      = $0C61;
-  GL_TEXTURE_GEN_MODE                   = $2500;
-  GL_TEXTURE_BORDER_COLOR               = $1004;
-  GL_TEXTURE_WIDTH                      = $1000;
-  GL_TEXTURE_HEIGHT                     = $1001;
-  GL_TEXTURE_BORDER                     = $1005;
-  GL_TEXTURE_COMPONENTS                 = $1003;
-  GL_TEXTURE_RED_SIZE                   = $805C;
-  GL_TEXTURE_GREEN_SIZE                 = $805D;
-  GL_TEXTURE_BLUE_SIZE                  = $805E;
-  GL_TEXTURE_ALPHA_SIZE                 = $805F;
-  GL_TEXTURE_LUMINANCE_SIZE             = $8060;
-  GL_TEXTURE_INTENSITY_SIZE             = $8061;
-  GL_NEAREST_MIPMAP_NEAREST             = $2700;
-  GL_NEAREST_MIPMAP_LINEAR              = $2702;
-  GL_LINEAR_MIPMAP_NEAREST              = $2701;
-  GL_LINEAR_MIPMAP_LINEAR               = $2703;
-  GL_OBJECT_LINEAR                      = $2401;
-  GL_OBJECT_PLANE                       = $2501;
-  GL_EYE_LINEAR                         = $2400;
-  GL_EYE_PLANE                          = $2502;
-  GL_SPHERE_MAP                         = $2402;
-  GL_DECAL                              = $2101;
-  GL_MODULATE                           = $2100;
-  GL_NEAREST                            = $2600;
-  GL_REPEAT                             = $2901;
-  GL_CLAMP                              = $2900;
-  GL_S                                  = $2000;
-  GL_T                                  = $2001;
-  GL_R                                  = $2002;
-  GL_Q                                  = $2003;
-  GL_TEXTURE_GEN_R                      = $0C62;
-  GL_TEXTURE_GEN_Q                      = $0C63;
-
-  // GL 1.1 texturing
-  GL_PROXY_TEXTURE_1D                   = $8063;
-  GL_PROXY_TEXTURE_2D                   = $8064;
-  GL_TEXTURE_PRIORITY                   = $8066;
-  GL_TEXTURE_RESIDENT                   = $8067;
-  GL_TEXTURE_BINDING_1D                 = $8068;
-  GL_TEXTURE_BINDING_2D                 = $8069;
-  GL_TEXTURE_INTERNAL_FORMAT            = $1003;
-
-
-  // GL 1.2 texturing
-  GL_PACK_SKIP_IMAGES                   = $806B;
-  GL_PACK_IMAGE_HEIGHT                  = $806C;
-  GL_UNPACK_SKIP_IMAGES                 = $806D;
-  GL_UNPACK_IMAGE_HEIGHT                = $806E;
-  GL_TEXTURE_3D                         = $806F;
-  GL_PROXY_TEXTURE_3D                   = $8070;
-  GL_TEXTURE_DEPTH                      = $8071;
-  GL_TEXTURE_WRAP_R                     = $8072;
-  GL_MAX_3D_TEXTURE_SIZE                = $8073;
-  GL_TEXTURE_BINDING_3D                 = $806A;
-
-  // Internal texture formats (GL 1.1)
-  GL_ALPHA4                             = $803B;
-  GL_ALPHA8                             = $803C;
-  GL_ALPHA12                            = $803D;
-  GL_ALPHA16                            = $803E;
-  GL_LUMINANCE4                         = $803F;
-  GL_LUMINANCE8                         = $8040;
-  GL_LUMINANCE12                        = $8041;
-  GL_LUMINANCE16                        = $8042;
-  GL_LUMINANCE4_ALPHA4                  = $8043;
-  GL_LUMINANCE6_ALPHA2                  = $8044;
-  GL_LUMINANCE8_ALPHA8                  = $8045;
-  GL_LUMINANCE12_ALPHA4                 = $8046;
-  GL_LUMINANCE12_ALPHA12                = $8047;
-  GL_LUMINANCE16_ALPHA16                = $8048;
-  GL_INTENSITY                          = $8049;
-  GL_INTENSITY4                         = $804A;
-  GL_INTENSITY8                         = $804B;
-  GL_INTENSITY12                        = $804C;
-  GL_INTENSITY16                        = $804D;
-  GL_R3_G3_B2                           = $2A10;
-  GL_RGB4                               = $804F;
-  GL_RGB5                               = $8050;
-  GL_RGB8                               = $8051;
-  GL_RGB10                              = $8052;
-  GL_RGB12                              = $8053;
-  GL_RGB16                              = $8054;
-  GL_RGBA2                              = $8055;
-  GL_RGBA4                              = $8056;
-  GL_RGB5_A1                            = $8057;
-  GL_RGBA8                              = $8058;
-  GL_RGB10_A2                           = $8059;
-  GL_RGBA12                             = $805A;
-  GL_RGBA16                             = $805B;
-
-  // Utility
-  GL_VENDOR                             = $1F00;
-  GL_RENDERER                           = $1F01;
-  GL_VERSION                            = $1F02;
-  GL_EXTENSIONS                         = $1F03;
-
-  // Errors
-  GL_INVALID_VALUE                      = $0501;
-  GL_INVALID_ENUM                       = $0500;
-  GL_INVALID_OPERATION                  = $0502;
-  GL_STACK_OVERFLOW                     = $0503;
-  GL_STACK_UNDERFLOW                    = $0504;
-  GL_OUT_OF_MEMORY                      = $0505;
-
-  // OpenGL 1.2
-  GL_RESCALE_NORMAL                     = $803A;
-  GL_CLAMP_TO_EDGE                      = $812F;
-  GL_MAX_ELEMENTS_VERTICES              = $F0E8;
-  GL_MAX_ELEMENTS_INDICES               = $F0E9;
-  GL_BGR                                = $80E0;
-  GL_BGRA                               = $80E1;
-  GL_UNSIGNED_BYTE_3_3_2                = $8032;
-  GL_UNSIGNED_BYTE_2_3_3_REV            = $8362;
-  GL_UNSIGNED_SHORT_5_6_5               = $8363;
-  GL_UNSIGNED_SHORT_5_6_5_REV           = $8364;
-  GL_UNSIGNED_SHORT_4_4_4_4             = $8033;
-  GL_UNSIGNED_SHORT_4_4_4_4_REV         = $8365;
-  GL_UNSIGNED_SHORT_5_5_5_1             = $8034;
-  GL_UNSIGNED_SHORT_1_5_5_5_REV         = $8366;
-  GL_UNSIGNED_INT_8_8_8_8               = $8035;
-  GL_UNSIGNED_INT_8_8_8_8_REV           = $8367;
-  GL_UNSIGNED_INT_10_10_10_2            = $8036;
-  GL_UNSIGNED_INT_2_10_10_10_REV        = $8368;
-  GL_LIGHT_MODEL_COLOR_CONTROL          = $81F8;
-  GL_SINGLE_COLOR                       = $81F9;
-  GL_SEPARATE_SPECULAR_COLOR            = $81FA;
-  GL_TEXTURE_MIN_LOD                    = $813A;
-  GL_TEXTURE_MAX_LOD                    = $813B;
-  GL_TEXTURE_BASE_LEVEL                 = $813C;
-  GL_TEXTURE_MAX_LEVEL                  = $813D;
-
-
-// -------------------------------------------------------------------
-//   GL procedures and functions
-// -------------------------------------------------------------------
-
-var
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-  // Miscellaneous
-  glClearIndex: procedure(c: GLfloat);
-  glClearColor: procedure(red, green, blue, alpha: GLclampf);
-  glClear: procedure(mask: GLbitfield);
-  glIndexMask: procedure(mask: LongWord);
-  glColorMask: procedure(red, green, blue, alpha: Boolean);
-  glAlphaFunc: procedure(func: GLenum; ref: GLclampf);
-  glBlendFunc: procedure(sfactor, dfactor: GLenum);
-  glLogicOp: procedure(opcode: GLenum);
-  glCullFace: procedure(mode: GLenum);
-  glFrontFace: procedure(mode: GLenum);
-  glPointSize: procedure(size: GLfloat);
-  glLineWidth: procedure(width: GLfloat);
-  glLineStipple: procedure(factor: LongInt; pattern: Word);
-  glPolygonMode: procedure(face, mode: GLenum);
-  glPolygonOffset: procedure(factor, units: GLfloat);
-  glPolygonStipple: procedure(var mask: Byte);
-  glGetPolygonStipple: procedure(var mask: Byte);
-  glEdgeFlag: procedure(flag: Boolean);
-  glEdgeFlagv: procedure(var flag: Boolean);
-  glScissor: procedure(x, y, width, height: LongInt);
-  glClipPlane: procedure(plane: GLenum; var equation: GLdouble);
-  glGetClipPlane: procedure(plane: GLenum; var equation: GLdouble);
-  glDrawBuffer: procedure(mode: GLenum);
-  glReadBuffer: procedure(mode: GLenum);
-  glEnable: procedure(cap: LongInt);
-  glDisable: procedure(cap: LongInt);
-  glIsEnabled: function(cap: GLenum): Boolean;
-  glEnableClientState: procedure(cap: GLenum);  // 1.1
-  glDisableClientState: procedure(cap: GLenum);  // 1.1
-  glGetBooleanv: procedure(pname: GLenum; var params: Boolean);
-  glGetDoublev: procedure(pname: GLenum; var params: GLdouble);
-  glGetFloatv: procedure(pname: GLenum; var params: GLfloat);
-  glGetIntegerv: procedure(pname: GLenum; var params: LongInt);
-  glPushAttrib: procedure(mask: GLbitfield);
-  glPopAttrib: procedure;
-  glPushClientAttrib: procedure(mask: GLbitfield);  // 1.1
-  glPopClientAttrib: procedure;  // 1.1
-  glRenderMode: function(mode: GLenum): LongInt;
-  glGetError: function: GLenum;
-  glGetString: function(name: GLenum): PChar;
-  glFinish: procedure;
-  glFlush: procedure;
-  glHint: procedure(target, mode: GLenum);
-
-
-  // Depth Buffer
-  glClearDepth: procedure(depth: GLclampd);
-  glDepthFunc: procedure(func: LongInt);
-  glDepthMask: procedure(flag: Boolean);
-  glDepthRange: procedure(near_val, far_val: GLclampd);
-
-  // Accumulation Buffer
-  glClearAccum: procedure(red, green, blue, alpha: GLfloat);
-  glAccum: procedure(op: GLenum; value: GLfloat);
-
-  // Tranformation
-  glMatrixMode: procedure(mode: GLenum);
-  glOrtho: procedure(left, right, bottom, top, near_val, far_val: GLdouble);
-  glFrustum: procedure(left, right, bottom, top, near_val, far_val: GLdouble);
-  glViewport: procedure(x, y, width, height: LongInt);
-  glPushMatrix: procedure;
-  glPopMatrix: procedure;
-  glLoadIdentity: procedure;
-  glLoadMatrixd: procedure(var m: GLdouble);
-  glLoadMatrixf: procedure(var m: PGLfloat);
-  glMultMatrixd: procedure(var m: GLdouble);
-  glMultMatrixf: procedure(var m: GLfloat);
-  glRotated: procedure(angle, x, y, z: GLdouble);
-  glRotatef: procedure(angle, x, y, z: GLfloat);
-  glScaled: procedure(x, y, z: GLdouble);
-  glScalef: procedure(x, y, z: GLfloat);
-  glTranslated: procedure(x, y, z: GLdouble);
-  glTranslatef: procedure(x, y, z: GLfloat);
-
-  // Display Lists
-  glIsList: function(list: LongWord): Boolean;
-  glDeleteLists: procedure(list: LongWord; range: LongInt);
-  glGenLists: function(range: LongInt): LongWord;
-  glNewList: procedure(list: LongWord; mode: GLenum);
-  glEndList: procedure;
-  glCallList: procedure(list: LongWord);
-  glCallLists: procedure(n: LongInt; AType: GLenum; var lists);
-  glListBase: procedure(base: LongWord);
-
-  // Drawing Functions
-  glBegin: procedure(mode: GLenum);
-  glEnd: procedure;
-  glVertex2d: procedure(x, y: GLdouble);
-  glVertex2f: procedure(x, y: GLfloat);
-  glVertex2i: procedure(x, y: LongInt);
-  glVertex2s: procedure(x, y: SmallInt);
-  glVertex3d: procedure(x, y, z: GLdouble);
-  glVertex3f: procedure(x, y, z: GLfloat);
-  glVertex3i: procedure(x, y, z: LongInt);
-  glVertex3s: procedure(x, y, z: SmallInt);
-  glVertex4d: procedure(x, y, z, w: GLdouble);
-  glVertex4f: procedure(x, y, z, w: GLfloat);
-  glVertex4i: procedure(x, y, z, w: LongInt);
-  glVertex4s: procedure(x, y, z, w: SmallInt);
-  glVertex2dv: procedure(var v: GLdouble);
-  glVertex2fv: procedure(var v: GLfloat);
-  glVertex2iv: procedure(var v: LongInt);
-  glVertex2sv: procedure(var v: SmallInt);
-  glVertex3dv: procedure(var v: GLdouble);
-  glVertex3fv: procedure(var v: GLfloat);
-  glVertex3iv: procedure(var v: LongInt);
-  glVertex3sv: procedure(var v: SmallInt);
-  glVertex4dv: procedure(var v: GLdouble);
-  glVertex4fv: procedure(var v: GLfloat);
-  glVertex4iv: procedure(var v: LongInt);
-  glVertex4sv: procedure(var v: SmallInt);
-  glNormal3b: procedure(nx, ny, nz: Byte);
-  glNormal3d: procedure(nx, ny, nz: GLdouble);
-  glNormal3f: procedure(nx, ny, nz: GLfloat);
-  glNormal3i: procedure(nx, ny, nz: LongInt);
-  glNormal3s: procedure(nx, ny, nz: SmallInt);
-  glNormal3bv: procedure(var v: ShortInt);
-  glNormal3dv: procedure(var v: GLdouble);
-  glNormal3fv: procedure(var v: GLfloat);
-  glNormal3iv: procedure(var v: LongInt);
-  glNormal3sv: procedure(var v: SmallInt);
-  glIndexd: procedure(c: GLdouble);
-  glIndexf: procedure(c: GLfloat);
-  glIndexi: procedure(c: LongInt);
-  glIndexs: procedure(c: SmallInt);
-  glIndexub: procedure(c: Byte);  // 1.1
-  glIndexdv: procedure(var c: GLdouble);
-  glIndexfv: procedure(var c: GLfloat);
-  glIndexiv: procedure(var c: LongInt);
-  glIndexsv: procedure(var c: SmallInt);
-  glIndexubv: procedure(var c: Byte);  // 1.1
-  glColor3b : procedure(red, green, blue: ShortInt);
-  glColor3d : procedure(red, green, blue: GLdouble);
-  glColor3f : procedure(red, green, blue: GLfloat);
-  glColor3i : procedure(red, green, blue: LongInt);
-  glColor3s : procedure(red, green, blue: SmallInt);
-  glColor3ub: procedure(red, green, blue: Byte);
-  glColor3ui: procedure(red, green, blue: LongWord);
-  glColor3us: procedure(red, green, blue: Word);
-  glColor4b : procedure(red, green, blue, alpha: ShortInt);
-  glColor4d : procedure(red, green, blue, alpha: GLdouble);
-  glColor4f : procedure(red, green, blue, alpha: GLfloat);
-  glColor4i : procedure(red, green, blue, alpha: LongInt);
-  glColor4s : procedure(red, green, blue, alpha: SmallInt);
-  glColor4ub: procedure(red, green, blue, alpha: Byte);
-  glColor4ui: procedure(red, green, blue, alpha: LongWord);
-  glColor4us: procedure(red, green, blue, alpha: Word);
-  glColor3bv : procedure(var v: ShortInt);
-  glColor3dv : procedure(var v: GLdouble);
-  glColor3fv : procedure(var v: GLfloat);
-  glColor3iv : procedure(var v: LongInt);
-  glColor3sv : procedure(var v: SmallInt);
-  glColor3ubv: procedure(var v: Byte);
-  glColor3uiv: procedure(var v: LongWord);
-  glColor3usv: procedure(var v: Word);
-  glColor4bv : procedure(var v: ShortInt);
-  glColor4dv : procedure(var v: GLdouble);
-  glColor4fv : procedure(var v: GLfloat);
-  glColor4iv : procedure(var v: LongInt);
-  glColor4sv : procedure(var v: SmallInt);
-  glColor4ubv: procedure(var v: Byte);
-  glColor4uiv: procedure(var v: LongWord);
-  glColor4usv: procedure(var v: Word);
-  glTexCoord1d: procedure(s: GLdouble);
-  glTexCoord1f: procedure(s: GLfloat);
-  glTexCoord1i: procedure(s: LongInt);
-  glTexCoord1s: procedure(s: SmallInt);
-  glTexCoord2d: procedure(s, t: GLdouble);
-  glTexCoord2f: procedure(s, t: GLfloat);
-  glTexCoord2i: procedure(s, t: LongInt);
-  glTexCoord2s: procedure(s, t: SmallInt);
-  glTexCoord3d: procedure(s, t, r: GLdouble);
-  glTexCoord3f: procedure(s, t, r: GLfloat);
-  glTexCoord3i: procedure(s, t, r: LongInt);
-  glTexCoord3s: procedure(s, t, r: SmallInt);
-  glTexCoord4d: procedure(s, t, r, q: GLdouble);
-  glTexCoord4f: procedure(s, t, r, q: GLfloat);
-  glTexCoord4i: procedure(s, t, r, q: LongInt);
-  glTexCoord4s: procedure(s, t, r, q: SmallInt);
-  glTexCoord1dv: procedure(var v: GLdouble);
-  glTexCoord1fv: procedure(var v: GLfloat);
-  glTexCoord1iv: procedure(var v: LongInt);
-  glTexCoord1sv: procedure(var v: SmallInt);
-  glTexCoord2dv: procedure(var v: GLdouble);
-  glTexCoord2fv: procedure(var v: GLfloat);
-  glTexCoord2iv: procedure(var v: LongInt);
-  glTexCoord2sv: procedure(var v: SmallInt);
-  glTexCoord3dv: procedure(var v: GLdouble);
-  glTexCoord3fv: procedure(var v: GLfloat);
-  glTexCoord3iv: procedure(var v: LongInt);
-  glTexCoord3sv: procedure(var v: SmallInt);
-  glTexCoord4dv: procedure(var v: GLdouble);
-  glTexCoord4fv: procedure(var v: GLfloat);
-  glTexCoord4iv: procedure(var v: LongInt);
-  glTexCoord4sv: procedure(var v: SmallInt);
-  glRasterPos2d: procedure(x, y: GLdouble);
-  glRasterPos2f: procedure(x, y: GLfloat);
-  glRasterPos2i: procedure(x, y: LongInt);
-  glRasterPos2s: procedure(x, y: SmallInt);
-  glRasterPos3d: procedure(x, y, z: GLdouble);
-  glRasterPos3f: procedure(x, y, z: GLfloat);
-  glRasterPos3i: procedure(x, y, z: LongInt);
-  glRasterPos3s: procedure(x, y, z: SmallInt);
-  glRasterPos4d: procedure(x, y, z, w: GLdouble);
-  glRasterPos4f: procedure(x, y, z, w: GLfloat);
-  glRasterPos4i: procedure(x, y, z, w: LongInt);
-  glRasterPos4s: procedure(x, y, z, w: SmallInt);
-  glRasterPos2dv: procedure(var v: GLdouble);
-  glRasterPos2fv: procedure(var v: GLfloat);
-  glRasterPos2iv: procedure(var v: LongInt);
-  glRasterPos2sv: procedure(var v: SmallInt);
-  glRasterPos3dv: procedure(var v: GLdouble);
-  glRasterPos3fv: procedure(var v: GLfloat);
-  glRasterPos3iv: procedure(var v: LongInt);
-  glRasterPos3sv: procedure(var v: SmallInt);
-  glRasterPos4dv: procedure(var v: GLdouble);
-  glRasterPos4fv: procedure(var v: GLfloat);
-  glRasterPos4iv: procedure(var v: LongInt);
-  glRasterPos4sv: procedure(var v: SmallInt);
-  glRectd: procedure(x1, y1, x2, y2: GLdouble);
-  glRectf: procedure(x1, y1, x2, y2: GLfloat);
-  glRecti: procedure(x1, y1, x2, y2: LongInt);
-  glRects: procedure(x1, y1, x2, y2: SmallInt);
-  glRectdv: procedure(var v1, v2: GLdouble);
-  glRectfv: procedure(var v1, v2: GLfloat);
-  glRectiv: procedure(var v1, v2: LongInt);
-  glRectsv: procedure(var v1, v2: SmallInt);
-
-  // Vertex Arrays (1.1)
-  glVertexPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr);
-  glNormalPointer: procedure(AType: GLenum; stride: LongInt; var ptr);
-  glColorPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr);
-  glIndexPointer: procedure(AType: GLenum; stride: LongInt; var ptr);
-  glTexCoordPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr);
-  glEdgeFlagPointer: procedure(stride: LongInt; var ptr);
-  glGetPointerv: procedure(pname: GLenum; var params: Pointer);
-  glArrayElement: procedure(i: LongInt);
-  glDrawArrays: procedure(mode: GLenum; first, count: LongInt);
-  glDrawElements: procedure(mode: GLenum; count: Integer; AType: GLenum; var indices);
-  glInterleavedArrays: procedure(format: GLenum; stride: LongInt; var pointer);
-
-  // Lighting
-  glShadeModel: procedure(mode: GLenum);
-  glLightf: procedure(light, pname: GLenum; param: GLfloat);
-  glLighti: procedure(light, pname: GLenum; param: LongInt);
-  glLightfv: procedure(light, pname: GLenum; var params: GLfloat);
-  glLightiv: procedure(light, pname: GLenum; var params: LongInt);
-  glGetLightfv: procedure(light, pname: GLenum; var params: GLfloat);
-  glGetLightiv: procedure(light, pname: GLenum; var params: LongInt);
-  glLightModelf: procedure(pname: GLenum; param: GLfloat);
-  glLightModeli: procedure(pname: GLenum; param: LongInt);
-  glLightModelfv: procedure(pname: GLenum; var params: GLfloat);
-  glLightModeliv: procedure(pname: GLenum; var param: LongInt);
-  glMaterialf: procedure(face, pname: GLenum; param: GLfloat);
-  glMateriali: procedure(face, pname: GLenum; param: LongInt);
-  glMaterialfv: procedure(face, pname: GLenum; var params: GLfloat);
-  glMaterialiv: procedure(face, pname: GLenum; var params: LongInt);
-  glGetMaterialfv: procedure(face, pname: GLenum; var params: GLfloat);
-  glGetMaterialiv: procedure(face, pname: GLenum; var params: LongInt);
-  glColorMaterial: procedure(face, mode: GLenum);
-
-  // Raster Functions
-  glPixelZoom: procedure(xfactor, yfactor: GLfloat);
-  glPixelStoref: procedure(pname: GLenum; param: GLfloat);
-  glPixelStorei: procedure(pname: GLenum; param: LongInt);
-  glPixelTransferf: procedure(pname: GLenum; param: GLfloat);
-  glPixelTransferi: procedure(pname: GLenum; param: LongInt);
-  glPixelMapfv: procedure(map: GLenum; mapsize: LongInt; var values: GLfloat);
-  glPixelMapuiv: procedure(map: GLenum; mapsize: LongInt; var values: LongWord);
-  glPixelMapusv: procedure(map: GLenum; mapsize: LongInt; var values: Word);
-  glGetPixelMapfv: procedure(map: GLenum; var values: GLfloat);
-  glGetPixelMapuiv: procedure(map: GLenum; var values: LongWord);
-  glGetPixelMapusv: procedure(map: GLenum; var values: Word);
-  glBitmap: procedure(width, height: LongInt; xorig, yorig, xmove, ymove: GLfloat; var bitmap);
-  glReadPixels: procedure(x, y, width, height: LongInt; format, AType: GLenum; var pixels);
-  glDrawPixels: procedure(width, height: LongInt; format, AType: GLenum; var pixels);
-  glCopyPixels: procedure(x, y, width, height: LongInt; AType: GLenum);
-
-  // Stenciling
-  glStencilFunc: procedure(func: GLenum; ref: LongInt; mask: LongWord);
-  glStencilMask: procedure(mask: LongWord);
-  glStencilOp: procedure(fail, zfail, zpass: GLenum);
-  glClearStencil: procedure(s: LongInt);
-
-  // Texture Mapping
-  glTexGend: procedure(cord, pname: GLenum; param: GLdouble);
-  glTexGenf: procedure(cord, pname: GLenum; param: GLfloat);
-  glTexGeni: procedure(cord, pname: GLenum; param: LongInt);
-  glTexGendv: procedure(cord, pname: GLenum; var params: GLdouble);
-  glTexGenfv: procedure(cord, pname: GLenum; var params: GLfloat);
-  glTexGeniv: procedure(cord, pname: GLenum; var params: LongInt);
-  glGetTexGendv: procedure(cord, pname: GLenum; var params: GLdouble);
-  glGetTexGenfv: procedure(cord, pname: GLenum; var params: GLfloat);
-  glGetTexGeniv: procedure(cord, pname: GLenum; var params: LongInt);
-  glTexEnvf: procedure(target, pname: GLenum; param: GLfloat);
-  glTexEnvi: procedure(target, pname: GLenum; param: LongInt);
-  glTexEnvfv: procedure(target, pname: GLenum; var params: GLfloat);
-  glTexEnviv: procedure(target, pname: GLenum; var params: LongInt);
-  glGetTexEnvfv: procedure(target, pname: GLenum; var params: GLfloat);
-  glGetTexEnviv: procedure(target, pname: GLenum; var params: LongInt);
-  glTexParameterf: procedure(target, pname: GLenum; param: GLfloat);
-  glTexParameteri: procedure(target, pname: GLenum; param: LongInt);
-  glTexParameterfv: procedure(target, pname: GLenum; var params: GLfloat);
-  glTexParameteriv: procedure(target, pname: GLenum; var params: LongInt);
-  glGetTexParameterfv: procedure(target, pname: GLenum; var params: GLfloat);
-  glGetTexParameteriv: procedure(target, pname: GLenum; var params: LongInt);
-  glGetTexLevelParameterfv: procedure(target: GLenum; level: LongInt; pname: GLenum; var params: GLfloat);
-  glGetTexLevelParameteriv: procedure(target: GLenum; level: LongInt; pname: GLenum; var params: LongInt);
-  glTexImage1D: procedure(target: GLenum; level, internalFormat, width, border: LongInt; format, AType: GLenum; var pixels);
-  glTexImage2D: procedure(target: GLenum; level, internalFormat, width, height, border: LongInt; format, AType: GLenum; var pixels);
-  glGetTexImage: procedure(target: GLenum; level: LongInt; format, AType: GLenum; var pixels);
-  // 1.1 functions:
-  glGenTextures: procedure(n: LongInt; var textures: LongWord);
-  glDeleteTextures: procedure(n: LongInt; var textures: LongWord);
-  glBindTexture: procedure(target: GLenum; texture: LongWord);
-  glPrioritizeTextures: procedure(n: LongInt; var textures: LongWord; var priorities: GLclampf);
-  glAreTexturesResident: function(n: LongInt; var textures: LongWord; var residences: Boolean): Boolean;
-  glIsTexture: function(texture: LongWord): Boolean;
-  glTexSubImage1D: procedure(target: GLenum; level, xoffset, width: LongInt; format, AType: GLenum; var pixels);
-  glTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, width, height: LongInt; format, AType: GLenum; var pixels);
-  glCopyTexImage1D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, border: LongInt);
-  glCopyTexImage2D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, height, border: LongInt);
-  glCopyTexSubImage1D: procedure(target: GLenum; level, xoffset, x, y, width: LongInt);
-  glCopyTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, x, y, width, height: LongInt);
-
-  // Evaluators
-  glMap1d: procedure(target: GLenum; u1, u2: GLdouble; stride, order: LongInt; var points: GLdouble);
-  glMap1f: procedure(target: GLenum; u1, u2: GLfloat; stride, order: LongInt; var points: GLfloat);
-  glMap2d: procedure(target: GLenum; u1, u2: GLdouble; ustride, uorder: LongInt; v1, v2: GLdouble; vstride, vorder: LongInt; var points: GLdouble);
-  glMap2f: procedure(target: GLenum; u1, u2: GLfloat; ustride, uorder: LongInt; v1, v2: GLfloat; vstride, vorder: LongInt; var points: GLfloat);
-  glGetMapdv: procedure(target, query: GLenum; var v: GLdouble);
-  glGetMapfv: procedure(target, query: GLenum; var v: GLfloat);
-  glGetMapiv: procedure(target, query: GLenum; var v: LongInt);
-  glEvalCoord1d: procedure(u: GLdouble);
-  glEvalCoord1f: procedure(u: GLfloat);
-  glEvalCoord1dv: procedure(var u: GLdouble);
-  glEvalCoord1fv: procedure(var u: GLfloat);
-  glEvalCoord2d: procedure(u, v: GLdouble);
-  glEvalCoord2f: procedure(u, v: GLfloat);
-  glEvalCoord2dv: procedure(var u, v: GLdouble);
-  glEvalCoord2fv: procedure(var u, v: GLfloat);
-  glMapGrid1d: procedure(un: LongInt; u1, u2: GLdouble);
-  glMapGrid1f: procedure(un: LongInt; u1, u2: GLfloat);
-  glMapGrid2d: procedure(un: LongInt; u1, u2: GLdouble; vn: LongInt; v1, v2: GLdouble);
-  glMapGrid2f: procedure(un: LongInt; u1, u2: GLfloat; vn: LongInt; v1, v2: GLfloat);
-  glEvalPoint1: procedure(i: LongInt);
-  glEvalPoint2: procedure(i, j: LongInt);
-  glEvalMesh1: procedure(mode: GLenum; i1, i2: LongInt);
-  glEvalMesh2: procedure(mode: GLenum; i1, i2, j1, j2: LongInt);
-
-  // Fog
-  glFogf: procedure(pname: GLenum; param: GLfloat);
-  glFogi: procedure(pname: GLenum; param: LongInt);
-  glFogfv: procedure(pname: GLenum; var params: GLfloat);
-  glFogiv: procedure(pname: GLenum; var params: LongInt);
-
-  // Selection and Feedback
-  glFeedbackBuffer: procedure(size: LongInt; AType: GLenum; var buffer: GLfloat);
-  glPassThrough: procedure(token: GLfloat);
-  glSelectBuffer: procedure(size: LongInt; var buffer: LongWord);
-  glInitNames: procedure;
-  glLoadName: procedure(name: LongWord);
-  glPushName: procedure(name: LongWord);
-  glPopName: procedure;
-%END

+ 0 - 166
packages/opengl/build/gl_linux.tpl

@@ -1,166 +0,0 @@
-{
-  $Id$
-  Translation of the Mesa GL, GLU and GLX headers for Free Pascal, Linux version
-  Copyright (C) 1999-2000 Sebastian Guenther, [email protected]
-
-
-  Mesa 3-D graphics library
-  Version:  3.1
-
-  Copyright (C) 1999  Brian Paul   All Rights Reserved.
-
-  Permission is hereby granted, free of charge, to any person obtaining a
-  copy of this software and associated documentation files (the "Software"),
-  to deal in the Software without restriction, including without limitation
-  the rights to use, copy, modify, merge, publish, distribute, sublicense,
-  and/or sell copies of the Software, and to permit persons to whom the
-  Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included
-  in all copies or substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-  BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-  AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-}
-
-
-unit GL;
-
-{$MODE delphi}  // objfpc would not work because of direct proc var assignments
-
-interface
-
-uses X, XLib, XUtil;
-
-// ===================================================================
-//   Unit specific extensions
-// ===================================================================
-
-function InitGLFromLibrary(const libname: PChar): Boolean;
-function InitGLUFromLibrary(const libname: PChar): Boolean;
-// Requires that the GL library has already been initialized:
-function InitGLX: Boolean;
-
-// determines automatically which libraries to use:
-function InitGL: Boolean;
-function InitGLU: Boolean;
-
-
-var
-  GLInitialized, GLUInitialized, GLXInitialized: Boolean;
-
-  { Set the following value to True if you want to have a list of all
-    unresolved GL/GLU/GLX functions dumped to the console }
-  GLDumpUnresolvedFunctions: Boolean;
-
-
-%GLDecls
-
-%GLProcs1
-
-const
-%GLExtDecls
-
-%GLExtProcs1
-
-
-%GLUDecls
-%GLUProcs1
-
-
-%GLXDecls
-%GLXProcs1
-
-
-// ===================================================================
-// ===================================================================
-
-implementation
-
-{$LINKLIB m}
-
-function dlopen(AFile: PChar; mode: LongInt): Pointer; external 'dl';
-function dlclose(handle: Pointer): LongInt; external 'dl';
-function dlsym(handle: Pointer; name: PChar): Pointer; external 'dl';
-
-function LoadLibrary(const name: PChar): Pointer;
-begin
-  Result := dlopen(name, $101 {RTLD_GLOBAL or RTLD_LAZY});
-end;
-
-function GetProc(handle: Pointer; const name: PChar): Pointer;
-begin
-  Result := dlsym(handle, name);
-  if not Assigned(Result) and GLDumpUnresolvedFunctions then
-    WriteLn('Unresolved: ', name);
-end;
-
-var
-  libGL, libGLU, libGLX: Pointer;
-
-function InitGLFromLibrary(const libname: PChar): Boolean;
-begin
-  Result := False;
-  libGL := LoadLibrary(libname);
-  if not Assigned(libGL) then
-    exit;
-
-%GLProcs2
-#  // Extensions:
-#%GLExtProcs2
-
-  GLInitialized := True;
-  Result := True;
-end;
-
-function InitGLUFromLibrary(const libname: PChar): Boolean;
-begin
-  Result := False;
-  libGLU := LoadLibrary(libname);
-  if not Assigned(libGLU) then
-    exit;
-
-%GLUProcs2
-
-  GLUInitialized := True;
-  Result := True;
-end;
-
-function InitGLX: Boolean;
-begin
-  Result := False;
-  if not Assigned(libGL) then
-    exit;
-
-%GLXProcs2
-
-  GLXInitialized := True;
-  Result := True;
-end;
-
-function InitGL: Boolean;
-begin
-  Result := InitGLFromLibrary('libGL.so') or InitGLFromLibrary('libGL.so.1') or
-    InitGLFromLibrary('libMesaGL.so.3');
-end;
-
-function InitGLU: Boolean;
-begin
-  Result := InitGLUFromLibrary('libGLU.so') or
-    InitGLUFromLibrary('libGLU.so.1') or InitGLUFromLibrary('libMesaGLU.so.3');
-end;
-
-
-finalization
-  // Free all loaded libraries
-  if Assigned(libGLX) then
-    dlclose(libGLX);
-  if Assigned(libGLU) then
-    dlclose(libGLU);
-  if Assigned(libGL) then
-    dlclose(libGL);
-end.

+ 0 - 299
packages/opengl/build/glext.def

@@ -1,299 +0,0 @@
-# This is the definition file for all GL extension stuff
-
-%COPY_INTERFACE
-// -------------------------------------------------------
-//   GL extensions constants
-// -------------------------------------------------------
-
-  // GL_EXT_blend_minmax and GL_EXT_blend_color
-  GL_CONSTANT_COLOR_EXT                 = $8001;
-  GL_ONE_MINUS_CONSTANT_COLOR_EXT       = $8002;
-  GL_CONSTANT_ALPHA_EXT                 = $8003;
-  GL_ONE_MINUS_CONSTANT_ALPHA_EXT       = $8004;
-  GL_BLEND_EQUATION_EXT                 = $8009;
-  GL_MIN_EXT                            = $8007;
-  GL_MAX_EXT                            = $8008;
-  GL_FUNC_ADD_EXT                       = $8006;
-  GL_FUNC_SUBTRACT_EXT                  = $800A;
-  GL_FUNC_REVERSE_SUBTRACT_EXT          = $800B;
-  GL_BLEND_COLOR_EXT                    = $8005;
-
-  // GL_EXT_polygon_offset
-  GL_POLYGON_OFFSET_EXT                 = $8037;
-  GL_POLYGON_OFFSET_FACTOR_EXT          = $8038;
-  GL_POLYGON_OFFSET_BIAS_EXT            = $8039;
-
-  // GL_EXT_vertex_array
-  GL_VERTEX_ARRAY_EXT                   = $8074;
-  GL_NORMAL_ARRAY_EXT                   = $8075;
-  GL_COLOR_ARRAY_EXT                    = $8076;
-  GL_INDEX_ARRAY_EXT                    = $8077;
-  GL_TEXTURE_COORD_ARRAY_EXT            = $8078;
-  GL_EDGE_FLAG_ARRAY_EXT                = $8079;
-  GL_VERTEX_ARRAY_SIZE_EXT              = $807A;
-  GL_VERTEX_ARRAY_TYPE_EXT              = $807B;
-  GL_VERTEX_ARRAY_STRIDE_EXT            = $807C;
-  GL_VERTEX_ARRAY_COUNT_EXT             = $807D;
-  GL_NORMAL_ARRAY_TYPE_EXT              = $807E;
-  GL_NORMAL_ARRAY_STRIDE_EXT            = $807F;
-  GL_NORMAL_ARRAY_COUNT_EXT             = $8080;
-  GL_COLOR_ARRAY_SIZE_EXT               = $8081;
-  GL_COLOR_ARRAY_TYPE_EXT               = $8082;
-  GL_COLOR_ARRAY_STRIDE_EXT             = $8083;
-  GL_COLOR_ARRAY_COUNT_EXT              = $8084;
-  GL_INDEX_ARRAY_TYPE_EXT               = $8085;
-  GL_INDEX_ARRAY_STRIDE_EXT             = $8086;
-  GL_INDEX_ARRAY_COUNT_EXT              = $8087;
-  GL_TEXTURE_COORD_ARRAY_SIZE_EXT       = $8088;
-  GL_TEXTURE_COORD_ARRAY_TYPE_EXT       = $8089;
-  GL_TEXTURE_COORD_ARRAY_STRIDE_EXT     = $808A;
-  GL_TEXTURE_COORD_ARRAY_COUNT_EXT      = $808B;
-  GL_EDGE_FLAG_ARRAY_STRIDE_EXT         = $808C;
-  GL_EDGE_FLAG_ARRAY_COUNT_EXT          = $808D;
-  GL_VERTEX_ARRAY_POINTER_EXT           = $808E;
-  GL_NORMAL_ARRAY_POINTER_EXT           = $808F;
-  GL_COLOR_ARRAY_POINTER_EXT            = $8090;
-  GL_INDEX_ARRAY_POINTER_EXT            = $8091;
-  GL_TEXTURE_COORD_ARRAY_POINTER_EXT    = $8092;
-  GL_EDGE_FLAG_ARRAY_POINTER_EXT        = $8093;
-
-  // GL_EXT_texture_object
-  GL_TEXTURE_PRIORITY_EXT               = $8066;
-  GL_TEXTURE_RESIDENT_EXT               = $8067;
-  GL_TEXTURE_1D_BINDING_EXT             = $8068;
-  GL_TEXTURE_2D_BINDING_EXT             = $8069;
-
-  // GL_EXT_texture3D
-  GL_PACK_SKIP_IMAGES_EXT               = $806B;
-  GL_PACK_IMAGE_HEIGHT_EXT              = $806C;
-  GL_UNPACK_SKIP_IMAGES_EXT             = $806D;
-  GL_UNPACK_IMAGE_HEIGHT_EXT            = $806E;
-  GL_TEXTURE_3D_EXT                     = $806F;
-  GL_PROXY_TEXTURE_3D_EXT               = $8070;
-  GL_TEXTURE_DEPTH_EXT                  = $8071;
-  GL_TEXTURE_WRAP_R_EXT                 = $8072;
-  GL_MAX_3D_TEXTURE_SIZE_EXT            = $8073;
-  GL_TEXTURE_3D_BINDING_EXT             = $806A;
-
-  // GL_EXT_paletted_texture
-  GL_TABLE_TOO_LARGE_EXT                = $8031;
-  GL_COLOR_TABLE_FORMAT_EXT             = $80D8;
-  GL_COLOR_TABLE_WIDTH_EXT              = $80D9;
-  GL_COLOR_TABLE_RED_SIZE_EXT           = $80DA;
-  GL_COLOR_TABLE_GREEN_SIZE_EXT         = $80DB;
-  GL_COLOR_TABLE_BLUE_SIZE_EXT          = $80DC;
-  GL_COLOR_TABLE_ALPHA_SIZE_EXT         = $80DD;
-  GL_COLOR_TABLE_LUMINANCE_SIZE_EXT     = $80DE;
-  GL_COLOR_TABLE_INTENSITY_SIZE_EXT     = $80DF;
-  GL_TEXTURE_INDEX_SIZE_EXT             = $80ED;
-  GL_COLOR_INDEX1_EXT                   = $80E2;
-  GL_COLOR_INDEX2_EXT                   = $80E3;
-  GL_COLOR_INDEX4_EXT                   = $80E4;
-  GL_COLOR_INDEX8_EXT                   = $80E5;
-  GL_COLOR_INDEX12_EXT                  = $80E6;
-  GL_COLOR_INDEX16_EXT                  = $80E7;
-
-  // GL_EXT_shared_texture_palette
-  GL_SHARED_TEXTURE_PALETTE_EXT         = $81FB;
-
-  // GL_EXT_point_parameters
-  GL_POINT_SIZE_MIN_EXT                 = $8126;
-  GL_POINT_SIZE_MAX_EXT                 = $8127;
-  GL_POINT_FADE_THRESHOLD_SIZE_EXT      = $8128;
-  GL_DISTANCE_ATTENUATION_EXT           = $8129;
-
-  // GL_EXT_rescale_normal
-  GL_RESCALE_NORMAL_EXT                 = $803A;
-
-  // GL_EXT_abgr
-  GL_ABGR_EXT                           = $8000;
-
-  // GL_SGIS_multitexture
-  GL_SELECTED_TEXTURE_SGIS              = $835C;
-  GL_SELECTED_TEXTURE_COORD_SET_SGIS    = $835D;
-  GL_MAX_TEXTURES_SGIS                  = $835E;
-  GL_TEXTURE0_SGIS                      = $835F;
-  GL_TEXTURE1_SGIS                      = $8360;
-  GL_TEXTURE2_SGIS                      = $8361;
-  GL_TEXTURE3_SGIS                      = $8362;
-  GL_TEXTURE_COORD_SET_SOURCE_SGIS      = $8363;
-
-  // GL_EXT_multitexture
-  GL_SELECTED_TEXTURE_EXT               = $83C0;
-  GL_SELECTED_TEXTURE_COORD_SET_EXT     = $83C1;
-  GL_SELECTED_TEXTURE_TRANSFORM_EXT     = $83C2;
-  GL_MAX_TEXTURES_EXT                   = $83C3;
-  GL_MAX_TEXTURE_COORD_SETS_EXT         = $83C4;
-  GL_TEXTURE_ENV_COORD_SET_EXT          = $83C5;
-  GL_TEXTURE0_EXT                       = $83C6;
-  GL_TEXTURE1_EXT                       = $83C7;
-  GL_TEXTURE2_EXT                       = $83C8;
-  GL_TEXTURE3_EXT                       = $83C9;
-
-  // GL_SGIS_texture_edge_clamp
-  GL_CLAMP_TO_EDGE_SGIS                 = $812F;
-
-
-// -------------------------------------------------------
-//   GL Extension Procedures
-// -------------------------------------------------------
-
-var
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-  // === 1.0 Extensions ===
-
-  // GL_EXT_blend_minmax
-  glBlendEquationEXT: procedure(mode: GLenum);
-
-  // GL_EXT_blend_color
-  glBlendColorEXT: procedure(red, green, blue, alpha: GLclampf);
-
-  // GL_EXT_polygon_offset
-  glPolygonOffsetEXT: procedure(factor, bias: GLfloat);
-
-  // GL_EXT_vertex_array
-  glVertexPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr);
-  glNormalPointerEXT: procedure(AType: GLenum; stride, count: LongInt; var ptr);
-  glColorPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr);
-  glIndexPointerEXT: procedure(AType: GLenum; stride, count: LongInt; var ptr);
-  glTexCoordPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr);
-  glEdgeFlagPointerEXT: procedure(stride, count: LongInt; var ptr: Boolean);
-  glGetPointervEXT: procedure(pname: GLenum; var params: Pointer);
-  glArrayElementEXT: procedure(i: LongInt);
-  glDrawArraysEXT: procedure(mode: GLEnum; first, count: LongInt);
-
-  // GL_EXT_texture_object
-  glGenTexturesEXT: procedure(n: LongInt; var textures: LongWord);
-  glDeleteTexturesEXT: procedure(n: LongInt; var textures: LongWord);
-  glBindTextureEXT: procedure(target: GLenum; texture: LongWord);
-  glPrioritizeTexturesEXT: procedure(n: LongInt; var textures: LongWord; var priorities: GLClampf);
-  glAreTexturesResidentEXT: function(n: LongInt; var textures: LongWord; var residences: Boolean): Boolean;
-  glIsTextureEXT: function(texture: LongWord): Boolean;
-
-  // GL_EXT_texture3D
-  glTexImage3DEXT: procedure(target: GLenum; level: LongInt; internalFormat: GLenum; width, height, depth, border: LongInt; format, AType: GLenum; var pixels);
-  glTexSubImage3DEXT: procedure(target: GLenum; level, xoffset, yoffset, zoffset, width, height, depth: LongInt; format, AType: GLenum; var pixels);
-  glCopyTexSubImage3DEXT: procedure(target: GLenum; level, xoffset, yoffset, zoffset, x, y, width, height: LongInt);
-
-  // GL_EXT_color_table
-  glColorTableEXT: procedure(target, internalformat: GLenum; width: LongInt; format, AType: GLenum; var table);
-  glColorSubTableEXT: procedure(target: GLenum; start, count: LongInt; format, AType: GLEnum; var data);
-  glGetColorTableEXT: procedure(target, format, AType: GLenum; var table);
-  glGetColorTableParameterfvEXT: procedure(target, pname: GLenum; var params: GLfloat);
-  glGetColorTableParameterivEXT: procedure(target, pname: GLenum; var params: LongInt);
-
-  // GL_SGIS_multitexture
-  glMultiTexCoord1dSGIS: procedure(target: GLenum; s: GLdouble);
-  glMultiTexCoord1dvSGIS: procedure(target: GLenum; var v: GLdouble);
-  glMultiTexCoord1fSGIS: procedure(target: GLenum; s: GLfloat);
-  glMultiTexCoord1fvSGIS: procedure(target: GLenum; var v: GLfloat);
-  glMultiTexCoord1iSGIS: procedure(target: GLenum; s: LongInt);
-  glMultiTexCoord1ivSGIS: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord1sSGIS: procedure(target: GLenum; s: ShortInt);
-  glMultiTexCoord1svSGIS: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord2dSGIS: procedure(target: GLenum; s, t: GLdouble);
-  glMultiTexCoord2dvSGIS: procedure(target: GLenum; var v: GLdouble);
-  glMultiTexCoord2fSGIS: procedure(target: GLenum; s, t: GLfloat);
-  glMultiTexCoord2fvSGIS: procedure(target: GLenum; var v: GLfloat);
-  glMultiTexCoord2iSGIS: procedure(target: GLenum; s, t: LongInt);
-  glMultiTexCoord2ivSGIS: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord2sSGIS: procedure(target: GLenum; s, t: ShortInt);
-  glMultiTexCoord2svSGIS: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord3dSGIS: procedure(target: GLenum; s, t, r: GLdouble);
-  glMultiTexCoord3dvSGIS: procedure(target: GLenum; var v: GLdouble);
-  glMultiTexCoord3fSGIS: procedure(target: GLenum; s, t, r: GLfloat);
-  glMultiTexCoord3fvSGIS: procedure(target: GLenum; var v: GLfloat);
-  glMultiTexCoord3iSGIS: procedure(target: GLenum; s, t, r: LongInt);
-  glMultiTexCoord3ivSGIS: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord3sSGIS: procedure(target: GLenum; s, t, r: ShortInt);
-  glMultiTexCoord3svSGIS: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord4dSGIS: procedure(target: GLenum; s, t, r, q: GLdouble);
-  glMultiTexCoord4dvSGIS: procedure(target: GLenum; var v: GLdouble);
-  glMultiTexCoord4fSGIS: procedure(target: GLenum; s, t, r, q: GLfloat);
-  glMultiTexCoord4fvSGIS: procedure(target: GLenum; var v: GLfloat);
-  glMultiTexCoord4iSGIS: procedure(target: GLenum; s, t, r, q: LongInt);
-  glMultiTexCoord4ivSGIS: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord4sSGIS: procedure(target: GLenum; s, t, r, q: ShortInt);
-  glMultiTexCoord4svSGIS: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoordPointerSGIS: procedure(target: GLenum; size: LongInt; AType: GLEnum; stride: LongInt; var APointer);
-  glSelectTextureSGIS: procedure(target: GLenum);
-  glSelectTextureCoordSetSGIS: procedure(target: GLenum);
-
-  // GL_EXT_multitexture
-  glMultiTexCoord1dEXT: procedure(target: GLenum; s: GLdouble);
-  glMultiTexCoord1dvEXT: procedure(target: GLenum; var v: GLdouble);
-  glMultiTexCoord1fEXT: procedure(target: GLenum; s: GLfloat);
-  glMultiTexCoord1fvEXT: procedure(target: GLenum; var v: GLfloat);
-  glMultiTexCoord1iEXT: procedure(target: GLenum; s: LongInt);
-  glMultiTexCoord1ivEXT: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord1sEXT: procedure(target: GLenum; s: ShortInt);
-  glMultiTexCoord1svEXT: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord2dEXT: procedure(target: GLenum; s, t: GLdouble);
-  glMultiTexCoord2dvEXT: procedure(target: GLenum; var v: GLdouble);
-  glMultiTexCoord2fEXT: procedure(target: GLenum; s, t: GLfloat);
-  glMultiTexCoord2fvEXT: procedure(target: GLenum; var v: GLfloat);
-  glMultiTexCoord2iEXT: procedure(target: GLenum; s, t: LongInt);
-  glMultiTexCoord2ivEXT: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord2sEXT: procedure(target: GLenum; s, t: ShortInt);
-  glMultiTexCoord2svEXT: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord3dEXT: procedure(target: GLenum; s, t, r: GLdouble);
-  glMultiTexCoord3dvEXT: procedure(target: GLenum; var v: GLdouble);
-  glMultiTexCoord3fEXT: procedure(target: GLenum; s, t, r: GLfloat);
-  glMultiTexCoord3fvEXT: procedure(target: GLenum; var v: GLfloat);
-  glMultiTexCoord3iEXT: procedure(target: GLenum; s, t, r: LongInt);
-  glMultiTexCoord3ivEXT: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord3sEXT: procedure(target: GLenum; s, t, r: ShortInt);
-  glMultiTexCoord3svEXT: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord4dEXT: procedure(target: GLenum; s, t, r, q: GLdouble);
-  glMultiTexCoord4dvEXT: procedure(target: GLenum; var v: GLdouble);
-  glMultiTexCoord4fEXT: procedure(target: GLenum; s, t, r, q: GLfloat);
-  glMultiTexCoord4fvEXT: procedure(target: GLenum; var v: GLfloat);
-  glMultiTexCoord4iEXT: procedure(target: GLenum; s, t, r, q: LongInt);
-  glMultiTexCoord4ivEXT: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord4sEXT: procedure(target: GLenum; s, t, r, q: ShortInt);
-  glMultiTexCoord4svEXT: procedure(target: GLenum; var v: ShortInt);
-  glInterleavedTextureCoordSetsEXT: procedure(factor: LongInt);
-  glSelectTextureEXT: procedure(target: GLenum);
-  glSelectTextureCoordSetEXT: procedure(target: GLenum);
-  glSelectTextureTransformEXT: procedure(target: GLenum);
-
-  // GL_EXT_point_parameters
-  glPointParameterfEXT: procedure(pname: GLenum; param: GLfloat);
-  glPointParameterfvEXT: procedure(pname: GLenum; var params: GLfloat);
-
-  // GL_MESA_window_pos
-  glWindowPos2iMESA: procedure(x, y: LongInt);
-  glWindowPos2sMESA: procedure(x, y: ShortInt);
-  glWindowPos2fMESA: procedure(x, y: GLfloat);
-  glWindowPos2dMESA: procedure(x, y: GLdouble);
-  glWindowPos2ivMESA: procedure(var p: LongInt);
-  glWindowPos2svMESA: procedure(var p: ShortInt);
-  glWindowPos2fvMESA: procedure(var p: GLfloat);
-  glWindowPos2dvMESA: procedure(var p: GLdouble);
-  glWindowPos3iMESA: procedure(x, y, z: LongInt);
-  glWindowPos3sMESA: procedure(x, y, z: ShortInt);
-  glWindowPos3fMESA: procedure(x, y, z: GLfloat);
-  glWindowPos3dMESA: procedure(x, y, z: GLdouble);
-  glWindowPos3ivMESA: procedure(var p: LongInt);
-  glWindowPos3svMESA: procedure(var p: ShortInt);
-  glWindowPos3fvMESA: procedure(var p: GLfloat);
-  glWindowPos3dvMESA: procedure(var p: GLdouble);
-  glWindowPos4iMESA: procedure(x, y, z, w: LongInt);
-  glWindowPos4sMESA: procedure(x, y, z, w: ShortInt);
-  glWindowPos4fMESA: procedure(x, y, z, w: GLfloat);
-  glWindowPos4dMESA: procedure(x, y, z, w: GLdouble);
-  glWindowPos4ivMESA: procedure(var p: LongInt);
-  glWindowPos4svMESA: procedure(var p: ShortInt);
-  glWindowPos4fvMESA: procedure(var p: GLfloat);
-  glWindowPos4dvMESA: procedure(var p: GLdouble);
-
-  // GL_MESA_resize_buffers
-  glResizeBuffersMESA: procedure;
-%END

+ 0 - 242
packages/opengl/build/glu.def

@@ -1,242 +0,0 @@
-# This is the definition file for all GLU stuff
-
-%COPY_INTERFACE
-// ===================================================================
-//   GLU consts, types and functions
-// ===================================================================
-
-const
-  GLU_TRUE                              = GL_TRUE;
-  GLU_FALSE                             = GL_FALSE;
-
-  // Normal vectors
-  GLU_SMOOTH                            = 100000;
-  GLU_FLAT                              = 100001;
-  GLU_NONE                              = 100002;
-
-  // Quadric draw styles
-  GLU_POINT                             = 100010;
-  GLU_LINE                              = 100011;
-  GLU_FILL                              = 100012;
-  GLU_SILHOUETTE                        = 100013;
-
-  // Quadric orientation
-  GLU_OUTSIDE                           = 100020;
-  GLU_INSIDE                            = 100021;
-
-  // Tesselator
-  GLU_TESS_BEGIN                        = 100100;
-  GLU_TESS_VERTEX                       = 100101;
-  GLU_TESS_END                          = 100102;
-  GLU_TESS_ERROR                        = 100103;
-  GLU_TESS_EDGE_FLAG                    = 100104;
-  GLU_TESS_COMBINE			= 100105;
-  GLU_TESS_BEGIN_DATA			= 100106;
-  GLU_TESS_VERTEX_DATA			= 100107;
-  GLU_TESS_END_DATA			= 100108;
-  GLU_TESS_ERROR_DATA			= 100109;
-  GLU_TESS_EDGE_FLAG_DATA		= 100110;
-  GLU_TESS_COMBINE_DATA			= 100111;
-
-  // Winding rules
-  GLU_TESS_WINDING_ODD			= 100130;
-  GLU_TESS_WINDING_NONZERO		= 100131;
-  GLU_TESS_WINDING_POSITIVE		= 100132;
-  GLU_TESS_WINDING_NEGATIVE		= 100133;
-  GLU_TESS_WINDING_ABS_GEQ_TWO		= 100134;
-
-  // Tessellation properties
-  GLU_TESS_WINDING_RULE			= 100140;
-  GLU_TESS_BOUNDARY_ONLY		= 100141;
-  GLU_TESS_TOLERANCE			= 100142;
-
-  // Tessellation errors
-  GLU_TESS_ERROR1			= 100151;   // Missing gluBeginPolygon
-  GLU_TESS_ERROR2			= 100152;   // Missing gluBeginContour
-  GLU_TESS_ERROR3			= 100153;   // Missing gluEndPolygon
-  GLU_TESS_ERROR4			= 100154;   // Missing gluEndContour
-  GLU_TESS_ERROR5			= 100155;
-  GLU_TESS_ERROR6			= 100156;
-  GLU_TESS_ERROR7			= 100157;
-  GLU_TESS_ERROR8			= 100158;
-
-  // NURBS
-  GLU_AUTO_LOAD_MATRIX                  = 100200;
-  GLU_CULLING                           = 100201;
-  GLU_PARAMETRIC_TOLERANCE              = 100202;
-  GLU_SAMPLING_TOLERANCE                = 100203;
-  GLU_DISPLAY_MODE                      = 100204;
-  GLU_SAMPLING_METHOD                   = 100205;
-  GLU_U_STEP                            = 100206;
-  GLU_V_STEP                            = 100207;
-
-  GLU_PATH_LENGTH                       = 100215;
-  GLU_PARAMETRIC_ERROR                  = 100216;
-  GLU_DOMAIN_DISTANCE                   = 100217;
-
-  GLU_MAP1_TRIM_2                       = 100210;
-  GLU_MAP1_TRIM_3                       = 100211;
-
-  GLU_OUTLINE_POLYGON                   = 100240;
-  GLU_OUTLINE_PATCH                     = 100241;
-
-  GLU_NURBS_ERROR1                      = 100251;   // spline order un-supported
-  GLU_NURBS_ERROR2                      = 100252;   // too few knots
-  GLU_NURBS_ERROR3                      = 100253;   // valid knot range is empty
-  GLU_NURBS_ERROR4                      = 100254;   // decreasing knot sequence
-  GLU_NURBS_ERROR5                      = 100255;   // knot multiplicity > spline order
-  GLU_NURBS_ERROR6                      = 100256;   // endcurve() must follow bgncurve()
-  GLU_NURBS_ERROR7                      = 100257;   // bgncurve() must precede endcurve()
-  GLU_NURBS_ERROR8                      = 100258;   // ctrlarray or knot vector is NULL
-  GLU_NURBS_ERROR9                      = 100259;   // cannot draw pwlcurves
-  GLU_NURBS_ERROR10                     = 100260;   // missing gluNurbsCurve()
-  GLU_NURBS_ERROR11                     = 100261;   // missing gluNurbsSurface()
-  GLU_NURBS_ERROR12                     = 100262;   // endtrim() must precede endsurface()
-  GLU_NURBS_ERROR13                     = 100263;   // bgnsurface() must precede endsurface()
-  GLU_NURBS_ERROR14                     = 100264;   // curve of improper type passed as trim curve
-  GLU_NURBS_ERROR15                     = 100265;   // bgnsurface() must precede bgntrim()
-  GLU_NURBS_ERROR16                     = 100266;   // endtrim() must follow bgntrim()
-  GLU_NURBS_ERROR17                     = 100267;   // bgntrim() must precede endtrim()*/
-  GLU_NURBS_ERROR18                     = 100268;   // invalid or missing trim curve*/
-  GLU_NURBS_ERROR19                     = 100269;   // bgntrim() must precede pwlcurve()
-  GLU_NURBS_ERROR20                     = 100270;   // pwlcurve referenced twice*/
-  GLU_NURBS_ERROR21                     = 100271;   // pwlcurve and nurbscurve mixed
-  GLU_NURBS_ERROR22                     = 100272;   // improper usage of trim data type
-  GLU_NURBS_ERROR23                     = 100273;   // nurbscurve referenced twice
-  GLU_NURBS_ERROR24                     = 100274;   // nurbscurve and pwlcurve mixed
-  GLU_NURBS_ERROR25                     = 100275;   // nurbssurface referenced twice
-  GLU_NURBS_ERROR26                     = 100276;   // invalid property
-  GLU_NURBS_ERROR27                     = 100277;   // endsurface() must follow bgnsurface()
-  GLU_NURBS_ERROR28                     = 100278;   // intersecting or misoriented trim curves
-  GLU_NURBS_ERROR29                     = 100279;   // intersecting trim curves
-  GLU_NURBS_ERROR30                     = 100280;   // UNUSED
-  GLU_NURBS_ERROR31                     = 100281;   // unconnected trim curves
-  GLU_NURBS_ERROR32                     = 100282;   // unknown knot error
-  GLU_NURBS_ERROR33                     = 100283;   // negative vertex count encountered
-  GLU_NURBS_ERROR34                     = 100284;   // negative byte-stride
-  GLU_NURBS_ERROR35                     = 100285;   // unknown type descriptor
-  GLU_NURBS_ERROR36                     = 100286;   // null control point reference
-  GLU_NURBS_ERROR37                     = 100287;   // duplicate point on pwlcurve
-
-  // Errors
-  GLU_INVALID_ENUM                      = 100900;
-  GLU_INVALID_VALUE                     = 100901;
-  GLU_OUT_OF_MEMORY                     = 100902;
-  GLU_INCOMPATIBLE_GL_VERSION           = 100903;
-
-  // New in GLU 1.1
-  GLU_VERSION                           = 100800;
-  GLU_EXTENSIONS                        = 100801;
-
-
-  // === GLU 1.0 tessellation - obsolete! ===
-
-  // Contour types
-  GLU_CW                                = 100120;
-  GLU_CCW                               = 100121;
-  GLU_INTERIOR                          = 100122;
-  GLU_EXTERIOR                          = 100123;
-  GLU_UNKNOWN                           = 100124;
-
-  // Tessellator
-  GLU_BEGIN				= GLU_TESS_BEGIN;
-  GLU_VERTEX				= GLU_TESS_VERTEX;
-  GLU_END				= GLU_TESS_END;
-  GLU_ERROR				= GLU_TESS_ERROR;
-  GLU_EDGE_FLAG				= GLU_TESS_EDGE_FLAG;
-
-
-type
-  PGLUquadricObj = ^TGLUquadricObj;
-  TGLUquadricObj = record end;
-  PGLUnurbsObj = ^TGLUnurbsObj;
-  TGLUnurbsObj = record end;
-  PGLUtesselator = ^TGLUtesselator;
-  TGLUtesselator = record end;
-  PGLUtriangulatorObj = PGLUtesselator;
-
-  // Callback function declarations
-  TGLUQuadricCallback = procedure; cdecl;
-  TGLUNurbsCallback = procedure; cdecl;
-  TGLUTessCallback = procedure; cdecl;
-
-  // We need some private array types
-  TGLUViewport = array[0..3] of LongInt;
-  TGLUMatrixd = array[0..15] of GLdouble;
-  TGLUMatrixf = array[0..15] of GLfloat;
-  TGLUVectord = array[0..2] of GLdouble;
-
-var
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-  // Miscellaneous functions
-  gluLookAt: procedure(eye, eyey, eyez, centerx, centery, centerz, upx, upy, upz: GLdouble);
-  gluOrtho2D: procedure(left, right, bottom, top: GLdouble);
-  gluPerspective: procedure(fovy, aspect, zNear, zFar: GLdouble);
-  gluPickMatrix: procedure(x, y, width, height: GLdouble; const viewport: TGLUViewport);
-  gluProject: function(objx, objy, objz: GLdouble; const modelMatrix, projMatrix: TGLUMatrixd; const viewport: TGLUViewport; var winx, winy, winz: GLdouble): LongInt;
-  gluUnProject: function(winx, winy, winz: GLdouble; const modelMatrix, projMatrix: TGLUMatrixd; const viewport: TGLUViewport; var objx, objy, objz: GLdouble): LongInt;
-  gluErrorString: function(errorCode: GLenum): PChar;
-
-  // Mipmapping and image scaling
-  gluScaleImage: procedure(format: GLenum; within, heightin: LongInt; typein: GLenum; const datain; widthout, heightout: LongInt; typeout: GLenum; var dataout);
-  gluBuild1DMipmaps: procedure(target: GLenum; components, width: LongInt; format, AType: GLEnum; const data);
-  gluBuild2DMipmaps: procedure(target: GLenum; components, width, height: LongInt; format, AType: GLEnum; const data);
-
-  // Quadrics
-  gluNewQuadric: function: PGLUquadricObj;
-  gluDeleteQuadric: procedure(state: PGLUquadricObj);
-  gluQuadricDrawStyle: procedure(quadObject: PGLUquadricObj; drawStyle: GLenum);
-  gluQuadricOrientation: procedure(quadObject: PGLUquadricObj; orientation: GLenum);
-  gluQuadricNormals: procedure(quadObject: PGLUquadricObj; normals: GLenum);
-  gluQuadricTexture: procedure(quadObject: PGLUquadricObj; textureCoords: Boolean);
-  gluQuadricCallback: procedure(quadObject: PGLUquadricObj; which: GLenum; fn: TGLUQuadricCallback);
-  gluCylinder: procedure(qobj: PGLUquadricObj; baseRadius, topRadius, height: GLdouble; slices, stacks: LongInt);
-  gluSphere: procedure(qobj: PGLUquadricObj; radius: GLdouble; slices, stacks: LongInt);
-  gluDisk: procedure(qobj: PGLUquadricObj; innerRadius, outerRadius: GLdouble; slices, loops: LongInt);
-  gluPartialDisk: procedure(qobj: PGLUquadricObj; innerRadius, outerRadius: GLdouble; slices, loops: LongInt; startAngle, sweepAngle: GLdouble);
-
-  // Nurbs
-  gluNewNurbsRenderer: function: PGLUnurbsObj;
-  gluDeleteNurbsRenderer: procedure(nobj: PGLUnurbsObj);
-  gluLoadSamplingMatrices: procedure(nobj: PGLUnurbsObj; const modelMatrix, projMatrix: TGLUMatrixf; const viewport: TGLUViewport);
-  gluNurbsProperty: procedure(nobj: PGLUnurbsObj; AProperty: GLenum; value: GLfloat);
-  gluGetNurbsProperty: procedure(nobj: PGLUnurbsObj; AProperty: GLEnum; var value: GLfloat);
-  gluBeginCurve: procedure(nobj: PGLUnurbsObj);
-  gluEndCurve: procedure(nobj: PGLUnurbsObj);
-  gluNurbsCurve: procedure(nobj: PGLUnurbsObj; nknots: LongInt; var know: GLfloat; stride: LongInt; var ctlarray: GLfloat; order: LongInt; AType: GLenum);
-  gluBeginSurface: procedure(nobj: PGLUnurbsObj);
-  gluEndSurface: procedure(nobj: PGLUnurbsObj);
-  gluNurbsSurface: procedure(nobj: PGLUnurbsObj; sknot_count: LongInt; var sknot: GLfloat; tknot_count: LongInt; var tknot: GLfloat; s_stride, t_stride: LongInt; var ctlarray: GLfloat; sorder, torder: LongInt; AType: GLenum);
-  gluBeginTrim: procedure(nobj: PGLUnurbsObj);
-  gluEndTrim: procedure(nobj: PGLUnurbsObj);
-  gluPwlCurve: procedure(nobj: PGLUnurbsObj; count: LongInt; var AArray: GLfloat; stride: LongInt; AType: GLenum);
-  gluNurbsCallback: procedure(nobj: PGLUnurbsObj; which: GLenum; fn: TGLUNurbsCallback);
-
-  // Polygon tesselation
-  gluNewTess: function: PGLUtesselator;
-  gluDeleteTess: procedure(tobj: PGLUtesselator);
-  gluTessBeginPolygon: procedure(tobj: PGLUtesselator; var polygon_data);
-  gluTessBeginContour: procedure(tobj: PGLUtesselator);
-  gluTessVertex: procedure(tobj: PGLUtesselator; v: TGLUVectord; var data);
-  gluTessEndContour: procedure(tobj: PGLUtesselator);
-  gluTessEndPolygon: procedure(tobj: PGLUtesselator);
-  gluTessProperty: procedure(tobj: PGLUtesselator; which: GLenum; value: GLdouble);
-  gluTessNormal: procedure(tobj: PGLUtesselator; x, y, z: GLdouble);
-  gluTessCallback: procedure(tobj: PGLUtesselator; which: GLenum; fn: TGLUTessCallback);
-  gluGetTessProperty: procedure(tobj: PGLUtesselator; which: GLenum; var value: GLdouble);
-
-  // Obsolete 1.0 tessellation functions
-  gluBeginPolygon: procedure(tobj: PGLUtesselator);
-  gluNextContour: procedure(tobj: PGLUtesselator; AType: GLenum);
-  gluEndPolygon: procedure(tobj: PGLUtesselator);
-
-  // New functions in GLU 1.1
-  gluGetString: function(name: GLenum): PChar;
-%END

+ 0 - 420
packages/opengl/build/glut.def

@@ -1,420 +0,0 @@
-# This is the definition file for all GLUT stuff
-
-%COPY_INTERFACE
-
-{ 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!). }
-
-const
-  GLUT_API_VERSION		= 4;
-
-  // Display mode bit masks
-  GLUT_RGB                      = 0;
-  GLUT_RGBA                     = GLUT_RGB;
-  GLUT_INDEX                    = 1;
-  GLUT_SINGLE                   = 0;
-  GLUT_DOUBLE                   = 2;
-  GLUT_ACCUM                    = 4;
-  GLUT_ALPHA                    = 8;
-  GLUT_DEPTH                    = 16;
-  GLUT_STENCIL                  = 32;
-  GLUT_MULTISAMPLE              = 128;
-  GLUT_STEREO                   = 256;
-  GLUT_LUMINANCE                = 512;
-
-  // Mouse buttons
-  GLUT_LEFT_BUTTON              = 0;
-  GLUT_MIDDLE_BUTTON            = 1;
-  GLUT_RIGHT_BUTTON             = 2;
-
-  // Mouse button state
-  GLUT_DOWN                     = 0;
-  GLUT_UP                       = 1;
-
-  // function keys
-  GLUT_KEY_F1			= 1;
-  GLUT_KEY_F2			= 2;
-  GLUT_KEY_F3			= 3;
-  GLUT_KEY_F4			= 4;
-  GLUT_KEY_F5			= 5;
-  GLUT_KEY_F6			= 6;
-  GLUT_KEY_F7			= 7;
-  GLUT_KEY_F8			= 8;
-  GLUT_KEY_F9			= 9;
-  GLUT_KEY_F10			= 10;
-  GLUT_KEY_F11			= 11;
-  GLUT_KEY_F12			= 12;
-  // directional keys
-  GLUT_KEY_LEFT			= 100;
-  GLUT_KEY_UP			= 101;
-  GLUT_KEY_RIGHT		= 102;
-  GLUT_KEY_DOWN			= 103;
-  GLUT_KEY_PAGE_UP		= 104;
-  GLUT_KEY_PAGE_DOWN		= 105;
-  GLUT_KEY_HOME			= 106;
-  GLUT_KEY_END			= 107;
-  GLUT_KEY_INSERT		= 108;
-
-  // Enter / exit state
-  GLUT_LEFT                     = 0;
-  GLUT_ENTERED                  = 1;
-
-  // Menu usage state
-  GLUT_MENU_NOT_IN_USE          = 0;
-  GLUT_MENU_IN_USE              = 1;
-
-  // Visibility state
-  GLUT_NOT_VISIBLE              = 0;
-  GLUT_VISIBLE                  = 1;
-
-  // Window status state
-  GLUT_HIDDEN                   = 0;
-  GLUT_FULLY_RETAINED           = 1;
-  GLUT_PARTIALLY_RETAINED       = 2;
-  GLUT_FULLY_COVERED            = 3;
-
-  // Color index component selection values
-  GLUT_RED                      = 0;
-  GLUT_GREEN                    = 1;
-  GLUT_BLUE                     = 2;
-
-  // Layers for use
-  GLUT_NORMAL                   = 0;
-  GLUT_OVERLAY                  = 1;
-
-  // glutGet parameters
-  GLUT_WINDOW_X                 = 100;
-  GLUT_WINDOW_Y                 = 101;
-  GLUT_WINDOW_WIDTH             = 102;
-  GLUT_WINDOW_HEIGHT            = 103;
-  GLUT_WINDOW_BUFFER_SIZE       = 104;
-  GLUT_WINDOW_STENCIL_SIZE      = 105;
-  GLUT_WINDOW_DEPTH_SIZE        = 106;
-  GLUT_WINDOW_RED_SIZE          = 107;
-  GLUT_WINDOW_GREEN_SIZE        = 108;
-  GLUT_WINDOW_BLUE_SIZE         = 109;
-  GLUT_WINDOW_ALPHA_SIZE        = 110;
-  GLUT_WINDOW_ACCUM_RED_SIZE    = 111;
-  GLUT_WINDOW_ACCUM_GREEN_SIZE  = 112;
-  GLUT_WINDOW_ACCUM_BLUE_SIZE   = 113;
-  GLUT_WINDOW_ACCUM_ALPHA_SIZE  = 114;
-  GLUT_WINDOW_DOUBLEBUFFER      = 115;
-  GLUT_WINDOW_RGBA              = 116;
-  GLUT_WINDOW_PARENT            = 117;
-  GLUT_WINDOW_NUM_CHILDREN      = 118;
-  GLUT_WINDOW_COLORMAP_SIZE     = 119;
-  GLUT_WINDOW_NUM_SAMPLES       = 120;
-  GLUT_WINDOW_STEREO            = 121;
-  GLUT_WINDOW_CURSOR            = 122;
-  GLUT_SCREEN_WIDTH             = 200;
-  GLUT_SCREEN_HEIGHT            = 201;
-  GLUT_SCREEN_WIDTH_MM          = 202;
-  GLUT_SCREEN_HEIGHT_MM         = 203;
-  GLUT_MENU_NUM_ITEMS           = 300;
-  GLUT_DISPLAY_MODE_POSSIBLE    = 400;
-  GLUT_INIT_WINDOW_X            = 500;
-  GLUT_INIT_WINDOW_Y            = 501;
-  GLUT_INIT_WINDOW_WIDTH        = 502;
-  GLUT_INIT_WINDOW_HEIGHT       = 503;
-  GLUT_INIT_DISPLAY_MODE        = 504;
-  GLUT_ELAPSED_TIME             = 700;
-  GLUT_WINDOW_FORMAT_ID         = 123;
-
-  // glutDeviceGet parameters
-  GLUT_HAS_KEYBOARD             = 600;
-  GLUT_HAS_MOUSE                = 601;
-  GLUT_HAS_SPACEBALL            = 602;
-  GLUT_HAS_DIAL_AND_BUTTON_BOX  = 603;
-  GLUT_HAS_TABLET               = 604;
-  GLUT_NUM_MOUSE_BUTTONS        = 605;
-  GLUT_NUM_SPACEBALL_BUTTONS    = 606;
-  GLUT_NUM_BUTTON_BOX_BUTTONS   = 607;
-  GLUT_NUM_DIALS                = 608;
-  GLUT_NUM_TABLET_BUTTONS       = 609;
-  GLUT_DEVICE_IGNORE_KEY_REPEAT = 610;
-  GLUT_DEVICE_KEY_REPEAT        = 611;
-  GLUT_HAS_JOYSTICK             = 612;
-  GLUT_OWNS_JOYSTICK            = 613;
-  GLUT_JOYSTICK_BUTTONS         = 614;
-  GLUT_JOYSTICK_AXES            = 615;
-  GLUT_JOYSTICK_POLL_RATE       = 616;
-
-  // glutLayerGet parameters
-  GLUT_OVERLAY_POSSIBLE         = 800;
-  GLUT_LAYER_IN_USE             = 801;
-  GLUT_HAS_OVERLAY              = 802;
-  GLUT_TRANSPARENT_INDEX        = 803;
-  GLUT_NORMAL_DAMAGED           = 804;
-  GLUT_OVERLAY_DAMAGED          = 805;
-
-  // glutVideoResizeGet parameters
-  GLUT_VIDEO_RESIZE_POSSIBLE    = 900;
-  GLUT_VIDEO_RESIZE_IN_USE      = 901;
-  GLUT_VIDEO_RESIZE_X_DELTA     = 902;
-  GLUT_VIDEO_RESIZE_Y_DELTA     = 903;
-  GLUT_VIDEO_RESIZE_WIDTH_DELTA = 904;
-  GLUT_VIDEO_RESIZE_HEIGHT_DELTA= 905;
-  GLUT_VIDEO_RESIZE_X           = 906;
-  GLUT_VIDEO_RESIZE_Y           = 907;
-  GLUT_VIDEO_RESIZE_WIDTH       = 908;
-  GLUT_VIDEO_RESIZE_HEIGHT      = 909;
-
-  // glutGetModifiers return mask
-  GLUT_ACTIVE_SHIFT             = 1;
-  GLUT_ACTIVE_CTRL              = 2;
-  GLUT_ACTIVE_ALT               = 4;
-
-  // glutSetCursor parameters
-  // Basic arrows
-  GLUT_CURSOR_RIGHT_ARROW	= 0;
-  GLUT_CURSOR_LEFT_ARROW	= 1;
-  // Symbolic cursor shapes
-  GLUT_CURSOR_INFO		= 2;
-  GLUT_CURSOR_DESTROY		= 3;
-  GLUT_CURSOR_HELP		= 4;
-  GLUT_CURSOR_CYCLE		= 5;
-  GLUT_CURSOR_SPRAY		= 6;
-  GLUT_CURSOR_WAIT		= 7;
-  GLUT_CURSOR_TEXT		= 8;
-  GLUT_CURSOR_CROSSHAIR		= 9;
-  // Directional cursors
-  GLUT_CURSOR_UP_DOWN		= 10;
-  GLUT_CURSOR_LEFT_RIGHT	= 11;
-  // Sizing cursors
-  GLUT_CURSOR_TOP_SIDE		= 12;
-  GLUT_CURSOR_BOTTOM_SIDE	= 13;
-  GLUT_CURSOR_LEFT_SIDE		= 14;
-  GLUT_CURSOR_RIGHT_SIDE	= 15;
-  GLUT_CURSOR_TOP_LEFT_CORNER	= 16;
-  GLUT_CURSOR_TOP_RIGHT_CORNER	= 17;
-  GLUT_CURSOR_BOTTOM_RIGHT_CORNER = 18;
-  GLUT_CURSOR_BOTTOM_LEFT_CORNER = 19;
-  // Inherit from parent window
-  GLUT_CURSOR_INHERIT		= 100;
-  // Blank cursor
-  GLUT_CURSOR_NONE		= 101;
-  // Fullscreen crosshair (if available)
-  GLUT_CURSOR_FULL_CROSSHAIR	= 102;
-
-type
-
-  // GLUT menu sub-API
-  TGlutCreateMenuFunc = procedure(arg: Int); cdecl;
-
-  // GLUT window callback sub-API
-  TGlutDisplayFunc = procedure; cdecl;
-  TGlutReshapeFunc = procedure(width, height: Int); cdecl;
-  TGlutKeyboardFunc = procedure(key: Char; x, y: Int); cdecl;
-  TGlutMouseFunc = procedure(button, state, x, y: Int); cdecl;
-  TGlutMotionFunc = procedure(x, y: Int); cdecl;
-  TGlutPassiveMotionFunc = procedure(x, y: Int); cdecl;
-  TGlutEntryFunc = procedure(x, y: Int); cdecl;
-  TGlutVisibilityFunc = procedure(state: Int); cdecl;
-  TGlutIdleFunc = procedure; cdecl;
-  TGlutTimerFunc = procedure(value: Int); cdecl;
-  TGlutMenuStateFunc = procedure(state: Int); cdecl;
-  TGlutSpecialFunc = procedure(key, x, y: Int); cdecl;
-  TGlutSpaceballMotionFunc = procedure(x, y, z: Int); cdecl;
-  TGlutSpaceballRotateFunc = procedure(x, y, z: Int); cdecl;
-  TGlutSpaceballButtonFunc = procedure(button, state: Int); cdecl;
-  TGlutButtonBoxFunc = procedure(button, state: Int); cdecl;
-  TGlutDialsFunc = procedure(dial, value: Int); cdecl;
-  TGlutTabletMotionFunc = procedure(x, y: Int); cdecl;
-  TGlutTabletButtonFunc = procedure(button, state, x, y: Int); cdecl;
-  TGlutMenuStatusFunc = procedure(status, x, y: Int); cdecl;
-  TGlutOverlayDisplayFunc = procedure; cdecl;
-  TGlutWindowStatusFunc = procedure(state: Int); cdecl;
-  TGlutKeyboardUpFunc = procedure(key: Char; x, y: Int); cdecl;
-  TGlutSpecialUpFunc = procedure(key, x, y: Int); cdecl;
-  TGlutJoystickFunc = procedure(buttonMask: UnsignedInt; x, y, z: Int); cdecl;
-
-const
-// GLUT device control sub-API
-  // glutSetKeyRepeat modes.
-  GLUT_KEY_REPEAT_OFF		= 0;
-  GLUT_KEY_REPEAT_ON		= 1;
-  GLUT_KEY_REPEAT_DEFAULT	= 2;
-
-  // Joystick button masks
-  GLUT_JOYSTICK_BUTTON_A	= 1;
-  GLUT_JOYSTICK_BUTTON_B	= 2;
-  GLUT_JOYSTICK_BUTTON_C	= 4;
-  GLUT_JOYSTICK_BUTTON_D	= 8;
-
-// GLUT game mode sub-API
-  // glutGameModeGet
-  GLUT_GAME_MODE_ACTIVE         = 0;
-  GLUT_GAME_MODE_POSSIBLE       = 1;
-  GLUT_GAME_MODE_WIDTH          = 2;
-  GLUT_GAME_MODE_HEIGHT         = 3;
-  GLUT_GAME_MODE_PIXEL_DEPTH    = 4;
-  GLUT_GAME_MODE_REFRESH_RATE   = 5;
-  GLUT_GAME_MODE_DISPLAY_CHANGED= 6;
-
-
-var
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-// GLUT initialization sub-API
-  glutInit: procedure(argcp: PInt; argv: PPChar);
-  glutInitDisplayMode: procedure(mode: UnsignedInt);
-  glutInitDisplayString: procedure(const AString: PChar);
-  glutInitWindowPosition: procedure(x, y: Int);
-  glutInitWindowSize: procedure(width, height: Int);
-  glutMainLoop: procedure;
-
-// GLUT window sub-API
-  glutCreateWindow: function(const title: PChar): Int;
-  glutCreateSubWindow: function(win, x, y, width, height: Int): Int;
-  glutDestroyWindow: procedure(win: Int);
-  glutPostRedisplay: procedure;
-  glutPostWindowRedisplay: procedure(win: Int);
-  glutSwapBuffers: procedure;
-  glutGetWindow: function: Int;
-  glutSetWindow: procedure(win: Int);
-  glutSetWindowTitle: procedure(const title: PChar);
-  glutSetIconTitle: procedure(title: PChar);
-  glutPositionWindow: procedure(x, y: Int);
-  glutReshapeWindow: procedure(width, height: Int);
-  glutPopWindow: procedure;
-  glutPushWindow: procedure;
-  glutIconifyWindow: procedure;
-  glutShowWindow: procedure;
-  glutHideWindow: procedure;
-  glutFullScreen: procedure;
-  glutSetCursor: procedure(cursor: Int);
-  glutWarpPointer: procedure(x, y: Int);
-
-// GLUT overlay sub-API
-  glutEstablishOverlay: procedure;
-  glutRemoveOverlay: procedure;
-  glutUseLayer: procedure(layer: GLenum);
-  glutPostOverlayRedisplay: procedure;
-  glutPostWindowOverlayRedisplay: procedure(win: Int);
-  glutShowOverlay: procedure;
-  glutHideOverlay: procedure;
-
-// GLUT menu sub-API
-  glutCreateMenu: function(func: TGlutCreateMenuFunc): Int;
-  glutDestroyMenu: procedure(menu: Int);
-  glutGetMenu: function: Int;
-  glutSetMenu: procedure(menu: Int);
-  glutAddMenuEntry: procedure(const ALabel: PChar; value: Int);
-  glutAddSubMenu: procedure(const ALabel: PChar; submenu: Int);
-  glutChangeToMenuEntry: procedure(item: Int; const ALabel: PChar; value: Int);
-  glutChangeToSubMenu: procedure(item: Int; const ALabel: PChar; submenu: Int);
-  glutRemoveMenuItem: procedure(item: Int);
-  glutAttachMenu: procedure(button: Int);
-  glutDetachMenu: procedure(button: Int);
-
-// GLUT window callback sub-API
-  glutDisplayFunc: procedure(func: TGlutDisplayFunc);
-  glutReshapeFunc: procedure(func: TGlutReshapeFunc);
-  glutKeyboardFunc: procedure(func: TGlutKeyboardFunc);
-  glutMouseFunc: procedure(func: TGlutMouseFunc);
-  glutMotionFunc: procedure(func: TGlutMotionFunc);
-  glutPassiveMotionFunc: procedure(func: TGlutPassiveMotionFunc);
-  glutEntryFunc: procedure(func: TGlutEntryFunc);
-  glutIdleFunc: procedure(func: TGlutIdleFunc);
-  glutTimerFunc: procedure(millis: UnsignedInt; func: TGlutTimerFunc; value: Int);
-  glutMenuStateFunc: procedure(func: TGlutMenuStateFunc);
-  glutSpecialFunc: procedure(func: TGlutSpecialFunc);
-  glutSpaceballMotionFunc: procedure(func: TGlutSpaceballMotionFunc);
-  glutSpaceballRotateFunc: procedure(func: TGlutSpaceballRotateFunc);
-  glutSpaceballButtonFunc: procedure(func: TGlutSpaceballButtonFunc);
-  glutButtonBoxFunc: procedure(func: TGlutButtonBoxFunc);
-  glutDialsFunc: procedure(func: TGlutDialsFunc);
-  glutTabletMotionFunc: procedure(func: TGlutTabletMotionFunc);
-  glutTabletButtonFunc: procedure(func: TGlutTabletButtonFunc);
-  glutMenuStatusFunc: procedure(func: TGlutMenuStatusFunc);
-  glutOverlayDisplayFunc: procedure(func: TGlutOverlayDisplayFunc);
-  glutWindowStatusFunc: procedure(func: TGlutWindowStatusFunc);
-  glutKeyboardUpFunc: procedure(func: TGlutKeyboardUpFunc);
-  glutSpecialUpFunc: procedure(func: TGlutSpecialUpFunc);
-  glutJoystickFunc: procedure(func: TGlutJoystickFunc; pollinterval: Int);
-
-// GLUT color index sub-API
-  glutSetColor: procedure(index: Int; red, green, blue: GLfloat);
-  glutGetColor: function(ndx, component: Int): GLfloat;
-  glutCopyColormap: procedure(win: Int);
-
-// GLUT state retrieval sub-API
-  glutGet: function(AType: GLEnum): Int;
-  glutDeviceGet: function(AType: GLEnum): Int;
-  glutExtensionSupported: function(const name: PChar): Int;
-  glutGetModifiers: function: Int;
-  glutLayerGet: function(AType: GLEnum): Int;
-
-// GLUT font sub-API
-  glutBitmapCharacter: procedure(font: Pointer; character: Int);
-  glutBitmapWidth: function(font: Pointer; character: Int): Int;
-  glutStrokeCharacter: procedure(font: Pointer; character: Int);
-  glutStrokeWidth: function(font: Pointer; character: Int): Int;
-  glutBitmapLength: function(font: Pointer; const AString: PChar): Int;
-  glutStrokeLength: function(font: Pointer; const AString: PChar): Int;
-
-// GLUT pre-built models sub-API
-  glutWireSphere: procedure(radius: GLdouble; slices, stacks: GLint);
-  glutSolidSphere: procedure(radius: GLdouble; slices, stacks: GLint);
-  glutWireCone: procedure(base: GLdouble; height: GLdouble; slices, stacks: GLint);
-  glutSolidCone: procedure(base: GLdouble; height: GLdouble; slices, stacks: GLint);
-  glutWireCube: procedure(size: GLdouble);
-  glutSolidCube: procedure(size: GLdouble);
-  glutWireTorus: procedure(innerRadius, outerRadius: GLdouble; sides, rings: GLint);
-  glutSolidTorus: procedure(innerRadius, outerRadius: GLdouble; sides, rings: GLint);
-  glutWireDodecahedron: procedure;
-  glutSolidDodecahedron: procedure;
-  glutWireTeapot: procedure(size: GLdouble);
-  glutSolidTeapot: procedure(size: GLdouble);
-  glutWireOctahedron: procedure;
-  glutSolidOctahedron: procedure;
-  glutWireTetrahedron: procedure;
-  glutSolidTetrahedron: procedure;
-  glutWireIcosahedron: procedure;
-  glutSolidIcosahedron: procedure;
-
-// GLUT video resize sub-API
-  glutVideoResizeGet: function(param: GLenum): Int;
-  glutSetupVideoResizing: procedure;
-  glutStopVideoResizing: procedure;
-  glutVideoResize: procedure(x, y, width, height: Int);
-  glutVideoPan: procedure(x, y, width, height: Int);
-
-// GLUT debugging sub-API
-  glutReportErrors: procedure;
-
-// GLUT device control sub-API
-  glutIgnoreKeyRepeat: procedure(ignore: Int);
-  glutSetKeyRepeat: procedure(repeatMode: Int);
-  glutForceJoystickFunc: procedure;
-
-// GLUT game mode sub-API
-  glutGameModeString: procedure(const AString: PChar);
-  glutEnterGameMode: function: Integer;
-  glutLeaveGameMode: procedure;
-  glutGameModeGet: function(mode: GLEnum): Int;
-
-%END

+ 0 - 121
packages/opengl/build/glut_linux.tpl

@@ -1,121 +0,0 @@
-{
-  $Id$
-
-  Translation of the GLUT 3.7 headers for Free Pascal, Linux version
-  Copyright (C) 1999-2000 Sebastian Guenther, [email protected]
-
-
-  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.
-}
-
-
-unit GLUT;
-
-{$MODE delphi}
-
-interface
-
-uses GL;
-
-function InitGLUTFromLibrary(const libname: PChar): Boolean;
-
-// determines automatically which library to use:
-function InitGLUT: Boolean;
-
-
-var
-  GLUTInitialized: Boolean;
-
-  { Set the following value to True if you want to have a list of all
-    unresolved GLUT functions dumped to the console }
-  GLUTDumpUnresolvedFunctions: Boolean;
-
-%GLUTDecls
-
-{ The following stuff does not exist in the Win32 version: }
-(* commented out because cvars don't work in Delphi mode...
-// Stroke font opaque addresses (use constants instead in source code).
-var
-  glutStrokeRoman, glutStrokeMonoRoman: Pointer; cvar; external;
-
-// Stroke font constants (use these in GLUT program).
-const
-  GLUT_STROKE_ROMAN = @glutStrokeRoman;
-  GLUT_STROKE_MONO_ROMAN = @glutStrokeMonoRoman;
-
-// Bitmap font opaque addresses (use constants instead in source code).
-var
-  glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10,
-    glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12,
-    glutBitmapHelvetica18: Pointer; cdecl; external;
-
-// Bitmap font constants (use these in GLUT program).
-const
-  GLUT_BITMAP_9_BY_15 = @glutBitmap9By15;
-  GLUT_BITMAP_8_BY_13 = @glutBitmap8By13;
-  GLUT_BITMAP_TIMES_ROMAN_10 = @glutBitmapTimesRoman10;
-  GLUT_BITMAP_TIMES_ROMAN_24 = @glutBitmapTimesRoman24;
-  GLUT_BITMAP_HELVETICA_10 = @glutBitmapHelvetica10;
-  GLUT_BITMAP_HELVETICA_12 = @glutBitmapHelvetica12;
-  GLUT_BITMAP_HELVETICA_18 = @glutBitmapHelvetica18;*)
-
-%GLUTProcs1
-
-
-implementation
-
-{$LINKLIB Xmu}
-
-function dlopen(const AFile: PChar; mode: LongInt): Pointer; external 'dl';
-function dlclose(handle: Pointer): LongInt; external 'dl';
-function dlsym(handle: Pointer; const name: PChar): Pointer; external 'dl';
-
-function LoadLibrary(const name: PChar): Pointer;
-begin
-  Result := dlopen(name, $101 {RTLD_GLOBAL or RTLD_LAZY});
-end;
-
-procedure FreeLibrary(handle: Pointer);
-begin
-  dlclose(handle);
-end;
-
-function GetProc(handle: Pointer; const name: PChar): Pointer;
-begin
-  Result := dlsym(handle, name);
-  if not Assigned(Result) and GLUTDumpUnresolvedFunctions then
-    WriteLn('Unresolved: ', name);
-end;
-
-var
-  libGLUT: Pointer;
-
-function InitGLUTFromLibrary(const libname: PChar): Boolean;
-begin
-  Result := False;
-  libGLUT := LoadLibrary(libname);
-  if not Assigned(libGLUT) then
-    exit;
-
-%GLUTProcs2
-
-  GLUTInitialized := True;
-  Result := True;
-end;
-
-
-function InitGLUT: Boolean;
-begin
-  Result := InitGLUTFromLibrary('libglut.so') or InitGLUTFromLibrary('libglut.so.3');
-end;
-
-
-
-finalization
-  if Assigned(libGLUT) then
-    FreeLibrary(libGLUT);
-end.

+ 0 - 112
packages/opengl/build/glx.def

@@ -1,112 +0,0 @@
-# This is the definition file for all GLX stuff
-
-%COPY_INTERFACE
-// ===================================================================
-//   GLX consts, types and functions
-// ===================================================================
-
-// Tokens for glXChooseVisual and glXGetConfig:
-const
-  GLX_USE_GL                            = 1;
-  GLX_BUFFER_SIZE                       = 2;
-  GLX_LEVEL                             = 3;
-  GLX_RGBA                              = 4;
-  GLX_DOUBLEBUFFER                      = 5;
-  GLX_STEREO                            = 6;
-  GLX_AUX_BUFFERS                       = 7;
-  GLX_RED_SIZE                          = 8;
-  GLX_GREEN_SIZE                        = 9;
-  GLX_BLUE_SIZE                         = 10;
-  GLX_ALPHA_SIZE                        = 11;
-  GLX_DEPTH_SIZE                        = 12;
-  GLX_STENCIL_SIZE                      = 13;
-  GLX_ACCUM_RED_SIZE                    = 14;
-  GLX_ACCUM_GREEN_SIZE                  = 15;
-  GLX_ACCUM_BLUE_SIZE                   = 16;
-  GLX_ACCUM_ALPHA_SIZE                  = 17;
-
-  // GLX_EXT_visual_info extension
-  GLX_X_VISUAL_TYPE_EXT                 = $22;
-  GLX_TRANSPARENT_TYPE_EXT              = $23;
-  GLX_TRANSPARENT_INDEX_VALUE_EXT       = $24;
-  GLX_TRANSPARENT_RED_VALUE_EXT         = $25;
-  GLX_TRANSPARENT_GREEN_VALUE_EXT       = $26;
-  GLX_TRANSPARENT_BLUE_VALUE_EXT        = $27;
-  GLX_TRANSPARENT_ALPHA_VALUE_EXT       = $28;
-
-
-  // Error codes returned by glXGetConfig:
-  GLX_BAD_SCREEN                        = 1;
-  GLX_BAD_ATTRIBUTE                     = 2;
-  GLX_NO_EXTENSION                      = 3;
-  GLX_BAD_VISUAL                        = 4;
-  GLX_BAD_CONTEXT                       = 5;
-  GLX_BAD_VALUE                         = 6;
-  GLX_BAD_ENUM                          = 7;
-
-  // GLX 1.1 and later:
-  GLX_VENDOR                            = 1;
-  GLX_VERSION                           = 2;
-  GLX_EXTENSIONS                        = 3;
-
-  // GLX_visual_info extension
-  GLX_TRUE_COLOR_EXT                    = $8002;
-  GLX_DIRECT_COLOR_EXT                  = $8003;
-  GLX_PSEUDO_COLOR_EXT                  = $8004;
-  GLX_STATIC_COLOR_EXT                  = $8005;
-  GLX_GRAY_SCALE_EXT                    = $8006;
-  GLX_STATIC_GRAY_EXT                   = $8007;
-  GLX_NONE_EXT                          = $8000;
-  GLX_TRANSPARENT_RGB_EXT               = $8008;
-  GLX_TRANSPARENT_INDEX_EXT             = $8009;
-
-type
-  // From XLib:
-  XPixmap = TXID;
-  XFont = TXID;
-  XColormap = TXID;
-
-  GLXContext = Pointer;
-  GLXPixmap = TXID;
-  GLXDrawable = TXID;
-  GLXContextID = TXID;
-
-var
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-  glXChooseVisual: function(dpy: PDisplay; screen: Integer; var attribList: Integer): PXVisualInfo; cdecl;
-  glXCreateContext: function(dpy: PDisplay; vis: PXVisualInfo; shareList: GLXContext; direct: Boolean): GLXContext; cdecl;
-  glXDestroyContext: procedure(dpy: PDisplay; ctx: GLXContext); cdecl;
-  glXMakeCurrent: function(dpy: PDisplay; drawable: GLXDrawable; ctx: GLXContext): Boolean; cdecl;
-  glXCopyContext: procedure(dpy: PDisplay; src, dst: GLXContext; mask: LongWord); cdecl;
-  glXSwapBuffers: procedure(dpy: PDisplay; drawable: GLXDrawable); cdecl;
-  glXCreateGLXPixmap: function(dpy: PDisplay; visual: PXVisualInfo; pixmap: XPixmap): GLXPixmap; cdecl;
-  glXDestroyGLXPixmap: procedure(dpy: PDisplay; pixmap: GLXPixmap); cdecl;
-  glXQueryExtension: function(dpy: PDisplay; var errorb, event: Integer): Boolean; cdecl;
-  glXQueryVersion: function(dpy: PDisplay; var maj, min: Integer): Boolean; cdecl;
-  glXIsDirect: function(dpy: PDisplay; ctx: GLXContext): Boolean; cdecl;
-  glXGetConfig: function(dpy: PDisplay; visual: PXVisualInfo; attrib: Integer; var value: Integer): Integer; cdecl;
-  glXGetCurrentContext: function: GLXContext; cdecl;
-  glXGetCurrentDrawable: function: GLXDrawable; cdecl;
-  glXWaitGL: procedure; cdecl;
-  glXWaitX: procedure; cdecl;
-  glXUseXFont: procedure(font: XFont; first, count, list: Integer); cdecl;
-
-  // GLX 1.1 and later
-  glXQueryExtensionsString: function(dpy: PDisplay; screen: Integer): PChar; cdecl;
-  glXQueryServerString: function(dpy: PDisplay; screen, name: Integer): PChar; cdecl;
-  glXGetClientString: function(dpy: PDisplay; name: Integer): PChar; cdecl;
-
-  // Mesa GLX Extensions
-  glXCreateGLXPixmapMESA: function(dpy: PDisplay; visual: PXVisualInfo; pixmap: XPixmap; cmap: XColormap): GLXPixmap; cdecl;
-  glXReleaseBufferMESA: function(dpy: PDisplay; d: GLXDrawable): Boolean; cdecl;
-  glXCopySubBufferMESA: procedure(dpy: PDisplay; drawbale: GLXDrawable; x, y, width, height: Integer); cdecl;
-  glXGetVideoSyncSGI: function(var counter: LongWord): Integer; cdecl;
-  glXWaitVideoSyncSGI: function(divisor, remainder: Integer; var count: LongWord): Integer; cdecl;
-%END

+ 0 - 1268
packages/opengl/build2/Makefile

@@ -1,1268 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/09/01]
-#
-
-defaultrule: all_units
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inlinux when running under linux
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
-	@echo You need the GNU utils package to use this Makefile!
-	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
-	@exit
-else
-inlinux=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-ifndef inlinux
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-endif
-endif
-
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inlinux
-ifndef inWinNT
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inlinux
-EXEEXT=
-else
-EXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inlinux
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-ifdef inOS2
-FPC=ppos2
-else
-FPC=ppc386
-endif
-endif
-endif
-override FPC:=$(subst $(EXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Default FPCDIR
-ifeq ($(FPCDIR),wrong)
-override FPCDIR=../../..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inlinux
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override UNITOBJECTS+=buildgl
-override EXEOBJECTS+=c_gen
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-
-# Directories
-
-
-# Packages
-
-override PACKAGES+=rtl fcl
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inlinux
-INSTALL:=install -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inlinux
-INSTALLEXE:=install -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inlinux
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inlinux
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inlinux
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEFCL=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
-	$(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEFCL
-ifneq ($(wildcard $(FPCDIR)/fcl),)
-ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
-PACKAGEDIR_FCL=$(FPCDIR)/fcl/$(OS_TARGET)
-else
-PACKAGEDIR_FCL=$(FPCDIR)/fcl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_FCL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_fcl
-package_fcl:
-	$(MAKE) -C $(PACKAGEDIR_FCL) all
-endif
-UNITDIR_FCL=$(PACKAGEDIR_FCL)
-else
-PACKAGEDIR_FCL=
-ifneq ($(wildcard $(UNITSDIR)/fcl),)
-ifneq ($(wildcard $(UNITSDIR)/fcl/$(OS_TARGET)),)
-UNITDIR_FCL=$(UNITSDIR)/fcl/$(OS_TARGET)
-else
-UNITDIR_FCL=$(UNITSDIR)/fcl
-endif
-else
-UNITDIR_FCL=
-endif
-endif
-ifdef UNITDIR_FCL
-override NEEDUNITDIR+=$(UNITDIR_FCL)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef inlinux
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY:  all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef inlinux
-ifndef LIBNAME
-	@$(ECHO) "LIBNAME not set"
-else
-	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
-	@$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef inlinux
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inlinux
-	ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(DATAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-	$(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
-	$(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inlinux
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inlinux
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
-	@$(ECHO) "Please specify ZIPNAME!"
-	@exit 1
-else
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
-	cd $(PACKDIR) ; $(TARPROG) c$(TAROPT) --file $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
-	cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-.PHONY:  fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY:  fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
-	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
-	-$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
-	@$(ECHO)
-	@$(ECHO)  == Configuration info ==
-	@$(ECHO)
-	@$(ECHO)  FPC....... $(FPC)
-	@$(ECHO)  Version... $(FPC_VERSION)
-	@$(ECHO)  CPU....... $(CPU_TARGET)
-	@$(ECHO)  Source.... $(OS_SOURCE)
-	@$(ECHO)  Target.... $(OS_TARGET)
-	@$(ECHO)
-
-fpc_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(ECHO)
-
-fpc_infoinstall:
-	@$(ECHO)
-	@$(ECHO)  == Install info ==
-	@$(ECHO)
-ifdef DATE
-	@$(ECHO)  DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
-	@$(ECHO)  PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
-	@$(ECHO)  PackageName.......... $(PACKAGENAME)
-endif
-	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
-	@$(ECHO)
-	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
-	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
-	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  DataInstallDir....... $(DATAINSTALLDIR)
-	@$(ECHO)
-	@$(ECHO)  DestZipDir........... $(DESTZIPDIR)
-	@$(ECHO)  ZipName.............. $(ZIPNAME)
-	@$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-
-#####################################################################
-# Users rules
-#####################################################################
-
-.PHONY: all_units linuxd w32d w32s
-
-all_units: linuxd w32d w32s
-
-linuxd: c_gen$(EXEEXT) ogl_lind.gen
-	c_gen ogl_lind.gen
-
-w32d: c_gen$(EXEEXT) ogl_w32d.gen
-	c_gen ogl_w32d.gen
-
-w32s: c_gen$(EXEEXT) ogl_w32s.gen
-	c_gen ogl_w32s.gen

+ 0 - 31
packages/opengl/build2/Makefile.fpc

@@ -1,31 +0,0 @@
-#
-#   Makefile.fpc for auto generation of OpenGL units
-#
-
-[targets]
-units=buildgl
-programs=c_gen
-
-[require]
-packages=fcl
-
-[dirs]
-fpcdir=../../..
-
-[defaults]
-defaultrule=all_units
-
-[rules]
-.PHONY: all_units linuxd w32d w32s
-
-all_units: linuxd w32d w32s
-
-linuxd: c_gen$(EXEEXT) ogl_lind.gen
-	c_gen ogl_lind.gen
-
-w32d: c_gen$(EXEEXT) ogl_w32d.gen
-	c_gen ogl_w32d.gen
-
-w32s: c_gen$(EXEEXT) ogl_w32s.gen
-	c_gen ogl_w32s.gen
-

+ 0 - 71
packages/opengl/build2/buildgl.pp

@@ -1,71 +0,0 @@
-{
-  $Id$
-
-  GL unit creation tool helpers
-  (c) 1999 Sebastian Guenther, [email protected]
-}
-
-{$MODE objfpc}
-{$H+}
-
-unit buildgl;
-
-interface
-uses SysUtils, Classes;
-
-type
-
-  TDefReader = class
-  protected
-    FInterfaceBlock, FProcs: TStringList;
-  public
-    constructor Create(const Filename: String);
-    property InterfaceBlock: TStringList read FInterfaceBlock;
-    property Procs: TStringList read FProcs;
-  end;
-
-
-implementation
-
-
-constructor TDefReader.Create(const Filename: String);
-type
-  TCurState = (stateNothing, stateCopyInterface, stateProcs);
-var
-  f: Text;
-  s: String;
-  state: TCurState;
-begin
-  state := stateNothing;
-  FInterfaceBlock := TStringList.Create;
-  FProcs := TStringList.Create;
-
-  Assign(f, Filename);
-  Reset(f);
-  while not EOF(f) do begin
-    ReadLn(f, s);
-    if Copy(s, 1, 1) = '#' then continue;  // Skip comments
-    if s = '%COPY_INTERFACE' then
-      state := stateCopyInterface
-    else if s = '%PROCS' then
-      state := stateProcs
-    else if s = '%END' then
-      state := stateNothing
-    else
-      case state of
-        stateCopyInterface: InterfaceBlock.Add(s);
-        stateProcs: Procs.Add(s);
-      end;
-  end;
-  Close(f);
-end;
-
-end.
-
-
-{
-  $Log$
-  Revision 1.2  2000-07-13 11:33:28  michael
-  + removed logs
- 
-}

+ 0 - 601
packages/opengl/build2/c_gen.pp

@@ -1,601 +0,0 @@
-{
-  unit generation tool
-  (C) 2000 Alexander Stohr, [email protected]
-  based upon the linux dynamic tool from Sebastian Guenther
-  with latest version "1.1 1999/12/23 13:51:50 peter"
-}
-
-{$MODE objfpc}
-{$H-}   { use normal strings }
-(* do not enable! fpc bug with H+ *)
-
-program c_gen;
-
-uses
-  SysUtils,
-  Classes,
-  buildgl;
-
-// =====================================================================
-
-type
-  ptDefFile     = ^tDefFile;
-  tDefFile      = record
-                    Name        : String;
-                    DefFile     : TDefReader;
-                    pNext       : ptDefFile;
-                  end;
-
-  ptSectionKey  = ^tSectionKey;
-  tSectionKey   = record
-                    Keyword     : String;
-                    Rule        : DWord;
-                    pDefFile    : ptDefFile;
-                    Option2     : String;
-                    pNext       : ptSectionKey;
-                  end;
-
-// =====================================================================
-
-const
-  verbose       = 0;    // change this for debugging
-
-const
-  ST_NONE       = 0;
-  ST_COMMON     = 1;
-  ST_FILE       = 2;
-
-  RULE_IG       = 0;
-  RULE_TX       = 1;
-  RULE_IF       = 2;
-  RULE_PD       = 3;
-  RULE_PL       = 4;
-  RULE_PS       = 5;
-
-// =====================================================================
-// global vars
-
-var
-  ReturnVal     : Word;
-
-  pSectionKey   : ptSectionKey;
-  pAllDefFile   : ptDefFile;
-
-  ToolName      : String;
-  TargetText    : String;
-  TargetDir     : String;
-
-  SectionType   : DWord;
-  SectionName   : String;
-
-  TemplateName  : String;
-
-// =====================================================================
-
-procedure StripSpaces(var s : String);
-var
-  L : Byte;
-begin
-  // strip leading spaces
-  while (Pos(' ',s)=1) or (Pos(#8,s)=1) do
-    Delete(s,1,1);
-
-  // strip trailing spaces
-  L := Length(s);
-  while L<>0 do
-  begin
-    if (s[L]=' ') or (s[L]=#8) then
-    begin
-      Delete(s,L,1);
-      Dec(L);
-    end
-    else
-      L := 0;
-  end;
-end;
-
-function GetName(var s : String) : String;
-var
-  Name : String;
-  P    : Byte;
-begin
-  Name := s;
-  P := Pos(',',s);
-  if p>0 then
-  begin
-    Delete(s,1,P);
-    Delete(Name,P,255);
-  end
-  else
-    s := '';
-
-  StripSpaces(Name);
-
-{  WriteLn('GetName, reminder = ',Name,',',s); }
-
-  GetName := Name;
-end;
-
-function Name2Rule(Name : String) : DWord;
-begin
-  if Name='IG'
-  then Name2Rule := RULE_IG
-  else
-  if Name='TX'
-  then Name2Rule := RULE_TX
-  else
-  if Name='IF'
-  then Name2Rule := RULE_IF
-  else
-  if Name='PD'
-  then Name2Rule := RULE_PD
-  else
-  if Name='PL'
-  then Name2Rule := RULE_PL
-  else
-  if Name='PS'
-  then Name2Rule := RULE_PS
-  else
-  begin
-    Name2Rule := RULE_IG;
-    WriteLn('error - unknown rule: ',Name);
-    ReturnVal := 1;
-  end;
-end;
-
-function AddDefFile(Name : String) : ptDefFile;
-var
-  pDefFile : ptDefFile;
-  pSearch  : ptDefFile;
-begin
-  pDefFile := NIL;
-
-  // search if file is already loaded
-  if pAllDefFile<>NIL then
-  begin
-    pSearch := pAllDefFile;
-    while pSearch<>NIL do
-    begin
-      if pSearch^.Name = Name then
-      begin
-        pDefFile := pSearch;
-        pSearch := NIL;
-      end
-      else
-        pSearch := pSearch^.pNext;
-    end;
-  end;
-
-  // create new file if its not loaded
-  if pDefFile = NIL then
-  begin
-    New(pDefFile);
-
-    pDefFile^.Name := Name;
-    pDefFile^.DefFile := TDefReader.Create(Name);
-    pDefFile^.pNext := pAllDefFile;     // chain in as first member
-
-    pAllDefFile := pDefFile;
-  end;
-
-  AddDefFile := pDefFile;
-end;
-
-procedure AddSectionKey(s : string);
-var
-  pKey : ptSectionKey;
-  t : string;
-begin
-  New(pKey);
-
-  pKey^.Keyword  := GetName(s);
-  pKey^.Rule     := Name2Rule(GetName(s));
-  pKey^.pDefFile := AddDefFile(GetName(s));
-  t := GetName(s);
-  pKey^.Option2  := t;
-  pKey^.pNext    := pSectionKey; // chain in as first member
-
-  pSectionKey   := pKey;
-end;
-
-function GetSectionKey(s : string) : ptSectionKey;
-var
-  pSearch : ptSectionKey;
-begin
-  GetSectionKey := NIL;
-
-  pSearch := pSectionKey;
-  while pSearch<>NIL do
-  begin
-    if pSearch^.Keyword = s then
-    begin
-      GetSectionKey := pSearch;
-      pSearch := NIL;
-    end
-    else pSearch := pSearch^.pNext;
-  end;
-end;
-
-procedure FreeSectionKeys;
-var
-  pSearch, pNext : ptSectionKey;
-begin
-  pSearch := pSectionKey;
-  while pSearch<>NIL do
-  begin
-    pNext := pSearch^.pNext;
-    Dispose(pSearch);
-    pSearch := pNext;
-  end;
-  pSectionKey := pSearch;
-end;
-
-// =====================================================================
-
-procedure ResetCommonSecData;
-begin
-  ToolName   := 'BuildTool';
-  TargetText := 'unknown';
-  TargetDir  := '.\';
-end;
-
-procedure ResetFileSecData;
-begin
-  FreeSectionKeys;
-  TemplateName := '';
-end;
-
-procedure InitGlobals;
-begin
-  ReturnVal := 0;
-
-  SectionType := ST_NONE;
-  pSectionKey := NIL;
-  pAllDefFile := NIL;
-
-  ResetCommonSecData;
-  ResetFileSecData;
-end;
-
-// =====================================================================
-
-procedure PrintInterface(var dest: Text; lines: TStringList);
-var
-  i: Integer;
-begin
-  for i := 0 to lines.Count - 1 do
-    WriteLn(dest, lines.Strings[i]);
-end;
-
-procedure PrintProcDecls(var dest: Text; procs: TStringList; const Modifier : String);
-var
-  i, j: Integer;
-  s: String;
-begin
-  for i := 0 to procs.Count - 1 do
-  begin
-    s := procs.Strings[i];
-    j := Pos('//', s);
-    if (Length(s) = 0)
-    then
-      WriteLn(dest)
-    else
-    if (Pos('{', s) = 1)
-    then
-      WriteLn(dest,procs.Strings[i])
-    else
-    if ((j > 0) and (Trim(s)[1] = '/')) then
-      WriteLn(dest, s)
-    else if j = 0 then
-      WriteLn(dest, s, ' ',Modifier)
-    else
-      WriteLn(dest, TrimRight(Copy(s, 1, j-1)),
-        ' ',Modifier,' ', Copy(s, j, Length(s)) );
-  end;
-end;
-
-procedure PrintProcLoaders(var dest: Text; procs: TStringList; const libname: String);
-var
-  i, j: Integer;
-  s: String;
-begin
-  for i := 0 to procs.Count - 1 do
-  begin
-    s := Trim(procs.Strings[i]);
-    if (Pos('//', s) > 0)
-    or (Pos('{', s) = 1)
-    then
-      WriteLn(dest,procs.Strings[i])
-    else
-    begin
-      j := Pos(':', s);
-      s := Trim(Copy(s, 1, j - 1));
-      if (Length(s) = 0)
-      then
-        continue
-      else
-        WriteLn(dest, '  ', s, ' := GetProc(', libname, ', ''', s, ''');');
-    end;
-  end;
-end;
-
-procedure PrintProcStatic(var dest: Text; procs: TStringList; const Modifier: String);
-var
-  i, j, k: Integer;
-  s: String;
-  t: String;
-begin
-  for i := 0 to procs.Count - 1 do
-  begin
-    s := procs.Strings[i];
-    j := Pos('//', s);
-    if (Length(s) = 0) or ((j > 0) and (Trim(s)[1] = '/')) then
-      WriteLn(dest, s)
-    else
-    begin
-      // swap order of leading symbols and remove ':'
-      t := Trim(procs.Strings[i]);
-      j := Pos(':', t);
-      t := Trim(Copy(t, 1, j - 1));
-
-      j := Pos(':', s);
-      Delete(s,1,j);
-      s := Trim(s);
-
-      j := Pos(';', s);
-      k := Pos('(', s);
-      if k>0 then if j>k then j := k;
-      k := Pos(':', s);
-      if k>0 then if j>k then j := k;
-
-      Insert(t,s,j);
-      Insert(' ',s,j);
-
-      j := Pos('//', s);
-      if j = 0 then
-        WriteLn(dest, s, ' ',Modifier)
-      else
-        WriteLn(dest, TrimRight(Copy(s, 1, j-1)),
-          ' ',Modifier,' ', Copy(s, j, Length(s)) );
-    end;
-
-  end;
-end;
-
-procedure PrintCVSLogSection(var dest: Text);
-begin
-  WriteLn(dest);
-  WriteLn(dest);
-  WriteLn(dest, '{');
-  WriteLn(dest, '  $', 'Log:$');  // needed because _this_ file might be in CVS, too
-  WriteLn(dest, '}');
-end;
-
-// =====================================================================
-
-procedure ProcessFileSection;
-var
-  f             : Text;
-  tpl           : Text;
-  s             : String;
-{  j             : Integer; }
-  tmp           : String;
-  pKey          : ptSectionKey;
-begin
-  WriteLn('Generating "',TargetDir+SectionName,'" ...');
-
-  Assign(f, TargetDir+SectionName);
-  Rewrite(f);
-
-  Assign(tpl, TemplateName);
-  Reset(tpl);
-
-  while not EOF(tpl) do
-  begin
-    ReadLn(tpl, s);
-    if Copy(s, 1, 1) = '%' then
-    begin
-      tmp := Copy(s,2,255);
-      StripSpaces(tmp);
-
-      pKey := GetSectionKey(tmp);
-
-      if pKey=NIL then
-      begin
-        WriteLn(f, '// ### ',ToolName,': Don''t know what to insert here!: ', s);
-        WriteLn('error - unknown keyword: ',tmp);
-        ReturnVal := 1;
-      end
-      else
-      begin
-        case pKey^.Rule of
-          RULE_IG : { ignore };
-          RULE_TX : { todo };
-          RULE_IF : PrintInterface(f, pKey^.pDefFile^.DefFile.InterfaceBlock);
-          RULE_PD : PrintProcDecls(f, pKey^.pDefFile^.DefFile.Procs,
-                      pKey^.Option2);
-          RULE_PL : PrintProcLoaders(f, pKey^.pDefFile^.DefFile.Procs,
-                      pKey^.Option2);
-          RULE_PS : PrintProcStatic(f, pKey^.pDefFile^.DefFile.Procs,
-                      pKey^.Option2);
-        end;
-      end;
-    end
-    else
-    begin
-      if Copy(s, 1, 1) <> '#'
-      then WriteLn(f, s);
-    end;
-  end;
-  PrintCVSLogSection(f);
-  Close(f);
-
-(*
-    if Copy(s, 1, 1) <> '#' then
-      begin
-      j := Pos('#extdecl', s);
-      if j = 0 then
-        WriteLn(f, s)
-      else
-        WriteLn(f, Copy(s, 1, j - 1), 'cdecl', Copy(s, j + 8, Length(s)));
-    end;
-*)
-
-end;
-
-procedure ProcessCommonSection;
-begin
-  if verbose>0 then
-  begin
-    WriteLn('common section:');
-    WriteLn('  ToolName   = ',ToolName);
-    WriteLn('  TargetText = ',TargetText);
-    WriteLn('  TargetDir  = ',TargetDir);
-  end;
-end;
-
-// =====================================================================
-
-procedure SectionComplete;
-begin
-  if ReturnVal=0 then { if we are error free }
-  case SectionType of
-    ST_NONE :
-      begin
-        // ignore
-      end;
-    ST_COMMON :
-      begin
-        ProcessCommonSection;
-      end;
-    ST_FILE :
-      begin
-        ProcessFileSection();
-      end;
-  end;
-end;
-
-var
-  hFGen         : Text;
-  Line          : String;
-  KeyName       : String;
-  KeyValue      : String;
-
-begin
-  InitGlobals;
-
-  WriteLn('File Generator Tool for OpenGL related Units');
-
-  if ParamCount<>1 then
-  begin
-    WriteLn('specify a generator file as parameter 1');
-    Halt(1);
-  end;
-
-  // Open Generation File
-  Assign(hFGen,ParamStr(1));
-  Reset(hFGen);
-
-  while Not(EOF(hFGen)) do
-  begin
-    ReadLn(hFGen,Line);
-    if Length(Line)>0 then
-    begin
-      if Line[1]='[' then
-      begin
-        // its a new section
-        SectionComplete;        // close previous section
-
-        Delete(Line,Pos(']',Line),255);
-        SectionName := Copy(Line,2,255);
-
-        if verbose>0 then
-          WriteLn('SectionName = ',SectionName);
-
-        if SectionName='common' then
-        begin
-          SectionType := ST_COMMON;
-          ResetCommonSecData;
-        end
-        else
-        begin
-          SectionType := ST_FILE;
-          ResetFileSecData;
-        end;
-      end
-      else
-      if Pos(Line[1],'#*;''')<>0 then
-      begin
-        // just a comment - ignore
-      end
-      else
-      begin
-        // its a key in the section
-        KeyName := Line;
-        KeyValue := Line;
-
-        Delete(KeyName,Pos('=',KeyName),255);
-        Delete(KeyValue,1,Pos('=',KeyValue));
-
-        StripSpaces(KeyName);
-        StripSpaces(KeyValue);
-
-//        WriteLn('KeyName  = ',KeyName);
-//        WriteLn('KeyValue = ',KeyValue);
-
-        case SectionType of
-          ST_COMMON :
-            begin
-              if KeyName='TOOL_NAME'
-              then ToolName := KeyValue
-              else
-              if KeyName='TARGET_TEXT'
-              then TargetText := KeyValue
-              else
-              if KeyName='TARGET_DIR'
-              then TargetDir := KeyValue
-              else
-              begin
-                WriteLn('error in script file - inside common section');
-                WriteLn('key line: ',Line);
-                ReturnVal := 1;
-              end;
-            end;
-          ST_FILE :
-            begin
-              if KeyName='TEMPLATE'
-              then TemplateName := KeyValue
-              else
-              if KeyName='KEY'
-              then AddSectionKey(KeyValue)
-              else
-              begin
-                WriteLn('error in script file - inside file section');
-                WriteLn('key line: ',Line);
-                ReturnVal := 1;
-              end;
-            end;
-          ELSE
-            begin
-              WriteLn('error in script file - not in a section');
-              WriteLn('key line: ',Line);
-              ReturnVal := 1;
-            end;
-        end;
-      end
-    end;
-  end;
-
-  SectionComplete;      // close last section
-
-  Close(hFGen);
-
-  WriteLn('Done...');
-
-  Halt(ReturnVal);
-end.
-  $Log$
-  Revision 1.2  2000-07-13 11:33:28  michael
-  + removed logs
- 
-}

+ 0 - 98
packages/opengl/build2/def2def.pas

@@ -1,98 +0,0 @@
-PROGRAM def2def;
-{ converts the rpoc section of a def file
-  from function prototye format to function varaible format
-  if not already in right form }
-
-VAR
-  Fin, Fout  : Text;
-  I, J, K, L : Word;
-  S, T, U, V : String;
-  Mode       : Word;
-
-PROCEDURE UpString(VAR S:String);
-VAR
-  I : Word;
-BEGIN
-  FOR I := 1 TO Length(S) DO
-    S[I] := UpCase(S[I]);
-END;
-
-BEGIN
-  IF ParamCount<>2 THEN
-  BEGIN
-    WriteLn('Error: Invalid parameter count');
-    WriteLn('Usage:');
-    WriteLn('  def2def [source] [destination]');
-    Halt(1);
-  END;
-
-  IF ParamStr(1)=ParamStr(2) THEN
-  BEGIN
-    WriteLn('Error: files must be different');
-    WriteLn('Usage:');
-    WriteLn('  def2def [source] [destination]');
-    Halt(1);
-  END;
-
-  Assign(Fin,ParamStr(1));
-  Reset(Fin);
-
-  Assign(Fout,ParamStr(2));
-  ReWrite(Fout);
-
-  WriteLn('Converting...');
-  Mode := 0;
-  WHILE Not(EOF(Fin)) DO
-  BEGIN
-    ReadLn(Fin,S);
-    IF Length(S)>0 THEN
-      IF S[1]='%' THEN
-      BEGIN
-        IF S='%END'            THEN Mode:=0 ELSE
-        IF S='%COPY_INTERFACE' THEN Mode:=1 ELSE
-        IF S='%PROCS'          THEN Mode:=2 ELSE
-           (* Unknown *)            Mode:=0;
-      END ELSE
-      BEGIN
-        CASE Mode OF
-          0 : { nothing };
-          1 : { nothing };
-          2 : BEGIN
-                T := S;
-                WHILE Pos(' ',T)=1 DO
-                  Delete(T,1,1);
-                I := Pos(' ',T);
-                U := Copy(T,1,I-1);
-                V := U;
-                UpString(U);
-                IF (U='PROCEDURE') OR (U='FUNCTION') THEN
-                BEGIN
-                  { this line needs swapping }
-                  Delete(T,1,I);
-                  WHILE Pos(' ',T)=1 DO
-                    Delete(T,1,1);
-                  I := Pos('(',T);
-                  J := Pos(' ',T);
-                  K := Pos(':',T);
-                  L := Pos(';',T);
-                  IF L>0 THEN
-                  BEGIN
-                    IF (I>0) AND (I<L) THEN L := I;
-                    IF (J>0) AND (J<L) THEN L := J;
-                    IF (K>0) AND (K<L) THEN L := K;
-                    Insert(': '+V,T,L);
-                    S := T;
-                  END;
-                END;
-              END;
-          ELSE { nothing };
-        END;
-      END;
-    WriteLn(Fout,S);
-  END;
-
-  Close(Fin);
-  Close(Fout);
-
-  WriteLn('Done.');
-END.

+ 0 - 1037
packages/opengl/build2/gl.def

@@ -1,1037 +0,0 @@
-# This is the definition file for all GL functions and types.
-
-%COPY_INTERFACE
-// ===================================================================
-//   GL consts, types and functions
-// ===================================================================
-
-
-// -------------------------------------------------------------------
-//   GL types
-// -------------------------------------------------------------------
-
-type
-
-  PSingle = ^Single;
-  PDouble = ^Double;
-
-  GLclampf = Single;    // single precision float in [0,1]
-  GLclampd = Double;    // double precision float in [0,1]
-
-  GLenum = Integer;
-
-type
-  GLbitfield = set of (GL_CURRENT_BIT, GL_POINT_BIT, GL_LINE_BIT,
-    GL_POLYGON_BIT, GL_POLYGON_STIPPLE_BIT, GL_PIXEL_MODE_BIT,
-    GL_LIGHTING_BIT, GL_FOG_BIT, GL_DEPTH_BUFFER_BIT, GL_ACCUM_BUFFER_BIT,
-    GL_STENCIL_BUFFER_BIT, GL_VIEWPORT_BIT, GL_TRANSFORM_BIT, GL_ENABLE_BIT,
-    GL_COLOR_BUFFER_BIT, GL_HINT_BIT, GL_EVAL_BIT, GL_LIST_BIT, GL_TEXTURE_BIT,
-    GL_SCISSOR_BIT);
-
-const
-  GL_ALL_ATTRIB_BITS = [Low(GLbitfield)..High(GLbitfield)];
-
-
-// -------------------------------------------------------------------
-//   GL constants
-// -------------------------------------------------------------------
-
-const
-  GL_NO_ERROR                           = 0;
-
-  // Boolean values
-  GL_FALSE                              = 0;
-  GL_TRUE                               = 1;
-
-  // Data types
-  GL_BYTE                               = $1400;
-  GL_UNSIGNED_BYTE                      = $1401;
-  GL_SHORT                              = $1402;
-  GL_UNSIGNED_SHORT                     = $1403;
-  GL_INT                                = $1404;
-  GL_UNSIGNED_INT                       = $1405;
-  GL_FLOAT                              = $1406;
-  GL_DOUBLE                             = $140A;
-  GL_2_BYTES                            = $1407;
-  GL_3_BYTES                            = $1408;
-  GL_4_BYTES                            = $1409;
-
-  // Primitives
-  GL_LINES                              = $0001;
-  GL_POINTS                             = $0000;
-  GL_LINE_STRIP                         = $0003;
-  GL_LINE_LOOP                          = $0002;
-  GL_TRIANGLES                          = $0004;
-  GL_TRIANGLE_STRIP                     = $0005;
-  GL_TRIANGLE_FAN                       = $0006;
-  GL_QUADS                              = $0007;
-  GL_QUAD_STRIP                         = $0008;
-  GL_POLYGON                            = $0009;
-  GL_EDGE_FLAG                          = $0B43;
-
-  // Vertex arrays
-  GL_VERTEX_ARRAY                       = $8074;
-  GL_NORMAL_ARRAY                       = $8075;
-  GL_COLOR_ARRAY                        = $8076;
-  GL_INDEX_ARRAY                        = $8077;
-  GL_TEXTURE_COORD_ARRAY                = $8078;
-  GL_EDGE_FLAG_ARRAY                    = $8079;
-  GL_VERTEX_ARRAY_SIZE                  = $807A;
-  GL_VERTEX_ARRAY_TYPE                  = $807B;
-  GL_VERTEX_ARRAY_STRIDE                = $807C;
-  GL_NORMAL_ARRAY_TYPE                  = $807E;
-  GL_NORMAL_ARRAY_STRIDE                = $807F;
-  GL_COLOR_ARRAY_SIZE                   = $8081;
-  GL_COLOR_ARRAY_TYPE                   = $8082;
-  GL_COLOR_ARRAY_STRIDE                 = $8083;
-  GL_INDEX_ARRAY_TYPE                   = $8085;
-  GL_INDEX_ARRAY_STRIDE                 = $8086;
-  GL_TEXTURE_COORD_ARRAY_SIZE           = $8088;
-  GL_TEXTURE_COORD_ARRAY_TYPE           = $8089;
-  GL_TEXTURE_COORD_ARRAY_STRIDE         = $808A;
-  GL_EDGE_FLAG_ARRAY_STRIDE             = $808C;
-  GL_VERTEX_ARRAY_POINTER               = $808E;
-  GL_NORMAL_ARRAY_POINTER               = $808F;
-  GL_COLOR_ARRAY_POINTER                = $8090;
-  GL_INDEX_ARRAY_POINTER                = $8091;
-  GL_TEXTURE_COORD_ARRAY_POINTER        = $8092;
-  GL_EDGE_FLAG_ARRAY_POINTER            = $8093;
-  GL_V2F                                = $2A20;
-  GL_V3F                                = $2A21;
-  GL_C4UB_V2F                           = $2A22;
-  GL_C4UB_V3F                           = $2A23;
-  GL_C3F_V3F                            = $2A24;
-  GL_N3F_V3F                            = $2A25;
-  GL_C4F_N3F_V3F                        = $2A26;
-  GL_T2F_V3F                            = $2A27;
-  GL_T4F_V4F                            = $2A28;
-  GL_T2F_C4UB_V3F                       = $2A29;
-  GL_T2F_C3F_V3F                        = $2A2A;
-  GL_T2F_N3F_V3F                        = $2A2B;
-  GL_T2F_C4F_N3F_V3F                    = $2A2C;
-  GL_T4F_C4F_N3F_V4F                    = $2A2D;
-
-  // Matrix Mode
-  GL_MATRIX_MODE                        = $0BA0;
-  GL_MODELVIEW                          = $1700;
-  GL_PROJECTION                         = $1701;
-  GL_TEXTURE                            = $1702;
-
-  // Points
-  GL_POINT_SMOOTH                       = $0B10;
-  GL_POINT_SIZE                         = $0B11;
-  GL_POINT_SIZE_GRANULARITY             = $0B13;
-  GL_POINT_SIZE_RANGE                   = $0B12;
-
-  // Lines
-  GL_LINE_SMOOTH                        = $0B20;
-  GL_LINE_STIPPLE                       = $0B24;
-  GL_LINE_STIPPLE_PATTERN               = $0B25;
-  GL_LINE_STIPPLE_REPEAT                = $0B26;
-  GL_LINE_WIDTH                         = $0B21;
-  GL_LINE_WIDTH_GRANULARITY             = $0B23;
-  GL_LINE_WIDTH_RANGE                   = $0B22;
-
-  // Polygons
-  GL_POINT                              = $1B00;
-  GL_LINE                               = $1B01;
-  GL_FILL                               = $1B02;
-  GL_CCW                                = $0901;
-  GL_CW                                 = $0900;
-  GL_FRONT                              = $0404;
-  GL_BACK                               = $0405;
-  GL_CULL_FACE                          = $0B44;
-  GL_CULL_FACE_MODE                     = $0B45;
-  GL_POLYGON_SMOOTH                     = $0B41;
-  GL_POLYGON_STIPPLE                    = $0B42;
-  GL_FRONT_FACE                         = $0B46;
-  GL_POLYGON_MODE                       = $0B40;
-  GL_POLYGON_OFFSET_FACTOR              = $8038;
-  GL_POLYGON_OFFSET_UNITS               = $2A00;
-  GL_POLYGON_OFFSET_POINT               = $2A01;
-  GL_POLYGON_OFFSET_LINE                = $2A02;
-  GL_POLYGON_OFFSET_FILL                = $8037;
-
-  // Display lists
-  GL_COMPILE                            = $1300;
-  GL_COMPILE_AND_EXECUTE                = $1301;
-  GL_LIST_BASE                          = $0B32;
-  GL_LIST_INDEX                         = $0B33;
-  GL_LIST_MODE                          = $0B30;
-
-  // Depth buffer
-  GL_NEVER                              = $0200;
-  GL_LESS                               = $0201;
-  GL_GEQUAL                             = $0206;
-  GL_LEQUAL                             = $0203;
-  GL_GREATER                            = $0204;
-  GL_NOTEQUAL                           = $0205;
-  GL_EQUAL                              = $0202;
-  GL_ALWAYS                             = $0207;
-  GL_DEPTH_TEST                         = $0B71;
-  GL_DEPTH_BITS                         = $0D56;
-  GL_DEPTH_CLEAR_VALUE                  = $0B73;
-  GL_DEPTH_FUNC                         = $0B74;
-  GL_DEPTH_RANGE                        = $0B70;
-  GL_DEPTH_WRITEMASK                    = $0B72;
-  GL_DEPTH_COMPONENT                    = $1902;
-
-  // Lighting
-  GL_LIGHTING                           = $0B50;
-  GL_LIGHT0                             = $4000;
-  GL_LIGHT1                             = $4001;
-  GL_LIGHT2                             = $4002;
-  GL_LIGHT3                             = $4003;
-  GL_LIGHT4                             = $4004;
-  GL_LIGHT5                             = $4005;
-  GL_LIGHT6                             = $4006;
-  GL_LIGHT7                             = $4007;
-  GL_SPOT_EXPONENT                      = $1205;
-  GL_SPOT_CUTOFF                        = $1206;
-  GL_CONSTANT_ATTENUATION               = $1207;
-  GL_LINEAR_ATTENUATION                 = $1208;
-  GL_QUADRATIC_ATTENUATION              = $1209;
-  GL_AMBIENT                            = $1200;
-  GL_DIFFUSE                            = $1201;
-  GL_SPECULAR                           = $1202;
-  GL_SHININESS                          = $1601;
-  GL_EMISSION                           = $1600;
-  GL_POSITION                           = $1203;
-  GL_SPOT_DIRECTION                     = $1204;
-  GL_AMBIENT_AND_DIFFUSE                = $1602;
-  GL_COLOR_INDEXES                      = $1603;
-  GL_LIGHT_MODEL_TWO_SIDE               = $0B52;
-  GL_LIGHT_MODEL_LOCAL_VIEWER           = $0B51;
-  GL_LIGHT_MODEL_AMBIENT                = $0B53;
-  GL_FRONT_AND_BACK                     = $0408;
-  GL_SHADE_MODEL                        = $0B54;
-  GL_FLAT                               = $1D00;
-  GL_SMOOTH                             = $1D01;
-  GL_COLOR_MATERIAL                     = $0B57;
-  GL_COLOR_MATERIAL_FACE                = $0B55;
-  GL_COLOR_MATERIAL_PARAMETER           = $0B56;
-  GL_NORMALIZE                          = $0BA1;
-
-  // User clipping planes
-  GL_CLIP_PLANE0                        = $3000;
-  GL_CLIP_PLANE1                        = $3001;
-  GL_CLIP_PLANE2                        = $3002;
-  GL_CLIP_PLANE3                        = $3003;
-  GL_CLIP_PLANE4                        = $3004;
-  GL_CLIP_PLANE5                        = $3005;
-
-  // Accumulation buffer
-  GL_ACCUM_RED_BITS                     = $0D58;
-  GL_ACCUM_GREEN_BITS                   = $0D59;
-  GL_ACCUM_BLUE_BITS                    = $0D5A;
-  GL_ACCUM_ALPHA_BITS                   = $0D5B;
-  GL_ACCUM_CLEAR_VALUE                  = $0B80;
-  GL_ACCUM                              = $0100;
-  GL_ADD                                = $0104;
-  GL_LOAD                               = $0101;
-  GL_MULT                               = $0103;
-  GL_RETURN                             = $0102;
-
-  // Alpha testing
-  GL_ALPHA_TEST                         = $0BC0;
-  GL_ALPHA_TEST_REF                     = $0BC2;
-  GL_ALPHA_TEST_FUNC                    = $0BC1;
-
-  // Blending
-  GL_BLEND                              = $0BE2;
-  GL_BLEND_SRC                          = $0BE1;
-  GL_BLEND_DST                          = $0BE0;
-  GL_ZERO                               = 0;
-  GL_ONE                                = 1;
-  GL_SRC_COLOR                          = $0300;
-  GL_ONE_MINUS_SRC_COLOR                = $0301;
-  GL_DST_COLOR                          = $0306;
-  GL_ONE_MINUS_DST_COLOR                = $0307;
-  GL_SRC_ALPHA                          = $0302;
-  GL_ONE_MINUS_SRC_ALPHA                = $0303;
-  GL_DST_ALPHA                          = $0304;
-  GL_ONE_MINUS_DST_ALPHA                = $0305;
-  GL_SRC_ALPHA_SATURATE                 = $0308;
-  GL_CONSTANT_COLOR                     = $8001;
-  GL_ONE_MINUS_CONSTANT_COLOR           = $8002;
-  GL_CONSTANT_ALPHA                     = $8003;
-  GL_ONE_MINUS_CONSTANT_ALPHA           = $8004;
-
-  // Render mode
-  GL_FEEDBACK                           = $1C01;
-  GL_RENDER                             = $1C00;
-  GL_SELECT                             = $1C02;
-
-  // Feedback
-  GL_2D                                 = $0600;
-  GL_3D                                 = $0601;
-  GL_3D_COLOR                           = $0602;
-  GL_3D_COLOR_TEXTURE                   = $0603;
-  GL_4D_COLOR_TEXTURE                   = $0604;
-  GL_POINT_TOKEN                        = $0701;
-  GL_LINE_TOKEN                         = $0702;
-  GL_LINE_RESET_TOKEN                   = $0707;
-  GL_POLYGON_TOKEN                      = $0703;
-  GL_BITMAP_TOKEN                       = $0704;
-  GL_DRAW_PIXEL_TOKEN                   = $0705;
-  GL_COPY_PIXEL_TOKEN                   = $0706;
-  GL_PASS_THROUGH_TOKEN                 = $0700;
-  GL_FEEDBACK_BUFFER_POINTER            = $0DF0;
-  GL_FEEDBACK_BUFFER_SIZE               = $0DF1;
-  GL_FEEDBACK_BUFFER_TYPE               = $0DF2;
-
-  // Selection
-  GL_SELECTION_BUFFER_POINTER           = $0DF3;
-  GL_SELECTION_BUFFER_SIZE              = $0DF4;
-
-  // Fog
-  GL_FOG                                = $0B60;
-  GL_FOG_MODE                           = $0B65;
-  GL_FOG_DENSITY                        = $0B62;
-  GL_FOG_COLOR                          = $0B66;
-  GL_FOG_INDEX                          = $0B61;
-  GL_FOG_START                          = $0B63;
-  GL_FOG_END                            = $0B64;
-  GL_LINEAR                             = $2601;
-  GL_EXP                                = $0800;
-  GL_EXP2                               = $0801;
-
-  // Logic ops
-  GL_LOGIC_OP                           = $0BF1;
-  GL_INDEX_LOGIC_OP                     = $0BF1;
-  GL_COLOR_LOGIC_OP                     = $0BF2;
-  GL_LOGIC_OP_MODE                      = $0BF0;
-  GL_CLEAR                              = $1500;
-  GL_SET                                = $150F;
-  GL_COPY                               = $1503;
-  GL_COPY_INVERTED                      = $150C;
-  GL_NOOP                               = $1505;
-  GL_INVERT                             = $150A;
-  GL_AND                                = $1501;
-  GL_NAND                               = $150E;
-  GL_OR                                 = $1507;
-  GL_NOR                                = $1508;
-  GL_XOR                                = $1506;
-  GL_EQUIV                              = $1509;
-  GL_AND_REVERSE                        = $1502;
-  GL_AND_INVERTED                       = $1504;
-  GL_OR_REVERSE                         = $150B;
-  GL_OR_INVERTED                        = $150D;
-
-  // Stencil
-  GL_STENCIL_TEST                       = $0B90;
-  GL_STENCIL_WRITEMASK                  = $0B98;
-  GL_STENCIL_BITS                       = $0D57;
-  GL_STENCIL_FUNC                       = $0B92;
-  GL_STENCIL_VALUE_MASK                 = $0B93;
-  GL_STENCIL_REF                        = $0B97;
-  GL_STENCIL_FAIL                       = $0B94;
-  GL_STENCIL_PASS_DEPTH_PASS            = $0B96;
-  GL_STENCIL_PASS_DEPTH_FAIL            = $0B95;
-  GL_STENCIL_CLEAR_VALUE                = $0B91;
-  GL_STENCIL_INDEX                      = $1901;
-  GL_KEEP                               = $1E00;
-  GL_REPLACE                            = $1E01;
-  GL_INCR                               = $1E02;
-  GL_DECR                               = $1E03;
-
-  // Buffers, Pixel Drawing/Reading
-  GL_NONE                               = 0;
-  GL_LEFT                               = $0406;
-  GL_RIGHT                              = $0407;
-  //GL_FRONT                            = $0404;
-  //GL_BACK                             = $0405;
-  //GL_FRONT_AND_BACK                   = $0408;
-  GL_FRONT_LEFT                         = $0400;
-  GL_FRONT_RIGHT                        = $0401;
-  GL_BACK_LEFT                          = $0402;
-  GL_BACK_RIGHT                         = $0403;
-  GL_AUX0                               = $0409;
-  GL_AUX1                               = $040A;
-  GL_AUX2                               = $040B;
-  GL_AUX3                               = $040C;
-  GL_COLOR_INDEX                        = $1900;
-  GL_RED                                = $1903;
-  GL_GREEN                              = $1904;
-  GL_BLUE                               = $1905;
-  GL_ALPHA                              = $1906;
-  GL_LUMINANCE                          = $1909;
-  GL_LUMINANCE_ALPHA                    = $190A;
-  GL_ALPHA_BITS                         = $0D55;
-  GL_RED_BITS                           = $0D52;
-  GL_GREEN_BITS                         = $0D53;
-  GL_BLUE_BITS                          = $0D54;
-  GL_INDEX_BITS                         = $0D51;
-  GL_SUBPIXEL_BITS                      = $0D50;
-  GL_AUX_BUFFERS                        = $0C00;
-  GL_READ_BUFFER                        = $0C02;
-  GL_DRAW_BUFFER                        = $0C01;
-  GL_DOUBLEBUFFER                       = $0C32;
-  GL_STEREO                             = $0C33;
-  GL_BITMAP                             = $1A00;
-  GL_COLOR                              = $1800;
-  GL_DEPTH                              = $1801;
-  GL_STENCIL                            = $1802;
-  GL_DITHER                             = $0BD0;
-  GL_RGB                                = $1907;
-  GL_RGBA                               = $1908;
-
-  // Implementation limits
-  GL_MAX_LIST_NESTING                   = $0B31;
-  GL_MAX_ATTRIB_STACK_DEPTH             = $0D35;
-  GL_MAX_MODELVIEW_STACK_DEPTH          = $0D36;
-  GL_MAX_NAME_STACK_DEPTH               = $0D37;
-  GL_MAX_PROJECTION_STACK_DEPTH         = $0D38;
-  GL_MAX_TEXTURE_STACK_DEPTH            = $0D39;
-  GL_MAX_EVAL_ORDER                     = $0D30;
-  GL_MAX_LIGHTS                         = $0D31;
-  GL_MAX_CLIP_PLANES                    = $0D32;
-  GL_MAX_TEXTURE_SIZE                   = $0D33;
-  GL_MAX_PIXEL_MAP_TABLE                = $0D34;
-  GL_MAX_VIEWPORT_DIMS                  = $0D3A;
-  GL_MAX_CLIENT_ATTRIB_STACK_DEPTH      = $0D3B;
-
-  // Gets
-  GL_ATTRIB_STACK_DEPTH                 = $0BB0;
-  GL_CLIENT_ATTRIB_STACK_DEPTH          = $0BB1;
-  GL_COLOR_CLEAR_VALUE                  = $0C22;
-  GL_COLOR_WRITEMASK                    = $0C23;
-  GL_CURRENT_INDEX                      = $0B01;
-  GL_CURRENT_COLOR                      = $0B00;
-  GL_CURRENT_NORMAL                     = $0B02;
-  GL_CURRENT_RASTER_COLOR               = $0B04;
-  GL_CURRENT_RASTER_DISTANCE            = $0B09;
-  GL_CURRENT_RASTER_INDEX               = $0B05;
-  GL_CURRENT_RASTER_POSITION            = $0B07;
-  GL_CURRENT_RASTER_TEXTURE_COORDS      = $0B06;
-  GL_CURRENT_RASTER_POSITION_VALID      = $0B08;
-  GL_CURRENT_TEXTURE_COORDS             = $0B03;
-  GL_INDEX_CLEAR_VALUE                  = $0C20;
-  GL_INDEX_MODE                         = $0C30;
-  GL_INDEX_WRITEMASK                    = $0C21;
-  GL_MODELVIEW_MATRIX                   = $0BA6;
-  GL_MODELVIEW_STACK_DEPTH              = $0BA3;
-  GL_NAME_STACK_DEPTH                   = $0D70;
-  GL_PROJECTION_MATRIX                  = $0BA7;
-  GL_PROJECTION_STACK_DEPTH             = $0BA4;
-  GL_RENDER_MODE                        = $0C40;
-  GL_RGBA_MODE                          = $0C31;
-  GL_TEXTURE_MATRIX                     = $0BA8;
-  GL_TEXTURE_STACK_DEPTH                = $0BA5;
-  GL_VIEWPORT                           = $0BA2;
-
-  // Evaluators
-  GL_AUTO_NORMAL                        = $0D80;
-  GL_MAP1_COLOR_4                       = $0D90;
-  GL_MAP1_GRID_DOMAIN                   = $0DD0;
-  GL_MAP1_GRID_SEGMENTS                 = $0DD1;
-  GL_MAP1_INDEX                         = $0D91;
-  GL_MAP1_NORMAL                        = $0D92;
-  GL_MAP1_TEXTURE_COORD_1               = $0D93;
-  GL_MAP1_TEXTURE_COORD_2               = $0D94;
-  GL_MAP1_TEXTURE_COORD_3               = $0D95;
-  GL_MAP1_TEXTURE_COORD_4               = $0D96;
-  GL_MAP1_VERTEX_3                      = $0D97;
-  GL_MAP1_VERTEX_4                      = $0D98;
-  GL_MAP2_COLOR_4                       = $0DB0;
-  GL_MAP2_GRID_DOMAIN                   = $0DD2;
-  GL_MAP2_GRID_SEGMENTS                 = $0DD3;
-  GL_MAP2_INDEX                         = $0DB1;
-  GL_MAP2_NORMAL                        = $0DB2;
-  GL_MAP2_TEXTURE_COORD_1               = $0DB3;
-  GL_MAP2_TEXTURE_COORD_2               = $0DB4;
-  GL_MAP2_TEXTURE_COORD_3               = $0DB5;
-  GL_MAP2_TEXTURE_COORD_4               = $0DB6;
-  GL_MAP2_VERTEX_3                      = $0DB7;
-  GL_MAP2_VERTEX_4                      = $0DB8;
-  GL_COEFF                              = $0A00;
-  GL_DOMAIN                             = $0A02;
-  GL_ORDER                              = $0A01;
-
-  // Hints
-  GL_FOG_HINT                           = $0C54;
-  GL_LINE_SMOOTH_HINT                   = $0C52;
-  GL_PERSPECTIVE_CORRECTION_HINT        = $0C50;
-  GL_POINT_SMOOTH_HINT                  = $0C51;
-  GL_POLYGON_SMOOTH_HINT                = $0C53;
-  GL_DONT_CARE                          = $1100;
-  GL_FASTEST                            = $1101;
-  GL_NICEST                             = $1102;
-
-  // Scissor box
-  GL_SCISSOR_TEST                       = $0C11;
-  GL_SCISSOR_BOX                        = $0C10;
-
-  // Pixel Mode / Transfer
-  GL_MAP_COLOR                          = $0D10;
-  GL_MAP_STENCIL                        = $0D11;
-  GL_INDEX_SHIFT                        = $0D12;
-  GL_INDEX_OFFSET                       = $0D13;
-  GL_RED_SCALE                          = $0D14;
-  GL_RED_BIAS                           = $0D15;
-  GL_GREEN_SCALE                        = $0D18;
-  GL_GREEN_BIAS                         = $0D19;
-  GL_BLUE_SCALE                         = $0D1A;
-  GL_BLUE_BIAS                          = $0D1B;
-  GL_ALPHA_SCALE                        = $0D1C;
-  GL_ALPHA_BIAS                         = $0D1D;
-  GL_DEPTH_SCALE                        = $0D1E;
-  GL_DEPTH_BIAS                         = $0D1F;
-  GL_PIXEL_MAP_S_TO_S_SIZE              = $0CB1;
-  GL_PIXEL_MAP_I_TO_I_SIZE              = $0CB0;
-  GL_PIXEL_MAP_I_TO_R_SIZE              = $0CB2;
-  GL_PIXEL_MAP_I_TO_G_SIZE              = $0CB3;
-  GL_PIXEL_MAP_I_TO_B_SIZE              = $0CB4;
-  GL_PIXEL_MAP_I_TO_A_SIZE              = $0CB5;
-  GL_PIXEL_MAP_R_TO_R_SIZE              = $0CB6;
-  GL_PIXEL_MAP_G_TO_G_SIZE              = $0CB7;
-  GL_PIXEL_MAP_B_TO_B_SIZE              = $0CB8;
-  GL_PIXEL_MAP_A_TO_A_SIZE              = $0CB9;
-  GL_PIXEL_MAP_S_TO_S                   = $0C71;
-  GL_PIXEL_MAP_I_TO_I                   = $0C70;
-  GL_PIXEL_MAP_I_TO_R                   = $0C72;
-  GL_PIXEL_MAP_I_TO_G                   = $0C73;
-  GL_PIXEL_MAP_I_TO_B                   = $0C74;
-  GL_PIXEL_MAP_I_TO_A                   = $0C75;
-  GL_PIXEL_MAP_R_TO_R                   = $0C76;
-  GL_PIXEL_MAP_G_TO_G                   = $0C77;
-  GL_PIXEL_MAP_B_TO_B                   = $0C78;
-  GL_PIXEL_MAP_A_TO_A                   = $0C79;
-  GL_PACK_ALIGNMENT                     = $0D05;
-  GL_PACK_LSB_FIRST                     = $0D01;
-  GL_PACK_ROW_LENGTH                    = $0D02;
-  GL_PACK_SKIP_PIXELS                   = $0D04;
-  GL_PACK_SKIP_ROWS                     = $0D03;
-  GL_PACK_SWAP_BYTES                    = $0D00;
-  GL_UNPACK_ALIGNMENT                   = $0CF5;
-  GL_UNPACK_LSB_FIRST                   = $0CF1;
-  GL_UNPACK_ROW_LENGTH                  = $0CF2;
-  GL_UNPACK_SKIP_PIXELS                 = $0CF4;
-  GL_UNPACK_SKIP_ROWS                   = $0CF3;
-  GL_UNPACK_SWAP_BYTES                  = $0CF0;
-  GL_ZOOM_X                             = $0D16;
-  GL_ZOOM_Y                             = $0D17;
-
-  // Texture mapping
-  GL_TEXTURE_ENV                        = $2300;
-  GL_TEXTURE_ENV_MODE                   = $2200;
-  GL_TEXTURE_1D                         = $0DE0;
-  GL_TEXTURE_2D                         = $0DE1;
-  GL_TEXTURE_WRAP_S                     = $2802;
-  GL_TEXTURE_WRAP_T                     = $2803;
-  GL_TEXTURE_MAG_FILTER                 = $2800;
-  GL_TEXTURE_MIN_FILTER                 = $2801;
-  GL_TEXTURE_ENV_COLOR                  = $2201;
-  GL_TEXTURE_GEN_S                      = $0C60;
-  GL_TEXTURE_GEN_T                      = $0C61;
-  GL_TEXTURE_GEN_MODE                   = $2500;
-  GL_TEXTURE_BORDER_COLOR               = $1004;
-  GL_TEXTURE_WIDTH                      = $1000;
-  GL_TEXTURE_HEIGHT                     = $1001;
-  GL_TEXTURE_BORDER                     = $1005;
-  GL_TEXTURE_COMPONENTS                 = $1003;
-  GL_TEXTURE_RED_SIZE                   = $805C;
-  GL_TEXTURE_GREEN_SIZE                 = $805D;
-  GL_TEXTURE_BLUE_SIZE                  = $805E;
-  GL_TEXTURE_ALPHA_SIZE                 = $805F;
-  GL_TEXTURE_LUMINANCE_SIZE             = $8060;
-  GL_TEXTURE_INTENSITY_SIZE             = $8061;
-  GL_NEAREST_MIPMAP_NEAREST             = $2700;
-  GL_NEAREST_MIPMAP_LINEAR              = $2702;
-  GL_LINEAR_MIPMAP_NEAREST              = $2701;
-  GL_LINEAR_MIPMAP_LINEAR               = $2703;
-  GL_OBJECT_LINEAR                      = $2401;
-  GL_OBJECT_PLANE                       = $2501;
-  GL_EYE_LINEAR                         = $2400;
-  GL_EYE_PLANE                          = $2502;
-  GL_SPHERE_MAP                         = $2402;
-  GL_DECAL                              = $2101;
-  GL_MODULATE                           = $2100;
-  GL_NEAREST                            = $2600;
-  GL_REPEAT                             = $2901;
-  GL_CLAMP                              = $2900;
-  GL_S                                  = $2000;
-  GL_T                                  = $2001;
-  GL_R                                  = $2002;
-  GL_Q                                  = $2003;
-  GL_TEXTURE_GEN_R                      = $0C62;
-  GL_TEXTURE_GEN_Q                      = $0C63;
-
-  // GL 1.1 texturing
-  GL_PROXY_TEXTURE_1D                   = $8063;
-  GL_PROXY_TEXTURE_2D                   = $8064;
-  GL_TEXTURE_PRIORITY                   = $8066;
-  GL_TEXTURE_RESIDENT                   = $8067;
-  GL_TEXTURE_BINDING_1D                 = $8068;
-  GL_TEXTURE_BINDING_2D                 = $8069;
-  GL_TEXTURE_INTERNAL_FORMAT            = $1003;
-
-
-  // GL 1.2 texturing
-  GL_PACK_SKIP_IMAGES                   = $806B;
-  GL_PACK_IMAGE_HEIGHT                  = $806C;
-  GL_UNPACK_SKIP_IMAGES                 = $806D;
-  GL_UNPACK_IMAGE_HEIGHT                = $806E;
-  GL_TEXTURE_3D                         = $806F;
-  GL_PROXY_TEXTURE_3D                   = $8070;
-  GL_TEXTURE_DEPTH                      = $8071;
-  GL_TEXTURE_WRAP_R                     = $8072;
-  GL_MAX_3D_TEXTURE_SIZE                = $8073;
-  GL_TEXTURE_BINDING_3D                 = $806A;
-
-  // Internal texture formats (GL 1.1)
-  GL_ALPHA4                             = $803B;
-  GL_ALPHA8                             = $803C;
-  GL_ALPHA12                            = $803D;
-  GL_ALPHA16                            = $803E;
-  GL_LUMINANCE4                         = $803F;
-  GL_LUMINANCE8                         = $8040;
-  GL_LUMINANCE12                        = $8041;
-  GL_LUMINANCE16                        = $8042;
-  GL_LUMINANCE4_ALPHA4                  = $8043;
-  GL_LUMINANCE6_ALPHA2                  = $8044;
-  GL_LUMINANCE8_ALPHA8                  = $8045;
-  GL_LUMINANCE12_ALPHA4                 = $8046;
-  GL_LUMINANCE12_ALPHA12                = $8047;
-  GL_LUMINANCE16_ALPHA16                = $8048;
-  GL_INTENSITY                          = $8049;
-  GL_INTENSITY4                         = $804A;
-  GL_INTENSITY8                         = $804B;
-  GL_INTENSITY12                        = $804C;
-  GL_INTENSITY16                        = $804D;
-  GL_R3_G3_B2                           = $2A10;
-  GL_RGB4                               = $804F;
-  GL_RGB5                               = $8050;
-  GL_RGB8                               = $8051;
-  GL_RGB10                              = $8052;
-  GL_RGB12                              = $8053;
-  GL_RGB16                              = $8054;
-  GL_RGBA2                              = $8055;
-  GL_RGBA4                              = $8056;
-  GL_RGB5_A1                            = $8057;
-  GL_RGBA8                              = $8058;
-  GL_RGB10_A2                           = $8059;
-  GL_RGBA12                             = $805A;
-  GL_RGBA16                             = $805B;
-
-  // Utility
-  GL_VENDOR                             = $1F00;
-  GL_RENDERER                           = $1F01;
-  GL_VERSION                            = $1F02;
-  GL_EXTENSIONS                         = $1F03;
-
-  // Errors
-  GL_INVALID_VALUE                      = $0501;
-  GL_INVALID_ENUM                       = $0500;
-  GL_INVALID_OPERATION                  = $0502;
-  GL_STACK_OVERFLOW                     = $0503;
-  GL_STACK_UNDERFLOW                    = $0504;
-  GL_OUT_OF_MEMORY                      = $0505;
-
-  // OpenGL 1.2
-  GL_RESCALE_NORMAL                     = $803A;
-  GL_CLAMP_TO_EDGE                      = $812F;
-  GL_MAX_ELEMENTS_VERTICES              = $F0E8;
-  GL_MAX_ELEMENTS_INDICES               = $F0E9;
-  GL_BGR                                = $80E0;
-  GL_BGRA                               = $80E1;
-  GL_UNSIGNED_BYTE_3_3_2                = $8032;
-  GL_UNSIGNED_BYTE_2_3_3_REV            = $8362;
-  GL_UNSIGNED_SHORT_5_6_5               = $8363;
-  GL_UNSIGNED_SHORT_5_6_5_REV           = $8364;
-  GL_UNSIGNED_SHORT_4_4_4_4             = $8033;
-  GL_UNSIGNED_SHORT_4_4_4_4_REV         = $8365;
-  GL_UNSIGNED_SHORT_5_5_5_1             = $8034;
-  GL_UNSIGNED_SHORT_1_5_5_5_REV         = $8366;
-  GL_UNSIGNED_INT_8_8_8_8               = $8035;
-  GL_UNSIGNED_INT_8_8_8_8_REV           = $8367;
-  GL_UNSIGNED_INT_10_10_10_2            = $8036;
-  GL_UNSIGNED_INT_2_10_10_10_REV        = $8368;
-  GL_LIGHT_MODEL_COLOR_CONTROL          = $81F8;
-  GL_SINGLE_COLOR                       = $81F9;
-  GL_SEPARATE_SPECULAR_COLOR            = $81FA;
-  GL_TEXTURE_MIN_LOD                    = $813A;
-  GL_TEXTURE_MAX_LOD                    = $813B;
-  GL_TEXTURE_BASE_LEVEL                 = $813C;
-  GL_TEXTURE_MAX_LEVEL                  = $813D;
-
-
-// -------------------------------------------------------------------
-//   GL procedures and functions
-// -------------------------------------------------------------------
-
-var
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-  // Miscellaneous
-  glClearIndex: procedure(c: Single);
-  glClearColor: procedure(red, green, blue, alpha: GLclampf);
-  glClear: procedure(mask: GLbitfield);
-  glIndexMask: procedure(mask: LongWord);
-  glColorMask: procedure(red, green, blue, alpha: Boolean);
-  glAlphaFunc: procedure(func: GLenum; ref: GLclampf);
-  glBlendFunc: procedure(sfactor, dfactor: GLenum);
-  glLogicOp: procedure(opcode: GLenum);
-  glCullFace: procedure(mode: GLenum);
-  glFrontFace: procedure(mode: GLenum);
-  glPointSize: procedure(size: Single);
-  glLineWidth: procedure(width: Single);
-  glLineStipple: procedure(factor: LongInt; pattern: Word);
-  glPolygonMode: procedure(face, mode: GLenum);
-  glPolygonOffset: procedure(factor, units: Single);
-  glPolygonStipple: procedure(var mask: Byte);
-  glGetPolygonStipple: procedure(var mask: Byte);
-  glEdgeFlag: procedure(flag: Boolean);
-  glEdgeFlagv: procedure(var flag: Boolean);
-  glScissor: procedure(x, y, width, height: LongInt);
-  glClipPlane: procedure(plane: GLenum; var equation: Double);
-  glGetClipPlane: procedure(plane: GLenum; var equation: Double);
-  glDrawBuffer: procedure(mode: GLenum);
-  glReadBuffer: procedure(mode: GLenum);
-  glEnable: procedure(cap: LongInt);
-  glDisable: procedure(cap: LongInt);
-  glIsEnabled: function(cap: GLenum): Boolean;
-  glEnableClientState: procedure(cap: GLenum);  // 1.1
-  glDisableClientState: procedure(cap: GLenum);  // 1.1
-  glGetBooleanv: procedure(pname: GLenum; var params: Boolean);
-  glGetDoublev: procedure(pname: GLenum; var params: Double);
-  glGetFloatv: procedure(pname: GLenum; var params: Single);
-  glGetIntegerv: procedure(pname: GLenum; var params: LongInt);
-  glPushAttrib: procedure(mask: GLbitfield);
-  glPopAttrib: procedure;
-  glPushClientAttrib: procedure(mask: GLbitfield);  // 1.1
-  glPopClientAttrib: procedure;  // 1.1
-  glRenderMode: function(mode: GLenum): LongInt;
-  glGetError: function: GLenum;
-  glGetString: function(name: GLenum): PChar;
-  glFinish: procedure;
-  glFlush: procedure;
-  glHint: procedure(target, mode: GLenum);
-
-
-  // Depth Buffer
-  glClearDepth: procedure(depth: GLclampd);
-  glDepthFunc: procedure(func: LongInt);
-  glDepthMask: procedure(flag: Boolean);
-  glDepthRange: procedure(near_val, far_val: GLclampd);
-
-  // Accumulation Buffer
-  glClearAccum: procedure(red, green, blue, alpha: Single);
-  glAccum: procedure(op: GLenum; value: Single);
-
-  // Tranformation
-  glMatrixMode: procedure(mode: GLenum);
-  glOrtho: procedure(left, right, bottom, top, near_val, far_val: Double);
-  glFrustum: procedure(left, right, bottom, top, near_val, far_val: Double);
-  glViewport: procedure(x, y, width, height: LongInt);
-  glPushMatrix: procedure;
-  glPopMatrix: procedure;
-  glLoadIdentity: procedure;
-  glLoadMatrixd: procedure(var m: Double);
-  glLoadMatrixf: procedure(var m: PSingle);
-  glMultMatrixd: procedure(var m: Double);
-  glMultMatrixf: procedure(var m: Single);
-  glRotated: procedure(angle, x, y, z: Double);
-  glRotatef: procedure(angle, x, y, z: Single);
-  glScaled: procedure(x, y, z: Double);
-  glScalef: procedure(x, y, z: Single);
-  glTranslated: procedure(x, y, z: Double);
-  glTranslatef: procedure(x, y, z: Single);
-
-  // Display Lists
-  glIsList: function(list: LongWord): Boolean;
-  glDeleteLists: procedure(list: LongWord; range: LongInt);
-  glGenLists: function(range: LongInt): LongWord;
-  glNewList: procedure(list: LongWord; mode: GLenum);
-  glEndList: procedure;
-  glCallList: procedure(list: LongWord);
-  glCallLists: procedure(n: LongInt; AType: GLenum; var lists);
-  glListBase: procedure(base: LongWord);
-
-  // Drawing Functions
-  glBegin: procedure(mode: GLenum);
-  glEnd: procedure;
-  glVertex2d: procedure(x, y: Double);
-  glVertex2f: procedure(x, y: Single);
-  glVertex2i: procedure(x, y: LongInt);
-  glVertex2s: procedure(x, y: SmallInt);
-  glVertex3d: procedure(x, y, z: Double);
-  glVertex3f: procedure(x, y, z: Single);
-  glVertex3i: procedure(x, y, z: LongInt);
-  glVertex3s: procedure(x, y, z: SmallInt);
-  glVertex4d: procedure(x, y, z, w: Double);
-  glVertex4f: procedure(x, y, z, w: Single);
-  glVertex4i: procedure(x, y, z, w: LongInt);
-  glVertex4s: procedure(x, y, z, w: SmallInt);
-  glVertex2dv: procedure(var v: Double);
-  glVertex2fv: procedure(var v: Single);
-  glVertex2iv: procedure(var v: LongInt);
-  glVertex2sv: procedure(var v: SmallInt);
-  glVertex3dv: procedure(var v: Double);
-  glVertex3fv: procedure(var v: Single);
-  glVertex3iv: procedure(var v: LongInt);
-  glVertex3sv: procedure(var v: SmallInt);
-  glVertex4dv: procedure(var v: Double);
-  glVertex4fv: procedure(var v: Single);
-  glVertex4iv: procedure(var v: LongInt);
-  glVertex4sv: procedure(var v: SmallInt);
-  glNormal3b: procedure(nx, ny, nz: Byte);
-  glNormal3d: procedure(nx, ny, nz: Double);
-  glNormal3f: procedure(nx, ny, nz: Single);
-  glNormal3i: procedure(nx, ny, nz: LongInt);
-  glNormal3s: procedure(nx, ny, nz: SmallInt);
-  glNormal3bv: procedure(var v: ShortInt);
-  glNormal3dv: procedure(var v: Double);
-  glNormal3fv: procedure(var v: Single);
-  glNormal3iv: procedure(var v: LongInt);
-  glNormal3sv: procedure(var v: SmallInt);
-  glIndexd: procedure(c: Double);
-  glIndexf: procedure(c: Single);
-  glIndexi: procedure(c: LongInt);
-  glIndexs: procedure(c: SmallInt);
-  glIndexub: procedure(c: Byte);  // 1.1
-  glIndexdv: procedure(var c: Double);
-  glIndexfv: procedure(var c: Single);
-  glIndexiv: procedure(var c: LongInt);
-  glIndexsv: procedure(var c: SmallInt);
-  glIndexubv: procedure(var c: Byte);  // 1.1
-  glColor3b : procedure(red, green, blue: ShortInt);
-  glColor3d : procedure(red, green, blue: Double);
-  glColor3f : procedure(red, green, blue: Single);
-  glColor3i : procedure(red, green, blue: LongInt);
-  glColor3s : procedure(red, green, blue: SmallInt);
-  glColor3ub: procedure(red, green, blue: Byte);
-  glColor3ui: procedure(red, green, blue: LongWord);
-  glColor3us: procedure(red, green, blue: Word);
-  glColor4b : procedure(red, green, blue, alpha: ShortInt);
-  glColor4d : procedure(red, green, blue, alpha: Double);
-  glColor4f : procedure(red, green, blue, alpha: Single);
-  glColor4i : procedure(red, green, blue, alpha: LongInt);
-  glColor4s : procedure(red, green, blue, alpha: SmallInt);
-  glColor4ub: procedure(red, green, blue, alpha: Byte);
-  glColor4ui: procedure(red, green, blue, alpha: LongWord);
-  glColor4us: procedure(red, green, blue, alpha: Word);
-  glColor3bv : procedure(var v: ShortInt);
-  glColor3dv : procedure(var v: Double);
-  glColor3fv : procedure(var v: Single);
-  glColor3iv : procedure(var v: LongInt);
-  glColor3sv : procedure(var v: SmallInt);
-  glColor3ubv: procedure(var v: Byte);
-  glColor3uiv: procedure(var v: LongWord);
-  glColor3usv: procedure(var v: Word);
-  glColor4bv : procedure(var v: ShortInt);
-  glColor4dv : procedure(var v: Double);
-  glColor4fv : procedure(var v: Single);
-  glColor4iv : procedure(var v: LongInt);
-  glColor4sv : procedure(var v: SmallInt);
-  glColor4ubv: procedure(var v: Byte);
-  glColor4uiv: procedure(var v: LongWord);
-  glColor4usv: procedure(var v: Word);
-  glTexCoord1d: procedure(s: Double);
-  glTexCoord1f: procedure(s: Single);
-  glTexCoord1i: procedure(s: LongInt);
-  glTexCoord1s: procedure(s: SmallInt);
-  glTexCoord2d: procedure(s, t: Double);
-  glTexCoord2f: procedure(s, t: Single);
-  glTexCoord2i: procedure(s, t: LongInt);
-  glTexCoord2s: procedure(s, t: SmallInt);
-  glTexCoord3d: procedure(s, t, r: Double);
-  glTexCoord3f: procedure(s, t, r: Single);
-  glTexCoord3i: procedure(s, t, r: LongInt);
-  glTexCoord3s: procedure(s, t, r: SmallInt);
-  glTexCoord4d: procedure(s, t, r, q: Double);
-  glTexCoord4f: procedure(s, t, r, q: Single);
-  glTexCoord4i: procedure(s, t, r, q: LongInt);
-  glTexCoord4s: procedure(s, t, r, q: SmallInt);
-  glTexCoord1dv: procedure(var v: Double);
-  glTexCoord1fv: procedure(var v: Single);
-  glTexCoord1iv: procedure(var v: LongInt);
-  glTexCoord1sv: procedure(var v: SmallInt);
-  glTexCoord2dv: procedure(var v: Double);
-  glTexCoord2fv: procedure(var v: Single);
-  glTexCoord2iv: procedure(var v: LongInt);
-  glTexCoord2sv: procedure(var v: SmallInt);
-  glTexCoord3dv: procedure(var v: Double);
-  glTexCoord3fv: procedure(var v: Single);
-  glTexCoord3iv: procedure(var v: LongInt);
-  glTexCoord3sv: procedure(var v: SmallInt);
-  glTexCoord4dv: procedure(var v: Double);
-  glTexCoord4fv: procedure(var v: Single);
-  glTexCoord4iv: procedure(var v: LongInt);
-  glTexCoord4sv: procedure(var v: SmallInt);
-  glRasterPos2d: procedure(x, y: Double);
-  glRasterPos2f: procedure(x, y: Single);
-  glRasterPos2i: procedure(x, y: LongInt);
-  glRasterPos2s: procedure(x, y: SmallInt);
-  glRasterPos3d: procedure(x, y, z: Double);
-  glRasterPos3f: procedure(x, y, z: Single);
-  glRasterPos3i: procedure(x, y, z: LongInt);
-  glRasterPos3s: procedure(x, y, z: SmallInt);
-  glRasterPos4d: procedure(x, y, z, w: Double);
-  glRasterPos4f: procedure(x, y, z, w: Single);
-  glRasterPos4i: procedure(x, y, z, w: LongInt);
-  glRasterPos4s: procedure(x, y, z, w: SmallInt);
-  glRasterPos2dv: procedure(var v: Double);
-  glRasterPos2fv: procedure(var v: Single);
-  glRasterPos2iv: procedure(var v: LongInt);
-  glRasterPos2sv: procedure(var v: SmallInt);
-  glRasterPos3dv: procedure(var v: Double);
-  glRasterPos3fv: procedure(var v: Single);
-  glRasterPos3iv: procedure(var v: LongInt);
-  glRasterPos3sv: procedure(var v: SmallInt);
-  glRasterPos4dv: procedure(var v: Double);
-  glRasterPos4fv: procedure(var v: Single);
-  glRasterPos4iv: procedure(var v: LongInt);
-  glRasterPos4sv: procedure(var v: SmallInt);
-  glRectd: procedure(x1, y1, x2, y2: Double);
-  glRectf: procedure(x1, y1, x2, y2: Single);
-  glRecti: procedure(x1, y1, x2, y2: LongInt);
-  glRects: procedure(x1, y1, x2, y2: SmallInt);
-  glRectdv: procedure(var v1, v2: Double);
-  glRectfv: procedure(var v1, v2: Single);
-  glRectiv: procedure(var v1, v2: LongInt);
-  glRectsv: procedure(var v1, v2: SmallInt);
-
-  // Vertex Arrays (1.1)
-  glVertexPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr);
-  glNormalPointer: procedure(AType: GLenum; stride: LongInt; var ptr);
-  glColorPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr);
-  glIndexPointer: procedure(AType: GLenum; stride: LongInt; var ptr);
-  glTexCoordPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr);
-  glEdgeFlagPointer: procedure(stride: LongInt; var ptr);
-  glGetPointerv: procedure(pname: GLenum; var params: Pointer);
-  glArrayElement: procedure(i: LongInt);
-  glDrawArrays: procedure(mode: GLenum; first, count: LongInt);
-  glDrawElements: procedure(mode: GLenum; count: Integer; AType: GLenum; var indices);
-  glInterleavedArrays: procedure(format: GLenum; stride: LongInt; var pointer);
-
-  // Lighting
-  glShadeModel: procedure(mode: GLenum);
-  glLightf: procedure(light, pname: GLenum; param: Single);
-  glLighti: procedure(light, pname: GLenum; param: LongInt);
-  glLightfv: procedure(light, pname: GLenum; var params: Single);
-  glLightiv: procedure(light, pname: GLenum; var params: LongInt);
-  glGetLightfv: procedure(light, pname: GLenum; var params: Single);
-  glGetLightiv: procedure(light, pname: GLenum; var params: LongInt);
-  glLightModelf: procedure(pname: GLenum; param: Single);
-  glLightModeli: procedure(pname: GLenum; param: LongInt);
-  glLightModelfv: procedure(pname: GLenum; var params: Single);
-  glLightModeliv: procedure(pname: GLenum; var param: LongInt);
-  glMaterialf: procedure(face, pname: GLenum; param: Single);
-  glMateriali: procedure(face, pname: GLenum; param: LongInt);
-  glMaterialfv: procedure(face, pname: GLenum; var params: Single);
-  glMaterialiv: procedure(face, pname: GLenum; var params: LongInt);
-  glGetMaterialfv: procedure(face, pname: GLenum; var params: Single);
-  glGetMaterialiv: procedure(face, pname: GLenum; var params: LongInt);
-  glColorMaterial: procedure(face, mode: GLenum);
-
-  // Raster Functions
-  glPixelZoom: procedure(xfactor, yfactor: Single);
-  glPixelStoref: procedure(pname: GLenum; param: Single);
-  glPixelStorei: procedure(pname: GLenum; param: LongInt);
-  glPixelTransferf: procedure(pname: GLenum; param: Single);
-  glPixelTransferi: procedure(pname: GLenum; param: LongInt);
-  glPixelMapfv: procedure(map: GLenum; mapsize: LongInt; var values: Single);
-  glPixelMapuiv: procedure(map: GLenum; mapsize: LongInt; var values: LongWord);
-  glPixelMapusv: procedure(map: GLenum; mapsize: LongInt; var values: Word);
-  glGetPixelMapfv: procedure(map: GLenum; var values: Single);
-  glGetPixelMapuiv: procedure(map: GLenum; var values: LongWord);
-  glGetPixelMapusv: procedure(map: GLenum; var values: Word);
-  glBitmap: procedure(width, height: LongInt; xorig, yorig, xmove, ymove: Single; var bitmap);
-  glReadPixels: procedure(x, y, width, height: LongInt; format, AType: GLenum; var pixels);
-  glDrawPixels: procedure(width, height: LongInt; format, AType: GLenum; var pixels);
-  glCopyPixels: procedure(x, y, width, height: LongInt; AType: GLenum);
-
-  // Stenciling
-  glStencilFunc: procedure(func: GLenum; ref: LongInt; mask: LongWord);
-  glStencilMask: procedure(mask: LongWord);
-  glStencilOp: procedure(fail, zfail, zpass: GLenum);
-  glClearStencil: procedure(s: LongInt);
-
-  // Texture Mapping
-  glTexGend: procedure(cord, pname: GLenum; param: Double);
-  glTexGenf: procedure(cord, pname: GLenum; param: Single);
-  glTexGeni: procedure(cord, pname: GLenum; param: LongInt);
-  glTexGendv: procedure(cord, pname: GLenum; var params: Double);
-  glTexGenfv: procedure(cord, pname: GLenum; var params: Single);
-  glTexGeniv: procedure(cord, pname: GLenum; var params: LongInt);
-  glGetTexGendv: procedure(cord, pname: GLenum; var params: Double);
-  glGetTexGenfv: procedure(cord, pname: GLenum; var params: Single);
-  glGetTexGeniv: procedure(cord, pname: GLenum; var params: LongInt);
-  glTexEnvf: procedure(target, pname: GLenum; param: Single);
-  glTexEnvi: procedure(target, pname: GLenum; param: LongInt);
-  glTexEnvfv: procedure(target, pname: GLenum; var params: Single);
-  glTexEnviv: procedure(target, pname: GLenum; var params: LongInt);
-  glGetTexEnvfv: procedure(target, pname: GLenum; var params: Single);
-  glGetTexEnviv: procedure(target, pname: GLenum; var params: LongInt);
-  glTexParameterf: procedure(target, pname: GLenum; param: Single);
-  glTexParameteri: procedure(target, pname: GLenum; param: LongInt);
-  glTexParameterfv: procedure(target, pname: GLenum; var params: Single);
-  glTexParameteriv: procedure(target, pname: GLenum; var params: LongInt);
-  glGetTexParameterfv: procedure(target, pname: GLenum; var params: Single);
-  glGetTexParameteriv: procedure(target, pname: GLenum; var params: LongInt);
-  glGetTexLevelParameterfv: procedure(target: GLenum; level: LongInt; pname: GLenum; var params: Single);
-  glGetTexLevelParameteriv: procedure(target: GLenum; level: LongInt; pname: GLenum; var params: LongInt);
-  glTexImage1D: procedure(target: GLenum; level, internalFormat, width, border: LongInt; format, AType: GLenum; var pixels);
-  glTexImage2D: procedure(target: GLenum; level, internalFormat, width, height, border: LongInt; format, AType: GLenum; var pixels);
-  glGetTexImage: procedure(target: GLenum; level: LongInt; format, AType: GLenum; var pixels);
-  // 1.1 functions:
-  glGenTextures: procedure(n: LongInt; var textures: LongWord);
-  glDeleteTextures: procedure(n: LongInt; var textures: LongWord);
-  glBindTexture: procedure(target: GLenum; texture: LongWord);
-  glPrioritizeTextures: procedure(n: LongInt; var textures: LongWord; var priorities: GLclampf);
-  glAreTexturesResident: function(n: LongInt; var textures: LongWord; var residences: Boolean): Boolean;
-  glIsTexture: function(texture: LongWord): Boolean;
-  glTexSubImage1D: procedure(target: GLenum; level, xoffset, width: LongInt; format, AType: GLenum; var pixels);
-  glTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, width, height: LongInt; format, AType: GLenum; var pixels);
-  glCopyTexImage1D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, border: LongInt);
-  glCopyTexImage2D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, height, border: LongInt);
-  glCopyTexSubImage1D: procedure(target: GLenum; level, xoffset, x, y, width: LongInt);
-  glCopyTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, x, y, width, height: LongInt);
-
-  // Evaluators
-  glMap1d: procedure(target: GLenum; u1, u2: Double; stride, order: LongInt; var points: Double);
-  glMap1f: procedure(target: GLenum; u1, u2: Single; stride, order: LongInt; var points: Single);
-  glMap2d: procedure(target: GLenum; u1, u2: Double; ustride, uorder: LongInt; v1, v2: Double; vstride, vorder: LongInt; var points: Double);
-  glMap2f: procedure(target: GLenum; u1, u2: Single; ustride, uorder: LongInt; v1, v2: Single; vstride, vorder: LongInt; var points: Single);
-  glGetMapdv: procedure(target, query: GLenum; var v: Double);
-  glGetMapfv: procedure(target, query: GLenum; var v: Single);
-  glGetMapiv: procedure(target, query: GLenum; var v: LongInt);
-  glEvalCoord1d: procedure(u: Double);
-  glEvalCoord1f: procedure(u: Single);
-  glEvalCoord1dv: procedure(var u: Double);
-  glEvalCoord1fv: procedure(var u: Single);
-  glEvalCoord2d: procedure(u, v: Double);
-  glEvalCoord2f: procedure(u, v: Single);
-  glEvalCoord2dv: procedure(var u, v: Double);
-  glEvalCoord2fv: procedure(var u, v: Single);
-  glMapGrid1d: procedure(un: LongInt; u1, u2: Double);
-  glMapGrid1f: procedure(un: LongInt; u1, u2: Single);
-  glMapGrid2d: procedure(un: LongInt; u1, u2: Double; vn: LongInt; v1, v2: Double);
-  glMapGrid2f: procedure(un: LongInt; u1, u2: Single; vn: LongInt; v1, v2: Single);
-  glEvalPoint1: procedure(i: LongInt);
-  glEvalPoint2: procedure(i, j: LongInt);
-  glEvalMesh1: procedure(mode: GLenum; i1, i2: LongInt);
-  glEvalMesh2: procedure(mode: GLenum; i1, i2, j1, j2: LongInt);
-
-  // Fog
-  glFogf: procedure(pname: GLenum; param: Single);
-  glFogi: procedure(pname: GLenum; param: LongInt);
-  glFogfv: procedure(pname: GLenum; var params: Single);
-  glFogiv: procedure(pname: GLenum; var params: LongInt);
-
-  // Selection and Feedback
-  glFeedbackBuffer: procedure(size: LongInt; AType: GLenum; var buffer: Single);
-  glPassThrough: procedure(token: Single);
-  glSelectBuffer: procedure(size: LongInt; var buffer: LongWord);
-  glInitNames: procedure;
-  glLoadName: procedure(name: LongWord);
-  glPushName: procedure(name: LongWord);
-  glPopName: procedure;
-%END

+ 0 - 866
packages/opengl/build2/gl10.def

@@ -1,866 +0,0 @@
-# This is the definition file for all GL 1.0 stuff
-
-%COPY_INTERFACE
-
-const
-  GL_NO_ERROR				= 0;
-
-  // Boolean values
-  GL_FALSE 				= 0;
-  GL_TRUE  				= 1;
-
-  // Data types
-  GL_BYTE           			= $1400;
-  GL_UNSIGNED_BYTE  			= $1401;
-  GL_SHORT          			= $1402;
-  GL_UNSIGNED_SHORT 			= $1403;
-  GL_INT            			= $1404;
-  GL_UNSIGNED_INT  			= $1405;
-  GL_FLOAT          			= $1406;
-  GL_DOUBLE         			= $140A;
-  GL_2_BYTES       			= $1407;
-  GL_3_BYTES        			= $1408;
-  GL_4_BYTES        			= $1409;
-
-  // Primitives
-  GL_LINES          			= $0001;
-  GL_POINTS         			= $0000;
-  GL_LINE_STRIP     			= $0003;
-  GL_LINE_LOOP      			= $0002;
-  GL_TRIANGLES      			= $0004;
-  GL_TRIANGLE_STRIP 			= $0005;
-  GL_TRIANGLE_FAN   			= $0006;
-  GL_QUADS          			= $0007;
-  GL_QUAD_STRIP     			= $0008;
-  GL_POLYGON        			= $0009;
-  GL_EDGE_FLAG      			= $0B43;
-
-  // Vertex arrays
-  GL_VERTEX_ARRAY			= $8074;
-  GL_NORMAL_ARRAY			= $8075;
-  GL_COLOR_ARRAY			= $8076;
-  GL_INDEX_ARRAY			= $8077;
-  GL_TEXTURE_COORD_ARRAY		= $8078;
-  GL_EDGE_FLAG_ARRAY			= $8079;
-  GL_VERTEX_ARRAY_SIZE			= $807A;
-  GL_VERTEX_ARRAY_TYPE			= $807B;
-  GL_VERTEX_ARRAY_STRIDE		= $807C;
-  GL_NORMAL_ARRAY_TYPE			= $807E;
-  GL_NORMAL_ARRAY_STRIDE		= $807F;
-  GL_COLOR_ARRAY_SIZE			= $8081;
-  GL_COLOR_ARRAY_TYPE			= $8082;
-  GL_COLOR_ARRAY_STRIDE			= $8083;
-  GL_INDEX_ARRAY_TYPE			= $8085;
-  GL_INDEX_ARRAY_STRIDE			= $8086;
-  GL_TEXTURE_COORD_ARRAY_SIZE		= $8088;
-  GL_TEXTURE_COORD_ARRAY_TYPE		= $8089;
-  GL_TEXTURE_COORD_ARRAY_STRIDE		= $808A;
-  GL_EDGE_FLAG_ARRAY_STRIDE		= $808C;
-  GL_VERTEX_ARRAY_POINTER		= $808E;
-  GL_NORMAL_ARRAY_POINTER		= $808F;
-  GL_COLOR_ARRAY_POINTER		= $8090;
-  GL_INDEX_ARRAY_POINTER		= $8091;
-  GL_TEXTURE_COORD_ARRAY_POINTER	= $8092;
-  GL_EDGE_FLAG_ARRAY_POINTER		= $8093;
-  GL_V2F				= $2A20;
-  GL_V3F				= $2A21;
-  GL_C4UB_V2F				= $2A22;
-  GL_C4UB_V3F				= $2A23;
-  GL_C3F_V3F				= $2A24;
-  GL_N3F_V3F				= $2A25;
-  GL_C4F_N3F_V3F			= $2A26;
-  GL_T2F_V3F				= $2A27;
-  GL_T4F_V4F				= $2A28;
-  GL_T2F_C4UB_V3F			= $2A29;
-  GL_T2F_C3F_V3F			= $2A2A;
-  GL_T2F_N3F_V3F			= $2A2B;
-  GL_T2F_C4F_N3F_V3F			= $2A2C;
-  GL_T4F_C4F_N3F_V4F			= $2A2D;
-
-  // Matrix Mode
-  GL_MATRIX_MODE			= $0BA0;
-  GL_MODELVIEW  			= $1700;
-  GL_PROJECTION 			= $1701;
-  GL_TEXTURE    			= $1702;
-
-  // Points
-  GL_POINT_SMOOTH			= $0B10;
-  GL_POINT_SIZE				= $0B11;
-  GL_POINT_SIZE_GRANULARITY 		= $0B13;
-  GL_POINT_SIZE_RANGE			= $0B12;
-
-  // Lines
-  GL_LINE_SMOOTH			= $0B20;
-  GL_LINE_STIPPLE			= $0B24;
-  GL_LINE_STIPPLE_PATTERN		= $0B25;
-  GL_LINE_STIPPLE_REPEAT		= $0B26;
-  GL_LINE_WIDTH				= $0B21;
-  GL_LINE_WIDTH_GRANULARITY		= $0B23;
-  GL_LINE_WIDTH_RANGE			= $0B22;
-
-  // Polygons
-  GL_POINT                 		= $1B00;
-  GL_LINE                  		= $1B01;
-  GL_FILL                  		= $1B02;
-  GL_CCW                   		= $0901;
-  GL_CW                    		= $0900;
-  GL_FRONT                 		= $0404;
-  GL_BACK                  		= $0405;
-  GL_CULL_FACE             		= $0B44;
-  GL_CULL_FACE_MODE        		= $0B45;
-  GL_POLYGON_SMOOTH        		= $0B41;
-  GL_POLYGON_STIPPLE       		= $0B42;
-  GL_FRONT_FACE            		= $0B46;
-  GL_POLYGON_MODE          		= $0B40;
-  GL_POLYGON_OFFSET_FACTOR 		= $8038;
-  GL_POLYGON_OFFSET_UNITS  		= $2A00;
-  GL_POLYGON_OFFSET_POINT  		= $2A01;
-  GL_POLYGON_OFFSET_LINE   		= $2A02;
-  GL_POLYGON_OFFSET_FILL   		= $8037;
-
-  // Display lists
-  GL_COMPILE				= $1300;
-  GL_COMPILE_AND_EXECUTE		= $1301;
-  GL_LIST_BASE				= $0B32;
-  GL_LIST_INDEX				= $0B33;
-  GL_LIST_MODE				= $0B30;
-
-  // Depth buffer
-  GL_NEVER             			= $0200;
-  GL_LESS              			= $0201;
-  GL_GEQUAL            			= $0206;
-  GL_LEQUAL            			= $0203;
-  GL_GREATER           			= $0204;
-  GL_NOTEQUAL          			= $0205;
-  GL_EQUAL             			= $0202;
-  GL_ALWAYS            			= $0207;
-  GL_DEPTH_TEST        			= $0B71;
-  GL_DEPTH_BITS        			= $0D56;
-  GL_DEPTH_CLEAR_VALUE 			= $0B73;
-  GL_DEPTH_FUNC        			= $0B74;
-  GL_DEPTH_RANGE       			= $0B70;
-  GL_DEPTH_WRITEMASK   			= $0B72;
-  GL_DEPTH_COMPONENT   			= $1902;
-
-  // Lighting
-  GL_LIGHTING				= $0B50;
-  GL_LIGHT0				= $4000;
-  GL_LIGHT1				= $4001;
-  GL_LIGHT2				= $4002;
-  GL_LIGHT3				= $4003;
-  GL_LIGHT4				= $4004;
-  GL_LIGHT5				= $4005;
-  GL_LIGHT6				= $4006;
-  GL_LIGHT7				= $4007;
-  GL_SPOT_EXPONENT			= $1205;
-  GL_SPOT_CUTOFF			= $1206;
-  GL_CONSTANT_ATTENUATION		= $1207;
-  GL_LINEAR_ATTENUATION			= $1208;
-  GL_QUADRATIC_ATTENUATION		= $1209;
-  GL_AMBIENT				= $1200;
-  GL_DIFFUSE				= $1201;
-  GL_SPECULAR				= $1202;
-  GL_SHININESS				= $1601;
-  GL_EMISSION				= $1600;
-  GL_POSITION				= $1203;
-  GL_SPOT_DIRECTION			= $1204;
-  GL_AMBIENT_AND_DIFFUSE		= $1602;
-  GL_COLOR_INDEXES			= $1603;
-  GL_LIGHT_MODEL_TWO_SIDE		= $0B52;
-  GL_LIGHT_MODEL_LOCAL_VIEWER		= $0B51;
-  GL_LIGHT_MODEL_AMBIENT		= $0B53;
-  GL_FRONT_AND_BACK			= $0408;
-  GL_SHADE_MODEL			= $0B54;
-  GL_FLAT				= $1D00;
-  GL_SMOOTH				= $1D01;
-  GL_COLOR_MATERIAL			= $0B57;
-  GL_COLOR_MATERIAL_FACE		= $0B55;
-  GL_COLOR_MATERIAL_PARAMETER		= $0B56;
-  GL_NORMALIZE				= $0BA1;
-
-  // User clipping planes
-  GL_CLIP_PLANE0			= $3000;
-  GL_CLIP_PLANE1			= $3001;
-  GL_CLIP_PLANE2			= $3002;
-  GL_CLIP_PLANE3			= $3003;
-  GL_CLIP_PLANE4			= $3004;
-  GL_CLIP_PLANE5			= $3005;
-
-  // Accumulation buffer
-  GL_ACCUM_RED_BITS			= $0D58;
-  GL_ACCUM_GREEN_BITS			= $0D59;
-  GL_ACCUM_BLUE_BITS			= $0D5A;
-  GL_ACCUM_ALPHA_BITS			= $0D5B;
-  GL_ACCUM_CLEAR_VALUE			= $0B80;
-  GL_ACCUM				= $0100;
-  GL_ADD				= $0104;
-  GL_LOAD				= $0101;
-  GL_MULT				= $0103;
-  GL_RETURN				= $0102;
-
-  // Alpha testing
-  GL_ALPHA_TEST				= $0BC0;
-  GL_ALPHA_TEST_REF			= $0BC2;
-  GL_ALPHA_TEST_FUNC			= $0BC1;
-
-  // Blending
-  GL_BLEND				= $0BE2;
-  GL_BLEND_SRC				= $0BE1;
-  GL_BLEND_DST				= $0BE0;
-  GL_ZERO				= 0;
-  GL_ONE				= 1;
-  GL_SRC_COLOR				= $0300;
-  GL_ONE_MINUS_SRC_COLOR		= $0301;
-  GL_DST_COLOR				= $0306;
-  GL_ONE_MINUS_DST_COLOR		= $0307;
-  GL_SRC_ALPHA				= $0302;
-  GL_ONE_MINUS_SRC_ALPHA		= $0303;
-  GL_DST_ALPHA				= $0304;
-  GL_ONE_MINUS_DST_ALPHA		= $0305;
-  GL_SRC_ALPHA_SATURATE			= $0308;
-  GL_CONSTANT_COLOR			= $8001;
-  GL_ONE_MINUS_CONSTANT_COLOR		= $8002;
-  GL_CONSTANT_ALPHA			= $8003;
-  GL_ONE_MINUS_CONSTANT_ALPHA		= $8004;
-
-  // Render mode
-  GL_FEEDBACK				= $1C01;
-  GL_RENDER				= $1C00;
-  GL_SELECT				= $1C02;
-
-  // Feedback
-  GL_2D					= $0600;
-  GL_3D					= $0601;
-  GL_3D_COLOR				= $0602;
-  GL_3D_COLOR_TEXTURE			= $0603;
-  GL_4D_COLOR_TEXTURE			= $0604;
-  GL_POINT_TOKEN			= $0701;
-  GL_LINE_TOKEN				= $0702;
-  GL_LINE_RESET_TOKEN			= $0707;
-  GL_POLYGON_TOKEN			= $0703;
-  GL_BITMAP_TOKEN			= $0704;
-  GL_DRAW_PIXEL_TOKEN			= $0705;
-  GL_COPY_PIXEL_TOKEN			= $0706;
-  GL_PASS_THROUGH_TOKEN			= $0700;
-  GL_FEEDBACK_BUFFER_POINTER		= $0DF0;
-  GL_FEEDBACK_BUFFER_SIZE		= $0DF1;
-  GL_FEEDBACK_BUFFER_TYPE		= $0DF2;
-
-  // Selection
-  GL_SELECTION_BUFFER_POINTER		= $0DF3;
-  GL_SELECTION_BUFFER_SIZE		= $0DF4;
-
-  // Fog
-  GL_FOG				= $0B60;
-  GL_FOG_MODE				= $0B65;
-  GL_FOG_DENSITY			= $0B62;
-  GL_FOG_COLOR				= $0B66;
-  GL_FOG_INDEX				= $0B61;
-  GL_FOG_START				= $0B63;
-  GL_FOG_END				= $0B64;
-  GL_LINEAR				= $2601;
-  GL_EXP				= $0800;
-  GL_EXP2				= $0801;
-
-  // Logic ops
-  GL_LOGIC_OP				= $0BF1;
-  GL_INDEX_LOGIC_OP			= $0BF1;
-  GL_COLOR_LOGIC_OP			= $0BF2;
-  GL_LOGIC_OP_MODE			= $0BF0;
-  GL_CLEAR				= $1500;
-  GL_SET				= $150F;
-  GL_COPY				= $1503;
-  GL_COPY_INVERTED			= $150C;
-  GL_NOOP				= $1505;
-  GL_INVERT				= $150A;
-  GL_AND				= $1501;
-  GL_NAND				= $150E;
-  GL_OR					= $1507;
-  GL_NOR				= $1508;
-  GL_XOR				= $1506;
-  GL_EQUIV				= $1509;
-  GL_AND_REVERSE			= $1502;
-  GL_AND_INVERTED			= $1504;
-  GL_OR_REVERSE				= $150B;
-  GL_OR_INVERTED			= $150D;
-
-  // Stencil
-  GL_STENCIL_TEST			= $0B90;
-  GL_STENCIL_WRITEMASK			= $0B98;
-  GL_STENCIL_BITS			= $0D57;
-  GL_STENCIL_FUNC			= $0B92;
-  GL_STENCIL_VALUE_MASK			= $0B93;
-  GL_STENCIL_REF			= $0B97;
-  GL_STENCIL_FAIL			= $0B94;
-  GL_STENCIL_PASS_DEPTH_PASS		= $0B96;
-  GL_STENCIL_PASS_DEPTH_FAIL		= $0B95;
-  GL_STENCIL_CLEAR_VALUE		= $0B91;
-  GL_STENCIL_INDEX			= $1901;
-  GL_KEEP				= $1E00;
-  GL_REPLACE				= $1E01;
-  GL_INCR				= $1E02;
-  GL_DECR				= $1E03;
-
-  // Buffers, Pixel Drawing/Reading
-  GL_NONE				= 0;
-  GL_LEFT				= $0406;
-  GL_RIGHT				= $0407;
-  //GL_FRONT				= $0404;
-  //GL_BACK				= $0405;
-  //GL_FRONT_AND_BACK			= $0408;
-  GL_FRONT_LEFT				= $0400;
-  GL_FRONT_RIGHT			= $0401;
-  GL_BACK_LEFT				= $0402;
-  GL_BACK_RIGHT				= $0403;
-  GL_AUX0				= $0409;
-  GL_AUX1				= $040A;
-  GL_AUX2				= $040B;
-  GL_AUX3				= $040C;
-  GL_COLOR_INDEX			= $1900;
-  GL_RED				= $1903;
-  GL_GREEN				= $1904;
-  GL_BLUE				= $1905;
-  GL_ALPHA				= $1906;
-  GL_LUMINANCE				= $1909;
-  GL_LUMINANCE_ALPHA			= $190A;
-  GL_ALPHA_BITS				= $0D55;
-  GL_RED_BITS				= $0D52;
-  GL_GREEN_BITS				= $0D53;
-  GL_BLUE_BITS				= $0D54;
-  GL_INDEX_BITS				= $0D51;
-  GL_SUBPIXEL_BITS			= $0D50;
-  GL_AUX_BUFFERS			= $0C00;
-  GL_READ_BUFFER			= $0C02;
-  GL_DRAW_BUFFER			= $0C01;
-  GL_DOUBLEBUFFER			= $0C32;
-  GL_STEREO				= $0C33;
-  GL_BITMAP				= $1A00;
-  GL_COLOR				= $1800;
-  GL_DEPTH				= $1801;
-  GL_STENCIL				= $1802;
-  GL_DITHER				= $0BD0;
-  GL_RGB				= $1907;
-  GL_RGBA				= $1908;
-
-  // Implementation limits
-  GL_MAX_LIST_NESTING			= $0B31;
-  GL_MAX_ATTRIB_STACK_DEPTH		= $0D35;
-  GL_MAX_MODELVIEW_STACK_DEPTH		= $0D36;
-  GL_MAX_NAME_STACK_DEPTH		= $0D37;
-  GL_MAX_PROJECTION_STACK_DEPTH		= $0D38;
-  GL_MAX_TEXTURE_STACK_DEPTH		= $0D39;
-  GL_MAX_EVAL_ORDER			= $0D30;
-  GL_MAX_LIGHTS				= $0D31;
-  GL_MAX_CLIP_PLANES			= $0D32;
-  GL_MAX_TEXTURE_SIZE			= $0D33;
-  GL_MAX_PIXEL_MAP_TABLE		= $0D34;
-  GL_MAX_VIEWPORT_DIMS			= $0D3A;
-  GL_MAX_CLIENT_ATTRIB_STACK_DEPTH	= $0D3B;
-
-  // Gets
-  GL_ATTRIB_STACK_DEPTH			= $0BB0;
-  GL_CLIENT_ATTRIB_STACK_DEPTH		= $0BB1;
-  GL_COLOR_CLEAR_VALUE			= $0C22;
-  GL_COLOR_WRITEMASK			= $0C23;
-  GL_CURRENT_INDEX			= $0B01;
-  GL_CURRENT_COLOR			= $0B00;
-  GL_CURRENT_NORMAL			= $0B02;
-  GL_CURRENT_RASTER_COLOR		= $0B04;
-  GL_CURRENT_RASTER_DISTANCE		= $0B09;
-  GL_CURRENT_RASTER_INDEX		= $0B05;
-  GL_CURRENT_RASTER_POSITION		= $0B07;
-  GL_CURRENT_RASTER_TEXTURE_COORDS 	= $0B06;
-  GL_CURRENT_RASTER_POSITION_VALID 	= $0B08;
-  GL_CURRENT_TEXTURE_COORDS		= $0B03;
-  GL_INDEX_CLEAR_VALUE			= $0C20;
-  GL_INDEX_MODE				= $0C30;
-  GL_INDEX_WRITEMASK			= $0C21;
-  GL_MODELVIEW_MATRIX			= $0BA6;
-  GL_MODELVIEW_STACK_DEPTH		= $0BA3;
-  GL_NAME_STACK_DEPTH			= $0D70;
-  GL_PROJECTION_MATRIX			= $0BA7;
-  GL_PROJECTION_STACK_DEPTH		= $0BA4;
-  GL_RENDER_MODE			= $0C40;
-  GL_RGBA_MODE				= $0C31;
-  GL_TEXTURE_MATRIX			= $0BA8;
-  GL_TEXTURE_STACK_DEPTH		= $0BA5;
-  GL_VIEWPORT				= $0BA2;
-
-  // Evaluators
-  GL_AUTO_NORMAL			= $0D80;
-  GL_MAP1_COLOR_4			= $0D90;
-  GL_MAP1_GRID_DOMAIN			= $0DD0;
-  GL_MAP1_GRID_SEGMENTS			= $0DD1;
-  GL_MAP1_INDEX				= $0D91;
-  GL_MAP1_NORMAL			= $0D92;
-  GL_MAP1_TEXTURE_COORD_1		= $0D93;
-  GL_MAP1_TEXTURE_COORD_2		= $0D94;
-  GL_MAP1_TEXTURE_COORD_3		= $0D95;
-  GL_MAP1_TEXTURE_COORD_4		= $0D96;
-  GL_MAP1_VERTEX_3			= $0D97;
-  GL_MAP1_VERTEX_4			= $0D98;
-  GL_MAP2_COLOR_4			= $0DB0;
-  GL_MAP2_GRID_DOMAIN			= $0DD2;
-  GL_MAP2_GRID_SEGMENTS			= $0DD3;
-  GL_MAP2_INDEX				= $0DB1;
-  GL_MAP2_NORMAL			= $0DB2;
-  GL_MAP2_TEXTURE_COORD_1		= $0DB3;
-  GL_MAP2_TEXTURE_COORD_2		= $0DB4;
-  GL_MAP2_TEXTURE_COORD_3		= $0DB5;
-  GL_MAP2_TEXTURE_COORD_4		= $0DB6;
-  GL_MAP2_VERTEX_3			= $0DB7;
-  GL_MAP2_VERTEX_4			= $0DB8;
-  GL_COEFF				= $0A00;
-  GL_DOMAIN				= $0A02;
-  GL_ORDER				= $0A01;
-
-  // Hints
-  GL_FOG_HINT				= $0C54;
-  GL_LINE_SMOOTH_HINT			= $0C52;
-  GL_PERSPECTIVE_CORRECTION_HINT	= $0C50;
-  GL_POINT_SMOOTH_HINT			= $0C51;
-  GL_POLYGON_SMOOTH_HINT		= $0C53;
-  GL_DONT_CARE				= $1100;
-  GL_FASTEST				= $1101;
-  GL_NICEST				= $1102;
-
-  // Scissor box
-  GL_SCISSOR_TEST			= $0C11;
-  GL_SCISSOR_BOX			= $0C10;
-
-  // Pixel Mode / Transfer
-  GL_MAP_COLOR				= $0D10;
-  GL_MAP_STENCIL			= $0D11;
-  GL_INDEX_SHIFT			= $0D12;
-  GL_INDEX_OFFSET			= $0D13;
-  GL_RED_SCALE				= $0D14;
-  GL_RED_BIAS				= $0D15;
-  GL_GREEN_SCALE			= $0D18;
-  GL_GREEN_BIAS				= $0D19;
-  GL_BLUE_SCALE				= $0D1A;
-  GL_BLUE_BIAS				= $0D1B;
-  GL_ALPHA_SCALE			= $0D1C;
-  GL_ALPHA_BIAS				= $0D1D;
-  GL_DEPTH_SCALE			= $0D1E;
-  GL_DEPTH_BIAS				= $0D1F;
-  GL_PIXEL_MAP_S_TO_S_SIZE		= $0CB1;
-  GL_PIXEL_MAP_I_TO_I_SIZE		= $0CB0;
-  GL_PIXEL_MAP_I_TO_R_SIZE		= $0CB2;
-  GL_PIXEL_MAP_I_TO_G_SIZE		= $0CB3;
-  GL_PIXEL_MAP_I_TO_B_SIZE		= $0CB4;
-  GL_PIXEL_MAP_I_TO_A_SIZE		= $0CB5;
-  GL_PIXEL_MAP_R_TO_R_SIZE		= $0CB6;
-  GL_PIXEL_MAP_G_TO_G_SIZE		= $0CB7;
-  GL_PIXEL_MAP_B_TO_B_SIZE		= $0CB8;
-  GL_PIXEL_MAP_A_TO_A_SIZE		= $0CB9;
-  GL_PIXEL_MAP_S_TO_S			= $0C71;
-  GL_PIXEL_MAP_I_TO_I			= $0C70;
-  GL_PIXEL_MAP_I_TO_R			= $0C72;
-  GL_PIXEL_MAP_I_TO_G			= $0C73;
-  GL_PIXEL_MAP_I_TO_B			= $0C74;
-  GL_PIXEL_MAP_I_TO_A			= $0C75;
-  GL_PIXEL_MAP_R_TO_R			= $0C76;
-  GL_PIXEL_MAP_G_TO_G			= $0C77;
-  GL_PIXEL_MAP_B_TO_B			= $0C78;
-  GL_PIXEL_MAP_A_TO_A			= $0C79;
-  GL_PACK_ALIGNMENT			= $0D05;
-  GL_PACK_LSB_FIRST			= $0D01;
-  GL_PACK_ROW_LENGTH			= $0D02;
-  GL_PACK_SKIP_PIXELS			= $0D04;
-  GL_PACK_SKIP_ROWS			= $0D03;
-  GL_PACK_SWAP_BYTES			= $0D00;
-  GL_UNPACK_ALIGNMENT			= $0CF5;
-  GL_UNPACK_LSB_FIRST			= $0CF1;
-  GL_UNPACK_ROW_LENGTH			= $0CF2;
-  GL_UNPACK_SKIP_PIXELS			= $0CF4;
-  GL_UNPACK_SKIP_ROWS			= $0CF3;
-  GL_UNPACK_SWAP_BYTES			= $0CF0;
-  GL_ZOOM_X				= $0D16;
-  GL_ZOOM_Y				= $0D17;
-
-  // Texture mapping
-  GL_TEXTURE_ENV                  	= $2300;
-  GL_TEXTURE_ENV_MODE             	= $2200;
-  GL_TEXTURE_1D                   	= $0DE0;
-  GL_TEXTURE_2D                   	= $0DE1;
-  GL_TEXTURE_WRAP_S			= $2802;
-  GL_TEXTURE_WRAP_T			= $2803;
-  GL_TEXTURE_MAG_FILTER			= $2800;
-  GL_TEXTURE_MIN_FILTER			= $2801;
-  GL_TEXTURE_ENV_COLOR			= $2201;
-  GL_TEXTURE_GEN_S			= $0C60;
-  GL_TEXTURE_GEN_T			= $0C61;
-  GL_TEXTURE_GEN_MODE			= $2500;
-  GL_TEXTURE_BORDER_COLOR		= $1004;
-  GL_TEXTURE_WIDTH			= $1000;
-  GL_TEXTURE_HEIGHT			= $1001;
-  GL_TEXTURE_BORDER			= $1005;
-  GL_TEXTURE_COMPONENTS			= $1003;
-  GL_TEXTURE_RED_SIZE			= $805C;
-  GL_TEXTURE_GREEN_SIZE			= $805D;
-  GL_TEXTURE_BLUE_SIZE			= $805E;
-  GL_TEXTURE_ALPHA_SIZE			= $805F;
-  GL_TEXTURE_LUMINANCE_SIZE		= $8060;
-  GL_TEXTURE_INTENSITY_SIZE		= $8061;
-  GL_NEAREST_MIPMAP_NEAREST		= $2700;
-  GL_NEAREST_MIPMAP_LINEAR		= $2702;
-  GL_LINEAR_MIPMAP_NEAREST		= $2701;
-  GL_LINEAR_MIPMAP_LINEAR		= $2703;
-  GL_OBJECT_LINEAR			= $2401;
-  GL_OBJECT_PLANE			= $2501;
-  GL_EYE_LINEAR				= $2400;
-  GL_EYE_PLANE				= $2502;
-  GL_SPHERE_MAP				= $2402;
-  GL_DECAL				= $2101;
-  GL_MODULATE				= $2100;
-  GL_NEAREST				= $2600;
-  GL_REPEAT				= $2901;
-  GL_CLAMP				= $2900;
-  GL_S					= $2000;
-  GL_T					= $2001;
-  GL_R					= $2002;
-  GL_Q					= $2003;
-  GL_TEXTURE_GEN_R			= $0C62;
-  GL_TEXTURE_GEN_Q			= $0C63;
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-// Miscellaneous
-glClearIndex: procedure(c: Single); 
-glClearColor: procedure(red, green, blue, alpha: GLclampf); 
-glClear: procedure(mask: GLbitfield); 
-glIndexMask: procedure(mask: LongWord); 
-glColorMask: procedure(red, green, blue, alpha: GLboolean); 
-glAlphaFunc: procedure(func: GLenum; ref: GLclampf); 
-glBlendFunc: procedure(sfactor, dfactor: GLenum); 
-glLogicOp: procedure(opcode: GLenum); 
-glCullFace: procedure(mode: GLenum); 
-glFrontFace: procedure(mode: GLenum); 
-glPointSize: procedure(size: Single); 
-glLineWidth: procedure(width: Single); 
-glLineStipple: procedure(factor: LongInt; pattern: Word); 
-glPolygonMode: procedure(face, mode: GLenum); 
-glPolygonOffset: procedure(factor, units: Single); 
-glPolygonStipple: procedure(var mask: Byte); 
-glGetPolygonStipple: procedure(var mask: Byte); 
-glEdgeFlag: procedure(flag: Boolean); 
-glEdgeFlagv: procedure(var flag: Boolean); 
-glScissor: procedure(x, y, width, height: LongInt); 
-glClipPlane: procedure(plane: GLenum; var equation: Double); 
-glGetClipPlane: procedure(plane: GLenum; var equation: Double); 
-glDrawBuffer: procedure(mode: GLenum); 
-glReadBuffer: procedure(mode: GLenum); 
-glEnable: procedure(cap: LongInt); 
-glDisable: procedure(cap: LongInt); 
-glIsEnabled: function(cap: GLenum): Boolean; 
-glGetBooleanv: procedure(pname: GLenum; var params: Boolean); 
-glGetDoublev: procedure(pname: GLenum; var params: Double); 
-glGetFloatv: procedure(pname: GLenum; var params: Single); 
-glGetIntegerv: procedure(pname: GLenum; var params: LongInt); 
-glPushAttrib: procedure(mask: GLbitfield); 
-glPopAttrib: procedure; 
-glRenderMode: function(mode: GLenum): LongInt; 
-glGetError: function: GLenum; 
-glGetString: function(name: GLenum): PChar; 
-glFinish: procedure; 
-glFlush: procedure; 
-glHint: procedure(target, mode: GLenum); 
-
-// Depth Buffer
-glClearDepth: procedure(depth: GLclampd); 
-glDepthFunc: procedure(func: LongInt); 
-glDepthMask: procedure(flag: Boolean); 
-glDepthRange: procedure(near_val, far_val: GLclampd); 
-
-// Accumulation Buffer
-glClearAccum: procedure(red, green, blue, alpha: Single); 
-glAccum: procedure(op: GLenum; value: Single); 
-
-// Tranformation
-glMatrixMode: procedure(mode: GLenum); 
-glOrtho: procedure(left, right, bottom, top, near_val, far_val: Double); 
-glFrustum: procedure(left, right, bottom, top, near_val, far_val: Double); 
-glViewport: procedure(x, y, width, height: LongInt); 
-glPushMatrix: procedure; 
-glPopMatrix: procedure; 
-glLoadIdentity: procedure; 
-glLoadMatrixd: procedure(var m: Double); 
-glLoadMatrixf: procedure(var m: PSingle); 
-glMultMatrixd: procedure(var m: Double); 
-glMultMatrixf: procedure(var m: Single); 
-glRotated: procedure(angle, x, y, z: Double); 
-glRotatef: procedure(angle, x, y, z: Single); 
-glScaled: procedure(x, y, z: Double); 
-glScalef: procedure(x, y, z: Single); 
-glTranslated: procedure(x, y, z: Double); 
-glTranslatef: procedure(x, y, z: Single); 
-
-// Display Lists
-glIsList: function(list: LongWord): Boolean; 
-glDeleteLists: procedure(list: LongWord; range: LongInt); 
-glGenLists: function(range: LongInt): LongWord; 
-glNewList: procedure(list: LongWord; mode: GLenum); 
-glEndList: procedure; 
-glCallList: procedure(list: LongWord); 
-glCallLists: procedure(n: LongInt; AType: GLenum; var lists); 
-glListBase: procedure(base: LongWord); 
-
-// Drawing Functions
-glBegin: procedure(mode: GLenum); 
-glEnd: procedure; 
-glVertex2d: procedure(x, y: Double); 
-glVertex2f: procedure(x, y: Single); 
-glVertex2i: procedure(x, y: LongInt); 
-glVertex2s: procedure(x, y: SmallInt); 
-glVertex3d: procedure(x, y, z: Double); 
-glVertex3f: procedure(x, y, z: Single); 
-glVertex3i: procedure(x, y, z: LongInt); 
-glVertex3s: procedure(x, y, z: SmallInt); 
-glVertex4d: procedure(x, y, z, w: Double); 
-glVertex4f: procedure(x, y, z, w: Single); 
-glVertex4i: procedure(x, y, z, w: LongInt); 
-glVertex4s: procedure(x, y, z, w: SmallInt); 
-glVertex2dv: procedure(var v: Double); 
-glVertex2fv: procedure(var v: Single); 
-glVertex2iv: procedure(var v: LongInt); 
-glVertex2sv: procedure(var v: SmallInt); 
-glVertex3dv: procedure(var v: Double); 
-glVertex3fv: procedure(var v: Single); 
-glVertex3iv: procedure(var v: LongInt); 
-glVertex3sv: procedure(var v: SmallInt); 
-glVertex4dv: procedure(var v: Double); 
-glVertex4fv: procedure(var v: Single); 
-glVertex4iv: procedure(var v: LongInt); 
-glVertex4sv: procedure(var v: SmallInt); 
-glNormal3b: procedure(nx, ny, nz: Byte); 
-glNormal3d: procedure(nx, ny, nz: Double); 
-glNormal3f: procedure(nx, ny, nz: Single); 
-glNormal3i: procedure(nx, ny, nz: LongInt); 
-glNormal3s: procedure(nx, ny, nz: SmallInt); 
-glNormal3bv: procedure(var v: ShortInt); 
-glNormal3dv: procedure(var v: Double); 
-glNormal3fv: procedure(var v: Single); 
-glNormal3iv: procedure(var v: LongInt); 
-glNormal3sv: procedure(var v: SmallInt); 
-glIndexd: procedure(c: Double); 
-glIndexf: procedure(c: Single); 
-glIndexi: procedure(c: LongInt); 
-glIndexs: procedure(c: SmallInt); 
-glIndexdv: procedure(var c: Double); 
-glIndexfv: procedure(var c: Single); 
-glIndexiv: procedure(var c: LongInt); 
-glIndexsv: procedure(var c: SmallInt); 
-glColor3b: procedure (red, green, blue: ShortInt); 
-glColor3d: procedure (red, green, blue: Double); 
-glColor3f: procedure (red, green, blue: Single); 
-glColor3i: procedure (red, green, blue: LongInt); 
-glColor3s: procedure (red, green, blue: SmallInt); 
-glColor3ub: procedure(red, green, blue: Byte); 
-glColor3ui: procedure(red, green, blue: LongWord); 
-glColor3us: procedure(red, green, blue: Word); 
-glColor4b: procedure (red, green, blue, alpha: ShortInt); 
-glColor4d: procedure (red, green, blue, alpha: Double); 
-glColor4f: procedure (red, green, blue, alpha: Single); 
-glColor4i: procedure (red, green, blue, alpha: LongInt); 
-glColor4s: procedure (red, green, blue, alpha: SmallInt); 
-glColor4ub: procedure(red, green, blue, alpha: Byte); 
-glColor4ui: procedure(red, green, blue, alpha: LongWord); 
-glColor4us: procedure(red, green, blue, alpha: Word); 
-glColor3bv: procedure (var v: ShortInt); 
-glColor3dv: procedure (var v: Double); 
-glColor3fv: procedure (var v: Single); 
-glColor3iv: procedure (var v: LongInt); 
-glColor3sv: procedure (var v: SmallInt); 
-glColor3ubv: procedure(var v: Byte); 
-glColor3uiv: procedure(var v: LongWord); 
-glColor3usv: procedure(var v: Word); 
-glColor4bv: procedure (var v: ShortInt); 
-glColor4dv: procedure (var v: Double); 
-glColor4fv: procedure (var v: Single); 
-glColor4iv: procedure (var v: LongInt); 
-glColor4sv: procedure (var v: SmallInt); 
-glColor4ubv: procedure(var v: Byte); 
-glColor4uiv: procedure(var v: LongWord); 
-glColor4usv: procedure(var v: Word); 
-glTexCoord1d: procedure(s: Double); 
-glTexCoord1f: procedure(s: Single); 
-glTexCoord1i: procedure(s: LongInt); 
-glTexCoord1s: procedure(s: SmallInt); 
-glTexCoord2d: procedure(s, t: Double); 
-glTexCoord2f: procedure(s, t: Single); 
-glTexCoord2i: procedure(s, t: LongInt); 
-glTexCoord2s: procedure(s, t: SmallInt); 
-glTexCoord3d: procedure(s, t, r: Double); 
-glTexCoord3f: procedure(s, t, r: Single); 
-glTexCoord3i: procedure(s, t, r: LongInt); 
-glTexCoord3s: procedure(s, t, r: SmallInt); 
-glTexCoord4d: procedure(s, t, r, q: Double); 
-glTexCoord4f: procedure(s, t, r, q: Single); 
-glTexCoord4i: procedure(s, t, r, q: LongInt); 
-glTexCoord4s: procedure(s, t, r, q: SmallInt); 
-glTexCoord1dv: procedure(var v: Double); 
-glTexCoord1fv: procedure(var v: Single); 
-glTexCoord1iv: procedure(var v: LongInt); 
-glTexCoord1sv: procedure(var v: SmallInt); 
-glTexCoord2dv: procedure(var v: Double); 
-glTexCoord2fv: procedure(var v: Single); 
-glTexCoord2iv: procedure(var v: LongInt); 
-glTexCoord2sv: procedure(var v: SmallInt); 
-glTexCoord3dv: procedure(var v: Double); 
-glTexCoord3fv: procedure(var v: Single); 
-glTexCoord3iv: procedure(var v: LongInt); 
-glTexCoord3sv: procedure(var v: SmallInt); 
-glTexCoord4dv: procedure(var v: Double); 
-glTexCoord4fv: procedure(var v: Single); 
-glTexCoord4iv: procedure(var v: LongInt); 
-glTexCoord4sv: procedure(var v: SmallInt); 
-glRasterPos2d: procedure(x, y: Double); 
-glRasterPos2f: procedure(x, y: Single); 
-glRasterPos2i: procedure(x, y: LongInt); 
-glRasterPos2s: procedure(x, y: SmallInt); 
-glRasterPos3d: procedure(x, y, z: Double); 
-glRasterPos3f: procedure(x, y, z: Single); 
-glRasterPos3i: procedure(x, y, z: LongInt); 
-glRasterPos3s: procedure(x, y, z: SmallInt); 
-glRasterPos4d: procedure(x, y, z, w: Double); 
-glRasterPos4f: procedure(x, y, z, w: Single); 
-glRasterPos4i: procedure(x, y, z, w: LongInt); 
-glRasterPos4s: procedure(x, y, z, w: SmallInt); 
-glRasterPos2dv: procedure(var v: Double); 
-glRasterPos2fv: procedure(var v: Single); 
-glRasterPos2iv: procedure(var v: LongInt); 
-glRasterPos2sv: procedure(var v: SmallInt); 
-glRasterPos3dv: procedure(var v: Double); 
-glRasterPos3fv: procedure(var v: Single); 
-glRasterPos3iv: procedure(var v: LongInt); 
-glRasterPos3sv: procedure(var v: SmallInt); 
-glRasterPos4dv: procedure(var v: Double); 
-glRasterPos4fv: procedure(var v: Single); 
-glRasterPos4iv: procedure(var v: LongInt); 
-glRasterPos4sv: procedure(var v: SmallInt); 
-glRectd: procedure(x1, y1, x2, y2: Double); 
-glRectf: procedure(x1, y1, x2, y2: Single); 
-glRecti: procedure(x1, y1, x2, y2: LongInt); 
-glRects: procedure(x1, y1, x2, y2: SmallInt); 
-glRectdv: procedure(var v1, v2: Double); 
-glRectfv: procedure(var v1, v2: Single); 
-glRectiv: procedure(var v1, v2: LongInt); 
-glRectsv: procedure(var v1, v2: SmallInt); 
-
-// Lighting
-glShadeModel: procedure(mode: GLenum); 
-glLightf: procedure(light, pname: GLenum; param: Single); 
-glLighti: procedure(light, pname: GLenum; param: LongInt); 
-glLightfv: procedure(light, pname: GLenum; var params: Single); 
-glLightiv: procedure(light, pname: GLenum; var params: LongInt); 
-glGetLightfv: procedure(light, pname: GLenum; var params: Single); 
-glGetLightiv: procedure(light, pname: GLenum; var params: LongInt); 
-glLightModelf: procedure(pname: GLenum; param: Single); 
-glLightModeli: procedure(pname: GLenum; param: LongInt); 
-glLightModelfv: procedure(pname: GLenum; var params: Single); 
-glLightModeliv: procedure(pname: GLenum; var param: LongInt); 
-glMaterialf: procedure(face, pname: GLenum; param: Single); 
-glMateriali: procedure(face, pname: GLenum; param: LongInt); 
-glMaterialfv: procedure(face, pname: GLenum; var params: Single); 
-glMaterialiv: procedure(face, pname: GLenum; var params: LongInt); 
-glGetMaterialfv: procedure(face, pname: GLenum; var params: Single); 
-glGetMaterialiv: procedure(face, pname: GLenum; var params: LongInt); 
-glColorMaterial: procedure(face, mode: GLenum); 
-
-// Raster Functions
-glPixelZoom: procedure(xfactor, yfactor: Single); 
-glPixelStoref: procedure(pname: GLenum; param: Single); 
-glPixelStorei: procedure(pname: GLenum; param: LongInt); 
-glPixelTransferf: procedure(pname: GLenum; param: Single); 
-glPixelTransferi: procedure(pname: GLenum; param: LongInt); 
-glPixelMapfv: procedure(map: GLenum; mapsize: LongInt; var values: Single); 
-glPixelMapuiv: procedure(map: GLenum; mapsize: LongInt; var values: LongWord); 
-glPixelMapusv: procedure(map: GLenum; mapsize: LongInt; var values: Word); 
-glGetPixelMapfv: procedure(map: GLenum; var values: Single); 
-glGetPixelMapuiv: procedure(map: GLenum; var values: LongWord); 
-glGetPixelMapusv: procedure(map: GLenum; var values: Word); 
-glBitmap: procedure(width, height: LongInt; xorig, yorig, xmove, ymove: Single; var bitmap); 
-glReadPixels: procedure(x, y, width, height: LongInt; format, AType: GLenum; var pixels); 
-glDrawPixels: procedure(width, height: LongInt; format, AType: GLenum; var pixels); 
-glCopyPixels: procedure(x, y, width, height: LongInt; AType: GLenum); 
-
-// Stenciling
-glStencilFunc: procedure(func: GLenum; ref: LongInt; mask: LongWord); 
-glStencilMask: procedure(mask: LongWord); 
-glStencilOp: procedure(fail, zfail, zpass: GLenum); 
-glClearStencil: procedure(s: LongInt); 
-
-// Texture Mapping
-glTexGend: procedure(cord, pname: GLenum; param: Double); 
-glTexGenf: procedure(cord, pname: GLenum; param: Single); 
-glTexGeni: procedure(cord, pname: GLenum; param: LongInt); 
-glTexGendv: procedure(cord, pname: GLenum; var params: Double); 
-glTexGenfv: procedure(cord, pname: GLenum; var params: Single); 
-glTexGeniv: procedure(cord, pname: GLenum; var params: LongInt); 
-glGetTexGendv: procedure(cord, pname: GLenum; var params: Double); 
-glGetTexGenfv: procedure(cord, pname: GLenum; var params: Single); 
-glGetTexGeniv: procedure(cord, pname: GLenum; var params: LongInt); 
-glTexEnvf: procedure(target, pname: GLenum; param: Single); 
-glTexEnvi: procedure(target, pname: GLenum; param: LongInt); 
-glTexEnvfv: procedure(target, pname: GLenum; var params: Single); 
-glTexEnviv: procedure(target, pname: GLenum; var params: LongInt); 
-glGetTexEnvfv: procedure(target, pname: GLenum; var params: Single); 
-glGetTexEnviv: procedure(target, pname: GLenum; var params: LongInt); 
-glTexParameterf: procedure(target, pname: GLenum; param: Single); 
-glTexParameteri: procedure(target, pname: GLenum; param: LongInt); 
-glTexParameterfv: procedure(target, pname: GLenum; var params: Single); 
-glTexParameteriv: procedure(target, pname: GLenum; var params: LongInt); 
-glGetTexParameterfv: procedure(target, pname: GLenum; var params: Single); 
-glGetTexParameteriv: procedure(target, pname: GLenum; var params: LongInt); 
-glGetTexLevelParameterfv: procedure(target: GLenum; level: LongInt; pname: GLenum; var params: Single); 
-glGetTexLevelParameteriv: procedure(target: GLenum; level: LongInt; pname: GLenum; var params: LongInt); 
-glTexImage1D: procedure(target: GLenum; level, internalFormat, width, border: LongInt; format, AType: GLenum; var pixels); 
-glTexImage2D: procedure(target: GLenum; level, internalFormat, width, height, border: LongInt; format, AType: GLenum; var pixels); 
-glGetTexImage: procedure(target: GLenum; level: LongInt; format, AType: GLenum; var pixels); 
-
-// Evaluators
-glMap1d: procedure(target: GLenum; u1, u2: Double; stride, order: LongInt; var points: Double); 
-glMap1f: procedure(target: GLenum; u1, u2: Single; stride, order: LongInt; var points: Single); 
-glMap2d: procedure(target: GLenum; u1, u2: Double; ustride, uorder: LongInt; v1, v2: Double; vstride, vorder: LongInt; var points: Double); 
-glMap2f: procedure(target: GLenum; u1, u2: Single; ustride, uorder: LongInt; v1, v2: Single; vstride, vorder: LongInt; var points: Single); 
-glGetMapdv: procedure(target, query: GLenum; var v: Double); 
-glGetMapfv: procedure(target, query: GLenum; var v: Single); 
-glGetMapiv: procedure(target, query: GLenum; var v: LongInt); 
-glEvalCoord1d: procedure(u: Double); 
-glEvalCoord1f: procedure(u: Single); 
-glEvalCoord1dv: procedure(var u: Double); 
-glEvalCoord1fv: procedure(var u: Single); 
-glEvalCoord2d: procedure(u, v: Double); 
-glEvalCoord2f: procedure(u, v: Single); 
-glEvalCoord2dv: procedure(var u, v: Double); 
-glEvalCoord2fv: procedure(var u, v: Single); 
-glMapGrid1d: procedure(un: LongInt; u1, u2: Double); 
-glMapGrid1f: procedure(un: LongInt; u1, u2: Single); 
-glMapGrid2d: procedure(un: LongInt; u1, u2: Double; vn: LongInt; v1, v2: Double); 
-glMapGrid2f: procedure(un: LongInt; u1, u2: Single; vn: LongInt; v1, v2: Single); 
-glEvalPoint1: procedure(i: LongInt); 
-glEvalPoint2: procedure(i, j: LongInt); 
-glEvalMesh1: procedure(mode: GLenum; i1, i2: LongInt); 
-glEvalMesh2: procedure(mode: GLenum; i1, i2, j1, j2: LongInt); 
-
-// Fog
-glFogf: procedure(pname: GLenum; param: Single); 
-glFogi: procedure(pname: GLenum; param: LongInt); 
-glFogfv: procedure(pname: GLenum; var params: Single); 
-glFogiv: procedure(pname: GLenum; var params: LongInt); 
-
-// Selection and Feedback
-glFeedbackBuffer: procedure(size: LongInt; AType: GLenum; var buffer: Single); 
-glPassThrough: procedure(token: Single); 
-glSelectBuffer: procedure(size: LongInt; var buffer: LongWord); 
-glInitNames: procedure; 
-glLoadName: procedure(name: LongWord); 
-glPushName: procedure(name: LongWord); 
-glPopName: procedure; 
-
-%END

+ 0 - 176
packages/opengl/build2/gl10ext.def

@@ -1,176 +0,0 @@
-# This is the definition file for all GL 1.0 Extensions stuff
-
-%COPY_INTERFACE
-
-const
-  // GL_EXT_blend_minmax and GL_EXT_blend_color
-  GL_CONSTANT_COLOR_EXT			= $8001;
-  GL_ONE_MINUS_CONSTANT_COLOR_EXT	= $8002;
-  GL_CONSTANT_ALPHA_EXT			= $8003;
-  GL_ONE_MINUS_CONSTANT_ALPHA_EXT	= $8004;
-  GL_BLEND_EQUATION_EXT			= $8009;
-  GL_MIN_EXT				= $8007;
-  GL_MAX_EXT				= $8008;
-  GL_FUNC_ADD_EXT			= $8006;
-  GL_FUNC_SUBTRACT_EXT			= $800A;
-  GL_FUNC_REVERSE_SUBTRACT_EXT		= $800B;
-  GL_BLEND_COLOR_EXT			= $8005;
-
-  // GL_EXT_polygon_offset
-  GL_POLYGON_OFFSET_EXT			= $8037;
-  GL_POLYGON_OFFSET_FACTOR_EXT		= $8038;
-  GL_POLYGON_OFFSET_BIAS_EXT		= $8039;
-
-  // GL_EXT_vertex_array
-  GL_VERTEX_ARRAY_EXT			= $8074;
-  GL_NORMAL_ARRAY_EXT			= $8075;
-  GL_COLOR_ARRAY_EXT			= $8076;
-  GL_INDEX_ARRAY_EXT			= $8077;
-  GL_TEXTURE_COORD_ARRAY_EXT		= $8078;
-  GL_EDGE_FLAG_ARRAY_EXT		= $8079;
-  GL_VERTEX_ARRAY_SIZE_EXT		= $807A;
-  GL_VERTEX_ARRAY_TYPE_EXT		= $807B;
-  GL_VERTEX_ARRAY_STRIDE_EXT		= $807C;
-  GL_VERTEX_ARRAY_COUNT_EXT		= $807D;
-  GL_NORMAL_ARRAY_TYPE_EXT		= $807E;
-  GL_NORMAL_ARRAY_STRIDE_EXT		= $807F;
-  GL_NORMAL_ARRAY_COUNT_EXT		= $8080;
-  GL_COLOR_ARRAY_SIZE_EXT		= $8081;
-  GL_COLOR_ARRAY_TYPE_EXT		= $8082;
-  GL_COLOR_ARRAY_STRIDE_EXT		= $8083;
-  GL_COLOR_ARRAY_COUNT_EXT		= $8084;
-  GL_INDEX_ARRAY_TYPE_EXT		= $8085;
-  GL_INDEX_ARRAY_STRIDE_EXT		= $8086;
-  GL_INDEX_ARRAY_COUNT_EXT		= $8087;
-  GL_TEXTURE_COORD_ARRAY_SIZE_EXT	= $8088;
-  GL_TEXTURE_COORD_ARRAY_TYPE_EXT	= $8089;
-  GL_TEXTURE_COORD_ARRAY_STRIDE_EXT	= $808A;
-  GL_TEXTURE_COORD_ARRAY_COUNT_EXT	= $808B;
-  GL_EDGE_FLAG_ARRAY_STRIDE_EXT		= $808C;
-  GL_EDGE_FLAG_ARRAY_COUNT_EXT		= $808D;
-  GL_VERTEX_ARRAY_POINTER_EXT		= $808E;
-  GL_NORMAL_ARRAY_POINTER_EXT		= $808F;
-  GL_COLOR_ARRAY_POINTER_EXT		= $8090;
-  GL_INDEX_ARRAY_POINTER_EXT		= $8091;
-  GL_TEXTURE_COORD_ARRAY_POINTER_EXT	= $8092;
-  GL_EDGE_FLAG_ARRAY_POINTER_EXT	= $8093;
-
-  // GL_EXT_texture_object
-  GL_TEXTURE_PRIORITY_EXT		= $8066;
-  GL_TEXTURE_RESIDENT_EXT		= $8067;
-  GL_TEXTURE_1D_BINDING_EXT		= $8068;
-  GL_TEXTURE_2D_BINDING_EXT		= $8069;
-
-  // GL_EXT_texture3D
-  GL_PACK_SKIP_IMAGES_EXT		= $806B;
-  GL_PACK_IMAGE_HEIGHT_EXT		= $806C;
-  GL_UNPACK_SKIP_IMAGES_EXT		= $806D;
-  GL_UNPACK_IMAGE_HEIGHT_EXT		= $806E;
-  GL_TEXTURE_3D_EXT			= $806F;
-  GL_PROXY_TEXTURE_3D_EXT		= $8070;
-  GL_TEXTURE_DEPTH_EXT			= $8071;
-  GL_TEXTURE_WRAP_R_EXT			= $8072;
-  GL_MAX_3D_TEXTURE_SIZE_EXT		= $8073;
-  GL_TEXTURE_3D_BINDING_EXT		= $806A;
-
-  // GL_EXT_paletted_texture
-  GL_TABLE_TOO_LARGE_EXT		= $8031;
-  GL_COLOR_TABLE_FORMAT_EXT		= $80D8;
-  GL_COLOR_TABLE_WIDTH_EXT		= $80D9;
-  GL_COLOR_TABLE_RED_SIZE_EXT		= $80DA;
-  GL_COLOR_TABLE_GREEN_SIZE_EXT		= $80DB;
-  GL_COLOR_TABLE_BLUE_SIZE_EXT		= $80DC;
-  GL_COLOR_TABLE_ALPHA_SIZE_EXT	 	= $80DD;
-  GL_COLOR_TABLE_LUMINANCE_SIZE_EXT	= $80DE;
-  GL_COLOR_TABLE_INTENSITY_SIZE_EXT	= $80DF;
-  GL_TEXTURE_INDEX_SIZE_EXT		= $80ED;
-  GL_COLOR_INDEX1_EXT			= $80E2;
-  GL_COLOR_INDEX2_EXT			= $80E3;
-  GL_COLOR_INDEX4_EXT			= $80E4;
-  GL_COLOR_INDEX8_EXT			= $80E5;
-  GL_COLOR_INDEX12_EXT			= $80E6;
-  GL_COLOR_INDEX16_EXT			= $80E7;
-
-  // GL_EXT_shared_texture_palette
-  GL_SHARED_TEXTURE_PALETTE_EXT		= $81FB;
-
-  // GL_EXT_point_parameters
-  GL_POINT_SIZE_MIN_EXT			= $8126;
-  GL_POINT_SIZE_MAX_EXT			= $8127;
-  GL_POINT_FADE_THRESHOLD_SIZE_EXT	= $8128;
-  GL_DISTANCE_ATTENUATION_EXT		= $8129;
-
-  // GL_EXT_rescale_normal
-  GL_RESCALE_NORMAL_EXT			= $803A;
-
-  // GL_EXT_abgr
-  GL_ABGR_EXT				= $8000;
-
-const
-  // GL_EXT_multitexture
-  GL_SELECTED_TEXTURE_EXT		= $83C0;
-  GL_SELECTED_TEXTURE_COORD_SET_EXT	= $83C1;
-  GL_SELECTED_TEXTURE_TRANSFORM_EXT	= $83C2;
-  GL_MAX_TEXTURES_EXT			= $83C3;
-  GL_MAX_TEXTURE_COORD_SETS_EXT		= $83C4;
-  GL_TEXTURE_ENV_COORD_SET_EXT		= $83C5;
-  GL_TEXTURE0_EXT			= $83C6;
-  GL_TEXTURE1_EXT			= $83C7;
-  GL_TEXTURE2_EXT			= $83C8;
-  GL_TEXTURE3_EXT			= $83C9;
-
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-
-// === 1.0 Extensions ===
-
-// GL_EXT_blend_minmax
-glBlendEquationEXT: procedure(mode: GLenum); ogl_dll;
-
-// GL_EXT_blend_color
-glBlendColorEXT: procedure(red, green, blue, alpha: GLclampf); ogl_dll;
-
-// GL_EXT_polygon_offset
-glPolygonOffsetEXT: procedure(factor, bias: Single); ogl_dll;
-
-// GL_EXT_vertex_array
-glVertexPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr); ogl_dll;
-glNormalPointerEXT: procedure(AType: GLenum; stride, count: LongInt; var ptr); ogl_dll;
-glColorPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr); ogl_dll;
-glIndexPointerEXT: procedure(AType: GLenum; stride, count: LongInt; var ptr); ogl_dll;
-glTexCoordPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr); ogl_dll;
-glEdgeFlagPointerEXT: procedure(stride, count: LongInt; var ptr: Boolean); ogl_dll;
-glGetPointervEXT: procedure(pname: GLenum; var params: Pointer); ogl_dll;
-glArrayElementEXT: procedure(i: LongInt); ogl_dll;
-glDrawArraysEXT: procedure(mode: GLEnum; first, count: LongInt); ogl_dll;
-
-// GL_EXT_texture_object
-glGenTexturesEXT: procedure(n: LongInt; var textures: LongWord); ogl_dll;
-glDeleteTexturesEXT: procedure(n: LongInt; var textures: LongWord); ogl_dll;
-glBindTextureEXT: procedure(target: GLenum; texture: LongWord); ogl_dll;
-glPrioritizeTexturesEXT: procedure(n: LongInt; var textures: LongWord; var priorities: GLClampf); ogl_dll;
-glAreTexturesResidentEXT: function(n: LongInt; var textures: LongWord; var residences: Boolean): Boolean; ogl_dll;
-glIsTextureEXT: function(texture: LongWord): Boolean; ogl_dll;
-
-// GL_EXT_texture3D
-glTexImage3DEXT: procedure(target: GLenum; level: LongInt; internalFormat: GLenum; width, height, depth, border: LongInt; format, AType: GLenum; var pixels); ogl_dll;
-glTexSubImage3DEXT: procedure(target: GLenum; level, xoffset, yoffset, zoffset, width, height, depth: LongInt; format, AType: GLenum; var pixels); ogl_dll;
-glCopyTexSubImage3DEXT: procedure(target: GLenum; level, xoffset, yoffset, zoffset, x, y, width, height: LongInt); ogl_dll;
-
-// GL_EXT_color_table
-glColorTableEXT: procedure(target, internalformat: GLenum; width: LongInt; format, AType: GLenum; var table); ogl_dll;
-glColorSubTableEXT: procedure(target: GLenum; start, count: LongInt; format, AType: GLEnum; var data); ogl_dll;
-glGetColorTableEXT: procedure(target, format, AType: GLenum; var table); ogl_dll;
-glGetColorTableParameterfvEXT: procedure(target, pname: GLenum; var params: Single); ogl_dll;
-glGetColorTableParameterivEXT: procedure(target, pname: GLenum; var params: LongInt); ogl_dll;
-
-%END
-
-
-

+ 0 - 40
packages/opengl/build2/gl10mesa.def

@@ -1,40 +0,0 @@
-# This is the definition file for all GL mesa stuff
-
-%COPY_INTERFACE
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-// GL_MESA_window_pos
-glWindowPos2iMESA: procedure(x, y: LongInt); ogl_dll;
-glWindowPos2sMESA: procedure(x, y: ShortInt); ogl_dll;
-glWindowPos2fMESA: procedure(x, y: Single); ogl_dll;
-glWindowPos2dMESA: procedure(x, y: Double); ogl_dll;
-glWindowPos2ivMESA: procedure(var p: LongInt); ogl_dll;
-glWindowPos2svMESA: procedure(var p: ShortInt); ogl_dll;
-glWindowPos2fvMESA: procedure(var p: Single); ogl_dll;
-glWindowPos2dvMESA: procedure(var p: Double); ogl_dll;
-glWindowPos3iMESA: procedure(x, y, z: LongInt); ogl_dll;
-glWindowPos3sMESA: procedure(x, y, z: ShortInt); ogl_dll;
-glWindowPos3fMESA: procedure(x, y, z: Single); ogl_dll;
-glWindowPos3dMESA: procedure(x, y, z: Double); ogl_dll;
-glWindowPos3ivMESA: procedure(var p: LongInt); ogl_dll;
-glWindowPos3svMESA: procedure(var p: ShortInt); ogl_dll;
-glWindowPos3fvMESA: procedure(var p: Single); ogl_dll;
-glWindowPos3dvMESA: procedure(var p: Double); ogl_dll;
-glWindowPos4iMESA: procedure(x, y, z, w: LongInt); ogl_dll;
-glWindowPos4sMESA: procedure(x, y, z, w: ShortInt); ogl_dll;
-glWindowPos4fMESA: procedure(x, y, z, w: Single); ogl_dll;
-glWindowPos4dMESA: procedure(x, y, z, w: Double); ogl_dll;
-glWindowPos4ivMESA: procedure(var p: LongInt); ogl_dll;
-glWindowPos4svMESA: procedure(var p: ShortInt); ogl_dll;
-glWindowPos4fvMESA: procedure(var p: Single); ogl_dll;
-glWindowPos4dvMESA: procedure(var p: Double); ogl_dll;
-
-// GL_MESA_resize_buffers
-glResizeBuffersMESA: procedure; ogl_dll;
-%END

+ 0 - 109
packages/opengl/build2/gl10sgi.def

@@ -1,109 +0,0 @@
-# This is the definition file for all GL 1.0 SGI stuff
-
-%COPY_INTERFACE
-
-const
-  // GL_SGIS_multitexture
-  GL_SELECTED_TEXTURE_SGIS		= $835C;
-  GL_SELECTED_TEXTURE_COORD_SET_SGIS	= $835D;
-  GL_MAX_TEXTURES_SGIS			= $835E;
-  GL_TEXTURE0_SGIS			= $835F;
-  GL_TEXTURE1_SGIS			= $8360;
-  GL_TEXTURE2_SGIS			= $8361;
-  GL_TEXTURE3_SGIS			= $8362;
-  GL_TEXTURE_COORD_SET_SOURCE_SGIS	= $8363;
-
-const
-  // GL_SGIS_texture_edge_clamp
-  GL_CLAMP_TO_EDGE_SGIS			= $812F;
-
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-
-// GL_SGIS_multitexture
-glMultiTexCoord1dSGIS: procedure(target: GLenum; s: Double); ogl_dll;
-glMultiTexCoord1dvSGIS: procedure(target: GLenum; var v: Double); ogl_dll;
-glMultiTexCoord1fSGIS: procedure(target: GLenum; s: Single); ogl_dll;
-glMultiTexCoord1fvSGIS: procedure(target: GLenum; var v: Single); ogl_dll;
-glMultiTexCoord1iSGIS: procedure(target: GLenum; s: LongInt); ogl_dll;
-glMultiTexCoord1ivSGIS: procedure(target: GLenum; var v: LongInt); ogl_dll;
-glMultiTexCoord1sSGIS: procedure(target: GLenum; s: ShortInt); ogl_dll;
-glMultiTexCoord1svSGIS: procedure(target: GLenum; var v: ShortInt); ogl_dll;
-glMultiTexCoord2dSGIS: procedure(target: GLenum; s, t: Double); ogl_dll;
-glMultiTexCoord2dvSGIS: procedure(target: GLenum; var v: Double); ogl_dll;
-glMultiTexCoord2fSGIS: procedure(target: GLenum; s, t: Single); ogl_dll;
-glMultiTexCoord2fvSGIS: procedure(target: GLenum; var v: Single); ogl_dll;
-glMultiTexCoord2iSGIS: procedure(target: GLenum; s, t: LongInt); ogl_dll;
-glMultiTexCoord2ivSGIS: procedure(target: GLenum; var v: LongInt); ogl_dll;
-glMultiTexCoord2sSGIS: procedure(target: GLenum; s, t: ShortInt); ogl_dll;
-glMultiTexCoord2svSGIS: procedure(target: GLenum; var v: ShortInt); ogl_dll;
-glMultiTexCoord3dSGIS: procedure(target: GLenum; s, t, r: Double); ogl_dll;
-glMultiTexCoord3dvSGIS: procedure(target: GLenum; var v: Double); ogl_dll;
-glMultiTexCoord3fSGIS: procedure(target: GLenum; s, t, r: Single); ogl_dll;
-glMultiTexCoord3fvSGIS: procedure(target: GLenum; var v: Single); ogl_dll;
-glMultiTexCoord3iSGIS: procedure(target: GLenum; s, t, r: LongInt); ogl_dll;
-glMultiTexCoord3ivSGIS: procedure(target: GLenum; var v: LongInt); ogl_dll;
-glMultiTexCoord3sSGIS: procedure(target: GLenum; s, t, r: ShortInt); ogl_dll;
-glMultiTexCoord3svSGIS: procedure(target: GLenum; var v: ShortInt); ogl_dll;
-glMultiTexCoord4dSGIS: procedure(target: GLenum; s, t, r, q: Double); ogl_dll;
-glMultiTexCoord4dvSGIS: procedure(target: GLenum; var v: Double); ogl_dll;
-glMultiTexCoord4fSGIS: procedure(target: GLenum; s, t, r, q: Single); ogl_dll;
-glMultiTexCoord4fvSGIS: procedure(target: GLenum; var v: Single); ogl_dll;
-glMultiTexCoord4iSGIS: procedure(target: GLenum; s, t, r, q: LongInt); ogl_dll;
-glMultiTexCoord4ivSGIS: procedure(target: GLenum; var v: LongInt); ogl_dll;
-glMultiTexCoord4sSGIS: procedure(target: GLenum; s, t, r, q: ShortInt); ogl_dll;
-glMultiTexCoord4svSGIS: procedure(target: GLenum; var v: ShortInt); ogl_dll;
-glMultiTexCoordPointerSGIS: procedure(target: GLenum; size: LongInt; AType: GLEnum; stride: LongInt; var APointer); ogl_dll;
-glSelectTextureSGIS: procedure(target: GLenum); ogl_dll;
-glSelectTextureCoordSetSGIS: procedure(target: GLenum); ogl_dll;
-
-// GL_EXT_multitexture
-glMultiTexCoord1dEXT: procedure(target: GLenum; s: Double); ogl_dll;
-glMultiTexCoord1dvEXT: procedure(target: GLenum; var v: Double); ogl_dll;
-glMultiTexCoord1fEXT: procedure(target: GLenum; s: Single); ogl_dll;
-glMultiTexCoord1fvEXT: procedure(target: GLenum; var v: Single); ogl_dll;
-glMultiTexCoord1iEXT: procedure(target: GLenum; s: LongInt); ogl_dll;
-glMultiTexCoord1ivEXT: procedure(target: GLenum; var v: LongInt); ogl_dll;
-glMultiTexCoord1sEXT: procedure(target: GLenum; s: ShortInt); ogl_dll;
-glMultiTexCoord1svEXT: procedure(target: GLenum; var v: ShortInt); ogl_dll;
-glMultiTexCoord2dEXT: procedure(target: GLenum; s, t: Double); ogl_dll;
-glMultiTexCoord2dvEXT: procedure(target: GLenum; var v: Double); ogl_dll;
-glMultiTexCoord2fEXT: procedure(target: GLenum; s, t: Single); ogl_dll;
-glMultiTexCoord2fvEXT: procedure(target: GLenum; var v: Single); ogl_dll;
-glMultiTexCoord2iEXT: procedure(target: GLenum; s, t: LongInt); ogl_dll;
-glMultiTexCoord2ivEXT: procedure(target: GLenum; var v: LongInt); ogl_dll;
-glMultiTexCoord2sEXT: procedure(target: GLenum; s, t: ShortInt); ogl_dll;
-glMultiTexCoord2svEXT: procedure(target: GLenum; var v: ShortInt); ogl_dll;
-glMultiTexCoord3dEXT: procedure(target: GLenum; s, t, r: Double); ogl_dll;
-glMultiTexCoord3dvEXT: procedure(target: GLenum; var v: Double); ogl_dll;
-glMultiTexCoord3fEXT: procedure(target: GLenum; s, t, r: Single); ogl_dll;
-glMultiTexCoord3fvEXT: procedure(target: GLenum; var v: Single); ogl_dll;
-glMultiTexCoord3iEXT: procedure(target: GLenum; s, t, r: LongInt); ogl_dll;
-glMultiTexCoord3ivEXT: procedure(target: GLenum; var v: LongInt); ogl_dll;
-glMultiTexCoord3sEXT: procedure(target: GLenum; s, t, r: ShortInt); ogl_dll;
-glMultiTexCoord3svEXT: procedure(target: GLenum; var v: ShortInt); ogl_dll;
-glMultiTexCoord4dEXT: procedure(target: GLenum; s, t, r, q: Double); ogl_dll;
-glMultiTexCoord4dvEXT: procedure(target: GLenum; var v: Double); ogl_dll;
-glMultiTexCoord4fEXT: procedure(target: GLenum; s, t, r, q: Single); ogl_dll;
-glMultiTexCoord4fvEXT: procedure(target: GLenum; var v: Single); ogl_dll;
-glMultiTexCoord4iEXT: procedure(target: GLenum; s, t, r, q: LongInt); ogl_dll;
-glMultiTexCoord4ivEXT: procedure(target: GLenum; var v: LongInt); ogl_dll;
-glMultiTexCoord4sEXT: procedure(target: GLenum; s, t, r, q: ShortInt); ogl_dll;
-glMultiTexCoord4svEXT: procedure(target: GLenum; var v: ShortInt); ogl_dll;
-glInterleavedTextureCoordSetsEXT: procedure(factor: LongInt); ogl_dll;
-glSelectTextureEXT: procedure(target: GLenum); ogl_dll;
-glSelectTextureCoordSetEXT: procedure(target: GLenum); ogl_dll;
-glSelectTextureTransformEXT: procedure(target: GLenum); ogl_dll;
-
-// GL_EXT_point_parameters
-glPointParameterfEXT: procedure(pname: GLenum; param: Single); ogl_dll;
-glPointParameterfvEXT: procedure(pname: GLenum; var params: Single); ogl_dll;
-
-%END
-

+ 0 - 96
packages/opengl/build2/gl11.def

@@ -1,96 +0,0 @@
-# This is the definition file for all GL 1.1 stuff
-
-%COPY_INTERFACE
-
-const
-  // GL 1.1 texturing
-  GL_PROXY_TEXTURE_1D			= $8063;
-  GL_PROXY_TEXTURE_2D			= $8064;
-  GL_TEXTURE_PRIORITY			= $8066;
-  GL_TEXTURE_RESIDENT			= $8067;
-  GL_TEXTURE_BINDING_1D			= $8068;
-  GL_TEXTURE_BINDING_2D			= $8069;
-  GL_TEXTURE_INTERNAL_FORMAT		= $1003;
-
-  // Internal texture formats (GL 1.1)
-  GL_ALPHA4				= $803B;
-  GL_ALPHA8				= $803C;
-  GL_ALPHA12				= $803D;
-  GL_ALPHA16				= $803E;
-  GL_LUMINANCE4				= $803F;
-  GL_LUMINANCE8				= $8040;
-  GL_LUMINANCE12			= $8041;
-  GL_LUMINANCE16			= $8042;
-  GL_LUMINANCE4_ALPHA4			= $8043;
-  GL_LUMINANCE6_ALPHA2			= $8044;
-  GL_LUMINANCE8_ALPHA8			= $8045;
-  GL_LUMINANCE12_ALPHA4			= $8046;
-  GL_LUMINANCE12_ALPHA12		= $8047;
-  GL_LUMINANCE16_ALPHA16		= $8048;
-  GL_INTENSITY				= $8049;
-  GL_INTENSITY4				= $804A;
-  GL_INTENSITY8				= $804B;
-  GL_INTENSITY12			= $804C;
-  GL_INTENSITY16			= $804D;
-  GL_R3_G3_B2				= $2A10;
-  GL_RGB4				= $804F;
-  GL_RGB5				= $8050;
-  GL_RGB8				= $8051;
-  GL_RGB10				= $8052;
-  GL_RGB12				= $8053;
-  GL_RGB16				= $8054;
-  GL_RGBA2				= $8055;
-  GL_RGBA4				= $8056;
-  GL_RGB5_A1				= $8057;
-  GL_RGBA8				= $8058;
-  GL_RGB10_A2				= $8059;
-  GL_RGBA12				= $805A;
-  GL_RGBA16				= $805B;
-
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-
-// Miscellaneous
-glEnableClientState: procedure(cap: GLenum);
-glDisableClientState: procedure(cap: GLenum);
-glPushClientAttrib: procedure(mask: GLbitfield);
-glPopClientAttrib: procedure;
-
-// Drawing Functions
-glIndexub: procedure(c: Byte);
-glIndexubv: procedure(var c: Byte);
-
-// Vertex Arrays
-glVertexPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr); 
-glNormalPointer: procedure(AType: GLenum; stride: LongInt; var ptr); 
-glColorPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr); 
-glIndexPointer: procedure(AType: GLenum; stride: LongInt; var ptr); 
-glTexCoordPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr); 
-glEdgeFlagPointer: procedure(stride: LongInt; var ptr); 
-glGetPointerv: procedure(pname: GLenum; var params: Pointer); 
-glArrayElement: procedure(i: LongInt); 
-glDrawArrays: procedure(mode: GLenum; first, count: LongInt); 
-glDrawElements: procedure(mode: GLenum; count: Integer; AType: GLenum; var indices); 
-glInterleavedArrays: procedure(format: GLenum; stride: LongInt; var pointer); 
-
-// Texture Mapping
-glGenTextures: procedure(n: LongInt; var textures: LongWord); 
-glDeleteTextures: procedure(n: LongInt; var textures: LongWord); 
-glBindTexture: procedure(target: GLenum; texture: LongWord); 
-glPrioritizeTextures: procedure(n: LongInt; var textures: LongWord; var priorities: GLclampf); 
-glAreTexturesResident: function(n: LongInt; var textures: LongWord; var residences: Boolean): Boolean; 
-glIsTexture: function(texture: LongWord): Boolean; 
-glTexSubImage1D: procedure(target: GLenum; level, xoffset, width: LongInt; format, AType: GLenum; var pixels); 
-glTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, width, height: LongInt; format, AType: GLenum; var pixels); 
-glCopyTexImage1D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, border: LongInt); 
-glCopyTexImage2D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, height, border: LongInt); 
-glCopyTexSubImage1D: procedure(target: GLenum; level, xoffset, x, y, width: LongInt); 
-glCopyTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, x, y, width, height: LongInt); 
-
-%END

+ 0 - 58
packages/opengl/build2/gl12.def

@@ -1,58 +0,0 @@
-# This is the definition file for all GL 1.2 stuff
-
-%COPY_INTERFACE
-
-const
-  // GL 1.2 texturing
-  GL_PACK_SKIP_IMAGES			= $806B;
-  GL_PACK_IMAGE_HEIGHT			= $806C;
-  GL_UNPACK_SKIP_IMAGES			= $806D;
-  GL_UNPACK_IMAGE_HEIGHT		= $806E;
-  GL_TEXTURE_3D				= $806F;
-  GL_PROXY_TEXTURE_3D			= $8070;
-  GL_TEXTURE_DEPTH			= $8071;
-  GL_TEXTURE_WRAP_R			= $8072;
-  GL_MAX_3D_TEXTURE_SIZE		= $8073;
-  GL_TEXTURE_BINDING_3D			= $806A;
-
-const
-  GL_RESCALE_NORMAL			= $803A;
-  GL_CLAMP_TO_EDGE			= $812F;
-  GL_MAX_ELEMENTS_VERTICES		= $F0E8;
-  GL_MAX_ELEMENTS_INDICES		= $F0E9;
-  GL_BGR				= $80E0;
-  GL_BGRA				= $80E1;
-  GL_UNSIGNED_BYTE_3_3_2		= $8032;
-  GL_UNSIGNED_BYTE_2_3_3_REV		= $8362;
-  GL_UNSIGNED_SHORT_5_6_5		= $8363;
-  GL_UNSIGNED_SHORT_5_6_5_REV		= $8364;
-  GL_UNSIGNED_SHORT_4_4_4_4		= $8033;
-  GL_UNSIGNED_SHORT_4_4_4_4_REV		= $8365;
-  GL_UNSIGNED_SHORT_5_5_5_1		= $8034;
-  GL_UNSIGNED_SHORT_1_5_5_5_REV		= $8366;
-  GL_UNSIGNED_INT_8_8_8_8		= $8035;
-  GL_UNSIGNED_INT_8_8_8_8_REV		= $8367;
-  GL_UNSIGNED_INT_10_10_10_2		= $8036;
-  GL_UNSIGNED_INT_2_10_10_10_REV	= $8368;
-  GL_LIGHT_MODEL_COLOR_CONTROL		= $81F8;
-  GL_SINGLE_COLOR			= $81F9;
-  GL_SEPARATE_SPECULAR_COLOR		= $81FA;
-  GL_TEXTURE_MIN_LOD			= $813A;
-  GL_TEXTURE_MAX_LOD			= $813B;
-  GL_TEXTURE_BASE_LEVEL			= $813C;
-  GL_TEXTURE_MAX_LEVEL			= $813D;
-
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-glDrawRangeElements: procedure(mode: GLenum; AStart, AEnd: LongWord; count: LongInt; AType: GLenum; var indices); ogl_dll;
-glTexImage3D: procedure(target: GLenum; level: LongInt; internalFormat: GLenum; width, height, depth, border: LongInt; format, AType: GLEnum; var pixels); ogl_dll;
-glTexSubImage3D: procedure(target: GLenum; level: LongInt; xoffset, yoffset, zoffset, width, height, depth: LongInt; format, AType: GLEnum; var pixels); ogl_dll;
-glCopyTexSubImage3D: procedure(target: GLenum; level: LongInt; xoffset, yoffset, zoffset, x, y, width, height: LongInt); ogl_dll;
-%END
-

+ 0 - 141
packages/opengl/build2/gl_linux.tem

@@ -1,141 +0,0 @@
-{
-  $Id$
-  Translation of the Mesa GL, GLU and GLX headers for Free Pascal
-  Linux Version, Copyright (C) 1999 Sebastian Guenther
-
-
-  Mesa 3-D graphics library
-  Version:  3.0
-  Copyright (C) 1995-1998  Brian Paul
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-
-  This library 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
-  Library General Public License for more details.
-
-  You should have received a copy of the GNU Library General Public
-  License along with this library; if not, write to the Free
-  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-{$MODE delphi}  // objfpc would not work because of direct proc var assignments
-
-unit GL;
-
-interface
-uses X,XLib,XUtil;
-
-// ===================================================================
-//   Unit specific extensions
-// ===================================================================
-
-function InitGLFromLibrary(libname: PChar): Boolean;
-function InitGLUFromLibrary(libname: PChar): Boolean;
-// Requires that the GL library has already been initialized:
-function InitGLX: Boolean;
-
-// determines automatically which libraries to use:
-function InitGL: Boolean;
-function InitGLU: Boolean;
-
-
-var
-  GLInitialized, GLUInitialized, GLXInitialized: Boolean;
-
-%GLDeclsIF
-%GLProcsPD
-
-%GLExtDeclsIF
-%GLExtProcsPD
-
-%GLUDeclsIF
-%GLUProcsPD
-
-%GLXDeclsIF
-%GLXProcsPD
-
-
-// ===================================================================
-// ===================================================================
-
-implementation
-
-{$LINKLIB m}
-
-function dlopen(AFile: PChar; mode: LongInt): Pointer; external 'dl';
-function dlclose(handle: Pointer): LongInt; external 'dl';
-function dlsym(handle: Pointer; name: PChar): Pointer; external 'dl';
-
-function LoadLibrary(name: PChar): Pointer;
-begin
-  Result := dlopen(name, $101 {RTLD_GLOBAL or RTLD_LAZY});
-end;
-
-function GetProc(handle: Pointer; name: PChar): Pointer;
-begin
-  Result := dlsym(handle, name);
-  if Result = nil then WriteLn('Unresolved: ', name);
-end;
-
-var
-  libGL, libGLU, libGLX: Pointer;
-
-function InitGLFromLibrary(libname: PChar): Boolean;
-begin
-  Result := False;
-  libGL := LoadLibrary(libname);
-  if not Assigned(libGL) then exit;
-
-%GLProcsPL
-#  // Extensions:
-#%GLExtProcs2
-
-  GLInitialized := True;
-  Result := True;
-end;
-
-function InitGLUFromLibrary(libname: PChar): Boolean;
-begin
-  Result := False;
-  libGLU := LoadLibrary(libname);
-  if not Assigned(libGLU) then exit;
-
-%GLUProcsPL
-
-  GLUInitialized := True;
-  Result := True;
-end;
-
-function InitGLX: Boolean;
-begin
-  Result := False;
-  if not Assigned(libGL) then exit;
-
-%GLXProcsPL
-
-  GLXInitialized := True;
-  Result := True;
-end;
-
-function InitGL: Boolean;
-begin
-  Result := InitGLFromLibrary('libGL.so.1') or InitGLFromLibrary('libMesaGL.so.1');
-end;
-
-function InitGLU: Boolean;
-begin
-  Result := InitGLUFromLibrary('libGLU.so.1') or InitGLUFromLibrary('libMesaGLU.so.1');
-end;
-
-
-
-finalization
-  if Assigned(libGL)  then dlclose(libGL);
-  if Assigned(libGLU) then dlclose(libGLU);
-  if Assigned(libGLX) then dlclose(libGLX);
-end.

+ 0 - 287
packages/opengl/build2/gl_w32d.tem

@@ -1,287 +0,0 @@
-{
-  $Id$
-
-  Translation of the Mesa GL headers for FreePascal
-  Copyright (C) 1999 Sebastian Guenther
-
-
-  Mesa 3-D graphics library
-  Version:  3.0
-  Copyright (C) 1995-1998  Brian Paul
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-    
-  This library 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
-  Library General Public License for more details.
-    
-  You should have received a copy of the GNU Library General Public
-  License along with this library; if not, write to the Free
-  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-{$MODE delphi}	// objfpc would not work because of direct proc var assignments
-
-{You have to enable Macros (compiler switch "-Sm") for compiling this unit!
- This is necessary for supporting different platforms with different calling
- conventions via a single unit.}
-
-unit GL;
-
-interface
-
-{$DEFINE GL1_0}
-{x$DEFINE GL1_1}
-{x$DEFINE GL1_2}
-{x$DEFINE MESA}                 {enable if you want to use some special mesa extensions}
-{x$DEFINE EXTENSIONS}           {enable if you need one/all of extensions}
-{x$DEFINE SGI_EXTENSIONS}       {enable if you need one/all of extensions}
-
-{$IFDEF Win32}
-  {$DEFINE ogl_dll := }
-  uses Windows;
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-
-// =======================================================
-//   Unit specific extensions
-// =======================================================
-
-function InitGLFromLibrary(libname: PChar): Boolean;
-
-// determines automatically which libraries to use:
-function InitGL: Boolean;
-
-
-var
-  GLInitialized: Boolean;
-
-
-// =======================================================
-//   GL consts, types and functions
-// =======================================================
-
-
-// -------------------------------------------------------
-//   GL types
-// -------------------------------------------------------
-
-type
-  PSingle   = ^Single;
-  PDouble   = ^Double;
-
-  GLvoid    = Pointer;
-  GLboolean = Byte;
-
-  GLbyte    = ShortInt; // 1-byte signed
-  GLshort   = Integer;  // 2-byte signed
-  GLint     = LongInt;  // 4-byte signed
-
-  GLubyte   = Byte;     // 1-byte unsigned
-  GLushort  = Word;     // 2-byte unsigned
-  GLuint    = DWord;    // 4-byte signed
-
-  GLsizei   = LongInt;  // 4-byte signed
-
-  GLfloat   = Single;   // single precision float
-  GLclampf  = Single;	// single precision float in [0,1]
-  GLdouble  = Double;   // double precision float
-  GLclampd  = Double;	// double precision float in [0,1]
-
-  GLenum    = DWord;
-
-type
-  GLbitfield = DWord;  { was an enum - no corresponding thing in pascal }
-const
-  GL_CURRENT_BIT        = $00000001;
-  GL_POINT_BIT          = $00000002;
-  GL_LINE_BIT           = $00000004;
-  GL_POLYGON_BIT        = $00000008;
-  GL_POLYGON_STIPPLE_BIT= $00000010;
-  GL_PIXEL_MODE_BIT     = $00000020;
-  GL_LIGHTING_BIT       = $00000040;
-  GL_FOG_BIT            = $00000080;
-  GL_DEPTH_BUFFER_BIT   = $00000100;
-  GL_ACCUM_BUFFER_BIT   = $00000200;
-  GL_STENCIL_BUFFER_BIT = $00000400;
-  GL_VIEWPORT_BIT       = $00000800;
-  GL_TRANSFORM_BIT      = $00001000;
-  GL_ENABLE_BIT         = $00002000;
-  GL_COLOR_BUFFER_BIT   = $00004000;
-  GL_HINT_BIT           = $00008000;
-  GL_EVAL_BIT           = $00010000;
-  GL_LIST_BIT           = $00020000;
-  GL_TEXTURE_BIT        = $00040000;
-  GL_SCISSOR_BIT        = $00080000;
-  GL_ALL_ATTRIB_BITS    = $000fffff;
-
-
-// -------------------------------------------------------
-//   GL constants
-// -------------------------------------------------------
-
-{$IFDEF GL1_0}
-%GLDeclsIF10
-{$ENDIF GL1_0}
-
-{$IFDEF GL1_1}
-%GLDeclsIF11
-{$ENDIF GL1_1}
-
-{$IFDEF GL1_2}
-%GLDeclsIF12
-{$ENDIF GL1_2}
-
-const
-  // Utility
-  GL_VENDOR				= $1F00;
-  GL_RENDERER				= $1F01;
-  GL_VERSION				= $1F02;
-  GL_EXTENSIONS				= $1F03;
-
-  // Errors
-  GL_INVALID_VALUE			= $0501;
-  GL_INVALID_ENUM			= $0500;
-  GL_INVALID_OPERATION			= $0502;
-  GL_STACK_OVERFLOW			= $0503;
-  GL_STACK_UNDERFLOW			= $0504;
-  GL_OUT_OF_MEMORY			= $0505;
-
-
-// -------------------------------------------------------
-//   GL extensions constants
-// -------------------------------------------------------
-
-{$IFDEF EXTENSIONS}
-%GLDeclsIF10Ext
-{$ENDIF EXTENSIONS}
-
-{$IFDEF SGI_EXTENSIONS}
-%GLDeclsIF10SGI
-{$ENDIF SGI_EXTENSIONS}
-
-{$IFDEF MESA}
-%GLDeclsIF10Mesa
-{$ENDIF MESA}
-
-
-// -------------------------------------------------------
-//   GL procedures and functions
-// -------------------------------------------------------
-
-{$IFDEF GL1_0}
-var
-%GLProcsPD10
-{$ENDIF GL1_0}
-
-{$IFDEF GL1_1}
-var
-%GLProcsPD11
-{$ENDIF GL1_1}
-
-{$IFDEF GL1_2}
-var
-%GLProcsPD12
-{$ENDIF GL1_2}
-
-
-// -------------------------------------------------------
-//   GL Extensions
-// -------------------------------------------------------
-
-{$IFDEF EXTENSIONS}
-var
-%GLProcsPD10Ext
-{$ENDIF EXTENSIONS}
-
-// library dependent extensions
-
-{$IFDEF SGI_EXTENSIONS}
-var
-%GLProcsPD10SGI
-{$ENDIF SGI_EXTENSIONS}
-
-{$ifdef MESA}
-var
-%GLProcsPD10Mesa
-{$endif MESA}
-
-
-// =======================================================
-// =======================================================
-
-implementation
-
-type
-  HInstance = LongWord;
-
-var
-  libGL : HInstance;
-
-function GetProc(handle: HInstance; name: PChar): Pointer;
-begin
-  Result := GetProcAddress(handle, name);
-  if Result = nil then WriteLn('Unresolved: ', name);
-end;
-
-function InitGLFromLibrary(libname: PChar): Boolean;
-begin
-  Result := False;
-  libGL := LoadLibrary(libname);
-  if libGL = 0 then exit;
-
-{$ifdef GL1_0}
-%GLProcsPL10
-{$endif GL1_0}
-
-{$ifdef GL1_1}
-%GLProcsPL11
-{$endif GL1_1}
-
-{$ifdef GL1_2}
-%GLProcsPL12
-{$endif GL1_2}
-
-{$ifdef EXTENSIONS}
-%GLProcsPL10Ext
-{$endif EXTENSIONS}
-
-{$ifdef SGI_EXTENSIONS}
-%GLProcsPL10SGI
-{$endif SGI_EXTENSIONS}
-
-{$ifdef MESA}
-%GLProcsPL10Mesa
-{$endif MESA}
-
-  GLInitialized := True;
-  Result := True;
-end;
-
-
-function InitGL: Boolean;
-begin
-  Result := InitGLFromLibrary('opengl32.dll');
-end;
-
-
-finalization
-  if libGL <> 0 then FreeLibrary(libGL);
-end.
-
-
-{
-  $Log$
-  Revision 1.1  2000-07-13 06:34:17  michael
-  + Initial import
-
-  Revision 1.2  2000/05/31 00:34:28  alex
-  made templates work
-
-}

+ 0 - 221
packages/opengl/build2/gl_w32s.tem

@@ -1,221 +0,0 @@
-{
-  Translation of the Mesa GL headers for FreePascal
-  Copyright (C) 1999 Sebastian Guenther
-  Template for static linking in Win32 environment by Alexander Stohr.
-
-  Original copyright notice:
-
-  Mesa 3-D graphics library
-  Version:  3.0
-  Copyright (C) 1995-1998  Brian Paul
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-
-  This library 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
-  Library General Public License for more details.
-
-  You should have received a copy of the GNU Library General Public
-  License along with this library; if not, write to the Free
-  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-{
-  You have to enable Macros (compiler switch "-Sm") for compiling this unit!
-  This is necessary for supporting different platforms with different calling
-  conventions via a single unit.
-}
-
-unit GL;
-
-
-interface
-
-{$DEFINE GL1_0}
-{x$DEFINE GL1_1}
-{x$DEFINE GL1_2}
-{x$DEFINE MESA}                 {enable if you want to use some special mesa extensions}
-{x$DEFINE EXTENSIONS}           {enable if you need one/all of extensions}
-{x$DEFINE SGI_EXTENSIONS}       {enable if you need one/all of extensions}
-
-{
-  *** Note: ***
-  There is currently one importants side effect when doing static linking.
-
-  If you include a function statically than its required to be present
-  in the supplied DLLs of your OS and Hardware.
-  This means if the DLL is not present your program will not run.
-  In Win95 it appears that you will be informined you about
-  the name of the first missing symbol while loading the executable.
-}
-
-{$IFDEF Win32}
-  {$DEFINE ogl_dll := external 'opengl32.dll'}
-  uses Windows;
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-
-// =======================================================
-//   Unit specific extensions
-// =======================================================
-
-// none - no special init required
-
-
-// =======================================================
-//   GL consts, types and functions
-// =======================================================
-
-
-// -------------------------------------------------------
-//   GL types
-// -------------------------------------------------------
-
-type
-  PSingle   = ^Single;
-  PDouble   = ^Double;
-
-  GLvoid    = Pointer;
-  GLboolean = Byte;
-
-  GLbyte    = ShortInt; // 1-byte signed
-  GLshort   = Integer;  // 2-byte signed
-  GLint     = LongInt;  // 4-byte signed
-
-  GLubyte   = Byte;     // 1-byte unsigned
-  GLushort  = Word;     // 2-byte unsigned
-  GLuint    = DWord;    // 4-byte signed
-
-  GLsizei   = LongInt;  // 4-byte signed
-
-  GLfloat   = Single;   // single precision float
-  GLclampf  = Single;	// single precision float in [0,1]
-  GLdouble  = Double;   // double precision float
-  GLclampd  = Double;	// double precision float in [0,1]
-
-  GLenum    = DWord;
-
-type
-  GLbitfield = DWord;  { was an enum - no corresponding thing in pascal }
-const
-  GL_CURRENT_BIT        = $00000001;
-  GL_POINT_BIT          = $00000002;
-  GL_LINE_BIT           = $00000004;
-  GL_POLYGON_BIT        = $00000008;
-  GL_POLYGON_STIPPLE_BIT= $00000010;
-  GL_PIXEL_MODE_BIT     = $00000020;
-  GL_LIGHTING_BIT       = $00000040;
-  GL_FOG_BIT            = $00000080;
-  GL_DEPTH_BUFFER_BIT   = $00000100;
-  GL_ACCUM_BUFFER_BIT   = $00000200;
-  GL_STENCIL_BUFFER_BIT = $00000400;
-  GL_VIEWPORT_BIT       = $00000800;
-  GL_TRANSFORM_BIT      = $00001000;
-  GL_ENABLE_BIT         = $00002000;
-  GL_COLOR_BUFFER_BIT   = $00004000;
-  GL_HINT_BIT           = $00008000;
-  GL_EVAL_BIT           = $00010000;
-  GL_LIST_BIT           = $00020000;
-  GL_TEXTURE_BIT        = $00040000;
-  GL_SCISSOR_BIT        = $00080000;
-  GL_ALL_ATTRIB_BITS    = $000fffff;
-
-
-// -------------------------------------------------------
-//   GL constants
-// -------------------------------------------------------
-
-{$IFDEF GL1_0}
-%GLDeclsIF10
-{$ENDIF GL1_0}
-
-{$IFDEF GL1_1}
-%GLDeclsIF11
-{$ENDIF GL1_1}
-
-{$IFDEF GL1_2}
-%GLDeclsIF12
-{$ENDIF GL1_2}
-
-const
-  // Utility
-  GL_VENDOR				= $1F00;
-  GL_RENDERER				= $1F01;
-  GL_VERSION				= $1F02;
-  GL_EXTENSIONS				= $1F03;
-
-  // Errors
-  GL_INVALID_VALUE			= $0501;
-  GL_INVALID_ENUM			= $0500;
-  GL_INVALID_OPERATION			= $0502;
-  GL_STACK_OVERFLOW			= $0503;
-  GL_STACK_UNDERFLOW			= $0504;
-  GL_OUT_OF_MEMORY			= $0505;
-
-
-// -------------------------------------------------------
-//   GL extensions constants
-// -------------------------------------------------------
-
-{$IFDEF EXTENSIONS}
-%GLDeclsIF10Ext
-{$ENDIF EXTENSIONS}
-
-{$IFDEF SGI_EXTENSIONS}
-%GLDeclsIF10SGI
-{$ENDIF SGI_EXTENSIONS}
-
-{$IFDEF MESA}
-%GLDeclsIF10Mesa
-{$ENDIF MESA}
-
-
-// -------------------------------------------------------
-//   GL procedures and functions
-// -------------------------------------------------------
-
-{$IFDEF GL1_0}
-%GLProcsPS10
-{$ENDIF GL1_0}
-
-{$IFDEF GL1_1}
-%GLProcsPS11
-{$ENDIF GL1_1}
-
-{$IFDEF GL1_2}
-%GLProcsPS12
-{$ENDIF GL1_2}
-
-
-// -------------------------------------------------------
-//   GL Extensions
-// -------------------------------------------------------
-
-{$IFDEF EXTENSIONS}
-%GLProcsPS10Ext
-{$ENDIF EXTENSIONS}
-
-// library dependent extensions
-
-{$IFDEF SGI_EXTENSIONS}
-%GLProcsPS10SGI
-{$ENDIF SGI_EXTENSIONS}
-
-{$ifdef MESA}
-%GLProcsPS10Mesa
-{$endif MESA}
-
-
-// =======================================================
-// =======================================================
-
-implementation
-
-{BEGIN}{OF INIT}
-END.

+ 0 - 12
packages/opengl/build2/glaux.def

@@ -1,12 +0,0 @@
-# This is the definition file for all GLAUX stuff
-
-%COPY_INTERFACE
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-%END

+ 0 - 502
packages/opengl/build2/glaux_w32d.tem

@@ -1,502 +0,0 @@
-{
-  $Id$
-
-  Translation of the GLaux headers for FreePascal
-  Version for static linking in Win32 environment by Alexander Stohr.
-  Latest change: 1999-11-13
-
-  Further information:
-
-  GLaux is an outdated toolkit from SGI and later used by Microsoft.
-}
-{*++ BUILD Version: 0004    // Increment this if a change has global effects
-
-Copyright (c) 1985-95, Microsoft Corporation
-
-Module Name:
-
-    glaux.h
-
-Abstract:
-
-    Procedure declarations, constant definitions and macros for the OpenGL
-    Auxiliary Library.
-
---*}
-{*
- * (c) Copyright 1993, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED 
- * Permission to use, copy, modify, and distribute this software for 
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that 
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. 
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- * 
- * US Government Users Restricted Rights 
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- *}
-
-{$MODE delphi}
-
-{You have to enable Macros (compiler switch "-Sm") for compiling this unit!
- This is necessary for supporting different platforms with different calling
- conventions via a single unit.}
-
-{$define WINNT}
-{$define GLauximp}
-{x$define UNICODE}
-
-unit GLaux; { version which does statically linking }
-
-
-interface
-
-{$IFDEF Win32}
-  {$DEFINE glaux_dll := external 'Glauximp.dll'}
-  {$DEFINE glaux_callback := cdecl}
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-
-USES
-  windows,
-  GL;
-{
-#include <windows.h>
-#include <GL/glu.h>
-}
-
-TYPE
-  LPCSTR  = Pointer;   { pointer on a zero terminated string }
-  LPCWSTR = Pointer;   { pointer on a zero terminated unicode string }
-
-{*
-** ToolKit Window Types
-** In the future, AUX_RGBA may be a combination of both RGB and ALPHA
-*}
-
-const
-    AUX_RGB             = 0;
-    AUX_RGBA            = AUX_RGB;
-    AUX_INDEX           = 1;
-    AUX_SINGLE          = 0;
-    AUX_DOUBLE          = 2;
-    AUX_DIRECT          = 0;
-    AUX_INDIRECT        = 4;
-
-    AUX_ACCUM           = 8;
-    AUX_ALPHA           = 16;
-    AUX_DEPTH24         = 32;      {* 24-bit depth buffer *}
-    AUX_STENCIL         = 64;
-    AUX_AUX             = 128;
-    AUX_DEPTH16         = 256;     {* 16-bit depth buffer *}
-    AUX_FIXED_332_PAL   = 512;
-    AUX_DEPTH           = AUX_DEPTH16; {* default is 16-bit depth buffer *}
-
-{*
-** Window Masks
-*}
-
-{ These have been macros and were converted to boolean funtions }
-FUNCTION AUX_WIND_IS_RGB            (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_INDEX          (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_SINGLE         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_DOUBLE         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_INDIRECT       (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_DIRECT         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_HAS_ACCUM         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_HAS_ALPHA         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_HAS_DEPTH         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_HAS_STENCIL       (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_USES_FIXED_332_PAL(x : DWORD) : BOOLEAN;
-
-{*
-** ToolKit Event Structure
-*}
-type
-    AUX_EVENTREC = RECORD
-    {BEGIN}
-        event : GLint;
-        data  : ARRAY[0..3] OF GLint;
-    END;
-
-{*
-** ToolKit Event Types
-*}
-CONST
-    AUX_EXPOSE      = 1;
-    AUX_CONFIG      = 2;
-    AUX_DRAW        = 4;
-    AUX_KEYEVENT    = 8;
-    AUX_MOUSEDOWN   = 16;
-    AUX_MOUSEUP     = 32;
-    AUX_MOUSELOC    = 64;
-
-{*
-** Toolkit Event Data Indices
-*}
-    AUX_WINDOWX             = 0;
-    AUX_WINDOWY             = 1;
-    AUX_MOUSEX              = 0;
-    AUX_MOUSEY              = 1;
-    AUX_MOUSESTATUS         = 3;
-    AUX_KEY                 = 0;
-    AUX_KEYSTATUS           = 1;
-
-{*
-** ToolKit Event Status Messages
-*}
-    AUX_LEFTBUTTON          = 1;
-    AUX_RIGHTBUTTON         = 2;
-    AUX_MIDDLEBUTTON        = 4;
-    AUX_SHIFT               = 1;
-    AUX_CONTROL             = 2;
-
-{*
-** ToolKit Key Codes
-*}
-    AUX_RETURN              = #$0D;
-    AUX_ESCAPE              = #$1B;
-    AUX_SPACE               = #$20;
-    AUX_LEFT                = #$25;
-    AUX_UP                  = #$26;
-    AUX_RIGHT               = #$27;
-    AUX_DOWN                = #$28;
-    AUX_A                   = 'A';
-    AUX_B                   = 'B';
-    AUX_C                   = 'C';
-    AUX_D                   = 'D';
-    AUX_E                   = 'E';
-    AUX_F                   = 'F';
-    AUX_G                   = 'G';
-    AUX_H                   = 'H';
-    AUX_I                   = 'I';
-    AUX_J                   = 'J';
-    AUX_K                   = 'K';
-    AUX_L                   = 'L';
-    AUX_M                   = 'M';
-    AUX_N                   = 'N';
-    AUX_O                   = 'O';
-    AUX_P                   = 'P';
-    AUX_Q                   = 'Q';
-    AUX_R                   = 'R';
-    AUX_S                   = 'S';
-    AUX_T                   = 'T';
-    AUX_U                   = 'U';
-    AUX_V                   = 'V';
-    AUX_W                   = 'W';
-    AUX_X                   = 'X';
-    AUX_Y                   = 'Y';
-    AUX_Z                   = 'Z';
-    AUX_a_                  = 'a';
-    AUX_b_                  = 'b';
-    AUX_c_                  = 'c';
-    AUX_d_                  = 'd';
-    AUX_e_                  = 'e';
-    AUX_f_                  = 'f';
-    AUX_g_                  = 'g';
-    AUX_h_                  = 'h';
-    AUX_i_                  = 'i';
-    AUX_j_                  = 'j';
-    AUX_k_                  = 'k';
-    AUX_l_                  = 'l';
-    AUX_m_                  = 'm';
-    AUX_n_                  = 'n';
-    AUX_o_                  = 'o';
-    AUX_p_                  = 'p';
-    AUX_q_                  = 'q';
-    AUX_r_                  = 'r';
-    AUX_s_                  = 's';
-    AUX_t_                  = 't';
-    AUX_u_                  = 'u';
-    AUX_v_                  = 'v';
-    AUX_w_                  = 'w';
-    AUX_x_                  = 'x';
-    AUX_y_                  = 'y';
-    AUX_z_                  = 'z';
-    AUX_0                   = '0';
-    AUX_1                   = '1';
-    AUX_2                   = '2';
-    AUX_3                   = '3';
-    AUX_4                   = '4';
-    AUX_5                   = '5';
-    AUX_6                   = '6';
-    AUX_7                   = '7';
-    AUX_8                   = '8';
-    AUX_9                   = '9';
-
-{*
-** ToolKit Gets and Sets
-*}
-    AUX_FD                  = 1;  {* return fd (long) *}
-    AUX_COLORMAP            = 3;  {* pass buf of r, g and b (unsigned char) *}
-    AUX_GREYSCALEMAP        = 4;
-    AUX_FOGMAP              = 5;  {* pass fog and color bits (long) *}
-    AUX_ONECOLOR            = 6;  {* pass index, r, g, and b (long) *}
-
-{*
-** Color Macros
-*}
-
-    AUX_BLACK               = 0;
-    AUX_RED                 = 13;
-    AUX_GREEN               = 14;
-    AUX_YELLOW              = 15;
-    AUX_BLUE                = 16;
-    AUX_MAGENTA             = 17;
-    AUX_CYAN                = 18;
-    AUX_WHITE               = 19;
-
-{ this was a macro and is now a procedure }
-{ PROCEDURE AUX_SETCOLOR(x, y); - TODO }
-
-{*
-** RGB Image Structure
-*}
-
-type
-    AUX_RGBImageRec = RECORD
-    {BEGIN}
-        sizeX, sizeY : GLint;
-        data : ^BYTE;
-    END;
-    pAUX_RGBImageRec = ^AUX_RGBImageRec;
-
-{*
-** Prototypes
-*}
-
-Procedure auxInitDisplayMode(mode:GLenum); glaux_dll;
-Procedure auxInitPosition(x,y,w,h:Integer); glaux_dll;
-
-{$ifndef WINNT}
-FUNCTION  auxInitWindow(name:LPCSTR)  : GLenum; glaux_dll;
-{$else}
-{$ifdef UNICODE }
-FUNCTION  auxInitWindow (name:LPCWSTR) : GLenum; glaux_dll name 'auxInitWindowW';
-{$else}
-FUNCTION  auxInitWindow (name:LPCSTR)  : GLenum; glaux_dll name 'auxInitWindowA';
-{$endif}
-FUNCTION  auxInitWindowA(name:LPCSTR)  : GLenum; glaux_dll;
-FUNCTION  auxInitWindowW(name:LPCWSTR) : GLenum; glaux_dll;
-{$endif}
-
-PROCEDURE auxCloseWindow; glaux_dll;
-PROCEDURE auxQuit;        glaux_dll;
-PROCEDURE auxSwapBuffers; glaux_dll;
-
-{ callbacks }
-type
-  TAUXMAINPROC    = PROCEDURE;                           glaux_callback;
-  TAUXEXPOSEPROC  = PROCEDURE(w, h : integer);           glaux_callback;
-  TAUXRESHAPEPROC = PROCEDURE(w, h : GLsizei);           glaux_callback;
-  TAUXIDLEPROC    = PROCEDURE;                           glaux_callback;
-  TAUXKEYPROC     = PROCEDURE;                           glaux_callback;
-  TAUXMOUSEPROC   = PROCEDURE(VAR event : AUX_EVENTREC); glaux_callback;
-
-{ callback setup routines }
-PROCEDURE auxMainLoop   (func : TAUXMAINPROC); glaux_dll;
-PROCEDURE auxExposeFunc (func : TAUXEXPOSEPROC); glaux_dll;
-PROCEDURE auxReshapeFunc(func : TAUXRESHAPEPROC); glaux_dll;
-PROCEDURE auxIdleFunc   (func : TAUXIDLEPROC); glaux_dll;
-PROCEDURE auxKeyFunc    (val : integer; func : TAUXKEYPROC); glaux_dll;
-PROCEDURE auxMouseFunc  (v1, v2 :integer; func : TAUXMOUSEPROC); glaux_dll;
-
-FUNCTION  auxGetColorMapSize : integer; glaux_dll;
-PROCEDURE auxGetMouseLoc(var x, y : integer); glaux_dll;
-PROCEDURE auxSetOneColor(id : integer; r, g, b : GLfloat); glaux_dll;
-PROCEDURE auxSetFogRamp(v1, v2 : integer); glaux_dll;
-PROCEDURE auxSetGreyRamp; glaux_dll;
-PROCEDURE auxSetRGBMap(id : integer; var map : GLfloat); glaux_dll;
-
-{$ifndef WINNT}
-FUNCTION auxRGBImageLoad(name : LPCSTR) : pAUX_RGBImageRec; glaux_dll;
-{$else}
-{$ifndef GLAUXIMP}{ not present in GLauximp.dll }
-{$ifdef UNICODE}
-FUNCTION auxRGBImageLoad (name : LPCWSTR): pAUX_RGBImageRec; glaux_dll name 'auxRGBImageLoadW';
-{$else}
-FUNCTION auxRGBImageLoad (name : LPCSTR) : pAUX_RGBImageRec; glaux_dll name 'auxRGBImageLoadA';
-{$endif}
-FUNCTION auxRGBImageLoadA(name : LPCSTR) : pAUX_RGBImageRec; glaux_dll;
-FUNCTION auxRGBImageLoadW(name : LPCWSTR): pAUX_RGBImageRec; glaux_dll;
-{$endif}
-{$endif}
-
-{$ifndef WINNT}
-{ this function is Windows specific! }
-FUNCTION auxDIBImageLoad(name : LPCSTR) : pAUX_RGBImageRec; glaux_dll;
-{$else}
-{$ifndef GLAUXIMP}{ not present in GLauximp.dll }
-{$ifdef UNICODE }
-FUNCTION auxDIBImageLoad (name : LPCWSTR): pAUX_RGBImageRec; glaux_dll name 'auxDIBImageLoadW';
-{$else}
-FUNCTION auxDIBImageLoad (name : LPCSTR) : pAUX_RGBImageRec; glaux_dll name 'auxDIBImageLoadA';
-{$endif}
-FUNCTION auxDIBImageLoadA(name : LPCSTR) : pAUX_RGBImageRec; glaux_dll;
-FUNCTION auxDIBImageLoadW(name : LPCWSTR): pAUX_RGBImageRec; glaux_dll;
-{$endif}
-{$endif}
-
-PROCEDURE auxCreateFont; glaux_dll;
-
-{$ifndef WINNT}
-PROCEDURE auxDrawStr (name : LPCSTR);  glaux_dll;
-{$else}
-{$ifndef GLAUXIMP}{ not present in GLauximp.dll }
-{$ifdef UNICODE }
-PROCEDURE auxDrawStr (name : LPCWSTR); glaux_dll name 'auxDrawStrW';
-{$else}
-PROCEDURE auxDrawStr (name : LPCSTR);  glaux_dll name 'auxDrawStrA';
-{$endif}
-PROCEDURE auxDrawStrA(name : LPCSTR);  glaux_dll;
-PROCEDURE auxDrawStrW(name : LPCWSTR); glaux_dll;
-{$endif}
-{$endif}
-
-PROCEDURE auxWireSphere(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidSphere(v : GLdouble); glaux_dll;
-PROCEDURE auxWireCube(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidCube(v : GLdouble); glaux_dll;
-PROCEDURE auxWireBox(v1, v2, v3 : GLdouble); glaux_dll;
-PROCEDURE auxSolidBox(v1, v2, v3 : GLdouble); glaux_dll;
-PROCEDURE auxWireTorus(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxSolidTorus(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxWireCylinder(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxSolidCylinder(v1, v2 :  GLdouble); glaux_dll;
-PROCEDURE auxWireIcosahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidIcosahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxWireOctahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidOctahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxWireTetrahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidTetrahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxWireDodecahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidDodecahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxWireCone(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxSolidCone(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxWireTeapot(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidTeapot(v: GLdouble); glaux_dll;
-
-{*
-** Window specific functions
-** hwnd, hdc, and hglrc valid after auxInitWindow()
-*}
-FUNCTION  auxGetHWND : HWND; glaux_dll;
-FUNCTION  auxGetHDC : HDC; glaux_dll;
-FUNCTION  auxGetHGLRC : HGLRC; glaux_dll;
-
-{*
-** Viewperf support functions and constants
-*}
-{* Display Mode Selection Criteria *}
-
-CONST { was an unnamed enum }
-    AUX_USE_ID                  = 1;
-    AUX_EXACT_MATCH             = 2;
-    AUX_MINIMUM_CRITERIA        = 3;
-
-PROCEDURE auxInitDisplayModePolicy(val : GLenum); glaux_dll;
-FUNCTION  auxInitDisplayModeID(val : GLint) : GLenum; glaux_dll;
-FUNCTION  auxGetDisplayModePolicy : GLenum; glaux_dll;
-FUNCTION  auxGetDisplayModeID : GLint; glaux_dll;
-FUNCTION  auxGetDisplayMode : GLenum; glaux_dll;
-
-
-implementation
-
-{ these functions are resolved macros -
-  they should be "inline" if compile can do this }
-
-FUNCTION AUX_WIND_IS_RGB(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_RGB := ((x AND AUX_INDEX) = 0);
-END;
-
-FUNCTION AUX_WIND_IS_INDEX(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_INDEX := ((x AND AUX_INDEX) <> 0);
-END;
-
-FUNCTION AUX_WIND_IS_SINGLE(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_SINGLE := ((x AND AUX_DOUBLE) = 0);
-END;
-
-FUNCTION AUX_WIND_IS_DOUBLE(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_DOUBLE := ((x AND AUX_DOUBLE) <> 0);
-END;
-
-FUNCTION AUX_WIND_IS_INDIRECT(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_INDIRECT := ((x AND AUX_INDIRECT) <> 0);
-END;
-
-FUNCTION AUX_WIND_IS_DIRECT(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_DIRECT := ((x AND AUX_INDIRECT) = 0);
-END;
-
-FUNCTION AUX_WIND_HAS_ACCUM(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_HAS_ACCUM := ((x AND AUX_ACCUM) <> 0);
-END;
-
-FUNCTION AUX_WIND_HAS_ALPHA(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_HAS_ALPHA := ((x AND AUX_ALPHA) <> 0);
-END;
-
-FUNCTION AUX_WIND_HAS_DEPTH(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_HAS_DEPTH := ((x AND (AUX_DEPTH24 OR AUX_DEPTH16)) <> 0);
-END;
-
-FUNCTION AUX_WIND_HAS_STENCIL(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_HAS_STENCIL := ((x AND AUX_STENCIL) <> 0);
-END;
-
-FUNCTION AUX_WIND_USES_FIXED_332_PAL(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_USES_FIXED_332_PAL := ((x AND AUX_FIXED_332_PAL) <> 0);
-END;
-
-{extern float auxRGBMap[20][3];
-
-PROCEDURE AUX_SETCOLOR(x, y);
-BEGIN
-  IF (AUX_WIND_IS_RGB((x))
-  THEN glColor3fv(auxRGBMap[y])
-  ELSE glIndexf(y));
-END;
- - TODO}
-
-
-{begin{of init}
-end.

+ 0 - 502
packages/opengl/build2/glaux_w32s.tem

@@ -1,502 +0,0 @@
-{
-  $Id$
-
-  Translation of the GLaux headers for FreePascal
-  Version for static linking in Win32 environment by Alexander Stohr.
-  Latest change: 1999-11-13
-
-  Further information:
-
-  GLaux is an outdated toolkit from SGI and later used by Microsoft.
-}
-{*++ BUILD Version: 0004    // Increment this if a change has global effects
-
-Copyright (c) 1985-95, Microsoft Corporation
-
-Module Name:
-
-    glaux.h
-
-Abstract:
-
-    Procedure declarations, constant definitions and macros for the OpenGL
-    Auxiliary Library.
-
---*}
-{*
- * (c) Copyright 1993, Silicon Graphics, Inc.
- * ALL RIGHTS RESERVED 
- * Permission to use, copy, modify, and distribute this software for 
- * any purpose and without fee is hereby granted, provided that the above
- * copyright notice appear in all copies and that both the copyright notice
- * and this permission notice appear in supporting documentation, and that 
- * the name of Silicon Graphics, Inc. not be used in advertising
- * or publicity pertaining to distribution of the software without specific,
- * written prior permission. 
- *
- * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
- * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
- * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
- * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
- * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
- * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
- * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
- * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
- * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
- * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
- * 
- * US Government Users Restricted Rights 
- * Use, duplication, or disclosure by the Government is subject to
- * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
- * (c)(1)(ii) of the Rights in Technical Data and Computer Software
- * clause at DFARS 252.227-7013 and/or in similar or successor
- * clauses in the FAR or the DOD or NASA FAR Supplement.
- * Unpublished-- rights reserved under the copyright laws of the
- * United States.  Contractor/manufacturer is Silicon Graphics,
- * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
- *
- * OpenGL(TM) is a trademark of Silicon Graphics, Inc.
- *}
-
-{$MODE delphi}
-
-{You have to enable Macros (compiler switch "-Sm") for compiling this unit!
- This is necessary for supporting different platforms with different calling
- conventions via a single unit.}
-
-{$define WINNT}
-{$define GLauximp}
-{x$define UNICODE}
-
-unit GLaux; { version which does statically linking }
-
-
-interface
-
-{$IFDEF Win32}
-  {$DEFINE glaux_dll := external 'Glauximp.dll'}
-  {$DEFINE glaux_callback := cdecl}
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-
-USES
-  windows,
-  GL;
-{
-#include <windows.h>
-#include <GL/glu.h>
-}
-
-TYPE
-  LPCSTR  = Pointer;   { pointer on a zero terminated string }
-  LPCWSTR = Pointer;   { pointer on a zero terminated unicode string }
-
-{*
-** ToolKit Window Types
-** In the future, AUX_RGBA may be a combination of both RGB and ALPHA
-*}
-
-const
-    AUX_RGB             = 0;
-    AUX_RGBA            = AUX_RGB;
-    AUX_INDEX           = 1;
-    AUX_SINGLE          = 0;
-    AUX_DOUBLE          = 2;
-    AUX_DIRECT          = 0;
-    AUX_INDIRECT        = 4;
-
-    AUX_ACCUM           = 8;
-    AUX_ALPHA           = 16;
-    AUX_DEPTH24         = 32;      {* 24-bit depth buffer *}
-    AUX_STENCIL         = 64;
-    AUX_AUX             = 128;
-    AUX_DEPTH16         = 256;     {* 16-bit depth buffer *}
-    AUX_FIXED_332_PAL   = 512;
-    AUX_DEPTH           = AUX_DEPTH16; {* default is 16-bit depth buffer *}
-
-{*
-** Window Masks
-*}
-
-{ These have been macros and were converted to boolean funtions }
-FUNCTION AUX_WIND_IS_RGB            (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_INDEX          (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_SINGLE         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_DOUBLE         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_INDIRECT       (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_IS_DIRECT         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_HAS_ACCUM         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_HAS_ALPHA         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_HAS_DEPTH         (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_HAS_STENCIL       (x : DWORD) : BOOLEAN;
-FUNCTION AUX_WIND_USES_FIXED_332_PAL(x : DWORD) : BOOLEAN;
-
-{*
-** ToolKit Event Structure
-*}
-type
-    AUX_EVENTREC = RECORD
-    {BEGIN}
-        event : GLint;
-        data  : ARRAY[0..3] OF GLint;
-    END;
-
-{*
-** ToolKit Event Types
-*}
-CONST
-    AUX_EXPOSE      = 1;
-    AUX_CONFIG      = 2;
-    AUX_DRAW        = 4;
-    AUX_KEYEVENT    = 8;
-    AUX_MOUSEDOWN   = 16;
-    AUX_MOUSEUP     = 32;
-    AUX_MOUSELOC    = 64;
-
-{*
-** Toolkit Event Data Indices
-*}
-    AUX_WINDOWX             = 0;
-    AUX_WINDOWY             = 1;
-    AUX_MOUSEX              = 0;
-    AUX_MOUSEY              = 1;
-    AUX_MOUSESTATUS         = 3;
-    AUX_KEY                 = 0;
-    AUX_KEYSTATUS           = 1;
-
-{*
-** ToolKit Event Status Messages
-*}
-    AUX_LEFTBUTTON          = 1;
-    AUX_RIGHTBUTTON         = 2;
-    AUX_MIDDLEBUTTON        = 4;
-    AUX_SHIFT               = 1;
-    AUX_CONTROL             = 2;
-
-{*
-** ToolKit Key Codes
-*}
-    AUX_RETURN              = #$0D;
-    AUX_ESCAPE              = #$1B;
-    AUX_SPACE               = #$20;
-    AUX_LEFT                = #$25;
-    AUX_UP                  = #$26;
-    AUX_RIGHT               = #$27;
-    AUX_DOWN                = #$28;
-    AUX_A                   = 'A';
-    AUX_B                   = 'B';
-    AUX_C                   = 'C';
-    AUX_D                   = 'D';
-    AUX_E                   = 'E';
-    AUX_F                   = 'F';
-    AUX_G                   = 'G';
-    AUX_H                   = 'H';
-    AUX_I                   = 'I';
-    AUX_J                   = 'J';
-    AUX_K                   = 'K';
-    AUX_L                   = 'L';
-    AUX_M                   = 'M';
-    AUX_N                   = 'N';
-    AUX_O                   = 'O';
-    AUX_P                   = 'P';
-    AUX_Q                   = 'Q';
-    AUX_R                   = 'R';
-    AUX_S                   = 'S';
-    AUX_T                   = 'T';
-    AUX_U                   = 'U';
-    AUX_V                   = 'V';
-    AUX_W                   = 'W';
-    AUX_X                   = 'X';
-    AUX_Y                   = 'Y';
-    AUX_Z                   = 'Z';
-    AUX_a_                  = 'a';
-    AUX_b_                  = 'b';
-    AUX_c_                  = 'c';
-    AUX_d_                  = 'd';
-    AUX_e_                  = 'e';
-    AUX_f_                  = 'f';
-    AUX_g_                  = 'g';
-    AUX_h_                  = 'h';
-    AUX_i_                  = 'i';
-    AUX_j_                  = 'j';
-    AUX_k_                  = 'k';
-    AUX_l_                  = 'l';
-    AUX_m_                  = 'm';
-    AUX_n_                  = 'n';
-    AUX_o_                  = 'o';
-    AUX_p_                  = 'p';
-    AUX_q_                  = 'q';
-    AUX_r_                  = 'r';
-    AUX_s_                  = 's';
-    AUX_t_                  = 't';
-    AUX_u_                  = 'u';
-    AUX_v_                  = 'v';
-    AUX_w_                  = 'w';
-    AUX_x_                  = 'x';
-    AUX_y_                  = 'y';
-    AUX_z_                  = 'z';
-    AUX_0                   = '0';
-    AUX_1                   = '1';
-    AUX_2                   = '2';
-    AUX_3                   = '3';
-    AUX_4                   = '4';
-    AUX_5                   = '5';
-    AUX_6                   = '6';
-    AUX_7                   = '7';
-    AUX_8                   = '8';
-    AUX_9                   = '9';
-
-{*
-** ToolKit Gets and Sets
-*}
-    AUX_FD                  = 1;  {* return fd (long) *}
-    AUX_COLORMAP            = 3;  {* pass buf of r, g and b (unsigned char) *}
-    AUX_GREYSCALEMAP        = 4;
-    AUX_FOGMAP              = 5;  {* pass fog and color bits (long) *}
-    AUX_ONECOLOR            = 6;  {* pass index, r, g, and b (long) *}
-
-{*
-** Color Macros
-*}
-
-    AUX_BLACK               = 0;
-    AUX_RED                 = 13;
-    AUX_GREEN               = 14;
-    AUX_YELLOW              = 15;
-    AUX_BLUE                = 16;
-    AUX_MAGENTA             = 17;
-    AUX_CYAN                = 18;
-    AUX_WHITE               = 19;
-
-{ this was a macro and is now a procedure }
-{ PROCEDURE AUX_SETCOLOR(x, y); - TODO }
-
-{*
-** RGB Image Structure
-*}
-
-type
-    AUX_RGBImageRec = RECORD
-    {BEGIN}
-        sizeX, sizeY : GLint;
-        data : ^BYTE;
-    END;
-    pAUX_RGBImageRec = ^AUX_RGBImageRec;
-
-{*
-** Prototypes
-*}
-
-Procedure auxInitDisplayMode(mode:GLenum); glaux_dll;
-Procedure auxInitPosition(x,y,w,h:Integer); glaux_dll;
-
-{$ifndef WINNT}
-FUNCTION  auxInitWindow(name:LPCSTR)  : GLenum; glaux_dll;
-{$else}
-{$ifdef UNICODE }
-FUNCTION  auxInitWindow (name:LPCWSTR) : GLenum; glaux_dll name 'auxInitWindowW';
-{$else}
-FUNCTION  auxInitWindow (name:LPCSTR)  : GLenum; glaux_dll name 'auxInitWindowA';
-{$endif}
-FUNCTION  auxInitWindowA(name:LPCSTR)  : GLenum; glaux_dll;
-FUNCTION  auxInitWindowW(name:LPCWSTR) : GLenum; glaux_dll;
-{$endif}
-
-PROCEDURE auxCloseWindow; glaux_dll;
-PROCEDURE auxQuit;        glaux_dll;
-PROCEDURE auxSwapBuffers; glaux_dll;
-
-{ callbacks }
-type
-  TAUXMAINPROC    = PROCEDURE;                           glaux_callback;
-  TAUXEXPOSEPROC  = PROCEDURE(w, h : integer);           glaux_callback;
-  TAUXRESHAPEPROC = PROCEDURE(w, h : GLsizei);           glaux_callback;
-  TAUXIDLEPROC    = PROCEDURE;                           glaux_callback;
-  TAUXKEYPROC     = PROCEDURE;                           glaux_callback;
-  TAUXMOUSEPROC   = PROCEDURE(VAR event : AUX_EVENTREC); glaux_callback;
-
-{ callback setup routines }
-PROCEDURE auxMainLoop   (func : TAUXMAINPROC); glaux_dll;
-PROCEDURE auxExposeFunc (func : TAUXEXPOSEPROC); glaux_dll;
-PROCEDURE auxReshapeFunc(func : TAUXRESHAPEPROC); glaux_dll;
-PROCEDURE auxIdleFunc   (func : TAUXIDLEPROC); glaux_dll;
-PROCEDURE auxKeyFunc    (val : integer; func : TAUXKEYPROC); glaux_dll;
-PROCEDURE auxMouseFunc  (v1, v2 :integer; func : TAUXMOUSEPROC); glaux_dll;
-
-FUNCTION  auxGetColorMapSize : integer; glaux_dll;
-PROCEDURE auxGetMouseLoc(var x, y : integer); glaux_dll;
-PROCEDURE auxSetOneColor(id : integer; r, g, b : GLfloat); glaux_dll;
-PROCEDURE auxSetFogRamp(v1, v2 : integer); glaux_dll;
-PROCEDURE auxSetGreyRamp; glaux_dll;
-PROCEDURE auxSetRGBMap(id : integer; var map : GLfloat); glaux_dll;
-
-{$ifndef WINNT}
-FUNCTION auxRGBImageLoad(name : LPCSTR) : pAUX_RGBImageRec; glaux_dll;
-{$else}
-{$ifndef GLAUXIMP}{ not present in GLauximp.dll }
-{$ifdef UNICODE}
-FUNCTION auxRGBImageLoad (name : LPCWSTR): pAUX_RGBImageRec; glaux_dll name 'auxRGBImageLoadW';
-{$else}
-FUNCTION auxRGBImageLoad (name : LPCSTR) : pAUX_RGBImageRec; glaux_dll name 'auxRGBImageLoadA';
-{$endif}
-FUNCTION auxRGBImageLoadA(name : LPCSTR) : pAUX_RGBImageRec; glaux_dll;
-FUNCTION auxRGBImageLoadW(name : LPCWSTR): pAUX_RGBImageRec; glaux_dll;
-{$endif}
-{$endif}
-
-{$ifndef WINNT}
-{ this function is Windows specific! }
-FUNCTION auxDIBImageLoad(name : LPCSTR) : pAUX_RGBImageRec; glaux_dll;
-{$else}
-{$ifndef GLAUXIMP}{ not present in GLauximp.dll }
-{$ifdef UNICODE }
-FUNCTION auxDIBImageLoad (name : LPCWSTR): pAUX_RGBImageRec; glaux_dll name 'auxDIBImageLoadW';
-{$else}
-FUNCTION auxDIBImageLoad (name : LPCSTR) : pAUX_RGBImageRec; glaux_dll name 'auxDIBImageLoadA';
-{$endif}
-FUNCTION auxDIBImageLoadA(name : LPCSTR) : pAUX_RGBImageRec; glaux_dll;
-FUNCTION auxDIBImageLoadW(name : LPCWSTR): pAUX_RGBImageRec; glaux_dll;
-{$endif}
-{$endif}
-
-PROCEDURE auxCreateFont; glaux_dll;
-
-{$ifndef WINNT}
-PROCEDURE auxDrawStr (name : LPCSTR);  glaux_dll;
-{$else}
-{$ifndef GLAUXIMP}{ not present in GLauximp.dll }
-{$ifdef UNICODE }
-PROCEDURE auxDrawStr (name : LPCWSTR); glaux_dll name 'auxDrawStrW';
-{$else}
-PROCEDURE auxDrawStr (name : LPCSTR);  glaux_dll name 'auxDrawStrA';
-{$endif}
-PROCEDURE auxDrawStrA(name : LPCSTR);  glaux_dll;
-PROCEDURE auxDrawStrW(name : LPCWSTR); glaux_dll;
-{$endif}
-{$endif}
-
-PROCEDURE auxWireSphere(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidSphere(v : GLdouble); glaux_dll;
-PROCEDURE auxWireCube(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidCube(v : GLdouble); glaux_dll;
-PROCEDURE auxWireBox(v1, v2, v3 : GLdouble); glaux_dll;
-PROCEDURE auxSolidBox(v1, v2, v3 : GLdouble); glaux_dll;
-PROCEDURE auxWireTorus(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxSolidTorus(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxWireCylinder(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxSolidCylinder(v1, v2 :  GLdouble); glaux_dll;
-PROCEDURE auxWireIcosahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidIcosahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxWireOctahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidOctahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxWireTetrahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidTetrahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxWireDodecahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidDodecahedron(v : GLdouble); glaux_dll;
-PROCEDURE auxWireCone(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxSolidCone(v1, v2 : GLdouble); glaux_dll;
-PROCEDURE auxWireTeapot(v : GLdouble); glaux_dll;
-PROCEDURE auxSolidTeapot(v: GLdouble); glaux_dll;
-
-{*
-** Window specific functions
-** hwnd, hdc, and hglrc valid after auxInitWindow()
-*}
-FUNCTION  auxGetHWND : HWND; glaux_dll;
-FUNCTION  auxGetHDC : HDC; glaux_dll;
-FUNCTION  auxGetHGLRC : HGLRC; glaux_dll;
-
-{*
-** Viewperf support functions and constants
-*}
-{* Display Mode Selection Criteria *}
-
-CONST { was an unnamed enum }
-    AUX_USE_ID                  = 1;
-    AUX_EXACT_MATCH             = 2;
-    AUX_MINIMUM_CRITERIA        = 3;
-
-PROCEDURE auxInitDisplayModePolicy(val : GLenum); glaux_dll;
-FUNCTION  auxInitDisplayModeID(val : GLint) : GLenum; glaux_dll;
-FUNCTION  auxGetDisplayModePolicy : GLenum; glaux_dll;
-FUNCTION  auxGetDisplayModeID : GLint; glaux_dll;
-FUNCTION  auxGetDisplayMode : GLenum; glaux_dll;
-
-
-implementation
-
-{ these functions are resolved macros -
-  they should be "inline" if compile can do this }
-
-FUNCTION AUX_WIND_IS_RGB(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_RGB := ((x AND AUX_INDEX) = 0);
-END;
-
-FUNCTION AUX_WIND_IS_INDEX(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_INDEX := ((x AND AUX_INDEX) <> 0);
-END;
-
-FUNCTION AUX_WIND_IS_SINGLE(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_SINGLE := ((x AND AUX_DOUBLE) = 0);
-END;
-
-FUNCTION AUX_WIND_IS_DOUBLE(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_DOUBLE := ((x AND AUX_DOUBLE) <> 0);
-END;
-
-FUNCTION AUX_WIND_IS_INDIRECT(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_INDIRECT := ((x AND AUX_INDIRECT) <> 0);
-END;
-
-FUNCTION AUX_WIND_IS_DIRECT(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_IS_DIRECT := ((x AND AUX_INDIRECT) = 0);
-END;
-
-FUNCTION AUX_WIND_HAS_ACCUM(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_HAS_ACCUM := ((x AND AUX_ACCUM) <> 0);
-END;
-
-FUNCTION AUX_WIND_HAS_ALPHA(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_HAS_ALPHA := ((x AND AUX_ALPHA) <> 0);
-END;
-
-FUNCTION AUX_WIND_HAS_DEPTH(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_HAS_DEPTH := ((x AND (AUX_DEPTH24 OR AUX_DEPTH16)) <> 0);
-END;
-
-FUNCTION AUX_WIND_HAS_STENCIL(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_HAS_STENCIL := ((x AND AUX_STENCIL) <> 0);
-END;
-
-FUNCTION AUX_WIND_USES_FIXED_332_PAL(x : DWORD) : BOOLEAN;
-BEGIN
-  AUX_WIND_USES_FIXED_332_PAL := ((x AND AUX_FIXED_332_PAL) <> 0);
-END;
-
-{extern float auxRGBMap[20][3];
-
-PROCEDURE AUX_SETCOLOR(x, y);
-BEGIN
-  IF (AUX_WIND_IS_RGB((x))
-  THEN glColor3fv(auxRGBMap[y])
-  ELSE glIndexf(y));
-END;
- - TODO}
-
-
-{begin{of init}
-end.

+ 0 - 300
packages/opengl/build2/glext.def

@@ -1,300 +0,0 @@
-# This is the definition file for all GL extension stuff
-
-%COPY_INTERFACE
-// -------------------------------------------------------
-//   GL extensions constants
-// -------------------------------------------------------
-
-const
-  // GL_EXT_blend_minmax and GL_EXT_blend_color
-  GL_CONSTANT_COLOR_EXT                 = $8001;
-  GL_ONE_MINUS_CONSTANT_COLOR_EXT       = $8002;
-  GL_CONSTANT_ALPHA_EXT                 = $8003;
-  GL_ONE_MINUS_CONSTANT_ALPHA_EXT       = $8004;
-  GL_BLEND_EQUATION_EXT                 = $8009;
-  GL_MIN_EXT                            = $8007;
-  GL_MAX_EXT                            = $8008;
-  GL_FUNC_ADD_EXT                       = $8006;
-  GL_FUNC_SUBTRACT_EXT                  = $800A;
-  GL_FUNC_REVERSE_SUBTRACT_EXT          = $800B;
-  GL_BLEND_COLOR_EXT                    = $8005;
-
-  // GL_EXT_polygon_offset
-  GL_POLYGON_OFFSET_EXT                 = $8037;
-  GL_POLYGON_OFFSET_FACTOR_EXT          = $8038;
-  GL_POLYGON_OFFSET_BIAS_EXT            = $8039;
-
-  // GL_EXT_vertex_array
-  GL_VERTEX_ARRAY_EXT                   = $8074;
-  GL_NORMAL_ARRAY_EXT                   = $8075;
-  GL_COLOR_ARRAY_EXT                    = $8076;
-  GL_INDEX_ARRAY_EXT                    = $8077;
-  GL_TEXTURE_COORD_ARRAY_EXT            = $8078;
-  GL_EDGE_FLAG_ARRAY_EXT                = $8079;
-  GL_VERTEX_ARRAY_SIZE_EXT              = $807A;
-  GL_VERTEX_ARRAY_TYPE_EXT              = $807B;
-  GL_VERTEX_ARRAY_STRIDE_EXT            = $807C;
-  GL_VERTEX_ARRAY_COUNT_EXT             = $807D;
-  GL_NORMAL_ARRAY_TYPE_EXT              = $807E;
-  GL_NORMAL_ARRAY_STRIDE_EXT            = $807F;
-  GL_NORMAL_ARRAY_COUNT_EXT             = $8080;
-  GL_COLOR_ARRAY_SIZE_EXT               = $8081;
-  GL_COLOR_ARRAY_TYPE_EXT               = $8082;
-  GL_COLOR_ARRAY_STRIDE_EXT             = $8083;
-  GL_COLOR_ARRAY_COUNT_EXT              = $8084;
-  GL_INDEX_ARRAY_TYPE_EXT               = $8085;
-  GL_INDEX_ARRAY_STRIDE_EXT             = $8086;
-  GL_INDEX_ARRAY_COUNT_EXT              = $8087;
-  GL_TEXTURE_COORD_ARRAY_SIZE_EXT       = $8088;
-  GL_TEXTURE_COORD_ARRAY_TYPE_EXT       = $8089;
-  GL_TEXTURE_COORD_ARRAY_STRIDE_EXT     = $808A;
-  GL_TEXTURE_COORD_ARRAY_COUNT_EXT      = $808B;
-  GL_EDGE_FLAG_ARRAY_STRIDE_EXT         = $808C;
-  GL_EDGE_FLAG_ARRAY_COUNT_EXT          = $808D;
-  GL_VERTEX_ARRAY_POINTER_EXT           = $808E;
-  GL_NORMAL_ARRAY_POINTER_EXT           = $808F;
-  GL_COLOR_ARRAY_POINTER_EXT            = $8090;
-  GL_INDEX_ARRAY_POINTER_EXT            = $8091;
-  GL_TEXTURE_COORD_ARRAY_POINTER_EXT    = $8092;
-  GL_EDGE_FLAG_ARRAY_POINTER_EXT        = $8093;
-
-  // GL_EXT_texture_object
-  GL_TEXTURE_PRIORITY_EXT               = $8066;
-  GL_TEXTURE_RESIDENT_EXT               = $8067;
-  GL_TEXTURE_1D_BINDING_EXT             = $8068;
-  GL_TEXTURE_2D_BINDING_EXT             = $8069;
-
-  // GL_EXT_texture3D
-  GL_PACK_SKIP_IMAGES_EXT               = $806B;
-  GL_PACK_IMAGE_HEIGHT_EXT              = $806C;
-  GL_UNPACK_SKIP_IMAGES_EXT             = $806D;
-  GL_UNPACK_IMAGE_HEIGHT_EXT            = $806E;
-  GL_TEXTURE_3D_EXT                     = $806F;
-  GL_PROXY_TEXTURE_3D_EXT               = $8070;
-  GL_TEXTURE_DEPTH_EXT                  = $8071;
-  GL_TEXTURE_WRAP_R_EXT                 = $8072;
-  GL_MAX_3D_TEXTURE_SIZE_EXT            = $8073;
-  GL_TEXTURE_3D_BINDING_EXT             = $806A;
-
-  // GL_EXT_paletted_texture
-  GL_TABLE_TOO_LARGE_EXT                = $8031;
-  GL_COLOR_TABLE_FORMAT_EXT             = $80D8;
-  GL_COLOR_TABLE_WIDTH_EXT              = $80D9;
-  GL_COLOR_TABLE_RED_SIZE_EXT           = $80DA;
-  GL_COLOR_TABLE_GREEN_SIZE_EXT         = $80DB;
-  GL_COLOR_TABLE_BLUE_SIZE_EXT          = $80DC;
-  GL_COLOR_TABLE_ALPHA_SIZE_EXT         = $80DD;
-  GL_COLOR_TABLE_LUMINANCE_SIZE_EXT     = $80DE;
-  GL_COLOR_TABLE_INTENSITY_SIZE_EXT     = $80DF;
-  GL_TEXTURE_INDEX_SIZE_EXT             = $80ED;
-  GL_COLOR_INDEX1_EXT                   = $80E2;
-  GL_COLOR_INDEX2_EXT                   = $80E3;
-  GL_COLOR_INDEX4_EXT                   = $80E4;
-  GL_COLOR_INDEX8_EXT                   = $80E5;
-  GL_COLOR_INDEX12_EXT                  = $80E6;
-  GL_COLOR_INDEX16_EXT                  = $80E7;
-
-  // GL_EXT_shared_texture_palette
-  GL_SHARED_TEXTURE_PALETTE_EXT         = $81FB;
-
-  // GL_EXT_point_parameters
-  GL_POINT_SIZE_MIN_EXT                 = $8126;
-  GL_POINT_SIZE_MAX_EXT                 = $8127;
-  GL_POINT_FADE_THRESHOLD_SIZE_EXT      = $8128;
-  GL_DISTANCE_ATTENUATION_EXT           = $8129;
-
-  // GL_EXT_rescale_normal
-  GL_RESCALE_NORMAL_EXT                 = $803A;
-
-  // GL_EXT_abgr
-  GL_ABGR_EXT                           = $8000;
-
-  // GL_SGIS_multitexture
-  GL_SELECTED_TEXTURE_SGIS              = $835C;
-  GL_SELECTED_TEXTURE_COORD_SET_SGIS    = $835D;
-  GL_MAX_TEXTURES_SGIS                  = $835E;
-  GL_TEXTURE0_SGIS                      = $835F;
-  GL_TEXTURE1_SGIS                      = $8360;
-  GL_TEXTURE2_SGIS                      = $8361;
-  GL_TEXTURE3_SGIS                      = $8362;
-  GL_TEXTURE_COORD_SET_SOURCE_SGIS      = $8363;
-
-  // GL_EXT_multitexture
-  GL_SELECTED_TEXTURE_EXT               = $83C0;
-  GL_SELECTED_TEXTURE_COORD_SET_EXT     = $83C1;
-  GL_SELECTED_TEXTURE_TRANSFORM_EXT     = $83C2;
-  GL_MAX_TEXTURES_EXT                   = $83C3;
-  GL_MAX_TEXTURE_COORD_SETS_EXT         = $83C4;
-  GL_TEXTURE_ENV_COORD_SET_EXT          = $83C5;
-  GL_TEXTURE0_EXT                       = $83C6;
-  GL_TEXTURE1_EXT                       = $83C7;
-  GL_TEXTURE2_EXT                       = $83C8;
-  GL_TEXTURE3_EXT                       = $83C9;
-
-  // GL_SGIS_texture_edge_clamp
-  GL_CLAMP_TO_EDGE_SGIS                 = $812F;
-
-
-// -------------------------------------------------------
-//   GL Extension Procedures
-// -------------------------------------------------------
-
-var
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-  // === 1.0 Extensions ===
-
-  // GL_EXT_blend_minmax
-  glBlendEquationEXT: procedure(mode: GLenum);
-
-  // GL_EXT_blend_color
-  glBlendColorEXT: procedure(red, green, blue, alpha: GLclampf);
-
-  // GL_EXT_polygon_offset
-  glPolygonOffsetEXT: procedure(factor, bias: Single);
-
-  // GL_EXT_vertex_array
-  glVertexPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr);
-  glNormalPointerEXT: procedure(AType: GLenum; stride, count: LongInt; var ptr);
-  glColorPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr);
-  glIndexPointerEXT: procedure(AType: GLenum; stride, count: LongInt; var ptr);
-  glTexCoordPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr);
-  glEdgeFlagPointerEXT: procedure(stride, count: LongInt; var ptr: Boolean);
-  glGetPointervEXT: procedure(pname: GLenum; var params: Pointer);
-  glArrayElementEXT: procedure(i: LongInt);
-  glDrawArraysEXT: procedure(mode: GLEnum; first, count: LongInt);
-
-  // GL_EXT_texture_object
-  glGenTexturesEXT: procedure(n: LongInt; var textures: LongWord);
-  glDeleteTexturesEXT: procedure(n: LongInt; var textures: LongWord);
-  glBindTextureEXT: procedure(target: GLenum; texture: LongWord);
-  glPrioritizeTexturesEXT: procedure(n: LongInt; var textures: LongWord; var priorities: GLClampf);
-  glAreTexturesResidentEXT: function(n: LongInt; var textures: LongWord; var residences: Boolean): Boolean;
-  glIsTextureEXT: function(texture: LongWord): Boolean;
-
-  // GL_EXT_texture3D
-  glTexImage3DEXT: procedure(target: GLenum; level: LongInt; internalFormat: GLenum; width, height, depth, border: LongInt; format, AType: GLenum; var pixels);
-  glTexSubImage3DEXT: procedure(target: GLenum; level, xoffset, yoffset, zoffset, width, height, depth: LongInt; format, AType: GLenum; var pixels);
-  glCopyTexSubImage3DEXT: procedure(target: GLenum; level, xoffset, yoffset, zoffset, x, y, width, height: LongInt);
-
-  // GL_EXT_color_table
-  glColorTableEXT: procedure(target, internalformat: GLenum; width: LongInt; format, AType: GLenum; var table);
-  glColorSubTableEXT: procedure(target: GLenum; start, count: LongInt; format, AType: GLEnum; var data);
-  glGetColorTableEXT: procedure(target, format, AType: GLenum; var table);
-  glGetColorTableParameterfvEXT: procedure(target, pname: GLenum; var params: Single);
-  glGetColorTableParameterivEXT: procedure(target, pname: GLenum; var params: LongInt);
-
-  // GL_SGIS_multitexture
-  glMultiTexCoord1dSGIS: procedure(target: GLenum; s: Double);
-  glMultiTexCoord1dvSGIS: procedure(target: GLenum; var v: Double);
-  glMultiTexCoord1fSGIS: procedure(target: GLenum; s: Single);
-  glMultiTexCoord1fvSGIS: procedure(target: GLenum; var v: Single);
-  glMultiTexCoord1iSGIS: procedure(target: GLenum; s: LongInt);
-  glMultiTexCoord1ivSGIS: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord1sSGIS: procedure(target: GLenum; s: ShortInt);
-  glMultiTexCoord1svSGIS: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord2dSGIS: procedure(target: GLenum; s, t: Double);
-  glMultiTexCoord2dvSGIS: procedure(target: GLenum; var v: Double);
-  glMultiTexCoord2fSGIS: procedure(target: GLenum; s, t: Single);
-  glMultiTexCoord2fvSGIS: procedure(target: GLenum; var v: Single);
-  glMultiTexCoord2iSGIS: procedure(target: GLenum; s, t: LongInt);
-  glMultiTexCoord2ivSGIS: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord2sSGIS: procedure(target: GLenum; s, t: ShortInt);
-  glMultiTexCoord2svSGIS: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord3dSGIS: procedure(target: GLenum; s, t, r: Double);
-  glMultiTexCoord3dvSGIS: procedure(target: GLenum; var v: Double);
-  glMultiTexCoord3fSGIS: procedure(target: GLenum; s, t, r: Single);
-  glMultiTexCoord3fvSGIS: procedure(target: GLenum; var v: Single);
-  glMultiTexCoord3iSGIS: procedure(target: GLenum; s, t, r: LongInt);
-  glMultiTexCoord3ivSGIS: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord3sSGIS: procedure(target: GLenum; s, t, r: ShortInt);
-  glMultiTexCoord3svSGIS: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord4dSGIS: procedure(target: GLenum; s, t, r, q: Double);
-  glMultiTexCoord4dvSGIS: procedure(target: GLenum; var v: Double);
-  glMultiTexCoord4fSGIS: procedure(target: GLenum; s, t, r, q: Single);
-  glMultiTexCoord4fvSGIS: procedure(target: GLenum; var v: Single);
-  glMultiTexCoord4iSGIS: procedure(target: GLenum; s, t, r, q: LongInt);
-  glMultiTexCoord4ivSGIS: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord4sSGIS: procedure(target: GLenum; s, t, r, q: ShortInt);
-  glMultiTexCoord4svSGIS: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoordPointerSGIS: procedure(target: GLenum; size: LongInt; AType: GLEnum; stride: LongInt; var APointer);
-  glSelectTextureSGIS: procedure(target: GLenum);
-  glSelectTextureCoordSetSGIS: procedure(target: GLenum);
-
-  // GL_EXT_multitexture
-  glMultiTexCoord1dEXT: procedure(target: GLenum; s: Double);
-  glMultiTexCoord1dvEXT: procedure(target: GLenum; var v: Double);
-  glMultiTexCoord1fEXT: procedure(target: GLenum; s: Single);
-  glMultiTexCoord1fvEXT: procedure(target: GLenum; var v: Single);
-  glMultiTexCoord1iEXT: procedure(target: GLenum; s: LongInt);
-  glMultiTexCoord1ivEXT: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord1sEXT: procedure(target: GLenum; s: ShortInt);
-  glMultiTexCoord1svEXT: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord2dEXT: procedure(target: GLenum; s, t: Double);
-  glMultiTexCoord2dvEXT: procedure(target: GLenum; var v: Double);
-  glMultiTexCoord2fEXT: procedure(target: GLenum; s, t: Single);
-  glMultiTexCoord2fvEXT: procedure(target: GLenum; var v: Single);
-  glMultiTexCoord2iEXT: procedure(target: GLenum; s, t: LongInt);
-  glMultiTexCoord2ivEXT: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord2sEXT: procedure(target: GLenum; s, t: ShortInt);
-  glMultiTexCoord2svEXT: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord3dEXT: procedure(target: GLenum; s, t, r: Double);
-  glMultiTexCoord3dvEXT: procedure(target: GLenum; var v: Double);
-  glMultiTexCoord3fEXT: procedure(target: GLenum; s, t, r: Single);
-  glMultiTexCoord3fvEXT: procedure(target: GLenum; var v: Single);
-  glMultiTexCoord3iEXT: procedure(target: GLenum; s, t, r: LongInt);
-  glMultiTexCoord3ivEXT: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord3sEXT: procedure(target: GLenum; s, t, r: ShortInt);
-  glMultiTexCoord3svEXT: procedure(target: GLenum; var v: ShortInt);
-  glMultiTexCoord4dEXT: procedure(target: GLenum; s, t, r, q: Double);
-  glMultiTexCoord4dvEXT: procedure(target: GLenum; var v: Double);
-  glMultiTexCoord4fEXT: procedure(target: GLenum; s, t, r, q: Single);
-  glMultiTexCoord4fvEXT: procedure(target: GLenum; var v: Single);
-  glMultiTexCoord4iEXT: procedure(target: GLenum; s, t, r, q: LongInt);
-  glMultiTexCoord4ivEXT: procedure(target: GLenum; var v: LongInt);
-  glMultiTexCoord4sEXT: procedure(target: GLenum; s, t, r, q: ShortInt);
-  glMultiTexCoord4svEXT: procedure(target: GLenum; var v: ShortInt);
-  glInterleavedTextureCoordSetsEXT: procedure(factor: LongInt);
-  glSelectTextureEXT: procedure(target: GLenum);
-  glSelectTextureCoordSetEXT: procedure(target: GLenum);
-  glSelectTextureTransformEXT: procedure(target: GLenum);
-
-  // GL_EXT_point_parameters
-  glPointParameterfEXT: procedure(pname: GLenum; param: Single);
-  glPointParameterfvEXT: procedure(pname: GLenum; var params: Single);
-
-  // GL_MESA_window_pos
-  glWindowPos2iMESA: procedure(x, y: LongInt);
-  glWindowPos2sMESA: procedure(x, y: ShortInt);
-  glWindowPos2fMESA: procedure(x, y: Single);
-  glWindowPos2dMESA: procedure(x, y: Double);
-  glWindowPos2ivMESA: procedure(var p: LongInt);
-  glWindowPos2svMESA: procedure(var p: ShortInt);
-  glWindowPos2fvMESA: procedure(var p: Single);
-  glWindowPos2dvMESA: procedure(var p: Double);
-  glWindowPos3iMESA: procedure(x, y, z: LongInt);
-  glWindowPos3sMESA: procedure(x, y, z: ShortInt);
-  glWindowPos3fMESA: procedure(x, y, z: Single);
-  glWindowPos3dMESA: procedure(x, y, z: Double);
-  glWindowPos3ivMESA: procedure(var p: LongInt);
-  glWindowPos3svMESA: procedure(var p: ShortInt);
-  glWindowPos3fvMESA: procedure(var p: Single);
-  glWindowPos3dvMESA: procedure(var p: Double);
-  glWindowPos4iMESA: procedure(x, y, z, w: LongInt);
-  glWindowPos4sMESA: procedure(x, y, z, w: ShortInt);
-  glWindowPos4fMESA: procedure(x, y, z, w: Single);
-  glWindowPos4dMESA: procedure(x, y, z, w: Double);
-  glWindowPos4ivMESA: procedure(var p: LongInt);
-  glWindowPos4svMESA: procedure(var p: ShortInt);
-  glWindowPos4fvMESA: procedure(var p: Single);
-  glWindowPos4dvMESA: procedure(var p: Double);
-
-  // GL_MESA_resize_buffers
-  glResizeBuffersMESA: procedure;
-%END

+ 0 - 196
packages/opengl/build2/glu.def

@@ -1,196 +0,0 @@
-# This is the definition file for all GLU stuff
-
-%COPY_INTERFACE
-const
-  GLU_TRUE                              = GL_TRUE;
-  GLU_FALSE                             = GL_FALSE;
-
-  // Normal vectors
-  GLU_SMOOTH                            = 100000;
-  GLU_FLAT                              = 100001;
-  GLU_NONE                              = 100002;
-
-  // Quadric draw styles
-  GLU_POINT                             = 100010;
-  GLU_LINE                              = 100011;
-  GLU_FILL                              = 100012;
-  GLU_SILHOUETTE                        = 100013;
-
-  // Quadric orientation
-  GLU_OUTSIDE                           = 100020;
-  GLU_INSIDE                            = 100021;
-
-  // Tesselator
-  GLU_BEGIN                             = 100100;
-  GLU_VERTEX                            = 100101;
-  GLU_END                               = 100102;
-  GLU_ERROR                             = 100103;
-  GLU_EDGE_FLAG                         = 100104;
-
-  // Contour types
-  GLU_CW                                = 100120;
-  GLU_CCW                               = 100121;
-  GLU_INTERIOR                          = 100122;
-  GLU_EXTERIOR                          = 100123;
-  GLU_UNKNOWN                           = 100124;
-
-  // Tesselation errors
-  GLU_TESS_ERROR1                       = 100151;  // missing gluEndPolygon
-  GLU_TESS_ERROR2                       = 100152;  // missing gluBeginPolygon
-  GLU_TESS_ERROR3                       = 100153;  // misoriented contour
-  GLU_TESS_ERROR4                       = 100154;  // vertex/edge intersection
-  GLU_TESS_ERROR5                       = 100155;  // misoriented or self-intersecting loops
-  GLU_TESS_ERROR6                       = 100156;  // coincident vertices
-  GLU_TESS_ERROR7                       = 100157;  // all vertices collinear
-  GLU_TESS_ERROR8                       = 100158;  // intersecting edges
-  GLU_TESS_ERROR9                       = 100159;  // not coplanar contours
-
-  // NURBS
-  GLU_AUTO_LOAD_MATRIX                  = 100200;
-  GLU_CULLING                           = 100201;
-  GLU_PARAMETRIC_TOLERANCE              = 100202;
-  GLU_SAMPLING_TOLERANCE                = 100203;
-  GLU_DISPLAY_MODE                      = 100204;
-  GLU_SAMPLING_METHOD                   = 100205;
-  GLU_U_STEP                            = 100206;
-  GLU_V_STEP                            = 100207;
-
-  GLU_PATH_LENGTH                       = 100215;
-  GLU_PARAMETRIC_ERROR                  = 100216;
-  GLU_DOMAIN_DISTANCE                   = 100217;
-
-  GLU_MAP1_TRIM_2                       = 100210;
-  GLU_MAP1_TRIM_3                       = 100211;
-
-  GLU_OUTLINE_POLYGON                   = 100240;
-  GLU_OUTLINE_PATCH                     = 100241;
-
-  GLU_NURBS_ERROR1                      = 100251;   // spline order un-supported
-  GLU_NURBS_ERROR2                      = 100252;   // too few knots
-  GLU_NURBS_ERROR3                      = 100253;   // valid knot range is empty
-  GLU_NURBS_ERROR4                      = 100254;   // decreasing knot sequence
-  GLU_NURBS_ERROR5                      = 100255;   // knot multiplicity > spline order
-  GLU_NURBS_ERROR6                      = 100256;   // endcurve() must follow bgncurve()
-  GLU_NURBS_ERROR7                      = 100257;   // bgncurve() must precede endcurve()
-  GLU_NURBS_ERROR8                      = 100258;   // ctrlarray or knot vector is NULL
-  GLU_NURBS_ERROR9                      = 100259;   // cannot draw pwlcurves
-  GLU_NURBS_ERROR10                     = 100260;   // missing gluNurbsCurve()
-  GLU_NURBS_ERROR11                     = 100261;   // missing gluNurbsSurface()
-  GLU_NURBS_ERROR12                     = 100262;   // endtrim() must precede endsurface()
-  GLU_NURBS_ERROR13                     = 100263;   // bgnsurface() must precede endsurface()
-  GLU_NURBS_ERROR14                     = 100264;   // curve of improper type passed as trim curve
-  GLU_NURBS_ERROR15                     = 100265;   // bgnsurface() must precede bgntrim()
-  GLU_NURBS_ERROR16                     = 100266;   // endtrim() must follow bgntrim()
-  GLU_NURBS_ERROR17                     = 100267;   // bgntrim() must precede endtrim()*/
-  GLU_NURBS_ERROR18                     = 100268;   // invalid or missing trim curve*/
-  GLU_NURBS_ERROR19                     = 100269;   // bgntrim() must precede pwlcurve()
-  GLU_NURBS_ERROR20                     = 100270;   // pwlcurve referenced twice*/
-  GLU_NURBS_ERROR21                     = 100271;   // pwlcurve and nurbscurve mixed
-  GLU_NURBS_ERROR22                     = 100272;   // improper usage of trim data type
-  GLU_NURBS_ERROR23                     = 100273;   // nurbscurve referenced twice
-  GLU_NURBS_ERROR24                     = 100274;   // nurbscurve and pwlcurve mixed
-  GLU_NURBS_ERROR25                     = 100275;   // nurbssurface referenced twice
-  GLU_NURBS_ERROR26                     = 100276;   // invalid property
-  GLU_NURBS_ERROR27                     = 100277;   // endsurface() must follow bgnsurface()
-  GLU_NURBS_ERROR28                     = 100278;   // intersecting or misoriented trim curves
-  GLU_NURBS_ERROR29                     = 100279;   // intersecting trim curves
-  GLU_NURBS_ERROR30                     = 100280;   // UNUSED
-  GLU_NURBS_ERROR31                     = 100281;   // unconnected trim curves
-  GLU_NURBS_ERROR32                     = 100282;   // unknown knot error
-  GLU_NURBS_ERROR33                     = 100283;   // negative vertex count encountered
-  GLU_NURBS_ERROR34                     = 100284;   // negative byte-stride
-  GLU_NURBS_ERROR35                     = 100285;   // unknown type descriptor
-  GLU_NURBS_ERROR36                     = 100286;   // null control point reference
-  GLU_NURBS_ERROR37                     = 100287;   // duplicate point on pwlcurve
-
-  // Errors
-  GLU_INVALID_ENUM                      = 100900;
-  GLU_INVALID_VALUE                     = 100901;
-  GLU_OUT_OF_MEMORY                     = 100902;
-  GLU_INCOMPATIBLE_GL_VERSION           = 100903;
-
-  // New in GLU 1.1
-  GLU_VERSION                           = 100800;
-  GLU_EXTENSIONS                        = 100801;
-
-type
-  PGLUquadricObj = ^TGLUquadricObj;
-  TGLUquadricObj = record end;
-  PGLUtriangulatorObj = ^TGLUtriangulatorObj;
-  TGLUtriangulatorObj = record end;
-  PGLUnurbsObj = ^TGLUnurbsObj;
-  TGLUnurbsObj = record end;
-
-  TGLUQuadricCallback = procedure; cdecl;
-  TGLUNurbsCallback = procedure; cdecl;
-  TGLUTessCallback = procedure; cdecl;
-
-  TGLUViewport = array[0..3] of LongInt;
-  TGLUMatrixd = array[0..15] of Double;
-  TGLUMatrixf = array[0..15] of Single;
-  TGLUVectord = array[0..2] of Double;
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-  // Miscellaneous functions
-  gluLookAt: procedure(eye, eyey, eyez, centerx, centery, centerz, upx, upy, upz: Double);
-  gluOrtho2D: procedure(left, right, bottom, top: Double);
-  gluPerspective: procedure(fovy, aspect, zNear, zFar: Double);
-  gluPickMatrix: procedure(x, y, width, height: Double; const viewport: TGLUViewport);
-  gluProject: procedure(objx, objy, objz: Double; const modelMatrix, projMatrix: TGLUMatrixd; const viewport: TGLUViewport; winx, winy, winz: Double);
-  gluUnProject: procedure(winx, winy, winz: Double; const modelMatrix, projMatrix: TGLUMatrixd; const viewport: TGLUViewport; objx, objy, objz: Double);
-  gluErrorString: procedure(errorCode: GLenum);
-
-  // Mipmapping and image scaling
-  gluScaleImage: procedure(format: GLenum; within, heightin: LongInt; typein: GLenum; var datain; widthout, heightout: LongInt; typeout: GLenum; var dataout);
-  gluBuild1DMipmaps: procedure(target: GLenum; components, width: LongInt; format, AType: GLEnum; var data);
-  gluBuild2DMipmaps: procedure(target: GLenum; components, width, height: LongInt; format, AType: GLEnum; var data);
-
-  // Quadrics
-  gluNewQuadric: function: PGLUquadricObj;
-  gluDeleteQuadric: procedure(state: PGLUquadricObj);
-  gluQuadricDrawStyle: procedure(quadObject: PGLUquadricObj; drawStyle: GLenum);
-  gluQuadricOrientation: procedure(quadObject: PGLUquadricObj; orientation: GLenum);
-  gluQuadricNormals: procedure(quadObject: PGLUquadricObj; normals: GLenum);
-  gluQuadricTexture: procedure(quadObject: PGLUquadricObj; textureCoords: Boolean);
-  gluQuadricCallback: procedure(quadObject: PGLUquadricObj; which: GLenum; fn: TGLUQuadricCallback);
-  gluCylinder: procedure(qobj: PGLUquadricObj; baseRadius, topRadius, height: Double; slices, stacks: LongInt);
-  gluSphere: procedure(qobj: PGLUquadricObj; radius: Double; slices, stacks: LongInt);
-  gluDisk: procedure(qobj: PGLUquadricObj; innerRadius, outerRadius: Double; slices, loops: LongInt);
-  gluPartialDisk: procedure(qobj: PGLUquadricObj; innerRadius, outerRadius: Double; slices, loops: LongInt; startAngle, sweepAngle: Double);
-
-  // Nurbs
-  gluNewNurbsRenderer: function: PGLUnurbsObj;
-  gluDeleteNurbsRenderer: procedure(nobj: PGLUnurbsObj);
-  gluLoadSamplingMatrices: procedure(nobj: PGLUnurbsObj; const modelMatrix, projMatrix: TGLUMatrixf; const viewport: TGLUViewport);
-  gluNurbsProperty: procedure(nobj: PGLUnurbsObj; AProperty: GLenum; value: Single);
-  gluGetNurbsProperty: procedure(nobj: PGLUnurbsObj; AProperty: GLEnum; var value: Single);
-  gluBeginCurve: procedure(nobj: PGLUnurbsObj);
-  gluEndCurve: procedure(nobj: PGLUnurbsObj);
-  gluNurbsCurve: procedure(nobj: PGLUnurbsObj; nknots: LongInt; var know: Single; stride: LongInt; var ctlarray: Single; order: LongInt; AType: GLenum);
-  gluBeginSurface: procedure(nobj: PGLUnurbsObj);
-  gluEndSurface: procedure(nobj: PGLUnurbsObj);
-  gluNurbsSurface: procedure(nobj: PGLUnurbsObj; sknot_count: LongInt; var sknot: Single; tknot_count: LongInt; var tknot: Single; s_stride, t_stride: LongInt; var ctlarray: Single; sorder, torder: LongInt; AType: GLenum);
-  gluBeginTrim: procedure(nobj: PGLUnurbsObj);
-  gluEndTrim: procedure(nobj: PGLUnurbsObj);
-  gluPwlCurve: procedure(nobj: PGLUnurbsObj; count: LongInt; var AArray: Single; stride: LongInt; AType: GLenum);
-  gluNurbsCallback: procedure(nobj: PGLUnurbsObj; which: GLenum; fn: TGLUNurbsCallback);
-
-  // Polygon tesselation
-  gluNewTess: function: PGLUtriangulatorObj;
-  gluTessCallback: procedure(tobj: PGLUtriangulatorObj; which: GLenum; fn: TGLUTessCallback);
-
-  gluDeleteTess: procedure(tobj: PGLUtriangulatorObj);
-  gluBeginPolygon: procedure(tobj: PGLUtriangulatorObj);
-  gluEndPolygon: procedure(tobj: PGLUtriangulatorObj);
-  gluNextContour: procedure(tobj: PGLUtriangulatorObj; AType: GLenum);
-  gluTessVertex: procedure(tobj: PGLUtriangulatorObj; v: TGLUVectord; var data);
-
-  // New functions in GLU 1.1
-  gluGetString: function(name: GLenum): PChar;
-%END

+ 0 - 120
packages/opengl/build2/glu_w32d.tem

@@ -1,120 +0,0 @@
-{
-  $Id$
-
-  Translation of the Mesa GLU headers for FreePascal
-  Copyright (C) 1999 Sebastian Guenther
-
-
-  Mesa 3-D graphics library
-  Version:  3.0
-  Copyright (C) 1995-1998  Brian Paul
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-    
-  This library 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
-  Library General Public License for more details.
-    
-  You should have received a copy of the GNU Library General Public
-  License along with this library; if not, write to the Free
-  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-{$MODE delphi}	// objfpc would not work because of direct proc var assignments
-
-{You have to enable Macros (compiler switch "-Sm") for compiling this unit!
- This is necessary for supporting different platforms with different calling
- conventions via a single unit.}
-
-unit GLU;
-
-interface
-
-{$IFDEF Win32}
-  {$DEFINE glu_dll := }
-  uses Windows, GL;
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-
-// =======================================================
-//   Unit specific extensions
-// =======================================================
-
-function InitGLUFromLibrary(libname: PChar): Boolean;
-
-
-// determines automatically which libraries to use:
-function InitGLU: Boolean;
-
-
-var
-  GLUInitialized: Boolean;
-
-
-// =======================================================
-//   GLU consts, types and functions
-// =======================================================
-
-%GLUDeclsIF
-
-var
-%GLUProcsPD
-
-
-// =======================================================
-//
-// =======================================================
-
-implementation
-
-type
-  HInstance = LongWord;
-
-var
-  libGLU : HInstance;
-
-function GetProc(handle: HInstance; name: PChar): Pointer;
-begin
-  Result := GetProcAddress(handle, name);
-  if Result = nil then WriteLn('Unresolved: ', name);
-end;
-
-function InitGLUFromLibrary(libname: PChar): Boolean;
-begin
-  Result := False;
-  libGLU := LoadLibrary(libname);
-  if libGLU = 0 then exit;
-
-%GLUProcsPL
-
-  GLUInitialized := True;
-  Result := True;
-end;
-
-
-function InitGLU: Boolean;
-begin
-  Result := InitGLUFromLibrary('glu32.dll');
-end;
-
-
-finalization
-  if libGLU <> 0 then FreeLibrary(libGLU);
-end.
-
-
-{
-  $Log$
-  Revision 1.1  2000-07-13 06:34:18  michael
-  + Initial import
-
-  Revision 1.1  2000/05/31 00:35:14  alex
-  added working templates
-
-}

+ 0 - 84
packages/opengl/build2/glu_w32s.tem

@@ -1,84 +0,0 @@
-{
-  $Id$
-
-  Translation of the Mesa GLU headers for FreePascal
-  Copyright (C) 1999 Sebastian Guenther
-  Version for static linking in Win32 environment.
-  Latest change: 1999-11-11
-
-  Original copyright notice:
-
-  Mesa 3-D graphics library
-  Version:  3.0
-  Copyright (C) 1995-1998  Brian Paul
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-    
-  This library 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
-  Library General Public License for more details.
-    
-  You should have received a copy of the GNU Library General Public
-  License along with this library; if not, write to the Free
-  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-{$MODE delphi}	// objfpc would not work because of direct proc var assignments
-
-{You have to enable Macros (compiler switch "-Sm") for compiling this unit!
- This is necessary for supporting different platforms with different calling
- conventions via a single unit.}
-
-unit GLU; // version with static linking
-
-
-interface
-
-{$IFDEF Win32}
-  {$DEFINE glu_dll := external 'glu32.dll'}
-  uses
-    Windows,
-    GL;        { for definition of GL_TRUE/FALS }
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-// =======================================================
-//   Unit specific extensions
-// =======================================================
-
-// none - no special init required
-
-
-// =======================================================
-//   GLU consts, types and functions
-// =======================================================
-
-%GLUDeclsIF
-
-%GLUProcsPS
-
-// =======================================================
-//
-// =======================================================
-
-implementation
-
-
-{BEGIN{OF INIT}
-end.
-
-
-{
-  $Log$
-  Revision 1.1  2000-07-13 06:34:18  michael
-  + Initial import
-
-  Revision 1.1  2000/05/31 00:35:14  alex
-  added working templates
-
-}

+ 0 - 268
packages/opengl/build2/glut.def

@@ -1,268 +0,0 @@
-# This is the definition file for all GLUT stuff
-
-%COPY_INTERFACE
-const
-  // Display mode bit masks
-  GLUT_RGB                      = 0;
-  GLUT_RGBA                     = GLUT_RGB;
-  GLUT_INDEX                    = 1;
-  GLUT_SINGLE                   = 0;
-  GLUT_DOUBLE                   = 2;
-  GLUT_ACCUM                    = 4;
-  GLUT_ALPHA                    = 8;
-  GLUT_DEPTH                    = 16;
-  GLUT_STENCIL                  = 32;
-  GLUT_MULTISAMPLE              = 128;
-  GLUT_STEREO                   = 256;
-  GLUT_LUMINANCE                = 512;
-
-  // Mouse buttons
-  GLUT_LEFT_BUTTON              = 0;
-  GLUT_MIDDLE_BUTTON            = 1;
-  GLUT_RIGHT_BUTTON             = 2;
-
-  // Mouse button state
-  GLUT_DOWN                     = 0;
-  GLUT_UP                       = 1;
-
-  // Keys ###
-
-  // Enter / exit state
-  GLUT_LEFT                     = 0;
-  GLUT_ENTERED                  = 1;
-
-  // Menu usage state
-  GLUT_MENU_NOT_IN_USE          = 0;
-  GLUT_MENU_IN_USE              = 1;
-
-  // Visibility state
-  GLUT_NOT_VISIBLE              = 0;
-  GLUT_VISIBLE                  = 1;
-
-  // Window status state
-  GLUT_HIDDEN                   = 0;
-  GLUT_FULLY_RETAINED           = 1;
-  GLUT_PARTIALLY_RETAINED       = 2;
-  GLUT_FULLY_COVERED            = 3;
-
-  // Color index component selection values
-  GLUT_RED                      = 0;
-  GLUT_GREEN                    = 1;
-  GLUT_BLUE                     = 2;
-
-  // Layers for use
-  GLUT_NORMAL                   = 0;
-  GLUT_OVERLAY                  = 1;
-
-  // Bitmap stuff###
-
-
-  // glutGet parameters
-  GLUT_WINDOW_X                 = 100;
-  GLUT_WINDOW_Y                 = 101;
-  GLUT_WINDOW_WIDTH             = 102;
-  GLUT_WINDOW_HEIGHT            = 103;
-  GLUT_WINDOW_BUFFER_SIZE       = 104;
-  GLUT_WINDOW_STENCIL_SIZE      = 105;
-  GLUT_WINDOW_DEPTH_SIZE        = 106;
-  GLUT_WINDOW_RED_SIZE          = 107;
-  GLUT_WINDOW_GREEN_SIZE        = 108;
-  GLUT_WINDOW_BLUE_SIZE         = 109;
-  GLUT_WINDOW_ALPHA_SIZE        = 110;
-  GLUT_WINDOW_ACCUM_RED_SIZE    = 111;
-  GLUT_WINDOW_ACCUM_GREEN_SIZE  = 112;
-  GLUT_WINDOW_ACCUM_BLUE_SIZE   = 113;
-  GLUT_WINDOW_ACCUM_ALPHA_SIZE  = 114;
-  GLUT_WINDOW_DOUBLEBUFFER      = 115;
-  GLUT_WINDOW_RGBA              = 116;
-  GLUT_WINDOW_PARENT            = 117;
-  GLUT_WINDOW_NUM_CHILDREN      = 118;
-  GLUT_WINDOW_COLORMAP_SIZE     = 119;
-  GLUT_WINDOW_NUM_SAMPLES       = 120;
-  GLUT_WINDOW_STEREO            = 121;
-  GLUT_WINDOW_CURSOR            = 122;
-  GLUT_SCREEN_WIDTH             = 200;
-  GLUT_SCREEN_HEIGHT            = 201;
-  GLUT_SCREEN_WIDTH_MM          = 202;
-  GLUT_SCREEN_HEIGHT_MM         = 203;
-  GLUT_MENU_NUM_ITEMS           = 300;
-  GLUT_DISPLAY_MODE_POSSIBLE    = 400;
-  GLUT_INIT_WINDOW_X            = 500;
-  GLUT_INIT_WINDOW_Y            = 501;
-  GLUT_INIT_WINDOW_WIDTH        = 502;
-  GLUT_INIT_WINDOW_HEIGHT       = 503;
-  GLUT_INIT_DISPLAY_MODE        = 504;
-  GLUT_ELAPSED_TIME             = 700;
-  GLUT_WINDOW_FORMAT_ID         = 123;
-
-  // glutDeviceGet parameters
-  GLUT_HAS_KEYBOARD             = 600;
-  GLUT_HAS_MOUSE                = 601;
-  GLUT_HAS_SPACEBALL            = 602;
-  GLUT_HAS_DIAL_AND_BUTTON_BOX  = 603;
-  GLUT_HAS_TABLET               = 604;
-  GLUT_NUM_MOUSE_BUTTONS        = 605;
-  GLUT_NUM_SPACEBALL_BUTTONS    = 606;
-  GLUT_NUM_BUTTON_BOX_BUTTONS   = 607;
-  GLUT_NUM_DIALS                = 608;
-  GLUT_NUM_TABLET_BUTTONS       = 609;
-  GLUT_DEVICE_IGNORE_KEY_REPEAT = 610;
-  GLUT_DEVICE_KEY_REPEAT        = 611;
-  GLUT_HAS_JOYSTICK             = 612;
-  GLUT_OWNS_JOYSTICK            = 613;
-  GLUT_JOYSTICK_BUTTONS         = 614;
-  GLUT_JOYSTICK_AXES            = 615;
-  GLUT_JOYSTICK_POLL_RATE       = 616;
-
-  // glutLayerGet parameters
-  GLUT_OVERLAY_POSSIBLE         = 800;
-  GLUT_LAYER_IN_USE             = 801;
-  GLUT_HAS_OVERLAY              = 802;
-  GLUT_TRANSPARENT_INDEX        = 803;
-  GLUT_NORMAL_DAMAGED           = 804;
-  GLUT_OVERLAY_DAMAGED          = 805;
-
-  // glutVideoResizeGet parameters
-  GLUT_VIDEO_RESIZE_POSSIBLE    = 900;
-  GLUT_VIDEO_RESIZE_IN_USE      = 901;
-  GLUT_VIDEO_RESIZE_X_DELTA     = 902;
-  GLUT_VIDEO_RESIZE_Y_DELTA     = 903;
-  GLUT_VIDEO_RESIZE_WIDTH_DELTA = 904;
-  GLUT_VIDEO_RESIZE_HEIGHT_DELTA= 905;
-  GLUT_VIDEO_RESIZE_X           = 906;
-  GLUT_VIDEO_RESIZE_Y           = 907;
-  GLUT_VIDEO_RESIZE_WIDTH       = 908;
-  GLUT_VIDEO_RESIZE_HEIGHT      = 909;
-
-  // glutGetModifiers return mask
-  GLUT_ACTIVE_SHIFT             = 1;
-  GLUT_ACTIVE_CTRL              = 2;
-  GLUT_ACTIVE_ALT               = 4;
-
-  // Cursor stuff ###
-
-// GLUT window callback sub-API
-type
-  TGlutDisplayFunc = procedure; extdecl
-  TGlutReshapeFunc = procedure(width, height: Integer); extdecl
-
-  TGlutTimerFunc = procedure(value: Integer); extdecl
-
-// GLUT game mode sub-API
-{$ifdef GLUT_GAME}
-// glutGameModeGet
-const
-  GLUT_GAME_MODE_ACTIVE         = 0;
-  GLUT_GAME_MODE_POSSIBLE       = 1;
-  GLUT_GAME_MODE_WIDTH          = 2;
-  GLUT_GAME_MODE_HEIGHT         = 3;
-  GLUT_GAME_MODE_PIXEL_DEPTH    = 4;
-  GLUT_GAME_MODE_REFRESH_RATE   = 5;
-  GLUT_GAME_MODE_DISPLAY_CHANGED= 6;
-{$endif GLUT_GAME}
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-// GLUT initialization sub-API
-  glutInit: procedure(var argcp: Integer; var argv: PChar);
-  glutInitDisplayMode: procedure(mode: LongWord);
-  glutInitDisplayString: procedure(AString: PChar);
-  glutInitWindowPosition: procedure(x, y: Integer);
-  glutInitWindowSize: procedure(width, height: Integer);
-  glutMainLoop: procedure;
-
-// GLUT window sub-API
-  glutCreateWindow: function(title: PChar): Integer;
-  glutCreateSubWindow: function(win, x, y, width, height: Integer): Integer;
-  glutDestroyWindow: procedure(win: Integer);
-  glutPostRedisplay: procedure;
-  glutPostWindowRedisplay: procedure(win: Integer);
-  glutSwapBuffers: procedure;
-  glutGetWindow: function: Integer;
-  glutSetWindow: procedure(win: Integer);
-  glutSetWindowTitle: procedure(title: PChar);
-  glutSetIconTitle: procedure(title: PChar);
-  glutPositionWindow: procedure(x, y: Integer);
-  glutReshapeWindow: procedure(width, height: Integer);
-  glutPopWindow: procedure;
-  glutPushWindow: procedure;
-  glutIconifyWindow: procedure;
-  glutShowWindow: procedure;
-  glutHideWindow: procedure;
-  glutFullScreen: procedure;
-  glutSetCursor: procedure(cursor: Integer);
-  glutWarpPointer: procedure(x, y: Integer);
-
-//overlays ###
-
-//menus ###
-
-// GLUT window callback sub-API
-  glutDisplayFunc: procedure(func: TGlutDisplayFunc);
-  glutReshapeFunc: procedure(func: TGlutReshapeFunc);
-
-  glutTimerFunc: procedure(millis: LongWord; func: TGlutTimerFunc; value: Integer);
-
-
-// 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));
-// 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));
-// GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK * func)(int status, int x, int y));
-// GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK * func)(void));
-// GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK * func)(int state));
-// 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)
-
-// GLUT color index sub-API
-  glutSetColor: procedure(index: Integer; red, green, blue: Single);
-  glutGetColor: function(ndx, component: Integer): Single;
-  glutCopyColormap: procedure(win: Integer);
-
-// GLUT state retrieval sub-API
-  glutGet: function(AType: GLEnum): Integer;
-  glutDeviceGet: function(AType: GLEnum): Integer;
-  glutExtensionSupported: function(name: PChar): Integer;
-  glutGetModifiers: function: Integer;
-  glutLayerGet: function(AType: GLEnum): Integer;
-
-// fonts ###
-
-// pre-built models ###
-
-// video resize ###
-
-// debugging ###
-
-// device control ###
-
-
-// GLUT game mode sub-API
-{$ifdef GLUT_GAME}
-  glutGameModeString: procedure(AString: PChar);
-  glutEnterGameMode: function: Integer;
-  glutLeaveGameMode: procedure;
-  glutGameModeGet: function(mode: GLEnum): Integer;
-{$endif GLUT_GAME}
-%END

+ 0 - 99
packages/opengl/build2/glut_linux.tem

@@ -1,99 +0,0 @@
-{
-  $Id$
-
-  Translation of the Mesa GLUT headers for FreePascal
-  Linux Version, Copyright (C) 1999 Sebastian Guenther
-
-
-  Mesa 3-D graphics library
-  Version:  3.0
-  Copyright (C) 1995-1998  Brian Paul
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-
-  This library 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
-  Library General Public License for more details.
-
-  You should have received a copy of the GNU Library General Public
-  License along with this library; if not, write to the Free
-  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-
-{$MODE delphi}
-
-unit GLUT;
-
-interface
-
-uses GL;
-
-function InitGLUTFromLibrary(libname: PChar): Boolean;
-
-// determines automatically which library to use:
-function InitGLUT: Boolean;
-
-
-var
-  GLUTInitialized: Boolean;
-
-
-%GLUTDeclsIF
-%GLUTProcsPD
-
-
-implementation
-
-{$LINKLIB Xmu}
-
-function dlopen(AFile: PChar; mode: LongInt): Pointer; external 'dl';
-function dlclose(handle: Pointer): LongInt; external 'dl';
-function dlsym(handle: Pointer; name: PChar): Pointer; external 'dl';
-
-function LoadLibrary(name: PChar): Pointer;
-begin
-  Result := dlopen(name, $101 {RTLD_GLOBAL or RTLD_LAZY});
-end;
-
-procedure FreeLibrary(handle: Pointer);
-begin
-  dlclose(handle);
-end;
-
-function GetProc(handle: Pointer; name: PChar): Pointer;
-begin
-  Result := dlsym(handle, name);
-//  if Result = nil then WriteLn('Unresolved: ', name);
-end;
-
-var
-  libGLUT: Pointer;
-
-function InitGLUTFromLibrary(libname: PChar): Boolean;
-begin
-  Result := False;
-  libGLUT := LoadLibrary(libname);
-  if not Assigned(libGLUT) then exit;
-
-%GLUTProcsPL
-
-  GLUTInitialized := True;
-  Result := True;
-end;
-
-
-function InitGLUT: Boolean;
-begin
-  Result := InitGLUTFromLibrary('libglut.so.1');
-end;
-
-
-
-finalization
-  if Assigned(libGLUT) then FreeLibrary(libGLUT);
-end.

+ 0 - 69
packages/opengl/build2/glut_w32d.tem

@@ -1,69 +0,0 @@
-{$MODE delphi}
-
-unit GLUT;
-
-interface
-
-{$IFDEF Win32}
-  {$DEFINE glut_dll := }
-  {$DEFINE gldecl := stdcall;}
-  {$DEFINE extdecl := stdcall;}
-  uses windows, GL;
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-
-function InitGLUTFromLibrary(libname: PChar): Boolean;
-
-// determines automatically which library to use:
-function InitGLUT: Boolean;
-
-
-var
-  GLUTInitialized: Boolean;
-
-
-%GLUTDeclsIF
-
-var
-%GLUTProcsPD
-
-
-implementation
-
-
-type
-  HInstance = LongWord;
-
-var
-  libGLUT: HInstance;
-
-function GetProc(handle: HInstance; name: PChar): Pointer;
-begin
-  Result := GetProcAddress(handle, name);
-  if Result = nil then WriteLn('Unresolved: ', name);
-end;
-
-function InitGLUTFromLibrary(libname: PChar): Boolean;
-begin
-  Result := False;
-  libGLUT := LoadLibrary(libname);
-  if libGLUT = 0 then exit;
-
-%GLUTProcsPL
-
-  GLUTInitialized := True;
-  Result := True;
-end;
-
-
-function InitGLUT: Boolean;
-begin
-  Result := InitGLUTFromLibrary('glut32.dll');
-end;
-
-
-finalization
-  if libGLUT <> 0 then FreeLibrary(libGLUT);
-end.

+ 0 - 51
packages/opengl/build2/glut_w32s.tem

@@ -1,51 +0,0 @@
-{
-  $Id$
-
-  Translation of the GLUT headers for FreePascal
-  Copyright (C) 1999 Sebastian Guenther
-  Version for static linking in Win32 environment by Alexander Stohr.
-  Latest change: 1999-11-13
-
-  Further information:
-
-  GLUT is a powerful toolkit for programming multiplatform OpenGL
-  applications. It was designed by Mark J. Kilgard while working for SGI,
-  he is now working for nVidia.
-}
-{ this translation of the c header files is done by Sebastian Guenther 1999 }
-{ version for static linking for Win32 platforms done by Alexander Stohr 1999 }
-
-{$MODE delphi}
-
-{You have to enable Macros (compiler switch "-Sm") for compiling this unit!
- This is necessary for supporting different platforms with different calling
- conventions via a single unit.}
-
-unit GLUT; { version which does statically linking }
-
-
-interface
-
-uses GL;
-
-{x$DEFINE GLUT_GAME} {enable if you need game mode sub api}
-
-{$IFDEF Win32}
-  {$DEFINE glut_dll := external 'glut32.dll'}
-  {$DEFINE glut_callback := cdecl}
-  {$DEFINE extdecl := }
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-
-%GLUTDeclsIF
-
-%GLUTProcsPS
-
-
-implementation
-
-
-{begin{of init}
-end.

+ 0 - 108
packages/opengl/build2/glx.def

@@ -1,108 +0,0 @@
-# This is the definition file for all GLX stuff
-
-%COPY_INTERFACE
-// Tokens for glXChooseVisual and glXGetConfig:
-const
-  GLX_USE_GL                            = 1;
-  GLX_BUFFER_SIZE                       = 2;
-  GLX_LEVEL                             = 3;
-  GLX_RGBA                              = 4;
-  GLX_DOUBLEBUFFER                      = 5;
-  GLX_STEREO                            = 6;
-  GLX_AUX_BUFFERS                       = 7;
-  GLX_RED_SIZE                          = 8;
-  GLX_GREEN_SIZE                        = 9;
-  GLX_BLUE_SIZE                         = 10;
-  GLX_ALPHA_SIZE                        = 11;
-  GLX_DEPTH_SIZE                        = 12;
-  GLX_STENCIL_SIZE                      = 13;
-  GLX_ACCUM_RED_SIZE                    = 14;
-  GLX_ACCUM_GREEN_SIZE                  = 15;
-  GLX_ACCUM_BLUE_SIZE                   = 16;
-  GLX_ACCUM_ALPHA_SIZE                  = 17;
-
-  // GLX_EXT_visual_info extension
-  GLX_X_VISUAL_TYPE_EXT                 = $22;
-  GLX_TRANSPARENT_TYPE_EXT              = $23;
-  GLX_TRANSPARENT_INDEX_VALUE_EXT       = $24;
-  GLX_TRANSPARENT_RED_VALUE_EXT         = $25;
-  GLX_TRANSPARENT_GREEN_VALUE_EXT       = $26;
-  GLX_TRANSPARENT_BLUE_VALUE_EXT        = $27;
-  GLX_TRANSPARENT_ALPHA_VALUE_EXT       = $28;
-
-
-  // Error codes returned by glXGetConfig:
-  GLX_BAD_SCREEN                        = 1;
-  GLX_BAD_ATTRIBUTE                     = 2;
-  GLX_NO_EXTENSION                      = 3;
-  GLX_BAD_VISUAL                        = 4;
-  GLX_BAD_CONTEXT                       = 5;
-  GLX_BAD_VALUE                         = 6;
-  GLX_BAD_ENUM                          = 7;
-
-  // GLX 1.1 and later:
-  GLX_VENDOR                            = 1;
-  GLX_VERSION                           = 2;
-  GLX_EXTENSIONS                        = 3;
-
-  // GLX_visual_info extension
-  GLX_TRUE_COLOR_EXT                    = $8002;
-  GLX_DIRECT_COLOR_EXT                  = $8003;
-  GLX_PSEUDO_COLOR_EXT                  = $8004;
-  GLX_STATIC_COLOR_EXT                  = $8005;
-  GLX_GRAY_SCALE_EXT                    = $8006;
-  GLX_STATIC_GRAY_EXT                   = $8007;
-  GLX_NONE_EXT                          = $8000;
-  GLX_TRANSPARENT_RGB_EXT               = $8008;
-  GLX_TRANSPARENT_INDEX_EXT             = $8009;
-
-type
-  // From XLib:
-  XPixmap = TXID;
-  XFont = TXID;
-  XColormap = TXID;
-
-  GLXContext = Pointer;
-  GLXPixmap = TXID;
-  GLXDrawable = TXID;
-  GLXContextID = TXID;
-
-var
-%END
-
-
-#=====================================================================
-# Procedures and functions
-#=====================================================================
-
-%PROCS
-  glXChooseVisual: function(dpy: PDisplay; screen: Integer; var attribList: Integer): PXVisualInfo; cdecl;
-  glXCreateContext: function(dpy: PDisplay; vis: PXVisualInfo; shareList: GLXContext; direct: Boolean): GLXContext; cdecl;
-  glXDestroyContext: procedure(dpy: PDisplay; ctx: GLXContext); cdecl;
-  glXMakeCurrent: function(dpy: PDisplay; drawable: GLXDrawable; ctx: GLXContext): Boolean; cdecl;
-  glXCopyContext: procedure(dpy: PDisplay; src, dst: GLXContext; mask: LongWord); cdecl;
-  glXSwapBuffers: procedure(dpy: PDisplay; drawable: GLXDrawable); cdecl;
-  glXCreateGLXPixmap: function(dpy: PDisplay; visual: PXVisualInfo; pixmap: XPixmap): GLXPixmap; cdecl;
-  glXDestroyGLXPixmap: procedure(dpy: PDisplay; pixmap: GLXPixmap); cdecl;
-  glXQueryExtension: function(dpy: PDisplay; var errorb, event: Integer): Boolean; cdecl;
-  glXQueryVersion: function(dpy: PDisplay; var maj, min: Integer): Boolean; cdecl;
-  glXIsDirect: function(dpy: PDisplay; ctx: GLXContext): Boolean; cdecl;
-  glXGetConfig: function(dpy: PDisplay; visual: PXVisualInfo; attrib: Integer; var value: Integer): Integer; cdecl;
-  glXGetCurrentContext: function: GLXContext; cdecl;
-  glXGetCurrentDrawable: function: GLXDrawable; cdecl;
-  glXWaitGL: procedure; cdecl;
-  glXWaitX: procedure; cdecl;
-  glXUseXFont: procedure(font: XFont; first, count, list: Integer); cdecl;
-
-  // GLX 1.1 and later
-  glXQueryExtensionsString: function(dpy: PDisplay; screen: Integer): PChar; cdecl;
-  glXQueryServerString: function(dpy: PDisplay; screen, name: Integer): PChar; cdecl;
-  glXGetClientString: function(dpy: PDisplay; name: Integer): PChar; cdecl;
-
-  // Mesa GLX Extensions
-  glXCreateGLXPixmapMESA: function(dpy: PDisplay; visual: PXVisualInfo; pixmap: XPixmap; cmap: XColormap): GLXPixmap; cdecl;
-  glXReleaseBufferMESA: function(dpy: PDisplay; d: GLXDrawable): Boolean; cdecl;
-  glXCopySubBufferMESA: procedure(dpy: PDisplay; drawbale: GLXDrawable; x, y, width, height: Integer); cdecl;
-  glXGetVideoSyncSGI: function(var counter: LongWord): Integer; cdecl;
-  glXWaitVideoSyncSGI: function(divisor, remainder: Integer; var count: LongWord): Integer; cdecl;
-%END

+ 0 - 122
packages/opengl/build2/glx_w32d.tem

@@ -1,122 +0,0 @@
-{
-  $Id$
-
-  Translation of the Mesa GLX headers for FreePascal
-  Copyright (C) 1999 Sebastian Guenther
-
-
-  Mesa 3-D graphics library
-  Version:  3.0
-  Copyright (C) 1995-1998  Brian Paul
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-    
-  This library 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
-  Library General Public License for more details.
-    
-  You should have received a copy of the GNU Library General Public
-  License along with this library; if not, write to the Free
-  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-{$MODE delphi}	// objfpc would not work because of direct proc var assignments
-
-{You have to enable Macros (compiler switch "-Sm") for compiling this unit!
- This is necessary for supporting different platforms with different calling
- conventions via a single unit.}
-
-unit GL;
-
-interface
-
-{$IFDEF Win32}
-  {$DEFINE glx_dll := external 'unknown.dll'}
-  uses Windows;
-  {x$DEFINE HasGLX}  // Activate GLX stuff
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-{$INDEF HasGLX}
-  {$MESSAGE GLX not present on this platform.}
-{$ENDIF}
-
-
-// =======================================================
-//   Unit specific extensions
-// =======================================================
-
-// Note: Requires that the GL library has already been initialized
-function InitGLX: Boolean;
-
-var
-  GLXInitialized: Boolean;
-
-
-// =======================================================
-//   GLX consts, types and functions
-// =======================================================
-
-%GLXDeclsIF
-
-var
-%GLXProcsPD
-
-
-// =======================================================
-//
-// =======================================================
-
-implementation
-
-type
-  HInstance = LongWord;
-
-{$IFDEF HasGLX}
-
-var
-  libGLX : HInstance;
-
-function GetProc(handle: HInstance; name: PChar): Pointer;
-begin
-  Result := GetProcAddress(handle, name);
-  if Result = nil then WriteLn('Unresolved: ', name);
-end;
-
-function InitGLX: Boolean;
-begin
-  Result := False;
-  { Unix GLX is implemented as special subset of the GL interface }
-  if libGL = 0 then exit;
-  
-  glXQueryVersion := GetProcAddress(libGL, 'glXQueryVersion');
-  if @glXQueryVersion = nil then exit;
-
-%GLXProcsPL
-
-  GLXInitialized := True;
-  Result := True;
-end;
-
-{$ENDIF  IFDEF HasGLX}
-
-
-finalization
-  if libGLX <> 0 then FreeLibrary(libGLX);
-end.
-
-
-{
-  $Log$
-  Revision 1.1  2000-07-13 06:34:18  michael
-  + Initial import
-
-  Revision 1.1  2000/05/31 00:36:08  alex
-  dummy - incomplete code.
-
-}

+ 0 - 81
packages/opengl/build2/glx_w32s.tem

@@ -1,81 +0,0 @@
-{
-  $Id$
-
-  Translation of the Mesa GLX headers for FreePascal
-  Copyright (C) 1999 Sebastian Guenther
-
-
-  Mesa 3-D graphics library
-  Version:  3.0
-  Copyright (C) 1995-1998  Brian Paul
-
-  This library is free software; you can redistribute it and/or
-  modify it under the terms of the GNU Library General Public
-  License as published by the Free Software Foundation; either
-  version 2 of the License, or (at your option) any later version.
-    
-  This library 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
-  Library General Public License for more details.
-    
-  You should have received a copy of the GNU Library General Public
-  License along with this library; if not, write to the Free
-  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-{$MODE delphi}	// objfpc would not work because of direct proc var assignments
-
-{You have to enable Macros (compiler switch "-Sm") for compiling this unit!
- This is necessary for supporting different platforms with different calling
- conventions via a single unit.}
-
-unit GL;
-
-interface
-
-{$IFDEF Win32}
-  {$DEFINE glx_dll := external 'unknown.dll'}
-  uses Windows;
-  {x$DEFINE HasGLX}  // Activate GLX stuff
-{$ELSE}
-  {$MESSAGE Unsupported platform.}
-{$ENDIF}
-
-{$INDEF HasGLX}
-  {$MESSAGE GLX not present on this platform.}
-{$ENDIF}
-
-
-// =======================================================
-//   Unit specific extensions
-// =======================================================
-
-
-// =======================================================
-//   GLX consts, types and functions
-// =======================================================
-
-%GLXDeclsIF
-
-%GLXProcsPS
-
-
-// =======================================================
-//
-// =======================================================
-
-implementation
-
-end.
-
-
-{
-  $Log$
-  Revision 1.1  2000-07-13 06:34:18  michael
-  + Initial import
-
-  Revision 1.1  2000/05/31 00:36:08  alex
-  dummy - incomplete code.
-
-}

+ 0 - 53
packages/opengl/build2/ogl_lind.gen

@@ -1,53 +0,0 @@
-#
-#       build tool script for generation of OpenGL units
-#
-
-# === file format description ===
-# - any empty line is ignored
-# - aything preceeded with a #, *, ; and ' is a comment
-# - sections can be 'common' or be made of a target file name
-# - common sections define general strings, but only
-#   the value of TARGET_DIR is really important for the build
-# - filename sections contain one key for the template name to be used
-#   plus some key definitons that describe the rules of how to insert
-#   generated data.
-# - a key is structured like this:
-#     key_name, key_rule [,optional_parameters]
-# - the following key rules exist and will create somewhat like this:
-#     IG = Ignore:      <key will be ignored - no text generated>
-#     TX = InsertText:  <whole text from refered file>
-#     IF = Interface:   [line from option1]
-#     PD = ProcDecls:   [line from option1] [option2] [//comment in line]
-#     PL = ProcLoaders: [function name from line in opt1]
-#                         := GetProc([option2], '[function name from opt1]');
-#   TX, IF, PD and PL use first optional parameter as the def file name.
-#   the rule PD has second optional parameter that modifys the function.
-#   the rule PL has second optional parameter for import lib/dll name string.
-
-# ==== Linux dynamic linking ====
-[common]
-TOOL_NAME   = c_gen_linux_d
-TARGET_TEXT = Linux
-TARGET_DIR  = ..\linux\
-
-[gl.pp]
-TEMPLATE=gl_linux.tem
-KEY=GLDeclsIF,   IF,gl.def
-KEY=GLProcsPD,   PD,gl.def,     cdecl;
-KEY=GLProcsPL,   PL,gl.def,     'libgl'
-KEY=GLExtDeclsIF,IF,glext.def
-KEY=GLExtProcsPD,PD,glext.def,  cdecl;
-KEY=GLExtProcsPL,PL,glext.def,  'libgl'
-KEY=GLUDeclsIF,  IF,glu.def
-KEY=GLUProcsPD,  PD,glu.def,    cdecl;
-KEY=GLUProcsPL,  PL,glu.def,    'libglu'
-KEY=GLXDeclsIF,  IF,glx.def
-KEY=GLXProcsPD,  PD,glx.def,    cdecl;
-KEY=GLXProcsPL,  PL,glx.def,    'libglx'
-
-[glut.pp]
-TEMPLATE=glut_linux.tem
-KEY=GLUTDeclsIF, IF,glut.def
-KEY=GLUTProcsPD, PD,glut.def,   cdecl;
-KEY=GLUTProcsPL, PL,glut.def,   'libglut'
-

+ 0 - 77
packages/opengl/build2/ogl_w32d.gen

@@ -1,77 +0,0 @@
-#
-#       build tool script for generation of OpenGL units
-#
-
-# === file format description ===
-# - any empty line is ignored
-# - aything preceeded with a #, *, ; and ' is a comment
-# - sections can be 'common' or be made of a target file name
-# - common sections define general strings, but only
-#   the value of TARGET_DIR is really important for the build
-# - filename sections contain one key for the template name to be used
-#   plus some key definitons that describe the rules of how to insert
-#   generated data.
-# - a key is structured like this:
-#     key_name, key_rule [,optional_parameters]
-# - the following key rules exist and will create somewhat like this:
-#     IG = Ignore:      <key will be ignored - no text generated>
-#     TX = InsertText:  <whole text from refered file>
-#     IF = Interface:   [line from option1]
-#     PD = ProcDecls:   [line from option1] [option2] [//comment in line]
-#     PL = ProcLoaders: [function name from line in opt1]
-#                         := GetProc([option2], '[function name from opt1]');
-#   TX, IF, PD and PL use first optional parameter as the def file name.
-#   the rule PD has second optional parameter that modifys the function.
-#   the rule PL has second optional parameter for import lib/dll name string.
-
-# ==== Win32 dynamic linking ====
-[common]
-TOOL_NAME   = c_gen_win32d
-TARGET_TEXT = Win32
-TARGET_DIR  = ..\win32\dynamic\
-
-[gl.pp]
-TEMPLATE=gl_w32d.tem
-KEY=GLDeclsIF10,        IF, gl10.def
-KEY=GLProcsPD10,        PD, gl10.def,           ogl_dll
-KEY=GLProcsPL10,        PL, gl10.def,           libGL
-KEY=GLDeclsIF10Ext,     IF, gl10ext.def
-KEY=GLProcsPD10Ext,     PD, gl10ext.def,        ogl_dll
-KEY=GLProcsPL10Ext,     PL, gl10ext.def,        libGL
-KEY=GLDeclsIF10SGI,     IF, gl10sgi.def
-KEY=GLProcsPD10SGI,     PD, gl10sgi.def,        ogl_dll
-KEY=GLProcsPL10SGI,     PL, gl10sgi.def,        libGL
-KEY=GLDeclsIF10Mesa,    IF, gl10mesa.def
-KEY=GLProcsPD10Mesa,    PD, gl10mesa.def,       ogl_dll
-KEY=GLProcsPL10Mesa,    PL, gl10mesa.def,       libGL
-KEY=GLDeclsIF11,        IF, gl11.def
-KEY=GLProcsPD11,        PD, gl11.def,           ogl_dll
-KEY=GLProcsPL11,        PL, gl11.def,           libGL
-KEY=GLDeclsIF12,        IF, gl12.def
-KEY=GLProcsPD12,        PD, gl12.def,           ogl_dll
-KEY=GLProcsPL12,        PL, gl12.def,           libGL
-
-[glu.pp]
-TEMPLATE=glu_w32d.tem
-KEY=GLUDeclsIF,         IF,glu.def
-KEY=GLUProcsPD,         PD,glu.def,             glu_dll
-KEY=GLUProcsPL,         PL,glu.def,             libGLU
-
-[glut.pp]
-TEMPLATE=glut_w32d.tem
-KEY=GLUTDeclsIF,        IF,glut.def
-KEY=GLUTProcsPD,        PD,glut.def,            glut_dll
-KEY=GLUTProcsPL,        PL,glut.def,            libGLUT
-
-[glaux.pp]
-TEMPLATE=glaux_w32d.tem
-KEY=GLAUXDeclsIF,       IF,glaux.def
-KEY=GLAUXProcsPD,       PD,glaux.def,           glaux_dll
-KEY=GLAUXProcsPL,       PL,glaux.def,           libGLAUX
-
-[glx.pp]
-TEMPLATE=glx_w32d.tem
-KEY=GLXDeclsIF,         IF,glx.def
-KEY=GLXProcsPD,         PD,glx.def,             glx_dll
-KEY=GLXProcsPL,         PL,glx.def,             libGLX
-

+ 0 - 68
packages/opengl/build2/ogl_w32s.gen

@@ -1,68 +0,0 @@
-#
-#       build tool script for generation of OpenGL units
-#
-
-# === file format description ===
-# - any empty line is ignored
-# - aything preceeded with a #, *, ; and ' is a comment
-# - sections can be 'common' or be made of a target file name
-# - common sections define general strings, but only
-#   the value of TARGET_DIR is really important for the build
-# - filename sections contain one key for the template name to be used
-#   plus some key definitons that describe the rules of how to insert
-#   generated data.
-# - a key is structured like this:
-#     key_name, key_rule [,optional_parameters]
-# - the following key rules exist and will create somewhat like this:
-#     IG = Ignore:      <key will be ignored - no text generated>
-#     TX = InsertText:  <whole text from refered file>
-#     IF = Interface:   [line from option1]
-#     PD = ProcDynamic: [line from option1] [option2] [//comment in line]
-#     PS = ProcStatic:  [swapped proc from option1] [option2] [//comment]
-#     PL = ProcLoaders: [function name from line in opt1]
-#                         := GetProc([option2], '[function name from opt1]');
-#   TX, IF, PD and PL use first optional parameter as the def file name.
-#   the rule PD has second optional parameter that modifys the function.
-#   the rule PL has second optional parameter for import lib/dll name string.
-
-# ==== Win32 static linking ====
-[common]
-TOOL_NAME   = c_gen_win32_s
-TARGET_TEXT = Win32
-TARGET_DIR  = ..\win32\static\
-
-[gl.pp]
-TEMPLATE=gl_w32s.tem
-KEY=GLDeclsIF10,        IF, gl10.def
-KEY=GLProcsPS10,        PS, gl10.def,           ogl_dll;
-KEY=GLDeclsIF10Ext,     IF, gl10ext.def
-KEY=GLProcsPS10Ext,     PS, gl10ext.def,        ogl_dll;
-KEY=GLDeclsIF10SGI,     IF, gl10sgi.def
-KEY=GLProcsPS10SGI,     PS, gl10sgi.def,        ogl_dll;
-KEY=GLDeclsIF10Mesa,    IF, gl10mesa.def
-KEY=GLProcsPS10Mesa,    PS, gl10mesa.def,       ogl_dll;
-KEY=GLDeclsIF11,        IF, gl11.def
-KEY=GLProcsPS11,        PS, gl11.def,           ogl_dll;
-KEY=GLDeclsIF12,        IF, gl12.def
-KEY=GLProcsPS12,        PS, gl12.def,           ogl_dll;
-
-[glu.pp]
-TEMPLATE=glu_w32s.tem
-KEY=GLUDeclsIF,         IF, glu.def
-KEY=GLUProcsPS,         PS, glu.def,            glu_dll;
-
-[glut.pp]
-TEMPLATE=glut_w32s.tem
-KEY=GLUTDeclsIF,        IF, glut.def
-KEY=GLUTProcsPS,        PS, glut.def,           glut_dll;
-
-[glaux.pp]
-TEMPLATE=glaux_w32s.tem
-KEY=GLAUXDeclsIF,       IF, glaux.def
-KEY=GLAUXProcsPS,       PS, glaux.def,          glaux_dll;
-
-[glx.pp]
-TEMPLATE=glx_w32s.tem
-KEY=GLXDeclsIF,         IF, glx.def
-KEY=GLXProcsPS,         PS, glx.def,            glx_dll;
-

+ 0 - 1281
packages/opengl/examples/Makefile

@@ -1,1281 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/09/01]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inlinux when running under linux
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
-	@echo You need the GNU utils package to use this Makefile!
-	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
-	@exit
-else
-inlinux=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-ifndef inlinux
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-endif
-endif
-
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inlinux
-ifndef inWinNT
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inlinux
-EXEEXT=
-else
-EXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inlinux
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-ifdef inOS2
-FPC=ppos2
-else
-FPC=ppc386
-endif
-endif
-endif
-override FPC:=$(subst $(EXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Default FPCDIR
-ifeq ($(FPCDIR),wrong)
-override FPCDIR=../../..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inlinux
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override EXEOBJECTS+=glutdemo
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-
-# Directories
-
-
-# Packages
-
-override PACKAGES+=rtl opengl x11
-
-# Libraries
-
-override NEEDOTHERLIB=1
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inlinux
-INSTALL:=install -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inlinux
-INSTALLEXE:=install -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inlinux
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inlinux
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inlinux
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEOPENGL=1
-PACKAGEX11=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
-	$(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEOPENGL
-ifneq ($(wildcard $(PACKAGESDIR)/opengl),)
-ifneq ($(wildcard $(PACKAGESDIR)/opengl/$(OS_TARGET)),)
-PACKAGEDIR_OPENGL=$(PACKAGESDIR)/opengl/$(OS_TARGET)
-else
-PACKAGEDIR_OPENGL=$(PACKAGESDIR)/opengl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_OPENGL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_opengl
-package_opengl:
-	$(MAKE) -C $(PACKAGEDIR_OPENGL) all
-endif
-UNITDIR_OPENGL=$(PACKAGEDIR_OPENGL)
-else
-PACKAGEDIR_OPENGL=
-ifneq ($(wildcard $(UNITSDIR)/opengl),)
-ifneq ($(wildcard $(UNITSDIR)/opengl/$(OS_TARGET)),)
-UNITDIR_OPENGL=$(UNITSDIR)/opengl/$(OS_TARGET)
-else
-UNITDIR_OPENGL=$(UNITSDIR)/opengl
-endif
-else
-UNITDIR_OPENGL=
-endif
-endif
-ifdef UNITDIR_OPENGL
-override NEEDUNITDIR+=$(UNITDIR_OPENGL)
-endif
-endif
-ifdef PACKAGEX11
-ifneq ($(wildcard $(PACKAGESDIR)/x11),)
-ifneq ($(wildcard $(PACKAGESDIR)/x11/$(OS_TARGET)),)
-PACKAGEDIR_X11=$(PACKAGESDIR)/x11/$(OS_TARGET)
-else
-PACKAGEDIR_X11=$(PACKAGESDIR)/x11
-endif
-ifeq ($(wildcard $(PACKAGEDIR_X11)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_x11
-package_x11:
-	$(MAKE) -C $(PACKAGEDIR_X11) all
-endif
-UNITDIR_X11=$(PACKAGEDIR_X11)
-else
-PACKAGEDIR_X11=
-ifneq ($(wildcard $(UNITSDIR)/x11),)
-ifneq ($(wildcard $(UNITSDIR)/x11/$(OS_TARGET)),)
-UNITDIR_X11=$(UNITSDIR)/x11/$(OS_TARGET)
-else
-UNITDIR_X11=$(UNITSDIR)/x11
-endif
-else
-UNITDIR_X11=
-endif
-endif
-ifdef UNITDIR_X11
-override NEEDUNITDIR+=$(UNITDIR_X11)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-export OTHERLIBDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef inlinux
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Add Other dirs path if asked
-ifdef OTHERLIBDIR
-override FPCOPT+=$(addprefix -Fl,$(OTHERLIBDIR))
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY:  all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Exes
-#####################################################################
-
-.PHONY: fpc_exes
-
-ifdef EXEOBJECTS
-override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
-override EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
-
-override ALLTARGET+=fpc_exes
-override INSTALLEXEFILES+=$(EXEFILES)
-override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
-endif
-
-fpc_exes: $(EXEFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef inlinux
-ifndef LIBNAME
-	@$(ECHO) "LIBNAME not set"
-else
-	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
-	@$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef inlinux
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inlinux
-	ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(DATAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-	$(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
-	$(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inlinux
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inlinux
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
-	@$(ECHO) "Please specify ZIPNAME!"
-	@exit 1
-else
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
-	cd $(PACKDIR) ; $(TARPROG) c$(TAROPT) --file $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
-	cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-.PHONY:  fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY:  fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
-	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
-	-$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
-	@$(ECHO)
-	@$(ECHO)  == Configuration info ==
-	@$(ECHO)
-	@$(ECHO)  FPC....... $(FPC)
-	@$(ECHO)  Version... $(FPC_VERSION)
-	@$(ECHO)  CPU....... $(CPU_TARGET)
-	@$(ECHO)  Source.... $(OS_SOURCE)
-	@$(ECHO)  Target.... $(OS_TARGET)
-	@$(ECHO)
-
-fpc_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(ECHO)
-
-fpc_infoinstall:
-	@$(ECHO)
-	@$(ECHO)  == Install info ==
-	@$(ECHO)
-ifdef DATE
-	@$(ECHO)  DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
-	@$(ECHO)  PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
-	@$(ECHO)  PackageName.......... $(PACKAGENAME)
-endif
-	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
-	@$(ECHO)
-	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
-	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
-	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  DataInstallDir....... $(DATAINSTALLDIR)
-	@$(ECHO)
-	@$(ECHO)  DestZipDir........... $(DESTZIPDIR)
-	@$(ECHO)  ZipName.............. $(ZIPNAME)
-	@$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-

+ 0 - 15
packages/opengl/examples/Makefile.fpc

@@ -1,15 +0,0 @@
-#
-#   Makefile.fpc for GL demos
-#
-
-[targets]
-programs=glutdemo
-
-[require]
-packages=opengl x11
-
-[dirs]
-fpcdir=../../..
-
-[libs]
-libother=1

+ 0 - 169
packages/opengl/examples/glutdemo.pp

@@ -1,169 +0,0 @@
-{
-  GL units for Free Pascal - GLUT demo
-  1999 Sebastian Guenther, [email protected]
-
-  You may use this source as starting point for your own programs; consider it
-  as Public Domain.
-}
-
-
-{$MODE objfpc}
-{$H+}
-
-program GLUTDemo;
-uses GL, GLUT;
-
-const
-
-  FPCImg: array[0..4, 0..10] of Byte =
-    ((1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1),
-     (1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0),
-     (1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0),
-     (1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0),
-     (1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1));
-
-var
-  counter: Integer;
-
-
-const
-  colors: array[0..7, 0..2] of Single =
-    ((0, 0, 0), (0, 0, 1), (0, 1, 0), (0, 1, 1),
-     (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1));
-  corners: array[0..7, 0..2] of Single =
-    ((-1, -1, -1), (+1, -1, -1), (+1, +1, -1), (-1, +1, -1),
-     (-1, -1, +1), (+1, -1, +1), (+1, +1, +1), (-1, +1, +1));
-
-
-procedure DrawCube;
-  procedure DrawSide(i1, i2, i3, i4: Integer);
-  begin
-    glColor4f (colors [i1, 0], colors [i1, 1], colors [i1, 2], 0.5);
-    glVertex3f(corners[i1, 0], corners[i1, 1], corners[i1, 2]);
-    glColor4f (colors [i2, 0], colors [i2, 1], colors [i2, 2], 0.5);
-    glVertex3f(corners[i2, 0], corners[i2, 1], corners[i2, 2]);
-    glColor4f (colors [i3, 0], colors [i3, 1], colors [i3, 2], 0.5);
-    glVertex3f(corners[i3, 0], corners[i3, 1], corners[i3, 2]);
-
-    glVertex3f(corners[i4, 0], corners[i4, 1], corners[i4, 2]);
-  end;
-begin
-  glBegin(GL_QUADS);
-  DrawSide(4, 5, 6, 7);         // Front
-  DrawSide(3, 2, 1, 0);         // Back
-  DrawSide(2, 3, 7, 6);         // Top
-  DrawSide(0, 1, 5, 4);         // Bottom
-  DrawSide(4, 7, 3, 0);         // Left
-  DrawSide(1, 2, 6, 5);         // Right
-  glEnd;
-end;
-
-
-procedure DisplayWindow; cdecl;
-var
-  x, y: Integer;
-begin
-  Inc(counter);
-
-  glClearColor(0, 0, 0.2, 1);
-  glClear([GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT]);
-
-  glPushMatrix;
-  glTranslatef(0, 0, Sin(Single(counter) / 20.0) * 5.0 - 5.0);
-  glRotatef(Sin(Single(counter) / 200.0) * 720.0, 0, 1, 0);
-  glRotatef(counter, 0, 0, 1);
-
-  for y := 0 to 4 do
-    for x := 0 to 10 do
-      if FPCImg[y, x] > 0 then begin
-        glPushMatrix;
-        glRotatef(x * Sin(Single(counter) / 5.0), 0, 1, 0);
-        glRotatef(y * Sin(Single(counter) / 12.0) * 4.0, 0, 0, 1);
-        glTranslatef((x - 5) * 1, (2 - y) * 1, 0);
-        glScalef(0.4, 0.4, 0.4);
-        glRotatef(counter, 0.5, 1, 0);
-        DrawCube;
-        glPopMatrix;
-      end;
-
-  glPopMatrix;
-
-  Inc(counter);
-
-  glutSwapBuffers;
-end;
-
-procedure OnTimer(value: Integer); cdecl;
-begin
-  glutPostRedisplay;
-  glutTimerFunc(20, @OnTimer, 0);
-end;
-
-begin
-
-  WriteLn('Dumping unresolved GL* function names; having unresolved functions ');
-  WriteLn('is NOT a problem as long as the application doesn''t use them!');
-  WriteLn('(Most unresolved functions will be propietary extensions which');
-  WriteLn(' should be an official GL extension)');
-  WriteLn;
-
-  GLDumpUnresolvedFunctions := True;
-  GLUTDumpUnresolvedFunctions := True;
-
-  if not InitGl then begin
-    WriteLn('OpenGL is not supported on this system');
-    Halt(2);
-  end;
-
-  if not InitGLU then begin
-    WriteLn('Couldn''t load GLU module');
-    Halt(3);
-  end;
-
-  if not InitGLX then begin
-    WriteLn('Couldn''t load GLX module');
-    Halt(4);
-  end;
-
-  if not InitGLUT then begin
-    WriteLn('Couldn''t load GLUT module');
-    Halt(5);
-  end;
-
-  glutInitDisplayMode(GLUT_RGB or GLUT_DOUBLE or GLUT_DEPTH);
-  glutCreateWindow('Free Pascal  GLUT demo');
-  glutDisplayFunc(@DisplayWindow);
-  glutTimerFunc(20, @OnTimer, 0);
-
-
-  WriteLn;
-  WriteLn('GL info:');
-  WriteLn('  Vendor: ', glGetString(GL_VENDOR));
-  WriteLn('  Renderer: ', glGetString(GL_RENDERER));
-  WriteLn('  Version: ', glGetString(GL_VERSION));
-  WriteLn('  Extensions: ', glGetString(GL_EXTENSIONS));
-
-  // Enable backface culling
-  glEnable(GL_CULL_FACE);
-
-  // Set up depth buffer
-  glEnable(GL_DEPTH_TEST);
-  glDepthFunc(GL_LESS);
-
-  // Set up projection matrix
-  glMatrixMode(GL_PROJECTION);
-  glLoadIdentity;
-  gluPerspective(90, 1.3, 0.1, 100);
-  glMatrixMode(GL_MODELVIEW);
-  glLoadIdentity;
-  glTranslatef(0, 0, -5.5);
-
-
-  glutMainLoop;
-
-end.
-  $Log$
-  Revision 1.2  2000-07-13 11:33:28  michael
-  + removed logs
- 
-}

+ 0 - 1240
packages/opengl/linux/Makefile

@@ -1,1240 +0,0 @@
-#
-# Makefile generated by fpcmake v1.00 [2000/09/01]
-#
-
-defaultrule: all
-
-#####################################################################
-# Autodetect OS (Linux or Dos or Windows NT)
-# define inlinux when running under linux
-# define inWinNT when running under WinNT
-#####################################################################
-
-# We need only / in the path
-override PATH:=$(subst \,/,$(PATH))
-
-# Search for PWD and determine also if we are under linux
-PWD:=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
-ifeq ($(PWD),)
-PWD:=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
-ifeq ($(PWD),)
-nopwd:
-	@echo You need the GNU utils package to use this Makefile!
-	@echo Get ftp://ftp.freepascal.org/pub/fpc/dist/go32v2/utilgo32.zip
-	@exit
-else
-inlinux=1
-endif
-else
-PWD:=$(firstword $(PWD))
-endif
-
-# Detect NT - NT sets OS to Windows_NT
-ifndef inlinux
-ifeq ($(OS),Windows_NT)
-inWinNT=1
-endif
-endif
-
-# Detect OS/2 - OS/2 has OS2_SHELL defined
-ifndef inlinux
-ifndef inWinNT
-ifdef OS2_SHELL
-inOS2=1
-endif
-endif
-endif
-
-# The extension of executables
-ifdef inlinux
-EXEEXT=
-else
-EXEEXT=.exe
-endif
-
-# The path which is searched separated by spaces
-ifdef inlinux
-SEARCHPATH=$(subst :, ,$(PATH))
-else
-SEARCHPATH=$(subst ;, ,$(PATH))
-endif
-
-# Base dir
-ifdef PWD
-BASEDIR:=$(shell $(PWD))
-else
-BASEDIR=.
-endif
-
-#####################################################################
-# Default target
-#####################################################################
-
-override OS_TARGET:=linux
-
-#####################################################################
-# FPC version/target Detection
-#####################################################################
-
-# What compiler to use ?
-ifndef FPC
-# Compatibility with old makefiles
-ifdef PP
-FPC=$(PP)
-else
-ifdef inOS2
-FPC=ppos2
-else
-FPC=ppc386
-endif
-endif
-endif
-override FPC:=$(subst $(EXEEXT),,$(FPC))
-override FPC:=$(subst \,/,$(FPC))$(EXEEXT)
-
-# Target OS
-ifndef OS_TARGET
-OS_TARGET:=$(shell $(FPC) -iTO)
-endif
-
-# Source OS
-ifndef OS_SOURCE
-OS_SOURCE:=$(shell $(FPC) -iSO)
-endif
-
-# Target CPU
-ifndef CPU_TARGET
-CPU_TARGET:=$(shell $(FPC) -iTP)
-endif
-
-# Source CPU
-ifndef CPU_SOURCE
-CPU_SOURCE:=$(shell $(FPC) -iSP)
-endif
-
-# FPC version
-ifndef FPC_VERSION
-FPC_VERSION:=$(shell $(FPC) -iV)
-endif
-
-export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
-
-#####################################################################
-# FPCDIR Setting
-#####################################################################
-
-# Test FPCDIR to look if the RTL dir exists
-ifdef FPCDIR
-override FPCDIR:=$(subst \,/,$(FPCDIR))
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-else
-override FPCDIR=wrong
-endif
-
-# Default FPCDIR
-ifeq ($(FPCDIR),wrong)
-override FPCDIR=../../..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=wrong
-endif
-endif
-endif
-
-# Detect FPCDIR
-ifeq ($(FPCDIR),wrong)
-ifdef inlinux
-override FPCDIR=/usr/local/lib/fpc/$(FPC_VERSION)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=/usr/lib/fpc/$(FPC_VERSION)
-endif
-else
-override FPCDIR:=$(subst /$(FPC),,$(firstword $(strip $(wildcard $(addsuffix /$(FPC),$(SEARCHPATH))))))
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR:=$(FPCDIR)/..
-ifeq ($(wildcard $(FPCDIR)/rtl),)
-ifeq ($(wildcard $(FPCDIR)/units),)
-override FPCDIR=c:/pp
-endif
-endif
-endif
-endif
-endif
-endif
-
-ifndef PACKAGESDIR
-PACKAGESDIR=$(FPCDIR)/packages
-endif
-ifndef TOOLKITSDIR
-TOOLKITSDIR=
-endif
-ifndef COMPONENTSDIR
-COMPONENTSDIR=
-endif
-
-# Create units dir
-ifneq ($(FPCDIR),.)
-UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
-endif
-
-#####################################################################
-# User Settings
-#####################################################################
-
-
-# Targets
-
-override UNITOBJECTS+=gl glut
-
-# Clean
-
-
-# Install
-
-ZIPTARGET=install
-
-# Defaults
-
-
-# Directories
-
-
-# Packages
-
-override PACKAGES+=rtl x11
-
-# Libraries
-
-
-# Info
-
-INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall 
-
-#####################################################################
-# Shell tools
-#####################################################################
-
-# echo
-ifndef ECHO
-ECHO:=$(strip $(wildcard $(addsuffix /gecho$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=$(strip $(wildcard $(addsuffix /echo$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ECHO),)
-ECHO:=echo
-ECHOE:=echo
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-else
-ECHO:=$(firstword $(ECHO))
-ECHOE=$(ECHO) -E
-endif
-endif
-
-# To copy pograms
-ifndef COPY
-COPY:=cp -fp
-endif
-
-# Copy a whole tree
-ifndef COPYTREE
-COPYTREE:=cp -rfp
-endif
-
-# To move pograms
-ifndef MOVE
-MOVE:=mv -f
-endif
-
-# Check delete program
-ifndef DEL
-DEL:=rm -f
-endif
-
-# Check deltree program
-ifndef DELTREE
-DELTREE:=rm -rf
-endif
-
-# To install files
-ifndef INSTALL
-ifdef inlinux
-INSTALL:=install -m 644
-else
-INSTALL:=$(COPY)
-endif
-endif
-
-# To install programs
-ifndef INSTALLEXE
-ifdef inlinux
-INSTALLEXE:=install -m 755
-else
-INSTALLEXE:=$(COPY)
-endif
-endif
-
-# To make a directory.
-ifndef MKDIR
-ifdef inlinux
-MKDIR:=install -m 755 -d
-else
-MKDIR:=ginstall -m 755 -d
-endif
-endif
-
-export ECHO ECHOE COPY COPYTREE MOVE DEL DELTREE INSTALL INSTALLEXE MKDIR
-
-#####################################################################
-# Default Tools
-#####################################################################
-
-# assembler, redefine it if cross compiling
-ifndef AS
-AS=as
-endif
-
-# linker, but probably not used
-ifndef LD
-LD=ld
-endif
-
-# ppas.bat / ppas.sh
-ifdef inlinux
-PPAS=ppas.sh
-else
-ifdef inOS2
-PPAS=ppas.cmd
-else
-PPAS=ppas.bat
-endif
-endif
-
-# ldconfig to rebuild .so cache
-ifdef inlinux
-LDCONFIG=ldconfig
-else
-LDCONFIG=
-endif
-
-# ppumove
-ifndef PPUMOVE
-PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUMOVE),)
-PPUMOVE=
-else
-PPUMOVE:=$(firstword $(PPUMOVE))
-endif
-endif
-export PPUMOVE
-
-# ppufiles
-ifndef PPUFILES
-PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PPUFILES),)
-PPUFILES=
-else
-PPUFILES:=$(firstword $(PPUFILES))
-endif
-endif
-export PPUFILES
-
-# Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
-# upx uses that one itself (PFV)
-ifndef UPXPROG
-ifeq ($(OS_TARGET),go32v2)
-UPXPROG:=1
-endif
-ifeq ($(OS_TARGET),win32)
-UPXPROG:=1
-endif
-ifdef UPXPROG
-UPXPROG:=$(strip $(wildcard $(addsuffix /upx$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(UPXPROG),)
-UPXPROG=
-else
-UPXPROG:=$(firstword $(UPXPROG))
-endif
-else
-UPXPROG=
-endif
-endif
-export UPXPROG
-
-# ZipProg, you can't use Zip as the var name (PFV)
-ifndef ZIPPROG
-ZIPPROG:=$(strip $(wildcard $(addsuffix /zip$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(ZIPPROG),)
-ZIPPROG=
-else
-ZIPPROG:=$(firstword $(ZIPPROG))
-endif
-endif
-export ZIPPROG
-
-ZIPOPT=-9
-ZIPEXT=.zip
-
-# Tar
-ifndef TARPROG
-TARPROG:=$(strip $(wildcard $(addsuffix /tar$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(TARPROG),)
-TARPROG=
-else
-TARPROG:=$(firstword $(TARPROG))
-endif
-endif
-export TARPROG
-
-ifeq ($(USETAR),bz2)
-TAROPT=vI
-TAREXT=.tar.bz2
-else
-TAROPT=vz
-TAREXT=.tar.gz
-endif
-
-#####################################################################
-# Default extensions
-#####################################################################
-
-# Default needed extensions (Go32v2,Linux)
-LOADEREXT=.as
-PPLEXT=.ppl
-PPUEXT=.ppu
-OEXT=.o
-ASMEXT=.s
-SMARTEXT=.sl
-STATICLIBEXT=.a
-SHAREDLIBEXT=.so
-RSTEXT=.rst
-FPCMADE=fpcmade
-
-# Go32v1
-ifeq ($(OS_TARGET),go32v1)
-PPUEXT=.pp1
-OEXT=.o1
-ASMEXT=.s1
-SMARTEXT=.sl1
-STATICLIBEXT=.a1
-SHAREDLIBEXT=.so1
-FPCMADE=fpcmade.v1
-endif
-
-# Go32v2
-ifeq ($(OS_TARGET),go32v2)
-FPCMADE=fpcmade.dos
-endif
-
-# Linux
-ifeq ($(OS_TARGET),linux)
-FPCMADE=fpcmade.lnx
-endif
-
-# Win32
-ifeq ($(OS_TARGET),win32)
-PPUEXT=.ppw
-OEXT=.ow
-ASMEXT=.sw
-SMARTEXT=.slw
-STATICLIBEXT=.aw
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.w32
-endif
-
-# OS/2
-ifeq ($(OS_TARGET),os2)
-PPUEXT=.ppo
-ASMEXT=.so2
-OEXT=.oo2
-SMARTEXT=.so
-STATICLIBEXT=.ao2
-SHAREDLIBEXT=.dll
-FPCMADE=fpcmade.os2
-endif
-
-# library prefix
-LIBPREFIX=lib
-ifeq ($(OS_TARGET),go32v2)
-LIBPREFIX=
-endif
-ifeq ($(OS_TARGET),go32v1)
-LIBPREFIX=
-endif
-
-# determine which .pas extension is used
-ifndef PASEXT
-ifdef EXEOBJECTS
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
-else
-override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
-endif
-ifeq ($(TESTPAS),)
-PASEXT=.pp
-else
-PASEXT=.pas
-endif
-endif
-
-
-# Check if the dirs really exists, else turn it off
-ifeq ($(wildcard $(UNITSDIR)),)
-UNITSDIR=
-endif
-ifeq ($(wildcard $(TOOLKITSDIR)),)
-TOOLKITSDIR=
-endif
-ifeq ($(wildcard $(PACKAGESDIR)),)
-PACKAGESDIR=
-endif
-ifeq ($(wildcard $(COMPONENTSDIR)),)
-COMPONENTSDIR=
-endif
-
-
-# PACKAGESDIR packages
-
-PACKAGERTL=1
-PACKAGEX11=1
-
-ifdef PACKAGERTL
-ifneq ($(wildcard $(FPCDIR)/rtl),)
-ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
-PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
-else
-PACKAGEDIR_RTL=$(FPCDIR)/rtl
-endif
-ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_rtl
-package_rtl:
-	$(MAKE) -C $(PACKAGEDIR_RTL) all
-endif
-UNITDIR_RTL=$(PACKAGEDIR_RTL)
-else
-PACKAGEDIR_RTL=
-ifneq ($(wildcard $(UNITSDIR)/rtl),)
-ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
-UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
-else
-UNITDIR_RTL=$(UNITSDIR)/rtl
-endif
-else
-UNITDIR_RTL=
-endif
-endif
-ifdef UNITDIR_RTL
-override NEEDUNITDIR+=$(UNITDIR_RTL)
-endif
-endif
-ifdef PACKAGEX11
-ifneq ($(wildcard $(PACKAGESDIR)/x11),)
-ifneq ($(wildcard $(PACKAGESDIR)/x11/$(OS_TARGET)),)
-PACKAGEDIR_X11=$(PACKAGESDIR)/x11/$(OS_TARGET)
-else
-PACKAGEDIR_X11=$(PACKAGESDIR)/x11
-endif
-ifeq ($(wildcard $(PACKAGEDIR_X11)/$(FPCMADE)),)
-override COMPILEPACKAGES+=package_x11
-package_x11:
-	$(MAKE) -C $(PACKAGEDIR_X11) all
-endif
-UNITDIR_X11=$(PACKAGEDIR_X11)
-else
-PACKAGEDIR_X11=
-ifneq ($(wildcard $(UNITSDIR)/x11),)
-ifneq ($(wildcard $(UNITSDIR)/x11/$(OS_TARGET)),)
-UNITDIR_X11=$(UNITSDIR)/x11/$(OS_TARGET)
-else
-UNITDIR_X11=$(UNITSDIR)/x11
-endif
-else
-UNITDIR_X11=
-endif
-endif
-ifdef UNITDIR_X11
-override NEEDUNITDIR+=$(UNITDIR_X11)
-endif
-endif
-
-
-#####################################################################
-# Default Directories
-#####################################################################
-
-# set the prefix directory where to install everything
-ifndef PREFIXINSTALLDIR
-ifdef inlinux
-PREFIXINSTALLDIR=/usr
-else
-PREFIXINSTALLDIR=/pp
-endif
-endif
-export PREFIXINSTALLDIR
-
-# Where to place the resulting zip files
-ifndef DESTZIPDIR
-DESTZIPDIR:=$(BASEDIR)
-endif
-export DESTZIPDIR
-
-#####################################################################
-# Install Directories
-#####################################################################
-
-# set the base directory where to install everything
-ifndef BASEINSTALLDIR
-ifdef inlinux
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
-else
-BASEINSTALLDIR=$(PREFIXINSTALLDIR)
-endif
-endif
-
-# set the directory where to install the binaries
-ifndef BININSTALLDIR
-ifdef inlinux
-BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
-else
-BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
-endif
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/units/$(OS_TARGET)
-ifdef UNITSUBDIR
-UNITINSTALLDIR:=$(UNITINSTALLDIR)/$(UNITSUBDIR)
-endif
-endif
-
-# Where to install shared libraries
-ifndef LIBINSTALLDIR
-ifdef inlinux
-LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
-else
-LIBINSTALLDIR=$(UNITINSTALLDIR)
-endif
-endif
-
-# Where the source files will be stored
-ifndef SOURCEINSTALLDIR
-ifdef inlinux
-SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
-else
-SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
-endif
-ifdef SOURCESUBDIR
-SOURCEINSTALLDIR:=$(SOURCEINSTALLDIR)/$(SOURCESUBDIR)
-endif
-endif
-
-# Where the doc files will be stored
-ifndef DOCINSTALLDIR
-ifdef inlinux
-DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
-else
-DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
-endif
-endif
-
-# Where to install the examples, under linux we use the doc dir
-# because the copytree command will create a subdir itself
-ifndef EXAMPLEINSTALLDIR
-ifdef inlinux
-EXAMPLEINSTALLDIR=$(DOCINSTALLDIR)/examples
-else
-EXAMPLEINSTALLDIR=$(BASEINSTALLDIR)/examples
-endif
-ifdef EXAMPLESUBDIR
-EXAMPLEINSTALLDIR:=$(EXAMPLEINSTALLDIR)/$(EXAMPLESUBDIR)
-endif
-endif
-
-# Where the some extra (data)files will be stored
-ifndef DATAINSTALLDIR
-DATAINSTALLDIR=$(BASEINSTALLDIR)
-endif
-
-#####################################################################
-# Redirection
-#####################################################################
-
-ifndef REDIRFILE
-REDIRFILE=log
-endif
-
-ifdef REDIR
-ifndef inlinux
-override FPC=redir -eo $(FPC)
-endif
-# set the verbosity to max
-override FPCOPT+=-va
-override REDIR:= >> $(REDIRFILE)
-endif
-
-
-#####################################################################
-# Compiler Command Line
-#####################################################################
-
-# Load commandline OPTDEF and add FPC_CPU define
-override FPCOPTDEF:=-d$(CPU_TARGET)
-
-# Load commandline OPT and add target and unit dir to be sure
-ifneq ($(OS_TARGET),$(OS_SOURCE))
-override FPCOPT+=-T$(OS_TARGET)
-endif
-
-# User dirs should be first, so they are looked at first
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
-endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
-endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
-endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
-endif
-
-# Smartlinking
-ifdef LINKSMART
-override FPCOPT+=-XX
-endif
-
-# Smartlinking creation
-ifdef CREATESMART
-override FPCOPT+=-CX
-endif
-
-# Debug
-ifdef DEBUG
-override FPCOPT+=-g -dDEBUG
-endif
-
-# Release mode (strip, optimize and don't load ppc386.cfg)
-# 0.99.12b has a bug in the optimizer so don't use it by default
-ifdef RELEASE
-ifeq ($(FPC_VERSION),0.99.12)
-override FPCOPT+=-Xs -OGp3 -n
-else
-override FPCOPT+=-Xs -OG2p3 -n
-endif
-endif
-
-# Strip
-ifdef STRIP
-override FPCOPT+=-Xs
-endif
-
-# Optimizer
-ifdef OPTIMIZE
-override FPCOPT+=-OG2p3
-endif
-
-# Verbose settings (warning,note,info)
-ifdef VERBOSE
-override FPCOPT+=-vwni
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
-endif
-
-# Target dirs and the prefix to use for clean/install
-ifdef TARGETDIR
-override FPCOPT+=-FE$(TARGETDIR)
-ifeq ($(TARGETDIR),.)
-override TARGETDIRPREFIX=
-else
-override TARGETDIRPREFIX=$(TARGETDIR)/
-endif
-endif
-ifdef UNITTARGETDIR
-override FPCOPT+=-FU$(UNITTARGETDIR)
-ifeq ($(UNITTARGETDIR),.)
-override UNITTARGETDIRPREFIX=
-else
-override UNITTARGETDIRPREFIX=$(TARGETDIR)/
-endif
-else
-ifdef TARGETDIR
-override UNITTARGETDIR=$(TARGETDIR)
-override UNITTARGETDIRPREFIX=$(TARGETDIRPREFIX)
-endif
-endif
-
-# Add commandline options last so they can override
-ifdef OPT
-override FPCOPT+=$(OPT)
-endif
-
-# Add defines from FPCOPTDEF to FPCOPT
-ifdef FPCOPTDEF
-override FPCOPT+=$(FPCOPTDEF)
-endif
-
-# Error file ?
-ifdef ERRORFILE
-override FPCOPT+=-Fr$(ERRORFILE)
-endif
-
-# Was a config file specified ?
-ifdef CFGFILE
-override FPCOPT+=@$(CFGFILE)
-endif
-
-# For win32 the options are passed using the environment FPCEXTCMD
-ifeq ($(OS_SOURCE),win32)
-override FPCEXTCMD:=$(FPCOPT)
-override FPCOPT:=!FPCEXTCMD
-export FPCEXTCMD
-endif
-
-# Compiler commandline
-override COMPILER:=$(FPC) $(FPCOPT)
-
-# also call ppas if with command option -s
-# but only if the OS_SOURCE and OS_TARGE are equal
-ifeq (,$(findstring -s ,$(COMPILER)))
-EXECPPAS=
-else
-ifeq ($(OS_SOURCE),$(OS_TARGET))
-EXECPPAS:=@$(PPAS)
-endif
-endif
-
-#####################################################################
-# Standard rules
-#####################################################################
-
-all: fpc_all
-
-debug: fpc_debug
-
-smart: fpc_smart
-
-shared: fpc_shared
-
-showinstall: fpc_showinstall
-
-install: fpc_install
-
-sourceinstall: fpc_sourceinstall
-
-exampleinstall: fpc_exampleinstall
-
-zipinstall: fpc_zipinstall
-
-zipsourceinstall: fpc_zipsourceinstall
-
-zipexampleinstall: fpc_zipexampleinstall
-
-clean: fpc_clean
-
-distclean: fpc_distclean
-
-cleanall: fpc_cleanall
-
-info: fpc_info
-
-.PHONY:  all debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
-
-#####################################################################
-# Units
-#####################################################################
-
-.PHONY: fpc_units
-
-override ALLTARGET+=fpc_units
-
-override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-override INSTALLPPUFILES+=$(UNITPPUFILES)
-override CLEANPPUFILES+=$(UNITPPUFILES)
-
-fpc_units: $(UNITPPUFILES)
-
-#####################################################################
-# General compile rules
-#####################################################################
-
-.PHONY: fpc_packages fpc_all fpc_debug
-
-$(FPCMADE): $(ALLTARGET)
-	@$(ECHO) Compiled > $(FPCMADE)
-
-fpc_packages: $(COMPILEPACKAGES)
-
-fpc_all: fpc_packages $(FPCMADE)
-
-fpc_debug:
-	$(MAKE) all DEBUG=1
-
-# Search paths for .ppu if targetdir is set
-ifdef UNITTARGETDIR
-vpath %$(PPUEXT) $(UNITTARGETDIR)
-endif
-
-# General compile rules, available for both possible PASEXT
-
-.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
-
-%$(PPUEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(PPUEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pp
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-%$(EXEEXT): %.pas
-	$(COMPILER) $< $(REDIR)
-	$(EXECPPAS)
-
-#####################################################################
-# Library
-#####################################################################
-
-.PHONY: fpc_smart fpc_shared
-
-ifdef LIBVERSION
-LIBFULLNAME=$(LIBNAME).$(LIBVERSION)
-else
-LIBFULLNAME=$(LIBNAME)
-endif
-
-# Default sharedlib units are all unit objects
-ifndef SHAREDLIBUNITOBJECTS
-SHAREDLIBUNITOBJECTS:=$(UNITOBJECTS)
-endif
-
-fpc_smart:
-	$(MAKE) all LINKSMART=1 CREATESMART=1
-
-fpc_shared: all
-ifdef inlinux
-ifndef LIBNAME
-	@$(ECHO) "LIBNAME not set"
-else
-	$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBFULLNAME)
-endif
-else
-	@$(ECHO) "Shared Libraries not supported"
-endif
-
-#####################################################################
-# Install rules
-#####################################################################
-
-.PHONY: fpc_showinstall fpc_install
-
-ifdef EXTRAINSTALLUNITS
-override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
-endif
-
-ifdef INSTALLPPUFILES
-override INSTALLPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPUFILES))
-ifdef PPUFILES
-INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
-else
-INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
-endif
-override INSTALLPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLPPULINKFILES))
-endif
-
-ifdef INSTALLEXEFILES
-override INSTALLEXEFILES:=$(addprefix $(TARGETDIRPREFIX),$(INSTALLEXEFILES))
-endif
-
-fpc_showinstall: $(SHOWINSTALLTARGET)
-ifdef INSTALLEXEFILES
-	@$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
-endif
-ifdef INSTALLPPUFILES
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
-ifneq ($(INSTALLPPULINKFILES),)
-	@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBFULLNAME)
-ifdef inlinux
-	@$(ECHO) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	@$(ECHO) -e $(addprefix "\n"$(DATAINSTALLDIR)/,$(EXTRAINSTALLFILES))
-endif
-
-fpc_install: $(INSTALLTARGET)
-# Create UnitInstallFiles
-ifdef INSTALLEXEFILES
-	$(MKDIR) $(BININSTALLDIR)
-# Compress the exes if upx is defined
-ifdef UPXPROG
-	-$(UPXPROG) $(INSTALLEXEFILES)
-endif
-	$(INSTALLEXE) $(INSTALLEXEFILES) $(BININSTALLDIR)
-endif
-ifdef INSTALLPPUFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
-ifneq ($(INSTALLPPULINKFILES),)
-	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
-endif
-ifneq ($(wildcard $(LIBFULLNAME)),)
-	$(MKDIR) $(LIBINSTALLDIR)
-	$(INSTALL) $(LIBFULLNAME) $(LIBINSTALLDIR)
-ifdef inlinux
-	ln -sf $(LIBFULLNAME) $(LIBINSTALLDIR)/$(LIBNAME)
-endif
-endif
-endif
-ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(DATAINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(DATAINSTALLDIR)
-endif
-
-#####################################################################
-# SourceInstall rules
-#####################################################################
-
-.PHONY: fpc_sourceinstall
-
-ifndef SOURCETOPDIR
-SOURCETOPDIR=$(BASEDIR)
-endif
-
-fpc_sourceinstall: clean
-	$(MKDIR) $(SOURCEINSTALLDIR)
-	$(COPYTREE) $(SOURCETOPDIR) $(SOURCEINSTALLDIR)
-
-#####################################################################
-# exampleinstall rules
-#####################################################################
-
-.PHONY: fpc_exampleinstall
-
-fpc_exampleinstall: $(addsuffix _clean,$(EXAMPLEDIROBJECTS))
-ifdef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-	$(COPY) $(EXAMPLESOURCEFILES) $(EXAMPLEINSTALLDIR)
-endif
-ifdef EXAMPLEDIROBJECTS
-ifndef EXAMPLESOURCEFILES
-	$(MKDIR) $(EXAMPLEINSTALLDIR)
-endif
-	$(COPYTREE) $(addsuffix /*,$(EXAMPLEDIROBJECTS)) $(EXAMPLEINSTALLDIR)
-endif
-
-#####################################################################
-# Zip
-#####################################################################
-
-.PHONY: fpc_zipinstall
-
-# Create suffix to add
-ifndef PACKAGESUFFIX
-PACKAGESUFFIX=$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-PACKAGESUFFIX=go32
-endif
-ifeq ($(OS_TARGET),win32)
-PACKAGESUFFIX=w32
-endif
-endif
-
-# Temporary path to pack a file
-ifndef PACKDIR
-ifndef inlinux
-PACKDIR=$(BASEDIR)/pack_tmp
-else
-PACKDIR=/tmp/fpc-pack
-endif
-endif
-
-# Maybe create default zipname from packagename
-ifndef ZIPNAME
-ifdef PACKAGENAME
-ZIPNAME=$(PACKAGEPREFIX)$(PACKAGENAME)$(PACKAGESUFFIX)
-endif
-endif
-
-# Use tar by default under linux
-ifndef USEZIP
-ifdef inlinux
-USETAR=1
-endif
-endif
-
-fpc_zipinstall:
-ifndef ZIPNAME
-	@$(ECHO) "Please specify ZIPNAME!"
-	@exit 1
-else
-	$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
-ifdef USETAR
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
-	cd $(PACKDIR) ; $(TARPROG) c$(TAROPT) --file $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
-else
-	$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
-	cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
-endif
-	$(DELTREE) $(PACKDIR)
-endif
-
-.PHONY:  fpc_zipsourceinstall
-
-fpc_zipsourceinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=sourceinstall PACKAGESUFFIX=src
-
-.PHONY:  fpc_zipexampleinstall
-
-fpc_zipexampleinstall:
-	$(MAKE) fpc_zipinstall ZIPTARGET=exampleinstall PACKAGESUFFIX=exm
-
-#####################################################################
-# Clean rules
-#####################################################################
-
-.PHONY: fpc_clean fpc_cleanall fpc_distclean
-
-ifdef EXTRACLEANUNITS
-override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
-endif
-
-ifdef CLEANPPUFILES
-override CLEANPPUFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPUFILES))
-# Get the .o and .a files created for the units
-ifdef PPUFILES
-CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
-else
-CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
-endif
-override CLEANPPULINKFILES:=$(addprefix $(TARGETDIRPREFIX),$(CLEANPPULINKFILES))
-endif
-
-fpc_clean: $(CLEANTARGET)
-ifdef CLEANEXEFILES
-	-$(DEL) $(addprefix $(TARGETDIRPREFIX),$(CLEANEXEFILES))
-endif
-ifdef CLEANPPUFILES
-	-$(DEL) $(CLEANPPUFILES)
-endif
-ifneq ($(CLEANPPULINKFILES),)
-	-$(DEL) $(CLEANPPULINKFILES)
-endif
-ifdef CLEANRSTFILES
-	-$(DEL) $(addprefix $(UNITTARGETDIRPREFIX),$(CLEANRSTFILES))
-endif
-ifdef EXTRACLEANFILES
-	-$(DEL) $(EXTRACLEANFILES)
-endif
-ifdef LIBNAME
-	-$(DEL) $(LIBNAME) $(LIBFULLNAME)
-endif
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-fpc_distclean: fpc_clean
-
-# Also run clean first if targetdir is set. Unittargetdir is always
-# set if targetdir or unittargetdir is specified
-ifdef UNITTARGETDIR
-TARGETDIRCLEAN=clean
-endif
-
-fpc_cleanall: $(CLEANTARGET) $(TARGETDIRCLEAN)
-ifdef CLEANEXEFILES
-	-$(DEL) $(CLEANEXEFILES)
-endif
-	-$(DEL) *$(OEXT) *$(PPUEXT) *$(RSTEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-	-$(DELTREE) *$(SMARTEXT)
-	-$(DEL) $(FPCMADE) $(PPAS) link.res $(FPCEXTFILE) $(REDIRFILE)
-
-#####################################################################
-# Info rules
-#####################################################################
-
-.PHONY: fpc_info fpc_cfginfo fpc_objectinfo fpc_toolsinfo fpc_installinfo \
-	fpc_dirinfo
-
-fpc_info: $(INFOTARGET)
-
-fpc_infocfg:
-	@$(ECHO)
-	@$(ECHO)  == Configuration info ==
-	@$(ECHO)
-	@$(ECHO)  FPC....... $(FPC)
-	@$(ECHO)  Version... $(FPC_VERSION)
-	@$(ECHO)  CPU....... $(CPU_TARGET)
-	@$(ECHO)  Source.... $(OS_SOURCE)
-	@$(ECHO)  Target.... $(OS_TARGET)
-	@$(ECHO)
-
-fpc_infoobjects:
-	@$(ECHO)
-	@$(ECHO)  == Object info ==
-	@$(ECHO)
-	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
-	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
-	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
-	@$(ECHO)
-	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
-	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
-	@$(ECHO)
-	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
-	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
-	@$(ECHO)
-
-fpc_infoinstall:
-	@$(ECHO)
-	@$(ECHO)  == Install info ==
-	@$(ECHO)
-ifdef DATE
-	@$(ECHO)  DateStr.............. $(DATESTR)
-endif
-ifdef PACKAGEPREFIX
-	@$(ECHO)  PackagePrefix........ $(PACKAGEPREFIX)
-endif
-ifdef PACKAGENAME
-	@$(ECHO)  PackageName.......... $(PACKAGENAME)
-endif
-	@$(ECHO)  PackageSuffix........ $(PACKAGESUFFIX)
-	@$(ECHO)
-	@$(ECHO)  BaseInstallDir....... $(BASEINSTALLDIR)
-	@$(ECHO)  BinInstallDir........ $(BININSTALLDIR)
-	@$(ECHO)  LibInstallDir........ $(LIBINSTALLDIR)
-	@$(ECHO)  UnitInstallDir....... $(UNITINSTALLDIR)
-	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
-	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
-	@$(ECHO)  DataInstallDir....... $(DATAINSTALLDIR)
-	@$(ECHO)
-	@$(ECHO)  DestZipDir........... $(DESTZIPDIR)
-	@$(ECHO)  ZipName.............. $(ZIPNAME)
-	@$(ECHO)
-
-#####################################################################
-# Local Makefile
-#####################################################################
-
-ifneq ($(wildcard fpcmake.loc),)
-include fpcmake.loc
-endif
-

+ 0 - 15
packages/opengl/linux/Makefile.fpc

@@ -1,15 +0,0 @@
-#
-#   Makefile.fpc for Linux dynamic GL units
-#
-
-[defaults]
-defaulttarget=linux
-
-[targets]
-units=gl glut
-
-[require]
-packages=x11
-
-[dirs]
-fpcdir=../../..

+ 0 - 2240
packages/opengl/linux/gl.pp

@@ -1,2240 +0,0 @@
-{
-  $Id$
-  Translation of the Mesa GL, GLU and GLX headers for Free Pascal, Linux version
-  Copyright (C) 1999-2000 Sebastian Guenther, [email protected]
-
-
-  Mesa 3-D graphics library
-  Version:  3.1
-
-  Copyright (C) 1999  Brian Paul   All Rights Reserved.
-
-  Permission is hereby granted, free of charge, to any person obtaining a
-  copy of this software and associated documentation files (the "Software"),
-  to deal in the Software without restriction, including without limitation
-  the rights to use, copy, modify, merge, publish, distribute, sublicense,
-  and/or sell copies of the Software, and to permit persons to whom the
-  Software is furnished to do so, subject to the following conditions:
-
-  The above copyright notice and this permission notice shall be included
-  in all copies or substantial portions of the Software.
-
-  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-  BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-  AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-}
-
-
-unit GL;
-
-{$MODE delphi}  // objfpc would not work because of direct proc var assignments
-
-interface
-
-uses X, XLib, XUtil;
-
-// ===================================================================
-//   Unit specific extensions
-// ===================================================================
-
-function InitGLFromLibrary(const libname: PChar): Boolean;
-function InitGLUFromLibrary(const libname: PChar): Boolean;
-// Requires that the GL library has already been initialized:
-function InitGLX: Boolean;
-
-// determines automatically which libraries to use:
-function InitGL: Boolean;
-function InitGLU: Boolean;
-
-
-var
-  GLInitialized, GLUInitialized, GLXInitialized: Boolean;
-
-  { Set the following value to True if you want to have a list of all
-    unresolved GL/GLU/GLX functions dumped to the console }
-  GLDumpUnresolvedFunctions: Boolean;
-
-
-
-// C types
-type
-  SignedChar = ShortInt;
-  UnsignedChar = Byte;
-  Short = SmallInt;
-  SignedShort = Short;
-  UnsignedShort = Word;
-  Int = LongInt;
-  SignedInt = Int;
-  UnsignedInt = LongWord;
-  Float = Single;
-
-  PInt = ^Int;
-
-
-// ===================================================================
-//   GL consts, types and functions
-// ===================================================================
-
-
-// -------------------------------------------------------------------
-//   GL types
-// -------------------------------------------------------------------
-
-type
-
-  PGLvoid = Pointer;
-  GLboolean = Boolean;
-  GLbyte = SignedChar;		// 1-byte signed
-  GLshort = Short;		// 2-byte signed
-  GLint = Int;			// 4-byte signed
-  GLubyte = UnsignedChar;	// 1-byte unsigned
-  GLushort = UnsignedShort;	// 2-byte unsigned
-  GLuint = UnsignedInt;		// 4-byte unsigned
-  GLsizei = Int;		// 4-byte signed
-  GLfloat = Float;		// single precision float
-  GLclampf = Float;		// single precision float in [0,1]
-  GLdouble = Double;		// double precision float
-  GLclampd = Double;		// double precision float in [0,1]
-
-  PGLfloat = ^GLfloat;
-
-  GLenum = Integer;
-
-  GLbitfield = set of (GL_CURRENT_BIT, GL_POINT_BIT, GL_LINE_BIT,
-    GL_POLYGON_BIT, GL_POLYGON_STIPPLE_BIT, GL_PIXEL_MODE_BIT,
-    GL_LIGHTING_BIT, GL_FOG_BIT, GL_DEPTH_BUFFER_BIT, GL_ACCUM_BUFFER_BIT,
-    GL_STENCIL_BUFFER_BIT, GL_VIEWPORT_BIT, GL_TRANSFORM_BIT, GL_ENABLE_BIT,
-    GL_COLOR_BUFFER_BIT, GL_HINT_BIT, GL_EVAL_BIT, GL_LIST_BIT, GL_TEXTURE_BIT,
-    GL_SCISSOR_BIT);
-
-const
-  GL_ALL_ATTRIB_BITS = [Low(GLbitfield)..High(GLbitfield)];
-
-
-// -------------------------------------------------------------------
-//   GL constants
-// -------------------------------------------------------------------
-
-const
-  GL_NO_ERROR                           = 0;
-
-  // Boolean values
-  GL_FALSE                              = 0;
-  GL_TRUE                               = 1;
-
-  // Data types
-  GL_BYTE                               = $1400;
-  GL_UNSIGNED_BYTE                      = $1401;
-  GL_SHORT                              = $1402;
-  GL_UNSIGNED_SHORT                     = $1403;
-  GL_INT                                = $1404;
-  GL_UNSIGNED_INT                       = $1405;
-  GL_FLOAT                              = $1406;
-  GL_DOUBLE                             = $140A;
-  GL_2_BYTES                            = $1407;
-  GL_3_BYTES                            = $1408;
-  GL_4_BYTES                            = $1409;
-
-  // Primitives
-  GL_LINES                              = $0001;
-  GL_POINTS                             = $0000;
-  GL_LINE_STRIP                         = $0003;
-  GL_LINE_LOOP                          = $0002;
-  GL_TRIANGLES                          = $0004;
-  GL_TRIANGLE_STRIP                     = $0005;
-  GL_TRIANGLE_FAN                       = $0006;
-  GL_QUADS                              = $0007;
-  GL_QUAD_STRIP                         = $0008;
-  GL_POLYGON                            = $0009;
-  GL_EDGE_FLAG                          = $0B43;
-
-  // Vertex arrays
-  GL_VERTEX_ARRAY                       = $8074;
-  GL_NORMAL_ARRAY                       = $8075;
-  GL_COLOR_ARRAY                        = $8076;
-  GL_INDEX_ARRAY                        = $8077;
-  GL_TEXTURE_COORD_ARRAY                = $8078;
-  GL_EDGE_FLAG_ARRAY                    = $8079;
-  GL_VERTEX_ARRAY_SIZE                  = $807A;
-  GL_VERTEX_ARRAY_TYPE                  = $807B;
-  GL_VERTEX_ARRAY_STRIDE                = $807C;
-  GL_NORMAL_ARRAY_TYPE                  = $807E;
-  GL_NORMAL_ARRAY_STRIDE                = $807F;
-  GL_COLOR_ARRAY_SIZE                   = $8081;
-  GL_COLOR_ARRAY_TYPE                   = $8082;
-  GL_COLOR_ARRAY_STRIDE                 = $8083;
-  GL_INDEX_ARRAY_TYPE                   = $8085;
-  GL_INDEX_ARRAY_STRIDE                 = $8086;
-  GL_TEXTURE_COORD_ARRAY_SIZE           = $8088;
-  GL_TEXTURE_COORD_ARRAY_TYPE           = $8089;
-  GL_TEXTURE_COORD_ARRAY_STRIDE         = $808A;
-  GL_EDGE_FLAG_ARRAY_STRIDE             = $808C;
-  GL_VERTEX_ARRAY_POINTER               = $808E;
-  GL_NORMAL_ARRAY_POINTER               = $808F;
-  GL_COLOR_ARRAY_POINTER                = $8090;
-  GL_INDEX_ARRAY_POINTER                = $8091;
-  GL_TEXTURE_COORD_ARRAY_POINTER        = $8092;
-  GL_EDGE_FLAG_ARRAY_POINTER            = $8093;
-  GL_V2F                                = $2A20;
-  GL_V3F                                = $2A21;
-  GL_C4UB_V2F                           = $2A22;
-  GL_C4UB_V3F                           = $2A23;
-  GL_C3F_V3F                            = $2A24;
-  GL_N3F_V3F                            = $2A25;
-  GL_C4F_N3F_V3F                        = $2A26;
-  GL_T2F_V3F                            = $2A27;
-  GL_T4F_V4F                            = $2A28;
-  GL_T2F_C4UB_V3F                       = $2A29;
-  GL_T2F_C3F_V3F                        = $2A2A;
-  GL_T2F_N3F_V3F                        = $2A2B;
-  GL_T2F_C4F_N3F_V3F                    = $2A2C;
-  GL_T4F_C4F_N3F_V4F                    = $2A2D;
-
-  // Matrix Mode
-  GL_MATRIX_MODE                        = $0BA0;
-  GL_MODELVIEW                          = $1700;
-  GL_PROJECTION                         = $1701;
-  GL_TEXTURE                            = $1702;
-
-  // Points
-  GL_POINT_SMOOTH                       = $0B10;
-  GL_POINT_SIZE                         = $0B11;
-  GL_POINT_SIZE_GRANULARITY             = $0B13;
-  GL_POINT_SIZE_RANGE                   = $0B12;
-
-  // Lines
-  GL_LINE_SMOOTH                        = $0B20;
-  GL_LINE_STIPPLE                       = $0B24;
-  GL_LINE_STIPPLE_PATTERN               = $0B25;
-  GL_LINE_STIPPLE_REPEAT                = $0B26;
-  GL_LINE_WIDTH                         = $0B21;
-  GL_LINE_WIDTH_GRANULARITY             = $0B23;
-  GL_LINE_WIDTH_RANGE                   = $0B22;
-
-  // Polygons
-  GL_POINT                              = $1B00;
-  GL_LINE                               = $1B01;
-  GL_FILL                               = $1B02;
-  GL_CCW                                = $0901;
-  GL_CW                                 = $0900;
-  GL_FRONT                              = $0404;
-  GL_BACK                               = $0405;
-  GL_CULL_FACE                          = $0B44;
-  GL_CULL_FACE_MODE                     = $0B45;
-  GL_POLYGON_SMOOTH                     = $0B41;
-  GL_POLYGON_STIPPLE                    = $0B42;
-  GL_FRONT_FACE                         = $0B46;
-  GL_POLYGON_MODE                       = $0B40;
-  GL_POLYGON_OFFSET_FACTOR              = $8038;
-  GL_POLYGON_OFFSET_UNITS               = $2A00;
-  GL_POLYGON_OFFSET_POINT               = $2A01;
-  GL_POLYGON_OFFSET_LINE                = $2A02;
-  GL_POLYGON_OFFSET_FILL                = $8037;
-
-  // Display lists
-  GL_COMPILE                            = $1300;
-  GL_COMPILE_AND_EXECUTE                = $1301;
-  GL_LIST_BASE                          = $0B32;
-  GL_LIST_INDEX                         = $0B33;
-  GL_LIST_MODE                          = $0B30;
-
-  // Depth buffer
-  GL_NEVER                              = $0200;
-  GL_LESS                               = $0201;
-  GL_GEQUAL                             = $0206;
-  GL_LEQUAL                             = $0203;
-  GL_GREATER                            = $0204;
-  GL_NOTEQUAL                           = $0205;
-  GL_EQUAL                              = $0202;
-  GL_ALWAYS                             = $0207;
-  GL_DEPTH_TEST                         = $0B71;
-  GL_DEPTH_BITS                         = $0D56;
-  GL_DEPTH_CLEAR_VALUE                  = $0B73;
-  GL_DEPTH_FUNC                         = $0B74;
-  GL_DEPTH_RANGE                        = $0B70;
-  GL_DEPTH_WRITEMASK                    = $0B72;
-  GL_DEPTH_COMPONENT                    = $1902;
-
-  // Lighting
-  GL_LIGHTING                           = $0B50;
-  GL_LIGHT0                             = $4000;
-  GL_LIGHT1                             = $4001;
-  GL_LIGHT2                             = $4002;
-  GL_LIGHT3                             = $4003;
-  GL_LIGHT4                             = $4004;
-  GL_LIGHT5                             = $4005;
-  GL_LIGHT6                             = $4006;
-  GL_LIGHT7                             = $4007;
-  GL_SPOT_EXPONENT                      = $1205;
-  GL_SPOT_CUTOFF                        = $1206;
-  GL_CONSTANT_ATTENUATION               = $1207;
-  GL_LINEAR_ATTENUATION                 = $1208;
-  GL_QUADRATIC_ATTENUATION              = $1209;
-  GL_AMBIENT                            = $1200;
-  GL_DIFFUSE                            = $1201;
-  GL_SPECULAR                           = $1202;
-  GL_SHININESS                          = $1601;
-  GL_EMISSION                           = $1600;
-  GL_POSITION                           = $1203;
-  GL_SPOT_DIRECTION                     = $1204;
-  GL_AMBIENT_AND_DIFFUSE                = $1602;
-  GL_COLOR_INDEXES                      = $1603;
-  GL_LIGHT_MODEL_TWO_SIDE               = $0B52;
-  GL_LIGHT_MODEL_LOCAL_VIEWER           = $0B51;
-  GL_LIGHT_MODEL_AMBIENT                = $0B53;
-  GL_FRONT_AND_BACK                     = $0408;
-  GL_SHADE_MODEL                        = $0B54;
-  GL_FLAT                               = $1D00;
-  GL_SMOOTH                             = $1D01;
-  GL_COLOR_MATERIAL                     = $0B57;
-  GL_COLOR_MATERIAL_FACE                = $0B55;
-  GL_COLOR_MATERIAL_PARAMETER           = $0B56;
-  GL_NORMALIZE                          = $0BA1;
-
-  // User clipping planes
-  GL_CLIP_PLANE0                        = $3000;
-  GL_CLIP_PLANE1                        = $3001;
-  GL_CLIP_PLANE2                        = $3002;
-  GL_CLIP_PLANE3                        = $3003;
-  GL_CLIP_PLANE4                        = $3004;
-  GL_CLIP_PLANE5                        = $3005;
-
-  // Accumulation buffer
-  GL_ACCUM_RED_BITS                     = $0D58;
-  GL_ACCUM_GREEN_BITS                   = $0D59;
-  GL_ACCUM_BLUE_BITS                    = $0D5A;
-  GL_ACCUM_ALPHA_BITS                   = $0D5B;
-  GL_ACCUM_CLEAR_VALUE                  = $0B80;
-  GL_ACCUM                              = $0100;
-  GL_ADD                                = $0104;
-  GL_LOAD                               = $0101;
-  GL_MULT                               = $0103;
-  GL_RETURN                             = $0102;
-
-  // Alpha testing
-  GL_ALPHA_TEST                         = $0BC0;
-  GL_ALPHA_TEST_REF                     = $0BC2;
-  GL_ALPHA_TEST_FUNC                    = $0BC1;
-
-  // Blending
-  GL_BLEND                              = $0BE2;
-  GL_BLEND_SRC                          = $0BE1;
-  GL_BLEND_DST                          = $0BE0;
-  GL_ZERO                               = 0;
-  GL_ONE                                = 1;
-  GL_SRC_COLOR                          = $0300;
-  GL_ONE_MINUS_SRC_COLOR                = $0301;
-  GL_DST_COLOR                          = $0306;
-  GL_ONE_MINUS_DST_COLOR                = $0307;
-  GL_SRC_ALPHA                          = $0302;
-  GL_ONE_MINUS_SRC_ALPHA                = $0303;
-  GL_DST_ALPHA                          = $0304;
-  GL_ONE_MINUS_DST_ALPHA                = $0305;
-  GL_SRC_ALPHA_SATURATE                 = $0308;
-  GL_CONSTANT_COLOR                     = $8001;
-  GL_ONE_MINUS_CONSTANT_COLOR           = $8002;
-  GL_CONSTANT_ALPHA                     = $8003;
-  GL_ONE_MINUS_CONSTANT_ALPHA           = $8004;
-
-  // Render mode
-  GL_FEEDBACK                           = $1C01;
-  GL_RENDER                             = $1C00;
-  GL_SELECT                             = $1C02;
-
-  // Feedback
-  GL_2D                                 = $0600;
-  GL_3D                                 = $0601;
-  GL_3D_COLOR                           = $0602;
-  GL_3D_COLOR_TEXTURE                   = $0603;
-  GL_4D_COLOR_TEXTURE                   = $0604;
-  GL_POINT_TOKEN                        = $0701;
-  GL_LINE_TOKEN                         = $0702;
-  GL_LINE_RESET_TOKEN                   = $0707;
-  GL_POLYGON_TOKEN                      = $0703;
-  GL_BITMAP_TOKEN                       = $0704;
-  GL_DRAW_PIXEL_TOKEN                   = $0705;
-  GL_COPY_PIXEL_TOKEN                   = $0706;
-  GL_PASS_THROUGH_TOKEN                 = $0700;
-  GL_FEEDBACK_BUFFER_POINTER            = $0DF0;
-  GL_FEEDBACK_BUFFER_SIZE               = $0DF1;
-  GL_FEEDBACK_BUFFER_TYPE               = $0DF2;
-
-  // Selection
-  GL_SELECTION_BUFFER_POINTER           = $0DF3;
-  GL_SELECTION_BUFFER_SIZE              = $0DF4;
-
-  // Fog
-  GL_FOG                                = $0B60;
-  GL_FOG_MODE                           = $0B65;
-  GL_FOG_DENSITY                        = $0B62;
-  GL_FOG_COLOR                          = $0B66;
-  GL_FOG_INDEX                          = $0B61;
-  GL_FOG_START                          = $0B63;
-  GL_FOG_END                            = $0B64;
-  GL_LINEAR                             = $2601;
-  GL_EXP                                = $0800;
-  GL_EXP2                               = $0801;
-
-  // Logic ops
-  GL_LOGIC_OP                           = $0BF1;
-  GL_INDEX_LOGIC_OP                     = $0BF1;
-  GL_COLOR_LOGIC_OP                     = $0BF2;
-  GL_LOGIC_OP_MODE                      = $0BF0;
-  GL_CLEAR                              = $1500;
-  GL_SET                                = $150F;
-  GL_COPY                               = $1503;
-  GL_COPY_INVERTED                      = $150C;
-  GL_NOOP                               = $1505;
-  GL_INVERT                             = $150A;
-  GL_AND                                = $1501;
-  GL_NAND                               = $150E;
-  GL_OR                                 = $1507;
-  GL_NOR                                = $1508;
-  GL_XOR                                = $1506;
-  GL_EQUIV                              = $1509;
-  GL_AND_REVERSE                        = $1502;
-  GL_AND_INVERTED                       = $1504;
-  GL_OR_REVERSE                         = $150B;
-  GL_OR_INVERTED                        = $150D;
-
-  // Stencil
-  GL_STENCIL_TEST                       = $0B90;
-  GL_STENCIL_WRITEMASK                  = $0B98;
-  GL_STENCIL_BITS                       = $0D57;
-  GL_STENCIL_FUNC                       = $0B92;
-  GL_STENCIL_VALUE_MASK                 = $0B93;
-  GL_STENCIL_REF                        = $0B97;
-  GL_STENCIL_FAIL                       = $0B94;
-  GL_STENCIL_PASS_DEPTH_PASS            = $0B96;
-  GL_STENCIL_PASS_DEPTH_FAIL            = $0B95;
-  GL_STENCIL_CLEAR_VALUE                = $0B91;
-  GL_STENCIL_INDEX                      = $1901;
-  GL_KEEP                               = $1E00;
-  GL_REPLACE                            = $1E01;
-  GL_INCR                               = $1E02;
-  GL_DECR                               = $1E03;
-
-  // Buffers, Pixel Drawing/Reading
-  GL_NONE                               = 0;
-  GL_LEFT                               = $0406;
-  GL_RIGHT                              = $0407;
-  //GL_FRONT                            = $0404;
-  //GL_BACK                             = $0405;
-  //GL_FRONT_AND_BACK                   = $0408;
-  GL_FRONT_LEFT                         = $0400;
-  GL_FRONT_RIGHT                        = $0401;
-  GL_BACK_LEFT                          = $0402;
-  GL_BACK_RIGHT                         = $0403;
-  GL_AUX0                               = $0409;
-  GL_AUX1                               = $040A;
-  GL_AUX2                               = $040B;
-  GL_AUX3                               = $040C;
-  GL_COLOR_INDEX                        = $1900;
-  GL_RED                                = $1903;
-  GL_GREEN                              = $1904;
-  GL_BLUE                               = $1905;
-  GL_ALPHA                              = $1906;
-  GL_LUMINANCE                          = $1909;
-  GL_LUMINANCE_ALPHA                    = $190A;
-  GL_ALPHA_BITS                         = $0D55;
-  GL_RED_BITS                           = $0D52;
-  GL_GREEN_BITS                         = $0D53;
-  GL_BLUE_BITS                          = $0D54;
-  GL_INDEX_BITS                         = $0D51;
-  GL_SUBPIXEL_BITS                      = $0D50;
-  GL_AUX_BUFFERS                        = $0C00;
-  GL_READ_BUFFER                        = $0C02;
-  GL_DRAW_BUFFER                        = $0C01;
-  GL_DOUBLEBUFFER                       = $0C32;
-  GL_STEREO                             = $0C33;
-  GL_BITMAP                             = $1A00;
-  GL_COLOR                              = $1800;
-  GL_DEPTH                              = $1801;
-  GL_STENCIL                            = $1802;
-  GL_DITHER                             = $0BD0;
-  GL_RGB                                = $1907;
-  GL_RGBA                               = $1908;
-
-  // Implementation limits
-  GL_MAX_LIST_NESTING                   = $0B31;
-  GL_MAX_ATTRIB_STACK_DEPTH             = $0D35;
-  GL_MAX_MODELVIEW_STACK_DEPTH          = $0D36;
-  GL_MAX_NAME_STACK_DEPTH               = $0D37;
-  GL_MAX_PROJECTION_STACK_DEPTH         = $0D38;
-  GL_MAX_TEXTURE_STACK_DEPTH            = $0D39;
-  GL_MAX_EVAL_ORDER                     = $0D30;
-  GL_MAX_LIGHTS                         = $0D31;
-  GL_MAX_CLIP_PLANES                    = $0D32;
-  GL_MAX_TEXTURE_SIZE                   = $0D33;
-  GL_MAX_PIXEL_MAP_TABLE                = $0D34;
-  GL_MAX_VIEWPORT_DIMS                  = $0D3A;
-  GL_MAX_CLIENT_ATTRIB_STACK_DEPTH      = $0D3B;
-
-  // Gets
-  GL_ATTRIB_STACK_DEPTH                 = $0BB0;
-  GL_CLIENT_ATTRIB_STACK_DEPTH          = $0BB1;
-  GL_COLOR_CLEAR_VALUE                  = $0C22;
-  GL_COLOR_WRITEMASK                    = $0C23;
-  GL_CURRENT_INDEX                      = $0B01;
-  GL_CURRENT_COLOR                      = $0B00;
-  GL_CURRENT_NORMAL                     = $0B02;
-  GL_CURRENT_RASTER_COLOR               = $0B04;
-  GL_CURRENT_RASTER_DISTANCE            = $0B09;
-  GL_CURRENT_RASTER_INDEX               = $0B05;
-  GL_CURRENT_RASTER_POSITION            = $0B07;
-  GL_CURRENT_RASTER_TEXTURE_COORDS      = $0B06;
-  GL_CURRENT_RASTER_POSITION_VALID      = $0B08;
-  GL_CURRENT_TEXTURE_COORDS             = $0B03;
-  GL_INDEX_CLEAR_VALUE                  = $0C20;
-  GL_INDEX_MODE                         = $0C30;
-  GL_INDEX_WRITEMASK                    = $0C21;
-  GL_MODELVIEW_MATRIX                   = $0BA6;
-  GL_MODELVIEW_STACK_DEPTH              = $0BA3;
-  GL_NAME_STACK_DEPTH                   = $0D70;
-  GL_PROJECTION_MATRIX                  = $0BA7;
-  GL_PROJECTION_STACK_DEPTH             = $0BA4;
-  GL_RENDER_MODE                        = $0C40;
-  GL_RGBA_MODE                          = $0C31;
-  GL_TEXTURE_MATRIX                     = $0BA8;
-  GL_TEXTURE_STACK_DEPTH                = $0BA5;
-  GL_VIEWPORT                           = $0BA2;
-
-  // Evaluators
-  GL_AUTO_NORMAL                        = $0D80;
-  GL_MAP1_COLOR_4                       = $0D90;
-  GL_MAP1_GRID_DOMAIN                   = $0DD0;
-  GL_MAP1_GRID_SEGMENTS                 = $0DD1;
-  GL_MAP1_INDEX                         = $0D91;
-  GL_MAP1_NORMAL                        = $0D92;
-  GL_MAP1_TEXTURE_COORD_1               = $0D93;
-  GL_MAP1_TEXTURE_COORD_2               = $0D94;
-  GL_MAP1_TEXTURE_COORD_3               = $0D95;
-  GL_MAP1_TEXTURE_COORD_4               = $0D96;
-  GL_MAP1_VERTEX_3                      = $0D97;
-  GL_MAP1_VERTEX_4                      = $0D98;
-  GL_MAP2_COLOR_4                       = $0DB0;
-  GL_MAP2_GRID_DOMAIN                   = $0DD2;
-  GL_MAP2_GRID_SEGMENTS                 = $0DD3;
-  GL_MAP2_INDEX                         = $0DB1;
-  GL_MAP2_NORMAL                        = $0DB2;
-  GL_MAP2_TEXTURE_COORD_1               = $0DB3;
-  GL_MAP2_TEXTURE_COORD_2               = $0DB4;
-  GL_MAP2_TEXTURE_COORD_3               = $0DB5;
-  GL_MAP2_TEXTURE_COORD_4               = $0DB6;
-  GL_MAP2_VERTEX_3                      = $0DB7;
-  GL_MAP2_VERTEX_4                      = $0DB8;
-  GL_COEFF                              = $0A00;
-  GL_DOMAIN                             = $0A02;
-  GL_ORDER                              = $0A01;
-
-  // Hints
-  GL_FOG_HINT                           = $0C54;
-  GL_LINE_SMOOTH_HINT                   = $0C52;
-  GL_PERSPECTIVE_CORRECTION_HINT        = $0C50;
-  GL_POINT_SMOOTH_HINT                  = $0C51;
-  GL_POLYGON_SMOOTH_HINT                = $0C53;
-  GL_DONT_CARE                          = $1100;
-  GL_FASTEST                            = $1101;
-  GL_NICEST                             = $1102;
-
-  // Scissor box
-  GL_SCISSOR_TEST                       = $0C11;
-  GL_SCISSOR_BOX                        = $0C10;
-
-  // Pixel Mode / Transfer
-  GL_MAP_COLOR                          = $0D10;
-  GL_MAP_STENCIL                        = $0D11;
-  GL_INDEX_SHIFT                        = $0D12;
-  GL_INDEX_OFFSET                       = $0D13;
-  GL_RED_SCALE                          = $0D14;
-  GL_RED_BIAS                           = $0D15;
-  GL_GREEN_SCALE                        = $0D18;
-  GL_GREEN_BIAS                         = $0D19;
-  GL_BLUE_SCALE                         = $0D1A;
-  GL_BLUE_BIAS                          = $0D1B;
-  GL_ALPHA_SCALE                        = $0D1C;
-  GL_ALPHA_BIAS                         = $0D1D;
-  GL_DEPTH_SCALE                        = $0D1E;
-  GL_DEPTH_BIAS                         = $0D1F;
-  GL_PIXEL_MAP_S_TO_S_SIZE              = $0CB1;
-  GL_PIXEL_MAP_I_TO_I_SIZE              = $0CB0;
-  GL_PIXEL_MAP_I_TO_R_SIZE              = $0CB2;
-  GL_PIXEL_MAP_I_TO_G_SIZE              = $0CB3;
-  GL_PIXEL_MAP_I_TO_B_SIZE              = $0CB4;
-  GL_PIXEL_MAP_I_TO_A_SIZE              = $0CB5;
-  GL_PIXEL_MAP_R_TO_R_SIZE              = $0CB6;
-  GL_PIXEL_MAP_G_TO_G_SIZE              = $0CB7;
-  GL_PIXEL_MAP_B_TO_B_SIZE              = $0CB8;
-  GL_PIXEL_MAP_A_TO_A_SIZE              = $0CB9;
-  GL_PIXEL_MAP_S_TO_S                   = $0C71;
-  GL_PIXEL_MAP_I_TO_I                   = $0C70;
-  GL_PIXEL_MAP_I_TO_R                   = $0C72;
-  GL_PIXEL_MAP_I_TO_G                   = $0C73;
-  GL_PIXEL_MAP_I_TO_B                   = $0C74;
-  GL_PIXEL_MAP_I_TO_A                   = $0C75;
-  GL_PIXEL_MAP_R_TO_R                   = $0C76;
-  GL_PIXEL_MAP_G_TO_G                   = $0C77;
-  GL_PIXEL_MAP_B_TO_B                   = $0C78;
-  GL_PIXEL_MAP_A_TO_A                   = $0C79;
-  GL_PACK_ALIGNMENT                     = $0D05;
-  GL_PACK_LSB_FIRST                     = $0D01;
-  GL_PACK_ROW_LENGTH                    = $0D02;
-  GL_PACK_SKIP_PIXELS                   = $0D04;
-  GL_PACK_SKIP_ROWS                     = $0D03;
-  GL_PACK_SWAP_BYTES                    = $0D00;
-  GL_UNPACK_ALIGNMENT                   = $0CF5;
-  GL_UNPACK_LSB_FIRST                   = $0CF1;
-  GL_UNPACK_ROW_LENGTH                  = $0CF2;
-  GL_UNPACK_SKIP_PIXELS                 = $0CF4;
-  GL_UNPACK_SKIP_ROWS                   = $0CF3;
-  GL_UNPACK_SWAP_BYTES                  = $0CF0;
-  GL_ZOOM_X                             = $0D16;
-  GL_ZOOM_Y                             = $0D17;
-
-  // Texture mapping
-  GL_TEXTURE_ENV                        = $2300;
-  GL_TEXTURE_ENV_MODE                   = $2200;
-  GL_TEXTURE_1D                         = $0DE0;
-  GL_TEXTURE_2D                         = $0DE1;
-  GL_TEXTURE_WRAP_S                     = $2802;
-  GL_TEXTURE_WRAP_T                     = $2803;
-  GL_TEXTURE_MAG_FILTER                 = $2800;
-  GL_TEXTURE_MIN_FILTER                 = $2801;
-  GL_TEXTURE_ENV_COLOR                  = $2201;
-  GL_TEXTURE_GEN_S                      = $0C60;
-  GL_TEXTURE_GEN_T                      = $0C61;
-  GL_TEXTURE_GEN_MODE                   = $2500;
-  GL_TEXTURE_BORDER_COLOR               = $1004;
-  GL_TEXTURE_WIDTH                      = $1000;
-  GL_TEXTURE_HEIGHT                     = $1001;
-  GL_TEXTURE_BORDER                     = $1005;
-  GL_TEXTURE_COMPONENTS                 = $1003;
-  GL_TEXTURE_RED_SIZE                   = $805C;
-  GL_TEXTURE_GREEN_SIZE                 = $805D;
-  GL_TEXTURE_BLUE_SIZE                  = $805E;
-  GL_TEXTURE_ALPHA_SIZE                 = $805F;
-  GL_TEXTURE_LUMINANCE_SIZE             = $8060;
-  GL_TEXTURE_INTENSITY_SIZE             = $8061;
-  GL_NEAREST_MIPMAP_NEAREST             = $2700;
-  GL_NEAREST_MIPMAP_LINEAR              = $2702;
-  GL_LINEAR_MIPMAP_NEAREST              = $2701;
-  GL_LINEAR_MIPMAP_LINEAR               = $2703;
-  GL_OBJECT_LINEAR                      = $2401;
-  GL_OBJECT_PLANE                       = $2501;
-  GL_EYE_LINEAR                         = $2400;
-  GL_EYE_PLANE                          = $2502;
-  GL_SPHERE_MAP                         = $2402;
-  GL_DECAL                              = $2101;
-  GL_MODULATE                           = $2100;
-  GL_NEAREST                            = $2600;
-  GL_REPEAT                             = $2901;
-  GL_CLAMP                              = $2900;
-  GL_S                                  = $2000;
-  GL_T                                  = $2001;
-  GL_R                                  = $2002;
-  GL_Q                                  = $2003;
-  GL_TEXTURE_GEN_R                      = $0C62;
-  GL_TEXTURE_GEN_Q                      = $0C63;
-
-  // GL 1.1 texturing
-  GL_PROXY_TEXTURE_1D                   = $8063;
-  GL_PROXY_TEXTURE_2D                   = $8064;
-  GL_TEXTURE_PRIORITY                   = $8066;
-  GL_TEXTURE_RESIDENT                   = $8067;
-  GL_TEXTURE_BINDING_1D                 = $8068;
-  GL_TEXTURE_BINDING_2D                 = $8069;
-  GL_TEXTURE_INTERNAL_FORMAT            = $1003;
-
-
-  // GL 1.2 texturing
-  GL_PACK_SKIP_IMAGES                   = $806B;
-  GL_PACK_IMAGE_HEIGHT                  = $806C;
-  GL_UNPACK_SKIP_IMAGES                 = $806D;
-  GL_UNPACK_IMAGE_HEIGHT                = $806E;
-  GL_TEXTURE_3D                         = $806F;
-  GL_PROXY_TEXTURE_3D                   = $8070;
-  GL_TEXTURE_DEPTH                      = $8071;
-  GL_TEXTURE_WRAP_R                     = $8072;
-  GL_MAX_3D_TEXTURE_SIZE                = $8073;
-  GL_TEXTURE_BINDING_3D                 = $806A;
-
-  // Internal texture formats (GL 1.1)
-  GL_ALPHA4                             = $803B;
-  GL_ALPHA8                             = $803C;
-  GL_ALPHA12                            = $803D;
-  GL_ALPHA16                            = $803E;
-  GL_LUMINANCE4                         = $803F;
-  GL_LUMINANCE8                         = $8040;
-  GL_LUMINANCE12                        = $8041;
-  GL_LUMINANCE16                        = $8042;
-  GL_LUMINANCE4_ALPHA4                  = $8043;
-  GL_LUMINANCE6_ALPHA2                  = $8044;
-  GL_LUMINANCE8_ALPHA8                  = $8045;
-  GL_LUMINANCE12_ALPHA4                 = $8046;
-  GL_LUMINANCE12_ALPHA12                = $8047;
-  GL_LUMINANCE16_ALPHA16                = $8048;
-  GL_INTENSITY                          = $8049;
-  GL_INTENSITY4                         = $804A;
-  GL_INTENSITY8                         = $804B;
-  GL_INTENSITY12                        = $804C;
-  GL_INTENSITY16                        = $804D;
-  GL_R3_G3_B2                           = $2A10;
-  GL_RGB4                               = $804F;
-  GL_RGB5                               = $8050;
-  GL_RGB8                               = $8051;
-  GL_RGB10                              = $8052;
-  GL_RGB12                              = $8053;
-  GL_RGB16                              = $8054;
-  GL_RGBA2                              = $8055;
-  GL_RGBA4                              = $8056;
-  GL_RGB5_A1                            = $8057;
-  GL_RGBA8                              = $8058;
-  GL_RGB10_A2                           = $8059;
-  GL_RGBA12                             = $805A;
-  GL_RGBA16                             = $805B;
-
-  // Utility
-  GL_VENDOR                             = $1F00;
-  GL_RENDERER                           = $1F01;
-  GL_VERSION                            = $1F02;
-  GL_EXTENSIONS                         = $1F03;
-
-  // Errors
-  GL_INVALID_VALUE                      = $0501;
-  GL_INVALID_ENUM                       = $0500;
-  GL_INVALID_OPERATION                  = $0502;
-  GL_STACK_OVERFLOW                     = $0503;
-  GL_STACK_UNDERFLOW                    = $0504;
-  GL_OUT_OF_MEMORY                      = $0505;
-
-  // OpenGL 1.2
-  GL_RESCALE_NORMAL                     = $803A;
-  GL_CLAMP_TO_EDGE                      = $812F;
-  GL_MAX_ELEMENTS_VERTICES              = $F0E8;
-  GL_MAX_ELEMENTS_INDICES               = $F0E9;
-  GL_BGR                                = $80E0;
-  GL_BGRA                               = $80E1;
-  GL_UNSIGNED_BYTE_3_3_2                = $8032;
-  GL_UNSIGNED_BYTE_2_3_3_REV            = $8362;
-  GL_UNSIGNED_SHORT_5_6_5               = $8363;
-  GL_UNSIGNED_SHORT_5_6_5_REV           = $8364;
-  GL_UNSIGNED_SHORT_4_4_4_4             = $8033;
-  GL_UNSIGNED_SHORT_4_4_4_4_REV         = $8365;
-  GL_UNSIGNED_SHORT_5_5_5_1             = $8034;
-  GL_UNSIGNED_SHORT_1_5_5_5_REV         = $8366;
-  GL_UNSIGNED_INT_8_8_8_8               = $8035;
-  GL_UNSIGNED_INT_8_8_8_8_REV           = $8367;
-  GL_UNSIGNED_INT_10_10_10_2            = $8036;
-  GL_UNSIGNED_INT_2_10_10_10_REV        = $8368;
-  GL_LIGHT_MODEL_COLOR_CONTROL          = $81F8;
-  GL_SINGLE_COLOR                       = $81F9;
-  GL_SEPARATE_SPECULAR_COLOR            = $81FA;
-  GL_TEXTURE_MIN_LOD                    = $813A;
-  GL_TEXTURE_MAX_LOD                    = $813B;
-  GL_TEXTURE_BASE_LEVEL                 = $813C;
-  GL_TEXTURE_MAX_LEVEL                  = $813D;
-
-
-// -------------------------------------------------------------------
-//   GL procedures and functions
-// -------------------------------------------------------------------
-
-var
-
-  // Miscellaneous
-  glClearIndex: procedure(c: GLfloat); cdecl;
-  glClearColor: procedure(red, green, blue, alpha: GLclampf); cdecl;
-  glClear: procedure(mask: GLbitfield); cdecl;
-  glIndexMask: procedure(mask: LongWord); cdecl;
-  glColorMask: procedure(red, green, blue, alpha: Boolean); cdecl;
-  glAlphaFunc: procedure(func: GLenum; ref: GLclampf); cdecl;
-  glBlendFunc: procedure(sfactor, dfactor: GLenum); cdecl;
-  glLogicOp: procedure(opcode: GLenum); cdecl;
-  glCullFace: procedure(mode: GLenum); cdecl;
-  glFrontFace: procedure(mode: GLenum); cdecl;
-  glPointSize: procedure(size: GLfloat); cdecl;
-  glLineWidth: procedure(width: GLfloat); cdecl;
-  glLineStipple: procedure(factor: LongInt; pattern: Word); cdecl;
-  glPolygonMode: procedure(face, mode: GLenum); cdecl;
-  glPolygonOffset: procedure(factor, units: GLfloat); cdecl;
-  glPolygonStipple: procedure(var mask: Byte); cdecl;
-  glGetPolygonStipple: procedure(var mask: Byte); cdecl;
-  glEdgeFlag: procedure(flag: Boolean); cdecl;
-  glEdgeFlagv: procedure(var flag: Boolean); cdecl;
-  glScissor: procedure(x, y, width, height: LongInt); cdecl;
-  glClipPlane: procedure(plane: GLenum; var equation: GLdouble); cdecl;
-  glGetClipPlane: procedure(plane: GLenum; var equation: GLdouble); cdecl;
-  glDrawBuffer: procedure(mode: GLenum); cdecl;
-  glReadBuffer: procedure(mode: GLenum); cdecl;
-  glEnable: procedure(cap: LongInt); cdecl;
-  glDisable: procedure(cap: LongInt); cdecl;
-  glIsEnabled: function(cap: GLenum): Boolean; cdecl;
-  glEnableClientState: procedure(cap: GLenum); cdecl; // 1.1
-  glDisableClientState: procedure(cap: GLenum); cdecl; // 1.1
-  glGetBooleanv: procedure(pname: GLenum; var params: Boolean); cdecl;
-  glGetDoublev: procedure(pname: GLenum; var params: GLdouble); cdecl;
-  glGetFloatv: procedure(pname: GLenum; var params: GLfloat); cdecl;
-  glGetIntegerv: procedure(pname: GLenum; var params: LongInt); cdecl;
-  glPushAttrib: procedure(mask: GLbitfield); cdecl;
-  glPopAttrib: procedure; cdecl;
-  glPushClientAttrib: procedure(mask: GLbitfield); cdecl; // 1.1
-  glPopClientAttrib: procedure; cdecl; // 1.1
-  glRenderMode: function(mode: GLenum): LongInt; cdecl;
-  glGetError: function: GLenum; cdecl;
-  glGetString: function(name: GLenum): PChar; cdecl;
-  glFinish: procedure; cdecl;
-  glFlush: procedure; cdecl;
-  glHint: procedure(target, mode: GLenum); cdecl;
-
-
-  // Depth Buffer
-  glClearDepth: procedure(depth: GLclampd); cdecl;
-  glDepthFunc: procedure(func: LongInt); cdecl;
-  glDepthMask: procedure(flag: Boolean); cdecl;
-  glDepthRange: procedure(near_val, far_val: GLclampd); cdecl;
-
-  // Accumulation Buffer
-  glClearAccum: procedure(red, green, blue, alpha: GLfloat); cdecl;
-  glAccum: procedure(op: GLenum; value: GLfloat); cdecl;
-
-  // Tranformation
-  glMatrixMode: procedure(mode: GLenum); cdecl;
-  glOrtho: procedure(left, right, bottom, top, near_val, far_val: GLdouble); cdecl;
-  glFrustum: procedure(left, right, bottom, top, near_val, far_val: GLdouble); cdecl;
-  glViewport: procedure(x, y, width, height: LongInt); cdecl;
-  glPushMatrix: procedure; cdecl;
-  glPopMatrix: procedure; cdecl;
-  glLoadIdentity: procedure; cdecl;
-  glLoadMatrixd: procedure(var m: GLdouble); cdecl;
-  glLoadMatrixf: procedure(var m: PGLfloat); cdecl;
-  glMultMatrixd: procedure(var m: GLdouble); cdecl;
-  glMultMatrixf: procedure(var m: GLfloat); cdecl;
-  glRotated: procedure(angle, x, y, z: GLdouble); cdecl;
-  glRotatef: procedure(angle, x, y, z: GLfloat); cdecl;
-  glScaled: procedure(x, y, z: GLdouble); cdecl;
-  glScalef: procedure(x, y, z: GLfloat); cdecl;
-  glTranslated: procedure(x, y, z: GLdouble); cdecl;
-  glTranslatef: procedure(x, y, z: GLfloat); cdecl;
-
-  // Display Lists
-  glIsList: function(list: LongWord): Boolean; cdecl;
-  glDeleteLists: procedure(list: LongWord; range: LongInt); cdecl;
-  glGenLists: function(range: LongInt): LongWord; cdecl;
-  glNewList: procedure(list: LongWord; mode: GLenum); cdecl;
-  glEndList: procedure; cdecl;
-  glCallList: procedure(list: LongWord); cdecl;
-  glCallLists: procedure(n: LongInt; AType: GLenum; var lists); cdecl;
-  glListBase: procedure(base: LongWord); cdecl;
-
-  // Drawing Functions
-  glBegin: procedure(mode: GLenum); cdecl;
-  glEnd: procedure; cdecl;
-  glVertex2d: procedure(x, y: GLdouble); cdecl;
-  glVertex2f: procedure(x, y: GLfloat); cdecl;
-  glVertex2i: procedure(x, y: LongInt); cdecl;
-  glVertex2s: procedure(x, y: SmallInt); cdecl;
-  glVertex3d: procedure(x, y, z: GLdouble); cdecl;
-  glVertex3f: procedure(x, y, z: GLfloat); cdecl;
-  glVertex3i: procedure(x, y, z: LongInt); cdecl;
-  glVertex3s: procedure(x, y, z: SmallInt); cdecl;
-  glVertex4d: procedure(x, y, z, w: GLdouble); cdecl;
-  glVertex4f: procedure(x, y, z, w: GLfloat); cdecl;
-  glVertex4i: procedure(x, y, z, w: LongInt); cdecl;
-  glVertex4s: procedure(x, y, z, w: SmallInt); cdecl;
-  glVertex2dv: procedure(var v: GLdouble); cdecl;
-  glVertex2fv: procedure(var v: GLfloat); cdecl;
-  glVertex2iv: procedure(var v: LongInt); cdecl;
-  glVertex2sv: procedure(var v: SmallInt); cdecl;
-  glVertex3dv: procedure(var v: GLdouble); cdecl;
-  glVertex3fv: procedure(var v: GLfloat); cdecl;
-  glVertex3iv: procedure(var v: LongInt); cdecl;
-  glVertex3sv: procedure(var v: SmallInt); cdecl;
-  glVertex4dv: procedure(var v: GLdouble); cdecl;
-  glVertex4fv: procedure(var v: GLfloat); cdecl;
-  glVertex4iv: procedure(var v: LongInt); cdecl;
-  glVertex4sv: procedure(var v: SmallInt); cdecl;
-  glNormal3b: procedure(nx, ny, nz: Byte); cdecl;
-  glNormal3d: procedure(nx, ny, nz: GLdouble); cdecl;
-  glNormal3f: procedure(nx, ny, nz: GLfloat); cdecl;
-  glNormal3i: procedure(nx, ny, nz: LongInt); cdecl;
-  glNormal3s: procedure(nx, ny, nz: SmallInt); cdecl;
-  glNormal3bv: procedure(var v: ShortInt); cdecl;
-  glNormal3dv: procedure(var v: GLdouble); cdecl;
-  glNormal3fv: procedure(var v: GLfloat); cdecl;
-  glNormal3iv: procedure(var v: LongInt); cdecl;
-  glNormal3sv: procedure(var v: SmallInt); cdecl;
-  glIndexd: procedure(c: GLdouble); cdecl;
-  glIndexf: procedure(c: GLfloat); cdecl;
-  glIndexi: procedure(c: LongInt); cdecl;
-  glIndexs: procedure(c: SmallInt); cdecl;
-  glIndexub: procedure(c: Byte); cdecl; // 1.1
-  glIndexdv: procedure(var c: GLdouble); cdecl;
-  glIndexfv: procedure(var c: GLfloat); cdecl;
-  glIndexiv: procedure(var c: LongInt); cdecl;
-  glIndexsv: procedure(var c: SmallInt); cdecl;
-  glIndexubv: procedure(var c: Byte); cdecl; // 1.1
-  glColor3b : procedure(red, green, blue: ShortInt); cdecl;
-  glColor3d : procedure(red, green, blue: GLdouble); cdecl;
-  glColor3f : procedure(red, green, blue: GLfloat); cdecl;
-  glColor3i : procedure(red, green, blue: LongInt); cdecl;
-  glColor3s : procedure(red, green, blue: SmallInt); cdecl;
-  glColor3ub: procedure(red, green, blue: Byte); cdecl;
-  glColor3ui: procedure(red, green, blue: LongWord); cdecl;
-  glColor3us: procedure(red, green, blue: Word); cdecl;
-  glColor4b : procedure(red, green, blue, alpha: ShortInt); cdecl;
-  glColor4d : procedure(red, green, blue, alpha: GLdouble); cdecl;
-  glColor4f : procedure(red, green, blue, alpha: GLfloat); cdecl;
-  glColor4i : procedure(red, green, blue, alpha: LongInt); cdecl;
-  glColor4s : procedure(red, green, blue, alpha: SmallInt); cdecl;
-  glColor4ub: procedure(red, green, blue, alpha: Byte); cdecl;
-  glColor4ui: procedure(red, green, blue, alpha: LongWord); cdecl;
-  glColor4us: procedure(red, green, blue, alpha: Word); cdecl;
-  glColor3bv : procedure(var v: ShortInt); cdecl;
-  glColor3dv : procedure(var v: GLdouble); cdecl;
-  glColor3fv : procedure(var v: GLfloat); cdecl;
-  glColor3iv : procedure(var v: LongInt); cdecl;
-  glColor3sv : procedure(var v: SmallInt); cdecl;
-  glColor3ubv: procedure(var v: Byte); cdecl;
-  glColor3uiv: procedure(var v: LongWord); cdecl;
-  glColor3usv: procedure(var v: Word); cdecl;
-  glColor4bv : procedure(var v: ShortInt); cdecl;
-  glColor4dv : procedure(var v: GLdouble); cdecl;
-  glColor4fv : procedure(var v: GLfloat); cdecl;
-  glColor4iv : procedure(var v: LongInt); cdecl;
-  glColor4sv : procedure(var v: SmallInt); cdecl;
-  glColor4ubv: procedure(var v: Byte); cdecl;
-  glColor4uiv: procedure(var v: LongWord); cdecl;
-  glColor4usv: procedure(var v: Word); cdecl;
-  glTexCoord1d: procedure(s: GLdouble); cdecl;
-  glTexCoord1f: procedure(s: GLfloat); cdecl;
-  glTexCoord1i: procedure(s: LongInt); cdecl;
-  glTexCoord1s: procedure(s: SmallInt); cdecl;
-  glTexCoord2d: procedure(s, t: GLdouble); cdecl;
-  glTexCoord2f: procedure(s, t: GLfloat); cdecl;
-  glTexCoord2i: procedure(s, t: LongInt); cdecl;
-  glTexCoord2s: procedure(s, t: SmallInt); cdecl;
-  glTexCoord3d: procedure(s, t, r: GLdouble); cdecl;
-  glTexCoord3f: procedure(s, t, r: GLfloat); cdecl;
-  glTexCoord3i: procedure(s, t, r: LongInt); cdecl;
-  glTexCoord3s: procedure(s, t, r: SmallInt); cdecl;
-  glTexCoord4d: procedure(s, t, r, q: GLdouble); cdecl;
-  glTexCoord4f: procedure(s, t, r, q: GLfloat); cdecl;
-  glTexCoord4i: procedure(s, t, r, q: LongInt); cdecl;
-  glTexCoord4s: procedure(s, t, r, q: SmallInt); cdecl;
-  glTexCoord1dv: procedure(var v: GLdouble); cdecl;
-  glTexCoord1fv: procedure(var v: GLfloat); cdecl;
-  glTexCoord1iv: procedure(var v: LongInt); cdecl;
-  glTexCoord1sv: procedure(var v: SmallInt); cdecl;
-  glTexCoord2dv: procedure(var v: GLdouble); cdecl;
-  glTexCoord2fv: procedure(var v: GLfloat); cdecl;
-  glTexCoord2iv: procedure(var v: LongInt); cdecl;
-  glTexCoord2sv: procedure(var v: SmallInt); cdecl;
-  glTexCoord3dv: procedure(var v: GLdouble); cdecl;
-  glTexCoord3fv: procedure(var v: GLfloat); cdecl;
-  glTexCoord3iv: procedure(var v: LongInt); cdecl;
-  glTexCoord3sv: procedure(var v: SmallInt); cdecl;
-  glTexCoord4dv: procedure(var v: GLdouble); cdecl;
-  glTexCoord4fv: procedure(var v: GLfloat); cdecl;
-  glTexCoord4iv: procedure(var v: LongInt); cdecl;
-  glTexCoord4sv: procedure(var v: SmallInt); cdecl;
-  glRasterPos2d: procedure(x, y: GLdouble); cdecl;
-  glRasterPos2f: procedure(x, y: GLfloat); cdecl;
-  glRasterPos2i: procedure(x, y: LongInt); cdecl;
-  glRasterPos2s: procedure(x, y: SmallInt); cdecl;
-  glRasterPos3d: procedure(x, y, z: GLdouble); cdecl;
-  glRasterPos3f: procedure(x, y, z: GLfloat); cdecl;
-  glRasterPos3i: procedure(x, y, z: LongInt); cdecl;
-  glRasterPos3s: procedure(x, y, z: SmallInt); cdecl;
-  glRasterPos4d: procedure(x, y, z, w: GLdouble); cdecl;
-  glRasterPos4f: procedure(x, y, z, w: GLfloat); cdecl;
-  glRasterPos4i: procedure(x, y, z, w: LongInt); cdecl;
-  glRasterPos4s: procedure(x, y, z, w: SmallInt); cdecl;
-  glRasterPos2dv: procedure(var v: GLdouble); cdecl;
-  glRasterPos2fv: procedure(var v: GLfloat); cdecl;
-  glRasterPos2iv: procedure(var v: LongInt); cdecl;
-  glRasterPos2sv: procedure(var v: SmallInt); cdecl;
-  glRasterPos3dv: procedure(var v: GLdouble); cdecl;
-  glRasterPos3fv: procedure(var v: GLfloat); cdecl;
-  glRasterPos3iv: procedure(var v: LongInt); cdecl;
-  glRasterPos3sv: procedure(var v: SmallInt); cdecl;
-  glRasterPos4dv: procedure(var v: GLdouble); cdecl;
-  glRasterPos4fv: procedure(var v: GLfloat); cdecl;
-  glRasterPos4iv: procedure(var v: LongInt); cdecl;
-  glRasterPos4sv: procedure(var v: SmallInt); cdecl;
-  glRectd: procedure(x1, y1, x2, y2: GLdouble); cdecl;
-  glRectf: procedure(x1, y1, x2, y2: GLfloat); cdecl;
-  glRecti: procedure(x1, y1, x2, y2: LongInt); cdecl;
-  glRects: procedure(x1, y1, x2, y2: SmallInt); cdecl;
-  glRectdv: procedure(var v1, v2: GLdouble); cdecl;
-  glRectfv: procedure(var v1, v2: GLfloat); cdecl;
-  glRectiv: procedure(var v1, v2: LongInt); cdecl;
-  glRectsv: procedure(var v1, v2: SmallInt); cdecl;
-
-  // Vertex Arrays (1.1)
-  glVertexPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr); cdecl;
-  glNormalPointer: procedure(AType: GLenum; stride: LongInt; var ptr); cdecl;
-  glColorPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr); cdecl;
-  glIndexPointer: procedure(AType: GLenum; stride: LongInt; var ptr); cdecl;
-  glTexCoordPointer: procedure(size: LongInt; AType: GLenum; stride: LongInt; var ptr); cdecl;
-  glEdgeFlagPointer: procedure(stride: LongInt; var ptr); cdecl;
-  glGetPointerv: procedure(pname: GLenum; var params: Pointer); cdecl;
-  glArrayElement: procedure(i: LongInt); cdecl;
-  glDrawArrays: procedure(mode: GLenum; first, count: LongInt); cdecl;
-  glDrawElements: procedure(mode: GLenum; count: Integer; AType: GLenum; var indices); cdecl;
-  glInterleavedArrays: procedure(format: GLenum; stride: LongInt; var pointer); cdecl;
-
-  // Lighting
-  glShadeModel: procedure(mode: GLenum); cdecl;
-  glLightf: procedure(light, pname: GLenum; param: GLfloat); cdecl;
-  glLighti: procedure(light, pname: GLenum; param: LongInt); cdecl;
-  glLightfv: procedure(light, pname: GLenum; var params: GLfloat); cdecl;
-  glLightiv: procedure(light, pname: GLenum; var params: LongInt); cdecl;
-  glGetLightfv: procedure(light, pname: GLenum; var params: GLfloat); cdecl;
-  glGetLightiv: procedure(light, pname: GLenum; var params: LongInt); cdecl;
-  glLightModelf: procedure(pname: GLenum; param: GLfloat); cdecl;
-  glLightModeli: procedure(pname: GLenum; param: LongInt); cdecl;
-  glLightModelfv: procedure(pname: GLenum; var params: GLfloat); cdecl;
-  glLightModeliv: procedure(pname: GLenum; var param: LongInt); cdecl;
-  glMaterialf: procedure(face, pname: GLenum; param: GLfloat); cdecl;
-  glMateriali: procedure(face, pname: GLenum; param: LongInt); cdecl;
-  glMaterialfv: procedure(face, pname: GLenum; var params: GLfloat); cdecl;
-  glMaterialiv: procedure(face, pname: GLenum; var params: LongInt); cdecl;
-  glGetMaterialfv: procedure(face, pname: GLenum; var params: GLfloat); cdecl;
-  glGetMaterialiv: procedure(face, pname: GLenum; var params: LongInt); cdecl;
-  glColorMaterial: procedure(face, mode: GLenum); cdecl;
-
-  // Raster Functions
-  glPixelZoom: procedure(xfactor, yfactor: GLfloat); cdecl;
-  glPixelStoref: procedure(pname: GLenum; param: GLfloat); cdecl;
-  glPixelStorei: procedure(pname: GLenum; param: LongInt); cdecl;
-  glPixelTransferf: procedure(pname: GLenum; param: GLfloat); cdecl;
-  glPixelTransferi: procedure(pname: GLenum; param: LongInt); cdecl;
-  glPixelMapfv: procedure(map: GLenum; mapsize: LongInt; var values: GLfloat); cdecl;
-  glPixelMapuiv: procedure(map: GLenum; mapsize: LongInt; var values: LongWord); cdecl;
-  glPixelMapusv: procedure(map: GLenum; mapsize: LongInt; var values: Word); cdecl;
-  glGetPixelMapfv: procedure(map: GLenum; var values: GLfloat); cdecl;
-  glGetPixelMapuiv: procedure(map: GLenum; var values: LongWord); cdecl;
-  glGetPixelMapusv: procedure(map: GLenum; var values: Word); cdecl;
-  glBitmap: procedure(width, height: LongInt; xorig, yorig, xmove, ymove: GLfloat; var bitmap); cdecl;
-  glReadPixels: procedure(x, y, width, height: LongInt; format, AType: GLenum; var pixels); cdecl;
-  glDrawPixels: procedure(width, height: LongInt; format, AType: GLenum; var pixels); cdecl;
-  glCopyPixels: procedure(x, y, width, height: LongInt; AType: GLenum); cdecl;
-
-  // Stenciling
-  glStencilFunc: procedure(func: GLenum; ref: LongInt; mask: LongWord); cdecl;
-  glStencilMask: procedure(mask: LongWord); cdecl;
-  glStencilOp: procedure(fail, zfail, zpass: GLenum); cdecl;
-  glClearStencil: procedure(s: LongInt); cdecl;
-
-  // Texture Mapping
-  glTexGend: procedure(cord, pname: GLenum; param: GLdouble); cdecl;
-  glTexGenf: procedure(cord, pname: GLenum; param: GLfloat); cdecl;
-  glTexGeni: procedure(cord, pname: GLenum; param: LongInt); cdecl;
-  glTexGendv: procedure(cord, pname: GLenum; var params: GLdouble); cdecl;
-  glTexGenfv: procedure(cord, pname: GLenum; var params: GLfloat); cdecl;
-  glTexGeniv: procedure(cord, pname: GLenum; var params: LongInt); cdecl;
-  glGetTexGendv: procedure(cord, pname: GLenum; var params: GLdouble); cdecl;
-  glGetTexGenfv: procedure(cord, pname: GLenum; var params: GLfloat); cdecl;
-  glGetTexGeniv: procedure(cord, pname: GLenum; var params: LongInt); cdecl;
-  glTexEnvf: procedure(target, pname: GLenum; param: GLfloat); cdecl;
-  glTexEnvi: procedure(target, pname: GLenum; param: LongInt); cdecl;
-  glTexEnvfv: procedure(target, pname: GLenum; var params: GLfloat); cdecl;
-  glTexEnviv: procedure(target, pname: GLenum; var params: LongInt); cdecl;
-  glGetTexEnvfv: procedure(target, pname: GLenum; var params: GLfloat); cdecl;
-  glGetTexEnviv: procedure(target, pname: GLenum; var params: LongInt); cdecl;
-  glTexParameterf: procedure(target, pname: GLenum; param: GLfloat); cdecl;
-  glTexParameteri: procedure(target, pname: GLenum; param: LongInt); cdecl;
-  glTexParameterfv: procedure(target, pname: GLenum; var params: GLfloat); cdecl;
-  glTexParameteriv: procedure(target, pname: GLenum; var params: LongInt); cdecl;
-  glGetTexParameterfv: procedure(target, pname: GLenum; var params: GLfloat); cdecl;
-  glGetTexParameteriv: procedure(target, pname: GLenum; var params: LongInt); cdecl;
-  glGetTexLevelParameterfv: procedure(target: GLenum; level: LongInt; pname: GLenum; var params: GLfloat); cdecl;
-  glGetTexLevelParameteriv: procedure(target: GLenum; level: LongInt; pname: GLenum; var params: LongInt); cdecl;
-  glTexImage1D: procedure(target: GLenum; level, internalFormat, width, border: LongInt; format, AType: GLenum; var pixels); cdecl;
-  glTexImage2D: procedure(target: GLenum; level, internalFormat, width, height, border: LongInt; format, AType: GLenum; var pixels); cdecl;
-  glGetTexImage: procedure(target: GLenum; level: LongInt; format, AType: GLenum; var pixels); cdecl;
-  // 1.1 functions:
-  glGenTextures: procedure(n: LongInt; var textures: LongWord); cdecl;
-  glDeleteTextures: procedure(n: LongInt; var textures: LongWord); cdecl;
-  glBindTexture: procedure(target: GLenum; texture: LongWord); cdecl;
-  glPrioritizeTextures: procedure(n: LongInt; var textures: LongWord; var priorities: GLclampf); cdecl;
-  glAreTexturesResident: function(n: LongInt; var textures: LongWord; var residences: Boolean): Boolean; cdecl;
-  glIsTexture: function(texture: LongWord): Boolean; cdecl;
-  glTexSubImage1D: procedure(target: GLenum; level, xoffset, width: LongInt; format, AType: GLenum; var pixels); cdecl;
-  glTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, width, height: LongInt; format, AType: GLenum; var pixels); cdecl;
-  glCopyTexImage1D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, border: LongInt); cdecl;
-  glCopyTexImage2D: procedure(target: GLenum; level: LongInt; format: GLenum; x, y, width, height, border: LongInt); cdecl;
-  glCopyTexSubImage1D: procedure(target: GLenum; level, xoffset, x, y, width: LongInt); cdecl;
-  glCopyTexSubImage2D: procedure(target: GLenum; level, xoffset, yoffset, x, y, width, height: LongInt); cdecl;
-
-  // Evaluators
-  glMap1d: procedure(target: GLenum; u1, u2: GLdouble; stride, order: LongInt; var points: GLdouble); cdecl;
-  glMap1f: procedure(target: GLenum; u1, u2: GLfloat; stride, order: LongInt; var points: GLfloat); cdecl;
-  glMap2d: procedure(target: GLenum; u1, u2: GLdouble; ustride, uorder: LongInt; v1, v2: GLdouble; vstride, vorder: LongInt; var points: GLdouble); cdecl;
-  glMap2f: procedure(target: GLenum; u1, u2: GLfloat; ustride, uorder: LongInt; v1, v2: GLfloat; vstride, vorder: LongInt; var points: GLfloat); cdecl;
-  glGetMapdv: procedure(target, query: GLenum; var v: GLdouble); cdecl;
-  glGetMapfv: procedure(target, query: GLenum; var v: GLfloat); cdecl;
-  glGetMapiv: procedure(target, query: GLenum; var v: LongInt); cdecl;
-  glEvalCoord1d: procedure(u: GLdouble); cdecl;
-  glEvalCoord1f: procedure(u: GLfloat); cdecl;
-  glEvalCoord1dv: procedure(var u: GLdouble); cdecl;
-  glEvalCoord1fv: procedure(var u: GLfloat); cdecl;
-  glEvalCoord2d: procedure(u, v: GLdouble); cdecl;
-  glEvalCoord2f: procedure(u, v: GLfloat); cdecl;
-  glEvalCoord2dv: procedure(var u, v: GLdouble); cdecl;
-  glEvalCoord2fv: procedure(var u, v: GLfloat); cdecl;
-  glMapGrid1d: procedure(un: LongInt; u1, u2: GLdouble); cdecl;
-  glMapGrid1f: procedure(un: LongInt; u1, u2: GLfloat); cdecl;
-  glMapGrid2d: procedure(un: LongInt; u1, u2: GLdouble; vn: LongInt; v1, v2: GLdouble); cdecl;
-  glMapGrid2f: procedure(un: LongInt; u1, u2: GLfloat; vn: LongInt; v1, v2: GLfloat); cdecl;
-  glEvalPoint1: procedure(i: LongInt); cdecl;
-  glEvalPoint2: procedure(i, j: LongInt); cdecl;
-  glEvalMesh1: procedure(mode: GLenum; i1, i2: LongInt); cdecl;
-  glEvalMesh2: procedure(mode: GLenum; i1, i2, j1, j2: LongInt); cdecl;
-
-  // Fog
-  glFogf: procedure(pname: GLenum; param: GLfloat); cdecl;
-  glFogi: procedure(pname: GLenum; param: LongInt); cdecl;
-  glFogfv: procedure(pname: GLenum; var params: GLfloat); cdecl;
-  glFogiv: procedure(pname: GLenum; var params: LongInt); cdecl;
-
-  // Selection and Feedback
-  glFeedbackBuffer: procedure(size: LongInt; AType: GLenum; var buffer: GLfloat); cdecl;
-  glPassThrough: procedure(token: GLfloat); cdecl;
-  glSelectBuffer: procedure(size: LongInt; var buffer: LongWord); cdecl;
-  glInitNames: procedure; cdecl;
-  glLoadName: procedure(name: LongWord); cdecl;
-  glPushName: procedure(name: LongWord); cdecl;
-  glPopName: procedure; cdecl;
-
-const
-// -------------------------------------------------------
-//   GL extensions constants
-// -------------------------------------------------------
-
-  // GL_EXT_blend_minmax and GL_EXT_blend_color
-  GL_CONSTANT_COLOR_EXT                 = $8001;
-  GL_ONE_MINUS_CONSTANT_COLOR_EXT       = $8002;
-  GL_CONSTANT_ALPHA_EXT                 = $8003;
-  GL_ONE_MINUS_CONSTANT_ALPHA_EXT       = $8004;
-  GL_BLEND_EQUATION_EXT                 = $8009;
-  GL_MIN_EXT                            = $8007;
-  GL_MAX_EXT                            = $8008;
-  GL_FUNC_ADD_EXT                       = $8006;
-  GL_FUNC_SUBTRACT_EXT                  = $800A;
-  GL_FUNC_REVERSE_SUBTRACT_EXT          = $800B;
-  GL_BLEND_COLOR_EXT                    = $8005;
-
-  // GL_EXT_polygon_offset
-  GL_POLYGON_OFFSET_EXT                 = $8037;
-  GL_POLYGON_OFFSET_FACTOR_EXT          = $8038;
-  GL_POLYGON_OFFSET_BIAS_EXT            = $8039;
-
-  // GL_EXT_vertex_array
-  GL_VERTEX_ARRAY_EXT                   = $8074;
-  GL_NORMAL_ARRAY_EXT                   = $8075;
-  GL_COLOR_ARRAY_EXT                    = $8076;
-  GL_INDEX_ARRAY_EXT                    = $8077;
-  GL_TEXTURE_COORD_ARRAY_EXT            = $8078;
-  GL_EDGE_FLAG_ARRAY_EXT                = $8079;
-  GL_VERTEX_ARRAY_SIZE_EXT              = $807A;
-  GL_VERTEX_ARRAY_TYPE_EXT              = $807B;
-  GL_VERTEX_ARRAY_STRIDE_EXT            = $807C;
-  GL_VERTEX_ARRAY_COUNT_EXT             = $807D;
-  GL_NORMAL_ARRAY_TYPE_EXT              = $807E;
-  GL_NORMAL_ARRAY_STRIDE_EXT            = $807F;
-  GL_NORMAL_ARRAY_COUNT_EXT             = $8080;
-  GL_COLOR_ARRAY_SIZE_EXT               = $8081;
-  GL_COLOR_ARRAY_TYPE_EXT               = $8082;
-  GL_COLOR_ARRAY_STRIDE_EXT             = $8083;
-  GL_COLOR_ARRAY_COUNT_EXT              = $8084;
-  GL_INDEX_ARRAY_TYPE_EXT               = $8085;
-  GL_INDEX_ARRAY_STRIDE_EXT             = $8086;
-  GL_INDEX_ARRAY_COUNT_EXT              = $8087;
-  GL_TEXTURE_COORD_ARRAY_SIZE_EXT       = $8088;
-  GL_TEXTURE_COORD_ARRAY_TYPE_EXT       = $8089;
-  GL_TEXTURE_COORD_ARRAY_STRIDE_EXT     = $808A;
-  GL_TEXTURE_COORD_ARRAY_COUNT_EXT      = $808B;
-  GL_EDGE_FLAG_ARRAY_STRIDE_EXT         = $808C;
-  GL_EDGE_FLAG_ARRAY_COUNT_EXT          = $808D;
-  GL_VERTEX_ARRAY_POINTER_EXT           = $808E;
-  GL_NORMAL_ARRAY_POINTER_EXT           = $808F;
-  GL_COLOR_ARRAY_POINTER_EXT            = $8090;
-  GL_INDEX_ARRAY_POINTER_EXT            = $8091;
-  GL_TEXTURE_COORD_ARRAY_POINTER_EXT    = $8092;
-  GL_EDGE_FLAG_ARRAY_POINTER_EXT        = $8093;
-
-  // GL_EXT_texture_object
-  GL_TEXTURE_PRIORITY_EXT               = $8066;
-  GL_TEXTURE_RESIDENT_EXT               = $8067;
-  GL_TEXTURE_1D_BINDING_EXT             = $8068;
-  GL_TEXTURE_2D_BINDING_EXT             = $8069;
-
-  // GL_EXT_texture3D
-  GL_PACK_SKIP_IMAGES_EXT               = $806B;
-  GL_PACK_IMAGE_HEIGHT_EXT              = $806C;
-  GL_UNPACK_SKIP_IMAGES_EXT             = $806D;
-  GL_UNPACK_IMAGE_HEIGHT_EXT            = $806E;
-  GL_TEXTURE_3D_EXT                     = $806F;
-  GL_PROXY_TEXTURE_3D_EXT               = $8070;
-  GL_TEXTURE_DEPTH_EXT                  = $8071;
-  GL_TEXTURE_WRAP_R_EXT                 = $8072;
-  GL_MAX_3D_TEXTURE_SIZE_EXT            = $8073;
-  GL_TEXTURE_3D_BINDING_EXT             = $806A;
-
-  // GL_EXT_paletted_texture
-  GL_TABLE_TOO_LARGE_EXT                = $8031;
-  GL_COLOR_TABLE_FORMAT_EXT             = $80D8;
-  GL_COLOR_TABLE_WIDTH_EXT              = $80D9;
-  GL_COLOR_TABLE_RED_SIZE_EXT           = $80DA;
-  GL_COLOR_TABLE_GREEN_SIZE_EXT         = $80DB;
-  GL_COLOR_TABLE_BLUE_SIZE_EXT          = $80DC;
-  GL_COLOR_TABLE_ALPHA_SIZE_EXT         = $80DD;
-  GL_COLOR_TABLE_LUMINANCE_SIZE_EXT     = $80DE;
-  GL_COLOR_TABLE_INTENSITY_SIZE_EXT     = $80DF;
-  GL_TEXTURE_INDEX_SIZE_EXT             = $80ED;
-  GL_COLOR_INDEX1_EXT                   = $80E2;
-  GL_COLOR_INDEX2_EXT                   = $80E3;
-  GL_COLOR_INDEX4_EXT                   = $80E4;
-  GL_COLOR_INDEX8_EXT                   = $80E5;
-  GL_COLOR_INDEX12_EXT                  = $80E6;
-  GL_COLOR_INDEX16_EXT                  = $80E7;
-
-  // GL_EXT_shared_texture_palette
-  GL_SHARED_TEXTURE_PALETTE_EXT         = $81FB;
-
-  // GL_EXT_point_parameters
-  GL_POINT_SIZE_MIN_EXT                 = $8126;
-  GL_POINT_SIZE_MAX_EXT                 = $8127;
-  GL_POINT_FADE_THRESHOLD_SIZE_EXT      = $8128;
-  GL_DISTANCE_ATTENUATION_EXT           = $8129;
-
-  // GL_EXT_rescale_normal
-  GL_RESCALE_NORMAL_EXT                 = $803A;
-
-  // GL_EXT_abgr
-  GL_ABGR_EXT                           = $8000;
-
-  // GL_SGIS_multitexture
-  GL_SELECTED_TEXTURE_SGIS              = $835C;
-  GL_SELECTED_TEXTURE_COORD_SET_SGIS    = $835D;
-  GL_MAX_TEXTURES_SGIS                  = $835E;
-  GL_TEXTURE0_SGIS                      = $835F;
-  GL_TEXTURE1_SGIS                      = $8360;
-  GL_TEXTURE2_SGIS                      = $8361;
-  GL_TEXTURE3_SGIS                      = $8362;
-  GL_TEXTURE_COORD_SET_SOURCE_SGIS      = $8363;
-
-  // GL_EXT_multitexture
-  GL_SELECTED_TEXTURE_EXT               = $83C0;
-  GL_SELECTED_TEXTURE_COORD_SET_EXT     = $83C1;
-  GL_SELECTED_TEXTURE_TRANSFORM_EXT     = $83C2;
-  GL_MAX_TEXTURES_EXT                   = $83C3;
-  GL_MAX_TEXTURE_COORD_SETS_EXT         = $83C4;
-  GL_TEXTURE_ENV_COORD_SET_EXT          = $83C5;
-  GL_TEXTURE0_EXT                       = $83C6;
-  GL_TEXTURE1_EXT                       = $83C7;
-  GL_TEXTURE2_EXT                       = $83C8;
-  GL_TEXTURE3_EXT                       = $83C9;
-
-  // GL_SGIS_texture_edge_clamp
-  GL_CLAMP_TO_EDGE_SGIS                 = $812F;
-
-
-// -------------------------------------------------------
-//   GL Extension Procedures
-// -------------------------------------------------------
-
-var
-
-  // === 1.0 Extensions ===
-
-  // GL_EXT_blend_minmax
-  glBlendEquationEXT: procedure(mode: GLenum); cdecl;
-
-  // GL_EXT_blend_color
-  glBlendColorEXT: procedure(red, green, blue, alpha: GLclampf); cdecl;
-
-  // GL_EXT_polygon_offset
-  glPolygonOffsetEXT: procedure(factor, bias: GLfloat); cdecl;
-
-  // GL_EXT_vertex_array
-  glVertexPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr); cdecl;
-  glNormalPointerEXT: procedure(AType: GLenum; stride, count: LongInt; var ptr); cdecl;
-  glColorPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr); cdecl;
-  glIndexPointerEXT: procedure(AType: GLenum; stride, count: LongInt; var ptr); cdecl;
-  glTexCoordPointerEXT: procedure(size: LongInt; AType: GLenum; stride, count: LongInt; var ptr); cdecl;
-  glEdgeFlagPointerEXT: procedure(stride, count: LongInt; var ptr: Boolean); cdecl;
-  glGetPointervEXT: procedure(pname: GLenum; var params: Pointer); cdecl;
-  glArrayElementEXT: procedure(i: LongInt); cdecl;
-  glDrawArraysEXT: procedure(mode: GLEnum; first, count: LongInt); cdecl;
-
-  // GL_EXT_texture_object
-  glGenTexturesEXT: procedure(n: LongInt; var textures: LongWord); cdecl;
-  glDeleteTexturesEXT: procedure(n: LongInt; var textures: LongWord); cdecl;
-  glBindTextureEXT: procedure(target: GLenum; texture: LongWord); cdecl;
-  glPrioritizeTexturesEXT: procedure(n: LongInt; var textures: LongWord; var priorities: GLClampf); cdecl;
-  glAreTexturesResidentEXT: function(n: LongInt; var textures: LongWord; var residences: Boolean): Boolean; cdecl;
-  glIsTextureEXT: function(texture: LongWord): Boolean; cdecl;
-
-  // GL_EXT_texture3D
-  glTexImage3DEXT: procedure(target: GLenum; level: LongInt; internalFormat: GLenum; width, height, depth, border: LongInt; format, AType: GLenum; var pixels); cdecl;
-  glTexSubImage3DEXT: procedure(target: GLenum; level, xoffset, yoffset, zoffset, width, height, depth: LongInt; format, AType: GLenum; var pixels); cdecl;
-  glCopyTexSubImage3DEXT: procedure(target: GLenum; level, xoffset, yoffset, zoffset, x, y, width, height: LongInt); cdecl;
-
-  // GL_EXT_color_table
-  glColorTableEXT: procedure(target, internalformat: GLenum; width: LongInt; format, AType: GLenum; var table); cdecl;
-  glColorSubTableEXT: procedure(target: GLenum; start, count: LongInt; format, AType: GLEnum; var data); cdecl;
-  glGetColorTableEXT: procedure(target, format, AType: GLenum; var table); cdecl;
-  glGetColorTableParameterfvEXT: procedure(target, pname: GLenum; var params: GLfloat); cdecl;
-  glGetColorTableParameterivEXT: procedure(target, pname: GLenum; var params: LongInt); cdecl;
-
-  // GL_SGIS_multitexture
-  glMultiTexCoord1dSGIS: procedure(target: GLenum; s: GLdouble); cdecl;
-  glMultiTexCoord1dvSGIS: procedure(target: GLenum; var v: GLdouble); cdecl;
-  glMultiTexCoord1fSGIS: procedure(target: GLenum; s: GLfloat); cdecl;
-  glMultiTexCoord1fvSGIS: procedure(target: GLenum; var v: GLfloat); cdecl;
-  glMultiTexCoord1iSGIS: procedure(target: GLenum; s: LongInt); cdecl;
-  glMultiTexCoord1ivSGIS: procedure(target: GLenum; var v: LongInt); cdecl;
-  glMultiTexCoord1sSGIS: procedure(target: GLenum; s: ShortInt); cdecl;
-  glMultiTexCoord1svSGIS: procedure(target: GLenum; var v: ShortInt); cdecl;
-  glMultiTexCoord2dSGIS: procedure(target: GLenum; s, t: GLdouble); cdecl;
-  glMultiTexCoord2dvSGIS: procedure(target: GLenum; var v: GLdouble); cdecl;
-  glMultiTexCoord2fSGIS: procedure(target: GLenum; s, t: GLfloat); cdecl;
-  glMultiTexCoord2fvSGIS: procedure(target: GLenum; var v: GLfloat); cdecl;
-  glMultiTexCoord2iSGIS: procedure(target: GLenum; s, t: LongInt); cdecl;
-  glMultiTexCoord2ivSGIS: procedure(target: GLenum; var v: LongInt); cdecl;
-  glMultiTexCoord2sSGIS: procedure(target: GLenum; s, t: ShortInt); cdecl;
-  glMultiTexCoord2svSGIS: procedure(target: GLenum; var v: ShortInt); cdecl;
-  glMultiTexCoord3dSGIS: procedure(target: GLenum; s, t, r: GLdouble); cdecl;
-  glMultiTexCoord3dvSGIS: procedure(target: GLenum; var v: GLdouble); cdecl;
-  glMultiTexCoord3fSGIS: procedure(target: GLenum; s, t, r: GLfloat); cdecl;
-  glMultiTexCoord3fvSGIS: procedure(target: GLenum; var v: GLfloat); cdecl;
-  glMultiTexCoord3iSGIS: procedure(target: GLenum; s, t, r: LongInt); cdecl;
-  glMultiTexCoord3ivSGIS: procedure(target: GLenum; var v: LongInt); cdecl;
-  glMultiTexCoord3sSGIS: procedure(target: GLenum; s, t, r: ShortInt); cdecl;
-  glMultiTexCoord3svSGIS: procedure(target: GLenum; var v: ShortInt); cdecl;
-  glMultiTexCoord4dSGIS: procedure(target: GLenum; s, t, r, q: GLdouble); cdecl;
-  glMultiTexCoord4dvSGIS: procedure(target: GLenum; var v: GLdouble); cdecl;
-  glMultiTexCoord4fSGIS: procedure(target: GLenum; s, t, r, q: GLfloat); cdecl;
-  glMultiTexCoord4fvSGIS: procedure(target: GLenum; var v: GLfloat); cdecl;
-  glMultiTexCoord4iSGIS: procedure(target: GLenum; s, t, r, q: LongInt); cdecl;
-  glMultiTexCoord4ivSGIS: procedure(target: GLenum; var v: LongInt); cdecl;
-  glMultiTexCoord4sSGIS: procedure(target: GLenum; s, t, r, q: ShortInt); cdecl;
-  glMultiTexCoord4svSGIS: procedure(target: GLenum; var v: ShortInt); cdecl;
-  glMultiTexCoordPointerSGIS: procedure(target: GLenum; size: LongInt; AType: GLEnum; stride: LongInt; var APointer); cdecl;
-  glSelectTextureSGIS: procedure(target: GLenum); cdecl;
-  glSelectTextureCoordSetSGIS: procedure(target: GLenum); cdecl;
-
-  // GL_EXT_multitexture
-  glMultiTexCoord1dEXT: procedure(target: GLenum; s: GLdouble); cdecl;
-  glMultiTexCoord1dvEXT: procedure(target: GLenum; var v: GLdouble); cdecl;
-  glMultiTexCoord1fEXT: procedure(target: GLenum; s: GLfloat); cdecl;
-  glMultiTexCoord1fvEXT: procedure(target: GLenum; var v: GLfloat); cdecl;
-  glMultiTexCoord1iEXT: procedure(target: GLenum; s: LongInt); cdecl;
-  glMultiTexCoord1ivEXT: procedure(target: GLenum; var v: LongInt); cdecl;
-  glMultiTexCoord1sEXT: procedure(target: GLenum; s: ShortInt); cdecl;
-  glMultiTexCoord1svEXT: procedure(target: GLenum; var v: ShortInt); cdecl;
-  glMultiTexCoord2dEXT: procedure(target: GLenum; s, t: GLdouble); cdecl;
-  glMultiTexCoord2dvEXT: procedure(target: GLenum; var v: GLdouble); cdecl;
-  glMultiTexCoord2fEXT: procedure(target: GLenum; s, t: GLfloat); cdecl;
-  glMultiTexCoord2fvEXT: procedure(target: GLenum; var v: GLfloat); cdecl;
-  glMultiTexCoord2iEXT: procedure(target: GLenum; s, t: LongInt); cdecl;
-  glMultiTexCoord2ivEXT: procedure(target: GLenum; var v: LongInt); cdecl;
-  glMultiTexCoord2sEXT: procedure(target: GLenum; s, t: ShortInt); cdecl;
-  glMultiTexCoord2svEXT: procedure(target: GLenum; var v: ShortInt); cdecl;
-  glMultiTexCoord3dEXT: procedure(target: GLenum; s, t, r: GLdouble); cdecl;
-  glMultiTexCoord3dvEXT: procedure(target: GLenum; var v: GLdouble); cdecl;
-  glMultiTexCoord3fEXT: procedure(target: GLenum; s, t, r: GLfloat); cdecl;
-  glMultiTexCoord3fvEXT: procedure(target: GLenum; var v: GLfloat); cdecl;
-  glMultiTexCoord3iEXT: procedure(target: GLenum; s, t, r: LongInt); cdecl;
-  glMultiTexCoord3ivEXT: procedure(target: GLenum; var v: LongInt); cdecl;
-  glMultiTexCoord3sEXT: procedure(target: GLenum; s, t, r: ShortInt); cdecl;
-  glMultiTexCoord3svEXT: procedure(target: GLenum; var v: ShortInt); cdecl;
-  glMultiTexCoord4dEXT: procedure(target: GLenum; s, t, r, q: GLdouble); cdecl;
-  glMultiTexCoord4dvEXT: procedure(target: GLenum; var v: GLdouble); cdecl;
-  glMultiTexCoord4fEXT: procedure(target: GLenum; s, t, r, q: GLfloat); cdecl;
-  glMultiTexCoord4fvEXT: procedure(target: GLenum; var v: GLfloat); cdecl;
-  glMultiTexCoord4iEXT: procedure(target: GLenum; s, t, r, q: LongInt); cdecl;
-  glMultiTexCoord4ivEXT: procedure(target: GLenum; var v: LongInt); cdecl;
-  glMultiTexCoord4sEXT: procedure(target: GLenum; s, t, r, q: ShortInt); cdecl;
-  glMultiTexCoord4svEXT: procedure(target: GLenum; var v: ShortInt); cdecl;
-  glInterleavedTextureCoordSetsEXT: procedure(factor: LongInt); cdecl;
-  glSelectTextureEXT: procedure(target: GLenum); cdecl;
-  glSelectTextureCoordSetEXT: procedure(target: GLenum); cdecl;
-  glSelectTextureTransformEXT: procedure(target: GLenum); cdecl;
-
-  // GL_EXT_point_parameters
-  glPointParameterfEXT: procedure(pname: GLenum; param: GLfloat); cdecl;
-  glPointParameterfvEXT: procedure(pname: GLenum; var params: GLfloat); cdecl;
-
-  // GL_MESA_window_pos
-  glWindowPos2iMESA: procedure(x, y: LongInt); cdecl;
-  glWindowPos2sMESA: procedure(x, y: ShortInt); cdecl;
-  glWindowPos2fMESA: procedure(x, y: GLfloat); cdecl;
-  glWindowPos2dMESA: procedure(x, y: GLdouble); cdecl;
-  glWindowPos2ivMESA: procedure(var p: LongInt); cdecl;
-  glWindowPos2svMESA: procedure(var p: ShortInt); cdecl;
-  glWindowPos2fvMESA: procedure(var p: GLfloat); cdecl;
-  glWindowPos2dvMESA: procedure(var p: GLdouble); cdecl;
-  glWindowPos3iMESA: procedure(x, y, z: LongInt); cdecl;
-  glWindowPos3sMESA: procedure(x, y, z: ShortInt); cdecl;
-  glWindowPos3fMESA: procedure(x, y, z: GLfloat); cdecl;
-  glWindowPos3dMESA: procedure(x, y, z: GLdouble); cdecl;
-  glWindowPos3ivMESA: procedure(var p: LongInt); cdecl;
-  glWindowPos3svMESA: procedure(var p: ShortInt); cdecl;
-  glWindowPos3fvMESA: procedure(var p: GLfloat); cdecl;
-  glWindowPos3dvMESA: procedure(var p: GLdouble); cdecl;
-  glWindowPos4iMESA: procedure(x, y, z, w: LongInt); cdecl;
-  glWindowPos4sMESA: procedure(x, y, z, w: ShortInt); cdecl;
-  glWindowPos4fMESA: procedure(x, y, z, w: GLfloat); cdecl;
-  glWindowPos4dMESA: procedure(x, y, z, w: GLdouble); cdecl;
-  glWindowPos4ivMESA: procedure(var p: LongInt); cdecl;
-  glWindowPos4svMESA: procedure(var p: ShortInt); cdecl;
-  glWindowPos4fvMESA: procedure(var p: GLfloat); cdecl;
-  glWindowPos4dvMESA: procedure(var p: GLdouble); cdecl;
-
-  // GL_MESA_resize_buffers
-  glResizeBuffersMESA: procedure; cdecl;
-
-
-// ===================================================================
-//   GLU consts, types and functions
-// ===================================================================
-
-const
-  GLU_TRUE                              = GL_TRUE;
-  GLU_FALSE                             = GL_FALSE;
-
-  // Normal vectors
-  GLU_SMOOTH                            = 100000;
-  GLU_FLAT                              = 100001;
-  GLU_NONE                              = 100002;
-
-  // Quadric draw styles
-  GLU_POINT                             = 100010;
-  GLU_LINE                              = 100011;
-  GLU_FILL                              = 100012;
-  GLU_SILHOUETTE                        = 100013;
-
-  // Quadric orientation
-  GLU_OUTSIDE                           = 100020;
-  GLU_INSIDE                            = 100021;
-
-  // Tesselator
-  GLU_TESS_BEGIN                        = 100100;
-  GLU_TESS_VERTEX                       = 100101;
-  GLU_TESS_END                          = 100102;
-  GLU_TESS_ERROR                        = 100103;
-  GLU_TESS_EDGE_FLAG                    = 100104;
-  GLU_TESS_COMBINE			= 100105;
-  GLU_TESS_BEGIN_DATA			= 100106;
-  GLU_TESS_VERTEX_DATA			= 100107;
-  GLU_TESS_END_DATA			= 100108;
-  GLU_TESS_ERROR_DATA			= 100109;
-  GLU_TESS_EDGE_FLAG_DATA		= 100110;
-  GLU_TESS_COMBINE_DATA			= 100111;
-
-  // Winding rules
-  GLU_TESS_WINDING_ODD			= 100130;
-  GLU_TESS_WINDING_NONZERO		= 100131;
-  GLU_TESS_WINDING_POSITIVE		= 100132;
-  GLU_TESS_WINDING_NEGATIVE		= 100133;
-  GLU_TESS_WINDING_ABS_GEQ_TWO		= 100134;
-
-  // Tessellation properties
-  GLU_TESS_WINDING_RULE			= 100140;
-  GLU_TESS_BOUNDARY_ONLY		= 100141;
-  GLU_TESS_TOLERANCE			= 100142;
-
-  // Tessellation errors
-  GLU_TESS_ERROR1			= 100151;   // Missing gluBeginPolygon
-  GLU_TESS_ERROR2			= 100152;   // Missing gluBeginContour
-  GLU_TESS_ERROR3			= 100153;   // Missing gluEndPolygon
-  GLU_TESS_ERROR4			= 100154;   // Missing gluEndContour
-  GLU_TESS_ERROR5			= 100155;
-  GLU_TESS_ERROR6			= 100156;
-  GLU_TESS_ERROR7			= 100157;
-  GLU_TESS_ERROR8			= 100158;
-
-  // NURBS
-  GLU_AUTO_LOAD_MATRIX                  = 100200;
-  GLU_CULLING                           = 100201;
-  GLU_PARAMETRIC_TOLERANCE              = 100202;
-  GLU_SAMPLING_TOLERANCE                = 100203;
-  GLU_DISPLAY_MODE                      = 100204;
-  GLU_SAMPLING_METHOD                   = 100205;
-  GLU_U_STEP                            = 100206;
-  GLU_V_STEP                            = 100207;
-
-  GLU_PATH_LENGTH                       = 100215;
-  GLU_PARAMETRIC_ERROR                  = 100216;
-  GLU_DOMAIN_DISTANCE                   = 100217;
-
-  GLU_MAP1_TRIM_2                       = 100210;
-  GLU_MAP1_TRIM_3                       = 100211;
-
-  GLU_OUTLINE_POLYGON                   = 100240;
-  GLU_OUTLINE_PATCH                     = 100241;
-
-  GLU_NURBS_ERROR1                      = 100251;   // spline order un-supported
-  GLU_NURBS_ERROR2                      = 100252;   // too few knots
-  GLU_NURBS_ERROR3                      = 100253;   // valid knot range is empty
-  GLU_NURBS_ERROR4                      = 100254;   // decreasing knot sequence
-  GLU_NURBS_ERROR5                      = 100255;   // knot multiplicity > spline order
-  GLU_NURBS_ERROR6                      = 100256;   // endcurve() must follow bgncurve()
-  GLU_NURBS_ERROR7                      = 100257;   // bgncurve() must precede endcurve()
-  GLU_NURBS_ERROR8                      = 100258;   // ctrlarray or knot vector is NULL
-  GLU_NURBS_ERROR9                      = 100259;   // cannot draw pwlcurves
-  GLU_NURBS_ERROR10                     = 100260;   // missing gluNurbsCurve()
-  GLU_NURBS_ERROR11                     = 100261;   // missing gluNurbsSurface()
-  GLU_NURBS_ERROR12                     = 100262;   // endtrim() must precede endsurface()
-  GLU_NURBS_ERROR13                     = 100263;   // bgnsurface() must precede endsurface()
-  GLU_NURBS_ERROR14                     = 100264;   // curve of improper type passed as trim curve
-  GLU_NURBS_ERROR15                     = 100265;   // bgnsurface() must precede bgntrim()
-  GLU_NURBS_ERROR16                     = 100266;   // endtrim() must follow bgntrim()
-  GLU_NURBS_ERROR17                     = 100267;   // bgntrim() must precede endtrim()*/
-  GLU_NURBS_ERROR18                     = 100268;   // invalid or missing trim curve*/
-  GLU_NURBS_ERROR19                     = 100269;   // bgntrim() must precede pwlcurve()
-  GLU_NURBS_ERROR20                     = 100270;   // pwlcurve referenced twice*/
-  GLU_NURBS_ERROR21                     = 100271;   // pwlcurve and nurbscurve mixed
-  GLU_NURBS_ERROR22                     = 100272;   // improper usage of trim data type
-  GLU_NURBS_ERROR23                     = 100273;   // nurbscurve referenced twice
-  GLU_NURBS_ERROR24                     = 100274;   // nurbscurve and pwlcurve mixed
-  GLU_NURBS_ERROR25                     = 100275;   // nurbssurface referenced twice
-  GLU_NURBS_ERROR26                     = 100276;   // invalid property
-  GLU_NURBS_ERROR27                     = 100277;   // endsurface() must follow bgnsurface()
-  GLU_NURBS_ERROR28                     = 100278;   // intersecting or misoriented trim curves
-  GLU_NURBS_ERROR29                     = 100279;   // intersecting trim curves
-  GLU_NURBS_ERROR30                     = 100280;   // UNUSED
-  GLU_NURBS_ERROR31                     = 100281;   // unconnected trim curves
-  GLU_NURBS_ERROR32                     = 100282;   // unknown knot error
-  GLU_NURBS_ERROR33                     = 100283;   // negative vertex count encountered
-  GLU_NURBS_ERROR34                     = 100284;   // negative byte-stride
-  GLU_NURBS_ERROR35                     = 100285;   // unknown type descriptor
-  GLU_NURBS_ERROR36                     = 100286;   // null control point reference
-  GLU_NURBS_ERROR37                     = 100287;   // duplicate point on pwlcurve
-
-  // Errors
-  GLU_INVALID_ENUM                      = 100900;
-  GLU_INVALID_VALUE                     = 100901;
-  GLU_OUT_OF_MEMORY                     = 100902;
-  GLU_INCOMPATIBLE_GL_VERSION           = 100903;
-
-  // New in GLU 1.1
-  GLU_VERSION                           = 100800;
-  GLU_EXTENSIONS                        = 100801;
-
-
-  // === GLU 1.0 tessellation - obsolete! ===
-
-  // Contour types
-  GLU_CW                                = 100120;
-  GLU_CCW                               = 100121;
-  GLU_INTERIOR                          = 100122;
-  GLU_EXTERIOR                          = 100123;
-  GLU_UNKNOWN                           = 100124;
-
-  // Tessellator
-  GLU_BEGIN				= GLU_TESS_BEGIN;
-  GLU_VERTEX				= GLU_TESS_VERTEX;
-  GLU_END				= GLU_TESS_END;
-  GLU_ERROR				= GLU_TESS_ERROR;
-  GLU_EDGE_FLAG				= GLU_TESS_EDGE_FLAG;
-
-
-type
-  PGLUquadricObj = ^TGLUquadricObj;
-  TGLUquadricObj = record end;
-  PGLUnurbsObj = ^TGLUnurbsObj;
-  TGLUnurbsObj = record end;
-  PGLUtesselator = ^TGLUtesselator;
-  TGLUtesselator = record end;
-  PGLUtriangulatorObj = PGLUtesselator;
-
-  // Callback function declarations
-  TGLUQuadricCallback = procedure; cdecl;
-  TGLUNurbsCallback = procedure; cdecl;
-  TGLUTessCallback = procedure; cdecl;
-
-  // We need some private array types
-  TGLUViewport = array[0..3] of LongInt;
-  TGLUMatrixd = array[0..15] of GLdouble;
-  TGLUMatrixf = array[0..15] of GLfloat;
-  TGLUVectord = array[0..2] of GLdouble;
-
-var
-  // Miscellaneous functions
-  gluLookAt: procedure(eye, eyey, eyez, centerx, centery, centerz, upx, upy, upz: GLdouble); cdecl;
-  gluOrtho2D: procedure(left, right, bottom, top: GLdouble); cdecl;
-  gluPerspective: procedure(fovy, aspect, zNear, zFar: GLdouble); cdecl;
-  gluPickMatrix: procedure(x, y, width, height: GLdouble; const viewport: TGLUViewport); cdecl;
-  gluProject: function(objx, objy, objz: GLdouble; const modelMatrix, projMatrix: TGLUMatrixd; const viewport: TGLUViewport; winx, winy, winz: GLdouble): LongInt; cdecl;
-  gluUnProject: function(winx, winy, winz: GLdouble; const modelMatrix, projMatrix: TGLUMatrixd; const viewport: TGLUViewport; objx, objy, objz: GLdouble): LongInt; cdecl;
-  gluErrorString: function(errorCode: GLenum): PChar; cdecl;
-
-  // Mipmapping and image scaling
-  gluScaleImage: procedure(format: GLenum; within, heightin: LongInt; typein: GLenum; const datain; widthout, heightout: LongInt; typeout: GLenum; var dataout); cdecl;
-  gluBuild1DMipmaps: procedure(target: GLenum; components, width: LongInt; format, AType: GLEnum; const data); cdecl;
-  gluBuild2DMipmaps: procedure(target: GLenum; components, width, height: LongInt; format, AType: GLEnum; const data); cdecl;
-
-  // Quadrics
-  gluNewQuadric: function: PGLUquadricObj; cdecl;
-  gluDeleteQuadric: procedure(state: PGLUquadricObj); cdecl;
-  gluQuadricDrawStyle: procedure(quadObject: PGLUquadricObj; drawStyle: GLenum); cdecl;
-  gluQuadricOrientation: procedure(quadObject: PGLUquadricObj; orientation: GLenum); cdecl;
-  gluQuadricNormals: procedure(quadObject: PGLUquadricObj; normals: GLenum); cdecl;
-  gluQuadricTexture: procedure(quadObject: PGLUquadricObj; textureCoords: Boolean); cdecl;
-  gluQuadricCallback: procedure(quadObject: PGLUquadricObj; which: GLenum; fn: TGLUQuadricCallback); cdecl;
-  gluCylinder: procedure(qobj: PGLUquadricObj; baseRadius, topRadius, height: GLdouble; slices, stacks: LongInt); cdecl;
-  gluSphere: procedure(qobj: PGLUquadricObj; radius: GLdouble; slices, stacks: LongInt); cdecl;
-  gluDisk: procedure(qobj: PGLUquadricObj; innerRadius, outerRadius: GLdouble; slices, loops: LongInt); cdecl;
-  gluPartialDisk: procedure(qobj: PGLUquadricObj; innerRadius, outerRadius: GLdouble; slices, loops: LongInt; startAngle, sweepAngle: GLdouble); cdecl;
-
-  // Nurbs
-  gluNewNurbsRenderer: function: PGLUnurbsObj; cdecl;
-  gluDeleteNurbsRenderer: procedure(nobj: PGLUnurbsObj); cdecl;
-  gluLoadSamplingMatrices: procedure(nobj: PGLUnurbsObj; const modelMatrix, projMatrix: TGLUMatrixf; const viewport: TGLUViewport); cdecl;
-  gluNurbsProperty: procedure(nobj: PGLUnurbsObj; AProperty: GLenum; value: GLfloat); cdecl;
-  gluGetNurbsProperty: procedure(nobj: PGLUnurbsObj; AProperty: GLEnum; var value: GLfloat); cdecl;
-  gluBeginCurve: procedure(nobj: PGLUnurbsObj); cdecl;
-  gluEndCurve: procedure(nobj: PGLUnurbsObj); cdecl;
-  gluNurbsCurve: procedure(nobj: PGLUnurbsObj; nknots: LongInt; var know: GLfloat; stride: LongInt; var ctlarray: GLfloat; order: LongInt; AType: GLenum); cdecl;
-  gluBeginSurface: procedure(nobj: PGLUnurbsObj); cdecl;
-  gluEndSurface: procedure(nobj: PGLUnurbsObj); cdecl;
-  gluNurbsSurface: procedure(nobj: PGLUnurbsObj; sknot_count: LongInt; var sknot: GLfloat; tknot_count: LongInt; var tknot: GLfloat; s_stride, t_stride: LongInt; var ctlarray: GLfloat; sorder, torder: LongInt; AType: GLenum); cdecl;
-  gluBeginTrim: procedure(nobj: PGLUnurbsObj); cdecl;
-  gluEndTrim: procedure(nobj: PGLUnurbsObj); cdecl;
-  gluPwlCurve: procedure(nobj: PGLUnurbsObj; count: LongInt; var AArray: GLfloat; stride: LongInt; AType: GLenum); cdecl;
-  gluNurbsCallback: procedure(nobj: PGLUnurbsObj; which: GLenum; fn: TGLUNurbsCallback); cdecl;
-
-  // Polygon tesselation
-  gluNewTess: function: PGLUtesselator; cdecl;
-  gluDeleteTess: procedure(tobj: PGLUtesselator); cdecl;
-  gluTessBeginPolygon: procedure(tobj: PGLUtesselator; var polygon_data); cdecl;
-  gluTessBeginContour: procedure(tobj: PGLUtesselator); cdecl;
-  gluTessVertex: procedure(tobj: PGLUtesselator; v: TGLUVectord; var data); cdecl;
-  gluTessEndContour: procedure(tobj: PGLUtesselator); cdecl;
-  gluTessEndPolygon: procedure(tobj: PGLUtesselator); cdecl;
-  gluTessProperty: procedure(tobj: PGLUtesselator; which: GLenum; value: GLdouble); cdecl;
-  gluTessNormal: procedure(tobj: PGLUtesselator; x, y, z: GLdouble); cdecl;
-  gluTessCallback: procedure(tobj: PGLUtesselator; which: GLenum; fn: TGLUTessCallback); cdecl;
-  gluGetTessProperty: procedure(tobj: PGLUtesselator; which: GLenum; var value: GLdouble); cdecl;
-
-  // Obsolete 1.0 tessellation functions
-  gluBeginPolygon: procedure(tobj: PGLUtesselator); cdecl;
-  gluNextContour: procedure(tobj: PGLUtesselator; AType: GLenum); cdecl;
-  gluEndPolygon: procedure(tobj: PGLUtesselator); cdecl;
-
-  // New functions in GLU 1.1
-  gluGetString: function(name: GLenum): PChar; cdecl;
-
-
-// ===================================================================
-//   GLX consts, types and functions
-// ===================================================================
-
-// Tokens for glXChooseVisual and glXGetConfig:
-const
-  GLX_USE_GL                            = 1;
-  GLX_BUFFER_SIZE                       = 2;
-  GLX_LEVEL                             = 3;
-  GLX_RGBA                              = 4;
-  GLX_DOUBLEBUFFER                      = 5;
-  GLX_STEREO                            = 6;
-  GLX_AUX_BUFFERS                       = 7;
-  GLX_RED_SIZE                          = 8;
-  GLX_GREEN_SIZE                        = 9;
-  GLX_BLUE_SIZE                         = 10;
-  GLX_ALPHA_SIZE                        = 11;
-  GLX_DEPTH_SIZE                        = 12;
-  GLX_STENCIL_SIZE                      = 13;
-  GLX_ACCUM_RED_SIZE                    = 14;
-  GLX_ACCUM_GREEN_SIZE                  = 15;
-  GLX_ACCUM_BLUE_SIZE                   = 16;
-  GLX_ACCUM_ALPHA_SIZE                  = 17;
-
-  // GLX_EXT_visual_info extension
-  GLX_X_VISUAL_TYPE_EXT                 = $22;
-  GLX_TRANSPARENT_TYPE_EXT              = $23;
-  GLX_TRANSPARENT_INDEX_VALUE_EXT       = $24;
-  GLX_TRANSPARENT_RED_VALUE_EXT         = $25;
-  GLX_TRANSPARENT_GREEN_VALUE_EXT       = $26;
-  GLX_TRANSPARENT_BLUE_VALUE_EXT        = $27;
-  GLX_TRANSPARENT_ALPHA_VALUE_EXT       = $28;
-
-
-  // Error codes returned by glXGetConfig:
-  GLX_BAD_SCREEN                        = 1;
-  GLX_BAD_ATTRIBUTE                     = 2;
-  GLX_NO_EXTENSION                      = 3;
-  GLX_BAD_VISUAL                        = 4;
-  GLX_BAD_CONTEXT                       = 5;
-  GLX_BAD_VALUE                         = 6;
-  GLX_BAD_ENUM                          = 7;
-
-  // GLX 1.1 and later:
-  GLX_VENDOR                            = 1;
-  GLX_VERSION                           = 2;
-  GLX_EXTENSIONS                        = 3;
-
-  // GLX_visual_info extension
-  GLX_TRUE_COLOR_EXT                    = $8002;
-  GLX_DIRECT_COLOR_EXT                  = $8003;
-  GLX_PSEUDO_COLOR_EXT                  = $8004;
-  GLX_STATIC_COLOR_EXT                  = $8005;
-  GLX_GRAY_SCALE_EXT                    = $8006;
-  GLX_STATIC_GRAY_EXT                   = $8007;
-  GLX_NONE_EXT                          = $8000;
-  GLX_TRANSPARENT_RGB_EXT               = $8008;
-  GLX_TRANSPARENT_INDEX_EXT             = $8009;
-
-type
-  // From XLib:
-  XPixmap = TXID;
-  XFont = TXID;
-  XColormap = TXID;
-
-  GLXContext = Pointer;
-  GLXPixmap = TXID;
-  GLXDrawable = TXID;
-  GLXContextID = TXID;
-
-var
-  glXChooseVisual: function(dpy: PDisplay; screen: Integer; var attribList: Integer): PXVisualInfo; cdecl; cdecl;
-  glXCreateContext: function(dpy: PDisplay; vis: PXVisualInfo; shareList: GLXContext; direct: Boolean): GLXContext; cdecl; cdecl;
-  glXDestroyContext: procedure(dpy: PDisplay; ctx: GLXContext); cdecl; cdecl;
-  glXMakeCurrent: function(dpy: PDisplay; drawable: GLXDrawable; ctx: GLXContext): Boolean; cdecl; cdecl;
-  glXCopyContext: procedure(dpy: PDisplay; src, dst: GLXContext; mask: LongWord); cdecl; cdecl;
-  glXSwapBuffers: procedure(dpy: PDisplay; drawable: GLXDrawable); cdecl; cdecl;
-  glXCreateGLXPixmap: function(dpy: PDisplay; visual: PXVisualInfo; pixmap: XPixmap): GLXPixmap; cdecl; cdecl;
-  glXDestroyGLXPixmap: procedure(dpy: PDisplay; pixmap: GLXPixmap); cdecl; cdecl;
-  glXQueryExtension: function(dpy: PDisplay; var errorb, event: Integer): Boolean; cdecl; cdecl;
-  glXQueryVersion: function(dpy: PDisplay; var maj, min: Integer): Boolean; cdecl; cdecl;
-  glXIsDirect: function(dpy: PDisplay; ctx: GLXContext): Boolean; cdecl; cdecl;
-  glXGetConfig: function(dpy: PDisplay; visual: PXVisualInfo; attrib: Integer; var value: Integer): Integer; cdecl; cdecl;
-  glXGetCurrentContext: function: GLXContext; cdecl; cdecl;
-  glXGetCurrentDrawable: function: GLXDrawable; cdecl; cdecl;
-  glXWaitGL: procedure; cdecl; cdecl;
-  glXWaitX: procedure; cdecl; cdecl;
-  glXUseXFont: procedure(font: XFont; first, count, list: Integer); cdecl; cdecl;
-
-  // GLX 1.1 and later
-  glXQueryExtensionsString: function(dpy: PDisplay; screen: Integer): PChar; cdecl; cdecl;
-  glXQueryServerString: function(dpy: PDisplay; screen, name: Integer): PChar; cdecl; cdecl;
-  glXGetClientString: function(dpy: PDisplay; name: Integer): PChar; cdecl; cdecl;
-
-  // Mesa GLX Extensions
-  glXCreateGLXPixmapMESA: function(dpy: PDisplay; visual: PXVisualInfo; pixmap: XPixmap; cmap: XColormap): GLXPixmap; cdecl; cdecl;
-  glXReleaseBufferMESA: function(dpy: PDisplay; d: GLXDrawable): Boolean; cdecl; cdecl;
-  glXCopySubBufferMESA: procedure(dpy: PDisplay; drawbale: GLXDrawable; x, y, width, height: Integer); cdecl; cdecl;
-  glXGetVideoSyncSGI: function(var counter: LongWord): Integer; cdecl; cdecl;
-  glXWaitVideoSyncSGI: function(divisor, remainder: Integer; var count: LongWord): Integer; cdecl; cdecl;
-
-
-// ===================================================================
-// ===================================================================
-
-implementation
-
-{$LINKLIB m}
-
-function dlopen(AFile: PChar; mode: LongInt): Pointer; external 'dl';
-function dlclose(handle: Pointer): LongInt; external 'dl';
-function dlsym(handle: Pointer; name: PChar): Pointer; external 'dl';
-
-function LoadLibrary(const name: PChar): Pointer;
-begin
-  Result := dlopen(name, $101 {RTLD_GLOBAL or RTLD_LAZY});
-end;
-
-function GetProc(handle: Pointer; const name: PChar): Pointer;
-begin
-  Result := dlsym(handle, name);
-  if not Assigned(Result) and GLDumpUnresolvedFunctions then
-    WriteLn('Unresolved: ', name);
-end;
-
-var
-  libGL, libGLU, libGLX: Pointer;
-
-function InitGLFromLibrary(const libname: PChar): Boolean;
-begin
-  Result := False;
-  libGL := LoadLibrary(libname);
-  if not Assigned(libGL) then
-    exit;
-
-  glClearIndex := GetProc(libgl, 'glClearIndex');
-  glClearColor := GetProc(libgl, 'glClearColor');
-  glClear := GetProc(libgl, 'glClear');
-  glIndexMask := GetProc(libgl, 'glIndexMask');
-  glColorMask := GetProc(libgl, 'glColorMask');
-  glAlphaFunc := GetProc(libgl, 'glAlphaFunc');
-  glBlendFunc := GetProc(libgl, 'glBlendFunc');
-  glLogicOp := GetProc(libgl, 'glLogicOp');
-  glCullFace := GetProc(libgl, 'glCullFace');
-  glFrontFace := GetProc(libgl, 'glFrontFace');
-  glPointSize := GetProc(libgl, 'glPointSize');
-  glLineWidth := GetProc(libgl, 'glLineWidth');
-  glLineStipple := GetProc(libgl, 'glLineStipple');
-  glPolygonMode := GetProc(libgl, 'glPolygonMode');
-  glPolygonOffset := GetProc(libgl, 'glPolygonOffset');
-  glPolygonStipple := GetProc(libgl, 'glPolygonStipple');
-  glGetPolygonStipple := GetProc(libgl, 'glGetPolygonStipple');
-  glEdgeFlag := GetProc(libgl, 'glEdgeFlag');
-  glEdgeFlagv := GetProc(libgl, 'glEdgeFlagv');
-  glScissor := GetProc(libgl, 'glScissor');
-  glClipPlane := GetProc(libgl, 'glClipPlane');
-  glGetClipPlane := GetProc(libgl, 'glGetClipPlane');
-  glDrawBuffer := GetProc(libgl, 'glDrawBuffer');
-  glReadBuffer := GetProc(libgl, 'glReadBuffer');
-  glEnable := GetProc(libgl, 'glEnable');
-  glDisable := GetProc(libgl, 'glDisable');
-  glIsEnabled := GetProc(libgl, 'glIsEnabled');
-  glEnableClientState := GetProc(libgl, 'glEnableClientState');
-  glDisableClientState := GetProc(libgl, 'glDisableClientState');
-  glGetBooleanv := GetProc(libgl, 'glGetBooleanv');
-  glGetDoublev := GetProc(libgl, 'glGetDoublev');
-  glGetFloatv := GetProc(libgl, 'glGetFloatv');
-  glGetIntegerv := GetProc(libgl, 'glGetIntegerv');
-  glPushAttrib := GetProc(libgl, 'glPushAttrib');
-  glPopAttrib := GetProc(libgl, 'glPopAttrib');
-  glPushClientAttrib := GetProc(libgl, 'glPushClientAttrib');
-  glPopClientAttrib := GetProc(libgl, 'glPopClientAttrib');
-  glRenderMode := GetProc(libgl, 'glRenderMode');
-  glGetError := GetProc(libgl, 'glGetError');
-  glGetString := GetProc(libgl, 'glGetString');
-  glFinish := GetProc(libgl, 'glFinish');
-  glFlush := GetProc(libgl, 'glFlush');
-  glHint := GetProc(libgl, 'glHint');
-  glClearDepth := GetProc(libgl, 'glClearDepth');
-  glDepthFunc := GetProc(libgl, 'glDepthFunc');
-  glDepthMask := GetProc(libgl, 'glDepthMask');
-  glDepthRange := GetProc(libgl, 'glDepthRange');
-  glClearAccum := GetProc(libgl, 'glClearAccum');
-  glAccum := GetProc(libgl, 'glAccum');
-  glMatrixMode := GetProc(libgl, 'glMatrixMode');
-  glOrtho := GetProc(libgl, 'glOrtho');
-  glFrustum := GetProc(libgl, 'glFrustum');
-  glViewport := GetProc(libgl, 'glViewport');
-  glPushMatrix := GetProc(libgl, 'glPushMatrix');
-  glPopMatrix := GetProc(libgl, 'glPopMatrix');
-  glLoadIdentity := GetProc(libgl, 'glLoadIdentity');
-  glLoadMatrixd := GetProc(libgl, 'glLoadMatrixd');
-  glLoadMatrixf := GetProc(libgl, 'glLoadMatrixf');
-  glMultMatrixd := GetProc(libgl, 'glMultMatrixd');
-  glMultMatrixf := GetProc(libgl, 'glMultMatrixf');
-  glRotated := GetProc(libgl, 'glRotated');
-  glRotatef := GetProc(libgl, 'glRotatef');
-  glScaled := GetProc(libgl, 'glScaled');
-  glScalef := GetProc(libgl, 'glScalef');
-  glTranslated := GetProc(libgl, 'glTranslated');
-  glTranslatef := GetProc(libgl, 'glTranslatef');
-  glIsList := GetProc(libgl, 'glIsList');
-  glDeleteLists := GetProc(libgl, 'glDeleteLists');
-  glGenLists := GetProc(libgl, 'glGenLists');
-  glNewList := GetProc(libgl, 'glNewList');
-  glEndList := GetProc(libgl, 'glEndList');
-  glCallList := GetProc(libgl, 'glCallList');
-  glCallLists := GetProc(libgl, 'glCallLists');
-  glListBase := GetProc(libgl, 'glListBase');
-  glBegin := GetProc(libgl, 'glBegin');
-  glEnd := GetProc(libgl, 'glEnd');
-  glVertex2d := GetProc(libgl, 'glVertex2d');
-  glVertex2f := GetProc(libgl, 'glVertex2f');
-  glVertex2i := GetProc(libgl, 'glVertex2i');
-  glVertex2s := GetProc(libgl, 'glVertex2s');
-  glVertex3d := GetProc(libgl, 'glVertex3d');
-  glVertex3f := GetProc(libgl, 'glVertex3f');
-  glVertex3i := GetProc(libgl, 'glVertex3i');
-  glVertex3s := GetProc(libgl, 'glVertex3s');
-  glVertex4d := GetProc(libgl, 'glVertex4d');
-  glVertex4f := GetProc(libgl, 'glVertex4f');
-  glVertex4i := GetProc(libgl, 'glVertex4i');
-  glVertex4s := GetProc(libgl, 'glVertex4s');
-  glVertex2dv := GetProc(libgl, 'glVertex2dv');
-  glVertex2fv := GetProc(libgl, 'glVertex2fv');
-  glVertex2iv := GetProc(libgl, 'glVertex2iv');
-  glVertex2sv := GetProc(libgl, 'glVertex2sv');
-  glVertex3dv := GetProc(libgl, 'glVertex3dv');
-  glVertex3fv := GetProc(libgl, 'glVertex3fv');
-  glVertex3iv := GetProc(libgl, 'glVertex3iv');
-  glVertex3sv := GetProc(libgl, 'glVertex3sv');
-  glVertex4dv := GetProc(libgl, 'glVertex4dv');
-  glVertex4fv := GetProc(libgl, 'glVertex4fv');
-  glVertex4iv := GetProc(libgl, 'glVertex4iv');
-  glVertex4sv := GetProc(libgl, 'glVertex4sv');
-  glNormal3b := GetProc(libgl, 'glNormal3b');
-  glNormal3d := GetProc(libgl, 'glNormal3d');
-  glNormal3f := GetProc(libgl, 'glNormal3f');
-  glNormal3i := GetProc(libgl, 'glNormal3i');
-  glNormal3s := GetProc(libgl, 'glNormal3s');
-  glNormal3bv := GetProc(libgl, 'glNormal3bv');
-  glNormal3dv := GetProc(libgl, 'glNormal3dv');
-  glNormal3fv := GetProc(libgl, 'glNormal3fv');
-  glNormal3iv := GetProc(libgl, 'glNormal3iv');
-  glNormal3sv := GetProc(libgl, 'glNormal3sv');
-  glIndexd := GetProc(libgl, 'glIndexd');
-  glIndexf := GetProc(libgl, 'glIndexf');
-  glIndexi := GetProc(libgl, 'glIndexi');
-  glIndexs := GetProc(libgl, 'glIndexs');
-  glIndexub := GetProc(libgl, 'glIndexub');
-  glIndexdv := GetProc(libgl, 'glIndexdv');
-  glIndexfv := GetProc(libgl, 'glIndexfv');
-  glIndexiv := GetProc(libgl, 'glIndexiv');
-  glIndexsv := GetProc(libgl, 'glIndexsv');
-  glIndexubv := GetProc(libgl, 'glIndexubv');
-  glColor3b := GetProc(libgl, 'glColor3b');
-  glColor3d := GetProc(libgl, 'glColor3d');
-  glColor3f := GetProc(libgl, 'glColor3f');
-  glColor3i := GetProc(libgl, 'glColor3i');
-  glColor3s := GetProc(libgl, 'glColor3s');
-  glColor3ub := GetProc(libgl, 'glColor3ub');
-  glColor3ui := GetProc(libgl, 'glColor3ui');
-  glColor3us := GetProc(libgl, 'glColor3us');
-  glColor4b := GetProc(libgl, 'glColor4b');
-  glColor4d := GetProc(libgl, 'glColor4d');
-  glColor4f := GetProc(libgl, 'glColor4f');
-  glColor4i := GetProc(libgl, 'glColor4i');
-  glColor4s := GetProc(libgl, 'glColor4s');
-  glColor4ub := GetProc(libgl, 'glColor4ub');
-  glColor4ui := GetProc(libgl, 'glColor4ui');
-  glColor4us := GetProc(libgl, 'glColor4us');
-  glColor3bv := GetProc(libgl, 'glColor3bv');
-  glColor3dv := GetProc(libgl, 'glColor3dv');
-  glColor3fv := GetProc(libgl, 'glColor3fv');
-  glColor3iv := GetProc(libgl, 'glColor3iv');
-  glColor3sv := GetProc(libgl, 'glColor3sv');
-  glColor3ubv := GetProc(libgl, 'glColor3ubv');
-  glColor3uiv := GetProc(libgl, 'glColor3uiv');
-  glColor3usv := GetProc(libgl, 'glColor3usv');
-  glColor4bv := GetProc(libgl, 'glColor4bv');
-  glColor4dv := GetProc(libgl, 'glColor4dv');
-  glColor4fv := GetProc(libgl, 'glColor4fv');
-  glColor4iv := GetProc(libgl, 'glColor4iv');
-  glColor4sv := GetProc(libgl, 'glColor4sv');
-  glColor4ubv := GetProc(libgl, 'glColor4ubv');
-  glColor4uiv := GetProc(libgl, 'glColor4uiv');
-  glColor4usv := GetProc(libgl, 'glColor4usv');
-  glTexCoord1d := GetProc(libgl, 'glTexCoord1d');
-  glTexCoord1f := GetProc(libgl, 'glTexCoord1f');
-  glTexCoord1i := GetProc(libgl, 'glTexCoord1i');
-  glTexCoord1s := GetProc(libgl, 'glTexCoord1s');
-  glTexCoord2d := GetProc(libgl, 'glTexCoord2d');
-  glTexCoord2f := GetProc(libgl, 'glTexCoord2f');
-  glTexCoord2i := GetProc(libgl, 'glTexCoord2i');
-  glTexCoord2s := GetProc(libgl, 'glTexCoord2s');
-  glTexCoord3d := GetProc(libgl, 'glTexCoord3d');
-  glTexCoord3f := GetProc(libgl, 'glTexCoord3f');
-  glTexCoord3i := GetProc(libgl, 'glTexCoord3i');
-  glTexCoord3s := GetProc(libgl, 'glTexCoord3s');
-  glTexCoord4d := GetProc(libgl, 'glTexCoord4d');
-  glTexCoord4f := GetProc(libgl, 'glTexCoord4f');
-  glTexCoord4i := GetProc(libgl, 'glTexCoord4i');
-  glTexCoord4s := GetProc(libgl, 'glTexCoord4s');
-  glTexCoord1dv := GetProc(libgl, 'glTexCoord1dv');
-  glTexCoord1fv := GetProc(libgl, 'glTexCoord1fv');
-  glTexCoord1iv := GetProc(libgl, 'glTexCoord1iv');
-  glTexCoord1sv := GetProc(libgl, 'glTexCoord1sv');
-  glTexCoord2dv := GetProc(libgl, 'glTexCoord2dv');
-  glTexCoord2fv := GetProc(libgl, 'glTexCoord2fv');
-  glTexCoord2iv := GetProc(libgl, 'glTexCoord2iv');
-  glTexCoord2sv := GetProc(libgl, 'glTexCoord2sv');
-  glTexCoord3dv := GetProc(libgl, 'glTexCoord3dv');
-  glTexCoord3fv := GetProc(libgl, 'glTexCoord3fv');
-  glTexCoord3iv := GetProc(libgl, 'glTexCoord3iv');
-  glTexCoord3sv := GetProc(libgl, 'glTexCoord3sv');
-  glTexCoord4dv := GetProc(libgl, 'glTexCoord4dv');
-  glTexCoord4fv := GetProc(libgl, 'glTexCoord4fv');
-  glTexCoord4iv := GetProc(libgl, 'glTexCoord4iv');
-  glTexCoord4sv := GetProc(libgl, 'glTexCoord4sv');
-  glRasterPos2d := GetProc(libgl, 'glRasterPos2d');
-  glRasterPos2f := GetProc(libgl, 'glRasterPos2f');
-  glRasterPos2i := GetProc(libgl, 'glRasterPos2i');
-  glRasterPos2s := GetProc(libgl, 'glRasterPos2s');
-  glRasterPos3d := GetProc(libgl, 'glRasterPos3d');
-  glRasterPos3f := GetProc(libgl, 'glRasterPos3f');
-  glRasterPos3i := GetProc(libgl, 'glRasterPos3i');
-  glRasterPos3s := GetProc(libgl, 'glRasterPos3s');
-  glRasterPos4d := GetProc(libgl, 'glRasterPos4d');
-  glRasterPos4f := GetProc(libgl, 'glRasterPos4f');
-  glRasterPos4i := GetProc(libgl, 'glRasterPos4i');
-  glRasterPos4s := GetProc(libgl, 'glRasterPos4s');
-  glRasterPos2dv := GetProc(libgl, 'glRasterPos2dv');
-  glRasterPos2fv := GetProc(libgl, 'glRasterPos2fv');
-  glRasterPos2iv := GetProc(libgl, 'glRasterPos2iv');
-  glRasterPos2sv := GetProc(libgl, 'glRasterPos2sv');
-  glRasterPos3dv := GetProc(libgl, 'glRasterPos3dv');
-  glRasterPos3fv := GetProc(libgl, 'glRasterPos3fv');
-  glRasterPos3iv := GetProc(libgl, 'glRasterPos3iv');
-  glRasterPos3sv := GetProc(libgl, 'glRasterPos3sv');
-  glRasterPos4dv := GetProc(libgl, 'glRasterPos4dv');
-  glRasterPos4fv := GetProc(libgl, 'glRasterPos4fv');
-  glRasterPos4iv := GetProc(libgl, 'glRasterPos4iv');
-  glRasterPos4sv := GetProc(libgl, 'glRasterPos4sv');
-  glRectd := GetProc(libgl, 'glRectd');
-  glRectf := GetProc(libgl, 'glRectf');
-  glRecti := GetProc(libgl, 'glRecti');
-  glRects := GetProc(libgl, 'glRects');
-  glRectdv := GetProc(libgl, 'glRectdv');
-  glRectfv := GetProc(libgl, 'glRectfv');
-  glRectiv := GetProc(libgl, 'glRectiv');
-  glRectsv := GetProc(libgl, 'glRectsv');
-  glVertexPointer := GetProc(libgl, 'glVertexPointer');
-  glNormalPointer := GetProc(libgl, 'glNormalPointer');
-  glColorPointer := GetProc(libgl, 'glColorPointer');
-  glIndexPointer := GetProc(libgl, 'glIndexPointer');
-  glTexCoordPointer := GetProc(libgl, 'glTexCoordPointer');
-  glEdgeFlagPointer := GetProc(libgl, 'glEdgeFlagPointer');
-  glGetPointerv := GetProc(libgl, 'glGetPointerv');
-  glArrayElement := GetProc(libgl, 'glArrayElement');
-  glDrawArrays := GetProc(libgl, 'glDrawArrays');
-  glDrawElements := GetProc(libgl, 'glDrawElements');
-  glInterleavedArrays := GetProc(libgl, 'glInterleavedArrays');
-  glShadeModel := GetProc(libgl, 'glShadeModel');
-  glLightf := GetProc(libgl, 'glLightf');
-  glLighti := GetProc(libgl, 'glLighti');
-  glLightfv := GetProc(libgl, 'glLightfv');
-  glLightiv := GetProc(libgl, 'glLightiv');
-  glGetLightfv := GetProc(libgl, 'glGetLightfv');
-  glGetLightiv := GetProc(libgl, 'glGetLightiv');
-  glLightModelf := GetProc(libgl, 'glLightModelf');
-  glLightModeli := GetProc(libgl, 'glLightModeli');
-  glLightModelfv := GetProc(libgl, 'glLightModelfv');
-  glLightModeliv := GetProc(libgl, 'glLightModeliv');
-  glMaterialf := GetProc(libgl, 'glMaterialf');
-  glMateriali := GetProc(libgl, 'glMateriali');
-  glMaterialfv := GetProc(libgl, 'glMaterialfv');
-  glMaterialiv := GetProc(libgl, 'glMaterialiv');
-  glGetMaterialfv := GetProc(libgl, 'glGetMaterialfv');
-  glGetMaterialiv := GetProc(libgl, 'glGetMaterialiv');
-  glColorMaterial := GetProc(libgl, 'glColorMaterial');
-  glPixelZoom := GetProc(libgl, 'glPixelZoom');
-  glPixelStoref := GetProc(libgl, 'glPixelStoref');
-  glPixelStorei := GetProc(libgl, 'glPixelStorei');
-  glPixelTransferf := GetProc(libgl, 'glPixelTransferf');
-  glPixelTransferi := GetProc(libgl, 'glPixelTransferi');
-  glPixelMapfv := GetProc(libgl, 'glPixelMapfv');
-  glPixelMapuiv := GetProc(libgl, 'glPixelMapuiv');
-  glPixelMapusv := GetProc(libgl, 'glPixelMapusv');
-  glGetPixelMapfv := GetProc(libgl, 'glGetPixelMapfv');
-  glGetPixelMapuiv := GetProc(libgl, 'glGetPixelMapuiv');
-  glGetPixelMapusv := GetProc(libgl, 'glGetPixelMapusv');
-  glBitmap := GetProc(libgl, 'glBitmap');
-  glReadPixels := GetProc(libgl, 'glReadPixels');
-  glDrawPixels := GetProc(libgl, 'glDrawPixels');
-  glCopyPixels := GetProc(libgl, 'glCopyPixels');
-  glStencilFunc := GetProc(libgl, 'glStencilFunc');
-  glStencilMask := GetProc(libgl, 'glStencilMask');
-  glStencilOp := GetProc(libgl, 'glStencilOp');
-  glClearStencil := GetProc(libgl, 'glClearStencil');
-  glTexGend := GetProc(libgl, 'glTexGend');
-  glTexGenf := GetProc(libgl, 'glTexGenf');
-  glTexGeni := GetProc(libgl, 'glTexGeni');
-  glTexGendv := GetProc(libgl, 'glTexGendv');
-  glTexGenfv := GetProc(libgl, 'glTexGenfv');
-  glTexGeniv := GetProc(libgl, 'glTexGeniv');
-  glGetTexGendv := GetProc(libgl, 'glGetTexGendv');
-  glGetTexGenfv := GetProc(libgl, 'glGetTexGenfv');
-  glGetTexGeniv := GetProc(libgl, 'glGetTexGeniv');
-  glTexEnvf := GetProc(libgl, 'glTexEnvf');
-  glTexEnvi := GetProc(libgl, 'glTexEnvi');
-  glTexEnvfv := GetProc(libgl, 'glTexEnvfv');
-  glTexEnviv := GetProc(libgl, 'glTexEnviv');
-  glGetTexEnvfv := GetProc(libgl, 'glGetTexEnvfv');
-  glGetTexEnviv := GetProc(libgl, 'glGetTexEnviv');
-  glTexParameterf := GetProc(libgl, 'glTexParameterf');
-  glTexParameteri := GetProc(libgl, 'glTexParameteri');
-  glTexParameterfv := GetProc(libgl, 'glTexParameterfv');
-  glTexParameteriv := GetProc(libgl, 'glTexParameteriv');
-  glGetTexParameterfv := GetProc(libgl, 'glGetTexParameterfv');
-  glGetTexParameteriv := GetProc(libgl, 'glGetTexParameteriv');
-  glGetTexLevelParameterfv := GetProc(libgl, 'glGetTexLevelParameterfv');
-  glGetTexLevelParameteriv := GetProc(libgl, 'glGetTexLevelParameteriv');
-  glTexImage1D := GetProc(libgl, 'glTexImage1D');
-  glTexImage2D := GetProc(libgl, 'glTexImage2D');
-  glGetTexImage := GetProc(libgl, 'glGetTexImage');
-  glGenTextures := GetProc(libgl, 'glGenTextures');
-  glDeleteTextures := GetProc(libgl, 'glDeleteTextures');
-  glBindTexture := GetProc(libgl, 'glBindTexture');
-  glPrioritizeTextures := GetProc(libgl, 'glPrioritizeTextures');
-  glAreTexturesResident := GetProc(libgl, 'glAreTexturesResident');
-  glIsTexture := GetProc(libgl, 'glIsTexture');
-  glTexSubImage1D := GetProc(libgl, 'glTexSubImage1D');
-  glTexSubImage2D := GetProc(libgl, 'glTexSubImage2D');
-  glCopyTexImage1D := GetProc(libgl, 'glCopyTexImage1D');
-  glCopyTexImage2D := GetProc(libgl, 'glCopyTexImage2D');
-  glCopyTexSubImage1D := GetProc(libgl, 'glCopyTexSubImage1D');
-  glCopyTexSubImage2D := GetProc(libgl, 'glCopyTexSubImage2D');
-  glMap1d := GetProc(libgl, 'glMap1d');
-  glMap1f := GetProc(libgl, 'glMap1f');
-  glMap2d := GetProc(libgl, 'glMap2d');
-  glMap2f := GetProc(libgl, 'glMap2f');
-  glGetMapdv := GetProc(libgl, 'glGetMapdv');
-  glGetMapfv := GetProc(libgl, 'glGetMapfv');
-  glGetMapiv := GetProc(libgl, 'glGetMapiv');
-  glEvalCoord1d := GetProc(libgl, 'glEvalCoord1d');
-  glEvalCoord1f := GetProc(libgl, 'glEvalCoord1f');
-  glEvalCoord1dv := GetProc(libgl, 'glEvalCoord1dv');
-  glEvalCoord1fv := GetProc(libgl, 'glEvalCoord1fv');
-  glEvalCoord2d := GetProc(libgl, 'glEvalCoord2d');
-  glEvalCoord2f := GetProc(libgl, 'glEvalCoord2f');
-  glEvalCoord2dv := GetProc(libgl, 'glEvalCoord2dv');
-  glEvalCoord2fv := GetProc(libgl, 'glEvalCoord2fv');
-  glMapGrid1d := GetProc(libgl, 'glMapGrid1d');
-  glMapGrid1f := GetProc(libgl, 'glMapGrid1f');
-  glMapGrid2d := GetProc(libgl, 'glMapGrid2d');
-  glMapGrid2f := GetProc(libgl, 'glMapGrid2f');
-  glEvalPoint1 := GetProc(libgl, 'glEvalPoint1');
-  glEvalPoint2 := GetProc(libgl, 'glEvalPoint2');
-  glEvalMesh1 := GetProc(libgl, 'glEvalMesh1');
-  glEvalMesh2 := GetProc(libgl, 'glEvalMesh2');
-  glFogf := GetProc(libgl, 'glFogf');
-  glFogi := GetProc(libgl, 'glFogi');
-  glFogfv := GetProc(libgl, 'glFogfv');
-  glFogiv := GetProc(libgl, 'glFogiv');
-  glFeedbackBuffer := GetProc(libgl, 'glFeedbackBuffer');
-  glPassThrough := GetProc(libgl, 'glPassThrough');
-  glSelectBuffer := GetProc(libgl, 'glSelectBuffer');
-  glInitNames := GetProc(libgl, 'glInitNames');
-  glLoadName := GetProc(libgl, 'glLoadName');
-  glPushName := GetProc(libgl, 'glPushName');
-  glPopName := GetProc(libgl, 'glPopName');
-
-  GLInitialized := True;
-  Result := True;
-end;
-
-function InitGLUFromLibrary(const libname: PChar): Boolean;
-begin
-  Result := False;
-  libGLU := LoadLibrary(libname);
-  if not Assigned(libGLU) then
-    exit;
-
-  gluLookAt := GetProc(libglu, 'gluLookAt');
-  gluOrtho2D := GetProc(libglu, 'gluOrtho2D');
-  gluPerspective := GetProc(libglu, 'gluPerspective');
-  gluPickMatrix := GetProc(libglu, 'gluPickMatrix');
-  gluProject := GetProc(libglu, 'gluProject');
-  gluUnProject := GetProc(libglu, 'gluUnProject');
-  gluErrorString := GetProc(libglu, 'gluErrorString');
-  gluScaleImage := GetProc(libglu, 'gluScaleImage');
-  gluBuild1DMipmaps := GetProc(libglu, 'gluBuild1DMipmaps');
-  gluBuild2DMipmaps := GetProc(libglu, 'gluBuild2DMipmaps');
-  gluNewQuadric := GetProc(libglu, 'gluNewQuadric');
-  gluDeleteQuadric := GetProc(libglu, 'gluDeleteQuadric');
-  gluQuadricDrawStyle := GetProc(libglu, 'gluQuadricDrawStyle');
-  gluQuadricOrientation := GetProc(libglu, 'gluQuadricOrientation');
-  gluQuadricNormals := GetProc(libglu, 'gluQuadricNormals');
-  gluQuadricTexture := GetProc(libglu, 'gluQuadricTexture');
-  gluQuadricCallback := GetProc(libglu, 'gluQuadricCallback');
-  gluCylinder := GetProc(libglu, 'gluCylinder');
-  gluSphere := GetProc(libglu, 'gluSphere');
-  gluDisk := GetProc(libglu, 'gluDisk');
-  gluPartialDisk := GetProc(libglu, 'gluPartialDisk');
-  gluNewNurbsRenderer := GetProc(libglu, 'gluNewNurbsRenderer');
-  gluDeleteNurbsRenderer := GetProc(libglu, 'gluDeleteNurbsRenderer');
-  gluLoadSamplingMatrices := GetProc(libglu, 'gluLoadSamplingMatrices');
-  gluNurbsProperty := GetProc(libglu, 'gluNurbsProperty');
-  gluGetNurbsProperty := GetProc(libglu, 'gluGetNurbsProperty');
-  gluBeginCurve := GetProc(libglu, 'gluBeginCurve');
-  gluEndCurve := GetProc(libglu, 'gluEndCurve');
-  gluNurbsCurve := GetProc(libglu, 'gluNurbsCurve');
-  gluBeginSurface := GetProc(libglu, 'gluBeginSurface');
-  gluEndSurface := GetProc(libglu, 'gluEndSurface');
-  gluNurbsSurface := GetProc(libglu, 'gluNurbsSurface');
-  gluBeginTrim := GetProc(libglu, 'gluBeginTrim');
-  gluEndTrim := GetProc(libglu, 'gluEndTrim');
-  gluPwlCurve := GetProc(libglu, 'gluPwlCurve');
-  gluNurbsCallback := GetProc(libglu, 'gluNurbsCallback');
-  gluNewTess := GetProc(libglu, 'gluNewTess');
-  gluDeleteTess := GetProc(libglu, 'gluDeleteTess');
-  gluTessBeginPolygon := GetProc(libglu, 'gluTessBeginPolygon');
-  gluTessBeginContour := GetProc(libglu, 'gluTessBeginContour');
-  gluTessVertex := GetProc(libglu, 'gluTessVertex');
-  gluTessEndContour := GetProc(libglu, 'gluTessEndContour');
-  gluTessEndPolygon := GetProc(libglu, 'gluTessEndPolygon');
-  gluTessProperty := GetProc(libglu, 'gluTessProperty');
-  gluTessNormal := GetProc(libglu, 'gluTessNormal');
-  gluTessCallback := GetProc(libglu, 'gluTessCallback');
-  gluGetTessProperty := GetProc(libglu, 'gluGetTessProperty');
-  gluBeginPolygon := GetProc(libglu, 'gluBeginPolygon');
-  gluNextContour := GetProc(libglu, 'gluNextContour');
-  gluEndPolygon := GetProc(libglu, 'gluEndPolygon');
-  gluGetString := GetProc(libglu, 'gluGetString');
-
-  GLUInitialized := True;
-  Result := True;
-end;
-
-function InitGLX: Boolean;
-begin
-  Result := False;
-  if not Assigned(libGL) then
-    exit;
-
-  glXChooseVisual := GetProc(libglx, 'glXChooseVisual');
-  glXCreateContext := GetProc(libglx, 'glXCreateContext');
-  glXDestroyContext := GetProc(libglx, 'glXDestroyContext');
-  glXMakeCurrent := GetProc(libglx, 'glXMakeCurrent');
-  glXCopyContext := GetProc(libglx, 'glXCopyContext');
-  glXSwapBuffers := GetProc(libglx, 'glXSwapBuffers');
-  glXCreateGLXPixmap := GetProc(libglx, 'glXCreateGLXPixmap');
-  glXDestroyGLXPixmap := GetProc(libglx, 'glXDestroyGLXPixmap');
-  glXQueryExtension := GetProc(libglx, 'glXQueryExtension');
-  glXQueryVersion := GetProc(libglx, 'glXQueryVersion');
-  glXIsDirect := GetProc(libglx, 'glXIsDirect');
-  glXGetConfig := GetProc(libglx, 'glXGetConfig');
-  glXGetCurrentContext := GetProc(libglx, 'glXGetCurrentContext');
-  glXGetCurrentDrawable := GetProc(libglx, 'glXGetCurrentDrawable');
-  glXWaitGL := GetProc(libglx, 'glXWaitGL');
-  glXWaitX := GetProc(libglx, 'glXWaitX');
-  glXUseXFont := GetProc(libglx, 'glXUseXFont');
-  glXQueryExtensionsString := GetProc(libglx, 'glXQueryExtensionsString');
-  glXQueryServerString := GetProc(libglx, 'glXQueryServerString');
-  glXGetClientString := GetProc(libglx, 'glXGetClientString');
-  glXCreateGLXPixmapMESA := GetProc(libglx, 'glXCreateGLXPixmapMESA');
-  glXReleaseBufferMESA := GetProc(libglx, 'glXReleaseBufferMESA');
-  glXCopySubBufferMESA := GetProc(libglx, 'glXCopySubBufferMESA');
-  glXGetVideoSyncSGI := GetProc(libglx, 'glXGetVideoSyncSGI');
-  glXWaitVideoSyncSGI := GetProc(libglx, 'glXWaitVideoSyncSGI');
-
-  GLXInitialized := True;
-  Result := True;
-end;
-
-function InitGL: Boolean;
-begin
-  Result := InitGLFromLibrary('libGL.so') or InitGLFromLibrary('libGL.so.1') or
-    InitGLFromLibrary('libMesaGL.so.3');
-end;
-
-function InitGLU: Boolean;
-begin
-  Result := InitGLUFromLibrary('libGLU.so') or
-    InitGLUFromLibrary('libGLU.so.1') or InitGLUFromLibrary('libMesaGLU.so.3');
-end;
-
-
-finalization
-  // Free all loaded libraries
-  if Assigned(libGLX) then
-    dlclose(libGLX);
-  if Assigned(libGLU) then
-    dlclose(libGLU);
-  if Assigned(libGL) then
-    dlclose(libGL);
-end.
-
-
-{
-  $Log$
-  Revision 1.2  2000-07-13 11:33:29  michael
-  + removed logs
- 
-}

+ 0 - 647
packages/opengl/linux/glut.pp

@@ -1,647 +0,0 @@
-{
-  $Id$
-
-  Translation of the GLUT 3.7 headers for Free Pascal, Linux version
-  Copyright (C) 1999-2000 Sebastian Guenther, [email protected]
-
-
-  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.
-}
-
-
-unit GLUT;
-
-{$MODE delphi}
-
-interface
-
-uses GL;
-
-function InitGLUTFromLibrary(const libname: PChar): Boolean;
-
-// determines automatically which library to use:
-function InitGLUT: Boolean;
-
-
-var
-  GLUTInitialized: Boolean;
-
-  { Set the following value to True if you want to have a list of all
-    unresolved GLUT functions dumped to the console }
-  GLUTDumpUnresolvedFunctions: Boolean;
-
-
-{ 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!). }
-
-const
-  GLUT_API_VERSION		= 4;
-
-  // Display mode bit masks
-  GLUT_RGB                      = 0;
-  GLUT_RGBA                     = GLUT_RGB;
-  GLUT_INDEX                    = 1;
-  GLUT_SINGLE                   = 0;
-  GLUT_DOUBLE                   = 2;
-  GLUT_ACCUM                    = 4;
-  GLUT_ALPHA                    = 8;
-  GLUT_DEPTH                    = 16;
-  GLUT_STENCIL                  = 32;
-  GLUT_MULTISAMPLE              = 128;
-  GLUT_STEREO                   = 256;
-  GLUT_LUMINANCE                = 512;
-
-  // Mouse buttons
-  GLUT_LEFT_BUTTON              = 0;
-  GLUT_MIDDLE_BUTTON            = 1;
-  GLUT_RIGHT_BUTTON             = 2;
-
-  // Mouse button state
-  GLUT_DOWN                     = 0;
-  GLUT_UP                       = 1;
-
-  // function keys
-  GLUT_KEY_F1			= 1;
-  GLUT_KEY_F2			= 2;
-  GLUT_KEY_F3			= 3;
-  GLUT_KEY_F4			= 4;
-  GLUT_KEY_F5			= 5;
-  GLUT_KEY_F6			= 6;
-  GLUT_KEY_F7			= 7;
-  GLUT_KEY_F8			= 8;
-  GLUT_KEY_F9			= 9;
-  GLUT_KEY_F10			= 10;
-  GLUT_KEY_F11			= 11;
-  GLUT_KEY_F12			= 12;
-  // directional keys
-  GLUT_KEY_LEFT			= 100;
-  GLUT_KEY_UP			= 101;
-  GLUT_KEY_RIGHT		= 102;
-  GLUT_KEY_DOWN			= 103;
-  GLUT_KEY_PAGE_UP		= 104;
-  GLUT_KEY_PAGE_DOWN		= 105;
-  GLUT_KEY_HOME			= 106;
-  GLUT_KEY_END			= 107;
-  GLUT_KEY_INSERT		= 108;
-
-  // Enter / exit state
-  GLUT_LEFT                     = 0;
-  GLUT_ENTERED                  = 1;
-
-  // Menu usage state
-  GLUT_MENU_NOT_IN_USE          = 0;
-  GLUT_MENU_IN_USE              = 1;
-
-  // Visibility state
-  GLUT_NOT_VISIBLE              = 0;
-  GLUT_VISIBLE                  = 1;
-
-  // Window status state
-  GLUT_HIDDEN                   = 0;
-  GLUT_FULLY_RETAINED           = 1;
-  GLUT_PARTIALLY_RETAINED       = 2;
-  GLUT_FULLY_COVERED            = 3;
-
-  // Color index component selection values
-  GLUT_RED                      = 0;
-  GLUT_GREEN                    = 1;
-  GLUT_BLUE                     = 2;
-
-  // Layers for use
-  GLUT_NORMAL                   = 0;
-  GLUT_OVERLAY                  = 1;
-
-  // glutGet parameters
-  GLUT_WINDOW_X                 = 100;
-  GLUT_WINDOW_Y                 = 101;
-  GLUT_WINDOW_WIDTH             = 102;
-  GLUT_WINDOW_HEIGHT            = 103;
-  GLUT_WINDOW_BUFFER_SIZE       = 104;
-  GLUT_WINDOW_STENCIL_SIZE      = 105;
-  GLUT_WINDOW_DEPTH_SIZE        = 106;
-  GLUT_WINDOW_RED_SIZE          = 107;
-  GLUT_WINDOW_GREEN_SIZE        = 108;
-  GLUT_WINDOW_BLUE_SIZE         = 109;
-  GLUT_WINDOW_ALPHA_SIZE        = 110;
-  GLUT_WINDOW_ACCUM_RED_SIZE    = 111;
-  GLUT_WINDOW_ACCUM_GREEN_SIZE  = 112;
-  GLUT_WINDOW_ACCUM_BLUE_SIZE   = 113;
-  GLUT_WINDOW_ACCUM_ALPHA_SIZE  = 114;
-  GLUT_WINDOW_DOUBLEBUFFER      = 115;
-  GLUT_WINDOW_RGBA              = 116;
-  GLUT_WINDOW_PARENT            = 117;
-  GLUT_WINDOW_NUM_CHILDREN      = 118;
-  GLUT_WINDOW_COLORMAP_SIZE     = 119;
-  GLUT_WINDOW_NUM_SAMPLES       = 120;
-  GLUT_WINDOW_STEREO            = 121;
-  GLUT_WINDOW_CURSOR            = 122;
-  GLUT_SCREEN_WIDTH             = 200;
-  GLUT_SCREEN_HEIGHT            = 201;
-  GLUT_SCREEN_WIDTH_MM          = 202;
-  GLUT_SCREEN_HEIGHT_MM         = 203;
-  GLUT_MENU_NUM_ITEMS           = 300;
-  GLUT_DISPLAY_MODE_POSSIBLE    = 400;
-  GLUT_INIT_WINDOW_X            = 500;
-  GLUT_INIT_WINDOW_Y            = 501;
-  GLUT_INIT_WINDOW_WIDTH        = 502;
-  GLUT_INIT_WINDOW_HEIGHT       = 503;
-  GLUT_INIT_DISPLAY_MODE        = 504;
-  GLUT_ELAPSED_TIME             = 700;
-  GLUT_WINDOW_FORMAT_ID         = 123;
-
-  // glutDeviceGet parameters
-  GLUT_HAS_KEYBOARD             = 600;
-  GLUT_HAS_MOUSE                = 601;
-  GLUT_HAS_SPACEBALL            = 602;
-  GLUT_HAS_DIAL_AND_BUTTON_BOX  = 603;
-  GLUT_HAS_TABLET               = 604;
-  GLUT_NUM_MOUSE_BUTTONS        = 605;
-  GLUT_NUM_SPACEBALL_BUTTONS    = 606;
-  GLUT_NUM_BUTTON_BOX_BUTTONS   = 607;
-  GLUT_NUM_DIALS                = 608;
-  GLUT_NUM_TABLET_BUTTONS       = 609;
-  GLUT_DEVICE_IGNORE_KEY_REPEAT = 610;
-  GLUT_DEVICE_KEY_REPEAT        = 611;
-  GLUT_HAS_JOYSTICK             = 612;
-  GLUT_OWNS_JOYSTICK            = 613;
-  GLUT_JOYSTICK_BUTTONS         = 614;
-  GLUT_JOYSTICK_AXES            = 615;
-  GLUT_JOYSTICK_POLL_RATE       = 616;
-
-  // glutLayerGet parameters
-  GLUT_OVERLAY_POSSIBLE         = 800;
-  GLUT_LAYER_IN_USE             = 801;
-  GLUT_HAS_OVERLAY              = 802;
-  GLUT_TRANSPARENT_INDEX        = 803;
-  GLUT_NORMAL_DAMAGED           = 804;
-  GLUT_OVERLAY_DAMAGED          = 805;
-
-  // glutVideoResizeGet parameters
-  GLUT_VIDEO_RESIZE_POSSIBLE    = 900;
-  GLUT_VIDEO_RESIZE_IN_USE      = 901;
-  GLUT_VIDEO_RESIZE_X_DELTA     = 902;
-  GLUT_VIDEO_RESIZE_Y_DELTA     = 903;
-  GLUT_VIDEO_RESIZE_WIDTH_DELTA = 904;
-  GLUT_VIDEO_RESIZE_HEIGHT_DELTA= 905;
-  GLUT_VIDEO_RESIZE_X           = 906;
-  GLUT_VIDEO_RESIZE_Y           = 907;
-  GLUT_VIDEO_RESIZE_WIDTH       = 908;
-  GLUT_VIDEO_RESIZE_HEIGHT      = 909;
-
-  // glutGetModifiers return mask
-  GLUT_ACTIVE_SHIFT             = 1;
-  GLUT_ACTIVE_CTRL              = 2;
-  GLUT_ACTIVE_ALT               = 4;
-
-  // glutSetCursor parameters
-  // Basic arrows
-  GLUT_CURSOR_RIGHT_ARROW	= 0;
-  GLUT_CURSOR_LEFT_ARROW	= 1;
-  // Symbolic cursor shapes
-  GLUT_CURSOR_INFO		= 2;
-  GLUT_CURSOR_DESTROY		= 3;
-  GLUT_CURSOR_HELP		= 4;
-  GLUT_CURSOR_CYCLE		= 5;
-  GLUT_CURSOR_SPRAY		= 6;
-  GLUT_CURSOR_WAIT		= 7;
-  GLUT_CURSOR_TEXT		= 8;
-  GLUT_CURSOR_CROSSHAIR		= 9;
-  // Directional cursors
-  GLUT_CURSOR_UP_DOWN		= 10;
-  GLUT_CURSOR_LEFT_RIGHT	= 11;
-  // Sizing cursors
-  GLUT_CURSOR_TOP_SIDE		= 12;
-  GLUT_CURSOR_BOTTOM_SIDE	= 13;
-  GLUT_CURSOR_LEFT_SIDE		= 14;
-  GLUT_CURSOR_RIGHT_SIDE	= 15;
-  GLUT_CURSOR_TOP_LEFT_CORNER	= 16;
-  GLUT_CURSOR_TOP_RIGHT_CORNER	= 17;
-  GLUT_CURSOR_BOTTOM_RIGHT_CORNER = 18;
-  GLUT_CURSOR_BOTTOM_LEFT_CORNER = 19;
-  // Inherit from parent window
-  GLUT_CURSOR_INHERIT		= 100;
-  // Blank cursor
-  GLUT_CURSOR_NONE		= 101;
-  // Fullscreen crosshair (if available)
-  GLUT_CURSOR_FULL_CROSSHAIR	= 102;
-
-type
-
-  // GLUT menu sub-API
-  TGlutCreateMenuFunc = procedure(arg: Int); cdecl;
-
-  // GLUT window callback sub-API
-  TGlutDisplayFunc = procedure; cdecl;
-  TGlutReshapeFunc = procedure(width, height: Int); cdecl;
-  TGlutKeyboardFunc = procedure(key: Char; x, y: Int); cdecl;
-  TGlutMouseFunc = procedure(button, state, x, y: Int); cdecl;
-  TGlutMotionFunc = procedure(x, y: Int); cdecl;
-  TGlutPassiveMotionFunc = procedure(x, y: Int); cdecl;
-  TGlutEntryFunc = procedure(x, y: Int); cdecl;
-  TGlutVisibilityFunc = procedure(state: Int); cdecl;
-  TGlutIdleFunc = procedure; cdecl;
-  TGlutTimerFunc = procedure(value: Int); cdecl;
-  TGlutMenuStateFunc = procedure(state: Int); cdecl;
-  TGlutSpecialFunc = procedure(key, x, y: Int); cdecl;
-  TGlutSpaceballMotionFunc = procedure(x, y, z: Int); cdecl;
-  TGlutSpaceballRotateFunc = procedure(x, y, z: Int); cdecl;
-  TGlutSpaceballButtonFunc = procedure(button, state: Int); cdecl;
-  TGlutButtonBoxFunc = procedure(button, state: Int); cdecl;
-  TGlutDialsFunc = procedure(dial, value: Int); cdecl;
-  TGlutTabletMotionFunc = procedure(x, y: Int); cdecl;
-  TGlutTabletButtonFunc = procedure(button, state, x, y: Int); cdecl;
-  TGlutMenuStatusFunc = procedure(status, x, y: Int); cdecl;
-  TGlutOverlayDisplayFunc = procedure; cdecl;
-  TGlutWindowStatusFunc = procedure(state: Int); cdecl;
-  TGlutKeyboardUpFunc = procedure(key: Char; x, y: Int); cdecl;
-  TGlutSpecialUpFunc = procedure(key, x, y: Int); cdecl;
-  TGlutJoystickFunc = procedure(buttonMask: UnsignedInt; x, y, z: Int); cdecl;
-
-const
-// GLUT device control sub-API
-  // glutSetKeyRepeat modes.
-  GLUT_KEY_REPEAT_OFF		= 0;
-  GLUT_KEY_REPEAT_ON		= 1;
-  GLUT_KEY_REPEAT_DEFAULT	= 2;
-
-  // Joystick button masks
-  GLUT_JOYSTICK_BUTTON_A	= 1;
-  GLUT_JOYSTICK_BUTTON_B	= 2;
-  GLUT_JOYSTICK_BUTTON_C	= 4;
-  GLUT_JOYSTICK_BUTTON_D	= 8;
-
-// GLUT game mode sub-API
-  // glutGameModeGet
-  GLUT_GAME_MODE_ACTIVE         = 0;
-  GLUT_GAME_MODE_POSSIBLE       = 1;
-  GLUT_GAME_MODE_WIDTH          = 2;
-  GLUT_GAME_MODE_HEIGHT         = 3;
-  GLUT_GAME_MODE_PIXEL_DEPTH    = 4;
-  GLUT_GAME_MODE_REFRESH_RATE   = 5;
-  GLUT_GAME_MODE_DISPLAY_CHANGED= 6;
-
-
-var
-
-{ The following stuff does not exist in the Win32 version: }
-(* commented out because cvars don't work in Delphi mode...
-// Stroke font opaque addresses (use constants instead in source code).
-var
-  glutStrokeRoman, glutStrokeMonoRoman: Pointer; cvar; external;
-
-// Stroke font constants (use these in GLUT program).
-const
-  GLUT_STROKE_ROMAN = @glutStrokeRoman;
-  GLUT_STROKE_MONO_ROMAN = @glutStrokeMonoRoman;
-
-// Bitmap font opaque addresses (use constants instead in source code).
-var
-  glutBitmap9By15, glutBitmap8By13, glutBitmapTimesRoman10,
-    glutBitmapTimesRoman24, glutBitmapHelvetica10, glutBitmapHelvetica12,
-    glutBitmapHelvetica18: Pointer; cdecl; external;
-
-// Bitmap font constants (use these in GLUT program).
-const
-  GLUT_BITMAP_9_BY_15 = @glutBitmap9By15;
-  GLUT_BITMAP_8_BY_13 = @glutBitmap8By13;
-  GLUT_BITMAP_TIMES_ROMAN_10 = @glutBitmapTimesRoman10;
-  GLUT_BITMAP_TIMES_ROMAN_24 = @glutBitmapTimesRoman24;
-  GLUT_BITMAP_HELVETICA_10 = @glutBitmapHelvetica10;
-  GLUT_BITMAP_HELVETICA_12 = @glutBitmapHelvetica12;
-  GLUT_BITMAP_HELVETICA_18 = @glutBitmapHelvetica18;*)
-
-// GLUT initialization sub-API
-  glutInit: procedure(argcp: PInt; argv: PPChar); cdecl;
-  glutInitDisplayMode: procedure(mode: UnsignedInt); cdecl;
-  glutInitDisplayString: procedure(const AString: PChar); cdecl;
-  glutInitWindowPosition: procedure(x, y: Int); cdecl;
-  glutInitWindowSize: procedure(width, height: Int); cdecl;
-  glutMainLoop: procedure; cdecl;
-
-// GLUT window sub-API
-  glutCreateWindow: function(const title: PChar): Int; cdecl;
-  glutCreateSubWindow: function(win, x, y, width, height: Int): Int; cdecl;
-  glutDestroyWindow: procedure(win: Int); cdecl;
-  glutPostRedisplay: procedure; cdecl;
-  glutPostWindowRedisplay: procedure(win: Int); cdecl;
-  glutSwapBuffers: procedure; cdecl;
-  glutGetWindow: function: Int; cdecl;
-  glutSetWindow: procedure(win: Int); cdecl;
-  glutSetWindowTitle: procedure(const title: PChar); cdecl;
-  glutSetIconTitle: procedure(title: PChar); cdecl;
-  glutPositionWindow: procedure(x, y: Int); cdecl;
-  glutReshapeWindow: procedure(width, height: Int); cdecl;
-  glutPopWindow: procedure; cdecl;
-  glutPushWindow: procedure; cdecl;
-  glutIconifyWindow: procedure; cdecl;
-  glutShowWindow: procedure; cdecl;
-  glutHideWindow: procedure; cdecl;
-  glutFullScreen: procedure; cdecl;
-  glutSetCursor: procedure(cursor: Int); cdecl;
-  glutWarpPointer: procedure(x, y: Int); cdecl;
-
-// GLUT overlay sub-API
-  glutEstablishOverlay: procedure; cdecl;
-  glutRemoveOverlay: procedure; cdecl;
-  glutUseLayer: procedure(layer: GLenum); cdecl;
-  glutPostOverlayRedisplay: procedure; cdecl;
-  glutPostWindowOverlayRedisplay: procedure(win: Int); cdecl;
-  glutShowOverlay: procedure; cdecl;
-  glutHideOverlay: procedure; cdecl;
-
-// GLUT menu sub-API
-  glutCreateMenu: function(func: TGlutCreateMenuFunc): Int; cdecl;
-  glutDestroyMenu: procedure(menu: Int); cdecl;
-  glutGetMenu: function: Int; cdecl;
-  glutSetMenu: procedure(menu: Int); cdecl;
-  glutAddMenuEntry: procedure(const ALabel: PChar; value: Int); cdecl;
-  glutAddSubMenu: procedure(const ALabel: PChar; submenu: Int); cdecl;
-  glutChangeToMenuEntry: procedure(item: Int; const ALabel: PChar; value: Int); cdecl;
-  glutChangeToSubMenu: procedure(item: Int; const ALabel: PChar; submenu: Int); cdecl;
-  glutRemoveMenuItem: procedure(item: Int); cdecl;
-  glutAttachMenu: procedure(button: Int); cdecl;
-  glutDetachMenu: procedure(button: Int); cdecl;
-
-// GLUT window callback sub-API
-  glutDisplayFunc: procedure(func: TGlutDisplayFunc); cdecl;
-  glutReshapeFunc: procedure(func: TGlutReshapeFunc); cdecl;
-  glutKeyboardFunc: procedure(func: TGlutKeyboardFunc); cdecl;
-  glutMouseFunc: procedure(func: TGlutMouseFunc); cdecl;
-  glutMotionFunc: procedure(func: TGlutMotionFunc); cdecl;
-  glutPassiveMotionFunc: procedure(func: TGlutPassiveMotionFunc); cdecl;
-  glutEntryFunc: procedure(func: TGlutEntryFunc); cdecl;
-  glutIdleFunc: procedure(func: TGlutIdleFunc); cdecl;
-  glutTimerFunc: procedure(millis: UnsignedInt; func: TGlutTimerFunc; value: Int); cdecl;
-  glutMenuStateFunc: procedure(func: TGlutMenuStateFunc); cdecl;
-  glutSpecialFunc: procedure(func: TGlutSpecialFunc); cdecl;
-  glutSpaceballMotionFunc: procedure(func: TGlutSpaceballMotionFunc); cdecl;
-  glutSpaceballRotateFunc: procedure(func: TGlutSpaceballRotateFunc); cdecl;
-  glutSpaceballButtonFunc: procedure(func: TGlutSpaceballButtonFunc); cdecl;
-  glutButtonBoxFunc: procedure(func: TGlutButtonBoxFunc); cdecl;
-  glutDialsFunc: procedure(func: TGlutDialsFunc); cdecl;
-  glutTabletMotionFunc: procedure(func: TGlutTabletMotionFunc); cdecl;
-  glutTabletButtonFunc: procedure(func: TGlutTabletButtonFunc); cdecl;
-  glutMenuStatusFunc: procedure(func: TGlutMenuStatusFunc); cdecl;
-  glutOverlayDisplayFunc: procedure(func: TGlutOverlayDisplayFunc); cdecl;
-  glutWindowStatusFunc: procedure(func: TGlutWindowStatusFunc); cdecl;
-  glutKeyboardUpFunc: procedure(func: TGlutKeyboardUpFunc); cdecl;
-  glutSpecialUpFunc: procedure(func: TGlutSpecialUpFunc); cdecl;
-  glutJoystickFunc: procedure(func: TGlutJoystickFunc; pollinterval: Int); cdecl;
-
-// GLUT color index sub-API
-  glutSetColor: procedure(index: Int; red, green, blue: GLfloat); cdecl;
-  glutGetColor: function(ndx, component: Int): GLfloat; cdecl;
-  glutCopyColormap: procedure(win: Int); cdecl;
-
-// GLUT state retrieval sub-API
-  glutGet: function(AType: GLEnum): Int; cdecl;
-  glutDeviceGet: function(AType: GLEnum): Int; cdecl;
-  glutExtensionSupported: function(const name: PChar): Int; cdecl;
-  glutGetModifiers: function: Int; cdecl;
-  glutLayerGet: function(AType: GLEnum): Int; cdecl;
-
-// GLUT font sub-API
-  glutBitmapCharacter: procedure(font: Pointer; character: Int); cdecl;
-  glutBitmapWidth: function(font: Pointer; character: Int): Int; cdecl;
-  glutStrokeCharacter: procedure(font: Pointer; character: Int); cdecl;
-  glutStrokeWidth: function(font: Pointer; character: Int): Int; cdecl;
-  glutBitmapLength: function(font: Pointer; const AString: PChar): Int; cdecl;
-  glutStrokeLength: function(font: Pointer; const AString: PChar): Int; cdecl;
-
-// GLUT pre-built models sub-API
-  glutWireSphere: procedure(radius: GLdouble; slices, stacks: GLint); cdecl;
-  glutSolidSphere: procedure(radius: GLdouble; slices, stacks: GLint); cdecl;
-  glutWireCone: procedure(base: GLdouble; height: GLdouble; slices, stacks: GLint); cdecl;
-  glutSolidCone: procedure(base: GLdouble; height: GLdouble; slices, stacks: GLint); cdecl;
-  glutWireCube: procedure(size: GLdouble); cdecl;
-  glutSolidCube: procedure(size: GLdouble); cdecl;
-  glutWireTorus: procedure(innerRadius, outerRadius: GLdouble; sides, rings: GLint); cdecl;
-  glutSolidTorus: procedure(innerRadius, outerRadius: GLdouble; sides, rings: GLint); cdecl;
-  glutWireDodecahedron: procedure; cdecl;
-  glutSolidDodecahedron: procedure; cdecl;
-  glutWireTeapot: procedure(size: GLdouble); cdecl;
-  glutSolidTeapot: procedure(size: GLdouble); cdecl;
-  glutWireOctahedron: procedure; cdecl;
-  glutSolidOctahedron: procedure; cdecl;
-  glutWireTetrahedron: procedure; cdecl;
-  glutSolidTetrahedron: procedure; cdecl;
-  glutWireIcosahedron: procedure; cdecl;
-  glutSolidIcosahedron: procedure; cdecl;
-
-// GLUT video resize sub-API
-  glutVideoResizeGet: function(param: GLenum): Int; cdecl;
-  glutSetupVideoResizing: procedure; cdecl;
-  glutStopVideoResizing: procedure; cdecl;
-  glutVideoResize: procedure(x, y, width, height: Int); cdecl;
-  glutVideoPan: procedure(x, y, width, height: Int); cdecl;
-
-// GLUT debugging sub-API
-  glutReportErrors: procedure; cdecl;
-
-// GLUT device control sub-API
-  glutIgnoreKeyRepeat: procedure(ignore: Int); cdecl;
-  glutSetKeyRepeat: procedure(repeatMode: Int); cdecl;
-  glutForceJoystickFunc: procedure; cdecl;
-
-// GLUT game mode sub-API
-  glutGameModeString: procedure(const AString: PChar); cdecl;
-  glutEnterGameMode: function: Integer; cdecl;
-  glutLeaveGameMode: procedure; cdecl;
-  glutGameModeGet: function(mode: GLEnum): Int; cdecl;
-
-
-
-implementation
-
-{$LINKLIB Xmu}
-
-function dlopen(const AFile: PChar; mode: LongInt): Pointer; external 'dl';
-function dlclose(handle: Pointer): LongInt; external 'dl';
-function dlsym(handle: Pointer; const name: PChar): Pointer; external 'dl';
-
-function LoadLibrary(const name: PChar): Pointer;
-begin
-  Result := dlopen(name, $101 {RTLD_GLOBAL or RTLD_LAZY});
-end;
-
-procedure FreeLibrary(handle: Pointer);
-begin
-  dlclose(handle);
-end;
-
-function GetProc(handle: Pointer; const name: PChar): Pointer;
-begin
-  Result := dlsym(handle, name);
-  if not Assigned(Result) and GLUTDumpUnresolvedFunctions then
-    WriteLn('Unresolved: ', name);
-end;
-
-var
-  libGLUT: Pointer;
-
-function InitGLUTFromLibrary(const libname: PChar): Boolean;
-begin
-  Result := False;
-  libGLUT := LoadLibrary(libname);
-  if not Assigned(libGLUT) then
-    exit;
-
-  glutInit := GetProc(libglut, 'glutInit');
-  glutInitDisplayMode := GetProc(libglut, 'glutInitDisplayMode');
-  glutInitDisplayString := GetProc(libglut, 'glutInitDisplayString');
-  glutInitWindowPosition := GetProc(libglut, 'glutInitWindowPosition');
-  glutInitWindowSize := GetProc(libglut, 'glutInitWindowSize');
-  glutMainLoop := GetProc(libglut, 'glutMainLoop');
-  glutCreateWindow := GetProc(libglut, 'glutCreateWindow');
-  glutCreateSubWindow := GetProc(libglut, 'glutCreateSubWindow');
-  glutDestroyWindow := GetProc(libglut, 'glutDestroyWindow');
-  glutPostRedisplay := GetProc(libglut, 'glutPostRedisplay');
-  glutPostWindowRedisplay := GetProc(libglut, 'glutPostWindowRedisplay');
-  glutSwapBuffers := GetProc(libglut, 'glutSwapBuffers');
-  glutGetWindow := GetProc(libglut, 'glutGetWindow');
-  glutSetWindow := GetProc(libglut, 'glutSetWindow');
-  glutSetWindowTitle := GetProc(libglut, 'glutSetWindowTitle');
-  glutSetIconTitle := GetProc(libglut, 'glutSetIconTitle');
-  glutPositionWindow := GetProc(libglut, 'glutPositionWindow');
-  glutReshapeWindow := GetProc(libglut, 'glutReshapeWindow');
-  glutPopWindow := GetProc(libglut, 'glutPopWindow');
-  glutPushWindow := GetProc(libglut, 'glutPushWindow');
-  glutIconifyWindow := GetProc(libglut, 'glutIconifyWindow');
-  glutShowWindow := GetProc(libglut, 'glutShowWindow');
-  glutHideWindow := GetProc(libglut, 'glutHideWindow');
-  glutFullScreen := GetProc(libglut, 'glutFullScreen');
-  glutSetCursor := GetProc(libglut, 'glutSetCursor');
-  glutWarpPointer := GetProc(libglut, 'glutWarpPointer');
-  glutEstablishOverlay := GetProc(libglut, 'glutEstablishOverlay');
-  glutRemoveOverlay := GetProc(libglut, 'glutRemoveOverlay');
-  glutUseLayer := GetProc(libglut, 'glutUseLayer');
-  glutPostOverlayRedisplay := GetProc(libglut, 'glutPostOverlayRedisplay');
-  glutPostWindowOverlayRedisplay := GetProc(libglut, 'glutPostWindowOverlayRedisplay');
-  glutShowOverlay := GetProc(libglut, 'glutShowOverlay');
-  glutHideOverlay := GetProc(libglut, 'glutHideOverlay');
-  glutCreateMenu := GetProc(libglut, 'glutCreateMenu');
-  glutDestroyMenu := GetProc(libglut, 'glutDestroyMenu');
-  glutGetMenu := GetProc(libglut, 'glutGetMenu');
-  glutSetMenu := GetProc(libglut, 'glutSetMenu');
-  glutAddMenuEntry := GetProc(libglut, 'glutAddMenuEntry');
-  glutAddSubMenu := GetProc(libglut, 'glutAddSubMenu');
-  glutChangeToMenuEntry := GetProc(libglut, 'glutChangeToMenuEntry');
-  glutChangeToSubMenu := GetProc(libglut, 'glutChangeToSubMenu');
-  glutRemoveMenuItem := GetProc(libglut, 'glutRemoveMenuItem');
-  glutAttachMenu := GetProc(libglut, 'glutAttachMenu');
-  glutDetachMenu := GetProc(libglut, 'glutDetachMenu');
-  glutDisplayFunc := GetProc(libglut, 'glutDisplayFunc');
-  glutReshapeFunc := GetProc(libglut, 'glutReshapeFunc');
-  glutKeyboardFunc := GetProc(libglut, 'glutKeyboardFunc');
-  glutMouseFunc := GetProc(libglut, 'glutMouseFunc');
-  glutMotionFunc := GetProc(libglut, 'glutMotionFunc');
-  glutPassiveMotionFunc := GetProc(libglut, 'glutPassiveMotionFunc');
-  glutEntryFunc := GetProc(libglut, 'glutEntryFunc');
-  glutIdleFunc := GetProc(libglut, 'glutIdleFunc');
-  glutTimerFunc := GetProc(libglut, 'glutTimerFunc');
-  glutMenuStateFunc := GetProc(libglut, 'glutMenuStateFunc');
-  glutSpecialFunc := GetProc(libglut, 'glutSpecialFunc');
-  glutSpaceballMotionFunc := GetProc(libglut, 'glutSpaceballMotionFunc');
-  glutSpaceballRotateFunc := GetProc(libglut, 'glutSpaceballRotateFunc');
-  glutSpaceballButtonFunc := GetProc(libglut, 'glutSpaceballButtonFunc');
-  glutButtonBoxFunc := GetProc(libglut, 'glutButtonBoxFunc');
-  glutDialsFunc := GetProc(libglut, 'glutDialsFunc');
-  glutTabletMotionFunc := GetProc(libglut, 'glutTabletMotionFunc');
-  glutTabletButtonFunc := GetProc(libglut, 'glutTabletButtonFunc');
-  glutMenuStatusFunc := GetProc(libglut, 'glutMenuStatusFunc');
-  glutOverlayDisplayFunc := GetProc(libglut, 'glutOverlayDisplayFunc');
-  glutWindowStatusFunc := GetProc(libglut, 'glutWindowStatusFunc');
-  glutKeyboardUpFunc := GetProc(libglut, 'glutKeyboardUpFunc');
-  glutSpecialUpFunc := GetProc(libglut, 'glutSpecialUpFunc');
-  glutJoystickFunc := GetProc(libglut, 'glutJoystickFunc');
-  glutSetColor := GetProc(libglut, 'glutSetColor');
-  glutGetColor := GetProc(libglut, 'glutGetColor');
-  glutCopyColormap := GetProc(libglut, 'glutCopyColormap');
-  glutGet := GetProc(libglut, 'glutGet');
-  glutDeviceGet := GetProc(libglut, 'glutDeviceGet');
-  glutExtensionSupported := GetProc(libglut, 'glutExtensionSupported');
-  glutGetModifiers := GetProc(libglut, 'glutGetModifiers');
-  glutLayerGet := GetProc(libglut, 'glutLayerGet');
-  glutBitmapCharacter := GetProc(libglut, 'glutBitmapCharacter');
-  glutBitmapWidth := GetProc(libglut, 'glutBitmapWidth');
-  glutStrokeCharacter := GetProc(libglut, 'glutStrokeCharacter');
-  glutStrokeWidth := GetProc(libglut, 'glutStrokeWidth');
-  glutBitmapLength := GetProc(libglut, 'glutBitmapLength');
-  glutStrokeLength := GetProc(libglut, 'glutStrokeLength');
-  glutWireSphere := GetProc(libglut, 'glutWireSphere');
-  glutSolidSphere := GetProc(libglut, 'glutSolidSphere');
-  glutWireCone := GetProc(libglut, 'glutWireCone');
-  glutSolidCone := GetProc(libglut, 'glutSolidCone');
-  glutWireCube := GetProc(libglut, 'glutWireCube');
-  glutSolidCube := GetProc(libglut, 'glutSolidCube');
-  glutWireTorus := GetProc(libglut, 'glutWireTorus');
-  glutSolidTorus := GetProc(libglut, 'glutSolidTorus');
-  glutWireDodecahedron := GetProc(libglut, 'glutWireDodecahedron');
-  glutSolidDodecahedron := GetProc(libglut, 'glutSolidDodecahedron');
-  glutWireTeapot := GetProc(libglut, 'glutWireTeapot');
-  glutSolidTeapot := GetProc(libglut, 'glutSolidTeapot');
-  glutWireOctahedron := GetProc(libglut, 'glutWireOctahedron');
-  glutSolidOctahedron := GetProc(libglut, 'glutSolidOctahedron');
-  glutWireTetrahedron := GetProc(libglut, 'glutWireTetrahedron');
-  glutSolidTetrahedron := GetProc(libglut, 'glutSolidTetrahedron');
-  glutWireIcosahedron := GetProc(libglut, 'glutWireIcosahedron');
-  glutSolidIcosahedron := GetProc(libglut, 'glutSolidIcosahedron');
-  glutVideoResizeGet := GetProc(libglut, 'glutVideoResizeGet');
-  glutSetupVideoResizing := GetProc(libglut, 'glutSetupVideoResizing');
-  glutStopVideoResizing := GetProc(libglut, 'glutStopVideoResizing');
-  glutVideoResize := GetProc(libglut, 'glutVideoResize');
-  glutVideoPan := GetProc(libglut, 'glutVideoPan');
-  glutReportErrors := GetProc(libglut, 'glutReportErrors');
-  glutIgnoreKeyRepeat := GetProc(libglut, 'glutIgnoreKeyRepeat');
-  glutSetKeyRepeat := GetProc(libglut, 'glutSetKeyRepeat');
-  glutForceJoystickFunc := GetProc(libglut, 'glutForceJoystickFunc');
-  glutGameModeString := GetProc(libglut, 'glutGameModeString');
-  glutEnterGameMode := GetProc(libglut, 'glutEnterGameMode');
-  glutLeaveGameMode := GetProc(libglut, 'glutLeaveGameMode');
-  glutGameModeGet := GetProc(libglut, 'glutGameModeGet');
-
-  GLUTInitialized := True;
-  Result := True;
-end;
-
-
-function InitGLUT: Boolean;
-begin
-  Result := InitGLUTFromLibrary('libglut.so') or InitGLUTFromLibrary('libglut.so.3');
-end;
-
-
-
-finalization
-  if Assigned(libGLUT) then
-    FreeLibrary(libGLUT);
-end.
-
-
-{
-  $Log$
-  Revision 1.2  2000-07-13 11:33:29  michael
-  + removed logs
- 
-}

+ 0 - 185
packages/opengl/linux/gtkglarea.pp

@@ -1,185 +0,0 @@
-{
-  $Id$
-
-  Translation of the gtkglarea 4 headers for Free Pascal
-  Copyright (C) 2000 Sebastian Guenther
-
-  Copyright notice of gtkglarea:
-
-  * Copyright (C) 1997-1998 Janne Löf <[email protected]>
-  *
-  * This library is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU Library General Public
-  * License as published by the Free Software Foundation; either
-  * version 2 of the License, or (at your option) any later version.
-  *
-  * This library 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
-  * Library General Public License for more details.
-  *
-  * You should have received a copy of the GNU Library General Public
-  * License along with this library; if not, write to the Free
-  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-}
-
-unit gtkglarea;
-
-{$MODE objfpc}
-{$PACKRECORDS C}
-{$LINKLIB GL}
-
-interface
-
-uses GDK, GTK;
-
-
-const
-
-  libgtkgl = 'gtkgl';
-
-
-
-
-// ===================================================================
-//   gdkgl
-// ===================================================================
-
-{
-  These definitions are duplicated from GL/glx.h that comes with Mesa.
-  I don't want every program to include GL/glx.h, that might become
-  problem if GtkGLArea is ever ported to non X environments like
-  (horror!) Windows.
-}
-
-// enum _GDK_GL_CONFIGS
-  GDK_GL_NONE             		= 0;
-  GDK_GL_USE_GL				= 1;
-  GDK_GL_BUFFER_SIZE			= 2;
-  GDK_GL_LEVEL				= 3;
-  GDK_GL_RGBA				= 4;
-  GDK_GL_DOUBLEBUFFER			= 5; 
-  GDK_GL_STEREO				= 6;
-  GDK_GL_AUX_BUFFERS			= 7;
-  GDK_GL_RED_SIZE			= 8;
-  GDK_GL_GREEN_SIZE			= 9;
-  GDK_GL_BLUE_SIZE			= 10;
-  GDK_GL_ALPHA_SIZE			= 11;
-  GDK_GL_DEPTH_SIZE			= 12;
-  GDK_GL_STENCIL_SIZE			= 13;
-  GDK_GL_ACCUM_RED_SIZE			= 14;
-  GDK_GL_ACCUM_GREEN_SIZE		= 15;
-  GDK_GL_ACCUM_BLUE_SIZE		= 16;
-  GDK_GL_ACCUM_ALPHA_SIZE		= 17;
-
-  // GLX_EXT_visual_info extension
-  GDK_GL_X_VISUAL_TYPE_EXT              = $22;
-  GDK_GL_TRANSPARENT_TYPE_EXT	        = $23;
-  GDK_GL_TRANSPARENT_INDEX_VALUE_EXT	= $24;
-  GDK_GL_TRANSPARENT_RED_VALUE_EXT	= $25;
-  GDK_GL_TRANSPARENT_GREEN_VALUE_EXT	= $26;
-  GDK_GL_TRANSPARENT_BLUE_VALUE_EXT	= $27;
-  GDK_GL_TRANSPARENT_ALPHA_VALUE_EXT	= $28;
-
-
-type
-
-  TGdkGLContext = record end;
-  PGdkGLContext = ^TGdkGLContext;
-
-
-function  gdk_gl_query: Integer; cdecl; external libgtkgl;
-function  gdk_gl_choose_visual(attrList: PInteger): PGdkVisual; cdecl; external libgtkgl;
-function  gdk_gl_get_config(visual: PGdkVisual; attrib: Integer): Integer; cdecl; external libgtkgl;
-function  gdk_gl_context_new(visual: PGdkVisual): PGdkGLContext; cdecl; external libgtkgl;
-function  gdk_gl_context_share_new(visual: PGdkVisual; sharelist: PGdkGLContext; direct: Integer): PGdkGLContext; cdecl; external libgtkgl;
-function  gdk_gl_context_ref(context: PGdkGLContext): PGdkGLContext; cdecl; external libgtkgl;
-procedure gdk_gl_context_unref(context: PGdkGLContext); cdecl; external libgtkgl;
-function  gdk_gl_make_current(drawable: PGdkDrawable; context: PGdkGLContext): Integer; cdecl; external libgtkgl;
-procedure gdk_gl_swap_buffers(drawable: PGdkDrawable); cdecl; external libgtkgl;
-procedure gdk_gl_wait_gdk; cdecl; external libgtkgl;
-procedure gdk_gl_wait_gl; cdecl; external libgtkgl;
-
-
-// glpixmap stuff
-
-type
-
-  TGdkGLPixmap = record end;
-  PGdkGLPixmap = ^TGdkGLPixmap;
-
-function  gdk_gl_pixmap_new(visual: PGdkVisual; pixmap: PGdkPixmap): PGdkGLPixmap; cdecl; external libgtkgl;
-function  gdk_gl_pixmap_ref(glpixmap: PGdkGLPixmap): PGdkGLPixmap; cdecl; external libgtkgl;
-procedure gdk_gl_pixmap_unref(glpixmap: PGdkGLPixmap); cdecl; external libgtkgl;
-function  gdk_gl_pixmap_make_current(glpixmap: PGdkGLPixmap; context: PGdkGLContext): Integer; cdecl; external libgtkgl;
-
-
-// fonts
-procedure gdk_gl_use_gdk_font(font: PGdkFont; first, count, list_base: Integer); cdecl; external libgtkgl;
-
-
-
-// ===================================================================
-//   gtkglarea
-// ===================================================================
-
-type
-
-  PGtkGLArea = ^TGtkGLArea;
-
-  TGtkGLArea = record
-    darea: TGtkDrawingArea;
-    glcontext: PGdkGLContext;
-  end;
-  
-
-  PGtkGLAreaClass = ^TGtkGLAreaClass;
-  TGtkGLAreaClass = record
-    parent_class: TGtkDrawingAreaClass;
-  end;
-
-
-function  GTK_TYPE_GL_AREA: TGtkType; cdecl; external libgtkgl name 'gtk_gl_area_get_type';
-function  GTK_IS_GL_AREA(obj: Pointer): Boolean;
-function  GTK_IS_GL_AREA_CLASS(klass: Pointer): Boolean;
-
-function  gtk_gl_area_get_type: TGtkType; cdecl; external libgtkgl;
-function  gtk_gl_area_new(attrList: PInteger): PGtkWidget; cdecl; external libgtkgl;
-function  gtk_gl_area_share_new(attrList: PInteger; share: PGtkGLArea): PGtkWidget; cdecl; external libgtkgl;
-function  gtk_gl_area_new_vargs(share: PGtkGLArea; args: array of const): PGtkWidget; cdecl; external libgtkgl;
-
-function  gtk_gl_area_make_current(glarea: PGtkGLArea): Integer; cdecl; external libgtkgl;
-// deprecated, use gtk_gl_area_make_current:
-function  gtk_gl_area_begingl(glarea: PGtkGLArea): Integer; cdecl; external libgtkgl;
-// deprecated:
-procedure gtk_gl_area_endgl(glarea: PGtkGLArea); cdecl; external libgtkgl;
-procedure gtk_gl_area_swapbuffers(glarea: PGtkGLArea); cdecl; external libgtkgl;
-// deprecated, use gtk_drawing_area_size():
-procedure gtk_gl_area_size(glarea: PGtkGLArea; width, height: Integer); cdecl; external libgtkgl;
-
-
-
-
-implementation
-
-
-function GTK_IS_GL_AREA(obj: Pointer): Boolean;
-begin
-  Result := Assigned(obj) and GTK_IS_GL_AREA_CLASS(PGtkTypeObject(obj)^.klass);
-end;
-
-function GTK_IS_GL_AREA_CLASS(klass: Pointer): Boolean;
-begin
-  Result := Assigned(klass) and (PGtkTypeClass(klass)^.thetype = GTK_TYPE_GL_AREA);
-end;
-
-
-end.
-
-
-{
-  $Log$
-  Revision 1.2  2000-07-13 11:33:30  michael
-  + removed logs
- 
-}